@mlw-packages/react-components 1.10.21 → 1.10.23
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/index.css +26 -13
- package/dist/index.d.mts +33 -3
- package/dist/index.d.ts +33 -3
- package/dist/index.js +463 -106
- package/dist/index.mjs +464 -108
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1664,9 +1664,16 @@ var ModalContentBase = React32__namespace.forwardRef(
|
|
|
1664
1664
|
size = "md",
|
|
1665
1665
|
centered = true,
|
|
1666
1666
|
backdropBlur = true,
|
|
1667
|
+
noPadding = false,
|
|
1667
1668
|
...props
|
|
1668
1669
|
}, ref) => {
|
|
1669
|
-
const sizeClass =
|
|
1670
|
+
const sizeClass = {
|
|
1671
|
+
sm: "max-w-md",
|
|
1672
|
+
md: "max-w-2xl",
|
|
1673
|
+
lg: "max-w-4xl",
|
|
1674
|
+
xl: "max-w-6xl",
|
|
1675
|
+
full: "w-full max-w-[calc(100%-2rem)]"
|
|
1676
|
+
}[size];
|
|
1670
1677
|
const positionClass = centered ? "left-[50%] top-[50%] translate-x-[-50%] translate-y-[-50%]" : "left-[50%] top-20 translate-x-[-50%] translate-y-0 sm:translate-y-0";
|
|
1671
1678
|
return /* @__PURE__ */ jsxRuntime.jsxs(ModalPortalBase, { children: [
|
|
1672
1679
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1699,8 +1706,9 @@ var ModalContentBase = React32__namespace.forwardRef(
|
|
|
1699
1706
|
{
|
|
1700
1707
|
ref,
|
|
1701
1708
|
className: cn(
|
|
1702
|
-
"fixed z-50 grid w-[calc(100%-2rem)]
|
|
1709
|
+
"fixed z-50 grid w-[calc(100%-2rem)] border bg-background shadow-lg rounded-md sm:rounded-lg max-h-[calc(100dvh-2rem)] sm:max-h-[90dvh] overflow-auto",
|
|
1703
1710
|
"data-[state=open]:animate-modal-in data-[state=closed]:animate-modal-out border-border",
|
|
1711
|
+
!noPadding && "p-4 sm:p-6 gap-3 sm:gap-4",
|
|
1704
1712
|
positionClass,
|
|
1705
1713
|
sizeClass,
|
|
1706
1714
|
className
|
|
@@ -20090,6 +20098,308 @@ function processNeo4jData(integrations, targetSystemName) {
|
|
|
20090
20098
|
connections
|
|
20091
20099
|
};
|
|
20092
20100
|
}
|
|
20101
|
+
var AnimatedNumber = ({ value }) => {
|
|
20102
|
+
const [displayed, setDisplayed] = React32__namespace.default.useState(value);
|
|
20103
|
+
const prevRef = React32__namespace.default.useRef(value);
|
|
20104
|
+
React32__namespace.default.useEffect(() => {
|
|
20105
|
+
const start = prevRef.current;
|
|
20106
|
+
const end = value;
|
|
20107
|
+
if (start === end) return;
|
|
20108
|
+
const duration = 420;
|
|
20109
|
+
const startTime = performance.now();
|
|
20110
|
+
const tick = (now) => {
|
|
20111
|
+
const elapsed = now - startTime;
|
|
20112
|
+
const progress = Math.min(elapsed / duration, 1);
|
|
20113
|
+
const eased = progress === 1 ? 1 : 1 - Math.pow(2, -10 * progress);
|
|
20114
|
+
setDisplayed(Math.round(start + (end - start) * eased));
|
|
20115
|
+
if (progress < 1) requestAnimationFrame(tick);
|
|
20116
|
+
else prevRef.current = end;
|
|
20117
|
+
};
|
|
20118
|
+
requestAnimationFrame(tick);
|
|
20119
|
+
}, [value]);
|
|
20120
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: displayed });
|
|
20121
|
+
};
|
|
20122
|
+
var Callout = ({
|
|
20123
|
+
sx,
|
|
20124
|
+
sy,
|
|
20125
|
+
mx,
|
|
20126
|
+
my,
|
|
20127
|
+
ex,
|
|
20128
|
+
ey,
|
|
20129
|
+
fill,
|
|
20130
|
+
name,
|
|
20131
|
+
value,
|
|
20132
|
+
percent,
|
|
20133
|
+
isRight
|
|
20134
|
+
}) => /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
20135
|
+
framerMotion.motion.g,
|
|
20136
|
+
{
|
|
20137
|
+
initial: { opacity: 0 },
|
|
20138
|
+
animate: { opacity: 1 },
|
|
20139
|
+
exit: { opacity: 0 },
|
|
20140
|
+
transition: { duration: 0.18 },
|
|
20141
|
+
className: "z-9999",
|
|
20142
|
+
children: [
|
|
20143
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
20144
|
+
framerMotion.motion.path,
|
|
20145
|
+
{
|
|
20146
|
+
d: `M${sx},${sy}L${mx},${my}L${ex},${ey}`,
|
|
20147
|
+
stroke: fill,
|
|
20148
|
+
fill: "none",
|
|
20149
|
+
strokeWidth: 1.5,
|
|
20150
|
+
strokeLinecap: "round",
|
|
20151
|
+
initial: { pathLength: 0, opacity: 0 },
|
|
20152
|
+
animate: { pathLength: 1, opacity: 1 },
|
|
20153
|
+
exit: { pathLength: 0, opacity: 0 },
|
|
20154
|
+
transition: { duration: 0.32, ease: "easeInOut" }
|
|
20155
|
+
}
|
|
20156
|
+
),
|
|
20157
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
20158
|
+
framerMotion.motion.circle,
|
|
20159
|
+
{
|
|
20160
|
+
cx: ex,
|
|
20161
|
+
cy: ey,
|
|
20162
|
+
r: 3,
|
|
20163
|
+
fill,
|
|
20164
|
+
initial: { scale: 0, opacity: 0 },
|
|
20165
|
+
animate: { scale: 1, opacity: 1 },
|
|
20166
|
+
exit: { scale: 0, opacity: 0 }
|
|
20167
|
+
}
|
|
20168
|
+
),
|
|
20169
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
20170
|
+
"foreignObject",
|
|
20171
|
+
{
|
|
20172
|
+
x: isRight ? ex + 10 : ex - 90,
|
|
20173
|
+
y: ey - 24,
|
|
20174
|
+
width: 90,
|
|
20175
|
+
height: 48,
|
|
20176
|
+
style: { overflow: "visible" },
|
|
20177
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
20178
|
+
framerMotion.motion.div,
|
|
20179
|
+
{
|
|
20180
|
+
initial: {
|
|
20181
|
+
opacity: 0,
|
|
20182
|
+
x: isRight ? -14 : 14,
|
|
20183
|
+
scale: 0.88,
|
|
20184
|
+
filter: "blur(4px)"
|
|
20185
|
+
},
|
|
20186
|
+
animate: { opacity: 1, x: 0, scale: 1, filter: "blur(0px)" },
|
|
20187
|
+
exit: {
|
|
20188
|
+
opacity: 0,
|
|
20189
|
+
x: isRight ? -8 : 8,
|
|
20190
|
+
scale: 0.92,
|
|
20191
|
+
filter: "blur(3px)"
|
|
20192
|
+
},
|
|
20193
|
+
transition: {
|
|
20194
|
+
type: "spring",
|
|
20195
|
+
stiffness: 460,
|
|
20196
|
+
damping: 26,
|
|
20197
|
+
mass: 0.8
|
|
20198
|
+
},
|
|
20199
|
+
style: { pointerEvents: "none" },
|
|
20200
|
+
children: [
|
|
20201
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
20202
|
+
framerMotion.motion.div,
|
|
20203
|
+
{
|
|
20204
|
+
style: {
|
|
20205
|
+
fontSize: 15,
|
|
20206
|
+
fontWeight: 800,
|
|
20207
|
+
color: "#333",
|
|
20208
|
+
lineHeight: 1
|
|
20209
|
+
},
|
|
20210
|
+
initial: { y: 6, opacity: 0 },
|
|
20211
|
+
animate: { y: 0, opacity: 1 },
|
|
20212
|
+
exit: { y: -4, opacity: 0 },
|
|
20213
|
+
transition: {
|
|
20214
|
+
delay: 0.06,
|
|
20215
|
+
type: "spring",
|
|
20216
|
+
stiffness: 400,
|
|
20217
|
+
damping: 22
|
|
20218
|
+
},
|
|
20219
|
+
children: [
|
|
20220
|
+
"PV ",
|
|
20221
|
+
/* @__PURE__ */ jsxRuntime.jsx(AnimatedNumber, { value })
|
|
20222
|
+
]
|
|
20223
|
+
}
|
|
20224
|
+
),
|
|
20225
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
20226
|
+
framerMotion.motion.div,
|
|
20227
|
+
{
|
|
20228
|
+
style: { fontSize: 11, color: "#999", marginTop: 5 },
|
|
20229
|
+
initial: { y: 6, opacity: 0 },
|
|
20230
|
+
animate: { y: 0, opacity: 1 },
|
|
20231
|
+
exit: { y: -4, opacity: 0 },
|
|
20232
|
+
transition: {
|
|
20233
|
+
delay: 0.12,
|
|
20234
|
+
type: "spring",
|
|
20235
|
+
stiffness: 400,
|
|
20236
|
+
damping: 22
|
|
20237
|
+
},
|
|
20238
|
+
children: [
|
|
20239
|
+
"Rate ",
|
|
20240
|
+
(percent * 100).toFixed(2),
|
|
20241
|
+
"%"
|
|
20242
|
+
]
|
|
20243
|
+
}
|
|
20244
|
+
)
|
|
20245
|
+
]
|
|
20246
|
+
},
|
|
20247
|
+
name
|
|
20248
|
+
)
|
|
20249
|
+
}
|
|
20250
|
+
)
|
|
20251
|
+
]
|
|
20252
|
+
},
|
|
20253
|
+
name
|
|
20254
|
+
) });
|
|
20255
|
+
var renderActiveShape = (props) => {
|
|
20256
|
+
const RADIAN = Math.PI / 180;
|
|
20257
|
+
const {
|
|
20258
|
+
cx,
|
|
20259
|
+
cy,
|
|
20260
|
+
midAngle,
|
|
20261
|
+
innerRadius,
|
|
20262
|
+
outerRadius,
|
|
20263
|
+
startAngle,
|
|
20264
|
+
endAngle,
|
|
20265
|
+
fill,
|
|
20266
|
+
payload,
|
|
20267
|
+
percent,
|
|
20268
|
+
value
|
|
20269
|
+
} = props;
|
|
20270
|
+
const sin = Math.sin(-RADIAN * (midAngle ?? 0));
|
|
20271
|
+
const cos = Math.cos(-RADIAN * (midAngle ?? 0));
|
|
20272
|
+
const sx = (cx ?? 0) + ((outerRadius ?? 0) + 10) * cos;
|
|
20273
|
+
const sy = (cy ?? 0) + ((outerRadius ?? 0) + 10) * sin;
|
|
20274
|
+
const mx = (cx ?? 0) + ((outerRadius ?? 0) + 30) * cos;
|
|
20275
|
+
const my = (cy ?? 0) + ((outerRadius ?? 0) + 30) * sin;
|
|
20276
|
+
const ex = mx + (cos >= 0 ? 1 : -1) * 22;
|
|
20277
|
+
const ey = my;
|
|
20278
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("g", { children: [
|
|
20279
|
+
/* @__PURE__ */ jsxRuntime.jsx("text", { x: cx, y: cy, dy: 8, textAnchor: "middle", fill, children: payload?.name }),
|
|
20280
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
20281
|
+
recharts.Sector,
|
|
20282
|
+
{
|
|
20283
|
+
cx,
|
|
20284
|
+
cy,
|
|
20285
|
+
innerRadius,
|
|
20286
|
+
outerRadius,
|
|
20287
|
+
startAngle,
|
|
20288
|
+
endAngle,
|
|
20289
|
+
fill
|
|
20290
|
+
}
|
|
20291
|
+
),
|
|
20292
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
20293
|
+
recharts.Sector,
|
|
20294
|
+
{
|
|
20295
|
+
cx,
|
|
20296
|
+
cy,
|
|
20297
|
+
startAngle,
|
|
20298
|
+
endAngle,
|
|
20299
|
+
innerRadius: (outerRadius ?? 0) + 6,
|
|
20300
|
+
outerRadius: (outerRadius ?? 0) + 10,
|
|
20301
|
+
fill
|
|
20302
|
+
}
|
|
20303
|
+
),
|
|
20304
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
20305
|
+
Callout,
|
|
20306
|
+
{
|
|
20307
|
+
sx,
|
|
20308
|
+
sy,
|
|
20309
|
+
mx,
|
|
20310
|
+
my,
|
|
20311
|
+
ex,
|
|
20312
|
+
ey,
|
|
20313
|
+
fill: fill ?? "#8884d8",
|
|
20314
|
+
name: payload?.name,
|
|
20315
|
+
value,
|
|
20316
|
+
percent: percent ?? 0,
|
|
20317
|
+
isRight: cos >= 0
|
|
20318
|
+
}
|
|
20319
|
+
)
|
|
20320
|
+
] });
|
|
20321
|
+
};
|
|
20322
|
+
var PieChartComponent = ({
|
|
20323
|
+
data,
|
|
20324
|
+
width = 400,
|
|
20325
|
+
height = 300,
|
|
20326
|
+
innerRadius = 60,
|
|
20327
|
+
outerRadius = 80,
|
|
20328
|
+
showLegend = true,
|
|
20329
|
+
showTooltip = true,
|
|
20330
|
+
title,
|
|
20331
|
+
titlePosition = "left",
|
|
20332
|
+
className
|
|
20333
|
+
}) => {
|
|
20334
|
+
const [activeIndex, setActiveIndex] = React32.useState(0);
|
|
20335
|
+
const finalColors = Object.fromEntries(
|
|
20336
|
+
data.map((d) => [d.name, d.color || "#8884d8"])
|
|
20337
|
+
);
|
|
20338
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
20339
|
+
"div",
|
|
20340
|
+
{
|
|
20341
|
+
className: cn(
|
|
20342
|
+
"w-full overflow-hidden min-w-0 rounded-lg border-border bg-card",
|
|
20343
|
+
className
|
|
20344
|
+
),
|
|
20345
|
+
tabIndex: -1,
|
|
20346
|
+
children: [
|
|
20347
|
+
title && /* @__PURE__ */ jsxRuntime.jsx(
|
|
20348
|
+
ChartHeader,
|
|
20349
|
+
{
|
|
20350
|
+
title,
|
|
20351
|
+
titlePosition,
|
|
20352
|
+
HORIZONTAL_PADDING_CLASS: "px-6",
|
|
20353
|
+
data,
|
|
20354
|
+
allKeys: data.map((d) => d.name),
|
|
20355
|
+
processedData: data,
|
|
20356
|
+
finalColors,
|
|
20357
|
+
mapperConfig: Object.fromEntries(
|
|
20358
|
+
data.map((d) => [
|
|
20359
|
+
d.name,
|
|
20360
|
+
{ label: d.name, color: d.color || "#8884d8" }
|
|
20361
|
+
])
|
|
20362
|
+
)
|
|
20363
|
+
}
|
|
20364
|
+
),
|
|
20365
|
+
/* @__PURE__ */ jsxRuntime.jsx(recharts.ResponsiveContainer, { width: "100%", height, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
20366
|
+
recharts.PieChart,
|
|
20367
|
+
{
|
|
20368
|
+
width: typeof width === "number" ? width : 400,
|
|
20369
|
+
height,
|
|
20370
|
+
margin: { top: 20, right: 80, bottom: 20, left: 80 },
|
|
20371
|
+
children: [
|
|
20372
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
20373
|
+
recharts.Pie,
|
|
20374
|
+
{
|
|
20375
|
+
activeIndex,
|
|
20376
|
+
activeShape: renderActiveShape,
|
|
20377
|
+
data,
|
|
20378
|
+
dataKey: "value",
|
|
20379
|
+
nameKey: "name",
|
|
20380
|
+
cx: "50%",
|
|
20381
|
+
cy: "50%",
|
|
20382
|
+
innerRadius,
|
|
20383
|
+
outerRadius,
|
|
20384
|
+
fill: "#8884d8",
|
|
20385
|
+
onMouseEnter: (_, index) => setActiveIndex(index),
|
|
20386
|
+
onMouseLeave: () => setActiveIndex(void 0),
|
|
20387
|
+
onClick: (e) => {
|
|
20388
|
+
if (e && e.target && typeof e.target.blur === "function") e.target.blur();
|
|
20389
|
+
},
|
|
20390
|
+
children: data.map((entry, index) => /* @__PURE__ */ jsxRuntime.jsx(recharts.Cell, { fill: entry.color || "#8884d8" }, `cell-${index}`))
|
|
20391
|
+
}
|
|
20392
|
+
),
|
|
20393
|
+
showLegend && /* @__PURE__ */ jsxRuntime.jsx(recharts.Legend, {}),
|
|
20394
|
+
showTooltip && /* @__PURE__ */ jsxRuntime.jsx(recharts.Tooltip, { content: () => null })
|
|
20395
|
+
]
|
|
20396
|
+
}
|
|
20397
|
+
) })
|
|
20398
|
+
]
|
|
20399
|
+
}
|
|
20400
|
+
);
|
|
20401
|
+
};
|
|
20402
|
+
var PieChart_default = PieChartComponent;
|
|
20093
20403
|
function NumericInput({
|
|
20094
20404
|
value,
|
|
20095
20405
|
onChange,
|
|
@@ -21084,12 +21394,23 @@ function CarouselBase({
|
|
|
21084
21394
|
setDownloadSuccess(false);
|
|
21085
21395
|
const currentItem = items[index];
|
|
21086
21396
|
try {
|
|
21087
|
-
const response = await fetch(currentItem.url);
|
|
21397
|
+
const response = await fetch(currentItem.url, { mode: "cors" });
|
|
21398
|
+
if (!response.ok) throw new Error("Erro ao baixar imagem");
|
|
21088
21399
|
const blob = await response.blob();
|
|
21089
21400
|
const url = window.URL.createObjectURL(blob);
|
|
21090
21401
|
const link = document.createElement("a");
|
|
21091
21402
|
link.href = url;
|
|
21092
|
-
|
|
21403
|
+
let ext = "";
|
|
21404
|
+
try {
|
|
21405
|
+
const urlObj = new URL(currentItem.url, window.location.href);
|
|
21406
|
+
const path = urlObj.pathname;
|
|
21407
|
+
ext = path.substring(path.lastIndexOf("."));
|
|
21408
|
+
if (!ext || ext.length > 6) ext = "";
|
|
21409
|
+
} catch {
|
|
21410
|
+
}
|
|
21411
|
+
let filename = currentItem.title || "image";
|
|
21412
|
+
if (ext && !filename.endsWith(ext)) filename += ext;
|
|
21413
|
+
link.download = filename;
|
|
21093
21414
|
document.body.appendChild(link);
|
|
21094
21415
|
link.click();
|
|
21095
21416
|
document.body.removeChild(link);
|
|
@@ -21098,6 +21419,9 @@ function CarouselBase({
|
|
|
21098
21419
|
setDownloadSuccess(true);
|
|
21099
21420
|
setTimeout(() => setDownloadSuccess(false), 2e3);
|
|
21100
21421
|
} catch (error) {
|
|
21422
|
+
sonner.toast.error(
|
|
21423
|
+
"Erro ao baixar imagem. Verifique a URL ou permiss\xF5es do servidor."
|
|
21424
|
+
);
|
|
21101
21425
|
console.error("Error downloading image:", error);
|
|
21102
21426
|
setIsDownloading(false);
|
|
21103
21427
|
}
|
|
@@ -21139,8 +21463,13 @@ function CarouselBase({
|
|
|
21139
21463
|
{
|
|
21140
21464
|
src: item.url,
|
|
21141
21465
|
alt: item.title,
|
|
21142
|
-
className: cn(
|
|
21143
|
-
|
|
21466
|
+
className: cn(
|
|
21467
|
+
"w-full h-full select-none object-contain"
|
|
21468
|
+
),
|
|
21469
|
+
imageClassName: cn(
|
|
21470
|
+
"object-contain w-full h-full",
|
|
21471
|
+
imageClassName
|
|
21472
|
+
),
|
|
21144
21473
|
borderRadius: 8,
|
|
21145
21474
|
maxZoom: 3
|
|
21146
21475
|
}
|
|
@@ -21997,7 +22326,9 @@ function CommandItemRow({
|
|
|
21997
22326
|
item,
|
|
21998
22327
|
isActive,
|
|
21999
22328
|
isSelected,
|
|
22329
|
+
multiSelect,
|
|
22000
22330
|
onSelect,
|
|
22331
|
+
onToggleSelection,
|
|
22001
22332
|
onHover,
|
|
22002
22333
|
searchQuery
|
|
22003
22334
|
}) {
|
|
@@ -22005,12 +22336,18 @@ function CommandItemRow({
|
|
|
22005
22336
|
framerMotion.motion.button,
|
|
22006
22337
|
{
|
|
22007
22338
|
layout: true,
|
|
22008
|
-
onClick:
|
|
22339
|
+
onClick: (e) => {
|
|
22340
|
+
if (multiSelect && onToggleSelection && (e.ctrlKey || e.metaKey || e.shiftKey)) {
|
|
22341
|
+
onToggleSelection(e);
|
|
22342
|
+
} else {
|
|
22343
|
+
onSelect(e);
|
|
22344
|
+
}
|
|
22345
|
+
},
|
|
22009
22346
|
onMouseEnter: onHover,
|
|
22010
22347
|
className: `
|
|
22011
|
-
w-full flex items-center gap-1 px-2
|
|
22348
|
+
w-full flex items-center gap-1 px-2 py-1 rounded-md text-left cursor-pointer
|
|
22012
22349
|
transition-colors duration-75 group relative
|
|
22013
|
-
${isActive ? "text-accent-foreground
|
|
22350
|
+
${isActive ? "text-accent-foreground bg-accent" : "hover:bg-accent hover:text-accent-foreground"}
|
|
22014
22351
|
`,
|
|
22015
22352
|
children: [
|
|
22016
22353
|
item.icon && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -22022,7 +22359,7 @@ function CommandItemRow({
|
|
|
22022
22359
|
}
|
|
22023
22360
|
),
|
|
22024
22361
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex-1 min-w-0 px-1", children: [
|
|
22025
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3
|
|
22362
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3 flex-wrap", children: [
|
|
22026
22363
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
22027
22364
|
"span",
|
|
22028
22365
|
{
|
|
@@ -22360,7 +22697,7 @@ var VirtualResultList = React32.memo(
|
|
|
22360
22697
|
ref: listRef,
|
|
22361
22698
|
className: "overflow-y-auto overscroll-contain px-2 py-1 [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-track]:bg-transparent [&::-webkit-scrollbar-thumb]:bg-muted-foreground/30 [&::-webkit-scrollbar-thumb]:rounded-full hover:[&::-webkit-scrollbar-thumb]:bg-muted-foreground/50 transition-colors",
|
|
22362
22699
|
style: { maxHeight: `min(${LIST_MAX_HEIGHT}px, 60vh)` },
|
|
22363
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("div", { style: { height: totalSize, position: "relative" }, children: virtualItems.map((vItem) => {
|
|
22700
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", { style: { height: totalSize, position: "relative", width: "100%" }, children: virtualItems.map((vItem) => {
|
|
22364
22701
|
const row = rows[vItem.index];
|
|
22365
22702
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
22366
22703
|
"div",
|
|
@@ -22369,9 +22706,10 @@ var VirtualResultList = React32.memo(
|
|
|
22369
22706
|
ref: virtualizer.measureElement,
|
|
22370
22707
|
style: {
|
|
22371
22708
|
position: "absolute",
|
|
22372
|
-
top:
|
|
22709
|
+
top: 0,
|
|
22373
22710
|
left: 0,
|
|
22374
|
-
|
|
22711
|
+
width: "100%",
|
|
22712
|
+
transform: `translateY(${vItem.start}px)`
|
|
22375
22713
|
},
|
|
22376
22714
|
children: row.kind === "label" ? /* @__PURE__ */ jsxRuntime.jsx(GroupLabel, { group: row.group }) : /* @__PURE__ */ jsxRuntime.jsx("div", { "data-active": row.globalIdx === activeIndex, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
22377
22715
|
CommandItemRow,
|
|
@@ -22417,7 +22755,7 @@ var FooterBar = React32.memo(
|
|
|
22417
22755
|
}
|
|
22418
22756
|
),
|
|
22419
22757
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-1.5", children: [
|
|
22420
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-mono", children: "Ctrl+Enter" }),
|
|
22758
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-mono text-[10px] px-1 bg-muted rounded border", children: "Ctrl+Enter" }),
|
|
22421
22759
|
"Finalizar sele\xE7\xE3o"
|
|
22422
22760
|
] })
|
|
22423
22761
|
] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
@@ -22477,9 +22815,9 @@ function CommandPalette(props) {
|
|
|
22477
22815
|
showList
|
|
22478
22816
|
} = useCommandPalette({
|
|
22479
22817
|
...props,
|
|
22480
|
-
open:
|
|
22818
|
+
open: props.open
|
|
22481
22819
|
});
|
|
22482
|
-
useKeyboardShortcut(shortcut.key, () => onOpenChange(!open), {
|
|
22820
|
+
useKeyboardShortcut(shortcut.key, () => onOpenChange?.(!open), {
|
|
22483
22821
|
ctrl: shortcut.ctrl,
|
|
22484
22822
|
meta: shortcut.meta,
|
|
22485
22823
|
shift: shortcut.shift,
|
|
@@ -22488,7 +22826,7 @@ function CommandPalette(props) {
|
|
|
22488
22826
|
React32.useEffect(() => {
|
|
22489
22827
|
if (!open) return;
|
|
22490
22828
|
const handleEscape = (e) => {
|
|
22491
|
-
if (e.key === "Escape") onOpenChange(false);
|
|
22829
|
+
if (e.key === "Escape") onOpenChange?.(false);
|
|
22492
22830
|
};
|
|
22493
22831
|
document.addEventListener("keydown", handleEscape);
|
|
22494
22832
|
return () => document.removeEventListener("keydown", handleEscape);
|
|
@@ -22515,11 +22853,11 @@ function CommandPalette(props) {
|
|
|
22515
22853
|
(val) => {
|
|
22516
22854
|
setQuery(val);
|
|
22517
22855
|
setActiveIndex(0);
|
|
22518
|
-
if (!open && val.trim() !== "") onOpenChange(true);
|
|
22856
|
+
if (!open && val.trim() !== "") onOpenChange?.(true);
|
|
22519
22857
|
},
|
|
22520
22858
|
[setQuery, setActiveIndex, open, onOpenChange]
|
|
22521
22859
|
);
|
|
22522
|
-
const handleClose = React32.useCallback(() => onOpenChange(false), [onOpenChange]);
|
|
22860
|
+
const handleClose = React32.useCallback(() => onOpenChange?.(false), [onOpenChange]);
|
|
22523
22861
|
const handleClearQuery = React32.useCallback(() => setQuery(""), [setQuery]);
|
|
22524
22862
|
const searchPlaceholder = multiSearch ? "Buscar\u2026 (separe termos por v\xEDrgula)" : placeholder;
|
|
22525
22863
|
const sharedListProps = {
|
|
@@ -22537,100 +22875,118 @@ function CommandPalette(props) {
|
|
|
22537
22875
|
searchQuery: query
|
|
22538
22876
|
};
|
|
22539
22877
|
if (isMobile) {
|
|
22540
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
22541
|
-
/* @__PURE__ */ jsxRuntime.
|
|
22542
|
-
|
|
22878
|
+
return /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { children: open && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
22879
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
22880
|
+
framerMotion.motion.div,
|
|
22543
22881
|
{
|
|
22544
|
-
|
|
22545
|
-
|
|
22546
|
-
|
|
22547
|
-
|
|
22548
|
-
|
|
22882
|
+
initial: { opacity: 0, y: -20 },
|
|
22883
|
+
animate: { opacity: 1, y: 0 },
|
|
22884
|
+
exit: { opacity: 0, y: -20 },
|
|
22885
|
+
className: "fixed top-0 left-0 right-0 z-[100] px-4 py-3 bg-background border-b border-border shadow-sm flex items-center gap-3",
|
|
22886
|
+
children: [
|
|
22887
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.MagnifyingGlassIcon, { className: "w-5 h-5 text-muted-foreground" }),
|
|
22888
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
22889
|
+
DebouncedInput,
|
|
22890
|
+
{
|
|
22891
|
+
ref: inputRef,
|
|
22892
|
+
value: query,
|
|
22893
|
+
debounce: debounceDelay,
|
|
22894
|
+
onChange: handleQueryChangeMobile,
|
|
22895
|
+
placeholder: searchPlaceholder,
|
|
22896
|
+
className: "flex-1 bg-transparent border-none shadow-none focus-visible:ring-0 p-0 text-base"
|
|
22897
|
+
}
|
|
22898
|
+
),
|
|
22899
|
+
query && /* @__PURE__ */ jsxRuntime.jsx(ButtonBase, { variant: "ghost", size: "icon", onClick: handleClearQuery, className: "h-8 w-8", children: /* @__PURE__ */ jsxRuntime.jsx(react.XIcon, { className: "w-4 h-4" }) })
|
|
22900
|
+
]
|
|
22549
22901
|
}
|
|
22550
|
-
)
|
|
22551
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
22552
|
-
|
|
22553
|
-
|
|
22554
|
-
{
|
|
22555
|
-
|
|
22556
|
-
|
|
22557
|
-
|
|
22558
|
-
|
|
22559
|
-
|
|
22560
|
-
|
|
22561
|
-
|
|
22562
|
-
|
|
22563
|
-
|
|
22564
|
-
|
|
22565
|
-
{
|
|
22566
|
-
|
|
22567
|
-
|
|
22568
|
-
|
|
22569
|
-
|
|
22570
|
-
|
|
22571
|
-
|
|
22572
|
-
|
|
22573
|
-
|
|
22574
|
-
|
|
22575
|
-
|
|
22576
|
-
|
|
22577
|
-
] }) })
|
|
22578
|
-
] });
|
|
22902
|
+
),
|
|
22903
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
22904
|
+
framerMotion.motion.div,
|
|
22905
|
+
{
|
|
22906
|
+
initial: { opacity: 0 },
|
|
22907
|
+
animate: { opacity: 1 },
|
|
22908
|
+
exit: { opacity: 0 },
|
|
22909
|
+
transition: ANIMATION.overlay,
|
|
22910
|
+
className: "fixed inset-0 z-[98] bg-background/80 backdrop-blur-md",
|
|
22911
|
+
onClick: handleClose
|
|
22912
|
+
}
|
|
22913
|
+
),
|
|
22914
|
+
showList && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
22915
|
+
framerMotion.motion.div,
|
|
22916
|
+
{
|
|
22917
|
+
initial: { opacity: 0, y: 10 },
|
|
22918
|
+
animate: { opacity: 1, y: 0 },
|
|
22919
|
+
exit: { opacity: 0, y: 10 },
|
|
22920
|
+
transition: ANIMATION.mobilePanel,
|
|
22921
|
+
className: "fixed inset-x-0 bottom-0 top-[60px] z-[99] bg-background overflow-hidden flex flex-col",
|
|
22922
|
+
children: [
|
|
22923
|
+
/* @__PURE__ */ jsxRuntime.jsx(SearchBadges, { terms: searchTerms }),
|
|
22924
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx(VirtualResultList, { ...sharedListProps }) })
|
|
22925
|
+
]
|
|
22926
|
+
}
|
|
22927
|
+
)
|
|
22928
|
+
] }) });
|
|
22579
22929
|
}
|
|
22580
|
-
return /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { children: open && /* @__PURE__ */ jsxRuntime.
|
|
22581
|
-
|
|
22582
|
-
|
|
22583
|
-
|
|
22584
|
-
|
|
22585
|
-
|
|
22586
|
-
|
|
22587
|
-
|
|
22588
|
-
|
|
22589
|
-
|
|
22590
|
-
|
|
22591
|
-
|
|
22592
|
-
|
|
22593
|
-
|
|
22594
|
-
|
|
22595
|
-
|
|
22596
|
-
|
|
22597
|
-
|
|
22930
|
+
return /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { children: open && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
22931
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
22932
|
+
framerMotion.motion.div,
|
|
22933
|
+
{
|
|
22934
|
+
initial: { opacity: 0 },
|
|
22935
|
+
animate: { opacity: 1 },
|
|
22936
|
+
exit: { opacity: 0 },
|
|
22937
|
+
className: "fixed inset-0 z-[99] bg-black/40 backdrop-blur-sm",
|
|
22938
|
+
onClick: handleClose
|
|
22939
|
+
}
|
|
22940
|
+
),
|
|
22941
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
22942
|
+
framerMotion.motion.div,
|
|
22943
|
+
{
|
|
22944
|
+
initial: { opacity: 0, scale: 0.96, y: -8 },
|
|
22945
|
+
animate: { opacity: 1, scale: 1, y: 0 },
|
|
22946
|
+
exit: { opacity: 0, scale: 0.96, y: -8 },
|
|
22947
|
+
transition: ANIMATION.panel,
|
|
22948
|
+
className: "fixed z-[100] top-4 -translate-x-1/2 w-full max-w-xl rounded-xl border border-border overflow-hidden shadow-2xl shadow-black/20 dark:shadow-black/60 bg-popover/95 backdrop-blur-xl",
|
|
22949
|
+
style: { maxHeight: "min(600px, 80vh)" },
|
|
22950
|
+
children: [
|
|
22951
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3 px-4 py-2 border-b border-border", children: [
|
|
22952
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.MagnifyingGlassIcon, { className: "w-4 h-4 text-muted-foreground flex-shrink-0", weight: "bold" }),
|
|
22953
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
22954
|
+
DebouncedInput,
|
|
22955
|
+
{
|
|
22956
|
+
ref: inputRef,
|
|
22957
|
+
value: query,
|
|
22958
|
+
debounce: debounceDelay,
|
|
22959
|
+
onChange: handleQueryChange,
|
|
22960
|
+
placeholder: searchPlaceholder,
|
|
22961
|
+
rightIcon: query ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
22962
|
+
ButtonBase,
|
|
22963
|
+
{
|
|
22964
|
+
variant: "ghost",
|
|
22965
|
+
size: "icon",
|
|
22966
|
+
onClick: handleClearQuery,
|
|
22967
|
+
className: "text-muted-foreground hover:text-red-500 hover:bg-transparent transition-colors",
|
|
22968
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(react.XIcon, { className: "w-4 h-4" })
|
|
22969
|
+
}
|
|
22970
|
+
) : void 0,
|
|
22971
|
+
className: "flex-1 bg-transparent border-none focus-visible:ring-0 outline-none shadow-none px-0 h-7 text-sm caret-primary"
|
|
22972
|
+
}
|
|
22973
|
+
)
|
|
22974
|
+
] }),
|
|
22975
|
+
/* @__PURE__ */ jsxRuntime.jsx(SearchBadges, { terms: searchTerms }),
|
|
22976
|
+
showList && /* @__PURE__ */ jsxRuntime.jsx(VirtualResultList, { ...sharedListProps }),
|
|
22598
22977
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
22599
|
-
|
|
22978
|
+
FooterBar,
|
|
22600
22979
|
{
|
|
22601
|
-
|
|
22602
|
-
|
|
22603
|
-
|
|
22604
|
-
|
|
22605
|
-
placeholder: searchPlaceholder,
|
|
22606
|
-
rightIcon: query ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
22607
|
-
ButtonBase,
|
|
22608
|
-
{
|
|
22609
|
-
variant: "ghost",
|
|
22610
|
-
size: "icon",
|
|
22611
|
-
onClick: handleClearQuery,
|
|
22612
|
-
className: "text-muted-foreground hover:text-red-500 hover:bg-transparent transition-colors",
|
|
22613
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(react.XIcon, { className: "w-4 h-4" })
|
|
22614
|
-
}
|
|
22615
|
-
) : void 0,
|
|
22616
|
-
className: "flex-1 bg-transparent border-none focus-visible:ring-0 outline-none shadow-none px-0 h-7 text-sm caret-primary"
|
|
22980
|
+
footer,
|
|
22981
|
+
totalItems,
|
|
22982
|
+
selectedCount: selectedItemIds.size,
|
|
22983
|
+
executeBulkAction
|
|
22617
22984
|
}
|
|
22618
22985
|
)
|
|
22619
|
-
]
|
|
22620
|
-
|
|
22621
|
-
|
|
22622
|
-
|
|
22623
|
-
FooterBar,
|
|
22624
|
-
{
|
|
22625
|
-
footer,
|
|
22626
|
-
totalItems,
|
|
22627
|
-
selectedCount: selectedItemIds.size,
|
|
22628
|
-
executeBulkAction
|
|
22629
|
-
}
|
|
22630
|
-
)
|
|
22631
|
-
]
|
|
22632
|
-
}
|
|
22633
|
-
) }) });
|
|
22986
|
+
]
|
|
22987
|
+
}
|
|
22988
|
+
)
|
|
22989
|
+
] }) });
|
|
22634
22990
|
}
|
|
22635
22991
|
|
|
22636
22992
|
exports.AddButton = AddButton;
|
|
@@ -22847,6 +23203,7 @@ exports.NoData = NoData_default;
|
|
|
22847
23203
|
exports.NotificationButton = NotificationButton;
|
|
22848
23204
|
exports.NumericInput = NumericInput;
|
|
22849
23205
|
exports.PeriodsDropdown = PeriodsDropdown_default;
|
|
23206
|
+
exports.PieChartComponent = PieChart_default;
|
|
22850
23207
|
exports.PopoverAnchorBase = PopoverAnchorBase;
|
|
22851
23208
|
exports.PopoverBase = PopoverBase;
|
|
22852
23209
|
exports.PopoverContentBase = PopoverContentBase;
|