@humu-tech/ui 0.1.16 → 0.1.18
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.d.mts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +629 -637
- package/dist/index.mjs +500 -508
- package/package.json +2 -1
package/dist/index.mjs
CHANGED
|
@@ -730,6 +730,10 @@ function applyMask(mask, raw) {
|
|
|
730
730
|
function stripToRaw(value) {
|
|
731
731
|
return value.replace(/[^0-9a-zA-Z]/g, "");
|
|
732
732
|
}
|
|
733
|
+
function capToMaskSlots(mask, raw) {
|
|
734
|
+
const maxSlots = countMaskSlots(selectMask(mask, raw));
|
|
735
|
+
return maxSlots > 0 && raw.length > maxSlots ? raw.slice(0, maxSlots) : raw;
|
|
736
|
+
}
|
|
733
737
|
var MaskedInput = forwardRef7(
|
|
734
738
|
({
|
|
735
739
|
mask,
|
|
@@ -750,8 +754,11 @@ var MaskedInput = forwardRef7(
|
|
|
750
754
|
const isDark = surface === "dark";
|
|
751
755
|
const [internalValue, setInternalValue] = useState2("");
|
|
752
756
|
const isControlled = valueProp !== void 0;
|
|
753
|
-
const rawDisplay = (
|
|
754
|
-
|
|
757
|
+
const rawDisplay = capToMaskSlots(
|
|
758
|
+
mask,
|
|
759
|
+
(normalizeRaw ?? stripToRaw)(
|
|
760
|
+
String((isControlled ? valueProp : internalValue) ?? "")
|
|
761
|
+
)
|
|
755
762
|
);
|
|
756
763
|
const displayValue = rawDisplay ? applyMask(selectMask(mask, rawDisplay), rawDisplay) : "";
|
|
757
764
|
const generatedId = useId();
|
|
@@ -761,7 +768,7 @@ var MaskedInput = forwardRef7(
|
|
|
761
768
|
const describedBy = [helperId, errorId].filter(Boolean).join(" ") || void 0;
|
|
762
769
|
const handleChange = (e) => {
|
|
763
770
|
const inputVal = e.target.value;
|
|
764
|
-
const raw = (normalizeRaw ?? stripToRaw)(inputVal);
|
|
771
|
+
const raw = capToMaskSlots(mask, (normalizeRaw ?? stripToRaw)(inputVal));
|
|
765
772
|
const activeMask = selectMask(mask, raw);
|
|
766
773
|
const formatted = applyMask(activeMask, raw);
|
|
767
774
|
if (!isControlled) setInternalValue(formatted);
|
|
@@ -1563,7 +1570,7 @@ var Content4 = forwardRef13(({ size, hideCloseButton, className, children, ...pr
|
|
|
1563
1570
|
DialogPrimitive.Close,
|
|
1564
1571
|
{
|
|
1565
1572
|
"aria-label": "Fechar",
|
|
1566
|
-
className: "absolute right-
|
|
1573
|
+
className: "absolute right-3 top-3 inline-flex size-8 items-center justify-center rounded-v2-md text-v2-fg-subtle opacity-70 transition-opacity hover:bg-v2-raised hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-v2-focus-ring/30 disabled:pointer-events-none motion-reduce:transition-none",
|
|
1567
1574
|
children: /* @__PURE__ */ jsx18(X2, { size: 16, weight: "bold", "aria-hidden": "true" })
|
|
1568
1575
|
}
|
|
1569
1576
|
)
|
|
@@ -1577,7 +1584,7 @@ var Header2 = forwardRef13(
|
|
|
1577
1584
|
"div",
|
|
1578
1585
|
{
|
|
1579
1586
|
ref,
|
|
1580
|
-
className: cn("flex flex-col gap-1.5 text-left", className),
|
|
1587
|
+
className: cn("flex flex-col gap-1.5 pr-8 text-left", className),
|
|
1581
1588
|
...props
|
|
1582
1589
|
}
|
|
1583
1590
|
)
|
|
@@ -5021,13 +5028,44 @@ var Tooltip = Object.assign(TooltipRoot, {
|
|
|
5021
5028
|
});
|
|
5022
5029
|
|
|
5023
5030
|
// src/primitives/Toast/Toaster.tsx
|
|
5024
|
-
import
|
|
5031
|
+
import { Toaster as SonnerToaster } from "sonner";
|
|
5032
|
+
import { jsx as jsx55 } from "react/jsx-runtime";
|
|
5033
|
+
function Toaster({
|
|
5034
|
+
duration = 5e3,
|
|
5035
|
+
visibleToasts = 3,
|
|
5036
|
+
expand = false,
|
|
5037
|
+
position = "bottom-right",
|
|
5038
|
+
className
|
|
5039
|
+
}) {
|
|
5040
|
+
return /* @__PURE__ */ jsx55(
|
|
5041
|
+
SonnerToaster,
|
|
5042
|
+
{
|
|
5043
|
+
position,
|
|
5044
|
+
duration,
|
|
5045
|
+
visibleToasts,
|
|
5046
|
+
expand,
|
|
5047
|
+
gap: 8,
|
|
5048
|
+
offset: 16,
|
|
5049
|
+
toastOptions: {
|
|
5050
|
+
unstyled: true,
|
|
5051
|
+
className: cn("w-full sm:w-[22rem]", className)
|
|
5052
|
+
}
|
|
5053
|
+
}
|
|
5054
|
+
);
|
|
5055
|
+
}
|
|
5056
|
+
|
|
5057
|
+
// src/primitives/Toast/toast-store.ts
|
|
5058
|
+
import { createElement } from "react";
|
|
5059
|
+
import { toast as sonnerToast2 } from "sonner";
|
|
5060
|
+
|
|
5061
|
+
// src/primitives/Toast/ToastCard.tsx
|
|
5025
5062
|
import { X as X9 } from "@phosphor-icons/react";
|
|
5063
|
+
import { toast as sonnerToast } from "sonner";
|
|
5026
5064
|
|
|
5027
5065
|
// src/primitives/Toast/Toast.styles.ts
|
|
5028
5066
|
import { cva as cva17 } from "class-variance-authority";
|
|
5029
|
-
var
|
|
5030
|
-
"pointer-events-auto relative flex w-full items-start gap-3 overflow-hidden rounded-v2-md border p-4 shadow-v2-3
|
|
5067
|
+
var toastCardStyles = cva17(
|
|
5068
|
+
"pointer-events-auto relative flex w-full items-start gap-3 overflow-hidden rounded-v2-md border p-4 shadow-v2-3",
|
|
5031
5069
|
{
|
|
5032
5070
|
variants: {
|
|
5033
5071
|
variant: {
|
|
@@ -5042,113 +5080,67 @@ var toastStyles = cva17(
|
|
|
5042
5080
|
}
|
|
5043
5081
|
);
|
|
5044
5082
|
|
|
5045
|
-
// src/primitives/Toast/
|
|
5046
|
-
import {
|
|
5047
|
-
|
|
5048
|
-
|
|
5049
|
-
|
|
5050
|
-
|
|
5051
|
-
|
|
5052
|
-
|
|
5053
|
-
|
|
5054
|
-
|
|
5055
|
-
|
|
5056
|
-
|
|
5057
|
-
|
|
5058
|
-
}
|
|
5059
|
-
|
|
5060
|
-
|
|
5083
|
+
// src/primitives/Toast/ToastCard.tsx
|
|
5084
|
+
import { jsx as jsx56, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
5085
|
+
function ToastCard({
|
|
5086
|
+
id,
|
|
5087
|
+
title,
|
|
5088
|
+
description,
|
|
5089
|
+
variant,
|
|
5090
|
+
action
|
|
5091
|
+
}) {
|
|
5092
|
+
return /* @__PURE__ */ jsxs34("div", { className: cn(toastCardStyles({ variant })), children: [
|
|
5093
|
+
/* @__PURE__ */ jsxs34("div", { className: "flex min-w-0 flex-1 flex-col gap-1", children: [
|
|
5094
|
+
title && /* @__PURE__ */ jsx56("div", { className: "text-v2-sm font-semibold", children: title }),
|
|
5095
|
+
description && /* @__PURE__ */ jsx56("div", { className: "text-v2-sm opacity-90", children: description })
|
|
5096
|
+
] }),
|
|
5097
|
+
action,
|
|
5098
|
+
/* @__PURE__ */ jsx56(
|
|
5099
|
+
"button",
|
|
5100
|
+
{
|
|
5101
|
+
type: "button",
|
|
5102
|
+
"aria-label": "Fechar",
|
|
5103
|
+
onClick: () => sonnerToast.dismiss(id),
|
|
5104
|
+
className: "shrink-0 rounded-v2-sm p-1 text-v2-fg-muted transition-colors hover:text-v2-fg-default focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-v2-focus-ring/30",
|
|
5105
|
+
children: /* @__PURE__ */ jsx56(X9, { size: 16, "aria-hidden": "true" })
|
|
5106
|
+
}
|
|
5107
|
+
)
|
|
5108
|
+
] });
|
|
5061
5109
|
}
|
|
5110
|
+
|
|
5111
|
+
// src/primitives/Toast/toast-store.ts
|
|
5062
5112
|
function normalize(input) {
|
|
5063
5113
|
return typeof input === "string" ? { title: input } : input;
|
|
5064
5114
|
}
|
|
5065
|
-
function
|
|
5066
|
-
|
|
5067
|
-
const
|
|
5068
|
-
|
|
5069
|
-
|
|
5070
|
-
|
|
5071
|
-
|
|
5072
|
-
|
|
5073
|
-
|
|
5074
|
-
|
|
5115
|
+
function show(input, variant) {
|
|
5116
|
+
const options = normalize(input);
|
|
5117
|
+
const resolved = variant ? { ...options, variant } : options;
|
|
5118
|
+
const id = sonnerToast2.custom(
|
|
5119
|
+
(toastId) => createElement(ToastCard, {
|
|
5120
|
+
id: String(toastId),
|
|
5121
|
+
title: resolved.title,
|
|
5122
|
+
description: resolved.description,
|
|
5123
|
+
variant: resolved.variant,
|
|
5124
|
+
action: resolved.action
|
|
5125
|
+
}),
|
|
5126
|
+
{ duration: resolved.duration }
|
|
5075
5127
|
);
|
|
5076
|
-
|
|
5077
|
-
}
|
|
5078
|
-
function removeToast(id) {
|
|
5079
|
-
toasts = toasts.filter((item) => item.id !== id);
|
|
5080
|
-
emit();
|
|
5081
|
-
}
|
|
5082
|
-
function withVariant(input, variant) {
|
|
5083
|
-
return addToast({ ...normalize(input), variant });
|
|
5128
|
+
return String(id);
|
|
5084
5129
|
}
|
|
5085
5130
|
var toast = Object.assign(
|
|
5086
|
-
(input) =>
|
|
5131
|
+
(input) => show(input),
|
|
5087
5132
|
{
|
|
5088
|
-
success: (input) =>
|
|
5089
|
-
warning: (input) =>
|
|
5090
|
-
danger: (input) =>
|
|
5091
|
-
info: (input) =>
|
|
5133
|
+
success: (input) => show(input, "success"),
|
|
5134
|
+
warning: (input) => show(input, "warning"),
|
|
5135
|
+
danger: (input) => show(input, "danger"),
|
|
5136
|
+
info: (input) => show(input, "info")
|
|
5092
5137
|
}
|
|
5093
5138
|
);
|
|
5094
|
-
function
|
|
5095
|
-
|
|
5096
|
-
return { toasts: snapshot, toast, dismiss: dismissToast };
|
|
5139
|
+
function dismissToast(id) {
|
|
5140
|
+
sonnerToast2.dismiss(id);
|
|
5097
5141
|
}
|
|
5098
|
-
|
|
5099
|
-
|
|
5100
|
-
import { jsx as jsx55, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
5101
|
-
function Toaster({
|
|
5102
|
-
duration = 5e3,
|
|
5103
|
-
swipeDirection = "right",
|
|
5104
|
-
viewportClassName
|
|
5105
|
-
}) {
|
|
5106
|
-
const { toasts: toasts2 } = useToast();
|
|
5107
|
-
return /* @__PURE__ */ jsxs34(
|
|
5108
|
-
ToastPrimitive.Provider,
|
|
5109
|
-
{
|
|
5110
|
-
duration,
|
|
5111
|
-
swipeDirection,
|
|
5112
|
-
children: [
|
|
5113
|
-
toasts2.map((item) => /* @__PURE__ */ jsxs34(
|
|
5114
|
-
ToastPrimitive.Root,
|
|
5115
|
-
{
|
|
5116
|
-
open: item.open,
|
|
5117
|
-
duration: item.duration,
|
|
5118
|
-
onOpenChange: (open) => {
|
|
5119
|
-
if (!open) removeToast(item.id);
|
|
5120
|
-
},
|
|
5121
|
-
className: cn(toastStyles({ variant: item.variant })),
|
|
5122
|
-
children: [
|
|
5123
|
-
/* @__PURE__ */ jsxs34("div", { className: "flex min-w-0 flex-1 flex-col gap-1", children: [
|
|
5124
|
-
item.title && /* @__PURE__ */ jsx55(ToastPrimitive.Title, { className: "text-v2-sm font-semibold", children: item.title }),
|
|
5125
|
-
item.description && /* @__PURE__ */ jsx55(ToastPrimitive.Description, { className: "text-v2-sm opacity-90", children: item.description })
|
|
5126
|
-
] }),
|
|
5127
|
-
item.action && /* @__PURE__ */ jsx55(ToastPrimitive.Action, { altText: "a\xE7\xE3o", asChild: true, children: item.action }),
|
|
5128
|
-
/* @__PURE__ */ jsx55(
|
|
5129
|
-
ToastPrimitive.Close,
|
|
5130
|
-
{
|
|
5131
|
-
"aria-label": "Fechar",
|
|
5132
|
-
className: "shrink-0 rounded-v2-sm p-1 text-v2-fg-muted transition-colors hover:text-v2-fg-default focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-v2-focus-ring/30",
|
|
5133
|
-
children: /* @__PURE__ */ jsx55(X9, { size: 16, "aria-hidden": "true" })
|
|
5134
|
-
}
|
|
5135
|
-
)
|
|
5136
|
-
]
|
|
5137
|
-
},
|
|
5138
|
-
item.id
|
|
5139
|
-
)),
|
|
5140
|
-
/* @__PURE__ */ jsx55(
|
|
5141
|
-
ToastPrimitive.Viewport,
|
|
5142
|
-
{
|
|
5143
|
-
className: cn(
|
|
5144
|
-
"fixed bottom-0 right-0 z-[100] flex max-h-screen w-full flex-col gap-2 p-4 outline-none sm:max-w-sm",
|
|
5145
|
-
viewportClassName
|
|
5146
|
-
)
|
|
5147
|
-
}
|
|
5148
|
-
)
|
|
5149
|
-
]
|
|
5150
|
-
}
|
|
5151
|
-
);
|
|
5142
|
+
function useToast() {
|
|
5143
|
+
return { toast, dismiss: dismissToast };
|
|
5152
5144
|
}
|
|
5153
5145
|
|
|
5154
5146
|
// src/patterns/AppShell/AppShell.tsx
|
|
@@ -5170,7 +5162,7 @@ import {
|
|
|
5170
5162
|
import { CaretDoubleLeft, CaretDoubleRight } from "@phosphor-icons/react";
|
|
5171
5163
|
import { forwardRef as forwardRef39, useCallback as useCallback2, useEffect as useEffect11, useState as useState17 } from "react";
|
|
5172
5164
|
import "./Sidebar-4ILVFQI5.css";
|
|
5173
|
-
import { Fragment as Fragment5, jsx as
|
|
5165
|
+
import { Fragment as Fragment5, jsx as jsx57, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
5174
5166
|
var LINK_BASE_CLASS = "flex h-full w-full items-center";
|
|
5175
5167
|
function isActive(currentPath, to) {
|
|
5176
5168
|
if (!currentPath) return false;
|
|
@@ -5184,7 +5176,7 @@ function ItemLink({
|
|
|
5184
5176
|
linkComponent
|
|
5185
5177
|
}) {
|
|
5186
5178
|
if (item.external) {
|
|
5187
|
-
return /* @__PURE__ */
|
|
5179
|
+
return /* @__PURE__ */ jsx57(
|
|
5188
5180
|
"a",
|
|
5189
5181
|
{
|
|
5190
5182
|
href: item.to,
|
|
@@ -5196,7 +5188,7 @@ function ItemLink({
|
|
|
5196
5188
|
);
|
|
5197
5189
|
}
|
|
5198
5190
|
const LinkComponent = linkComponent ?? DefaultLink;
|
|
5199
|
-
return /* @__PURE__ */
|
|
5191
|
+
return /* @__PURE__ */ jsx57(LinkComponent, { to: item.to, className, children });
|
|
5200
5192
|
}
|
|
5201
5193
|
function ItemContent({
|
|
5202
5194
|
item,
|
|
@@ -5214,7 +5206,7 @@ function ItemContent({
|
|
|
5214
5206
|
active ? "bg-v2-brand-primary font-semibold text-v2-brand-on-primary" : "text-v2-fg-default hover:bg-v2-bg-subtle"
|
|
5215
5207
|
),
|
|
5216
5208
|
children: [
|
|
5217
|
-
/* @__PURE__ */
|
|
5209
|
+
/* @__PURE__ */ jsx57(
|
|
5218
5210
|
"span",
|
|
5219
5211
|
{
|
|
5220
5212
|
className: cn(
|
|
@@ -5225,8 +5217,8 @@ function ItemContent({
|
|
|
5225
5217
|
}
|
|
5226
5218
|
),
|
|
5227
5219
|
!collapsed ? /* @__PURE__ */ jsxs35(Fragment5, { children: [
|
|
5228
|
-
/* @__PURE__ */
|
|
5229
|
-
item.badge !== void 0 && /* @__PURE__ */
|
|
5220
|
+
/* @__PURE__ */ jsx57("span", { className: "flex-1 truncate", children: item.label }),
|
|
5221
|
+
item.badge !== void 0 && /* @__PURE__ */ jsx57(
|
|
5230
5222
|
"span",
|
|
5231
5223
|
{
|
|
5232
5224
|
className: cn(
|
|
@@ -5236,7 +5228,7 @@ function ItemContent({
|
|
|
5236
5228
|
children: item.badge
|
|
5237
5229
|
}
|
|
5238
5230
|
)
|
|
5239
|
-
] }) : item.badge !== void 0 && /* @__PURE__ */
|
|
5231
|
+
] }) : item.badge !== void 0 && /* @__PURE__ */ jsx57(
|
|
5240
5232
|
"span",
|
|
5241
5233
|
{
|
|
5242
5234
|
"aria-label": `${item.badge} pendentes`,
|
|
@@ -5256,15 +5248,15 @@ function GroupItems({
|
|
|
5256
5248
|
showTopDivider
|
|
5257
5249
|
}) {
|
|
5258
5250
|
return /* @__PURE__ */ jsxs35("div", { className: "flex flex-col gap-1", children: [
|
|
5259
|
-
group.label && !collapsed && /* @__PURE__ */
|
|
5260
|
-
group.label && collapsed && /* @__PURE__ */
|
|
5251
|
+
group.label && !collapsed && /* @__PURE__ */ jsx57("h3", { className: "pb-1 pl-4 pt-2 text-v2-xs font-bold uppercase tracking-[0.08em] text-v2-fg-muted", children: group.label }),
|
|
5252
|
+
group.label && collapsed && /* @__PURE__ */ jsx57(
|
|
5261
5253
|
"div",
|
|
5262
5254
|
{
|
|
5263
5255
|
"aria-hidden": "true",
|
|
5264
5256
|
className: "mx-2 my-1 h-px bg-v2-border-default"
|
|
5265
5257
|
}
|
|
5266
5258
|
),
|
|
5267
|
-
!group.label && showTopDivider && /* @__PURE__ */
|
|
5259
|
+
!group.label && showTopDivider && /* @__PURE__ */ jsx57(
|
|
5268
5260
|
"div",
|
|
5269
5261
|
{
|
|
5270
5262
|
"aria-hidden": "true",
|
|
@@ -5274,9 +5266,9 @@ function GroupItems({
|
|
|
5274
5266
|
)
|
|
5275
5267
|
}
|
|
5276
5268
|
),
|
|
5277
|
-
/* @__PURE__ */
|
|
5269
|
+
/* @__PURE__ */ jsx57("ul", { className: "flex flex-col gap-0.5", children: group.items.map((item) => {
|
|
5278
5270
|
const active = isActive(currentPath, item.to);
|
|
5279
|
-
const itemContent = /* @__PURE__ */
|
|
5271
|
+
const itemContent = /* @__PURE__ */ jsx57(
|
|
5280
5272
|
ItemContent,
|
|
5281
5273
|
{
|
|
5282
5274
|
item,
|
|
@@ -5285,7 +5277,7 @@ function GroupItems({
|
|
|
5285
5277
|
title: collapsed ? item.label : void 0
|
|
5286
5278
|
}
|
|
5287
5279
|
);
|
|
5288
|
-
return /* @__PURE__ */
|
|
5280
|
+
return /* @__PURE__ */ jsx57(
|
|
5289
5281
|
"li",
|
|
5290
5282
|
{
|
|
5291
5283
|
"aria-current": active ? "page" : void 0,
|
|
@@ -5293,7 +5285,7 @@ function GroupItems({
|
|
|
5293
5285
|
"ml-1.5 h-12 rounded-l-v2-pill p-1 transition-colors",
|
|
5294
5286
|
active && "ds-v2-sidebar-item--active"
|
|
5295
5287
|
),
|
|
5296
|
-
children: renderLink ? renderLink(item, itemContent) : /* @__PURE__ */
|
|
5288
|
+
children: renderLink ? renderLink(item, itemContent) : /* @__PURE__ */ jsx57(
|
|
5297
5289
|
ItemLink,
|
|
5298
5290
|
{
|
|
5299
5291
|
item,
|
|
@@ -5318,7 +5310,7 @@ function NavGroups({
|
|
|
5318
5310
|
const topGroups = groups.filter((g) => g.pin !== "bottom");
|
|
5319
5311
|
const bottomGroups = groups.filter((g) => g.pin === "bottom");
|
|
5320
5312
|
return /* @__PURE__ */ jsxs35("nav", { className: "ds-v2-sidebar-nav flex flex-1 flex-col gap-3 py-3", children: [
|
|
5321
|
-
topGroups.map((group, idx) => /* @__PURE__ */
|
|
5313
|
+
topGroups.map((group, idx) => /* @__PURE__ */ jsx57(
|
|
5322
5314
|
GroupItems,
|
|
5323
5315
|
{
|
|
5324
5316
|
group,
|
|
@@ -5330,7 +5322,7 @@ function NavGroups({
|
|
|
5330
5322
|
},
|
|
5331
5323
|
group.label ?? `top-${idx}`
|
|
5332
5324
|
)),
|
|
5333
|
-
bottomGroups.length > 0 && /* @__PURE__ */
|
|
5325
|
+
bottomGroups.length > 0 && /* @__PURE__ */ jsx57("div", { className: "mt-auto flex flex-col gap-1 pt-3", children: bottomGroups.map((group, idx) => /* @__PURE__ */ jsx57(
|
|
5334
5326
|
GroupItems,
|
|
5335
5327
|
{
|
|
5336
5328
|
group,
|
|
@@ -5417,16 +5409,16 @@ var Sidebar = forwardRef39(function Sidebar2({
|
|
|
5417
5409
|
collapsed ? "justify-center px-0" : "justify-between"
|
|
5418
5410
|
),
|
|
5419
5411
|
children: [
|
|
5420
|
-
headerSlot && !collapsed && /* @__PURE__ */
|
|
5421
|
-
/* @__PURE__ */
|
|
5412
|
+
headerSlot && !collapsed && /* @__PURE__ */ jsx57("div", { children: headerSlot }),
|
|
5413
|
+
/* @__PURE__ */ jsx57(
|
|
5422
5414
|
Tooltip,
|
|
5423
5415
|
{
|
|
5424
5416
|
side: "right",
|
|
5425
5417
|
content: /* @__PURE__ */ jsxs35("span", { children: [
|
|
5426
5418
|
collapsed ? "Expandir menu" : "Recolher menu",
|
|
5427
|
-
enableShortcut && /* @__PURE__ */
|
|
5419
|
+
enableShortcut && /* @__PURE__ */ jsx57("span", { className: "ml-1 text-v2-fg-muted", children: getShortcutLabel("B") })
|
|
5428
5420
|
] }),
|
|
5429
|
-
children: /* @__PURE__ */
|
|
5421
|
+
children: /* @__PURE__ */ jsx57(
|
|
5430
5422
|
"button",
|
|
5431
5423
|
{
|
|
5432
5424
|
type: "button",
|
|
@@ -5436,7 +5428,7 @@ var Sidebar = forwardRef39(function Sidebar2({
|
|
|
5436
5428
|
className: cn(
|
|
5437
5429
|
"inline-flex size-8 shrink-0 items-center justify-center rounded-v2-md text-current transition-colors hover:bg-v2-bg-subtle"
|
|
5438
5430
|
),
|
|
5439
|
-
children: collapsed ? /* @__PURE__ */
|
|
5431
|
+
children: collapsed ? /* @__PURE__ */ jsx57(CaretDoubleRight, { size: 16 }) : /* @__PURE__ */ jsx57(CaretDoubleLeft, { size: 16 })
|
|
5440
5432
|
}
|
|
5441
5433
|
)
|
|
5442
5434
|
}
|
|
@@ -5444,7 +5436,7 @@ var Sidebar = forwardRef39(function Sidebar2({
|
|
|
5444
5436
|
]
|
|
5445
5437
|
}
|
|
5446
5438
|
),
|
|
5447
|
-
/* @__PURE__ */
|
|
5439
|
+
/* @__PURE__ */ jsx57(
|
|
5448
5440
|
NavGroups,
|
|
5449
5441
|
{
|
|
5450
5442
|
groups,
|
|
@@ -5461,7 +5453,7 @@ var Sidebar = forwardRef39(function Sidebar2({
|
|
|
5461
5453
|
|
|
5462
5454
|
// src/patterns/Topbar/Topbar.tsx
|
|
5463
5455
|
import { forwardRef as forwardRef40 } from "react";
|
|
5464
|
-
import { jsx as
|
|
5456
|
+
import { jsx as jsx58, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
5465
5457
|
var Topbar = forwardRef40(function Topbar2({
|
|
5466
5458
|
pageTitle,
|
|
5467
5459
|
searchTrigger,
|
|
@@ -5485,8 +5477,8 @@ var Topbar = forwardRef40(function Topbar2({
|
|
|
5485
5477
|
),
|
|
5486
5478
|
...props,
|
|
5487
5479
|
children: [
|
|
5488
|
-
/* @__PURE__ */
|
|
5489
|
-
searchTrigger && /* @__PURE__ */
|
|
5480
|
+
/* @__PURE__ */ jsx58("div", { className: "flex min-w-0 flex-1 items-center gap-3", children: pageTitle && /* @__PURE__ */ jsx58("h2", { className: "truncate text-v2-sm font-bold", children: pageTitle }) }),
|
|
5481
|
+
searchTrigger && /* @__PURE__ */ jsx58("div", { className: "flex flex-1 items-center justify-center", children: searchTrigger }),
|
|
5490
5482
|
/* @__PURE__ */ jsxs36("div", { className: "flex flex-1 items-center justify-end gap-2", children: [
|
|
5491
5483
|
notificationCenter,
|
|
5492
5484
|
themeToggle,
|
|
@@ -5499,7 +5491,7 @@ var Topbar = forwardRef40(function Topbar2({
|
|
|
5499
5491
|
Topbar.displayName = "Topbar";
|
|
5500
5492
|
|
|
5501
5493
|
// src/patterns/AppShell/AppShell.tsx
|
|
5502
|
-
import { jsx as
|
|
5494
|
+
import { jsx as jsx59, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
5503
5495
|
var DEFAULT_GROUPS = [
|
|
5504
5496
|
{
|
|
5505
5497
|
label: null,
|
|
@@ -5507,55 +5499,55 @@ var DEFAULT_GROUPS = [
|
|
|
5507
5499
|
{
|
|
5508
5500
|
id: "home",
|
|
5509
5501
|
label: "P\xE1gina inicial",
|
|
5510
|
-
icon: /* @__PURE__ */
|
|
5502
|
+
icon: /* @__PURE__ */ jsx59(House, { size: 20 }),
|
|
5511
5503
|
to: "/"
|
|
5512
5504
|
},
|
|
5513
5505
|
{
|
|
5514
5506
|
id: "users",
|
|
5515
5507
|
label: "Usu\xE1rios",
|
|
5516
|
-
icon: /* @__PURE__ */
|
|
5508
|
+
icon: /* @__PURE__ */ jsx59(Users, { size: 20 }),
|
|
5517
5509
|
to: "/users"
|
|
5518
5510
|
},
|
|
5519
5511
|
{
|
|
5520
5512
|
id: "orgs",
|
|
5521
5513
|
label: "Organiza\xE7\xF5es",
|
|
5522
|
-
icon: /* @__PURE__ */
|
|
5514
|
+
icon: /* @__PURE__ */ jsx59(Buildings, { size: 20 }),
|
|
5523
5515
|
to: "/organizations"
|
|
5524
5516
|
},
|
|
5525
5517
|
{
|
|
5526
5518
|
id: "configs-op",
|
|
5527
5519
|
label: "Configs Opera\xE7\xE3o",
|
|
5528
|
-
icon: /* @__PURE__ */
|
|
5520
|
+
icon: /* @__PURE__ */ jsx59(Briefcase, { size: 20 }),
|
|
5529
5521
|
to: "/configs/operation"
|
|
5530
5522
|
},
|
|
5531
5523
|
{
|
|
5532
5524
|
id: "clients",
|
|
5533
5525
|
label: "Clientes",
|
|
5534
|
-
icon: /* @__PURE__ */
|
|
5526
|
+
icon: /* @__PURE__ */ jsx59(UsersThree, { size: 20 }),
|
|
5535
5527
|
to: "/clients"
|
|
5536
5528
|
},
|
|
5537
5529
|
{
|
|
5538
5530
|
id: "requests",
|
|
5539
5531
|
label: "Requisi\xE7\xF5es",
|
|
5540
|
-
icon: /* @__PURE__ */
|
|
5532
|
+
icon: /* @__PURE__ */ jsx59(PaperPlaneTilt, { size: 20 }),
|
|
5541
5533
|
to: "/requests"
|
|
5542
5534
|
},
|
|
5543
5535
|
{
|
|
5544
5536
|
id: "operations",
|
|
5545
5537
|
label: "Opera\xE7\xF5es",
|
|
5546
|
-
icon: /* @__PURE__ */
|
|
5538
|
+
icon: /* @__PURE__ */ jsx59(Receipt, { size: 20 }),
|
|
5547
5539
|
to: "/operations"
|
|
5548
5540
|
},
|
|
5549
5541
|
{
|
|
5550
5542
|
id: "finance",
|
|
5551
5543
|
label: "Financeiro",
|
|
5552
|
-
icon: /* @__PURE__ */
|
|
5544
|
+
icon: /* @__PURE__ */ jsx59(Coins, { size: 20 }),
|
|
5553
5545
|
to: "/finance"
|
|
5554
5546
|
},
|
|
5555
5547
|
{
|
|
5556
5548
|
id: "configurations",
|
|
5557
5549
|
label: "Configura\xE7\xF5es",
|
|
5558
|
-
icon: /* @__PURE__ */
|
|
5550
|
+
icon: /* @__PURE__ */ jsx59(Gear, { size: 20 }),
|
|
5559
5551
|
to: "/configurations"
|
|
5560
5552
|
}
|
|
5561
5553
|
]
|
|
@@ -5566,15 +5558,15 @@ var DEFAULT_GROUPS = [
|
|
|
5566
5558
|
{
|
|
5567
5559
|
id: "tutorials",
|
|
5568
5560
|
label: "Tutoriais",
|
|
5569
|
-
icon: /* @__PURE__ */
|
|
5561
|
+
icon: /* @__PURE__ */ jsx59(GraduationCap, { size: 20 }),
|
|
5570
5562
|
to: "/tutorials"
|
|
5571
5563
|
}
|
|
5572
5564
|
]
|
|
5573
5565
|
}
|
|
5574
5566
|
];
|
|
5575
5567
|
var DEFAULT_HEADER_SLOT = /* @__PURE__ */ jsxs37("span", { className: "flex items-center gap-1.5", children: [
|
|
5576
|
-
/* @__PURE__ */
|
|
5577
|
-
/* @__PURE__ */
|
|
5568
|
+
/* @__PURE__ */ jsx59(Bank, { size: 20, "aria-hidden": "true" }),
|
|
5569
|
+
/* @__PURE__ */ jsx59("span", { className: "text-v2-base font-bold text-v2-fg-default", children: "HUMU" })
|
|
5578
5570
|
] });
|
|
5579
5571
|
function AppShell({
|
|
5580
5572
|
children,
|
|
@@ -5590,7 +5582,7 @@ function AppShell({
|
|
|
5590
5582
|
defaultSidebarCollapsed = false
|
|
5591
5583
|
}) {
|
|
5592
5584
|
return /* @__PURE__ */ jsxs37("div", { className: "flex h-screen overflow-hidden bg-v2-canvas text-v2-fg-default", children: [
|
|
5593
|
-
/* @__PURE__ */
|
|
5585
|
+
/* @__PURE__ */ jsx59(
|
|
5594
5586
|
"a",
|
|
5595
5587
|
{
|
|
5596
5588
|
href: "#main-content",
|
|
@@ -5598,7 +5590,7 @@ function AppShell({
|
|
|
5598
5590
|
children: "Pular para o conte\xFAdo"
|
|
5599
5591
|
}
|
|
5600
5592
|
),
|
|
5601
|
-
/* @__PURE__ */
|
|
5593
|
+
/* @__PURE__ */ jsx59(
|
|
5602
5594
|
Sidebar,
|
|
5603
5595
|
{
|
|
5604
5596
|
groups: sidebarGroups,
|
|
@@ -5609,7 +5601,7 @@ function AppShell({
|
|
|
5609
5601
|
}
|
|
5610
5602
|
),
|
|
5611
5603
|
/* @__PURE__ */ jsxs37("div", { className: "flex min-h-0 min-w-0 flex-1 flex-col", children: [
|
|
5612
|
-
/* @__PURE__ */
|
|
5604
|
+
/* @__PURE__ */ jsx59(
|
|
5613
5605
|
Topbar,
|
|
5614
5606
|
{
|
|
5615
5607
|
pageTitle,
|
|
@@ -5619,14 +5611,14 @@ function AppShell({
|
|
|
5619
5611
|
userMenu
|
|
5620
5612
|
}
|
|
5621
5613
|
),
|
|
5622
|
-
/* @__PURE__ */
|
|
5614
|
+
/* @__PURE__ */ jsx59(
|
|
5623
5615
|
"main",
|
|
5624
5616
|
{
|
|
5625
5617
|
id: "main-content",
|
|
5626
5618
|
role: "main",
|
|
5627
5619
|
tabIndex: -1,
|
|
5628
5620
|
className: "flex min-h-0 min-w-0 flex-1 flex-col overflow-y-auto overflow-x-hidden overscroll-contain bg-v2-app p-4 focus:outline-none sm:p-6",
|
|
5629
|
-
children: /* @__PURE__ */
|
|
5621
|
+
children: /* @__PURE__ */ jsx59("div", { className: "flex-1 rounded-v2-lg border border-v2-border-default bg-v2-shell p-4 shadow-sm sm:p-6", children })
|
|
5630
5622
|
}
|
|
5631
5623
|
)
|
|
5632
5624
|
] })
|
|
@@ -5637,7 +5629,7 @@ AppShell.displayName = "AppShell";
|
|
|
5637
5629
|
// src/patterns/KpiHero/KpiHero.tsx
|
|
5638
5630
|
import { useId as useId15 } from "react";
|
|
5639
5631
|
import { ArrowUp as ArrowUp2, ArrowDown as ArrowDown2, Minus as Minus3 } from "@phosphor-icons/react";
|
|
5640
|
-
import { Fragment as Fragment6, jsx as
|
|
5632
|
+
import { Fragment as Fragment6, jsx as jsx60, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
5641
5633
|
var iconBgClass = {
|
|
5642
5634
|
brand: "bg-v2-brand-bg-soft text-v2-brand-text-dark",
|
|
5643
5635
|
info: "bg-v2-info-soft text-v2-info-500",
|
|
@@ -5658,9 +5650,9 @@ var trendToneClass = {
|
|
|
5658
5650
|
flat: "bg-v2-bg-subtle text-v2-fg-muted"
|
|
5659
5651
|
};
|
|
5660
5652
|
var arrowIcon2 = {
|
|
5661
|
-
up: /* @__PURE__ */
|
|
5662
|
-
down: /* @__PURE__ */
|
|
5663
|
-
flat: /* @__PURE__ */
|
|
5653
|
+
up: /* @__PURE__ */ jsx60(ArrowUp2, { size: 11, weight: "bold", "aria-hidden": "true" }),
|
|
5654
|
+
down: /* @__PURE__ */ jsx60(ArrowDown2, { size: 11, weight: "bold", "aria-hidden": "true" }),
|
|
5655
|
+
flat: /* @__PURE__ */ jsx60(Minus3, { size: 11, weight: "bold", "aria-hidden": "true" })
|
|
5664
5656
|
};
|
|
5665
5657
|
function buildSparklinePaths(data) {
|
|
5666
5658
|
const width = 100;
|
|
@@ -5697,7 +5689,7 @@ function KpiHero({
|
|
|
5697
5689
|
const sparkPaths = sparkline !== void 0 && hasSparkline ? buildSparklinePaths(sparkline) : null;
|
|
5698
5690
|
const inner = /* @__PURE__ */ jsxs38(Fragment6, { children: [
|
|
5699
5691
|
/* @__PURE__ */ jsxs38("div", { className: "flex items-start justify-between", children: [
|
|
5700
|
-
/* @__PURE__ */
|
|
5692
|
+
/* @__PURE__ */ jsx60(
|
|
5701
5693
|
"span",
|
|
5702
5694
|
{
|
|
5703
5695
|
className: cn(
|
|
@@ -5721,10 +5713,10 @@ function KpiHero({
|
|
|
5721
5713
|
}
|
|
5722
5714
|
)
|
|
5723
5715
|
] }),
|
|
5724
|
-
/* @__PURE__ */
|
|
5725
|
-
/* @__PURE__ */
|
|
5726
|
-
sub && /* @__PURE__ */
|
|
5727
|
-
hasSparkline && sparkPaths && /* @__PURE__ */
|
|
5716
|
+
/* @__PURE__ */ jsx60("span", { className: "text-v2-xs font-semibold uppercase tracking-wide text-v2-fg-muted", children: label }),
|
|
5717
|
+
/* @__PURE__ */ jsx60("span", { className: "text-[30px] font-extrabold tabular-nums leading-none text-v2-fg-default", children: value }),
|
|
5718
|
+
sub && /* @__PURE__ */ jsx60("span", { className: "text-v2-xs text-v2-fg-muted", children: sub }),
|
|
5719
|
+
hasSparkline && sparkPaths && /* @__PURE__ */ jsx60("div", { className: cn("-mt-0.5 h-9 w-full", sparkColorClass[tone]), children: /* @__PURE__ */ jsxs38(
|
|
5728
5720
|
"svg",
|
|
5729
5721
|
{
|
|
5730
5722
|
viewBox: "0 0 100 36",
|
|
@@ -5732,11 +5724,11 @@ function KpiHero({
|
|
|
5732
5724
|
className: "size-full",
|
|
5733
5725
|
"aria-hidden": "true",
|
|
5734
5726
|
children: [
|
|
5735
|
-
/* @__PURE__ */
|
|
5736
|
-
/* @__PURE__ */
|
|
5737
|
-
/* @__PURE__ */
|
|
5727
|
+
/* @__PURE__ */ jsx60("defs", { children: /* @__PURE__ */ jsxs38("linearGradient", { id: gradientId, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
5728
|
+
/* @__PURE__ */ jsx60("stop", { offset: "0%", stopColor: "currentColor", stopOpacity: "0.3" }),
|
|
5729
|
+
/* @__PURE__ */ jsx60("stop", { offset: "100%", stopColor: "currentColor", stopOpacity: "0" })
|
|
5738
5730
|
] }) }),
|
|
5739
|
-
/* @__PURE__ */
|
|
5731
|
+
/* @__PURE__ */ jsx60(
|
|
5740
5732
|
"path",
|
|
5741
5733
|
{
|
|
5742
5734
|
d: sparkPaths.area,
|
|
@@ -5744,7 +5736,7 @@ function KpiHero({
|
|
|
5744
5736
|
stroke: "none"
|
|
5745
5737
|
}
|
|
5746
5738
|
),
|
|
5747
|
-
/* @__PURE__ */
|
|
5739
|
+
/* @__PURE__ */ jsx60(
|
|
5748
5740
|
"path",
|
|
5749
5741
|
{
|
|
5750
5742
|
d: sparkPaths.line,
|
|
@@ -5757,17 +5749,17 @@ function KpiHero({
|
|
|
5757
5749
|
]
|
|
5758
5750
|
}
|
|
5759
5751
|
) }),
|
|
5760
|
-
to && cta && /* @__PURE__ */
|
|
5752
|
+
to && cta && /* @__PURE__ */ jsx60("span", { className: "text-v2-xs font-bold text-v2-action-primary opacity-0 transition-opacity group-hover:opacity-100", children: cta })
|
|
5761
5753
|
] });
|
|
5762
5754
|
if (to) {
|
|
5763
5755
|
const LinkComponent = linkComponent ?? DefaultLink;
|
|
5764
|
-
return /* @__PURE__ */
|
|
5756
|
+
return /* @__PURE__ */ jsx60(LinkComponent, { to, className: containerClass, children: inner });
|
|
5765
5757
|
}
|
|
5766
|
-
return /* @__PURE__ */
|
|
5758
|
+
return /* @__PURE__ */ jsx60("div", { className: containerClass, children: inner });
|
|
5767
5759
|
}
|
|
5768
5760
|
|
|
5769
5761
|
// src/patterns/DashboardBlock/DashboardBlock.tsx
|
|
5770
|
-
import { Fragment as Fragment7, jsx as
|
|
5762
|
+
import { Fragment as Fragment7, jsx as jsx61, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
5771
5763
|
function DashboardBlock({
|
|
5772
5764
|
available,
|
|
5773
5765
|
reason,
|
|
@@ -5778,7 +5770,7 @@ function DashboardBlock({
|
|
|
5778
5770
|
children
|
|
5779
5771
|
}) {
|
|
5780
5772
|
if (loading) {
|
|
5781
|
-
return /* @__PURE__ */
|
|
5773
|
+
return /* @__PURE__ */ jsx61(
|
|
5782
5774
|
"div",
|
|
5783
5775
|
{
|
|
5784
5776
|
"data-testid": "dashboard-block-skeleton",
|
|
@@ -5789,8 +5781,8 @@ function DashboardBlock({
|
|
|
5789
5781
|
if (!available) {
|
|
5790
5782
|
if (reason === "source_data_missing") {
|
|
5791
5783
|
return /* @__PURE__ */ jsxs39("div", { className: "flex min-h-40 flex-col items-center justify-center gap-2 rounded-v2-lg border border-v2-border-default bg-v2-panel p-5 text-center", children: [
|
|
5792
|
-
/* @__PURE__ */
|
|
5793
|
-
onRetry && /* @__PURE__ */
|
|
5784
|
+
/* @__PURE__ */ jsx61(Text, { size: "sm", weight: "semibold", children: "Fonte de dados indispon\xEDvel no momento" }),
|
|
5785
|
+
onRetry && /* @__PURE__ */ jsx61(
|
|
5794
5786
|
Button,
|
|
5795
5787
|
{
|
|
5796
5788
|
type: "button",
|
|
@@ -5805,15 +5797,15 @@ function DashboardBlock({
|
|
|
5805
5797
|
return null;
|
|
5806
5798
|
}
|
|
5807
5799
|
if (isEmpty) {
|
|
5808
|
-
return /* @__PURE__ */
|
|
5800
|
+
return /* @__PURE__ */ jsx61("div", { className: "flex min-h-40 items-center justify-center rounded-v2-lg border border-v2-border-default bg-v2-panel p-5 text-center", children: /* @__PURE__ */ jsx61(Text, { size: "sm", color: "muted", children: emptyLabel }) });
|
|
5809
5801
|
}
|
|
5810
|
-
return /* @__PURE__ */
|
|
5802
|
+
return /* @__PURE__ */ jsx61(Fragment7, { children });
|
|
5811
5803
|
}
|
|
5812
5804
|
|
|
5813
5805
|
// src/patterns/LegalDocumentRenderer/LegalDocumentRenderer.tsx
|
|
5814
5806
|
import ReactMarkdown from "react-markdown";
|
|
5815
5807
|
import remarkGfm from "remark-gfm";
|
|
5816
|
-
import { Fragment as Fragment8, jsx as
|
|
5808
|
+
import { Fragment as Fragment8, jsx as jsx62, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
5817
5809
|
function formatLastUpdated(iso) {
|
|
5818
5810
|
if (!iso) return "";
|
|
5819
5811
|
const date = new Date(iso);
|
|
@@ -5824,16 +5816,16 @@ function formatLastUpdated(iso) {
|
|
|
5824
5816
|
}).format(date);
|
|
5825
5817
|
}
|
|
5826
5818
|
var markdownComponents = {
|
|
5827
|
-
h1: ({ children }) => /* @__PURE__ */
|
|
5828
|
-
h2: ({ children }) => /* @__PURE__ */
|
|
5829
|
-
h3: ({ children }) => /* @__PURE__ */
|
|
5830
|
-
p: ({ children }) => /* @__PURE__ */
|
|
5831
|
-
ul: ({ children }) => /* @__PURE__ */
|
|
5832
|
-
ol: ({ children }) => /* @__PURE__ */
|
|
5833
|
-
li: ({ children }) => /* @__PURE__ */
|
|
5819
|
+
h1: ({ children }) => /* @__PURE__ */ jsx62(Heading, { level: 2, size: "xl", children }),
|
|
5820
|
+
h2: ({ children }) => /* @__PURE__ */ jsx62(Heading, { level: 3, size: "lg", children }),
|
|
5821
|
+
h3: ({ children }) => /* @__PURE__ */ jsx62(Heading, { level: 4, size: "md", children }),
|
|
5822
|
+
p: ({ children }) => /* @__PURE__ */ jsx62(Text, { size: "base", color: "default", className: "leading-relaxed", children }),
|
|
5823
|
+
ul: ({ children }) => /* @__PURE__ */ jsx62("ul", { className: "ml-6 flex list-disc flex-col gap-1 text-v2-base text-v2-fg-default", children }),
|
|
5824
|
+
ol: ({ children }) => /* @__PURE__ */ jsx62("ol", { className: "ml-6 flex list-decimal flex-col gap-1 text-v2-base text-v2-fg-default", children }),
|
|
5825
|
+
li: ({ children }) => /* @__PURE__ */ jsx62("li", { children }),
|
|
5834
5826
|
a: ({ href, children }) => {
|
|
5835
5827
|
const isExternal = href == null ? void 0 : href.startsWith("http");
|
|
5836
|
-
return /* @__PURE__ */
|
|
5828
|
+
return /* @__PURE__ */ jsx62(
|
|
5837
5829
|
"a",
|
|
5838
5830
|
{
|
|
5839
5831
|
href,
|
|
@@ -5844,14 +5836,14 @@ var markdownComponents = {
|
|
|
5844
5836
|
}
|
|
5845
5837
|
);
|
|
5846
5838
|
},
|
|
5847
|
-
strong: ({ children }) => /* @__PURE__ */
|
|
5848
|
-
em: ({ children }) => /* @__PURE__ */
|
|
5849
|
-
hr: () => /* @__PURE__ */
|
|
5850
|
-
table: ({ children }) => /* @__PURE__ */
|
|
5851
|
-
th: ({ children }) => /* @__PURE__ */
|
|
5852
|
-
td: ({ children }) => /* @__PURE__ */
|
|
5853
|
-
blockquote: ({ children }) => /* @__PURE__ */
|
|
5854
|
-
code: ({ children }) => /* @__PURE__ */
|
|
5839
|
+
strong: ({ children }) => /* @__PURE__ */ jsx62("strong", { className: "font-semibold text-v2-fg-default", children }),
|
|
5840
|
+
em: ({ children }) => /* @__PURE__ */ jsx62("em", { className: "italic", children }),
|
|
5841
|
+
hr: () => /* @__PURE__ */ jsx62("hr", { className: "my-2 border-t border-v2-border-default" }),
|
|
5842
|
+
table: ({ children }) => /* @__PURE__ */ jsx62("div", { className: "overflow-x-auto", children: /* @__PURE__ */ jsx62("table", { className: "w-full border-collapse text-v2-sm", children }) }),
|
|
5843
|
+
th: ({ children }) => /* @__PURE__ */ jsx62("th", { className: "border-b border-v2-border-default bg-v2-bg-subtle px-3 py-2 text-left font-semibold", children }),
|
|
5844
|
+
td: ({ children }) => /* @__PURE__ */ jsx62("td", { className: "border-b border-v2-border-subtle px-3 py-2", children }),
|
|
5845
|
+
blockquote: ({ children }) => /* @__PURE__ */ jsx62("blockquote", { className: "border-l-4 border-v2-border-default pl-4 italic text-v2-fg-muted", children }),
|
|
5846
|
+
code: ({ children }) => /* @__PURE__ */ jsx62("code", { className: "rounded-v2-sm bg-v2-bg-subtle px-1 py-0.5 font-mono text-v2-xs", children })
|
|
5855
5847
|
};
|
|
5856
5848
|
function LegalDocumentRenderer({
|
|
5857
5849
|
document: document2,
|
|
@@ -5864,16 +5856,16 @@ function LegalDocumentRenderer({
|
|
|
5864
5856
|
className
|
|
5865
5857
|
}) {
|
|
5866
5858
|
if (isLoading) {
|
|
5867
|
-
return /* @__PURE__ */
|
|
5868
|
-
/* @__PURE__ */
|
|
5869
|
-
/* @__PURE__ */
|
|
5870
|
-
/* @__PURE__ */
|
|
5871
|
-
/* @__PURE__ */
|
|
5872
|
-
/* @__PURE__ */
|
|
5859
|
+
return /* @__PURE__ */ jsx62("div", { className: cn("flex flex-col gap-3", className), children: loadingState ?? /* @__PURE__ */ jsxs40(Fragment8, { children: [
|
|
5860
|
+
/* @__PURE__ */ jsx62(Skeleton, { shape: "text", style: { width: "60%", height: 24 } }),
|
|
5861
|
+
/* @__PURE__ */ jsx62(Skeleton, { shape: "text", style: { width: "100%", height: 14 } }),
|
|
5862
|
+
/* @__PURE__ */ jsx62(Skeleton, { shape: "text", style: { width: "95%", height: 14 } }),
|
|
5863
|
+
/* @__PURE__ */ jsx62(Skeleton, { shape: "text", style: { width: "90%", height: 14 } }),
|
|
5864
|
+
/* @__PURE__ */ jsx62(Skeleton, { shape: "text", style: { width: "85%", height: 14 } })
|
|
5873
5865
|
] }) });
|
|
5874
5866
|
}
|
|
5875
5867
|
if (error || !document2) {
|
|
5876
|
-
return /* @__PURE__ */
|
|
5868
|
+
return /* @__PURE__ */ jsx62(
|
|
5877
5869
|
"div",
|
|
5878
5870
|
{
|
|
5879
5871
|
className: cn(
|
|
@@ -5881,18 +5873,18 @@ function LegalDocumentRenderer({
|
|
|
5881
5873
|
className
|
|
5882
5874
|
),
|
|
5883
5875
|
role: "alert",
|
|
5884
|
-
children: errorState ?? /* @__PURE__ */
|
|
5876
|
+
children: errorState ?? /* @__PURE__ */ jsx62(Text, { size: "sm", color: "default", children: "N\xE3o foi poss\xEDvel carregar o documento." })
|
|
5885
5877
|
}
|
|
5886
5878
|
);
|
|
5887
5879
|
}
|
|
5888
5880
|
return /* @__PURE__ */ jsxs40("article", { className: cn("flex flex-col gap-4", className), children: [
|
|
5889
|
-
title && /* @__PURE__ */
|
|
5881
|
+
title && /* @__PURE__ */ jsx62(Heading, { level: 1, size: "2xl", children: title }),
|
|
5890
5882
|
document2.lastUpdated && /* @__PURE__ */ jsxs40(Text, { size: "xs", color: "muted", children: [
|
|
5891
5883
|
lastUpdatedLabel,
|
|
5892
5884
|
": ",
|
|
5893
5885
|
formatLastUpdated(document2.lastUpdated)
|
|
5894
5886
|
] }),
|
|
5895
|
-
/* @__PURE__ */
|
|
5887
|
+
/* @__PURE__ */ jsx62("div", { className: "flex flex-col gap-4 text-v2-base text-v2-fg-default", children: /* @__PURE__ */ jsx62(
|
|
5896
5888
|
ReactMarkdown,
|
|
5897
5889
|
{
|
|
5898
5890
|
remarkPlugins: [remarkGfm],
|
|
@@ -5910,7 +5902,7 @@ import { forwardRef as forwardRef42 } from "react";
|
|
|
5910
5902
|
// src/patterns/SortableColumnHeader/SortableColumnHeader.tsx
|
|
5911
5903
|
import { forwardRef as forwardRef41 } from "react";
|
|
5912
5904
|
import { CaretDown as CaretDown5, CaretUp, CaretUpDown } from "@phosphor-icons/react";
|
|
5913
|
-
import { jsx as
|
|
5905
|
+
import { jsx as jsx63, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
5914
5906
|
function nextDirection(current, cycleMode) {
|
|
5915
5907
|
if (cycleMode === "asc-desc") {
|
|
5916
5908
|
return current === "asc" ? "desc" : "asc";
|
|
@@ -5954,8 +5946,8 @@ var SortableColumnHeader = forwardRef41(
|
|
|
5954
5946
|
},
|
|
5955
5947
|
...props,
|
|
5956
5948
|
children: [
|
|
5957
|
-
/* @__PURE__ */
|
|
5958
|
-
direction === "asc" ? /* @__PURE__ */
|
|
5949
|
+
/* @__PURE__ */ jsx63("span", { children: label }),
|
|
5950
|
+
direction === "asc" ? /* @__PURE__ */ jsx63(CaretUp, { size: 12, weight: "bold", "aria-hidden": "true" }) : direction === "desc" ? /* @__PURE__ */ jsx63(CaretDown5, { size: 12, weight: "bold", "aria-hidden": "true" }) : /* @__PURE__ */ jsx63(CaretUpDown, { size: 12, "aria-hidden": "true", className: "opacity-60" })
|
|
5959
5951
|
]
|
|
5960
5952
|
}
|
|
5961
5953
|
);
|
|
@@ -5964,7 +5956,7 @@ var SortableColumnHeader = forwardRef41(
|
|
|
5964
5956
|
SortableColumnHeader.displayName = "SortableColumnHeader";
|
|
5965
5957
|
|
|
5966
5958
|
// src/patterns/DataTable/DataTable.tsx
|
|
5967
|
-
import { jsx as
|
|
5959
|
+
import { jsx as jsx64, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
5968
5960
|
var densityCellClass = {
|
|
5969
5961
|
compact: "px-3 py-1.5",
|
|
5970
5962
|
comfortable: "px-3 py-3"
|
|
@@ -6001,7 +5993,7 @@ function DataTableInner({
|
|
|
6001
5993
|
}, ref) {
|
|
6002
5994
|
const cellPadding = densityCellClass[density];
|
|
6003
5995
|
const seenRowKeys = /* @__PURE__ */ new Set();
|
|
6004
|
-
return /* @__PURE__ */
|
|
5996
|
+
return /* @__PURE__ */ jsx64("div", { className: "overflow-x-auto", children: /* @__PURE__ */ jsxs42(
|
|
6005
5997
|
"table",
|
|
6006
5998
|
{
|
|
6007
5999
|
ref,
|
|
@@ -6009,14 +6001,14 @@ function DataTableInner({
|
|
|
6009
6001
|
className: cn("w-full border-collapse text-v2-sm", className),
|
|
6010
6002
|
...props,
|
|
6011
6003
|
children: [
|
|
6012
|
-
/* @__PURE__ */
|
|
6004
|
+
/* @__PURE__ */ jsx64(
|
|
6013
6005
|
"thead",
|
|
6014
6006
|
{
|
|
6015
6007
|
className: cn(
|
|
6016
6008
|
"border-b border-v2-border-default bg-v2-bg-subtle",
|
|
6017
6009
|
stickyHeader && "sticky top-0 z-10"
|
|
6018
6010
|
),
|
|
6019
|
-
children: /* @__PURE__ */
|
|
6011
|
+
children: /* @__PURE__ */ jsx64("tr", { children: columns.map((col) => /* @__PURE__ */ jsx64(
|
|
6020
6012
|
"th",
|
|
6021
6013
|
{
|
|
6022
6014
|
scope: "col",
|
|
@@ -6031,7 +6023,7 @@ function DataTableInner({
|
|
|
6031
6023
|
col.align === "center" && "text-center",
|
|
6032
6024
|
col.align !== "right" && col.align !== "center" && "text-left"
|
|
6033
6025
|
),
|
|
6034
|
-
children: col.sortable && onSortChange ? /* @__PURE__ */
|
|
6026
|
+
children: col.sortable && onSortChange ? /* @__PURE__ */ jsx64(
|
|
6035
6027
|
SortableColumnHeader,
|
|
6036
6028
|
{
|
|
6037
6029
|
label: col.label,
|
|
@@ -6054,18 +6046,18 @@ function DataTableInner({
|
|
|
6054
6046
|
)) })
|
|
6055
6047
|
}
|
|
6056
6048
|
),
|
|
6057
|
-
/* @__PURE__ */
|
|
6049
|
+
/* @__PURE__ */ jsx64("tbody", { children: loading ? Array.from({ length: loadingRowCount }).map((_, idx) => /* @__PURE__ */ jsx64(
|
|
6058
6050
|
"tr",
|
|
6059
6051
|
{
|
|
6060
6052
|
className: "border-b border-v2-border-default",
|
|
6061
|
-
children: columns.map((col) => /* @__PURE__ */
|
|
6053
|
+
children: columns.map((col) => /* @__PURE__ */ jsx64("td", { className: cellPadding, children: /* @__PURE__ */ jsx64(Skeleton, { className: "h-4 w-full" }) }, col.key))
|
|
6062
6054
|
},
|
|
6063
6055
|
`skeleton-${idx}`
|
|
6064
|
-
)) : rows.length === 0 ? /* @__PURE__ */
|
|
6056
|
+
)) : rows.length === 0 ? /* @__PURE__ */ jsx64("tr", { children: /* @__PURE__ */ jsx64("td", { colSpan: columns.length, className: "py-12 text-center", children: emptyState ?? /* @__PURE__ */ jsx64("span", { className: "text-v2-sm text-v2-fg-muted", children: "Nenhum item." }) }) }) : rows.map((row, index) => {
|
|
6065
6057
|
const baseKey = rowKey(row);
|
|
6066
6058
|
const uniqueKey = seenRowKeys.has(baseKey) ? `${baseKey}__${index}` : baseKey;
|
|
6067
6059
|
seenRowKeys.add(baseKey);
|
|
6068
|
-
return /* @__PURE__ */
|
|
6060
|
+
return /* @__PURE__ */ jsx64(
|
|
6069
6061
|
"tr",
|
|
6070
6062
|
{
|
|
6071
6063
|
className: cn(
|
|
@@ -6073,7 +6065,7 @@ function DataTableInner({
|
|
|
6073
6065
|
zebra && index % 2 === 1 && "bg-v2-bg-subtle/50",
|
|
6074
6066
|
rowClassName == null ? void 0 : rowClassName(row, index)
|
|
6075
6067
|
),
|
|
6076
|
-
children: columns.map((col) => /* @__PURE__ */
|
|
6068
|
+
children: columns.map((col) => /* @__PURE__ */ jsx64(
|
|
6077
6069
|
"td",
|
|
6078
6070
|
{
|
|
6079
6071
|
className: cn(
|
|
@@ -6100,7 +6092,7 @@ var DataTable = forwardRef42(
|
|
|
6100
6092
|
// src/patterns/DataTablePagination/DataTablePagination.tsx
|
|
6101
6093
|
import { forwardRef as forwardRef43, useState as useState18 } from "react";
|
|
6102
6094
|
import { CaretDown as CaretDown6, CaretLeft, CaretRight as CaretRight2, Check as Check5 } from "@phosphor-icons/react";
|
|
6103
|
-
import { jsx as
|
|
6095
|
+
import { jsx as jsx65, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
6104
6096
|
var DEFAULT_PER_PAGE_OPTIONS = [5, 10, 20, 30, 50, 70, 100];
|
|
6105
6097
|
function buildPageNumbers(page, totalPages, siblingCount) {
|
|
6106
6098
|
if (totalPages <= 7) {
|
|
@@ -6164,13 +6156,13 @@ var DataTablePagination = forwardRef43(
|
|
|
6164
6156
|
" ",
|
|
6165
6157
|
ofLabel,
|
|
6166
6158
|
" ",
|
|
6167
|
-
/* @__PURE__ */
|
|
6159
|
+
/* @__PURE__ */ jsx65("strong", { className: "tabular-nums text-v2-fg-default", children: total })
|
|
6168
6160
|
] }),
|
|
6169
6161
|
/* @__PURE__ */ jsxs43("div", { className: "flex items-center gap-3", children: [
|
|
6170
6162
|
onPerPageChange && /* @__PURE__ */ jsxs43("div", { className: "flex items-center gap-2", children: [
|
|
6171
|
-
/* @__PURE__ */
|
|
6163
|
+
/* @__PURE__ */ jsx65("span", { className: "text-v2-sm text-v2-fg-muted", children: perPageLabel }),
|
|
6172
6164
|
/* @__PURE__ */ jsxs43(Popover, { open: perPageOpen, onOpenChange: setPerPageOpen, children: [
|
|
6173
|
-
/* @__PURE__ */
|
|
6165
|
+
/* @__PURE__ */ jsx65(Popover.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs43(
|
|
6174
6166
|
"button",
|
|
6175
6167
|
{
|
|
6176
6168
|
type: "button",
|
|
@@ -6179,14 +6171,14 @@ var DataTablePagination = forwardRef43(
|
|
|
6179
6171
|
"aria-expanded": perPageOpen,
|
|
6180
6172
|
className: "inline-flex h-9 items-center gap-1.5 rounded-v2-md border border-v2-border-default bg-v2-panel px-3 text-v2-sm text-v2-fg-default transition-colors hover:bg-v2-bg-subtle focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-v2-focus-ring/30",
|
|
6181
6173
|
children: [
|
|
6182
|
-
/* @__PURE__ */
|
|
6183
|
-
/* @__PURE__ */
|
|
6174
|
+
/* @__PURE__ */ jsx65("span", { className: "tabular-nums", children: perPage }),
|
|
6175
|
+
/* @__PURE__ */ jsx65(CaretDown6, { size: 12, weight: "bold", "aria-hidden": "true" })
|
|
6184
6176
|
]
|
|
6185
6177
|
}
|
|
6186
6178
|
) }),
|
|
6187
|
-
/* @__PURE__ */
|
|
6179
|
+
/* @__PURE__ */ jsx65(Popover.Content, { align: "end", className: "w-24 p-1", children: /* @__PURE__ */ jsx65("ul", { role: "listbox", className: "flex flex-col gap-0.5", children: perPageOptions.map((opt) => {
|
|
6188
6180
|
const selected = opt === perPage;
|
|
6189
|
-
return /* @__PURE__ */
|
|
6181
|
+
return /* @__PURE__ */ jsx65("li", { children: /* @__PURE__ */ jsxs43(
|
|
6190
6182
|
"button",
|
|
6191
6183
|
{
|
|
6192
6184
|
type: "button",
|
|
@@ -6202,7 +6194,7 @@ var DataTablePagination = forwardRef43(
|
|
|
6202
6194
|
),
|
|
6203
6195
|
children: [
|
|
6204
6196
|
opt,
|
|
6205
|
-
selected && /* @__PURE__ */
|
|
6197
|
+
selected && /* @__PURE__ */ jsx65(
|
|
6206
6198
|
Check5,
|
|
6207
6199
|
{
|
|
6208
6200
|
size: 12,
|
|
@@ -6217,7 +6209,7 @@ var DataTablePagination = forwardRef43(
|
|
|
6217
6209
|
] })
|
|
6218
6210
|
] }),
|
|
6219
6211
|
/* @__PURE__ */ jsxs43("ul", { className: "flex items-center gap-1", children: [
|
|
6220
|
-
/* @__PURE__ */
|
|
6212
|
+
/* @__PURE__ */ jsx65("li", { children: /* @__PURE__ */ jsx65(
|
|
6221
6213
|
"button",
|
|
6222
6214
|
{
|
|
6223
6215
|
type: "button",
|
|
@@ -6228,11 +6220,11 @@ var DataTablePagination = forwardRef43(
|
|
|
6228
6220
|
"inline-flex size-8 items-center justify-center rounded-v2-md border border-v2-border-default text-v2-fg-default transition-colors hover:bg-v2-bg-subtle",
|
|
6229
6221
|
"disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:bg-transparent"
|
|
6230
6222
|
),
|
|
6231
|
-
children: /* @__PURE__ */
|
|
6223
|
+
children: /* @__PURE__ */ jsx65(CaretLeft, { size: 14, weight: "bold", "aria-hidden": "true" })
|
|
6232
6224
|
}
|
|
6233
6225
|
) }),
|
|
6234
6226
|
pages.map(
|
|
6235
|
-
(p, idx) => p === "ellipsis" ? /* @__PURE__ */
|
|
6227
|
+
(p, idx) => p === "ellipsis" ? /* @__PURE__ */ jsx65(
|
|
6236
6228
|
"li",
|
|
6237
6229
|
{
|
|
6238
6230
|
"aria-hidden": "true",
|
|
@@ -6240,7 +6232,7 @@ var DataTablePagination = forwardRef43(
|
|
|
6240
6232
|
children: "\u2026"
|
|
6241
6233
|
},
|
|
6242
6234
|
`ellipsis-${idx}`
|
|
6243
|
-
) : /* @__PURE__ */
|
|
6235
|
+
) : /* @__PURE__ */ jsx65("li", { children: /* @__PURE__ */ jsx65(
|
|
6244
6236
|
"button",
|
|
6245
6237
|
{
|
|
6246
6238
|
type: "button",
|
|
@@ -6255,7 +6247,7 @@ var DataTablePagination = forwardRef43(
|
|
|
6255
6247
|
}
|
|
6256
6248
|
) }, p)
|
|
6257
6249
|
),
|
|
6258
|
-
/* @__PURE__ */
|
|
6250
|
+
/* @__PURE__ */ jsx65("li", { children: /* @__PURE__ */ jsx65(
|
|
6259
6251
|
"button",
|
|
6260
6252
|
{
|
|
6261
6253
|
type: "button",
|
|
@@ -6266,7 +6258,7 @@ var DataTablePagination = forwardRef43(
|
|
|
6266
6258
|
"inline-flex size-8 items-center justify-center rounded-v2-md border border-v2-border-default text-v2-fg-default transition-colors hover:bg-v2-bg-subtle",
|
|
6267
6259
|
"disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:bg-transparent"
|
|
6268
6260
|
),
|
|
6269
|
-
children: /* @__PURE__ */
|
|
6261
|
+
children: /* @__PURE__ */ jsx65(CaretRight2, { size: 14, weight: "bold", "aria-hidden": "true" })
|
|
6270
6262
|
}
|
|
6271
6263
|
) })
|
|
6272
6264
|
] })
|
|
@@ -6281,7 +6273,7 @@ DataTablePagination.displayName = "DataTablePagination";
|
|
|
6281
6273
|
// src/patterns/ReadOnlyDataView/ReadOnlyDataView.tsx
|
|
6282
6274
|
import { useState as useState19 } from "react";
|
|
6283
6275
|
import { CaretDown as CaretDown7, CaretUp as CaretUp2, CaretUpDown as CaretUpDown2 } from "@phosphor-icons/react";
|
|
6284
|
-
import { Fragment as Fragment9, jsx as
|
|
6276
|
+
import { Fragment as Fragment9, jsx as jsx66, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
6285
6277
|
function formatDate(value, format3) {
|
|
6286
6278
|
if (!value) return "\u2014";
|
|
6287
6279
|
const date = value instanceof Date ? value : new Date(String(value));
|
|
@@ -6336,18 +6328,18 @@ function ReadOnlyDataView({
|
|
|
6336
6328
|
};
|
|
6337
6329
|
const hasTriggerColumn = (column) => column.type !== "action" && Boolean(detailsDialogs == null ? void 0 : detailsDialogs.some((d) => d.triggerColumn === column.key));
|
|
6338
6330
|
return /* @__PURE__ */ jsxs44(Fragment9, { children: [
|
|
6339
|
-
/* @__PURE__ */
|
|
6331
|
+
/* @__PURE__ */ jsx66(
|
|
6340
6332
|
Card,
|
|
6341
6333
|
{
|
|
6342
6334
|
padding: "none",
|
|
6343
6335
|
variant: "default",
|
|
6344
6336
|
className: cn("overflow-hidden", className),
|
|
6345
|
-
children: /* @__PURE__ */
|
|
6346
|
-
caption && /* @__PURE__ */
|
|
6347
|
-
/* @__PURE__ */
|
|
6337
|
+
children: /* @__PURE__ */ jsx66("div", { className: "overflow-x-auto", children: /* @__PURE__ */ jsxs44("table", { className: "w-full border-collapse", children: [
|
|
6338
|
+
caption && /* @__PURE__ */ jsx66("caption", { className: "sr-only", children: caption }),
|
|
6339
|
+
/* @__PURE__ */ jsx66("thead", { className: "bg-v2-bg-subtle", children: /* @__PURE__ */ jsx66("tr", { children: columns.map((column) => {
|
|
6348
6340
|
const isSortable = column.type !== "action" && Boolean(column.sortable);
|
|
6349
6341
|
const isSorted = column.type !== "action" && (sortValue == null ? void 0 : sortValue.column) === column.key;
|
|
6350
|
-
return /* @__PURE__ */
|
|
6342
|
+
return /* @__PURE__ */ jsx66(
|
|
6351
6343
|
"th",
|
|
6352
6344
|
{
|
|
6353
6345
|
scope: "col",
|
|
@@ -6367,21 +6359,21 @@ function ReadOnlyDataView({
|
|
|
6367
6359
|
className: "inline-flex items-center gap-1 text-v2-fg-muted hover:text-v2-fg-default focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-v2-focus-ring/30 motion-reduce:transition-none",
|
|
6368
6360
|
children: [
|
|
6369
6361
|
column.label,
|
|
6370
|
-
isSorted ? (sortValue == null ? void 0 : sortValue.direction) === "asc" ? /* @__PURE__ */
|
|
6362
|
+
isSorted ? (sortValue == null ? void 0 : sortValue.direction) === "asc" ? /* @__PURE__ */ jsx66(
|
|
6371
6363
|
CaretUp2,
|
|
6372
6364
|
{
|
|
6373
6365
|
size: 12,
|
|
6374
6366
|
weight: "bold",
|
|
6375
6367
|
"aria-hidden": "true"
|
|
6376
6368
|
}
|
|
6377
|
-
) : /* @__PURE__ */
|
|
6369
|
+
) : /* @__PURE__ */ jsx66(
|
|
6378
6370
|
CaretDown7,
|
|
6379
6371
|
{
|
|
6380
6372
|
size: 12,
|
|
6381
6373
|
weight: "bold",
|
|
6382
6374
|
"aria-hidden": "true"
|
|
6383
6375
|
}
|
|
6384
|
-
) : /* @__PURE__ */
|
|
6376
|
+
) : /* @__PURE__ */ jsx66(CaretUpDown2, { size: 12, "aria-hidden": "true" })
|
|
6385
6377
|
]
|
|
6386
6378
|
}
|
|
6387
6379
|
) : column.label
|
|
@@ -6389,27 +6381,27 @@ function ReadOnlyDataView({
|
|
|
6389
6381
|
column.key ?? column.label
|
|
6390
6382
|
);
|
|
6391
6383
|
}) }) }),
|
|
6392
|
-
/* @__PURE__ */
|
|
6384
|
+
/* @__PURE__ */ jsx66("tbody", { children: loading ? Array.from({ length: loadingRows }).map((_, i) => /* @__PURE__ */ jsx66(
|
|
6393
6385
|
"tr",
|
|
6394
6386
|
{
|
|
6395
6387
|
className: "border-t border-v2-border-subtle",
|
|
6396
|
-
children: columns.map((column) => /* @__PURE__ */
|
|
6388
|
+
children: columns.map((column) => /* @__PURE__ */ jsx66(
|
|
6397
6389
|
"td",
|
|
6398
6390
|
{
|
|
6399
6391
|
className: cn(cellPadding),
|
|
6400
|
-
children: /* @__PURE__ */
|
|
6392
|
+
children: /* @__PURE__ */ jsx66(Skeleton, { shape: "text", style: { width: "80%" } })
|
|
6401
6393
|
},
|
|
6402
6394
|
column.key ?? column.label
|
|
6403
6395
|
))
|
|
6404
6396
|
},
|
|
6405
6397
|
`skeleton-${i}`
|
|
6406
|
-
)) : list.length === 0 ? /* @__PURE__ */
|
|
6398
|
+
)) : list.length === 0 ? /* @__PURE__ */ jsx66("tr", { children: /* @__PURE__ */ jsx66("td", { colSpan: columns.length, className: "p-0", children: /* @__PURE__ */ jsx66("div", { className: "flex flex-col items-center justify-center gap-2 p-8 text-center", children: emptyState ?? /* @__PURE__ */ jsx66(Text, { size: "sm", color: "muted", children: "Nenhum registro encontrado" }) }) }) }) : list.map((row, rowIndex) => /* @__PURE__ */ jsx66(
|
|
6407
6399
|
"tr",
|
|
6408
6400
|
{
|
|
6409
6401
|
className: "border-t border-v2-border-subtle hover:bg-v2-bg-subtle motion-reduce:transition-none",
|
|
6410
6402
|
children: columns.map((column) => {
|
|
6411
6403
|
const clickable = hasTriggerColumn(column);
|
|
6412
|
-
return /* @__PURE__ */
|
|
6404
|
+
return /* @__PURE__ */ jsx66(
|
|
6413
6405
|
"td",
|
|
6414
6406
|
{
|
|
6415
6407
|
className: cn(
|
|
@@ -6434,7 +6426,7 @@ function ReadOnlyDataView({
|
|
|
6434
6426
|
] }) })
|
|
6435
6427
|
}
|
|
6436
6428
|
),
|
|
6437
|
-
activeDialog && /* @__PURE__ */
|
|
6429
|
+
activeDialog && /* @__PURE__ */ jsx66(
|
|
6438
6430
|
DialogRoot,
|
|
6439
6431
|
{
|
|
6440
6432
|
open: true,
|
|
@@ -6447,8 +6439,8 @@ function ReadOnlyDataView({
|
|
|
6447
6439
|
size: activeDialog.dialog.size ?? "md",
|
|
6448
6440
|
"aria-describedby": void 0,
|
|
6449
6441
|
children: [
|
|
6450
|
-
/* @__PURE__ */
|
|
6451
|
-
/* @__PURE__ */
|
|
6442
|
+
/* @__PURE__ */ jsx66(DialogRoot.Header, { children: /* @__PURE__ */ jsx66(DialogRoot.Title, { children: activeDialog.dialog.title }) }),
|
|
6443
|
+
/* @__PURE__ */ jsx66(DialogRoot.Body, { children: activeDialog.details !== null ? activeDialog.dialog.renderDetails(activeDialog.details) : null })
|
|
6452
6444
|
]
|
|
6453
6445
|
}
|
|
6454
6446
|
)
|
|
@@ -6471,7 +6463,7 @@ function renderCell(column, row) {
|
|
|
6471
6463
|
const value = String(raw);
|
|
6472
6464
|
const variant = column.variantMap[value] ?? "default";
|
|
6473
6465
|
const display = ((_a = column.labelMap) == null ? void 0 : _a[value]) ?? value;
|
|
6474
|
-
return /* @__PURE__ */
|
|
6466
|
+
return /* @__PURE__ */ jsx66(Badge, { variant, children: display });
|
|
6475
6467
|
}
|
|
6476
6468
|
if (column.type === "date") {
|
|
6477
6469
|
return formatDate(raw, column.format);
|
|
@@ -6485,7 +6477,7 @@ function renderCell(column, row) {
|
|
|
6485
6477
|
// src/patterns/NotificationCenter/NotificationCenter.tsx
|
|
6486
6478
|
import { forwardRef as forwardRef44, useState as useState20 } from "react";
|
|
6487
6479
|
import { Bell } from "@phosphor-icons/react";
|
|
6488
|
-
import { jsx as
|
|
6480
|
+
import { jsx as jsx67, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
6489
6481
|
var severityDotClass = {
|
|
6490
6482
|
info: "bg-v2-info-500",
|
|
6491
6483
|
success: "bg-v2-success-500",
|
|
@@ -6522,7 +6514,7 @@ var NotificationCenter = forwardRef44(
|
|
|
6522
6514
|
const relativeTimeFn = relativeTime ?? defaultRelativeTime;
|
|
6523
6515
|
const filteredNotifs = filter === "unread" ? notifications.filter((n) => !n.read) : notifications;
|
|
6524
6516
|
return /* @__PURE__ */ jsxs45(Popover, { children: [
|
|
6525
|
-
/* @__PURE__ */
|
|
6517
|
+
/* @__PURE__ */ jsx67(Popover.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs45(
|
|
6526
6518
|
"button",
|
|
6527
6519
|
{
|
|
6528
6520
|
ref,
|
|
@@ -6530,15 +6522,15 @@ var NotificationCenter = forwardRef44(
|
|
|
6530
6522
|
"aria-label": `${triggerAriaLabel}${unreadCount > 0 ? ` (${unreadCount} n\xE3o lidas)` : ""}`,
|
|
6531
6523
|
className: "relative inline-flex size-9 items-center justify-center rounded-v2-pill border border-v2-border-default bg-v2-panel text-v2-fg-default transition-colors hover:bg-v2-bg-subtle",
|
|
6532
6524
|
children: [
|
|
6533
|
-
/* @__PURE__ */
|
|
6534
|
-
unreadCount > 0 && /* @__PURE__ */
|
|
6525
|
+
/* @__PURE__ */ jsx67(Bell, { size: 18, "aria-hidden": "true" }),
|
|
6526
|
+
unreadCount > 0 && /* @__PURE__ */ jsx67("span", { className: "absolute -right-0.5 -top-0.5 inline-flex min-w-4 items-center justify-center rounded-v2-pill bg-v2-danger-500 px-1 text-v2-xs font-bold text-v2-action-on-primary", children: unreadCount > 99 ? "99+" : unreadCount })
|
|
6535
6527
|
]
|
|
6536
6528
|
}
|
|
6537
6529
|
) }),
|
|
6538
|
-
/* @__PURE__ */
|
|
6530
|
+
/* @__PURE__ */ jsx67(Popover.Content, { size: "auto", align: "end", className: "p-0", children: /* @__PURE__ */ jsxs45("div", { className: "flex w-[min(360px,calc(100vw-2rem))] flex-col", children: [
|
|
6539
6531
|
/* @__PURE__ */ jsxs45("div", { className: "flex items-center justify-between border-b border-v2-border-default px-4 py-3", children: [
|
|
6540
|
-
/* @__PURE__ */
|
|
6541
|
-
unreadCount > 0 && onMarkAllRead && /* @__PURE__ */
|
|
6532
|
+
/* @__PURE__ */ jsx67(Heading, { level: 3, size: "sm", children: "Notifica\xE7\xF5es" }),
|
|
6533
|
+
unreadCount > 0 && onMarkAllRead && /* @__PURE__ */ jsx67(Button, { variant: "secondary", size: "sm", onClick: onMarkAllRead, children: "Marcar todas como lidas" })
|
|
6542
6534
|
] }),
|
|
6543
6535
|
/* @__PURE__ */ jsxs45(
|
|
6544
6536
|
"div",
|
|
@@ -6585,13 +6577,13 @@ var NotificationCenter = forwardRef44(
|
|
|
6585
6577
|
]
|
|
6586
6578
|
}
|
|
6587
6579
|
),
|
|
6588
|
-
/* @__PURE__ */
|
|
6580
|
+
/* @__PURE__ */ jsx67(
|
|
6589
6581
|
"ul",
|
|
6590
6582
|
{
|
|
6591
6583
|
role: "status",
|
|
6592
6584
|
"aria-live": "polite",
|
|
6593
6585
|
className: "max-h-[400px] overflow-y-auto",
|
|
6594
|
-
children: filteredNotifs.length === 0 ? /* @__PURE__ */
|
|
6586
|
+
children: filteredNotifs.length === 0 ? /* @__PURE__ */ jsx67("li", { className: "px-4 py-6 text-center", children: /* @__PURE__ */ jsx67(Text, { size: "sm", color: "muted", children: emptyMessage }) }) : filteredNotifs.map((n) => /* @__PURE__ */ jsx67("li", { children: /* @__PURE__ */ jsxs45(
|
|
6595
6587
|
"button",
|
|
6596
6588
|
{
|
|
6597
6589
|
type: "button",
|
|
@@ -6601,7 +6593,7 @@ var NotificationCenter = forwardRef44(
|
|
|
6601
6593
|
!n.read && "bg-v2-brand-bg-soft/30"
|
|
6602
6594
|
),
|
|
6603
6595
|
children: [
|
|
6604
|
-
/* @__PURE__ */
|
|
6596
|
+
/* @__PURE__ */ jsx67(
|
|
6605
6597
|
"span",
|
|
6606
6598
|
{
|
|
6607
6599
|
"aria-hidden": "true",
|
|
@@ -6612,11 +6604,11 @@ var NotificationCenter = forwardRef44(
|
|
|
6612
6604
|
}
|
|
6613
6605
|
),
|
|
6614
6606
|
/* @__PURE__ */ jsxs45("div", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
|
|
6615
|
-
/* @__PURE__ */
|
|
6616
|
-
n.description && /* @__PURE__ */
|
|
6617
|
-
/* @__PURE__ */
|
|
6607
|
+
/* @__PURE__ */ jsx67(Text, { size: "sm", weight: "semibold", children: n.title }),
|
|
6608
|
+
n.description && /* @__PURE__ */ jsx67(Text, { size: "xs", color: "muted", children: n.description }),
|
|
6609
|
+
/* @__PURE__ */ jsx67(Text, { size: "xs", color: "subtle", children: relativeTimeFn(n.timestamp) })
|
|
6618
6610
|
] }),
|
|
6619
|
-
!n.read && /* @__PURE__ */
|
|
6611
|
+
!n.read && /* @__PURE__ */ jsx67(
|
|
6620
6612
|
"span",
|
|
6621
6613
|
{
|
|
6622
6614
|
"aria-label": "N\xE3o lida",
|
|
@@ -6637,7 +6629,7 @@ NotificationCenter.displayName = "NotificationCenter";
|
|
|
6637
6629
|
// src/patterns/NavigatorTile/NavigatorTile.tsx
|
|
6638
6630
|
import { forwardRef as forwardRef45 } from "react";
|
|
6639
6631
|
import { CaretRight as CaretRight3 } from "@phosphor-icons/react";
|
|
6640
|
-
import { Fragment as Fragment10, jsx as
|
|
6632
|
+
import { Fragment as Fragment10, jsx as jsx68, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
6641
6633
|
var NavigatorTile = forwardRef45(
|
|
6642
6634
|
({
|
|
6643
6635
|
icon,
|
|
@@ -6650,7 +6642,7 @@ var NavigatorTile = forwardRef45(
|
|
|
6650
6642
|
className,
|
|
6651
6643
|
children,
|
|
6652
6644
|
...props
|
|
6653
|
-
}, ref) => /* @__PURE__ */
|
|
6645
|
+
}, ref) => /* @__PURE__ */ jsx68(
|
|
6654
6646
|
Card,
|
|
6655
6647
|
{
|
|
6656
6648
|
ref,
|
|
@@ -6666,14 +6658,14 @@ var NavigatorTile = forwardRef45(
|
|
|
6666
6658
|
...props,
|
|
6667
6659
|
children: asChild ? children : /* @__PURE__ */ jsxs46(Fragment10, { children: [
|
|
6668
6660
|
/* @__PURE__ */ jsxs46("div", { className: "flex items-start justify-between gap-3", children: [
|
|
6669
|
-
icon && /* @__PURE__ */
|
|
6670
|
-
badge && /* @__PURE__ */
|
|
6661
|
+
icon && /* @__PURE__ */ jsx68("span", { className: "inline-flex size-10 shrink-0 items-center justify-center rounded-v2-pill bg-v2-brand-bg-soft text-v2-brand-text-dark", children: icon }),
|
|
6662
|
+
badge && /* @__PURE__ */ jsx68("span", { className: "shrink-0", children: badge })
|
|
6671
6663
|
] }),
|
|
6672
6664
|
/* @__PURE__ */ jsxs46("div", { className: "flex flex-col gap-1", children: [
|
|
6673
|
-
/* @__PURE__ */
|
|
6674
|
-
description && /* @__PURE__ */
|
|
6665
|
+
/* @__PURE__ */ jsx68(Heading, { level: 3, size: "xs", children: title }),
|
|
6666
|
+
description && /* @__PURE__ */ jsx68(Text, { size: "sm", color: "muted", children: description })
|
|
6675
6667
|
] }),
|
|
6676
|
-
showChevron && /* @__PURE__ */
|
|
6668
|
+
showChevron && /* @__PURE__ */ jsx68("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx68(
|
|
6677
6669
|
CaretRight3,
|
|
6678
6670
|
{
|
|
6679
6671
|
size: 16,
|
|
@@ -6696,7 +6688,7 @@ var columnClass = {
|
|
|
6696
6688
|
var NavigatorTileGrid = forwardRef45(
|
|
6697
6689
|
({ columns = 3, emptyState, isEmpty = false, className, children, ...props }, ref) => {
|
|
6698
6690
|
if (isEmpty && emptyState) {
|
|
6699
|
-
return /* @__PURE__ */
|
|
6691
|
+
return /* @__PURE__ */ jsx68(
|
|
6700
6692
|
"div",
|
|
6701
6693
|
{
|
|
6702
6694
|
ref,
|
|
@@ -6709,7 +6701,7 @@ var NavigatorTileGrid = forwardRef45(
|
|
|
6709
6701
|
}
|
|
6710
6702
|
);
|
|
6711
6703
|
}
|
|
6712
|
-
return /* @__PURE__ */
|
|
6704
|
+
return /* @__PURE__ */ jsx68(
|
|
6713
6705
|
"div",
|
|
6714
6706
|
{
|
|
6715
6707
|
ref,
|
|
@@ -6724,7 +6716,7 @@ NavigatorTileGrid.displayName = "NavigatorTileGrid";
|
|
|
6724
6716
|
|
|
6725
6717
|
// src/patterns/PublicPageLayout/PublicPageLayout.tsx
|
|
6726
6718
|
import { forwardRef as forwardRef46 } from "react";
|
|
6727
|
-
import { jsx as
|
|
6719
|
+
import { jsx as jsx69, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
6728
6720
|
var maxWidthClass = {
|
|
6729
6721
|
sm: "max-w-md",
|
|
6730
6722
|
md: "max-w-2xl",
|
|
@@ -6753,7 +6745,7 @@ var PublicPageLayout = forwardRef46(
|
|
|
6753
6745
|
),
|
|
6754
6746
|
...props,
|
|
6755
6747
|
children: [
|
|
6756
|
-
/* @__PURE__ */
|
|
6748
|
+
/* @__PURE__ */ jsx69(
|
|
6757
6749
|
"a",
|
|
6758
6750
|
{
|
|
6759
6751
|
href: `#${mainId}`,
|
|
@@ -6761,21 +6753,21 @@ var PublicPageLayout = forwardRef46(
|
|
|
6761
6753
|
children: skipToMainLabel
|
|
6762
6754
|
}
|
|
6763
6755
|
),
|
|
6764
|
-
header && /* @__PURE__ */
|
|
6756
|
+
header && /* @__PURE__ */ jsx69("header", { className: "border-b border-v2-border-default bg-v2-panel", children: /* @__PURE__ */ jsx69(
|
|
6765
6757
|
"div",
|
|
6766
6758
|
{
|
|
6767
6759
|
className: cn("mx-auto w-full px-6 py-4", maxWidthClass[maxWidth]),
|
|
6768
6760
|
children: header
|
|
6769
6761
|
}
|
|
6770
6762
|
) }),
|
|
6771
|
-
/* @__PURE__ */
|
|
6763
|
+
/* @__PURE__ */ jsx69("main", { id: mainId, className: "flex-1", children: /* @__PURE__ */ jsx69(
|
|
6772
6764
|
"div",
|
|
6773
6765
|
{
|
|
6774
6766
|
className: cn("mx-auto w-full px-6 py-8", maxWidthClass[maxWidth]),
|
|
6775
6767
|
children
|
|
6776
6768
|
}
|
|
6777
6769
|
) }),
|
|
6778
|
-
footer && /* @__PURE__ */
|
|
6770
|
+
footer && /* @__PURE__ */ jsx69("footer", { className: "border-t border-v2-border-default bg-v2-panel", children: /* @__PURE__ */ jsx69(
|
|
6779
6771
|
"div",
|
|
6780
6772
|
{
|
|
6781
6773
|
className: cn("mx-auto w-full px-6 py-4", maxWidthClass[maxWidth]),
|
|
@@ -6791,30 +6783,30 @@ PublicPageLayout.displayName = "PublicPageLayout";
|
|
|
6791
6783
|
// src/patterns/ErrorPageLayout/ErrorPageLayout.tsx
|
|
6792
6784
|
import { forwardRef as forwardRef47 } from "react";
|
|
6793
6785
|
import { ArrowLeft } from "@phosphor-icons/react";
|
|
6794
|
-
import { jsx as
|
|
6786
|
+
import { jsx as jsx70, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
6795
6787
|
function isHrefAction(action) {
|
|
6796
6788
|
return Boolean(action && "href" in action);
|
|
6797
6789
|
}
|
|
6798
6790
|
var ErrorPageLayout = forwardRef47(
|
|
6799
|
-
({ code, title, description, primaryAction, illustration, ...layoutProps }, ref) => /* @__PURE__ */
|
|
6800
|
-
code && /* @__PURE__ */
|
|
6791
|
+
({ code, title, description, primaryAction, illustration, ...layoutProps }, ref) => /* @__PURE__ */ jsx70(PublicPageLayout, { ref, ...layoutProps, children: /* @__PURE__ */ jsxs48("div", { className: "flex flex-col items-center justify-center gap-6 py-12 text-center", children: [
|
|
6792
|
+
code && /* @__PURE__ */ jsx70("div", { className: "text-v2-6xl font-bold leading-none text-v2-action-primary", children: code }),
|
|
6801
6793
|
illustration,
|
|
6802
6794
|
/* @__PURE__ */ jsxs48("div", { className: "flex flex-col gap-2", children: [
|
|
6803
|
-
/* @__PURE__ */
|
|
6804
|
-
description && /* @__PURE__ */
|
|
6795
|
+
/* @__PURE__ */ jsx70(Heading, { level: 1, size: "xl", children: title }),
|
|
6796
|
+
description && /* @__PURE__ */ jsx70(Text, { size: "base", color: "muted", className: "max-w-md", children: description })
|
|
6805
6797
|
] }),
|
|
6806
|
-
primaryAction && (isHrefAction(primaryAction) ? /* @__PURE__ */
|
|
6798
|
+
primaryAction && (isHrefAction(primaryAction) ? /* @__PURE__ */ jsx70(
|
|
6807
6799
|
Button,
|
|
6808
6800
|
{
|
|
6809
6801
|
asChild: true,
|
|
6810
|
-
leftIcon: /* @__PURE__ */
|
|
6811
|
-
children: /* @__PURE__ */
|
|
6802
|
+
leftIcon: /* @__PURE__ */ jsx70(ArrowLeft, { size: 16, weight: "bold", "aria-hidden": "true" }),
|
|
6803
|
+
children: /* @__PURE__ */ jsx70("a", { href: primaryAction.href, children: primaryAction.label })
|
|
6812
6804
|
}
|
|
6813
|
-
) : /* @__PURE__ */
|
|
6805
|
+
) : /* @__PURE__ */ jsx70(
|
|
6814
6806
|
Button,
|
|
6815
6807
|
{
|
|
6816
6808
|
onClick: primaryAction.onClick,
|
|
6817
|
-
leftIcon: /* @__PURE__ */
|
|
6809
|
+
leftIcon: /* @__PURE__ */ jsx70(ArrowLeft, { size: 16, weight: "bold", "aria-hidden": "true" }),
|
|
6818
6810
|
children: primaryAction.label
|
|
6819
6811
|
}
|
|
6820
6812
|
))
|
|
@@ -6824,7 +6816,7 @@ ErrorPageLayout.displayName = "ErrorPageLayout";
|
|
|
6824
6816
|
|
|
6825
6817
|
// src/patterns/TutorialCard/TutorialCard.tsx
|
|
6826
6818
|
import { forwardRef as forwardRef48 } from "react";
|
|
6827
|
-
import { Fragment as Fragment11, jsx as
|
|
6819
|
+
import { Fragment as Fragment11, jsx as jsx71, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
6828
6820
|
var TutorialCard = forwardRef48(
|
|
6829
6821
|
({
|
|
6830
6822
|
title,
|
|
@@ -6836,7 +6828,7 @@ var TutorialCard = forwardRef48(
|
|
|
6836
6828
|
className,
|
|
6837
6829
|
children,
|
|
6838
6830
|
...props
|
|
6839
|
-
}, ref) => /* @__PURE__ */
|
|
6831
|
+
}, ref) => /* @__PURE__ */ jsx71(
|
|
6840
6832
|
Card,
|
|
6841
6833
|
{
|
|
6842
6834
|
ref,
|
|
@@ -6848,12 +6840,12 @@ var TutorialCard = forwardRef48(
|
|
|
6848
6840
|
children: asChild ? children : /* @__PURE__ */ jsxs49(Fragment11, { children: [
|
|
6849
6841
|
media && /* @__PURE__ */ jsxs49("div", { className: "relative aspect-video w-full overflow-hidden bg-v2-bg-subtle", children: [
|
|
6850
6842
|
media,
|
|
6851
|
-
category && /* @__PURE__ */
|
|
6843
|
+
category && /* @__PURE__ */ jsx71("div", { className: "absolute left-3 top-3", children: /* @__PURE__ */ jsx71(Badge, { variant: "default", size: "sm", children: category }) })
|
|
6852
6844
|
] }),
|
|
6853
6845
|
/* @__PURE__ */ jsxs49("div", { className: "flex flex-1 flex-col gap-2 p-4", children: [
|
|
6854
|
-
/* @__PURE__ */
|
|
6855
|
-
description && /* @__PURE__ */
|
|
6856
|
-
duration && /* @__PURE__ */
|
|
6846
|
+
/* @__PURE__ */ jsx71(Heading, { level: 3, size: "sm", children: title }),
|
|
6847
|
+
description && /* @__PURE__ */ jsx71(Text, { size: "sm", color: "muted", children: description }),
|
|
6848
|
+
duration && /* @__PURE__ */ jsx71("div", { className: "mt-auto pt-2", children: /* @__PURE__ */ jsx71(Badge, { variant: "info", size: "sm", children: duration }) })
|
|
6857
6849
|
] })
|
|
6858
6850
|
] })
|
|
6859
6851
|
}
|
|
@@ -6863,7 +6855,7 @@ TutorialCard.displayName = "TutorialCard";
|
|
|
6863
6855
|
|
|
6864
6856
|
// src/patterns/KpiCard/KpiCard.tsx
|
|
6865
6857
|
import { forwardRef as forwardRef49 } from "react";
|
|
6866
|
-
import { jsx as
|
|
6858
|
+
import { jsx as jsx72, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
6867
6859
|
var variantAccent = {
|
|
6868
6860
|
neutral: "",
|
|
6869
6861
|
success: "border-l-4 border-l-v2-success-500",
|
|
@@ -6882,11 +6874,11 @@ var KpiCard = forwardRef49(
|
|
|
6882
6874
|
...props,
|
|
6883
6875
|
children: [
|
|
6884
6876
|
/* @__PURE__ */ jsxs50("div", { className: "flex items-start justify-between gap-2", children: [
|
|
6885
|
-
/* @__PURE__ */
|
|
6886
|
-
icon && /* @__PURE__ */
|
|
6877
|
+
/* @__PURE__ */ jsx72(Heading, { level: 2, size: "sm", children: label }),
|
|
6878
|
+
icon && /* @__PURE__ */ jsx72("span", { "aria-hidden": "true", children: icon })
|
|
6887
6879
|
] }),
|
|
6888
|
-
/* @__PURE__ */
|
|
6889
|
-
sublabel && /* @__PURE__ */
|
|
6880
|
+
/* @__PURE__ */ jsx72(Text, { size: "lg", weight: "semibold", className: "mt-2", children: value }),
|
|
6881
|
+
sublabel && /* @__PURE__ */ jsx72(Text, { size: "sm", color: "muted", children: sublabel })
|
|
6890
6882
|
]
|
|
6891
6883
|
}
|
|
6892
6884
|
)
|
|
@@ -6897,7 +6889,7 @@ KpiCard.displayName = "KpiCard";
|
|
|
6897
6889
|
import { useEffect as useEffect12, useRef as useRef10, useState as useState21 } from "react";
|
|
6898
6890
|
import { createPortal } from "react-dom";
|
|
6899
6891
|
import { MagnifyingGlass as MagnifyingGlass3 } from "@phosphor-icons/react";
|
|
6900
|
-
import { Fragment as Fragment12, jsx as
|
|
6892
|
+
import { Fragment as Fragment12, jsx as jsx73, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
6901
6893
|
function CommandPalette({
|
|
6902
6894
|
open,
|
|
6903
6895
|
onOpenChange,
|
|
@@ -6978,7 +6970,7 @@ function CommandPalette({
|
|
|
6978
6970
|
"aria-label": ariaLabel,
|
|
6979
6971
|
className: "fixed inset-0 z-50 flex items-start justify-center p-4 pt-[10vh]",
|
|
6980
6972
|
children: [
|
|
6981
|
-
/* @__PURE__ */
|
|
6973
|
+
/* @__PURE__ */ jsx73(
|
|
6982
6974
|
"button",
|
|
6983
6975
|
{
|
|
6984
6976
|
type: "button",
|
|
@@ -6989,7 +6981,7 @@ function CommandPalette({
|
|
|
6989
6981
|
),
|
|
6990
6982
|
/* @__PURE__ */ jsxs51("div", { className: "relative z-10 flex w-full max-w-2xl flex-col overflow-hidden rounded-v2-lg border border-v2-border-default bg-v2-panel shadow-xl", children: [
|
|
6991
6983
|
/* @__PURE__ */ jsxs51("div", { className: "flex items-center gap-3 border-b border-v2-border-default px-4 py-3", children: [
|
|
6992
|
-
/* @__PURE__ */
|
|
6984
|
+
/* @__PURE__ */ jsx73(
|
|
6993
6985
|
MagnifyingGlass3,
|
|
6994
6986
|
{
|
|
6995
6987
|
size: 18,
|
|
@@ -6997,7 +6989,7 @@ function CommandPalette({
|
|
|
6997
6989
|
className: "text-v2-fg-muted"
|
|
6998
6990
|
}
|
|
6999
6991
|
),
|
|
7000
|
-
/* @__PURE__ */
|
|
6992
|
+
/* @__PURE__ */ jsx73(
|
|
7001
6993
|
"input",
|
|
7002
6994
|
{
|
|
7003
6995
|
ref: inputRef,
|
|
@@ -7017,24 +7009,24 @@ function CommandPalette({
|
|
|
7017
7009
|
className: "flex-1 bg-transparent text-v2-base font-medium text-v2-fg-default placeholder:font-normal placeholder:text-v2-fg-subtle focus:outline-none"
|
|
7018
7010
|
}
|
|
7019
7011
|
),
|
|
7020
|
-
/* @__PURE__ */
|
|
7012
|
+
/* @__PURE__ */ jsx73("kbd", { className: "hidden rounded-v2-sm border border-v2-border-default px-1.5 py-0.5 text-v2-xs font-semibold text-v2-fg-muted md:inline-block", children: "ESC" })
|
|
7021
7013
|
] }),
|
|
7022
|
-
/* @__PURE__ */
|
|
7014
|
+
/* @__PURE__ */ jsx73(
|
|
7023
7015
|
"div",
|
|
7024
7016
|
{
|
|
7025
7017
|
id: "command-palette-listbox",
|
|
7026
7018
|
role: "listbox",
|
|
7027
7019
|
className: "max-h-[60vh] overflow-y-auto",
|
|
7028
|
-
children: filteredGroups.length === 0 ? /* @__PURE__ */
|
|
7020
|
+
children: filteredGroups.length === 0 ? /* @__PURE__ */ jsx73("p", { className: "px-4 py-3 text-v2-sm text-v2-fg-muted", children: emptyMessage }) : filteredGroups.map((group) => /* @__PURE__ */ jsxs51(
|
|
7029
7021
|
"section",
|
|
7030
7022
|
{
|
|
7031
7023
|
"aria-label": group.label,
|
|
7032
7024
|
className: "border-b border-v2-border-default last:border-b-0",
|
|
7033
7025
|
children: [
|
|
7034
|
-
group.label && /* @__PURE__ */
|
|
7035
|
-
group.loading ? /* @__PURE__ */
|
|
7026
|
+
group.label && /* @__PURE__ */ jsx73("h3", { className: "px-4 pb-1 pt-3 text-v2-xs font-semibold uppercase tracking-wider text-v2-fg-muted", children: group.label }),
|
|
7027
|
+
group.loading ? /* @__PURE__ */ jsx73("p", { className: "px-4 py-2 text-v2-xs text-v2-fg-muted", children: "Buscando\u2026" }) : group.items.length === 0 ? /* @__PURE__ */ jsx73("p", { className: "px-4 py-2 text-v2-xs text-v2-fg-muted", children: group.emptyMessage ?? emptyMessage }) : /* @__PURE__ */ jsx73("ul", { children: group.items.map((item) => {
|
|
7036
7028
|
const isHighlighted = highlightedId === item.id;
|
|
7037
|
-
return /* @__PURE__ */
|
|
7029
|
+
return /* @__PURE__ */ jsx73(
|
|
7038
7030
|
"li",
|
|
7039
7031
|
{
|
|
7040
7032
|
id: `command-palette-option-${item.id}`,
|
|
@@ -7049,8 +7041,8 @@ function CommandPalette({
|
|
|
7049
7041
|
),
|
|
7050
7042
|
children: renderItem ? renderItem(item, isHighlighted) : /* @__PURE__ */ jsxs51(Fragment12, { children: [
|
|
7051
7043
|
/* @__PURE__ */ jsxs51("div", { className: "flex min-w-0 flex-1 flex-col", children: [
|
|
7052
|
-
/* @__PURE__ */
|
|
7053
|
-
item.description && /* @__PURE__ */
|
|
7044
|
+
/* @__PURE__ */ jsx73("span", { className: "truncate font-medium", children: item.label }),
|
|
7045
|
+
item.description && /* @__PURE__ */ jsx73(
|
|
7054
7046
|
"span",
|
|
7055
7047
|
{
|
|
7056
7048
|
className: cn(
|
|
@@ -7061,7 +7053,7 @@ function CommandPalette({
|
|
|
7061
7053
|
}
|
|
7062
7054
|
)
|
|
7063
7055
|
] }),
|
|
7064
|
-
item.meta && /* @__PURE__ */
|
|
7056
|
+
item.meta && /* @__PURE__ */ jsx73(
|
|
7065
7057
|
"span",
|
|
7066
7058
|
{
|
|
7067
7059
|
className: cn(
|
|
@@ -7071,7 +7063,7 @@ function CommandPalette({
|
|
|
7071
7063
|
children: item.meta
|
|
7072
7064
|
}
|
|
7073
7065
|
),
|
|
7074
|
-
item.shortcut && /* @__PURE__ */
|
|
7066
|
+
item.shortcut && /* @__PURE__ */ jsx73("kbd", { className: "ml-2 inline-flex rounded-v2-sm border border-v2-border-default px-1.5 py-0.5 text-v2-xs font-semibold text-v2-fg-muted", children: item.shortcut })
|
|
7075
7067
|
] })
|
|
7076
7068
|
},
|
|
7077
7069
|
item.id
|
|
@@ -7093,7 +7085,7 @@ function CommandPalette({
|
|
|
7093
7085
|
|
|
7094
7086
|
// src/patterns/ChartTimeSeries/ChartTimeSeries.tsx
|
|
7095
7087
|
import { forwardRef as forwardRef50, useId as useId16, useState as useState22 } from "react";
|
|
7096
|
-
import { Fragment as Fragment13, jsx as
|
|
7088
|
+
import { Fragment as Fragment13, jsx as jsx74, jsxs as jsxs52 } from "react/jsx-runtime";
|
|
7097
7089
|
var DEFAULT_RANGES = ["3m", "6m", "12m", "YTD"];
|
|
7098
7090
|
var DEFAULT_EMPTY_MESSAGE = "Sem dados no per\xEDodo.";
|
|
7099
7091
|
function buildChartPaths(data) {
|
|
@@ -7171,12 +7163,12 @@ var ChartTimeSeries = forwardRef50(
|
|
|
7171
7163
|
children: [
|
|
7172
7164
|
/* @__PURE__ */ jsxs52("div", { className: "flex items-start justify-between gap-3", children: [
|
|
7173
7165
|
/* @__PURE__ */ jsxs52("div", { className: "flex flex-col", children: [
|
|
7174
|
-
/* @__PURE__ */
|
|
7175
|
-
subtitle && /* @__PURE__ */
|
|
7166
|
+
/* @__PURE__ */ jsx74("h3", { className: "text-v2-sm font-bold text-v2-fg-default", children: title }),
|
|
7167
|
+
subtitle && /* @__PURE__ */ jsx74("span", { className: "text-v2-xs text-v2-fg-muted", children: subtitle })
|
|
7176
7168
|
] }),
|
|
7177
|
-
/* @__PURE__ */
|
|
7169
|
+
/* @__PURE__ */ jsx74("div", { role: "tablist", className: "flex items-center gap-1", children: ranges.map((r) => {
|
|
7178
7170
|
const isActive2 = r === activeRange;
|
|
7179
|
-
return /* @__PURE__ */
|
|
7171
|
+
return /* @__PURE__ */ jsx74(
|
|
7180
7172
|
"button",
|
|
7181
7173
|
{
|
|
7182
7174
|
type: "button",
|
|
@@ -7193,7 +7185,7 @@ var ChartTimeSeries = forwardRef50(
|
|
|
7193
7185
|
);
|
|
7194
7186
|
}) })
|
|
7195
7187
|
] }),
|
|
7196
|
-
!hasData ? /* @__PURE__ */
|
|
7188
|
+
!hasData ? /* @__PURE__ */ jsx74("div", { className: "flex h-[220px] items-center justify-center text-v2-sm text-v2-fg-muted", children: emptyMessage }) : /* @__PURE__ */ jsxs52(
|
|
7197
7189
|
"svg",
|
|
7198
7190
|
{
|
|
7199
7191
|
viewBox: "0 0 720 200",
|
|
@@ -7202,11 +7194,11 @@ var ChartTimeSeries = forwardRef50(
|
|
|
7202
7194
|
"aria-label": typeof title === "string" ? title : "Gr\xE1fico de s\xE9rie temporal",
|
|
7203
7195
|
role: "img",
|
|
7204
7196
|
children: [
|
|
7205
|
-
/* @__PURE__ */
|
|
7206
|
-
/* @__PURE__ */
|
|
7207
|
-
/* @__PURE__ */
|
|
7197
|
+
/* @__PURE__ */ jsx74("defs", { children: /* @__PURE__ */ jsxs52("linearGradient", { id: gradientId, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
7198
|
+
/* @__PURE__ */ jsx74("stop", { offset: "0%", stopColor: "currentColor", stopOpacity: "0.3" }),
|
|
7199
|
+
/* @__PURE__ */ jsx74("stop", { offset: "100%", stopColor: "currentColor", stopOpacity: "0" })
|
|
7208
7200
|
] }) }),
|
|
7209
|
-
[40, 90, 140].map((y) => /* @__PURE__ */
|
|
7201
|
+
[40, 90, 140].map((y) => /* @__PURE__ */ jsx74(
|
|
7210
7202
|
"line",
|
|
7211
7203
|
{
|
|
7212
7204
|
x1: "0",
|
|
@@ -7220,7 +7212,7 @@ var ChartTimeSeries = forwardRef50(
|
|
|
7220
7212
|
y
|
|
7221
7213
|
)),
|
|
7222
7214
|
paths && /* @__PURE__ */ jsxs52(Fragment13, { children: [
|
|
7223
|
-
/* @__PURE__ */
|
|
7215
|
+
/* @__PURE__ */ jsx74(
|
|
7224
7216
|
"path",
|
|
7225
7217
|
{
|
|
7226
7218
|
d: paths.area,
|
|
@@ -7228,7 +7220,7 @@ var ChartTimeSeries = forwardRef50(
|
|
|
7228
7220
|
stroke: "none"
|
|
7229
7221
|
}
|
|
7230
7222
|
),
|
|
7231
|
-
/* @__PURE__ */
|
|
7223
|
+
/* @__PURE__ */ jsx74(
|
|
7232
7224
|
"path",
|
|
7233
7225
|
{
|
|
7234
7226
|
d: paths.line,
|
|
@@ -7239,7 +7231,7 @@ var ChartTimeSeries = forwardRef50(
|
|
|
7239
7231
|
strokeLinejoin: "round"
|
|
7240
7232
|
}
|
|
7241
7233
|
),
|
|
7242
|
-
/* @__PURE__ */
|
|
7234
|
+
/* @__PURE__ */ jsx74(
|
|
7243
7235
|
"circle",
|
|
7244
7236
|
{
|
|
7245
7237
|
cx: paths.lastX,
|
|
@@ -7251,7 +7243,7 @@ var ChartTimeSeries = forwardRef50(
|
|
|
7251
7243
|
}
|
|
7252
7244
|
)
|
|
7253
7245
|
] }),
|
|
7254
|
-
/* @__PURE__ */
|
|
7246
|
+
/* @__PURE__ */ jsx74("g", { style: { fontSize: 10 }, fill: "currentColor", opacity: "0.6", children: axisLabels.map((tick) => /* @__PURE__ */ jsx74(
|
|
7255
7247
|
"text",
|
|
7256
7248
|
{
|
|
7257
7249
|
x: tick.x,
|
|
@@ -7273,7 +7265,7 @@ var ChartTimeSeries = forwardRef50(
|
|
|
7273
7265
|
// src/patterns/DonutChart/DonutChart.tsx
|
|
7274
7266
|
import { forwardRef as forwardRef51, useState as useState23 } from "react";
|
|
7275
7267
|
import { Cell, Pie, PieChart, ResponsiveContainer, Tooltip as Tooltip2 } from "recharts";
|
|
7276
|
-
import { jsx as
|
|
7268
|
+
import { jsx as jsx75, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
7277
7269
|
var DEFAULT_COLORS = [
|
|
7278
7270
|
"var(--v2-chart-cat-1)",
|
|
7279
7271
|
"var(--v2-chart-cat-2)",
|
|
@@ -7322,7 +7314,7 @@ function ChartTooltip({
|
|
|
7322
7314
|
if (!active || !slice) return null;
|
|
7323
7315
|
return /* @__PURE__ */ jsxs53("div", { className: "rounded-v2-md border border-v2-border-default bg-v2-panel px-3 py-2 text-v2-xs shadow-lg", children: [
|
|
7324
7316
|
/* @__PURE__ */ jsxs53("div", { className: "flex items-center gap-2", children: [
|
|
7325
|
-
/* @__PURE__ */
|
|
7317
|
+
/* @__PURE__ */ jsx75(
|
|
7326
7318
|
"span",
|
|
7327
7319
|
{
|
|
7328
7320
|
className: "size-2 rounded-full",
|
|
@@ -7330,10 +7322,10 @@ function ChartTooltip({
|
|
|
7330
7322
|
"aria-hidden": "true"
|
|
7331
7323
|
}
|
|
7332
7324
|
),
|
|
7333
|
-
/* @__PURE__ */
|
|
7325
|
+
/* @__PURE__ */ jsx75("p", { className: "font-semibold text-v2-fg-default", children: slice.label })
|
|
7334
7326
|
] }),
|
|
7335
|
-
/* @__PURE__ */
|
|
7336
|
-
typeof slice.secondaryValue === "number" && /* @__PURE__ */
|
|
7327
|
+
/* @__PURE__ */ jsx75("p", { className: "mt-1 font-semibold text-v2-fg-default", children: valueFormatter(slice.value) }),
|
|
7328
|
+
typeof slice.secondaryValue === "number" && /* @__PURE__ */ jsx75("p", { className: "text-v2-fg-muted", children: secondaryFormatter(slice.secondaryValue) })
|
|
7337
7329
|
] });
|
|
7338
7330
|
}
|
|
7339
7331
|
var DonutChart = forwardRef51(
|
|
@@ -7363,8 +7355,8 @@ var DonutChart = forwardRef51(
|
|
|
7363
7355
|
className: cn("flex flex-col gap-3.5", className),
|
|
7364
7356
|
...props,
|
|
7365
7357
|
children: [
|
|
7366
|
-
/* @__PURE__ */
|
|
7367
|
-
isEmpty ? /* @__PURE__ */
|
|
7358
|
+
/* @__PURE__ */ jsx75("h3", { className: "text-v2-sm font-bold text-v2-fg-default", children: title }),
|
|
7359
|
+
isEmpty ? /* @__PURE__ */ jsx75("div", { className: "flex h-[160px] items-center justify-center text-v2-sm text-v2-fg-muted", children: emptyMessage }) : /* @__PURE__ */ jsxs53(
|
|
7368
7360
|
"div",
|
|
7369
7361
|
{
|
|
7370
7362
|
className: "flex items-center gap-4",
|
|
@@ -7372,8 +7364,8 @@ var DonutChart = forwardRef51(
|
|
|
7372
7364
|
"aria-label": typeof title === "string" ? title : "Donut chart",
|
|
7373
7365
|
children: [
|
|
7374
7366
|
/* @__PURE__ */ jsxs53("div", { className: "relative size-[160px] shrink-0", children: [
|
|
7375
|
-
/* @__PURE__ */
|
|
7376
|
-
/* @__PURE__ */
|
|
7367
|
+
/* @__PURE__ */ jsx75(ResponsiveContainer, { width: "100%", height: "100%", children: /* @__PURE__ */ jsxs53(PieChart, { children: [
|
|
7368
|
+
/* @__PURE__ */ jsx75(
|
|
7377
7369
|
Pie,
|
|
7378
7370
|
{
|
|
7379
7371
|
data: slices,
|
|
@@ -7386,7 +7378,7 @@ var DonutChart = forwardRef51(
|
|
|
7386
7378
|
strokeWidth: 2,
|
|
7387
7379
|
onMouseEnter: (_, idx) => setActiveIdx(idx),
|
|
7388
7380
|
onMouseLeave: () => setActiveIdx(null),
|
|
7389
|
-
children: slices.map((slice, idx) => /* @__PURE__ */
|
|
7381
|
+
children: slices.map((slice, idx) => /* @__PURE__ */ jsx75(
|
|
7390
7382
|
Cell,
|
|
7391
7383
|
{
|
|
7392
7384
|
fill: slice.color,
|
|
@@ -7397,12 +7389,12 @@ var DonutChart = forwardRef51(
|
|
|
7397
7389
|
))
|
|
7398
7390
|
}
|
|
7399
7391
|
),
|
|
7400
|
-
/* @__PURE__ */
|
|
7392
|
+
/* @__PURE__ */ jsx75(
|
|
7401
7393
|
Tooltip2,
|
|
7402
7394
|
{
|
|
7403
7395
|
allowEscapeViewBox: { x: false, y: true },
|
|
7404
7396
|
position: { y: -56 },
|
|
7405
|
-
content: /* @__PURE__ */
|
|
7397
|
+
content: /* @__PURE__ */ jsx75(
|
|
7406
7398
|
ChartTooltip,
|
|
7407
7399
|
{
|
|
7408
7400
|
valueFormatter,
|
|
@@ -7413,11 +7405,11 @@ var DonutChart = forwardRef51(
|
|
|
7413
7405
|
)
|
|
7414
7406
|
] }) }),
|
|
7415
7407
|
/* @__PURE__ */ jsxs53("div", { className: "pointer-events-none absolute inset-0 flex flex-col items-center justify-center", children: [
|
|
7416
|
-
/* @__PURE__ */
|
|
7417
|
-
/* @__PURE__ */
|
|
7408
|
+
/* @__PURE__ */ jsx75("span", { className: "text-v2-xl font-extrabold text-v2-fg-default", children: centerValue ?? valueFormatter(total) }),
|
|
7409
|
+
/* @__PURE__ */ jsx75("span", { className: "text-v2-xs text-v2-fg-muted", children: centerLabel })
|
|
7418
7410
|
] })
|
|
7419
7411
|
] }),
|
|
7420
|
-
/* @__PURE__ */
|
|
7412
|
+
/* @__PURE__ */ jsx75("ul", { className: "flex flex-1 flex-col gap-2", children: slices.map((slice, idx) => /* @__PURE__ */ jsxs53(
|
|
7421
7413
|
"li",
|
|
7422
7414
|
{
|
|
7423
7415
|
onMouseEnter: () => setActiveIdx(idx),
|
|
@@ -7427,7 +7419,7 @@ var DonutChart = forwardRef51(
|
|
|
7427
7419
|
activeIdx === idx && "bg-v2-bg-subtle"
|
|
7428
7420
|
),
|
|
7429
7421
|
children: [
|
|
7430
|
-
/* @__PURE__ */
|
|
7422
|
+
/* @__PURE__ */ jsx75(
|
|
7431
7423
|
"span",
|
|
7432
7424
|
{
|
|
7433
7425
|
"aria-hidden": "true",
|
|
@@ -7435,8 +7427,8 @@ var DonutChart = forwardRef51(
|
|
|
7435
7427
|
style: { backgroundColor: slice.color }
|
|
7436
7428
|
}
|
|
7437
7429
|
),
|
|
7438
|
-
/* @__PURE__ */
|
|
7439
|
-
/* @__PURE__ */
|
|
7430
|
+
/* @__PURE__ */ jsx75("span", { className: "flex-1 truncate", children: slice.label }),
|
|
7431
|
+
/* @__PURE__ */ jsx75("span", { className: "font-bold tabular-nums", children: valueFormatter(slice.value) })
|
|
7440
7432
|
]
|
|
7441
7433
|
},
|
|
7442
7434
|
slice.label
|
|
@@ -7453,16 +7445,16 @@ var DonutChart = forwardRef51(
|
|
|
7453
7445
|
// src/patterns/EmptyState/EmptyState.tsx
|
|
7454
7446
|
import { forwardRef as forwardRef52 } from "react";
|
|
7455
7447
|
import { MagnifyingGlass as MagnifyingGlass4, Tray, WarningCircle as WarningCircle3 } from "@phosphor-icons/react";
|
|
7456
|
-
import { jsx as
|
|
7448
|
+
import { jsx as jsx76, jsxs as jsxs54 } from "react/jsx-runtime";
|
|
7457
7449
|
var variantIconBg = {
|
|
7458
7450
|
"no-data": "bg-v2-bg-subtle text-v2-fg-muted",
|
|
7459
7451
|
"no-results": "bg-v2-info-soft text-v2-info-500",
|
|
7460
7452
|
error: "bg-v2-danger-soft text-v2-danger-500"
|
|
7461
7453
|
};
|
|
7462
7454
|
var variantIcon2 = {
|
|
7463
|
-
"no-data": /* @__PURE__ */
|
|
7464
|
-
"no-results": /* @__PURE__ */
|
|
7465
|
-
error: /* @__PURE__ */
|
|
7455
|
+
"no-data": /* @__PURE__ */ jsx76(Tray, { size: 28, "aria-hidden": "true" }),
|
|
7456
|
+
"no-results": /* @__PURE__ */ jsx76(MagnifyingGlass4, { size: 28, "aria-hidden": "true" }),
|
|
7457
|
+
error: /* @__PURE__ */ jsx76(WarningCircle3, { size: 28, "aria-hidden": "true" })
|
|
7466
7458
|
};
|
|
7467
7459
|
var EmptyState = forwardRef52(
|
|
7468
7460
|
({
|
|
@@ -7486,7 +7478,7 @@ var EmptyState = forwardRef52(
|
|
|
7486
7478
|
),
|
|
7487
7479
|
...props,
|
|
7488
7480
|
children: [
|
|
7489
|
-
/* @__PURE__ */
|
|
7481
|
+
/* @__PURE__ */ jsx76(
|
|
7490
7482
|
"span",
|
|
7491
7483
|
{
|
|
7492
7484
|
"aria-hidden": "true",
|
|
@@ -7497,9 +7489,9 @@ var EmptyState = forwardRef52(
|
|
|
7497
7489
|
children: icon ?? variantIcon2[variant]
|
|
7498
7490
|
}
|
|
7499
7491
|
),
|
|
7500
|
-
/* @__PURE__ */
|
|
7501
|
-
description && /* @__PURE__ */
|
|
7502
|
-
action && /* @__PURE__ */
|
|
7492
|
+
/* @__PURE__ */ jsx76("h3", { className: "text-v2-base font-semibold text-v2-fg-default", children: title }),
|
|
7493
|
+
description && /* @__PURE__ */ jsx76("p", { className: "max-w-md text-v2-sm text-v2-fg-muted", children: description }),
|
|
7494
|
+
action && /* @__PURE__ */ jsx76("div", { className: "mt-1 flex items-center gap-2", children: action })
|
|
7503
7495
|
]
|
|
7504
7496
|
}
|
|
7505
7497
|
);
|
|
@@ -7509,7 +7501,7 @@ EmptyState.displayName = "EmptyState";
|
|
|
7509
7501
|
|
|
7510
7502
|
// src/patterns/WizardShell/WizardShell.tsx
|
|
7511
7503
|
import { Check as Check6, WarningCircle as WarningCircle4, X as X10 } from "@phosphor-icons/react";
|
|
7512
|
-
import { Fragment as Fragment14, jsx as
|
|
7504
|
+
import { Fragment as Fragment14, jsx as jsx77, jsxs as jsxs55 } from "react/jsx-runtime";
|
|
7513
7505
|
var stepIndicatorClass = {
|
|
7514
7506
|
completed: "bg-v2-success-500 text-v2-action-on-primary border-v2-success-500",
|
|
7515
7507
|
active: "bg-v2-action-primary text-v2-action-on-primary border-v2-action-primary",
|
|
@@ -7523,7 +7515,7 @@ function StepIndicator({
|
|
|
7523
7515
|
onStepChange
|
|
7524
7516
|
}) {
|
|
7525
7517
|
const inner = /* @__PURE__ */ jsxs55(Fragment14, { children: [
|
|
7526
|
-
/* @__PURE__ */
|
|
7518
|
+
/* @__PURE__ */ jsx77(
|
|
7527
7519
|
"span",
|
|
7528
7520
|
{
|
|
7529
7521
|
"data-state": step.state,
|
|
@@ -7532,7 +7524,7 @@ function StepIndicator({
|
|
|
7532
7524
|
"flex size-8 shrink-0 items-center justify-center rounded-v2-pill border-2 text-v2-sm font-semibold",
|
|
7533
7525
|
stepIndicatorClass[step.state]
|
|
7534
7526
|
),
|
|
7535
|
-
children: step.state === "completed" ? /* @__PURE__ */
|
|
7527
|
+
children: step.state === "completed" ? /* @__PURE__ */ jsx77(Check6, { size: 16, weight: "bold" }) : step.state === "blocked" ? /* @__PURE__ */ jsx77(X10, { size: 16, weight: "bold" }) : step.state === "error" ? /* @__PURE__ */ jsx77(WarningCircle4, { size: 16, weight: "bold" }) : index + 1
|
|
7536
7528
|
}
|
|
7537
7529
|
),
|
|
7538
7530
|
/* @__PURE__ */ jsxs55("div", { className: "flex flex-col", children: [
|
|
@@ -7552,11 +7544,11 @@ function StepIndicator({
|
|
|
7552
7544
|
]
|
|
7553
7545
|
}
|
|
7554
7546
|
),
|
|
7555
|
-
step.description && /* @__PURE__ */
|
|
7547
|
+
step.description && /* @__PURE__ */ jsx77(Text, { tag: "p", size: "xs", color: "muted", children: step.description })
|
|
7556
7548
|
] })
|
|
7557
7549
|
] });
|
|
7558
7550
|
if (onStepChange) {
|
|
7559
|
-
return /* @__PURE__ */
|
|
7551
|
+
return /* @__PURE__ */ jsx77(
|
|
7560
7552
|
"button",
|
|
7561
7553
|
{
|
|
7562
7554
|
type: "button",
|
|
@@ -7567,7 +7559,7 @@ function StepIndicator({
|
|
|
7567
7559
|
}
|
|
7568
7560
|
);
|
|
7569
7561
|
}
|
|
7570
|
-
return /* @__PURE__ */
|
|
7562
|
+
return /* @__PURE__ */ jsx77(
|
|
7571
7563
|
"div",
|
|
7572
7564
|
{
|
|
7573
7565
|
className: "flex items-center gap-2",
|
|
@@ -7596,9 +7588,9 @@ function WizardShell(props) {
|
|
|
7596
7588
|
),
|
|
7597
7589
|
children: [
|
|
7598
7590
|
/* @__PURE__ */ jsxs55("div", { className: "border-b border-v2-border-default p-5", children: [
|
|
7599
|
-
/* @__PURE__ */
|
|
7600
|
-
subtitle && /* @__PURE__ */
|
|
7601
|
-
/* @__PURE__ */
|
|
7591
|
+
/* @__PURE__ */ jsx77("h1", { className: "text-v2-lg font-extrabold tracking-tight text-v2-fg-default", children: title }),
|
|
7592
|
+
subtitle && /* @__PURE__ */ jsx77(Text, { tag: "p", size: "sm", color: "muted", className: "mt-0.5", children: subtitle }),
|
|
7593
|
+
/* @__PURE__ */ jsx77("ol", { className: "mt-4 flex items-start gap-2", "aria-label": "Passos", children: steps.map((step, idx) => /* @__PURE__ */ jsx77("li", { className: "flex-1", children: /* @__PURE__ */ jsx77(
|
|
7602
7594
|
StepIndicator,
|
|
7603
7595
|
{
|
|
7604
7596
|
step,
|
|
@@ -7615,12 +7607,12 @@ function WizardShell(props) {
|
|
|
7615
7607
|
aside ? "lg:grid-cols-[1fr_320px]" : "grid-cols-1"
|
|
7616
7608
|
),
|
|
7617
7609
|
children: [
|
|
7618
|
-
/* @__PURE__ */
|
|
7619
|
-
aside && /* @__PURE__ */
|
|
7610
|
+
/* @__PURE__ */ jsx77("div", { children }),
|
|
7611
|
+
aside && /* @__PURE__ */ jsx77("div", { className: "lg:sticky lg:top-4", children: aside })
|
|
7620
7612
|
]
|
|
7621
7613
|
}
|
|
7622
7614
|
),
|
|
7623
|
-
footer && /* @__PURE__ */
|
|
7615
|
+
footer && /* @__PURE__ */ jsx77("div", { className: "border-t border-v2-border-default bg-v2-bg-subtle p-4", children: footer })
|
|
7624
7616
|
]
|
|
7625
7617
|
}
|
|
7626
7618
|
);
|
|
@@ -7633,8 +7625,8 @@ import {
|
|
|
7633
7625
|
} from "react";
|
|
7634
7626
|
import * as AccordionPrimitive from "@radix-ui/react-accordion";
|
|
7635
7627
|
import { CaretDown as CaretDown8 } from "@phosphor-icons/react";
|
|
7636
|
-
import { jsx as
|
|
7637
|
-
var SingleRoot = forwardRef53(({ className, ...props }, ref) => /* @__PURE__ */
|
|
7628
|
+
import { jsx as jsx78, jsxs as jsxs56 } from "react/jsx-runtime";
|
|
7629
|
+
var SingleRoot = forwardRef53(({ className, ...props }, ref) => /* @__PURE__ */ jsx78(
|
|
7638
7630
|
AccordionPrimitive.Root,
|
|
7639
7631
|
{
|
|
7640
7632
|
ref,
|
|
@@ -7643,7 +7635,7 @@ var SingleRoot = forwardRef53(({ className, ...props }, ref) => /* @__PURE__ */
|
|
|
7643
7635
|
}
|
|
7644
7636
|
));
|
|
7645
7637
|
SingleRoot.displayName = "DSAccordion.Root";
|
|
7646
|
-
var MultipleRoot = forwardRef53(({ className, ...props }, ref) => /* @__PURE__ */
|
|
7638
|
+
var MultipleRoot = forwardRef53(({ className, ...props }, ref) => /* @__PURE__ */ jsx78(
|
|
7647
7639
|
AccordionPrimitive.Root,
|
|
7648
7640
|
{
|
|
7649
7641
|
ref,
|
|
@@ -7652,8 +7644,8 @@ var MultipleRoot = forwardRef53(({ className, ...props }, ref) => /* @__PURE__ *
|
|
|
7652
7644
|
}
|
|
7653
7645
|
));
|
|
7654
7646
|
MultipleRoot.displayName = "DSAccordion.MultipleRoot";
|
|
7655
|
-
var
|
|
7656
|
-
var Item7 = forwardRef53(({ className, ...props }, ref) => /* @__PURE__ */
|
|
7647
|
+
var Root14 = AccordionPrimitive.Root;
|
|
7648
|
+
var Item7 = forwardRef53(({ className, ...props }, ref) => /* @__PURE__ */ jsx78(
|
|
7657
7649
|
AccordionPrimitive.Item,
|
|
7658
7650
|
{
|
|
7659
7651
|
ref,
|
|
@@ -7666,7 +7658,7 @@ var Item7 = forwardRef53(({ className, ...props }, ref) => /* @__PURE__ */ jsx77
|
|
|
7666
7658
|
));
|
|
7667
7659
|
Item7.displayName = "DSAccordion.Item";
|
|
7668
7660
|
var Trigger16 = forwardRef53(
|
|
7669
|
-
({ className, children, icon, meta, ...props }, ref) => /* @__PURE__ */
|
|
7661
|
+
({ className, children, icon, meta, ...props }, ref) => /* @__PURE__ */ jsx78(AccordionPrimitive.Header, { className: "flex", children: /* @__PURE__ */ jsxs56(
|
|
7670
7662
|
AccordionPrimitive.Trigger,
|
|
7671
7663
|
{
|
|
7672
7664
|
ref,
|
|
@@ -7677,7 +7669,7 @@ var Trigger16 = forwardRef53(
|
|
|
7677
7669
|
...props,
|
|
7678
7670
|
children: [
|
|
7679
7671
|
/* @__PURE__ */ jsxs56("span", { className: "flex min-w-0 items-center gap-2", children: [
|
|
7680
|
-
icon && /* @__PURE__ */
|
|
7672
|
+
icon && /* @__PURE__ */ jsx78(
|
|
7681
7673
|
"span",
|
|
7682
7674
|
{
|
|
7683
7675
|
className: "shrink-0 text-v2-fg-muted",
|
|
@@ -7685,11 +7677,11 @@ var Trigger16 = forwardRef53(
|
|
|
7685
7677
|
children: icon
|
|
7686
7678
|
}
|
|
7687
7679
|
),
|
|
7688
|
-
/* @__PURE__ */
|
|
7680
|
+
/* @__PURE__ */ jsx78("span", { className: "truncate text-v2-base font-semibold text-v2-fg-default", children })
|
|
7689
7681
|
] }),
|
|
7690
7682
|
/* @__PURE__ */ jsxs56("span", { className: "flex shrink-0 items-center gap-3", children: [
|
|
7691
7683
|
meta,
|
|
7692
|
-
/* @__PURE__ */
|
|
7684
|
+
/* @__PURE__ */ jsx78(
|
|
7693
7685
|
CaretDown8,
|
|
7694
7686
|
{
|
|
7695
7687
|
size: 16,
|
|
@@ -7704,7 +7696,7 @@ var Trigger16 = forwardRef53(
|
|
|
7704
7696
|
) })
|
|
7705
7697
|
);
|
|
7706
7698
|
Trigger16.displayName = "DSAccordion.Trigger";
|
|
7707
|
-
var Content16 = forwardRef53(({ className, children, ...props }, ref) => /* @__PURE__ */
|
|
7699
|
+
var Content16 = forwardRef53(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx78(
|
|
7708
7700
|
AccordionPrimitive.Content,
|
|
7709
7701
|
{
|
|
7710
7702
|
ref,
|
|
@@ -7713,18 +7705,18 @@ var Content16 = forwardRef53(({ className, children, ...props }, ref) => /* @__P
|
|
|
7713
7705
|
className
|
|
7714
7706
|
),
|
|
7715
7707
|
...props,
|
|
7716
|
-
children: /* @__PURE__ */
|
|
7708
|
+
children: /* @__PURE__ */ jsx78("div", { className: "border-t border-v2-border-default p-5", children })
|
|
7717
7709
|
}
|
|
7718
7710
|
));
|
|
7719
7711
|
Content16.displayName = "DSAccordion.Content";
|
|
7720
|
-
var DSAccordion = Object.assign(
|
|
7712
|
+
var DSAccordion = Object.assign(Root14, {
|
|
7721
7713
|
Item: Item7,
|
|
7722
7714
|
Trigger: Trigger16,
|
|
7723
7715
|
Content: Content16
|
|
7724
7716
|
});
|
|
7725
7717
|
|
|
7726
7718
|
// src/patterns/DataField/DataField.tsx
|
|
7727
|
-
import { jsx as
|
|
7719
|
+
import { jsx as jsx79, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
7728
7720
|
function DataField({
|
|
7729
7721
|
label,
|
|
7730
7722
|
value,
|
|
@@ -7748,15 +7740,15 @@ function DataField({
|
|
|
7748
7740
|
]
|
|
7749
7741
|
}
|
|
7750
7742
|
),
|
|
7751
|
-
/* @__PURE__ */
|
|
7752
|
-
hint && /* @__PURE__ */
|
|
7743
|
+
/* @__PURE__ */ jsx79(Text, { size: "sm", weight: "semibold", children: value ?? "\u2014" }),
|
|
7744
|
+
hint && /* @__PURE__ */ jsx79(Text, { size: "xs", color: "subtle", children: hint })
|
|
7753
7745
|
] });
|
|
7754
7746
|
}
|
|
7755
7747
|
|
|
7756
7748
|
// src/patterns/FilterBarV2/FilterBarV2.tsx
|
|
7757
7749
|
import { useEffect as useEffect13, useState as useState24 } from "react";
|
|
7758
7750
|
import { CheckSquare, FunnelSimple, Square } from "@phosphor-icons/react";
|
|
7759
|
-
import { Fragment as Fragment15, jsx as
|
|
7751
|
+
import { Fragment as Fragment15, jsx as jsx80, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
7760
7752
|
function isStringValue(v) {
|
|
7761
7753
|
return typeof v === "string";
|
|
7762
7754
|
}
|
|
@@ -7794,9 +7786,9 @@ function MultiSelectField({
|
|
|
7794
7786
|
const selectedLabels = field.options.filter((opt) => selected.includes(opt.value)).map((opt) => opt.label);
|
|
7795
7787
|
const triggerLabel = selectedLabels.length === 0 ? field.placeholder ?? "Selecione..." : selectedLabels.length === 1 ? selectedLabels[0] : `${selectedLabels.length} selecionados`;
|
|
7796
7788
|
return /* @__PURE__ */ jsxs58("div", { className: "relative w-full", children: [
|
|
7797
|
-
field.label && /* @__PURE__ */
|
|
7789
|
+
field.label && /* @__PURE__ */ jsx80(Label, { className: "absolute -top-2 left-3 z-10 bg-v2-raised px-1 text-v2-xs font-medium text-v2-fg-muted", children: field.label }),
|
|
7798
7790
|
/* @__PURE__ */ jsxs58(Popover, { open, onOpenChange: setOpen, children: [
|
|
7799
|
-
/* @__PURE__ */
|
|
7791
|
+
/* @__PURE__ */ jsx80(Popover.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs58(
|
|
7800
7792
|
"button",
|
|
7801
7793
|
{
|
|
7802
7794
|
type: "button",
|
|
@@ -7807,12 +7799,12 @@ function MultiSelectField({
|
|
|
7807
7799
|
selected.length === 0 && "text-v2-fg-muted"
|
|
7808
7800
|
),
|
|
7809
7801
|
children: [
|
|
7810
|
-
/* @__PURE__ */
|
|
7811
|
-
selected.length > 0 && /* @__PURE__ */
|
|
7802
|
+
/* @__PURE__ */ jsx80("span", { className: "truncate", children: triggerLabel }),
|
|
7803
|
+
selected.length > 0 && /* @__PURE__ */ jsx80(Badge, { variant: "info", size: "sm", children: selected.length })
|
|
7812
7804
|
]
|
|
7813
7805
|
}
|
|
7814
7806
|
) }),
|
|
7815
|
-
/* @__PURE__ */
|
|
7807
|
+
/* @__PURE__ */ jsx80(
|
|
7816
7808
|
Popover.Content,
|
|
7817
7809
|
{
|
|
7818
7810
|
size: "md",
|
|
@@ -7825,10 +7817,10 @@ function MultiSelectField({
|
|
|
7825
7817
|
"aria-multiselectable": "true",
|
|
7826
7818
|
className: "flex flex-col",
|
|
7827
7819
|
children: [
|
|
7828
|
-
field.options.length === 0 && /* @__PURE__ */
|
|
7820
|
+
field.options.length === 0 && /* @__PURE__ */ jsx80("li", { className: "px-3 py-2 text-v2-sm text-v2-fg-muted", children: "Nenhuma op\xE7\xE3o dispon\xEDvel" }),
|
|
7829
7821
|
field.options.map((option) => {
|
|
7830
7822
|
const checked = selected.includes(option.value);
|
|
7831
|
-
return /* @__PURE__ */
|
|
7823
|
+
return /* @__PURE__ */ jsx80("li", { children: /* @__PURE__ */ jsxs58(
|
|
7832
7824
|
"button",
|
|
7833
7825
|
{
|
|
7834
7826
|
type: "button",
|
|
@@ -7840,14 +7832,14 @@ function MultiSelectField({
|
|
|
7840
7832
|
"hover:bg-v2-bg-subtle focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-v2-focus-ring/30"
|
|
7841
7833
|
),
|
|
7842
7834
|
children: [
|
|
7843
|
-
checked ? /* @__PURE__ */
|
|
7835
|
+
checked ? /* @__PURE__ */ jsx80(
|
|
7844
7836
|
CheckSquare,
|
|
7845
7837
|
{
|
|
7846
7838
|
size: 18,
|
|
7847
7839
|
weight: "fill",
|
|
7848
7840
|
className: "shrink-0 text-v2-action-primary"
|
|
7849
7841
|
}
|
|
7850
|
-
) : /* @__PURE__ */
|
|
7842
|
+
) : /* @__PURE__ */ jsx80(
|
|
7851
7843
|
Square,
|
|
7852
7844
|
{
|
|
7853
7845
|
size: 18,
|
|
@@ -7855,7 +7847,7 @@ function MultiSelectField({
|
|
|
7855
7847
|
className: "shrink-0 text-v2-fg-muted"
|
|
7856
7848
|
}
|
|
7857
7849
|
),
|
|
7858
|
-
/* @__PURE__ */
|
|
7850
|
+
/* @__PURE__ */ jsx80("span", { className: "truncate", children: option.label })
|
|
7859
7851
|
]
|
|
7860
7852
|
}
|
|
7861
7853
|
) }, option.value);
|
|
@@ -7874,7 +7866,7 @@ function DateRangeField({
|
|
|
7874
7866
|
onChange
|
|
7875
7867
|
}) {
|
|
7876
7868
|
const range = asDateRange(value);
|
|
7877
|
-
return /* @__PURE__ */
|
|
7869
|
+
return /* @__PURE__ */ jsx80(
|
|
7878
7870
|
DateRangeInput,
|
|
7879
7871
|
{
|
|
7880
7872
|
label: field.label,
|
|
@@ -7897,7 +7889,7 @@ function NumberRangeField({
|
|
|
7897
7889
|
const maxLabel = field.maxLabel ?? `${field.label} (menor ou igual)`;
|
|
7898
7890
|
if (field.format === "money") {
|
|
7899
7891
|
return /* @__PURE__ */ jsxs58(Fragment15, { children: [
|
|
7900
|
-
/* @__PURE__ */
|
|
7892
|
+
/* @__PURE__ */ jsx80(
|
|
7901
7893
|
MoneyInput,
|
|
7902
7894
|
{
|
|
7903
7895
|
label: minLabel,
|
|
@@ -7905,7 +7897,7 @@ function NumberRangeField({
|
|
|
7905
7897
|
onValueChange: (_f, raw) => setMin(raw)
|
|
7906
7898
|
}
|
|
7907
7899
|
),
|
|
7908
|
-
/* @__PURE__ */
|
|
7900
|
+
/* @__PURE__ */ jsx80(
|
|
7909
7901
|
MoneyInput,
|
|
7910
7902
|
{
|
|
7911
7903
|
label: maxLabel,
|
|
@@ -7917,7 +7909,7 @@ function NumberRangeField({
|
|
|
7917
7909
|
}
|
|
7918
7910
|
if (field.format === "percent") {
|
|
7919
7911
|
return /* @__PURE__ */ jsxs58(Fragment15, { children: [
|
|
7920
|
-
/* @__PURE__ */
|
|
7912
|
+
/* @__PURE__ */ jsx80(
|
|
7921
7913
|
PercentInput,
|
|
7922
7914
|
{
|
|
7923
7915
|
label: minLabel,
|
|
@@ -7925,7 +7917,7 @@ function NumberRangeField({
|
|
|
7925
7917
|
onValueChange: (_f, raw) => setMin(raw)
|
|
7926
7918
|
}
|
|
7927
7919
|
),
|
|
7928
|
-
/* @__PURE__ */
|
|
7920
|
+
/* @__PURE__ */ jsx80(
|
|
7929
7921
|
PercentInput,
|
|
7930
7922
|
{
|
|
7931
7923
|
label: maxLabel,
|
|
@@ -7936,7 +7928,7 @@ function NumberRangeField({
|
|
|
7936
7928
|
] });
|
|
7937
7929
|
}
|
|
7938
7930
|
return /* @__PURE__ */ jsxs58(Fragment15, { children: [
|
|
7939
|
-
/* @__PURE__ */
|
|
7931
|
+
/* @__PURE__ */ jsx80(
|
|
7940
7932
|
Input,
|
|
7941
7933
|
{
|
|
7942
7934
|
label: minLabel,
|
|
@@ -7945,7 +7937,7 @@ function NumberRangeField({
|
|
|
7945
7937
|
onChange: (e) => setMin(e.target.value)
|
|
7946
7938
|
}
|
|
7947
7939
|
),
|
|
7948
|
-
/* @__PURE__ */
|
|
7940
|
+
/* @__PURE__ */ jsx80(
|
|
7949
7941
|
Input,
|
|
7950
7942
|
{
|
|
7951
7943
|
label: maxLabel,
|
|
@@ -7958,7 +7950,7 @@ function NumberRangeField({
|
|
|
7958
7950
|
}
|
|
7959
7951
|
function renderField(field, value, onChange) {
|
|
7960
7952
|
if (field.type === "text") {
|
|
7961
|
-
return /* @__PURE__ */
|
|
7953
|
+
return /* @__PURE__ */ jsx80(
|
|
7962
7954
|
Input,
|
|
7963
7955
|
{
|
|
7964
7956
|
label: field.label,
|
|
@@ -7970,7 +7962,7 @@ function renderField(field, value, onChange) {
|
|
|
7970
7962
|
);
|
|
7971
7963
|
}
|
|
7972
7964
|
if (field.type === "mask") {
|
|
7973
|
-
return /* @__PURE__ */
|
|
7965
|
+
return /* @__PURE__ */ jsx80(
|
|
7974
7966
|
DocumentInput,
|
|
7975
7967
|
{
|
|
7976
7968
|
label: field.label,
|
|
@@ -7982,7 +7974,7 @@ function renderField(field, value, onChange) {
|
|
|
7982
7974
|
);
|
|
7983
7975
|
}
|
|
7984
7976
|
if (field.type === "select") {
|
|
7985
|
-
return /* @__PURE__ */
|
|
7977
|
+
return /* @__PURE__ */ jsx80(
|
|
7986
7978
|
Combobox,
|
|
7987
7979
|
{
|
|
7988
7980
|
label: field.label,
|
|
@@ -7996,13 +7988,13 @@ function renderField(field, value, onChange) {
|
|
|
7996
7988
|
);
|
|
7997
7989
|
}
|
|
7998
7990
|
if (field.type === "multiSelect") {
|
|
7999
|
-
return /* @__PURE__ */
|
|
7991
|
+
return /* @__PURE__ */ jsx80(MultiSelectField, { field, value, onChange });
|
|
8000
7992
|
}
|
|
8001
7993
|
if (field.type === "dateRange") {
|
|
8002
|
-
return /* @__PURE__ */
|
|
7994
|
+
return /* @__PURE__ */ jsx80(DateRangeField, { field, value, onChange });
|
|
8003
7995
|
}
|
|
8004
7996
|
if (field.type === "numberRange") {
|
|
8005
|
-
return /* @__PURE__ */
|
|
7997
|
+
return /* @__PURE__ */ jsx80(NumberRangeField, { field, value, onChange });
|
|
8006
7998
|
}
|
|
8007
7999
|
return null;
|
|
8008
8000
|
}
|
|
@@ -8052,7 +8044,7 @@ function FilterBarV2({
|
|
|
8052
8044
|
};
|
|
8053
8045
|
const triggerLabel = activeCount > 0 ? `Filtros (${activeCount})` : title ?? "Filtros avan\xE7ados";
|
|
8054
8046
|
return /* @__PURE__ */ jsxs58(DrawerRoot, { open, onOpenChange: setOpen, children: [
|
|
8055
|
-
!hideTrigger && /* @__PURE__ */
|
|
8047
|
+
!hideTrigger && /* @__PURE__ */ jsx80(DrawerRoot.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs58(
|
|
8056
8048
|
"button",
|
|
8057
8049
|
{
|
|
8058
8050
|
type: "button",
|
|
@@ -8063,17 +8055,17 @@ function FilterBarV2({
|
|
|
8063
8055
|
),
|
|
8064
8056
|
children: [
|
|
8065
8057
|
/* @__PURE__ */ jsxs58("span", { className: "inline-flex items-center gap-2", children: [
|
|
8066
|
-
/* @__PURE__ */
|
|
8058
|
+
/* @__PURE__ */ jsx80(FunnelSimple, { size: 18, weight: "bold", "aria-hidden": "true" }),
|
|
8067
8059
|
triggerLabel
|
|
8068
8060
|
] }),
|
|
8069
|
-
activeCount > 0 ? /* @__PURE__ */
|
|
8061
|
+
activeCount > 0 ? /* @__PURE__ */ jsx80(Badge, { variant: "info", size: "sm", children: activeCount }) : null
|
|
8070
8062
|
]
|
|
8071
8063
|
}
|
|
8072
8064
|
) }),
|
|
8073
8065
|
/* @__PURE__ */ jsxs58(DrawerRoot.Content, { side: "right", size: "md", children: [
|
|
8074
8066
|
/* @__PURE__ */ jsxs58(DrawerRoot.Header, { children: [
|
|
8075
|
-
/* @__PURE__ */
|
|
8076
|
-
/* @__PURE__ */
|
|
8067
|
+
/* @__PURE__ */ jsx80(DrawerRoot.Title, { children: title ?? "Filtros avan\xE7ados" }),
|
|
8068
|
+
/* @__PURE__ */ jsx80(DrawerRoot.Description, { children: activeCount > 0 ? `${activeCount} ${activeCount === 1 ? "filtro aplicado" : "filtros aplicados"}` : "Refine sua busca por campos espec\xEDficos." })
|
|
8077
8069
|
] }),
|
|
8078
8070
|
/* @__PURE__ */ jsxs58(
|
|
8079
8071
|
"form",
|
|
@@ -8081,7 +8073,7 @@ function FilterBarV2({
|
|
|
8081
8073
|
onSubmit: handleApply,
|
|
8082
8074
|
className: "flex flex-1 flex-col overflow-hidden",
|
|
8083
8075
|
children: [
|
|
8084
|
-
/* @__PURE__ */
|
|
8076
|
+
/* @__PURE__ */ jsx80(DrawerRoot.Body, { className: "flex flex-col gap-4", children: fields.map((field) => /* @__PURE__ */ jsx80(
|
|
8085
8077
|
"div",
|
|
8086
8078
|
{
|
|
8087
8079
|
className: cn(
|
|
@@ -8097,7 +8089,7 @@ function FilterBarV2({
|
|
|
8097
8089
|
field.name
|
|
8098
8090
|
)) }),
|
|
8099
8091
|
/* @__PURE__ */ jsxs58(DrawerRoot.Footer, { className: "sm:justify-between", children: [
|
|
8100
|
-
activeCount > 0 ? /* @__PURE__ */
|
|
8092
|
+
activeCount > 0 ? /* @__PURE__ */ jsx80(Button, { type: "button", variant: "secondary", onClick: handleClear, children: clearLabel }) : /* @__PURE__ */ jsx80(
|
|
8101
8093
|
Button,
|
|
8102
8094
|
{
|
|
8103
8095
|
type: "button",
|
|
@@ -8106,7 +8098,7 @@ function FilterBarV2({
|
|
|
8106
8098
|
children: "Cancelar"
|
|
8107
8099
|
}
|
|
8108
8100
|
),
|
|
8109
|
-
/* @__PURE__ */
|
|
8101
|
+
/* @__PURE__ */ jsx80(Button, { type: "submit", children: applyLabel })
|
|
8110
8102
|
] })
|
|
8111
8103
|
]
|
|
8112
8104
|
}
|
|
@@ -8116,7 +8108,7 @@ function FilterBarV2({
|
|
|
8116
8108
|
}
|
|
8117
8109
|
|
|
8118
8110
|
// src/patterns/FormSection/FormSection.tsx
|
|
8119
|
-
import { jsx as
|
|
8111
|
+
import { jsx as jsx81, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
8120
8112
|
function FormSection({
|
|
8121
8113
|
id,
|
|
8122
8114
|
icon,
|
|
@@ -8134,7 +8126,7 @@ function FormSection({
|
|
|
8134
8126
|
className: "scroll-mt-4 rounded-v2-lg border border-v2-border-default bg-v2-panel p-5 shadow-sm",
|
|
8135
8127
|
children: [
|
|
8136
8128
|
/* @__PURE__ */ jsxs59("header", { className: "mb-5 flex items-start gap-3", children: [
|
|
8137
|
-
/* @__PURE__ */
|
|
8129
|
+
/* @__PURE__ */ jsx81(
|
|
8138
8130
|
"span",
|
|
8139
8131
|
{
|
|
8140
8132
|
"aria-hidden": "true",
|
|
@@ -8143,10 +8135,10 @@ function FormSection({
|
|
|
8143
8135
|
}
|
|
8144
8136
|
),
|
|
8145
8137
|
/* @__PURE__ */ jsxs59("div", { className: "flex flex-1 flex-col", children: [
|
|
8146
|
-
/* @__PURE__ */
|
|
8147
|
-
/* @__PURE__ */
|
|
8138
|
+
/* @__PURE__ */ jsx81("h2", { className: "text-v2-base font-bold text-v2-fg-default", children: title }),
|
|
8139
|
+
/* @__PURE__ */ jsx81("p", { className: "text-v2-sm text-v2-fg-muted", children: description })
|
|
8148
8140
|
] }),
|
|
8149
|
-
meta && /* @__PURE__ */
|
|
8141
|
+
meta && /* @__PURE__ */ jsx81("div", { className: "shrink-0", children: meta })
|
|
8150
8142
|
] }),
|
|
8151
8143
|
children
|
|
8152
8144
|
]
|
|
@@ -8162,7 +8154,7 @@ import {
|
|
|
8162
8154
|
CheckCircle as CheckCircle2,
|
|
8163
8155
|
Circle
|
|
8164
8156
|
} from "@phosphor-icons/react";
|
|
8165
|
-
import { Fragment as Fragment16, jsx as
|
|
8157
|
+
import { Fragment as Fragment16, jsx as jsx82, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
8166
8158
|
function ProgressRing({
|
|
8167
8159
|
percent,
|
|
8168
8160
|
size = 36
|
|
@@ -8181,7 +8173,7 @@ function ProgressRing({
|
|
|
8181
8173
|
"aria-hidden": "true",
|
|
8182
8174
|
className: "shrink-0",
|
|
8183
8175
|
children: [
|
|
8184
|
-
/* @__PURE__ */
|
|
8176
|
+
/* @__PURE__ */ jsx82(
|
|
8185
8177
|
"circle",
|
|
8186
8178
|
{
|
|
8187
8179
|
cx: size / 2,
|
|
@@ -8192,7 +8184,7 @@ function ProgressRing({
|
|
|
8192
8184
|
fill: "none"
|
|
8193
8185
|
}
|
|
8194
8186
|
),
|
|
8195
|
-
/* @__PURE__ */
|
|
8187
|
+
/* @__PURE__ */ jsx82(
|
|
8196
8188
|
"circle",
|
|
8197
8189
|
{
|
|
8198
8190
|
cx: size / 2,
|
|
@@ -8242,7 +8234,7 @@ function FormWithAside({
|
|
|
8242
8234
|
sections.reduce((sum, s) => sum + (s.percent ?? 0), 0) / sections.length
|
|
8243
8235
|
) : 0);
|
|
8244
8236
|
return /* @__PURE__ */ jsxs60("div", { className: "flex flex-col gap-4 lg:flex-row", children: [
|
|
8245
|
-
/* @__PURE__ */
|
|
8237
|
+
/* @__PURE__ */ jsx82("div", { className: "min-w-0 flex-1", children }),
|
|
8246
8238
|
/* @__PURE__ */ jsxs60(
|
|
8247
8239
|
"aside",
|
|
8248
8240
|
{
|
|
@@ -8260,8 +8252,8 @@ function FormWithAside({
|
|
|
8260
8252
|
collapsed ? "justify-center" : "justify-between"
|
|
8261
8253
|
),
|
|
8262
8254
|
children: [
|
|
8263
|
-
!collapsed && /* @__PURE__ */
|
|
8264
|
-
/* @__PURE__ */
|
|
8255
|
+
!collapsed && /* @__PURE__ */ jsx82("h2", { className: "text-v2-xs font-bold uppercase tracking-wide text-v2-fg-muted", children: title }),
|
|
8256
|
+
/* @__PURE__ */ jsx82(
|
|
8265
8257
|
"button",
|
|
8266
8258
|
{
|
|
8267
8259
|
type: "button",
|
|
@@ -8270,17 +8262,17 @@ function FormWithAside({
|
|
|
8270
8262
|
"aria-label": collapsed ? "Expandir resumo" : "Recolher resumo",
|
|
8271
8263
|
title: collapsed ? "Expandir resumo" : "Recolher resumo",
|
|
8272
8264
|
className: "inline-flex size-7 shrink-0 items-center justify-center rounded-v2-md text-v2-fg-muted transition-colors hover:bg-v2-raised hover:text-v2-fg-default focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-v2-border-strong",
|
|
8273
|
-
children: collapsed ? /* @__PURE__ */
|
|
8265
|
+
children: collapsed ? /* @__PURE__ */ jsx82(CaretDoubleLeft2, { size: 14, weight: "bold", "aria-hidden": "true" }) : /* @__PURE__ */ jsx82(CaretDoubleRight2, { size: 14, weight: "bold", "aria-hidden": "true" })
|
|
8274
8266
|
}
|
|
8275
8267
|
)
|
|
8276
8268
|
]
|
|
8277
8269
|
}
|
|
8278
8270
|
),
|
|
8279
8271
|
collapsed ? /* @__PURE__ */ jsxs60("div", { className: "flex flex-col items-center gap-3", children: [
|
|
8280
|
-
/* @__PURE__ */
|
|
8272
|
+
/* @__PURE__ */ jsx82(ProgressRing, { percent: computedOverall, size: 36 }),
|
|
8281
8273
|
sections.map((s) => {
|
|
8282
8274
|
const done = (s.percent ?? 0) >= 100;
|
|
8283
|
-
return /* @__PURE__ */
|
|
8275
|
+
return /* @__PURE__ */ jsx82(
|
|
8284
8276
|
"button",
|
|
8285
8277
|
{
|
|
8286
8278
|
type: "button",
|
|
@@ -8297,9 +8289,9 @@ function FormWithAside({
|
|
|
8297
8289
|
})
|
|
8298
8290
|
] }) : /* @__PURE__ */ jsxs60(Fragment16, { children: [
|
|
8299
8291
|
/* @__PURE__ */ jsxs60("div", { className: "flex items-center gap-3 rounded-v2-md bg-v2-raised px-3 py-2", children: [
|
|
8300
|
-
/* @__PURE__ */
|
|
8292
|
+
/* @__PURE__ */ jsx82(ProgressRing, { percent: computedOverall, size: 40 }),
|
|
8301
8293
|
/* @__PURE__ */ jsxs60("div", { className: "flex min-w-0 flex-col", children: [
|
|
8302
|
-
/* @__PURE__ */
|
|
8294
|
+
/* @__PURE__ */ jsx82("span", { className: "text-v2-xs font-semibold text-v2-fg-default", children: "Progresso geral" }),
|
|
8303
8295
|
/* @__PURE__ */ jsxs60("span", { className: "text-v2-xs text-v2-fg-muted", children: [
|
|
8304
8296
|
sections.filter((s) => (s.percent ?? 0) >= 100).length,
|
|
8305
8297
|
" de",
|
|
@@ -8309,37 +8301,37 @@ function FormWithAside({
|
|
|
8309
8301
|
] })
|
|
8310
8302
|
] })
|
|
8311
8303
|
] }),
|
|
8312
|
-
/* @__PURE__ */
|
|
8304
|
+
/* @__PURE__ */ jsx82("nav", { "aria-label": "Navega\xE7\xE3o por se\xE7\xF5es", children: /* @__PURE__ */ jsx82("ul", { className: "flex flex-col gap-0.5", children: sections.map((s) => {
|
|
8313
8305
|
const done = (s.percent ?? 0) >= 100;
|
|
8314
|
-
return /* @__PURE__ */
|
|
8306
|
+
return /* @__PURE__ */ jsx82("li", { children: /* @__PURE__ */ jsxs60(
|
|
8315
8307
|
"button",
|
|
8316
8308
|
{
|
|
8317
8309
|
type: "button",
|
|
8318
8310
|
onClick: () => scrollToId(s.id),
|
|
8319
8311
|
className: "group flex w-full items-start gap-2 rounded-v2-md p-2 text-left transition-colors hover:bg-v2-raised focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-v2-border-strong",
|
|
8320
8312
|
children: [
|
|
8321
|
-
/* @__PURE__ */
|
|
8313
|
+
/* @__PURE__ */ jsx82("span", { "aria-hidden": "true", className: "mt-0.5 shrink-0", children: done ? /* @__PURE__ */ jsx82(
|
|
8322
8314
|
CheckCircle2,
|
|
8323
8315
|
{
|
|
8324
8316
|
size: 14,
|
|
8325
8317
|
weight: "fill",
|
|
8326
8318
|
className: "text-v2-success-500"
|
|
8327
8319
|
}
|
|
8328
|
-
) : /* @__PURE__ */
|
|
8320
|
+
) : /* @__PURE__ */ jsx82(Circle, { size: 14, className: "text-v2-fg-muted" }) }),
|
|
8329
8321
|
/* @__PURE__ */ jsxs60("span", { className: "flex min-w-0 flex-1 flex-col gap-1", children: [
|
|
8330
8322
|
/* @__PURE__ */ jsxs60("span", { className: "flex items-center justify-between gap-2", children: [
|
|
8331
|
-
/* @__PURE__ */
|
|
8323
|
+
/* @__PURE__ */ jsx82("span", { className: "truncate text-v2-sm font-medium text-v2-fg-default", children: s.label }),
|
|
8332
8324
|
typeof s.percent === "number" && /* @__PURE__ */ jsxs60("span", { className: "shrink-0 text-v2-xs font-semibold tabular-nums text-v2-fg-muted", children: [
|
|
8333
8325
|
s.percent,
|
|
8334
8326
|
"%"
|
|
8335
8327
|
] })
|
|
8336
8328
|
] }),
|
|
8337
|
-
typeof s.percent === "number" && /* @__PURE__ */
|
|
8329
|
+
typeof s.percent === "number" && /* @__PURE__ */ jsx82(
|
|
8338
8330
|
"span",
|
|
8339
8331
|
{
|
|
8340
8332
|
"aria-hidden": "true",
|
|
8341
8333
|
className: "block h-1 overflow-hidden rounded-v2-pill bg-v2-bg-subtle",
|
|
8342
|
-
children: /* @__PURE__ */
|
|
8334
|
+
children: /* @__PURE__ */ jsx82(
|
|
8343
8335
|
"span",
|
|
8344
8336
|
{
|
|
8345
8337
|
className: "block h-full bg-v2-action-primary transition-all",
|
|
@@ -8358,7 +8350,7 @@ function FormWithAside({
|
|
|
8358
8350
|
}
|
|
8359
8351
|
) }, s.id);
|
|
8360
8352
|
}) }) }),
|
|
8361
|
-
asideExtra && /* @__PURE__ */
|
|
8353
|
+
asideExtra && /* @__PURE__ */ jsx82("div", { className: "border-t border-v2-border-default pt-3", children: asideExtra })
|
|
8362
8354
|
] })
|
|
8363
8355
|
]
|
|
8364
8356
|
}
|
|
@@ -8367,7 +8359,7 @@ function FormWithAside({
|
|
|
8367
8359
|
}
|
|
8368
8360
|
|
|
8369
8361
|
// src/patterns/HorizontalBarChart/HorizontalBarChart.tsx
|
|
8370
|
-
import { jsx as
|
|
8362
|
+
import { jsx as jsx83, jsxs as jsxs61 } from "react/jsx-runtime";
|
|
8371
8363
|
var PALETTE = [
|
|
8372
8364
|
"var(--v2-chart-cat-1)",
|
|
8373
8365
|
"var(--v2-chart-cat-2)",
|
|
@@ -8386,7 +8378,7 @@ function HorizontalBarChart({
|
|
|
8386
8378
|
showSecondary = false
|
|
8387
8379
|
}) {
|
|
8388
8380
|
const max = Math.max(1, ...items.map((i) => i.value));
|
|
8389
|
-
return /* @__PURE__ */
|
|
8381
|
+
return /* @__PURE__ */ jsx83(
|
|
8390
8382
|
"div",
|
|
8391
8383
|
{
|
|
8392
8384
|
role: "img",
|
|
@@ -8403,13 +8395,13 @@ function HorizontalBarChart({
|
|
|
8403
8395
|
title: hasSecondary ? `${item.label}: ${valueFormatter(item.value)} \xB7 ${secondaryFormatter(item.secondaryValue ?? 0)}` : `${item.label}: ${valueFormatter(item.value)}`,
|
|
8404
8396
|
children: [
|
|
8405
8397
|
/* @__PURE__ */ jsxs61("div", { className: "flex items-baseline justify-between gap-3", children: [
|
|
8406
|
-
/* @__PURE__ */
|
|
8398
|
+
/* @__PURE__ */ jsx83("span", { className: "truncate text-v2-xs font-semibold text-v2-fg-muted", children: item.label }),
|
|
8407
8399
|
/* @__PURE__ */ jsxs61("span", { className: "flex items-baseline gap-2", children: [
|
|
8408
|
-
/* @__PURE__ */
|
|
8409
|
-
hasSecondary && /* @__PURE__ */
|
|
8400
|
+
/* @__PURE__ */ jsx83("span", { className: "font-bold text-v2-fg-default", children: valueFormatter(item.value) }),
|
|
8401
|
+
hasSecondary && /* @__PURE__ */ jsx83("span", { className: "text-v2-xs text-v2-fg-subtle", children: item.secondaryLabel ? `${item.secondaryLabel} ${secondaryFormatter(item.secondaryValue ?? 0)}` : secondaryFormatter(item.secondaryValue ?? 0) })
|
|
8410
8402
|
] })
|
|
8411
8403
|
] }),
|
|
8412
|
-
/* @__PURE__ */
|
|
8404
|
+
/* @__PURE__ */ jsx83("div", { className: "h-2.5 w-full overflow-hidden rounded-v2-pill bg-v2-bg-subtle", children: /* @__PURE__ */ jsx83(
|
|
8413
8405
|
"div",
|
|
8414
8406
|
{
|
|
8415
8407
|
className: "h-full rounded-v2-pill transition-all duration-300 group-hover:brightness-110",
|
|
@@ -8442,7 +8434,7 @@ import {
|
|
|
8442
8434
|
XAxis,
|
|
8443
8435
|
YAxis
|
|
8444
8436
|
} from "recharts";
|
|
8445
|
-
import { jsx as
|
|
8437
|
+
import { jsx as jsx84, jsxs as jsxs62 } from "react/jsx-runtime";
|
|
8446
8438
|
function toRows(labels, series) {
|
|
8447
8439
|
return labels.map((label, i) => {
|
|
8448
8440
|
const row = { x: label };
|
|
@@ -8464,9 +8456,9 @@ function ChartTooltip2({
|
|
|
8464
8456
|
}) {
|
|
8465
8457
|
if (!active || !(payload == null ? void 0 : payload.length)) return null;
|
|
8466
8458
|
return /* @__PURE__ */ jsxs62("div", { className: "rounded-v2-md border border-v2-border-default bg-v2-panel px-3 py-2 text-v2-xs shadow-lg", children: [
|
|
8467
|
-
/* @__PURE__ */
|
|
8468
|
-
/* @__PURE__ */
|
|
8469
|
-
/* @__PURE__ */
|
|
8459
|
+
/* @__PURE__ */ jsx84("p", { className: "font-semibold text-v2-fg-default", children: formatLabel(label ?? "") }),
|
|
8460
|
+
/* @__PURE__ */ jsx84("div", { className: "mt-1 flex flex-col gap-0.5", children: payload.map((p) => /* @__PURE__ */ jsxs62("div", { className: "flex items-center gap-2", children: [
|
|
8461
|
+
/* @__PURE__ */ jsx84(
|
|
8470
8462
|
"span",
|
|
8471
8463
|
{
|
|
8472
8464
|
className: "size-2 rounded-full",
|
|
@@ -8478,7 +8470,7 @@ function ChartTooltip2({
|
|
|
8478
8470
|
p.name,
|
|
8479
8471
|
":"
|
|
8480
8472
|
] }),
|
|
8481
|
-
/* @__PURE__ */
|
|
8473
|
+
/* @__PURE__ */ jsx84("span", { className: "font-semibold text-v2-fg-default", children: formatValue(typeof p.value === "number" ? p.value : 0) })
|
|
8482
8474
|
] }, p.name)) })
|
|
8483
8475
|
] });
|
|
8484
8476
|
}
|
|
@@ -8494,15 +8486,15 @@ function LineChart({
|
|
|
8494
8486
|
}) {
|
|
8495
8487
|
const rows = toRows(labels, series);
|
|
8496
8488
|
const Chart = variant === "area" ? RechartsAreaChart : RechartsLineChart;
|
|
8497
|
-
return /* @__PURE__ */
|
|
8489
|
+
return /* @__PURE__ */ jsx84(
|
|
8498
8490
|
"div",
|
|
8499
8491
|
{
|
|
8500
8492
|
role: "img",
|
|
8501
8493
|
"aria-label": ariaLabel,
|
|
8502
8494
|
className: cn("w-full", className),
|
|
8503
8495
|
style: { height },
|
|
8504
|
-
children: /* @__PURE__ */
|
|
8505
|
-
/* @__PURE__ */
|
|
8496
|
+
children: /* @__PURE__ */ jsx84(ResponsiveContainer2, { width: "100%", height: "100%", children: /* @__PURE__ */ jsxs62(Chart, { data: rows, margin: { top: 8, right: 12, left: 0, bottom: 0 }, children: [
|
|
8497
|
+
/* @__PURE__ */ jsx84("defs", { children: series.map((s, i) => /* @__PURE__ */ jsxs62(
|
|
8506
8498
|
"linearGradient",
|
|
8507
8499
|
{
|
|
8508
8500
|
id: `v2-line-grad-${i}`,
|
|
@@ -8511,13 +8503,13 @@ function LineChart({
|
|
|
8511
8503
|
x2: "0",
|
|
8512
8504
|
y2: "1",
|
|
8513
8505
|
children: [
|
|
8514
|
-
/* @__PURE__ */
|
|
8515
|
-
/* @__PURE__ */
|
|
8506
|
+
/* @__PURE__ */ jsx84("stop", { offset: "0%", stopColor: s.color, stopOpacity: 0.35 }),
|
|
8507
|
+
/* @__PURE__ */ jsx84("stop", { offset: "95%", stopColor: s.color, stopOpacity: 0 })
|
|
8516
8508
|
]
|
|
8517
8509
|
},
|
|
8518
8510
|
`grad-${s.name}-${i}`
|
|
8519
8511
|
)) }),
|
|
8520
|
-
/* @__PURE__ */
|
|
8512
|
+
/* @__PURE__ */ jsx84(
|
|
8521
8513
|
CartesianGrid,
|
|
8522
8514
|
{
|
|
8523
8515
|
strokeDasharray: "3 4",
|
|
@@ -8525,7 +8517,7 @@ function LineChart({
|
|
|
8525
8517
|
vertical: false
|
|
8526
8518
|
}
|
|
8527
8519
|
),
|
|
8528
|
-
/* @__PURE__ */
|
|
8520
|
+
/* @__PURE__ */ jsx84(
|
|
8529
8521
|
XAxis,
|
|
8530
8522
|
{
|
|
8531
8523
|
dataKey: "x",
|
|
@@ -8534,7 +8526,7 @@ function LineChart({
|
|
|
8534
8526
|
axisLine: { stroke: "var(--v2-border-default)" }
|
|
8535
8527
|
}
|
|
8536
8528
|
),
|
|
8537
|
-
/* @__PURE__ */
|
|
8529
|
+
/* @__PURE__ */ jsx84(
|
|
8538
8530
|
YAxis,
|
|
8539
8531
|
{
|
|
8540
8532
|
tick: { fill: "var(--v2-fg-subtle)", fontSize: 11 },
|
|
@@ -8544,14 +8536,14 @@ function LineChart({
|
|
|
8544
8536
|
width: 70
|
|
8545
8537
|
}
|
|
8546
8538
|
),
|
|
8547
|
-
/* @__PURE__ */
|
|
8539
|
+
/* @__PURE__ */ jsx84(
|
|
8548
8540
|
Tooltip3,
|
|
8549
8541
|
{
|
|
8550
8542
|
cursor: {
|
|
8551
8543
|
stroke: "var(--v2-border-default)",
|
|
8552
8544
|
strokeDasharray: "3 4"
|
|
8553
8545
|
},
|
|
8554
|
-
content: /* @__PURE__ */
|
|
8546
|
+
content: /* @__PURE__ */ jsx84(
|
|
8555
8547
|
ChartTooltip2,
|
|
8556
8548
|
{
|
|
8557
8549
|
formatValue,
|
|
@@ -8560,7 +8552,7 @@ function LineChart({
|
|
|
8560
8552
|
)
|
|
8561
8553
|
}
|
|
8562
8554
|
),
|
|
8563
|
-
/* @__PURE__ */
|
|
8555
|
+
/* @__PURE__ */ jsx84(
|
|
8564
8556
|
Legend,
|
|
8565
8557
|
{
|
|
8566
8558
|
verticalAlign: "top",
|
|
@@ -8570,7 +8562,7 @@ function LineChart({
|
|
|
8570
8562
|
}
|
|
8571
8563
|
),
|
|
8572
8564
|
series.map(
|
|
8573
|
-
(s, i) => variant === "area" ? /* @__PURE__ */
|
|
8565
|
+
(s, i) => variant === "area" ? /* @__PURE__ */ jsx84(
|
|
8574
8566
|
Area,
|
|
8575
8567
|
{
|
|
8576
8568
|
type: "monotone",
|
|
@@ -8585,7 +8577,7 @@ function LineChart({
|
|
|
8585
8577
|
}
|
|
8586
8578
|
},
|
|
8587
8579
|
s.name
|
|
8588
|
-
) : /* @__PURE__ */
|
|
8580
|
+
) : /* @__PURE__ */ jsx84(
|
|
8589
8581
|
Line,
|
|
8590
8582
|
{
|
|
8591
8583
|
type: "monotone",
|
|
@@ -8609,7 +8601,7 @@ function LineChart({
|
|
|
8609
8601
|
|
|
8610
8602
|
// src/patterns/PanelCard/PanelCard.tsx
|
|
8611
8603
|
import { forwardRef as forwardRef54 } from "react";
|
|
8612
|
-
import { jsx as
|
|
8604
|
+
import { jsx as jsx85, jsxs as jsxs63 } from "react/jsx-runtime";
|
|
8613
8605
|
var PanelCard = forwardRef54(
|
|
8614
8606
|
({
|
|
8615
8607
|
icon,
|
|
@@ -8649,18 +8641,18 @@ var PanelCard = forwardRef54(
|
|
|
8649
8641
|
),
|
|
8650
8642
|
children: [
|
|
8651
8643
|
/* @__PURE__ */ jsxs63("div", { className: "flex min-w-0 items-start gap-3", children: [
|
|
8652
|
-
icon && /* @__PURE__ */
|
|
8644
|
+
icon && /* @__PURE__ */ jsx85("span", { className: "inline-flex size-9 shrink-0 items-center justify-center rounded-v2-md bg-v2-brand-bg-soft text-v2-brand-text-dark", children: icon }),
|
|
8653
8645
|
(title || subtitle) && /* @__PURE__ */ jsxs63("div", { className: "flex min-w-0 flex-col gap-0.5", children: [
|
|
8654
|
-
title && /* @__PURE__ */
|
|
8655
|
-
subtitle && /* @__PURE__ */
|
|
8646
|
+
title && /* @__PURE__ */ jsx85("h2", { className: "m-0 text-v2-base font-semibold text-v2-fg-default", children: title }),
|
|
8647
|
+
subtitle && /* @__PURE__ */ jsx85("p", { className: "m-0 text-v2-sm text-v2-fg-muted", children: subtitle })
|
|
8656
8648
|
] })
|
|
8657
8649
|
] }),
|
|
8658
|
-
actions && /* @__PURE__ */
|
|
8650
|
+
actions && /* @__PURE__ */ jsx85("div", { className: "flex shrink-0 items-center gap-2", children: actions })
|
|
8659
8651
|
]
|
|
8660
8652
|
}
|
|
8661
8653
|
),
|
|
8662
|
-
children !== void 0 && /* @__PURE__ */
|
|
8663
|
-
footer && /* @__PURE__ */
|
|
8654
|
+
children !== void 0 && /* @__PURE__ */ jsx85("div", { className: cn(padding, bodyClassName), children }),
|
|
8655
|
+
footer && /* @__PURE__ */ jsx85(
|
|
8664
8656
|
"footer",
|
|
8665
8657
|
{
|
|
8666
8658
|
className: cn(
|
|
@@ -8679,7 +8671,7 @@ PanelCard.displayName = "PanelCard";
|
|
|
8679
8671
|
|
|
8680
8672
|
// src/patterns/SectionCard/SectionCard.tsx
|
|
8681
8673
|
import { WarningCircle as WarningCircle5 } from "@phosphor-icons/react";
|
|
8682
|
-
import { jsx as
|
|
8674
|
+
import { jsx as jsx86, jsxs as jsxs64 } from "react/jsx-runtime";
|
|
8683
8675
|
function SectionCard({
|
|
8684
8676
|
title,
|
|
8685
8677
|
icon,
|
|
@@ -8701,7 +8693,7 @@ function SectionCard({
|
|
|
8701
8693
|
children: [
|
|
8702
8694
|
/* @__PURE__ */ jsxs64("div", { className: "flex flex-wrap items-center justify-between gap-x-3 gap-y-2 border-b border-v2-border-subtle pb-3", children: [
|
|
8703
8695
|
/* @__PURE__ */ jsxs64("div", { className: "flex items-center gap-2", children: [
|
|
8704
|
-
icon && /* @__PURE__ */
|
|
8696
|
+
icon && /* @__PURE__ */ jsx86(
|
|
8705
8697
|
"span",
|
|
8706
8698
|
{
|
|
8707
8699
|
"aria-hidden": "true",
|
|
@@ -8709,9 +8701,9 @@ function SectionCard({
|
|
|
8709
8701
|
children: icon
|
|
8710
8702
|
}
|
|
8711
8703
|
),
|
|
8712
|
-
/* @__PURE__ */
|
|
8704
|
+
/* @__PURE__ */ jsx86(Heading, { level: 3, size: "sm", children: title }),
|
|
8713
8705
|
highlight && /* @__PURE__ */ jsxs64("span", { className: "inline-flex items-center gap-1 rounded-v2-pill bg-v2-warn-soft px-2 py-0.5 text-[11px] font-bold text-v2-warn-fg", children: [
|
|
8714
|
-
/* @__PURE__ */
|
|
8706
|
+
/* @__PURE__ */ jsx86(WarningCircle5, { size: 11, weight: "fill", "aria-hidden": "true" }),
|
|
8715
8707
|
"Pendente"
|
|
8716
8708
|
] })
|
|
8717
8709
|
] }),
|
|
@@ -8734,7 +8726,7 @@ import {
|
|
|
8734
8726
|
XAxis as XAxis2,
|
|
8735
8727
|
YAxis as YAxis2
|
|
8736
8728
|
} from "recharts";
|
|
8737
|
-
import { jsx as
|
|
8729
|
+
import { jsx as jsx87, jsxs as jsxs65 } from "react/jsx-runtime";
|
|
8738
8730
|
function toRows2(labels, stacks) {
|
|
8739
8731
|
return labels.map((label, i) => {
|
|
8740
8732
|
const row = { x: label };
|
|
@@ -8760,10 +8752,10 @@ function ChartTooltip3({
|
|
|
8760
8752
|
0
|
|
8761
8753
|
);
|
|
8762
8754
|
return /* @__PURE__ */ jsxs65("div", { className: "rounded-v2-md border border-v2-border-default bg-v2-panel px-3 py-2 text-v2-xs shadow-lg", children: [
|
|
8763
|
-
/* @__PURE__ */
|
|
8755
|
+
/* @__PURE__ */ jsx87("p", { className: "font-semibold text-v2-fg-default", children: formatLabel(label ?? "") }),
|
|
8764
8756
|
/* @__PURE__ */ jsxs65("div", { className: "mt-1 flex flex-col gap-0.5", children: [
|
|
8765
8757
|
payload.map((p) => /* @__PURE__ */ jsxs65("div", { className: "flex items-center gap-2", children: [
|
|
8766
|
-
/* @__PURE__ */
|
|
8758
|
+
/* @__PURE__ */ jsx87(
|
|
8767
8759
|
"span",
|
|
8768
8760
|
{
|
|
8769
8761
|
className: "size-2 rounded-sm",
|
|
@@ -8775,11 +8767,11 @@ function ChartTooltip3({
|
|
|
8775
8767
|
p.name,
|
|
8776
8768
|
":"
|
|
8777
8769
|
] }),
|
|
8778
|
-
/* @__PURE__ */
|
|
8770
|
+
/* @__PURE__ */ jsx87("span", { className: "font-semibold text-v2-fg-default", children: formatValue(typeof p.value === "number" ? p.value : 0) })
|
|
8779
8771
|
] }, p.name)),
|
|
8780
8772
|
/* @__PURE__ */ jsxs65("div", { className: "mt-1 flex items-center justify-between gap-2 border-t border-v2-border-default pt-1", children: [
|
|
8781
|
-
/* @__PURE__ */
|
|
8782
|
-
/* @__PURE__ */
|
|
8773
|
+
/* @__PURE__ */ jsx87("span", { className: "text-v2-fg-muted", children: "Total:" }),
|
|
8774
|
+
/* @__PURE__ */ jsx87("span", { className: "font-semibold text-v2-fg-default", children: formatValue(total) })
|
|
8783
8775
|
] })
|
|
8784
8776
|
] })
|
|
8785
8777
|
] });
|
|
@@ -8794,20 +8786,20 @@ function StackedBarChart({
|
|
|
8794
8786
|
formatLabel = (l) => l
|
|
8795
8787
|
}) {
|
|
8796
8788
|
const rows = toRows2(labels, stacks);
|
|
8797
|
-
return /* @__PURE__ */
|
|
8789
|
+
return /* @__PURE__ */ jsx87(
|
|
8798
8790
|
"div",
|
|
8799
8791
|
{
|
|
8800
8792
|
role: "img",
|
|
8801
8793
|
"aria-label": ariaLabel,
|
|
8802
8794
|
className: cn("w-full", className),
|
|
8803
8795
|
style: { height },
|
|
8804
|
-
children: /* @__PURE__ */
|
|
8796
|
+
children: /* @__PURE__ */ jsx87(ResponsiveContainer3, { width: "100%", height: "100%", children: /* @__PURE__ */ jsxs65(
|
|
8805
8797
|
BarChart,
|
|
8806
8798
|
{
|
|
8807
8799
|
data: rows,
|
|
8808
8800
|
margin: { top: 8, right: 12, left: 0, bottom: 0 },
|
|
8809
8801
|
children: [
|
|
8810
|
-
/* @__PURE__ */
|
|
8802
|
+
/* @__PURE__ */ jsx87(
|
|
8811
8803
|
CartesianGrid2,
|
|
8812
8804
|
{
|
|
8813
8805
|
strokeDasharray: "3 4",
|
|
@@ -8815,7 +8807,7 @@ function StackedBarChart({
|
|
|
8815
8807
|
vertical: false
|
|
8816
8808
|
}
|
|
8817
8809
|
),
|
|
8818
|
-
/* @__PURE__ */
|
|
8810
|
+
/* @__PURE__ */ jsx87(
|
|
8819
8811
|
XAxis2,
|
|
8820
8812
|
{
|
|
8821
8813
|
dataKey: "x",
|
|
@@ -8824,7 +8816,7 @@ function StackedBarChart({
|
|
|
8824
8816
|
axisLine: { stroke: "var(--v2-border-default)" }
|
|
8825
8817
|
}
|
|
8826
8818
|
),
|
|
8827
|
-
/* @__PURE__ */
|
|
8819
|
+
/* @__PURE__ */ jsx87(
|
|
8828
8820
|
YAxis2,
|
|
8829
8821
|
{
|
|
8830
8822
|
tick: { fill: "var(--v2-fg-subtle)", fontSize: 11 },
|
|
@@ -8834,11 +8826,11 @@ function StackedBarChart({
|
|
|
8834
8826
|
width: 70
|
|
8835
8827
|
}
|
|
8836
8828
|
),
|
|
8837
|
-
/* @__PURE__ */
|
|
8829
|
+
/* @__PURE__ */ jsx87(
|
|
8838
8830
|
Tooltip4,
|
|
8839
8831
|
{
|
|
8840
8832
|
cursor: { fill: "var(--v2-bg-subtle)" },
|
|
8841
|
-
content: /* @__PURE__ */
|
|
8833
|
+
content: /* @__PURE__ */ jsx87(
|
|
8842
8834
|
ChartTooltip3,
|
|
8843
8835
|
{
|
|
8844
8836
|
formatValue,
|
|
@@ -8847,7 +8839,7 @@ function StackedBarChart({
|
|
|
8847
8839
|
)
|
|
8848
8840
|
}
|
|
8849
8841
|
),
|
|
8850
|
-
/* @__PURE__ */
|
|
8842
|
+
/* @__PURE__ */ jsx87(
|
|
8851
8843
|
Legend2,
|
|
8852
8844
|
{
|
|
8853
8845
|
verticalAlign: "top",
|
|
@@ -8856,7 +8848,7 @@ function StackedBarChart({
|
|
|
8856
8848
|
wrapperStyle: { fontSize: 11, paddingBottom: 8 }
|
|
8857
8849
|
}
|
|
8858
8850
|
),
|
|
8859
|
-
stacks.map((s) => /* @__PURE__ */
|
|
8851
|
+
stacks.map((s) => /* @__PURE__ */ jsx87(
|
|
8860
8852
|
Bar,
|
|
8861
8853
|
{
|
|
8862
8854
|
dataKey: s.name,
|
|
@@ -8875,11 +8867,11 @@ function StackedBarChart({
|
|
|
8875
8867
|
|
|
8876
8868
|
// src/patterns/WorkflowDesigner/WorkflowDesigner.tsx
|
|
8877
8869
|
import { Lightning, Hand, Gear as Gear2 } from "@phosphor-icons/react";
|
|
8878
|
-
import { jsx as
|
|
8870
|
+
import { jsx as jsx88, jsxs as jsxs66 } from "react/jsx-runtime";
|
|
8879
8871
|
var kindIconMap = {
|
|
8880
|
-
automatic: /* @__PURE__ */
|
|
8881
|
-
manual: /* @__PURE__ */
|
|
8882
|
-
system: /* @__PURE__ */
|
|
8872
|
+
automatic: /* @__PURE__ */ jsx88(Lightning, { size: 14, "aria-hidden": "true" }),
|
|
8873
|
+
manual: /* @__PURE__ */ jsx88(Hand, { size: 14, "aria-hidden": "true" }),
|
|
8874
|
+
system: /* @__PURE__ */ jsx88(Gear2, { size: 14, "aria-hidden": "true" })
|
|
8883
8875
|
};
|
|
8884
8876
|
function NodeCard({
|
|
8885
8877
|
node,
|
|
@@ -8900,8 +8892,8 @@ function NodeCard({
|
|
|
8900
8892
|
),
|
|
8901
8893
|
children: [
|
|
8902
8894
|
/* @__PURE__ */ jsxs66("div", { className: "mb-1 flex items-center gap-1.5", children: [
|
|
8903
|
-
/* @__PURE__ */
|
|
8904
|
-
/* @__PURE__ */
|
|
8895
|
+
/* @__PURE__ */ jsx88("span", { className: "text-v2-fg-muted", children: kindIconMap[node.kind] }),
|
|
8896
|
+
/* @__PURE__ */ jsx88("span", { className: "truncate text-v2-sm font-semibold text-v2-fg-default", children: node.label })
|
|
8905
8897
|
] }),
|
|
8906
8898
|
(rulesCount > 0 || actionsCount > 0) && /* @__PURE__ */ jsxs66("div", { className: "mt-1.5 flex flex-wrap items-center gap-1", children: [
|
|
8907
8899
|
rulesCount > 0 && /* @__PURE__ */ jsxs66(Badge, { size: "sm", variant: "default", children: [
|
|
@@ -8925,11 +8917,11 @@ function SidePanel({
|
|
|
8925
8917
|
}) {
|
|
8926
8918
|
const selected = nodes.find((n) => n.id === selectedNodeId);
|
|
8927
8919
|
return /* @__PURE__ */ jsxs66("div", { className: "w-72 shrink-0 rounded-v2-lg border border-v2-border-default bg-v2-panel p-4 shadow-sm", children: [
|
|
8928
|
-
/* @__PURE__ */
|
|
8929
|
-
!selected ? /* @__PURE__ */
|
|
8930
|
-
/* @__PURE__ */
|
|
8920
|
+
/* @__PURE__ */ jsx88(Heading, { level: 3, size: "xs", className: "mb-3", children: "Regras e a\xE7\xF5es" }),
|
|
8921
|
+
!selected ? /* @__PURE__ */ jsx88(Text, { size: "sm", color: "muted", children: "Selecione um n\xF3 para configurar" }) : /* @__PURE__ */ jsxs66("div", { className: "flex flex-col gap-4", children: [
|
|
8922
|
+
/* @__PURE__ */ jsx88(Text, { size: "base", weight: "semibold", children: selected.label }),
|
|
8931
8923
|
/* @__PURE__ */ jsxs66("section", { children: [
|
|
8932
|
-
/* @__PURE__ */
|
|
8924
|
+
/* @__PURE__ */ jsx88(
|
|
8933
8925
|
Text,
|
|
8934
8926
|
{
|
|
8935
8927
|
size: "xs",
|
|
@@ -8939,13 +8931,13 @@ function SidePanel({
|
|
|
8939
8931
|
children: "Regras"
|
|
8940
8932
|
}
|
|
8941
8933
|
),
|
|
8942
|
-
!selected.rules || selected.rules.length === 0 ? /* @__PURE__ */
|
|
8943
|
-
/* @__PURE__ */
|
|
8944
|
-
/* @__PURE__ */
|
|
8934
|
+
!selected.rules || selected.rules.length === 0 ? /* @__PURE__ */ jsx88(Text, { size: "sm", color: "muted", children: "Nenhuma regra" }) : /* @__PURE__ */ jsx88("ul", { className: "flex flex-col gap-1.5", children: selected.rules.map((rule, idx) => /* @__PURE__ */ jsxs66("li", { className: "flex flex-col gap-0.5", children: [
|
|
8935
|
+
/* @__PURE__ */ jsx88(Text, { size: "xs", color: "muted", children: rule.type }),
|
|
8936
|
+
/* @__PURE__ */ jsx88("code", { className: "rounded-v2-sm bg-v2-bg-subtle px-1.5 py-0.5 font-mono text-v2-xs text-v2-fg-default", children: rule.value })
|
|
8945
8937
|
] }, idx)) })
|
|
8946
8938
|
] }),
|
|
8947
8939
|
/* @__PURE__ */ jsxs66("section", { children: [
|
|
8948
|
-
/* @__PURE__ */
|
|
8940
|
+
/* @__PURE__ */ jsx88(
|
|
8949
8941
|
Text,
|
|
8950
8942
|
{
|
|
8951
8943
|
size: "xs",
|
|
@@ -8955,9 +8947,9 @@ function SidePanel({
|
|
|
8955
8947
|
children: "A\xE7\xF5es"
|
|
8956
8948
|
}
|
|
8957
8949
|
),
|
|
8958
|
-
!selected.actions || selected.actions.length === 0 ? /* @__PURE__ */
|
|
8959
|
-
/* @__PURE__ */
|
|
8960
|
-
/* @__PURE__ */
|
|
8950
|
+
!selected.actions || selected.actions.length === 0 ? /* @__PURE__ */ jsx88(Text, { size: "sm", color: "muted", children: "Nenhuma a\xE7\xE3o" }) : /* @__PURE__ */ jsx88("ul", { className: "flex flex-col gap-1.5", children: selected.actions.map((action, idx) => /* @__PURE__ */ jsxs66("li", { className: "flex flex-col gap-0.5", children: [
|
|
8951
|
+
/* @__PURE__ */ jsx88(Text, { size: "xs", color: "muted", children: action.type }),
|
|
8952
|
+
/* @__PURE__ */ jsx88("code", { className: "rounded-v2-sm bg-v2-bg-subtle px-1.5 py-0.5 font-mono text-v2-xs text-v2-fg-default", children: action.event })
|
|
8961
8953
|
] }, idx)) })
|
|
8962
8954
|
] })
|
|
8963
8955
|
] })
|
|
@@ -8980,12 +8972,12 @@ function WorkflowDesigner({
|
|
|
8980
8972
|
const colCount = phases.length;
|
|
8981
8973
|
return /* @__PURE__ */ jsxs66("div", { className: cn("flex gap-4", className), ...props, children: [
|
|
8982
8974
|
/* @__PURE__ */ jsxs66("div", { className: "min-h-[480px] flex-1 rounded-v2-lg border border-v2-border-default bg-v2-bg-subtle p-4", children: [
|
|
8983
|
-
/* @__PURE__ */
|
|
8975
|
+
/* @__PURE__ */ jsx88(
|
|
8984
8976
|
"div",
|
|
8985
8977
|
{
|
|
8986
8978
|
className: "mb-3 grid gap-3 border-b border-v2-border-default pb-2",
|
|
8987
8979
|
style: { gridTemplateColumns: `repeat(${colCount}, minmax(0, 1fr))` },
|
|
8988
|
-
children: phases.map((phase) => /* @__PURE__ */
|
|
8980
|
+
children: phases.map((phase) => /* @__PURE__ */ jsx88(
|
|
8989
8981
|
"div",
|
|
8990
8982
|
{
|
|
8991
8983
|
className: "text-v2-xs font-bold uppercase tracking-wide text-v2-fg-muted",
|
|
@@ -8995,14 +8987,14 @@ function WorkflowDesigner({
|
|
|
8995
8987
|
))
|
|
8996
8988
|
}
|
|
8997
8989
|
),
|
|
8998
|
-
/* @__PURE__ */
|
|
8990
|
+
/* @__PURE__ */ jsx88(
|
|
8999
8991
|
"div",
|
|
9000
8992
|
{
|
|
9001
8993
|
className: "grid gap-3",
|
|
9002
8994
|
style: { gridTemplateColumns: `repeat(${colCount}, minmax(0, 1fr))` },
|
|
9003
8995
|
children: phases.map((phase) => {
|
|
9004
8996
|
const phaseNodes = nodes.filter((n) => n.phase === phase);
|
|
9005
|
-
return /* @__PURE__ */
|
|
8997
|
+
return /* @__PURE__ */ jsx88("div", { className: "flex flex-col gap-2", children: phaseNodes.map((node) => /* @__PURE__ */ jsx88(
|
|
9006
8998
|
NodeCard,
|
|
9007
8999
|
{
|
|
9008
9000
|
node,
|
|
@@ -9014,21 +9006,21 @@ function WorkflowDesigner({
|
|
|
9014
9006
|
})
|
|
9015
9007
|
}
|
|
9016
9008
|
),
|
|
9017
|
-
edges.length > 0 && /* @__PURE__ */
|
|
9009
|
+
edges.length > 0 && /* @__PURE__ */ jsx88(
|
|
9018
9010
|
"div",
|
|
9019
9011
|
{
|
|
9020
9012
|
className: "mt-4 border-t border-v2-border-default pt-3",
|
|
9021
9013
|
"aria-label": "Transi\xE7\xF5es",
|
|
9022
|
-
children: /* @__PURE__ */
|
|
9014
|
+
children: /* @__PURE__ */ jsx88("div", { className: "flex flex-wrap gap-2", children: edges.map((edge, idx) => /* @__PURE__ */ jsxs66(
|
|
9023
9015
|
"div",
|
|
9024
9016
|
{
|
|
9025
9017
|
className: "flex items-center gap-1 rounded-v2-sm border border-v2-border-default bg-v2-panel px-2 py-0.5",
|
|
9026
9018
|
title: `${edge.from} \u2192 ${edge.to}`,
|
|
9027
9019
|
children: [
|
|
9028
|
-
/* @__PURE__ */
|
|
9029
|
-
/* @__PURE__ */
|
|
9030
|
-
/* @__PURE__ */
|
|
9031
|
-
edge.trigger && /* @__PURE__ */
|
|
9020
|
+
/* @__PURE__ */ jsx88("span", { className: "font-mono text-v2-xs text-v2-fg-subtle", children: edge.from }),
|
|
9021
|
+
/* @__PURE__ */ jsx88("span", { className: "text-v2-xs text-v2-fg-subtle", children: "\u2192" }),
|
|
9022
|
+
/* @__PURE__ */ jsx88("span", { className: "font-mono text-v2-xs text-v2-fg-subtle", children: edge.to }),
|
|
9023
|
+
edge.trigger && /* @__PURE__ */ jsx88(Badge, { size: "sm", variant: "default", className: "ml-1", children: edge.trigger })
|
|
9032
9024
|
]
|
|
9033
9025
|
},
|
|
9034
9026
|
idx
|
|
@@ -9036,8 +9028,8 @@ function WorkflowDesigner({
|
|
|
9036
9028
|
}
|
|
9037
9029
|
)
|
|
9038
9030
|
] }),
|
|
9039
|
-
showPanel && /* @__PURE__ */
|
|
9040
|
-
showSidePanel !== false && !selectedNodeId && /* @__PURE__ */
|
|
9031
|
+
showPanel && /* @__PURE__ */ jsx88(SidePanel, { nodes, selectedNodeId }),
|
|
9032
|
+
showSidePanel !== false && !selectedNodeId && /* @__PURE__ */ jsx88(SidePanel, { nodes, selectedNodeId: void 0 })
|
|
9041
9033
|
] });
|
|
9042
9034
|
}
|
|
9043
9035
|
export {
|