@mlw-packages/react-components 1.7.4 → 1.7.6
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/README.md +3 -15
- package/dist/index.css +226 -151
- package/dist/index.d.mts +52 -12
- package/dist/index.d.ts +52 -12
- package/dist/index.js +775 -526
- package/dist/index.mjs +735 -475
- package/package.json +3 -1
package/dist/index.mjs
CHANGED
|
@@ -26,9 +26,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
|
|
29
|
-
// node_modules/picocolors/picocolors.browser.js
|
|
29
|
+
// node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.browser.js
|
|
30
30
|
var require_picocolors_browser = __commonJS({
|
|
31
|
-
"node_modules/picocolors/picocolors.browser.js"(exports, module) {
|
|
31
|
+
"node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.browser.js"(exports, module) {
|
|
32
32
|
"use strict";
|
|
33
33
|
var x = String;
|
|
34
34
|
var create = function() {
|
|
@@ -39,9 +39,9 @@ var require_picocolors_browser = __commonJS({
|
|
|
39
39
|
}
|
|
40
40
|
});
|
|
41
41
|
|
|
42
|
-
// node_modules/tailwindcss/lib/util/log.js
|
|
42
|
+
// node_modules/.pnpm/tailwindcss@3.4.18_yaml@2.8.1/node_modules/tailwindcss/lib/util/log.js
|
|
43
43
|
var require_log = __commonJS({
|
|
44
|
-
"node_modules/tailwindcss/lib/util/log.js"(exports) {
|
|
44
|
+
"node_modules/.pnpm/tailwindcss@3.4.18_yaml@2.8.1/node_modules/tailwindcss/lib/util/log.js"(exports) {
|
|
45
45
|
"use strict";
|
|
46
46
|
Object.defineProperty(exports, "__esModule", {
|
|
47
47
|
value: true
|
|
@@ -106,9 +106,9 @@ var require_log = __commonJS({
|
|
|
106
106
|
}
|
|
107
107
|
});
|
|
108
108
|
|
|
109
|
-
// node_modules/tailwindcss/lib/public/colors.js
|
|
109
|
+
// node_modules/.pnpm/tailwindcss@3.4.18_yaml@2.8.1/node_modules/tailwindcss/lib/public/colors.js
|
|
110
110
|
var require_colors = __commonJS({
|
|
111
|
-
"node_modules/tailwindcss/lib/public/colors.js"(exports) {
|
|
111
|
+
"node_modules/.pnpm/tailwindcss@3.4.18_yaml@2.8.1/node_modules/tailwindcss/lib/public/colors.js"(exports) {
|
|
112
112
|
"use strict";
|
|
113
113
|
Object.defineProperty(exports, "__esModule", {
|
|
114
114
|
value: true
|
|
@@ -467,9 +467,9 @@ var require_colors = __commonJS({
|
|
|
467
467
|
}
|
|
468
468
|
});
|
|
469
469
|
|
|
470
|
-
// node_modules/tailwindcss/colors.js
|
|
470
|
+
// node_modules/.pnpm/tailwindcss@3.4.18_yaml@2.8.1/node_modules/tailwindcss/colors.js
|
|
471
471
|
var require_colors2 = __commonJS({
|
|
472
|
-
"node_modules/tailwindcss/colors.js"(exports, module) {
|
|
472
|
+
"node_modules/.pnpm/tailwindcss@3.4.18_yaml@2.8.1/node_modules/tailwindcss/colors.js"(exports, module) {
|
|
473
473
|
"use strict";
|
|
474
474
|
var colors2 = require_colors();
|
|
475
475
|
module.exports = (colors2.__esModule ? colors2 : { default: colors2 }).default;
|
|
@@ -492,7 +492,8 @@ function cn(...inputs) {
|
|
|
492
492
|
}
|
|
493
493
|
|
|
494
494
|
// src/components/ui/form/ButtonBase.tsx
|
|
495
|
-
import {
|
|
495
|
+
import { CircleNotchIcon } from "@phosphor-icons/react";
|
|
496
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
496
497
|
var buttonVariantsBase = cva(
|
|
497
498
|
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive active:scale-95",
|
|
498
499
|
{
|
|
@@ -527,16 +528,38 @@ var ButtonBase = React.forwardRef(
|
|
|
527
528
|
size,
|
|
528
529
|
asChild = false,
|
|
529
530
|
testid = `button-${variant ?? "default"}`,
|
|
531
|
+
isLoading = false,
|
|
532
|
+
children,
|
|
530
533
|
...props
|
|
531
534
|
}, ref) => {
|
|
532
535
|
const Comp = asChild ? Slot : "button";
|
|
533
|
-
|
|
536
|
+
const mergedDisabled = Boolean(props.disabled) || isLoading;
|
|
537
|
+
const isActivelyLoading = isLoading && !props.disabled;
|
|
538
|
+
return /* @__PURE__ */ jsxs(
|
|
534
539
|
Comp,
|
|
535
540
|
{
|
|
536
|
-
className: cn(
|
|
541
|
+
className: cn(
|
|
542
|
+
buttonVariantsBase({ variant, size, className }),
|
|
543
|
+
"relative"
|
|
544
|
+
),
|
|
537
545
|
ref,
|
|
538
546
|
"data-testid": testid ?? `button-${variant ?? "default"}`,
|
|
539
|
-
|
|
547
|
+
"aria-busy": isActivelyLoading || void 0,
|
|
548
|
+
disabled: mergedDisabled,
|
|
549
|
+
...props,
|
|
550
|
+
children: [
|
|
551
|
+
children,
|
|
552
|
+
isActivelyLoading && /* @__PURE__ */ jsxs("span", { className: "absolute inset-0 flex items-center justify-center pointer-events-none rounded-md", children: [
|
|
553
|
+
/* @__PURE__ */ jsx("span", { className: "absolute inset-0 rounded-md backdrop-blur overflow-hidden" }),
|
|
554
|
+
/* @__PURE__ */ jsx(
|
|
555
|
+
CircleNotchIcon,
|
|
556
|
+
{
|
|
557
|
+
weight: "bold",
|
|
558
|
+
className: "relative animate-spin h-4 w-4 text-current"
|
|
559
|
+
}
|
|
560
|
+
)
|
|
561
|
+
] })
|
|
562
|
+
]
|
|
540
563
|
}
|
|
541
564
|
);
|
|
542
565
|
}
|
|
@@ -579,7 +602,7 @@ ButtonGroupBase.displayName = "ButtonGroup";
|
|
|
579
602
|
import * as React2 from "react";
|
|
580
603
|
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
581
604
|
import { XIcon } from "@phosphor-icons/react";
|
|
582
|
-
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
605
|
+
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
583
606
|
var DialogBase = DialogPrimitive.Root;
|
|
584
607
|
var DialogTriggerBase = DialogPrimitive.Trigger;
|
|
585
608
|
var DialogPortalBase = DialogPrimitive.Portal;
|
|
@@ -598,9 +621,9 @@ var DialogOverlayBase = React2.forwardRef(({ className, testid: dataTestId = "di
|
|
|
598
621
|
));
|
|
599
622
|
DialogOverlayBase.displayName = DialogPrimitive.Overlay.displayName;
|
|
600
623
|
var DialogContentBase = React2.forwardRef(
|
|
601
|
-
({ className, children, testid: dataTestId = "dialog-content", ...props }, ref) => /* @__PURE__ */
|
|
624
|
+
({ className, children, testid: dataTestId = "dialog-content", ...props }, ref) => /* @__PURE__ */ jsxs2(DialogPortalBase, { children: [
|
|
602
625
|
/* @__PURE__ */ jsx2(DialogOverlayBase, {}),
|
|
603
|
-
/* @__PURE__ */
|
|
626
|
+
/* @__PURE__ */ jsxs2(
|
|
604
627
|
DialogPrimitive.Content,
|
|
605
628
|
{
|
|
606
629
|
ref,
|
|
@@ -612,7 +635,7 @@ var DialogContentBase = React2.forwardRef(
|
|
|
612
635
|
...props,
|
|
613
636
|
children: [
|
|
614
637
|
children,
|
|
615
|
-
/* @__PURE__ */
|
|
638
|
+
/* @__PURE__ */ jsxs2(DialogPrimitive.Close, { className: "absolute right-3 top-3 sm:right-4 sm:top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground z-10 touch-manipulation", children: [
|
|
616
639
|
/* @__PURE__ */ jsx2(XIcon, { className: "h-5 w-5 sm:h-4 sm:w-4" }),
|
|
617
640
|
/* @__PURE__ */ jsx2("span", { className: "sr-only", children: "Close" })
|
|
618
641
|
] })
|
|
@@ -712,7 +735,7 @@ var ErrorMessage = ({ error }) => {
|
|
|
712
735
|
var ErrorMessage_default = ErrorMessage;
|
|
713
736
|
|
|
714
737
|
// src/components/ui/form/InputBase.tsx
|
|
715
|
-
import { jsx as jsx5, jsxs as
|
|
738
|
+
import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
716
739
|
var InputBase = React4.forwardRef(
|
|
717
740
|
({
|
|
718
741
|
className,
|
|
@@ -725,9 +748,9 @@ var InputBase = React4.forwardRef(
|
|
|
725
748
|
error,
|
|
726
749
|
...props
|
|
727
750
|
}, ref) => {
|
|
728
|
-
return /* @__PURE__ */
|
|
751
|
+
return /* @__PURE__ */ jsxs3("div", { className: "flex flex-col w-full min-w-[150px]", children: [
|
|
729
752
|
label && /* @__PURE__ */ jsx5(LabelBase_default, { className: labelClassname, children: label }),
|
|
730
|
-
/* @__PURE__ */
|
|
753
|
+
/* @__PURE__ */ jsxs3(
|
|
731
754
|
"div",
|
|
732
755
|
{
|
|
733
756
|
className: cn(
|
|
@@ -768,7 +791,7 @@ import * as React5 from "react";
|
|
|
768
791
|
import { Command as CommandPrimitive } from "cmdk";
|
|
769
792
|
import { MagnifyingGlassIcon } from "@phosphor-icons/react";
|
|
770
793
|
import { motion, AnimatePresence } from "framer-motion";
|
|
771
|
-
import { jsx as jsx6, jsxs as
|
|
794
|
+
import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
772
795
|
var CommandBase = React5.forwardRef(({ className, testid: dataTestId = "command-base", ...props }, ref) => /* @__PURE__ */ jsx6(
|
|
773
796
|
CommandPrimitive,
|
|
774
797
|
{
|
|
@@ -802,7 +825,7 @@ var CommandDialogBase = ({ children, open, ...props }) => {
|
|
|
802
825
|
"command-dialog"
|
|
803
826
|
) }) }) });
|
|
804
827
|
};
|
|
805
|
-
var CommandInputBase = React5.forwardRef(({ className, testid: dataTestId = "command-input", ...props }, ref) => /* @__PURE__ */
|
|
828
|
+
var CommandInputBase = React5.forwardRef(({ className, testid: dataTestId = "command-input", ...props }, ref) => /* @__PURE__ */ jsxs4("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
|
|
806
829
|
/* @__PURE__ */ jsx6(MagnifyingGlassIcon, { className: "mr-2 h-4 w-4 shrink-0 text-primary" }),
|
|
807
830
|
/* @__PURE__ */ jsx6(
|
|
808
831
|
CommandPrimitive.Input,
|
|
@@ -926,7 +949,7 @@ PopoverContentBase.displayName = PopoverPrimitive.Content.displayName;
|
|
|
926
949
|
import { motion as motion2 } from "framer-motion";
|
|
927
950
|
import { useState } from "react";
|
|
928
951
|
import { CaretDownIcon, CheckIcon } from "@phosphor-icons/react";
|
|
929
|
-
import { jsx as jsx8, jsxs as
|
|
952
|
+
import { jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
930
953
|
function ComboboxBase({
|
|
931
954
|
items,
|
|
932
955
|
renderSelected,
|
|
@@ -939,19 +962,19 @@ function ComboboxBase({
|
|
|
939
962
|
testIds = {}
|
|
940
963
|
}) {
|
|
941
964
|
const [open, setOpen] = useState(false);
|
|
942
|
-
return /* @__PURE__ */
|
|
965
|
+
return /* @__PURE__ */ jsxs5(
|
|
943
966
|
"div",
|
|
944
967
|
{
|
|
945
968
|
className: "col-span-1 w-full",
|
|
946
969
|
"data-testid": testIds.root ?? "combobox-base-root",
|
|
947
970
|
children: [
|
|
948
|
-
/* @__PURE__ */
|
|
971
|
+
/* @__PURE__ */ jsxs5(PopoverBase, { open, onOpenChange: setOpen, modal: true, children: [
|
|
949
972
|
/* @__PURE__ */ jsx8(
|
|
950
973
|
PopoverTriggerBase,
|
|
951
974
|
{
|
|
952
975
|
asChild: true,
|
|
953
976
|
className: "flex w-full justify-between dark:bg-[hsl(231,15%,19%)]",
|
|
954
|
-
children: /* @__PURE__ */
|
|
977
|
+
children: /* @__PURE__ */ jsxs5(
|
|
955
978
|
ButtonBase,
|
|
956
979
|
{
|
|
957
980
|
variant: "select",
|
|
@@ -985,7 +1008,7 @@ function ComboboxBase({
|
|
|
985
1008
|
{
|
|
986
1009
|
className: "max-h-[--radix-popover-content-available-height] w-[--radix-popover-trigger-width] p-0 border-none",
|
|
987
1010
|
"data-testid": testIds.popover ?? "combobox-popover",
|
|
988
|
-
children: /* @__PURE__ */
|
|
1011
|
+
children: /* @__PURE__ */ jsxs5(
|
|
989
1012
|
CommandBase,
|
|
990
1013
|
{
|
|
991
1014
|
className: "dark:text-white hover:bg-rsecondary",
|
|
@@ -999,11 +1022,11 @@ function ComboboxBase({
|
|
|
999
1022
|
"data-testid": testIds.search ?? "combobox-search"
|
|
1000
1023
|
}
|
|
1001
1024
|
),
|
|
1002
|
-
/* @__PURE__ */
|
|
1025
|
+
/* @__PURE__ */ jsxs5(CommandListBase, { "data-testid": testIds.list ?? "combobox-list", children: [
|
|
1003
1026
|
/* @__PURE__ */ jsx8(CommandEmptyBase, { "data-testid": testIds.empty ?? "combobox-empty", children: "Nenhum dado encontrado" }),
|
|
1004
1027
|
/* @__PURE__ */ jsx8(CommandGroupBase, { "data-testid": testIds.group ?? "combobox-group", children: items.map((item) => {
|
|
1005
1028
|
const isSelected = checkIsSelected(item.value);
|
|
1006
|
-
return /* @__PURE__ */
|
|
1029
|
+
return /* @__PURE__ */ jsxs5(
|
|
1007
1030
|
CommandItemBase,
|
|
1008
1031
|
{
|
|
1009
1032
|
keywords: [item.label],
|
|
@@ -1057,7 +1080,7 @@ function ComboboxBase({
|
|
|
1057
1080
|
}
|
|
1058
1081
|
|
|
1059
1082
|
// src/components/selects/Combobox.tsx
|
|
1060
|
-
import { jsx as jsx9, jsxs as
|
|
1083
|
+
import { jsx as jsx9, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1061
1084
|
function Combobox({
|
|
1062
1085
|
items,
|
|
1063
1086
|
selected,
|
|
@@ -1091,7 +1114,7 @@ function Combobox({
|
|
|
1091
1114
|
},
|
|
1092
1115
|
[selected, onChange]
|
|
1093
1116
|
);
|
|
1094
|
-
return /* @__PURE__ */
|
|
1117
|
+
return /* @__PURE__ */ jsxs6("div", { className: cn("flex flex-col gap-1 w-full min-w-[150px]", className), children: [
|
|
1095
1118
|
label && /* @__PURE__ */ jsx9(LabelBase_default, { className: labelClassname, children: label }),
|
|
1096
1119
|
/* @__PURE__ */ jsx9(
|
|
1097
1120
|
ComboboxBase,
|
|
@@ -1112,7 +1135,7 @@ function Combobox({
|
|
|
1112
1135
|
import { useCallback as useCallback2, useMemo as useMemo2 } from "react";
|
|
1113
1136
|
import { XIcon as XIcon2 } from "@phosphor-icons/react";
|
|
1114
1137
|
import { motion as motion3, AnimatePresence as AnimatePresence2 } from "framer-motion";
|
|
1115
|
-
import { jsx as jsx10, jsxs as
|
|
1138
|
+
import { jsx as jsx10, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1116
1139
|
function MultiCombobox({
|
|
1117
1140
|
items,
|
|
1118
1141
|
selected,
|
|
@@ -1173,7 +1196,7 @@ function MultiCombobox({
|
|
|
1173
1196
|
{
|
|
1174
1197
|
"data-testid": testIds.selectedWrapper ?? "combobox-selected-wrapper",
|
|
1175
1198
|
className: "flex w-full flex-wrap gap-2 overflow-hidden ",
|
|
1176
|
-
children: /* @__PURE__ */ jsx10(AnimatePresence2, { mode: "popLayout", children: selectedItems.map((item) => /* @__PURE__ */
|
|
1199
|
+
children: /* @__PURE__ */ jsx10(AnimatePresence2, { mode: "popLayout", children: selectedItems.map((item) => /* @__PURE__ */ jsxs7(
|
|
1177
1200
|
motion3.div,
|
|
1178
1201
|
{
|
|
1179
1202
|
layout: true,
|
|
@@ -1211,7 +1234,7 @@ function MultiCombobox({
|
|
|
1211
1234
|
}
|
|
1212
1235
|
);
|
|
1213
1236
|
}, [handleSelection, placeholder, selectedItems, testIds]);
|
|
1214
|
-
return /* @__PURE__ */
|
|
1237
|
+
return /* @__PURE__ */ jsxs7(
|
|
1215
1238
|
"div",
|
|
1216
1239
|
{
|
|
1217
1240
|
className: cn("flex flex-col gap-1 w-full min-w-[150px]", className),
|
|
@@ -1267,19 +1290,19 @@ TooltipContentBase.displayName = TooltipPrimitive.Content.displayName;
|
|
|
1267
1290
|
// src/components/ui/FilterBase.tsx
|
|
1268
1291
|
var import_colors = __toESM(require_colors2());
|
|
1269
1292
|
import { FunnelSimpleIcon, PlusIcon, TrashIcon } from "@phosphor-icons/react";
|
|
1270
|
-
import { jsx as jsx12, jsxs as
|
|
1293
|
+
import { jsx as jsx12, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1271
1294
|
|
|
1272
1295
|
// src/components/ui/SelectBase.tsx
|
|
1273
1296
|
import * as React8 from "react";
|
|
1274
1297
|
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
1275
1298
|
import { CheckIcon as CheckIcon2, CaretDownIcon as CaretDownIcon2, CaretUpIcon } from "@phosphor-icons/react";
|
|
1276
1299
|
import { motion as motion4, AnimatePresence as AnimatePresence3 } from "framer-motion";
|
|
1277
|
-
import { Fragment, jsx as jsx13, jsxs as
|
|
1300
|
+
import { Fragment, jsx as jsx13, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1278
1301
|
var SelectBase = SelectPrimitive.Root;
|
|
1279
1302
|
var SelectGroupBase = SelectPrimitive.Group;
|
|
1280
1303
|
var SelectValueBase = SelectPrimitive.Value;
|
|
1281
|
-
var SelectTriggerBase = React8.forwardRef(({ className, children, open, error, ...props }, ref) => /* @__PURE__ */
|
|
1282
|
-
/* @__PURE__ */
|
|
1304
|
+
var SelectTriggerBase = React8.forwardRef(({ className, children, open, error, ...props }, ref) => /* @__PURE__ */ jsxs9("div", { className: cn("w-full", error && "mb-0"), children: [
|
|
1305
|
+
/* @__PURE__ */ jsxs9(
|
|
1283
1306
|
SelectPrimitive.Trigger,
|
|
1284
1307
|
{
|
|
1285
1308
|
ref,
|
|
@@ -1358,7 +1381,7 @@ var SelectContentBase = React8.forwardRef(
|
|
|
1358
1381
|
animate: { opacity: 1, scale: 1 },
|
|
1359
1382
|
exit: { opacity: 0, scale: 0.95 },
|
|
1360
1383
|
transition: { duration: 0.2 },
|
|
1361
|
-
children: /* @__PURE__ */
|
|
1384
|
+
children: /* @__PURE__ */ jsxs9(Fragment, { children: [
|
|
1362
1385
|
/* @__PURE__ */ jsx13(SelectScrollUpButtonBase, {}),
|
|
1363
1386
|
/* @__PURE__ */ jsx13(
|
|
1364
1387
|
SelectPrimitive.Viewport,
|
|
@@ -1397,7 +1420,7 @@ var SelectItemBase = React8.forwardRef(({ className, children, ...props }, ref)
|
|
|
1397
1420
|
),
|
|
1398
1421
|
...props,
|
|
1399
1422
|
asChild: true,
|
|
1400
|
-
children: /* @__PURE__ */
|
|
1423
|
+
children: /* @__PURE__ */ jsxs9(
|
|
1401
1424
|
motion4.div,
|
|
1402
1425
|
{
|
|
1403
1426
|
whileHover: { x: 4 },
|
|
@@ -1438,14 +1461,14 @@ import * as React9 from "react";
|
|
|
1438
1461
|
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
1439
1462
|
import { CheckIcon as CheckIcon3, CaretRightIcon, CircleIcon } from "@phosphor-icons/react";
|
|
1440
1463
|
import { motion as motion5, AnimatePresence as AnimatePresence4 } from "framer-motion";
|
|
1441
|
-
import { jsx as jsx14, jsxs as
|
|
1464
|
+
import { jsx as jsx14, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1442
1465
|
var DropDownMenuBase = DropdownMenuPrimitive.Root;
|
|
1443
1466
|
var DropDownMenuTriggerBase = DropdownMenuPrimitive.Trigger;
|
|
1444
1467
|
var DropDownMenuGroupBase = DropdownMenuPrimitive.Group;
|
|
1445
1468
|
var DropDownMenuPortalBase = DropdownMenuPrimitive.Portal;
|
|
1446
1469
|
var DropDownMenuSubBase = DropdownMenuPrimitive.Sub;
|
|
1447
1470
|
var DropDownMenuRadioGroupBase = DropdownMenuPrimitive.RadioGroup;
|
|
1448
|
-
var DropDownMenuSubTriggerBase = React9.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */
|
|
1471
|
+
var DropDownMenuSubTriggerBase = React9.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs10(
|
|
1449
1472
|
DropdownMenuPrimitive.SubTrigger,
|
|
1450
1473
|
{
|
|
1451
1474
|
ref,
|
|
@@ -1506,7 +1529,7 @@ var DropDownMenuContentBase = React9.forwardRef(
|
|
|
1506
1529
|
) })
|
|
1507
1530
|
);
|
|
1508
1531
|
DropDownMenuContentBase.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
1509
|
-
var DropDownMenuItemBase = React9.forwardRef(({ className, inset, leftIcon, rightIcon, children, ...props }, ref) => /* @__PURE__ */
|
|
1532
|
+
var DropDownMenuItemBase = React9.forwardRef(({ className, inset, leftIcon, rightIcon, children, ...props }, ref) => /* @__PURE__ */ jsxs10(
|
|
1510
1533
|
DropdownMenuPrimitive.Item,
|
|
1511
1534
|
{
|
|
1512
1535
|
ref,
|
|
@@ -1517,7 +1540,7 @@ var DropDownMenuItemBase = React9.forwardRef(({ className, inset, leftIcon, righ
|
|
|
1517
1540
|
),
|
|
1518
1541
|
...props,
|
|
1519
1542
|
children: [
|
|
1520
|
-
/* @__PURE__ */
|
|
1543
|
+
/* @__PURE__ */ jsxs10("div", { className: "flex items-center gap-2", children: [
|
|
1521
1544
|
leftIcon && /* @__PURE__ */ jsx14("span", { className: "[&>svg]:size-4", children: leftIcon }),
|
|
1522
1545
|
children
|
|
1523
1546
|
] }),
|
|
@@ -1526,7 +1549,7 @@ var DropDownMenuItemBase = React9.forwardRef(({ className, inset, leftIcon, righ
|
|
|
1526
1549
|
}
|
|
1527
1550
|
));
|
|
1528
1551
|
DropDownMenuItemBase.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
1529
|
-
var DropDownMenuCheckboxItemBase = React9.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */
|
|
1552
|
+
var DropDownMenuCheckboxItemBase = React9.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs10(
|
|
1530
1553
|
DropdownMenuPrimitive.CheckboxItem,
|
|
1531
1554
|
{
|
|
1532
1555
|
ref,
|
|
@@ -1543,7 +1566,7 @@ var DropDownMenuCheckboxItemBase = React9.forwardRef(({ className, children, che
|
|
|
1543
1566
|
}
|
|
1544
1567
|
));
|
|
1545
1568
|
DropDownMenuCheckboxItemBase.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
|
1546
|
-
var DropDownMenuRadioItemBase = React9.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */
|
|
1569
|
+
var DropDownMenuRadioItemBase = React9.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs10(
|
|
1547
1570
|
DropdownMenuPrimitive.RadioItem,
|
|
1548
1571
|
{
|
|
1549
1572
|
ref,
|
|
@@ -1657,7 +1680,7 @@ var useTheme = () => {
|
|
|
1657
1680
|
};
|
|
1658
1681
|
|
|
1659
1682
|
// src/components/mode-toggle.tsx
|
|
1660
|
-
import { Fragment as Fragment2, jsx as jsx16, jsxs as
|
|
1683
|
+
import { Fragment as Fragment2, jsx as jsx16, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1661
1684
|
var themeLabels = {
|
|
1662
1685
|
light: "Light",
|
|
1663
1686
|
dark: "Dark",
|
|
@@ -1674,15 +1697,15 @@ function ModeToggleBase({
|
|
|
1674
1697
|
}) {
|
|
1675
1698
|
const { setTheme, theme: currentTheme } = useTheme();
|
|
1676
1699
|
const isDark = currentTheme?.includes("dark") || currentTheme === "system" && typeof window !== "undefined" && window.matchMedia("(prefers-color-scheme: dark)").matches;
|
|
1677
|
-
return /* @__PURE__ */
|
|
1678
|
-
/* @__PURE__ */ jsx16(DropDownMenuTriggerBase, { asChild: true, children: /* @__PURE__ */
|
|
1700
|
+
return /* @__PURE__ */ jsxs11(DropDownMenuBase, { children: [
|
|
1701
|
+
/* @__PURE__ */ jsx16(DropDownMenuTriggerBase, { asChild: true, children: /* @__PURE__ */ jsxs11(
|
|
1679
1702
|
ButtonBase,
|
|
1680
1703
|
{
|
|
1681
1704
|
variant: "ghost",
|
|
1682
1705
|
size: "icon",
|
|
1683
1706
|
className: "relative overflow-hidden border-transparent",
|
|
1684
1707
|
children: [
|
|
1685
|
-
/* @__PURE__ */
|
|
1708
|
+
/* @__PURE__ */ jsxs11(Fragment2, { children: [
|
|
1686
1709
|
/* @__PURE__ */ jsx16(
|
|
1687
1710
|
SunIcon,
|
|
1688
1711
|
{
|
|
@@ -1705,7 +1728,7 @@ function ModeToggleBase({
|
|
|
1705
1728
|
{
|
|
1706
1729
|
align: "end",
|
|
1707
1730
|
className: "border-border bg-popover text-popover-foreground",
|
|
1708
|
-
children: themes.map((theme) => /* @__PURE__ */
|
|
1731
|
+
children: themes.map((theme) => /* @__PURE__ */ jsxs11(
|
|
1709
1732
|
DropDownMenuItemBase,
|
|
1710
1733
|
{
|
|
1711
1734
|
onClick: () => setTheme(theme),
|
|
@@ -1725,8 +1748,8 @@ function ModeToggleBase({
|
|
|
1725
1748
|
// src/components/ui/layout/ScrollareaBase.tsx
|
|
1726
1749
|
import * as React10 from "react";
|
|
1727
1750
|
import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
|
|
1728
|
-
import { jsx as jsx17, jsxs as
|
|
1729
|
-
var ScrollAreaBase = React10.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */
|
|
1751
|
+
import { jsx as jsx17, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1752
|
+
var ScrollAreaBase = React10.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs12(
|
|
1730
1753
|
ScrollAreaPrimitive.Root,
|
|
1731
1754
|
{
|
|
1732
1755
|
ref,
|
|
@@ -1758,17 +1781,18 @@ var ScrollBarBase = React10.forwardRef(({ className, orientation = "vertical", .
|
|
|
1758
1781
|
ScrollBarBase.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
|
|
1759
1782
|
|
|
1760
1783
|
// src/components/selects/Select.tsx
|
|
1761
|
-
import { Fragment as Fragment3, jsx as jsx18, jsxs as
|
|
1784
|
+
import { Fragment as Fragment3, jsx as jsx18, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1762
1785
|
function Select({
|
|
1763
1786
|
items,
|
|
1764
1787
|
groupItems,
|
|
1765
1788
|
placeholder,
|
|
1766
1789
|
onChange,
|
|
1767
1790
|
error,
|
|
1768
|
-
testIds = {}
|
|
1791
|
+
testIds = {},
|
|
1792
|
+
disabled
|
|
1769
1793
|
}) {
|
|
1770
|
-
return /* @__PURE__ */
|
|
1771
|
-
/* @__PURE__ */
|
|
1794
|
+
return /* @__PURE__ */ jsxs13("div", { "data-testid": testIds.root ?? "select-root", children: [
|
|
1795
|
+
/* @__PURE__ */ jsxs13(
|
|
1772
1796
|
SelectBase,
|
|
1773
1797
|
{
|
|
1774
1798
|
onValueChange: onChange,
|
|
@@ -1782,6 +1806,7 @@ function Select({
|
|
|
1782
1806
|
error && "border-red-500"
|
|
1783
1807
|
),
|
|
1784
1808
|
"data-testid": testIds.trigger ?? "select-trigger",
|
|
1809
|
+
disabled,
|
|
1785
1810
|
children: /* @__PURE__ */ jsx18(
|
|
1786
1811
|
SelectValueBase,
|
|
1787
1812
|
{
|
|
@@ -1791,7 +1816,7 @@ function Select({
|
|
|
1791
1816
|
)
|
|
1792
1817
|
}
|
|
1793
1818
|
),
|
|
1794
|
-
/* @__PURE__ */ jsx18(ScrollAreaBase, { "data-testid": testIds.scrollarea ?? "select-scrollarea", children: /* @__PURE__ */ jsx18(SelectContentBase, { "data-testid": testIds.content ?? "select-content", children: groupItems ? /* @__PURE__ */ jsx18(Fragment3, { children: Object.keys(groupItems).map((key) => /* @__PURE__ */
|
|
1819
|
+
/* @__PURE__ */ jsx18(ScrollAreaBase, { "data-testid": testIds.scrollarea ?? "select-scrollarea", children: /* @__PURE__ */ jsx18(SelectContentBase, { "data-testid": testIds.content ?? "select-content", children: groupItems ? /* @__PURE__ */ jsx18(Fragment3, { children: Object.keys(groupItems).map((key) => /* @__PURE__ */ jsxs13(
|
|
1795
1820
|
SelectGroupBase,
|
|
1796
1821
|
{
|
|
1797
1822
|
"data-testid": testIds.group ?? "select-group",
|
|
@@ -2004,7 +2029,7 @@ import { useState as useState4, useRef, useEffect as useEffect3 } from "react";
|
|
|
2004
2029
|
import { motion as motion6, AnimatePresence as AnimatePresence5 } from "framer-motion";
|
|
2005
2030
|
import { DotsThreeIcon } from "@phosphor-icons/react/dist/ssr";
|
|
2006
2031
|
import { Check } from "@phosphor-icons/react/dist/ssr";
|
|
2007
|
-
import { jsx as jsx19, jsxs as
|
|
2032
|
+
import { jsx as jsx19, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
2008
2033
|
var menuVariants = {
|
|
2009
2034
|
hidden: { opacity: 0, y: -6, scale: 0.98 },
|
|
2010
2035
|
visible: { opacity: 1, y: 0, scale: 1 },
|
|
@@ -2052,8 +2077,8 @@ function PeriodsDropdown({
|
|
|
2052
2077
|
setOpen(false);
|
|
2053
2078
|
}
|
|
2054
2079
|
const containerStyle = typeof rightOffset === "number" ? { position: "relative", zIndex: 30 } : { position: "relative", zIndex: 30 };
|
|
2055
|
-
return /* @__PURE__ */
|
|
2056
|
-
/* @__PURE__ */
|
|
2080
|
+
return /* @__PURE__ */ jsxs14("div", { ref: wrapperRef, style: containerStyle, className: "mr-4", children: [
|
|
2081
|
+
/* @__PURE__ */ jsxs14(
|
|
2057
2082
|
"button",
|
|
2058
2083
|
{
|
|
2059
2084
|
className: "relative p-2.5 rounded-md hover:bg-accent/10 focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-accent/50 transition flex items-center justify-center",
|
|
@@ -2076,7 +2101,7 @@ function PeriodsDropdown({
|
|
|
2076
2101
|
]
|
|
2077
2102
|
}
|
|
2078
2103
|
),
|
|
2079
|
-
/* @__PURE__ */ jsx19(AnimatePresence5, { children: open && /* @__PURE__ */
|
|
2104
|
+
/* @__PURE__ */ jsx19(AnimatePresence5, { children: open && /* @__PURE__ */ jsxs14(
|
|
2080
2105
|
motion6.div,
|
|
2081
2106
|
{
|
|
2082
2107
|
initial: "hidden",
|
|
@@ -2105,7 +2130,7 @@ function PeriodsDropdown({
|
|
|
2105
2130
|
ref: listRef,
|
|
2106
2131
|
className: "flex flex-col p-2 gap-1",
|
|
2107
2132
|
style: { maxHeight: 200, overflowY: "auto" },
|
|
2108
|
-
children: periods.map((p, idx) => /* @__PURE__ */
|
|
2133
|
+
children: periods.map((p, idx) => /* @__PURE__ */ jsxs14(
|
|
2109
2134
|
motion6.button,
|
|
2110
2135
|
{
|
|
2111
2136
|
className: "flex items-center justify-between w-full text-left px-3 py-2.5 rounded focus:outline-none transition-colors " + (activePeriods && activePeriods.includes(p) || p === activePeriod ? "bg-accent/10 font-medium" : "hover:bg-accent/15 focus-visible:ring-2 focus-visible:ring-accent/30"),
|
|
@@ -2136,7 +2161,7 @@ var PeriodsDropdown_default = PeriodsDropdown;
|
|
|
2136
2161
|
// src/components/charts/components/controls/ShowOnly.tsx
|
|
2137
2162
|
import { motion as motion7 } from "framer-motion";
|
|
2138
2163
|
import { Eye, EyeSlash } from "@phosphor-icons/react";
|
|
2139
|
-
import { Fragment as Fragment4, jsx as jsx20, jsxs as
|
|
2164
|
+
import { Fragment as Fragment4, jsx as jsx20, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
2140
2165
|
var ShowOnly = ({
|
|
2141
2166
|
showOnlyHighlighted,
|
|
2142
2167
|
setShowOnlyHighlighted,
|
|
@@ -2163,10 +2188,10 @@ var ShowOnly = ({
|
|
|
2163
2188
|
"focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-primary/60",
|
|
2164
2189
|
!hasHighlights ? "opacity-60 cursor-not-allowed pointer-events-none" : showOnlyHighlighted ? "bg-primary/10 text-primary shadow-sm border border-primary/20" : "bg-transparent text-muted-foreground border border-transparent hover:bg-muted/10 hover:text-foreground"
|
|
2165
2190
|
),
|
|
2166
|
-
children: showOnlyHighlighted ? /* @__PURE__ */
|
|
2191
|
+
children: showOnlyHighlighted ? /* @__PURE__ */ jsxs15(Fragment4, { children: [
|
|
2167
2192
|
/* @__PURE__ */ jsx20(EyeSlash, { size: 16, weight: "regular" }),
|
|
2168
2193
|
/* @__PURE__ */ jsx20("span", { className: "sr-only", children: "Exibir todos" })
|
|
2169
|
-
] }) : /* @__PURE__ */
|
|
2194
|
+
] }) : /* @__PURE__ */ jsxs15(Fragment4, { children: [
|
|
2170
2195
|
/* @__PURE__ */ jsx20(Eye, { size: 16, weight: "bold" }),
|
|
2171
2196
|
/* @__PURE__ */ jsx20("span", { className: "sr-only", children: "Mostrar somente destacados" })
|
|
2172
2197
|
] })
|
|
@@ -2180,7 +2205,7 @@ var ShowOnly_default = ShowOnly;
|
|
|
2180
2205
|
// src/components/charts/components/controls/Highlights.tsx
|
|
2181
2206
|
import { motion as motion8, AnimatePresence as AnimatePresence6 } from "framer-motion";
|
|
2182
2207
|
import { CheckIcon as CheckIcon5 } from "@phosphor-icons/react/dist/ssr";
|
|
2183
|
-
import { jsx as jsx21, jsxs as
|
|
2208
|
+
import { jsx as jsx21, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
2184
2209
|
var Highlights = ({
|
|
2185
2210
|
allKeys,
|
|
2186
2211
|
mapperConfig,
|
|
@@ -2231,7 +2256,7 @@ var Highlights = ({
|
|
|
2231
2256
|
className: pillClasses,
|
|
2232
2257
|
style: { minWidth: showFullLabel ? void 0 : 36 },
|
|
2233
2258
|
"aria-pressed": isHighlighted,
|
|
2234
|
-
children: /* @__PURE__ */
|
|
2259
|
+
children: /* @__PURE__ */ jsxs16(
|
|
2235
2260
|
motion8.button,
|
|
2236
2261
|
{
|
|
2237
2262
|
whileHover: { scale: isHighlighted ? 1.04 : 1.03 },
|
|
@@ -2293,7 +2318,7 @@ var Highlights_default = Highlights;
|
|
|
2293
2318
|
|
|
2294
2319
|
// src/components/charts/components/controls/CloseAllButton.tsx
|
|
2295
2320
|
import { XIcon as XIcon3 } from "@phosphor-icons/react/dist/ssr";
|
|
2296
|
-
import { jsx as jsx22, jsxs as
|
|
2321
|
+
import { jsx as jsx22, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
2297
2322
|
var CloseAllButton = ({
|
|
2298
2323
|
count,
|
|
2299
2324
|
onCloseAll,
|
|
@@ -2329,7 +2354,7 @@ var CloseAllButton = ({
|
|
|
2329
2354
|
`;
|
|
2330
2355
|
};
|
|
2331
2356
|
if (variant === "inline") {
|
|
2332
|
-
return /* @__PURE__ */ jsx22("div", { className: "absolute top-4 right-4 z-30", children: /* @__PURE__ */
|
|
2357
|
+
return /* @__PURE__ */ jsx22("div", { className: "absolute top-4 right-4 z-30", children: /* @__PURE__ */ jsxs17(
|
|
2333
2358
|
ButtonBase,
|
|
2334
2359
|
{
|
|
2335
2360
|
variant: "ghost",
|
|
@@ -2347,7 +2372,7 @@ var CloseAllButton = ({
|
|
|
2347
2372
|
"div",
|
|
2348
2373
|
{
|
|
2349
2374
|
className: `${getPositionClasses()} animate-in fade-in slide-in-from-top-2 duration-300`,
|
|
2350
|
-
children: /* @__PURE__ */ jsx22("div", { children: /* @__PURE__ */
|
|
2375
|
+
children: /* @__PURE__ */ jsx22("div", { children: /* @__PURE__ */ jsxs17(
|
|
2351
2376
|
ButtonBase,
|
|
2352
2377
|
{
|
|
2353
2378
|
onClick: onCloseAll,
|
|
@@ -2382,7 +2407,7 @@ import React12, {
|
|
|
2382
2407
|
import { motion as motion9, AnimatePresence as AnimatePresence7 } from "framer-motion";
|
|
2383
2408
|
import { DotsSixVerticalIcon } from "@phosphor-icons/react";
|
|
2384
2409
|
import { XIcon as XIcon4 } from "@phosphor-icons/react/dist/ssr";
|
|
2385
|
-
import { Fragment as Fragment5, jsx as jsx23, jsxs as
|
|
2410
|
+
import { Fragment as Fragment5, jsx as jsx23, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
2386
2411
|
var ALIGNMENT_THRESHOLD = 25;
|
|
2387
2412
|
var GUIDE_THRESHOLD = 60;
|
|
2388
2413
|
var STRONG_SNAP_THRESHOLD = 35;
|
|
@@ -2475,7 +2500,7 @@ var DraggableTooltipComponent = ({
|
|
|
2475
2500
|
dataKey: "total",
|
|
2476
2501
|
name: "Total"
|
|
2477
2502
|
}) : defaultTotalFormatted;
|
|
2478
|
-
return /* @__PURE__ */
|
|
2503
|
+
return /* @__PURE__ */ jsxs18("div", { className: "text-sm", children: [
|
|
2479
2504
|
/* @__PURE__ */ jsx23("div", { className: "text-sm text-muted-foreground", children: "Total" }),
|
|
2480
2505
|
/* @__PURE__ */ jsx23(
|
|
2481
2506
|
"div",
|
|
@@ -2739,7 +2764,7 @@ var DraggableTooltipComponent = ({
|
|
|
2739
2764
|
},
|
|
2740
2765
|
[id, onClose]
|
|
2741
2766
|
);
|
|
2742
|
-
return /* @__PURE__ */
|
|
2767
|
+
return /* @__PURE__ */ jsxs18(Fragment5, { children: [
|
|
2743
2768
|
dragging && alignmentGuides.map((guide, index) => {
|
|
2744
2769
|
const isHorizontal = guide.type === "horizontal";
|
|
2745
2770
|
const color = isHorizontal ? "#3b82f6" : "#ef4444";
|
|
@@ -2759,7 +2784,7 @@ var DraggableTooltipComponent = ({
|
|
|
2759
2784
|
guide.sourceTooltip.top + guide.sourceTooltip.height / 2,
|
|
2760
2785
|
guide.targetTooltip.top + guide.targetTooltip.height / 2
|
|
2761
2786
|
);
|
|
2762
|
-
return /* @__PURE__ */
|
|
2787
|
+
return /* @__PURE__ */ jsxs18("div", { children: [
|
|
2763
2788
|
/* @__PURE__ */ jsx23(
|
|
2764
2789
|
motion9.div,
|
|
2765
2790
|
{
|
|
@@ -2822,7 +2847,7 @@ var DraggableTooltipComponent = ({
|
|
|
2822
2847
|
)
|
|
2823
2848
|
] }, index);
|
|
2824
2849
|
}),
|
|
2825
|
-
/* @__PURE__ */ jsx23(AnimatePresence7, { children: /* @__PURE__ */
|
|
2850
|
+
/* @__PURE__ */ jsx23(AnimatePresence7, { children: /* @__PURE__ */ jsxs18(
|
|
2826
2851
|
motion9.div,
|
|
2827
2852
|
{
|
|
2828
2853
|
className: "fixed bg-card border border-border rounded-lg shadow-lg z-50 min-w-80 select-none",
|
|
@@ -2840,7 +2865,7 @@ var DraggableTooltipComponent = ({
|
|
|
2840
2865
|
role: "dialog",
|
|
2841
2866
|
"aria-label": title ? `Tooltip ${title}` : `Tooltip ${data.name}`,
|
|
2842
2867
|
children: [
|
|
2843
|
-
/* @__PURE__ */
|
|
2868
|
+
/* @__PURE__ */ jsxs18(
|
|
2844
2869
|
"div",
|
|
2845
2870
|
{
|
|
2846
2871
|
className: "flex items-center justify-between p-3 pb-2 border-b bg-muted/20 rounded-t-lg",
|
|
@@ -2862,8 +2887,8 @@ var DraggableTooltipComponent = ({
|
|
|
2862
2887
|
]
|
|
2863
2888
|
}
|
|
2864
2889
|
),
|
|
2865
|
-
/* @__PURE__ */ jsx23("div", { className: "px-3 py-2 bg-accent/5 border-l-4 border-primary", children: /* @__PURE__ */
|
|
2866
|
-
/* @__PURE__ */
|
|
2890
|
+
/* @__PURE__ */ jsx23("div", { className: "px-3 py-2 bg-accent/5 border-l-4 border-primary", children: /* @__PURE__ */ jsxs18("div", { className: "flex items-center justify-between gap-2", children: [
|
|
2891
|
+
/* @__PURE__ */ jsxs18("div", { children: [
|
|
2867
2892
|
/* @__PURE__ */ jsx23("span", { className: "text-xs font-medium text-muted-foreground uppercase tracking-wide", children: periodLabel }),
|
|
2868
2893
|
/* @__PURE__ */ jsx23("p", { className: "font-bold text-lg text-foreground mt-1 truncate", children: categoryFormatter ? categoryFormatter(String(data.name)) : data.name })
|
|
2869
2894
|
] }),
|
|
@@ -2876,7 +2901,7 @@ var DraggableTooltipComponent = ({
|
|
|
2876
2901
|
}
|
|
2877
2902
|
) })
|
|
2878
2903
|
] }) }),
|
|
2879
|
-
/* @__PURE__ */
|
|
2904
|
+
/* @__PURE__ */ jsxs18("div", { className: "p-3 pt-2 space-y-2", children: [
|
|
2880
2905
|
/* @__PURE__ */ jsx23("p", { className: "text-xs font-medium text-muted-foreground uppercase tracking-wide mb-2", children: dataLabel }),
|
|
2881
2906
|
useMemo4(
|
|
2882
2907
|
() => visibleKeys.map((key) => {
|
|
@@ -2900,7 +2925,7 @@ var DraggableTooltipComponent = ({
|
|
|
2900
2925
|
const pct = absDenominator > 0 ? Math.abs(val) / absDenominator * 100 : 0;
|
|
2901
2926
|
const isDimmed = highlightedSeries && highlightedSeries.size > 0 && !highlightedSeries.has(key);
|
|
2902
2927
|
const isHighlighted = highlightedSeries && highlightedSeries.has(key);
|
|
2903
|
-
return /* @__PURE__ */
|
|
2928
|
+
return /* @__PURE__ */ jsxs18(
|
|
2904
2929
|
"div",
|
|
2905
2930
|
{
|
|
2906
2931
|
role: "button",
|
|
@@ -2918,8 +2943,8 @@ var DraggableTooltipComponent = ({
|
|
|
2918
2943
|
border: isHighlighted ? `1px solid ${finalColors[key] || "#666"}22` : void 0
|
|
2919
2944
|
},
|
|
2920
2945
|
children: [
|
|
2921
|
-
/* @__PURE__ */
|
|
2922
|
-
/* @__PURE__ */
|
|
2946
|
+
/* @__PURE__ */ jsxs18("div", { className: "flex items-center justify-between", children: [
|
|
2947
|
+
/* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-2", children: [
|
|
2923
2948
|
/* @__PURE__ */ jsx23(
|
|
2924
2949
|
"div",
|
|
2925
2950
|
{
|
|
@@ -2937,7 +2962,7 @@ var DraggableTooltipComponent = ({
|
|
|
2937
2962
|
}
|
|
2938
2963
|
)
|
|
2939
2964
|
] }),
|
|
2940
|
-
/* @__PURE__ */
|
|
2965
|
+
/* @__PURE__ */ jsxs18("div", { className: "flex items-baseline gap-2", children: [
|
|
2941
2966
|
/* @__PURE__ */ jsx23(
|
|
2942
2967
|
"span",
|
|
2943
2968
|
{
|
|
@@ -2975,7 +3000,7 @@ var DraggableTooltipComponent = ({
|
|
|
2975
3000
|
valueFormatter2
|
|
2976
3001
|
]
|
|
2977
3002
|
),
|
|
2978
|
-
/* @__PURE__ */ jsx23("div", { className: "mt-3 pt-2 border-t", children: /* @__PURE__ */
|
|
3003
|
+
/* @__PURE__ */ jsx23("div", { className: "mt-3 pt-2 border-t", children: /* @__PURE__ */ jsxs18("p", { className: "text-xs text-muted-foreground flex items-center gap-1", children: [
|
|
2979
3004
|
"Clique no ",
|
|
2980
3005
|
/* @__PURE__ */ jsx23(XIcon4, { size: 12 }),
|
|
2981
3006
|
" para remover"
|
|
@@ -3001,7 +3026,7 @@ DraggableTooltip.displayName = "DraggableTooltip";
|
|
|
3001
3026
|
var DraggableTooltip_default = DraggableTooltip;
|
|
3002
3027
|
|
|
3003
3028
|
// src/components/charts/components/tooltips/TooltipWithTotal.tsx
|
|
3004
|
-
import { jsx as jsx24, jsxs as
|
|
3029
|
+
import { jsx as jsx24, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
3005
3030
|
var RechartTooltipWithTotal = ({
|
|
3006
3031
|
active,
|
|
3007
3032
|
payload,
|
|
@@ -3041,7 +3066,7 @@ var RechartTooltipWithTotal = ({
|
|
|
3041
3066
|
(sum, p) => sum + Math.abs(typeof p.value === "number" ? p.value : 0),
|
|
3042
3067
|
0
|
|
3043
3068
|
);
|
|
3044
|
-
return /* @__PURE__ */
|
|
3069
|
+
return /* @__PURE__ */ jsxs19(
|
|
3045
3070
|
"div",
|
|
3046
3071
|
{
|
|
3047
3072
|
role: "dialog",
|
|
@@ -3049,12 +3074,12 @@ var RechartTooltipWithTotal = ({
|
|
|
3049
3074
|
className: "bg-card border border-border rounded-lg p-3 shadow-2xl max-w-xs",
|
|
3050
3075
|
style: { minWidth: 220 },
|
|
3051
3076
|
children: [
|
|
3052
|
-
/* @__PURE__ */
|
|
3053
|
-
/* @__PURE__ */
|
|
3077
|
+
/* @__PURE__ */ jsxs19("div", { className: "flex items-start justify-between mb-2", children: [
|
|
3078
|
+
/* @__PURE__ */ jsxs19("div", { className: "pr-2", children: [
|
|
3054
3079
|
/* @__PURE__ */ jsx24("p", { className: "text-xs text-muted-foreground", children: periodLabel }),
|
|
3055
3080
|
/* @__PURE__ */ jsx24("p", { className: "font-medium text-foreground truncate", children: displayLabel })
|
|
3056
3081
|
] }),
|
|
3057
|
-
/* @__PURE__ */
|
|
3082
|
+
/* @__PURE__ */ jsxs19("div", { className: "text-right ml-3", children: [
|
|
3058
3083
|
/* @__PURE__ */ jsx24("p", { className: "text-xs text-muted-foreground", children: totalLabel }),
|
|
3059
3084
|
/* @__PURE__ */ jsx24(
|
|
3060
3085
|
"p",
|
|
@@ -3088,9 +3113,9 @@ var RechartTooltipWithTotal = ({
|
|
|
3088
3113
|
dataKey: entry.dataKey,
|
|
3089
3114
|
name: entry.name
|
|
3090
3115
|
}) : defaultFormatted;
|
|
3091
|
-
return /* @__PURE__ */
|
|
3092
|
-
/* @__PURE__ */
|
|
3093
|
-
/* @__PURE__ */
|
|
3116
|
+
return /* @__PURE__ */ jsxs19("div", { className: "flex flex-col gap-1", children: [
|
|
3117
|
+
/* @__PURE__ */ jsxs19("div", { className: "flex items-center justify-between text-sm", children: [
|
|
3118
|
+
/* @__PURE__ */ jsxs19("div", { className: "flex items-center gap-2 truncate", children: [
|
|
3094
3119
|
/* @__PURE__ */ jsx24(
|
|
3095
3120
|
"span",
|
|
3096
3121
|
{
|
|
@@ -3101,7 +3126,7 @@ var RechartTooltipWithTotal = ({
|
|
|
3101
3126
|
),
|
|
3102
3127
|
/* @__PURE__ */ jsx24("span", { className: "text-muted-foreground truncate", children: entry.name })
|
|
3103
3128
|
] }),
|
|
3104
|
-
/* @__PURE__ */
|
|
3129
|
+
/* @__PURE__ */ jsxs19("div", { className: "flex items-baseline gap-3 ml-3", children: [
|
|
3105
3130
|
/* @__PURE__ */ jsx24(
|
|
3106
3131
|
"span",
|
|
3107
3132
|
{
|
|
@@ -3131,7 +3156,7 @@ var RechartTooltipWithTotal = ({
|
|
|
3131
3156
|
var TooltipWithTotal_default = RechartTooltipWithTotal;
|
|
3132
3157
|
|
|
3133
3158
|
// src/components/charts/components/tooltips/TooltipSimple.tsx
|
|
3134
|
-
import { jsx as jsx25, jsxs as
|
|
3159
|
+
import { jsx as jsx25, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
3135
3160
|
var TooltipSimple = ({
|
|
3136
3161
|
active,
|
|
3137
3162
|
payload,
|
|
@@ -3143,7 +3168,7 @@ var TooltipSimple = ({
|
|
|
3143
3168
|
}) => {
|
|
3144
3169
|
if (!active || !payload || payload.length === 0) return null;
|
|
3145
3170
|
const displayLabel = categoryFormatter ? categoryFormatter(String(label ?? "")) : label;
|
|
3146
|
-
return /* @__PURE__ */
|
|
3171
|
+
return /* @__PURE__ */ jsxs20(
|
|
3147
3172
|
"div",
|
|
3148
3173
|
{
|
|
3149
3174
|
role: "dialog",
|
|
@@ -3151,7 +3176,7 @@ var TooltipSimple = ({
|
|
|
3151
3176
|
className: "bg-card border border-border rounded-lg p-3 shadow-2xl max-w-[280px]",
|
|
3152
3177
|
style: { minWidth: 220 },
|
|
3153
3178
|
children: [
|
|
3154
|
-
/* @__PURE__ */ jsx25("div", { className: "mb-2", children: /* @__PURE__ */ jsx25("div", { className: "flex items-center justify-between gap-3", children: /* @__PURE__ */
|
|
3179
|
+
/* @__PURE__ */ jsx25("div", { className: "mb-2", children: /* @__PURE__ */ jsx25("div", { className: "flex items-center justify-between gap-3", children: /* @__PURE__ */ jsxs20("div", { className: "min-w-0", children: [
|
|
3155
3180
|
/* @__PURE__ */ jsx25("p", { className: "text-xs text-muted-foreground", children: periodLabel }),
|
|
3156
3181
|
/* @__PURE__ */ jsx25("p", { className: "font-medium text-foreground truncate", children: displayLabel })
|
|
3157
3182
|
] }) }) }),
|
|
@@ -3176,12 +3201,12 @@ var TooltipSimple = ({
|
|
|
3176
3201
|
dataKey: entry.dataKey,
|
|
3177
3202
|
name: entry.name
|
|
3178
3203
|
}) : defaultFormatted;
|
|
3179
|
-
return /* @__PURE__ */
|
|
3204
|
+
return /* @__PURE__ */ jsxs20(
|
|
3180
3205
|
"div",
|
|
3181
3206
|
{
|
|
3182
3207
|
className: "flex items-center justify-between text-sm px-2 py-2 bg-card/0 hover:bg-muted transition-colors",
|
|
3183
3208
|
children: [
|
|
3184
|
-
/* @__PURE__ */
|
|
3209
|
+
/* @__PURE__ */ jsxs20("div", { className: "flex items-center gap-3 min-w-0", children: [
|
|
3185
3210
|
/* @__PURE__ */ jsx25(
|
|
3186
3211
|
"span",
|
|
3187
3212
|
{
|
|
@@ -3211,7 +3236,7 @@ var TooltipSimple = ({
|
|
|
3211
3236
|
var TooltipSimple_default = TooltipSimple;
|
|
3212
3237
|
|
|
3213
3238
|
// src/components/charts/utils/pillLabelRenderer.tsx
|
|
3214
|
-
import { jsx as jsx26, jsxs as
|
|
3239
|
+
import { jsx as jsx26, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
3215
3240
|
var formatCompactNumber = (value) => {
|
|
3216
3241
|
const isNegative = value < 0;
|
|
3217
3242
|
const absValue = Math.abs(value);
|
|
@@ -3305,7 +3330,7 @@ var renderPillLabel = (color, variant, valueFormatter2) => {
|
|
|
3305
3330
|
textColor = "#374151";
|
|
3306
3331
|
}
|
|
3307
3332
|
}
|
|
3308
|
-
return /* @__PURE__ */
|
|
3333
|
+
return /* @__PURE__ */ jsxs21("g", { children: [
|
|
3309
3334
|
/* @__PURE__ */ jsx26(
|
|
3310
3335
|
"rect",
|
|
3311
3336
|
{
|
|
@@ -3339,7 +3364,7 @@ var renderPillLabel = (color, variant, valueFormatter2) => {
|
|
|
3339
3364
|
var pillLabelRenderer_default = renderPillLabel;
|
|
3340
3365
|
|
|
3341
3366
|
// src/components/charts/Chart.tsx
|
|
3342
|
-
import { jsx as jsx27, jsxs as
|
|
3367
|
+
import { jsx as jsx27, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
3343
3368
|
var DEFAULT_COLORS = ["#55af7d", "#8e68ff", "#2273e1"];
|
|
3344
3369
|
var Chart = ({
|
|
3345
3370
|
data,
|
|
@@ -3771,7 +3796,7 @@ var Chart = ({
|
|
|
3771
3796
|
overflowY: "hidden",
|
|
3772
3797
|
minWidth: 0
|
|
3773
3798
|
},
|
|
3774
|
-
children: /* @__PURE__ */
|
|
3799
|
+
children: /* @__PURE__ */ jsxs22(
|
|
3775
3800
|
"div",
|
|
3776
3801
|
{
|
|
3777
3802
|
className: cn("rounded-lg bg-card p-2 relative", className),
|
|
@@ -3792,7 +3817,7 @@ var Chart = ({
|
|
|
3792
3817
|
children: /* @__PURE__ */ jsx27("h3", { className: titleClassName, children: title })
|
|
3793
3818
|
}
|
|
3794
3819
|
),
|
|
3795
|
-
allKeys.length > 0 && (finalEnableHighlights || finalEnableShowOnly) && /* @__PURE__ */
|
|
3820
|
+
allKeys.length > 0 && (finalEnableHighlights || finalEnableShowOnly) && /* @__PURE__ */ jsxs22(
|
|
3796
3821
|
"div",
|
|
3797
3822
|
{
|
|
3798
3823
|
className: "flex items-center w-full",
|
|
@@ -3867,7 +3892,7 @@ var Chart = ({
|
|
|
3867
3892
|
)
|
|
3868
3893
|
}
|
|
3869
3894
|
),
|
|
3870
|
-
/* @__PURE__ */ jsx27(ResponsiveContainer, { width: "100%", height, children: /* @__PURE__ */
|
|
3895
|
+
/* @__PURE__ */ jsx27(ResponsiveContainer, { width: "100%", height, children: /* @__PURE__ */ jsxs22(
|
|
3871
3896
|
ComposedChart,
|
|
3872
3897
|
{
|
|
3873
3898
|
data: processedData,
|
|
@@ -3928,9 +3953,7 @@ var Chart = ({
|
|
|
3928
3953
|
label: yAxisLabel ? {
|
|
3929
3954
|
value: yAxisLabel,
|
|
3930
3955
|
angle: -90,
|
|
3931
|
-
|
|
3932
|
-
// to avoid overlapping the Y values / bars.
|
|
3933
|
-
position: "left",
|
|
3956
|
+
position: "leftTop",
|
|
3934
3957
|
style: {
|
|
3935
3958
|
fontSize: 12,
|
|
3936
3959
|
fill: "hsl(var(--muted-foreground))",
|
|
@@ -4151,7 +4174,7 @@ import {
|
|
|
4151
4174
|
Legend as Legend2,
|
|
4152
4175
|
LabelList as LabelList2
|
|
4153
4176
|
} from "recharts";
|
|
4154
|
-
import { jsx as jsx28, jsxs as
|
|
4177
|
+
import { jsx as jsx28, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
4155
4178
|
var DEFAULT_COLORS2 = ["#55af7d", "#8e68ff", "#2273e1"];
|
|
4156
4179
|
var BarChart = ({
|
|
4157
4180
|
data,
|
|
@@ -4572,10 +4595,10 @@ var BarChart = ({
|
|
|
4572
4595
|
label
|
|
4573
4596
|
}) => {
|
|
4574
4597
|
if (!active || !payload) return null;
|
|
4575
|
-
return /* @__PURE__ */
|
|
4598
|
+
return /* @__PURE__ */ jsxs23("div", { className: "bg-card border border-border rounded-lg p-3 shadow-lg", children: [
|
|
4576
4599
|
/* @__PURE__ */ jsx28("p", { className: "font-medium text-foreground mb-2", children: label }),
|
|
4577
4600
|
payload.map(
|
|
4578
|
-
(entry, index) => /* @__PURE__ */
|
|
4601
|
+
(entry, index) => /* @__PURE__ */ jsxs23("div", { className: "flex items-center gap-2 text-sm", children: [
|
|
4579
4602
|
/* @__PURE__ */ jsx28(
|
|
4580
4603
|
"div",
|
|
4581
4604
|
{
|
|
@@ -4583,7 +4606,7 @@ var BarChart = ({
|
|
|
4583
4606
|
style: { backgroundColor: entry.color }
|
|
4584
4607
|
}
|
|
4585
4608
|
),
|
|
4586
|
-
/* @__PURE__ */
|
|
4609
|
+
/* @__PURE__ */ jsxs23("span", { className: "text-muted-foreground", children: [
|
|
4587
4610
|
entry.name,
|
|
4588
4611
|
":"
|
|
4589
4612
|
] }),
|
|
@@ -4604,7 +4627,7 @@ var BarChart = ({
|
|
|
4604
4627
|
return `${baseClasses} text-left`;
|
|
4605
4628
|
}
|
|
4606
4629
|
};
|
|
4607
|
-
return /* @__PURE__ */
|
|
4630
|
+
return /* @__PURE__ */ jsxs23(
|
|
4608
4631
|
"div",
|
|
4609
4632
|
{
|
|
4610
4633
|
className: cn("rounded-lg bg-card p-4 relative", className),
|
|
@@ -4614,7 +4637,7 @@ var BarChart = ({
|
|
|
4614
4637
|
},
|
|
4615
4638
|
children: [
|
|
4616
4639
|
title && /* @__PURE__ */ jsx28("div", { style: { paddingLeft: `${resolvedContainerPaddingLeft}px` }, children: /* @__PURE__ */ jsx28("h3", { className: getTitleClassName(titlePosition), children: title }) }),
|
|
4617
|
-
/* @__PURE__ */
|
|
4640
|
+
/* @__PURE__ */ jsxs23(
|
|
4618
4641
|
RechartsBarChart,
|
|
4619
4642
|
{
|
|
4620
4643
|
data: processedData,
|
|
@@ -4727,7 +4750,7 @@ var BarChart = ({
|
|
|
4727
4750
|
guide.sourceTooltip.top + guide.sourceTooltip.height / 2,
|
|
4728
4751
|
guide.targetTooltip.top + guide.targetTooltip.height / 2
|
|
4729
4752
|
);
|
|
4730
|
-
return /* @__PURE__ */
|
|
4753
|
+
return /* @__PURE__ */ jsxs23("div", { children: [
|
|
4731
4754
|
/* @__PURE__ */ jsx28(
|
|
4732
4755
|
"div",
|
|
4733
4756
|
{
|
|
@@ -4825,7 +4848,7 @@ import {
|
|
|
4825
4848
|
Legend as Legend3,
|
|
4826
4849
|
LabelList as LabelList3
|
|
4827
4850
|
} from "recharts";
|
|
4828
|
-
import { jsx as jsx29, jsxs as
|
|
4851
|
+
import { jsx as jsx29, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
4829
4852
|
var defaultData = [
|
|
4830
4853
|
{ name: "A", value: 100 },
|
|
4831
4854
|
{ name: "B", value: 200 },
|
|
@@ -5207,7 +5230,7 @@ var CustomLineChart = ({
|
|
|
5207
5230
|
return "text-left";
|
|
5208
5231
|
}
|
|
5209
5232
|
};
|
|
5210
|
-
return /* @__PURE__ */ jsx29("div", { className: cn("relative", className), children: /* @__PURE__ */
|
|
5233
|
+
return /* @__PURE__ */ jsx29("div", { className: cn("relative", className), children: /* @__PURE__ */ jsxs24(
|
|
5211
5234
|
"div",
|
|
5212
5235
|
{
|
|
5213
5236
|
className: "rounded-lg bg-card p-4 relative border border-border",
|
|
@@ -5218,7 +5241,7 @@ var CustomLineChart = ({
|
|
|
5218
5241
|
onClick: handleChartBackgroundClick,
|
|
5219
5242
|
children: [
|
|
5220
5243
|
title && /* @__PURE__ */ jsx29("div", { style: { paddingLeft: `${resolvedContainerPaddingLeft}px` }, children: /* @__PURE__ */ jsx29("div", { className: cn("mb-4", getTitleClass()), children: /* @__PURE__ */ jsx29("h3", { className: "text-lg font-semibold text-foreground", children: title }) }) }),
|
|
5221
|
-
/* @__PURE__ */
|
|
5244
|
+
/* @__PURE__ */ jsxs24(
|
|
5222
5245
|
RechartsLineChart,
|
|
5223
5246
|
{
|
|
5224
5247
|
data,
|
|
@@ -5309,7 +5332,7 @@ var CustomLineChart = ({
|
|
|
5309
5332
|
guide.sourceTooltip.top + guide.sourceTooltip.height / 2,
|
|
5310
5333
|
guide.targetTooltip.top + guide.targetTooltip.height / 2
|
|
5311
5334
|
);
|
|
5312
|
-
return /* @__PURE__ */
|
|
5335
|
+
return /* @__PURE__ */ jsxs24("div", { children: [
|
|
5313
5336
|
/* @__PURE__ */ jsx29(
|
|
5314
5337
|
"div",
|
|
5315
5338
|
{
|
|
@@ -5402,7 +5425,7 @@ import {
|
|
|
5402
5425
|
Tooltip as Tooltip4,
|
|
5403
5426
|
Legend as Legend4
|
|
5404
5427
|
} from "recharts";
|
|
5405
|
-
import { jsx as jsx30, jsxs as
|
|
5428
|
+
import { jsx as jsx30, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
5406
5429
|
var defaultData2 = [
|
|
5407
5430
|
{ name: "Vendas", value: 4e3 },
|
|
5408
5431
|
{ name: "Marketing", value: 3e3 },
|
|
@@ -5469,7 +5492,7 @@ var CustomPieChart = ({
|
|
|
5469
5492
|
centerY = "50%"
|
|
5470
5493
|
}) => {
|
|
5471
5494
|
const finalColors = colors2 || DEFAULT_COLORS4;
|
|
5472
|
-
return /* @__PURE__ */ jsx30("div", { className: cn("w-full rounded-lg bg-card p-4", className), children: /* @__PURE__ */ jsx30(ResponsiveContainer2, { width, height, children: /* @__PURE__ */
|
|
5495
|
+
return /* @__PURE__ */ jsx30("div", { className: cn("w-full rounded-lg bg-card p-4", className), children: /* @__PURE__ */ jsx30(ResponsiveContainer2, { width, height, children: /* @__PURE__ */ jsxs25(RechartsPieChart, { children: [
|
|
5473
5496
|
/* @__PURE__ */ jsx30(
|
|
5474
5497
|
Pie,
|
|
5475
5498
|
{
|
|
@@ -5622,204 +5645,52 @@ AvatarFallbackBase.displayName = AvatarPrimitive.Fallback.displayName;
|
|
|
5622
5645
|
import { Slot as Slot3 } from "@radix-ui/react-slot";
|
|
5623
5646
|
import { cva as cva2 } from "class-variance-authority";
|
|
5624
5647
|
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
5625
|
-
var tailwindColors = {
|
|
5626
|
-
// Red
|
|
5627
|
-
"red-50": "#fef2f2",
|
|
5628
|
-
"red-100": "#fee2e2",
|
|
5629
|
-
"red-200": "#fecaca",
|
|
5630
|
-
"red-300": "#fca5a5",
|
|
5631
|
-
"red-400": "#f87171",
|
|
5632
|
-
"red-500": "#ef4444",
|
|
5633
|
-
"red-600": "#dc2626",
|
|
5634
|
-
"red-700": "#b91c1c",
|
|
5635
|
-
"red-800": "#991b1b",
|
|
5636
|
-
"red-900": "#7f1d1d",
|
|
5637
|
-
// Orange
|
|
5638
|
-
"orange-50": "#fff7ed",
|
|
5639
|
-
"orange-100": "#ffedd5",
|
|
5640
|
-
"orange-200": "#fed7aa",
|
|
5641
|
-
"orange-300": "#fdba74",
|
|
5642
|
-
"orange-400": "#fb923c",
|
|
5643
|
-
"orange-500": "#f97316",
|
|
5644
|
-
"orange-600": "#ea580c",
|
|
5645
|
-
"orange-700": "#c2410c",
|
|
5646
|
-
"orange-800": "#9a3412",
|
|
5647
|
-
"orange-900": "#7c2d12",
|
|
5648
|
-
// Yellow
|
|
5649
|
-
"yellow-50": "#fefce8",
|
|
5650
|
-
"yellow-100": "#fef3c7",
|
|
5651
|
-
"yellow-200": "#fde68a",
|
|
5652
|
-
"yellow-300": "#fcd34d",
|
|
5653
|
-
"yellow-400": "#fbbf24",
|
|
5654
|
-
"yellow-500": "#f59e0b",
|
|
5655
|
-
"yellow-600": "#d97706",
|
|
5656
|
-
"yellow-700": "#b45309",
|
|
5657
|
-
"yellow-800": "#92400e",
|
|
5658
|
-
"yellow-900": "#78350f",
|
|
5659
|
-
// Green
|
|
5660
|
-
"green-50": "#f0fdf4",
|
|
5661
|
-
"green-100": "#dcfce7",
|
|
5662
|
-
"green-200": "#bbf7d0",
|
|
5663
|
-
"green-300": "#86efac",
|
|
5664
|
-
"green-400": "#4ade80",
|
|
5665
|
-
"green-500": "#22c55e",
|
|
5666
|
-
"green-600": "#16a34a",
|
|
5667
|
-
"green-700": "#15803d",
|
|
5668
|
-
"green-800": "#166534",
|
|
5669
|
-
"green-900": "#14532d",
|
|
5670
|
-
// Blue
|
|
5671
|
-
"blue-50": "#eff6ff",
|
|
5672
|
-
"blue-100": "#dbeafe",
|
|
5673
|
-
"blue-200": "#bfdbfe",
|
|
5674
|
-
"blue-300": "#93c5fd",
|
|
5675
|
-
"blue-400": "#60a5fa",
|
|
5676
|
-
"blue-500": "#3b82f6",
|
|
5677
|
-
"blue-600": "#2563eb",
|
|
5678
|
-
"blue-700": "#1d4ed8",
|
|
5679
|
-
"blue-800": "#1e40af",
|
|
5680
|
-
"blue-900": "#1e3a8a",
|
|
5681
|
-
// Purple
|
|
5682
|
-
"purple-50": "#faf5ff",
|
|
5683
|
-
"purple-100": "#f3e8ff",
|
|
5684
|
-
"purple-200": "#e9d5ff",
|
|
5685
|
-
"purple-300": "#d8b4fe",
|
|
5686
|
-
"purple-400": "#c084fc",
|
|
5687
|
-
"purple-500": "#a855f7",
|
|
5688
|
-
"purple-600": "#9333ea",
|
|
5689
|
-
"purple-700": "#7c3aed",
|
|
5690
|
-
"purple-800": "#6b21a8",
|
|
5691
|
-
"purple-900": "#581c87",
|
|
5692
|
-
// Pink
|
|
5693
|
-
"pink-50": "#fdf2f8",
|
|
5694
|
-
"pink-100": "#fce7f3",
|
|
5695
|
-
"pink-200": "#fbcfe8",
|
|
5696
|
-
"pink-300": "#f9a8d4",
|
|
5697
|
-
"pink-400": "#f472b6",
|
|
5698
|
-
"pink-500": "#ec4899",
|
|
5699
|
-
"pink-600": "#db2777",
|
|
5700
|
-
"pink-700": "#be185d",
|
|
5701
|
-
"pink-800": "#9d174d",
|
|
5702
|
-
"pink-900": "#831843",
|
|
5703
|
-
// Gray
|
|
5704
|
-
"gray-50": "#f9fafb",
|
|
5705
|
-
"gray-100": "#f3f4f6",
|
|
5706
|
-
"gray-200": "#e5e7eb",
|
|
5707
|
-
"gray-300": "#d1d5db",
|
|
5708
|
-
"gray-400": "#9ca3af",
|
|
5709
|
-
"gray-500": "#6b7280",
|
|
5710
|
-
"gray-600": "#4b5563",
|
|
5711
|
-
"gray-700": "#374151",
|
|
5712
|
-
"gray-800": "#1f2937",
|
|
5713
|
-
"gray-900": "#111827",
|
|
5714
|
-
// Indigo
|
|
5715
|
-
"indigo-50": "#eef2ff",
|
|
5716
|
-
"indigo-100": "#e0e7ff",
|
|
5717
|
-
"indigo-200": "#c7d2fe",
|
|
5718
|
-
"indigo-300": "#a5b4fc",
|
|
5719
|
-
"indigo-400": "#818cf8",
|
|
5720
|
-
"indigo-500": "#6366f1",
|
|
5721
|
-
"indigo-600": "#4f46e5",
|
|
5722
|
-
"indigo-700": "#4338ca",
|
|
5723
|
-
"indigo-800": "#3730a3",
|
|
5724
|
-
"indigo-900": "#312e81",
|
|
5725
|
-
// Teal
|
|
5726
|
-
"teal-50": "#f0fdfa",
|
|
5727
|
-
"teal-100": "#ccfbf1",
|
|
5728
|
-
"teal-200": "#99f6e4",
|
|
5729
|
-
"teal-300": "#5eead4",
|
|
5730
|
-
"teal-400": "#2dd4bf",
|
|
5731
|
-
"teal-500": "#14b8a6",
|
|
5732
|
-
"teal-600": "#0d9488",
|
|
5733
|
-
"teal-700": "#0f766e",
|
|
5734
|
-
"teal-800": "#115e59",
|
|
5735
|
-
"teal-900": "#134e4a",
|
|
5736
|
-
// Emerald
|
|
5737
|
-
"emerald-50": "#ecfdf5",
|
|
5738
|
-
"emerald-100": "#d1fae5",
|
|
5739
|
-
"emerald-200": "#a7f3d0",
|
|
5740
|
-
"emerald-300": "#6ee7b7",
|
|
5741
|
-
"emerald-400": "#34d399",
|
|
5742
|
-
"emerald-500": "#10b981",
|
|
5743
|
-
"emerald-600": "#059669",
|
|
5744
|
-
"emerald-700": "#047857",
|
|
5745
|
-
"emerald-800": "#065f46",
|
|
5746
|
-
"emerald-900": "#064e3b",
|
|
5747
|
-
// Cyan
|
|
5748
|
-
"cyan-50": "#ecfeff",
|
|
5749
|
-
"cyan-100": "#cffafe",
|
|
5750
|
-
"cyan-200": "#a5f3fc",
|
|
5751
|
-
"cyan-300": "#67e8f9",
|
|
5752
|
-
"cyan-400": "#22d3ee",
|
|
5753
|
-
"cyan-500": "#06b6d4",
|
|
5754
|
-
"cyan-600": "#0891b2",
|
|
5755
|
-
"cyan-700": "#0e7490",
|
|
5756
|
-
"cyan-800": "#155e75",
|
|
5757
|
-
"cyan-900": "#164e63"
|
|
5758
|
-
};
|
|
5759
|
-
var getTailwindColor = (color) => {
|
|
5760
|
-
if (color.startsWith("#") || color.startsWith("rgb") || color.startsWith("hsl")) {
|
|
5761
|
-
return color;
|
|
5762
|
-
}
|
|
5763
|
-
if (tailwindColors[color]) {
|
|
5764
|
-
return tailwindColors[color];
|
|
5765
|
-
}
|
|
5766
|
-
if (!color.includes("-")) {
|
|
5767
|
-
const defaultColor = `${color}-500`;
|
|
5768
|
-
if (tailwindColors[defaultColor]) {
|
|
5769
|
-
return tailwindColors[defaultColor];
|
|
5770
|
-
}
|
|
5771
|
-
}
|
|
5772
|
-
return color;
|
|
5773
|
-
};
|
|
5774
5648
|
var badgeVariants = cva2(
|
|
5775
|
-
"inline-flex items-center justify-center rounded-md border
|
|
5649
|
+
"inline-flex items-center justify-center rounded-md border text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",
|
|
5776
5650
|
{
|
|
5777
5651
|
variants: {
|
|
5778
|
-
|
|
5779
|
-
|
|
5780
|
-
|
|
5781
|
-
|
|
5782
|
-
outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"
|
|
5783
|
-
},
|
|
5784
|
-
status: {
|
|
5785
|
-
success: "bg-green-500 border-white dark:border-zinc-900",
|
|
5786
|
-
desactivated: "bg-gray-400 border-white dark:border-zinc-900",
|
|
5787
|
-
destructive: "bg-red-500 border-white dark:border-zinc-900",
|
|
5788
|
-
away: "bg-yellow-400 border-white dark:border-zinc-900",
|
|
5789
|
-
custom: "border-white dark:border-zinc-900"
|
|
5652
|
+
size: {
|
|
5653
|
+
sm: "px-1 py-0.5 text-xs",
|
|
5654
|
+
md: "px-2 py-1 text-xs",
|
|
5655
|
+
lg: "px-3 py-1 text-sm"
|
|
5790
5656
|
}
|
|
5791
5657
|
},
|
|
5792
5658
|
defaultVariants: {
|
|
5793
|
-
|
|
5659
|
+
size: "md"
|
|
5794
5660
|
}
|
|
5795
5661
|
}
|
|
5796
5662
|
);
|
|
5797
5663
|
function BadgeBase({
|
|
5798
5664
|
className,
|
|
5799
|
-
|
|
5800
|
-
|
|
5801
|
-
statusColor,
|
|
5665
|
+
color,
|
|
5666
|
+
size = "md",
|
|
5802
5667
|
asChild = false,
|
|
5803
5668
|
children,
|
|
5804
5669
|
style,
|
|
5805
5670
|
...props
|
|
5806
5671
|
}) {
|
|
5807
5672
|
const Comp = asChild ? Slot3 : "span";
|
|
5808
|
-
const
|
|
5809
|
-
const
|
|
5810
|
-
|
|
5673
|
+
const customStyle = style;
|
|
5674
|
+
const colorClasses = {
|
|
5675
|
+
green: "bg-green-50 text-green-500 border-green-200",
|
|
5676
|
+
gray: "bg-gray-50 text-gray-500 border-gray-200",
|
|
5677
|
+
red: "bg-red-50 text-red-500 border-red-200",
|
|
5678
|
+
yellow: "bg-yellow-50 text-yellow-600 border-yellow-200",
|
|
5679
|
+
blue: "bg-blue-50 text-blue-500 border-blue-200",
|
|
5680
|
+
purple: "bg-purple-50 text-purple-500 border-purple-200"
|
|
5681
|
+
};
|
|
5811
5682
|
return /* @__PURE__ */ jsx32(
|
|
5812
5683
|
Comp,
|
|
5813
5684
|
{
|
|
5814
5685
|
"data-slot": "badge",
|
|
5815
5686
|
className: cn(
|
|
5816
|
-
badgeVariants({
|
|
5817
|
-
|
|
5687
|
+
badgeVariants({ size }),
|
|
5688
|
+
color ? colorClasses[color] : void 0,
|
|
5818
5689
|
className
|
|
5819
5690
|
),
|
|
5820
5691
|
style: customStyle,
|
|
5821
5692
|
...props,
|
|
5822
|
-
children
|
|
5693
|
+
children
|
|
5823
5694
|
}
|
|
5824
5695
|
);
|
|
5825
5696
|
}
|
|
@@ -5965,7 +5836,7 @@ import {
|
|
|
5965
5836
|
FilePptIcon,
|
|
5966
5837
|
FileDocIcon
|
|
5967
5838
|
} from "@phosphor-icons/react";
|
|
5968
|
-
import { Fragment as Fragment6, jsx as jsx35, jsxs as
|
|
5839
|
+
import { Fragment as Fragment6, jsx as jsx35, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
5969
5840
|
var formatFileSize = (bytes) => {
|
|
5970
5841
|
if (bytes === 0) return "0 Bytes";
|
|
5971
5842
|
const k = 1024;
|
|
@@ -6175,7 +6046,7 @@ var FileUploader = React18.forwardRef(
|
|
|
6175
6046
|
};
|
|
6176
6047
|
const acceptString = accept.join(",");
|
|
6177
6048
|
const defaultSubtext = dropzoneSubtext || `Formatos: ${accept.join(", ")}. M\xE1ximo: ${formatFileSize(maxSize)}`;
|
|
6178
|
-
return /* @__PURE__ */ jsx35("div", { ref, className: cn("w-full", className), ...props, children: /* @__PURE__ */
|
|
6049
|
+
return /* @__PURE__ */ jsx35("div", { ref, className: cn("w-full", className), ...props, children: /* @__PURE__ */ jsxs26(
|
|
6179
6050
|
motion10.div,
|
|
6180
6051
|
{
|
|
6181
6052
|
className: cn(
|
|
@@ -6266,7 +6137,7 @@ var FileUploader = React18.forwardRef(
|
|
|
6266
6137
|
children: defaultSubtext
|
|
6267
6138
|
}
|
|
6268
6139
|
),
|
|
6269
|
-
/* @__PURE__ */ jsx35(AnimatePresence8, { children: files.length > 0 && /* @__PURE__ */
|
|
6140
|
+
/* @__PURE__ */ jsx35(AnimatePresence8, { children: files.length > 0 && /* @__PURE__ */ jsxs26(
|
|
6270
6141
|
motion10.div,
|
|
6271
6142
|
{
|
|
6272
6143
|
initial: { opacity: 0, scale: 0.8, y: 10 },
|
|
@@ -6284,7 +6155,7 @@ var FileUploader = React18.forwardRef(
|
|
|
6284
6155
|
transition: { duration: 0.3 },
|
|
6285
6156
|
children: [
|
|
6286
6157
|
/* @__PURE__ */ jsx35("div", { className: "h-4 w-4 text-primary flex items-center justify-center", children: /* @__PURE__ */ jsx35(CheckIcon6, { size: 16, className: "text-emerald-500" }) }),
|
|
6287
|
-
/* @__PURE__ */
|
|
6158
|
+
/* @__PURE__ */ jsxs26(
|
|
6288
6159
|
motion10.span,
|
|
6289
6160
|
{
|
|
6290
6161
|
className: "text-sm font-semibold text-primary",
|
|
@@ -6307,15 +6178,15 @@ var FileUploader = React18.forwardRef(
|
|
|
6307
6178
|
initial: animate ? { opacity: 0, y: 10 } : false,
|
|
6308
6179
|
animate: { opacity: 1, y: 0 },
|
|
6309
6180
|
transition: { delay: 0.3 },
|
|
6310
|
-
children: /* @__PURE__ */
|
|
6311
|
-
/* @__PURE__ */
|
|
6181
|
+
children: /* @__PURE__ */ jsxs26("div", { children: [
|
|
6182
|
+
/* @__PURE__ */ jsxs26("h4", { className: "mb-3 text-sm font-medium text-muted-foreground", children: [
|
|
6312
6183
|
"Arquivos selecionados (",
|
|
6313
6184
|
files.length,
|
|
6314
6185
|
"/",
|
|
6315
6186
|
maxFiles,
|
|
6316
6187
|
")"
|
|
6317
6188
|
] }),
|
|
6318
|
-
/* @__PURE__ */ jsx35("div", { className: "space-y-2 overflow-y-auto max-h-44", children: /* @__PURE__ */ jsx35(AnimatePresence8, { mode: "popLayout", children: files.map((file, index) => /* @__PURE__ */
|
|
6189
|
+
/* @__PURE__ */ jsx35("div", { className: "space-y-2 overflow-y-auto max-h-44", children: /* @__PURE__ */ jsx35(AnimatePresence8, { mode: "popLayout", children: files.map((file, index) => /* @__PURE__ */ jsxs26(
|
|
6319
6190
|
motion10.div,
|
|
6320
6191
|
{
|
|
6321
6192
|
layout: true,
|
|
@@ -6349,7 +6220,7 @@ var FileUploader = React18.forwardRef(
|
|
|
6349
6220
|
// Ícone baseado no tipo de arquivo
|
|
6350
6221
|
getFileTypeIcon(file)
|
|
6351
6222
|
) }),
|
|
6352
|
-
/* @__PURE__ */
|
|
6223
|
+
/* @__PURE__ */ jsxs26("div", { className: "min-w-0 flex-1", children: [
|
|
6353
6224
|
/* @__PURE__ */ jsx35(
|
|
6354
6225
|
"p",
|
|
6355
6226
|
{
|
|
@@ -6358,9 +6229,9 @@ var FileUploader = React18.forwardRef(
|
|
|
6358
6229
|
children: file.name
|
|
6359
6230
|
}
|
|
6360
6231
|
),
|
|
6361
|
-
/* @__PURE__ */
|
|
6232
|
+
/* @__PURE__ */ jsxs26("div", { className: "flex items-center gap-2 text-xs text-muted-foreground", children: [
|
|
6362
6233
|
/* @__PURE__ */ jsx35("span", { children: formatFileSize(file.size) }),
|
|
6363
|
-
file.type && /* @__PURE__ */
|
|
6234
|
+
file.type && /* @__PURE__ */ jsxs26(Fragment6, { children: [
|
|
6364
6235
|
/* @__PURE__ */ jsx35("span", { children: "\u2022" }),
|
|
6365
6236
|
/* @__PURE__ */ jsx35("span", { className: "uppercase", children: getFileExtension(file.name) })
|
|
6366
6237
|
] })
|
|
@@ -6405,7 +6276,7 @@ FileUploader.displayName = "FileUploader";
|
|
|
6405
6276
|
// src/components/ui/feedback/AlertDialogBase.tsx
|
|
6406
6277
|
import * as React19 from "react";
|
|
6407
6278
|
import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
|
|
6408
|
-
import { jsx as jsx36, jsxs as
|
|
6279
|
+
import { jsx as jsx36, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
6409
6280
|
var AlertDialogBase = AlertDialogPrimitive.Root;
|
|
6410
6281
|
var AlertDialogTriggerBase = AlertDialogPrimitive.Trigger;
|
|
6411
6282
|
var AlertDialogPortalBase = AlertDialogPrimitive.Portal;
|
|
@@ -6422,7 +6293,7 @@ var AlertDialogOverlayBase = React19.forwardRef(({ className, testid = "alertdia
|
|
|
6422
6293
|
}
|
|
6423
6294
|
));
|
|
6424
6295
|
AlertDialogOverlayBase.displayName = AlertDialogPrimitive.Overlay.displayName;
|
|
6425
|
-
var AlertDialogContentBase = React19.forwardRef(({ className, testid = "alertdialog-content", ...props }, ref) => /* @__PURE__ */
|
|
6296
|
+
var AlertDialogContentBase = React19.forwardRef(({ className, testid = "alertdialog-content", ...props }, ref) => /* @__PURE__ */ jsxs27(AlertDialogPortalBase, { children: [
|
|
6426
6297
|
/* @__PURE__ */ jsx36(AlertDialogOverlayBase, {}),
|
|
6427
6298
|
/* @__PURE__ */ jsx36(
|
|
6428
6299
|
AlertDialogPrimitive.Content,
|
|
@@ -6510,7 +6381,7 @@ AlertDialogCancelBase.displayName = AlertDialogPrimitive.Cancel.displayName;
|
|
|
6510
6381
|
// src/components/ui/feedback/DestructiveDialog.tsx
|
|
6511
6382
|
import * as React20 from "react";
|
|
6512
6383
|
import { XCircleIcon } from "@phosphor-icons/react";
|
|
6513
|
-
import { jsx as jsx37, jsxs as
|
|
6384
|
+
import { jsx as jsx37, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
6514
6385
|
var DestructiveDialog = ({
|
|
6515
6386
|
title,
|
|
6516
6387
|
description,
|
|
@@ -6520,21 +6391,21 @@ var DestructiveDialog = ({
|
|
|
6520
6391
|
triggerContent
|
|
6521
6392
|
}) => {
|
|
6522
6393
|
const triggerEl = React20.isValidElement(children) ? /* @__PURE__ */ jsx37(AlertDialogTriggerBase, { asChild: true, children }) : /* @__PURE__ */ jsx37(AlertDialogTriggerBase, { children: /* @__PURE__ */ jsx37(ButtonBase, { variant: "destructive", children: triggerContent ?? "Excluir" }) });
|
|
6523
|
-
return /* @__PURE__ */
|
|
6394
|
+
return /* @__PURE__ */ jsxs28(AlertDialogBase, { children: [
|
|
6524
6395
|
triggerEl,
|
|
6525
|
-
/* @__PURE__ */
|
|
6396
|
+
/* @__PURE__ */ jsxs28(
|
|
6526
6397
|
AlertDialogContentBase,
|
|
6527
6398
|
{
|
|
6528
6399
|
className: cn("border border-destructive bg-background"),
|
|
6529
6400
|
children: [
|
|
6530
|
-
/* @__PURE__ */
|
|
6401
|
+
/* @__PURE__ */ jsxs28("div", { className: "flex items-start gap-4", children: [
|
|
6531
6402
|
/* @__PURE__ */ jsx37("div", { className: "flex items-center justify-center w-10 h-10 rounded-full ring-1 ring-destructive/30", children: /* @__PURE__ */ jsx37(XCircleIcon, { className: "w-6 h-6 text-destructive" }) }),
|
|
6532
|
-
/* @__PURE__ */
|
|
6403
|
+
/* @__PURE__ */ jsxs28("div", { className: "flex-1", children: [
|
|
6533
6404
|
/* @__PURE__ */ jsx37(AlertDialogTitleBase, { className: "text-lg sm:text-xl font-semibold text-destructive", children: title }),
|
|
6534
6405
|
/* @__PURE__ */ jsx37(AlertDialogDescriptionBase, { className: "mt-2 text-sm text-muted-foreground", children: description })
|
|
6535
6406
|
] })
|
|
6536
6407
|
] }),
|
|
6537
|
-
/* @__PURE__ */
|
|
6408
|
+
/* @__PURE__ */ jsxs28(AlertDialogFooterBase, { className: "mt-2 flex justify-end gap-3", children: [
|
|
6538
6409
|
/* @__PURE__ */ jsx37(
|
|
6539
6410
|
AlertDialogCancelBase,
|
|
6540
6411
|
{
|
|
@@ -6566,7 +6437,7 @@ var DestructiveDialog = ({
|
|
|
6566
6437
|
// src/components/ui/feedback/LoadingBase.tsx
|
|
6567
6438
|
import * as React21 from "react";
|
|
6568
6439
|
import { cva as cva3 } from "class-variance-authority";
|
|
6569
|
-
import { jsx as jsx38, jsxs as
|
|
6440
|
+
import { jsx as jsx38, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
6570
6441
|
var loadingVariants = cva3(
|
|
6571
6442
|
"rounded-full border-2 animate-spin border-muted border-t-primary",
|
|
6572
6443
|
{
|
|
@@ -6640,7 +6511,7 @@ var LoadingBase = React21.forwardRef(
|
|
|
6640
6511
|
}, []);
|
|
6641
6512
|
const renderSpinner = () => {
|
|
6642
6513
|
if (variant === "dots") {
|
|
6643
|
-
return /* @__PURE__ */
|
|
6514
|
+
return /* @__PURE__ */ jsxs29("div", { className: cn(dotsVariants({ size })), "aria-hidden": "true", children: [
|
|
6644
6515
|
/* @__PURE__ */ jsx38(
|
|
6645
6516
|
"div",
|
|
6646
6517
|
{
|
|
@@ -6687,7 +6558,7 @@ var LoadingBase = React21.forwardRef(
|
|
|
6687
6558
|
}
|
|
6688
6559
|
);
|
|
6689
6560
|
};
|
|
6690
|
-
const loadingContent = /* @__PURE__ */
|
|
6561
|
+
const loadingContent = /* @__PURE__ */ jsxs29("div", { className: "flex flex-col items-center gap-4", children: [
|
|
6691
6562
|
renderSpinner(),
|
|
6692
6563
|
message && /* @__PURE__ */ jsx38("p", { className: "text-sm font-medium text-muted-foreground animate-pulse", children: message })
|
|
6693
6564
|
] });
|
|
@@ -6738,7 +6609,7 @@ LoadingBase.displayName = "LoadingBase";
|
|
|
6738
6609
|
import * as React22 from "react";
|
|
6739
6610
|
import * as DialogPrimitive2 from "@radix-ui/react-dialog";
|
|
6740
6611
|
import { XIcon as XIcon6 } from "@phosphor-icons/react";
|
|
6741
|
-
import { jsx as jsx39, jsxs as
|
|
6612
|
+
import { jsx as jsx39, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
6742
6613
|
var ModalBase = DialogPrimitive2.Root;
|
|
6743
6614
|
var ModalTriggerBase = DialogPrimitive2.Trigger;
|
|
6744
6615
|
var ModalPortalBase = DialogPrimitive2.Portal;
|
|
@@ -6768,7 +6639,7 @@ var ModalContentBase = React22.forwardRef(
|
|
|
6768
6639
|
}, ref) => {
|
|
6769
6640
|
const sizeClass = size === "sm" ? "max-w-md" : size === "lg" ? "max-w-4xl" : size === "full" ? "w-full max-w-[calc(100%-2rem)]" : "max-w-2xl";
|
|
6770
6641
|
const positionClass = centered ? "left-[50%] top-[50%] translate-x-[-50%] translate-y-[-50%]" : "left-[50%] top-20 translate-x-[-50%] translate-y-0 sm:translate-y-0";
|
|
6771
|
-
return /* @__PURE__ */
|
|
6642
|
+
return /* @__PURE__ */ jsxs30(ModalPortalBase, { children: [
|
|
6772
6643
|
/* @__PURE__ */ jsx39(
|
|
6773
6644
|
ModalOverlayBase,
|
|
6774
6645
|
{
|
|
@@ -6794,7 +6665,7 @@ var ModalContentBase = React22.forwardRef(
|
|
|
6794
6665
|
}
|
|
6795
6666
|
}
|
|
6796
6667
|
),
|
|
6797
|
-
/* @__PURE__ */
|
|
6668
|
+
/* @__PURE__ */ jsxs30(
|
|
6798
6669
|
DialogPrimitive2.Content,
|
|
6799
6670
|
{
|
|
6800
6671
|
ref,
|
|
@@ -6809,7 +6680,7 @@ var ModalContentBase = React22.forwardRef(
|
|
|
6809
6680
|
...props,
|
|
6810
6681
|
children: [
|
|
6811
6682
|
children,
|
|
6812
|
-
/* @__PURE__ */
|
|
6683
|
+
/* @__PURE__ */ jsxs30(DialogPrimitive2.Close, { className: "absolute right-3 top-3 sm:right-4 sm:top-4 rounded-md bg-muted/10 p-1.5 opacity-80 hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none z-10 hover:bg-muted/20 transition-colors", children: [
|
|
6813
6684
|
/* @__PURE__ */ jsx39(XIcon6, { className: "h-5 w-5 sm:h-4 sm:w-4 text-foreground" }),
|
|
6814
6685
|
/* @__PURE__ */ jsx39("span", { className: "sr-only", children: "Close" })
|
|
6815
6686
|
] })
|
|
@@ -6873,7 +6744,7 @@ ModalDescriptionBase.displayName = DialogPrimitive2.Description.displayName;
|
|
|
6873
6744
|
// src/components/ui/feedback/ProgressBase.tsx
|
|
6874
6745
|
import * as React23 from "react";
|
|
6875
6746
|
import * as ProgressPrimitive from "@radix-ui/react-progress";
|
|
6876
|
-
import { jsx as jsx40, jsxs as
|
|
6747
|
+
import { jsx as jsx40, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
6877
6748
|
var ProgressBase = React23.forwardRef(
|
|
6878
6749
|
({
|
|
6879
6750
|
className,
|
|
@@ -6923,15 +6794,15 @@ var ProgressBase = React23.forwardRef(
|
|
|
6923
6794
|
);
|
|
6924
6795
|
case "bar":
|
|
6925
6796
|
default:
|
|
6926
|
-
return /* @__PURE__ */
|
|
6797
|
+
return /* @__PURE__ */ jsxs31("div", { className: "flex flex-col gap-1 w-full min-w-[150px]", children: [
|
|
6927
6798
|
label && /* @__PURE__ */ jsx40(LabelBase_default, { className: "py-2", children: label }),
|
|
6928
|
-
/* @__PURE__ */
|
|
6929
|
-
showValue && valuePosition === "left" && /* @__PURE__ */
|
|
6799
|
+
/* @__PURE__ */ jsxs31("div", { className: "flex items-center gap-2", children: [
|
|
6800
|
+
showValue && valuePosition === "left" && /* @__PURE__ */ jsxs31("div", { className: "w-12 text-sm text-right font-extrabold", children: [
|
|
6930
6801
|
Math.round(value || 0),
|
|
6931
6802
|
"%"
|
|
6932
6803
|
] }),
|
|
6933
6804
|
leftIcon && /* @__PURE__ */ jsx40("div", { className: "flex items-center justify-center", children: leftIcon }),
|
|
6934
|
-
/* @__PURE__ */
|
|
6805
|
+
/* @__PURE__ */ jsxs31(
|
|
6935
6806
|
ProgressPrimitive.Root,
|
|
6936
6807
|
{
|
|
6937
6808
|
ref,
|
|
@@ -6947,7 +6818,6 @@ var ProgressBase = React23.forwardRef(
|
|
|
6947
6818
|
{
|
|
6948
6819
|
className: cn(
|
|
6949
6820
|
"h-full transition-all duration-500 ease-in-out rounded-lg",
|
|
6950
|
-
// quando não usa autocolor, Indicator deve mostrar a cor primária
|
|
6951
6821
|
autocolor && autocolor.length >= 2 ? "bg-transparent" : "bg-primary"
|
|
6952
6822
|
),
|
|
6953
6823
|
style: { width: `${indicatorWidth}%` }
|
|
@@ -6984,13 +6854,13 @@ var ProgressBase = React23.forwardRef(
|
|
|
6984
6854
|
{
|
|
6985
6855
|
"aria-hidden": "true",
|
|
6986
6856
|
className: "absolute top-0 bottom-0 w-0.5 bg-black/70 transition-all duration-500 ease-in-out pointer-events-none",
|
|
6987
|
-
style: { left:
|
|
6988
|
-
children: value >
|
|
6857
|
+
style: { left: `${100 / value * 100}%` },
|
|
6858
|
+
children: value > 120 && /* @__PURE__ */ jsx40("div", { className: "absolute left-full ml-2 top-1/2 -translate-y-1/2 text-xs whitespace-nowrap font-extrabold", children: `+${Math.round(
|
|
6989
6859
|
value - 100
|
|
6990
6860
|
)}%` })
|
|
6991
6861
|
}
|
|
6992
6862
|
),
|
|
6993
|
-
showValue && valuePosition === "inside" && /* @__PURE__ */
|
|
6863
|
+
showValue && valuePosition === "inside" && /* @__PURE__ */ jsxs31(
|
|
6994
6864
|
"span",
|
|
6995
6865
|
{
|
|
6996
6866
|
className: "absolute inset-0 flex items-center justify-center text-sm select-none pointer-events-none text-secondary font-extrabold",
|
|
@@ -7004,7 +6874,7 @@ var ProgressBase = React23.forwardRef(
|
|
|
7004
6874
|
]
|
|
7005
6875
|
}
|
|
7006
6876
|
),
|
|
7007
|
-
showValue && valuePosition === "right" && /* @__PURE__ */
|
|
6877
|
+
showValue && valuePosition === "right" && /* @__PURE__ */ jsxs31("div", { className: "w-12 text-sm font-extrabold text-left", children: [
|
|
7008
6878
|
Math.round(value || 0),
|
|
7009
6879
|
"%"
|
|
7010
6880
|
] }),
|
|
@@ -7021,7 +6891,7 @@ var ProgressSegmentsBase = ({
|
|
|
7021
6891
|
value
|
|
7022
6892
|
}) => {
|
|
7023
6893
|
const filled = Math.round(value / 100 * segments);
|
|
7024
|
-
return /* @__PURE__ */
|
|
6894
|
+
return /* @__PURE__ */ jsxs31("div", { className: "flex flex-col gap-1 w-full min-w-[150px]", children: [
|
|
7025
6895
|
label && /* @__PURE__ */ jsx40(LabelBase_default, { className: "py-2", children: label }),
|
|
7026
6896
|
/* @__PURE__ */ jsx40("div", { className: "flex gap-1 w-full", children: Array.from({ length: segments }).map((_, idx) => /* @__PURE__ */ jsx40(
|
|
7027
6897
|
"div",
|
|
@@ -7052,13 +6922,13 @@ var ProgressPanelsBase = ({
|
|
|
7052
6922
|
steps,
|
|
7053
6923
|
currentStep
|
|
7054
6924
|
}) => {
|
|
7055
|
-
return /* @__PURE__ */
|
|
6925
|
+
return /* @__PURE__ */ jsxs31("div", { className: "flex flex-col gap-1 w-full", children: [
|
|
7056
6926
|
label && /* @__PURE__ */ jsx40(LabelBase_default, { className: "py-2", children: label }),
|
|
7057
6927
|
/* @__PURE__ */ jsx40("div", { className: "flex w-full gap-1 rounded-lg overflow-hidden", children: steps.map((step, idx) => {
|
|
7058
6928
|
const isActive = idx === currentStep;
|
|
7059
6929
|
const isLast = idx === steps.length - 1;
|
|
7060
|
-
return /* @__PURE__ */
|
|
7061
|
-
/* @__PURE__ */
|
|
6930
|
+
return /* @__PURE__ */ jsxs31(React23.Fragment, { children: [
|
|
6931
|
+
/* @__PURE__ */ jsxs31(
|
|
7062
6932
|
"div",
|
|
7063
6933
|
{
|
|
7064
6934
|
className: cn(
|
|
@@ -7084,9 +6954,9 @@ var ProgressCirclesBase = ({
|
|
|
7084
6954
|
steps,
|
|
7085
6955
|
currentStep
|
|
7086
6956
|
}) => {
|
|
7087
|
-
return /* @__PURE__ */
|
|
6957
|
+
return /* @__PURE__ */ jsxs31("div", { className: "flex flex-col gap-2 w-full", children: [
|
|
7088
6958
|
label && /* @__PURE__ */ jsx40("label", { className: "py-2 text-base font-semibold text-gray-700 dark:text-gray-300", children: label }),
|
|
7089
|
-
/* @__PURE__ */
|
|
6959
|
+
/* @__PURE__ */ jsxs31("div", { className: "relative flex items-center justify-between w-full", children: [
|
|
7090
6960
|
/* @__PURE__ */ jsx40("div", { className: "absolute top-5 left-0 w-full h-1 bg-zinc-200 dark:bg-zinc-700" }),
|
|
7091
6961
|
/* @__PURE__ */ jsx40(
|
|
7092
6962
|
"div",
|
|
@@ -7099,7 +6969,7 @@ var ProgressCirclesBase = ({
|
|
|
7099
6969
|
),
|
|
7100
6970
|
steps.map((step, idx) => {
|
|
7101
6971
|
const isActive = idx <= currentStep;
|
|
7102
|
-
return /* @__PURE__ */
|
|
6972
|
+
return /* @__PURE__ */ jsxs31(
|
|
7103
6973
|
"div",
|
|
7104
6974
|
{
|
|
7105
6975
|
className: "relative flex flex-col items-center w-10",
|
|
@@ -7249,13 +7119,13 @@ CheckboxBase.displayName = CheckboxPrimitive.Root.displayName;
|
|
|
7249
7119
|
import * as React25 from "react";
|
|
7250
7120
|
import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
|
|
7251
7121
|
import { CaretUpDownIcon } from "@phosphor-icons/react";
|
|
7252
|
-
import { jsx as jsx44, jsxs as
|
|
7122
|
+
import { jsx as jsx44, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
7253
7123
|
var CollapsibleBase = React25.forwardRef(({ ...props }, ref) => {
|
|
7254
7124
|
return /* @__PURE__ */ jsx44(CollapsiblePrimitive.Root, { ref, "data-slot": "collapsible", ...props });
|
|
7255
7125
|
});
|
|
7256
7126
|
CollapsibleBase.displayName = CollapsiblePrimitive.Root.displayName;
|
|
7257
7127
|
var CollapsibleTriggerBase = React25.forwardRef(({ className, children, leftIcon, showCaret = true, ...props }, ref) => {
|
|
7258
|
-
return /* @__PURE__ */
|
|
7128
|
+
return /* @__PURE__ */ jsxs32(
|
|
7259
7129
|
CollapsiblePrimitive.CollapsibleTrigger,
|
|
7260
7130
|
{
|
|
7261
7131
|
ref,
|
|
@@ -7266,7 +7136,7 @@ var CollapsibleTriggerBase = React25.forwardRef(({ className, children, leftIcon
|
|
|
7266
7136
|
"data-slot": "collapsible-trigger",
|
|
7267
7137
|
...props,
|
|
7268
7138
|
children: [
|
|
7269
|
-
/* @__PURE__ */
|
|
7139
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex items-center gap-2", children: [
|
|
7270
7140
|
leftIcon && /* @__PURE__ */ jsx44("span", { className: "flex-shrink-0 [&>svg]:size-4", children: leftIcon }),
|
|
7271
7141
|
/* @__PURE__ */ jsx44("span", { children })
|
|
7272
7142
|
] }),
|
|
@@ -7295,7 +7165,7 @@ CollapsibleContentBase.displayName = CollapsiblePrimitive.CollapsibleContent.dis
|
|
|
7295
7165
|
|
|
7296
7166
|
// src/components/ui/form/DebounceInput.tsx
|
|
7297
7167
|
import { useEffect as useEffect10, useState as useState11 } from "react";
|
|
7298
|
-
import { CircleNotchIcon } from "@phosphor-icons/react";
|
|
7168
|
+
import { CircleNotchIcon as CircleNotchIcon2 } from "@phosphor-icons/react";
|
|
7299
7169
|
import { jsx as jsx45 } from "react/jsx-runtime";
|
|
7300
7170
|
|
|
7301
7171
|
// src/components/ui/form/HoverCardBase.tsx
|
|
@@ -7338,7 +7208,7 @@ function HoverCardContentBase({
|
|
|
7338
7208
|
import * as React26 from "react";
|
|
7339
7209
|
import { OTPInput, OTPInputContext } from "input-otp";
|
|
7340
7210
|
import { MinusIcon } from "@phosphor-icons/react";
|
|
7341
|
-
import { jsx as jsx47, jsxs as
|
|
7211
|
+
import { jsx as jsx47, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
7342
7212
|
function InputOTPBase({
|
|
7343
7213
|
className,
|
|
7344
7214
|
containerClassName,
|
|
@@ -7374,7 +7244,7 @@ function InputOTPSlotBase({
|
|
|
7374
7244
|
}) {
|
|
7375
7245
|
const inputOTPContext = React26.useContext(OTPInputContext);
|
|
7376
7246
|
const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {};
|
|
7377
|
-
return /* @__PURE__ */
|
|
7247
|
+
return /* @__PURE__ */ jsxs33(
|
|
7378
7248
|
"div",
|
|
7379
7249
|
{
|
|
7380
7250
|
"data-slot": "input-otp-slot",
|
|
@@ -7398,7 +7268,7 @@ function InputOTPSeparatorBase({ ...props }) {
|
|
|
7398
7268
|
// src/components/ui/form/SliderBase.tsx
|
|
7399
7269
|
import * as React27 from "react";
|
|
7400
7270
|
import * as SliderPrimitive from "@radix-ui/react-slider";
|
|
7401
|
-
import { jsx as jsx48, jsxs as
|
|
7271
|
+
import { jsx as jsx48, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
7402
7272
|
var SlideBase = React27.forwardRef(
|
|
7403
7273
|
({
|
|
7404
7274
|
className,
|
|
@@ -7409,13 +7279,13 @@ var SlideBase = React27.forwardRef(
|
|
|
7409
7279
|
...props
|
|
7410
7280
|
}, ref) => {
|
|
7411
7281
|
const isVertical = orientation === "vertical";
|
|
7412
|
-
return /* @__PURE__ */
|
|
7282
|
+
return /* @__PURE__ */ jsxs34(
|
|
7413
7283
|
"div",
|
|
7414
7284
|
{
|
|
7415
7285
|
className: cn("flex flex-col gap-1", isVertical ? "h-full " : "w-full"),
|
|
7416
7286
|
children: [
|
|
7417
7287
|
label && /* @__PURE__ */ jsx48(LabelBase_default, { className: "py-2", children: label }),
|
|
7418
|
-
/* @__PURE__ */
|
|
7288
|
+
/* @__PURE__ */ jsxs34(
|
|
7419
7289
|
"div",
|
|
7420
7290
|
{
|
|
7421
7291
|
className: cn(
|
|
@@ -7424,7 +7294,7 @@ var SlideBase = React27.forwardRef(
|
|
|
7424
7294
|
),
|
|
7425
7295
|
children: [
|
|
7426
7296
|
leftIcon && /* @__PURE__ */ jsx48("div", { className: "flex items-center justify-center", children: leftIcon }),
|
|
7427
|
-
/* @__PURE__ */
|
|
7297
|
+
/* @__PURE__ */ jsxs34(
|
|
7428
7298
|
SliderPrimitive.Root,
|
|
7429
7299
|
{
|
|
7430
7300
|
ref,
|
|
@@ -8240,7 +8110,7 @@ SwitchBase.displayName = SwitchPrimitives.Root.displayName;
|
|
|
8240
8110
|
import * as React30 from "react";
|
|
8241
8111
|
import { motion as motion12 } from "framer-motion";
|
|
8242
8112
|
import { TrashIcon as TrashIcon2 } from "@phosphor-icons/react";
|
|
8243
|
-
import { jsx as jsx51, jsxs as
|
|
8113
|
+
import { jsx as jsx51, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
8244
8114
|
var TextAreaBase = React30.forwardRef(
|
|
8245
8115
|
({ className, clearable = false, onClear, ...props }, ref) => {
|
|
8246
8116
|
const [isFocused, setIsFocused] = React30.useState(false);
|
|
@@ -8288,7 +8158,7 @@ var TextAreaBase = React30.forwardRef(
|
|
|
8288
8158
|
React30.useEffect(() => {
|
|
8289
8159
|
setHasContent(!!props.value || !!props.defaultValue);
|
|
8290
8160
|
}, [props.value, props.defaultValue]);
|
|
8291
|
-
return /* @__PURE__ */
|
|
8161
|
+
return /* @__PURE__ */ jsxs35("div", { className: "relative", children: [
|
|
8292
8162
|
/* @__PURE__ */ jsx51(
|
|
8293
8163
|
"textarea",
|
|
8294
8164
|
{
|
|
@@ -8312,7 +8182,7 @@ var TextAreaBase = React30.forwardRef(
|
|
|
8312
8182
|
...props
|
|
8313
8183
|
}
|
|
8314
8184
|
),
|
|
8315
|
-
clearable && hasContent && /* @__PURE__ */ jsx51(TooltipProviderBase, { children: /* @__PURE__ */
|
|
8185
|
+
clearable && hasContent && /* @__PURE__ */ jsx51(TooltipProviderBase, { children: /* @__PURE__ */ jsxs35(
|
|
8316
8186
|
TooltipBase,
|
|
8317
8187
|
{
|
|
8318
8188
|
open: showConfirmTooltip,
|
|
@@ -8339,14 +8209,14 @@ var TextAreaBase = React30.forwardRef(
|
|
|
8339
8209
|
children: /* @__PURE__ */ jsx51(TrashIcon2, { size: 16, weight: "regular" })
|
|
8340
8210
|
}
|
|
8341
8211
|
) }),
|
|
8342
|
-
/* @__PURE__ */
|
|
8212
|
+
/* @__PURE__ */ jsxs35(
|
|
8343
8213
|
TooltipContentBase,
|
|
8344
8214
|
{
|
|
8345
8215
|
side: "left",
|
|
8346
8216
|
className: "bg-background border border-border shadow-lg p-3 flex flex-col gap-2",
|
|
8347
8217
|
children: [
|
|
8348
8218
|
/* @__PURE__ */ jsx51("p", { className: "text-sm text-foreground font-medium mb-1", children: "Limpar todo o texto?" }),
|
|
8349
|
-
/* @__PURE__ */
|
|
8219
|
+
/* @__PURE__ */ jsxs35("div", { className: "flex gap-2", children: [
|
|
8350
8220
|
/* @__PURE__ */ jsx51(
|
|
8351
8221
|
"button",
|
|
8352
8222
|
{
|
|
@@ -8392,7 +8262,7 @@ var TextAreaBase = React30.forwardRef(
|
|
|
8392
8262
|
children: /* @__PURE__ */ jsx51("div", { className: "absolute inset-0 rounded-lg bg-gradient-to-r from-ring/20 via-ring/10 to-ring/20 blur-sm" })
|
|
8393
8263
|
}
|
|
8394
8264
|
),
|
|
8395
|
-
isFocused && hasContent && props.maxLength && /* @__PURE__ */
|
|
8265
|
+
isFocused && hasContent && props.maxLength && /* @__PURE__ */ jsxs35(
|
|
8396
8266
|
motion12.div,
|
|
8397
8267
|
{
|
|
8398
8268
|
initial: { opacity: 0, y: -10 },
|
|
@@ -8415,7 +8285,7 @@ TextAreaBase.displayName = "TextAreaBase";
|
|
|
8415
8285
|
import * as React31 from "react";
|
|
8416
8286
|
import useEmblaCarousel from "embla-carousel-react";
|
|
8417
8287
|
import { ArrowLeftIcon as ArrowLeftIcon2, ArrowRightIcon as ArrowRightIcon2 } from "@phosphor-icons/react";
|
|
8418
|
-
import { jsx as jsx52, jsxs as
|
|
8288
|
+
import { jsx as jsx52, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
8419
8289
|
var CarouselContext = React31.createContext(null);
|
|
8420
8290
|
function useCarousel() {
|
|
8421
8291
|
const context = React31.useContext(CarouselContext);
|
|
@@ -8558,7 +8428,7 @@ function CarouselPrevious({
|
|
|
8558
8428
|
...props
|
|
8559
8429
|
}) {
|
|
8560
8430
|
const { orientation, scrollPrev, canScrollPrev } = useCarousel();
|
|
8561
|
-
return /* @__PURE__ */
|
|
8431
|
+
return /* @__PURE__ */ jsxs36(
|
|
8562
8432
|
ButtonBase,
|
|
8563
8433
|
{
|
|
8564
8434
|
"data-slot": "carousel-previous",
|
|
@@ -8586,7 +8456,7 @@ function CarouselNextBase({
|
|
|
8586
8456
|
...props
|
|
8587
8457
|
}) {
|
|
8588
8458
|
const { orientation, scrollNext, canScrollNext } = useCarousel();
|
|
8589
|
-
return /* @__PURE__ */
|
|
8459
|
+
return /* @__PURE__ */ jsxs36(
|
|
8590
8460
|
ButtonBase,
|
|
8591
8461
|
{
|
|
8592
8462
|
"data-slot": "carousel-next",
|
|
@@ -8782,7 +8652,7 @@ TabsContentBase.displayName = TabsPrimitive.Content.displayName;
|
|
|
8782
8652
|
// src/components/ui/navigation/BreadcrumbBase.tsx
|
|
8783
8653
|
import { Slot as Slot4 } from "@radix-ui/react-slot";
|
|
8784
8654
|
import { CaretRightIcon as CaretRightIcon3, DotsThreeIcon as DotsThreeIcon3 } from "@phosphor-icons/react";
|
|
8785
|
-
import { jsx as jsx56, jsxs as
|
|
8655
|
+
import { jsx as jsx56, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
8786
8656
|
function BreadcrumbBase({ ...props }) {
|
|
8787
8657
|
return /* @__PURE__ */ jsx56("nav", { "aria-label": "breadcrumb", "data-slot": "breadcrumb", ...props });
|
|
8788
8658
|
}
|
|
@@ -8858,7 +8728,7 @@ function BreadcrumbEllipsisBase({
|
|
|
8858
8728
|
className,
|
|
8859
8729
|
...props
|
|
8860
8730
|
}) {
|
|
8861
|
-
return /* @__PURE__ */
|
|
8731
|
+
return /* @__PURE__ */ jsxs37(
|
|
8862
8732
|
"span",
|
|
8863
8733
|
{
|
|
8864
8734
|
"data-slot": "breadcrumb-ellipsis",
|
|
@@ -8877,14 +8747,14 @@ function BreadcrumbEllipsisBase({
|
|
|
8877
8747
|
// src/components/ui/navigation/NavigationMenuBase.tsx
|
|
8878
8748
|
import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu";
|
|
8879
8749
|
import { CaretDownIcon as CaretDownIcon3 } from "@phosphor-icons/react";
|
|
8880
|
-
import { jsx as jsx57, jsxs as
|
|
8750
|
+
import { jsx as jsx57, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
8881
8751
|
function NavigationMenuBase({
|
|
8882
8752
|
className,
|
|
8883
8753
|
children,
|
|
8884
8754
|
viewport = true,
|
|
8885
8755
|
...props
|
|
8886
8756
|
}) {
|
|
8887
|
-
return /* @__PURE__ */
|
|
8757
|
+
return /* @__PURE__ */ jsxs38(
|
|
8888
8758
|
NavigationMenuPrimitive.Root,
|
|
8889
8759
|
{
|
|
8890
8760
|
"data-slot": "navigation-menu",
|
|
@@ -8935,7 +8805,7 @@ function NavigationMenuTriggerBase({
|
|
|
8935
8805
|
children,
|
|
8936
8806
|
...props
|
|
8937
8807
|
}) {
|
|
8938
|
-
return /* @__PURE__ */
|
|
8808
|
+
return /* @__PURE__ */ jsxs38(
|
|
8939
8809
|
NavigationMenuPrimitive.Trigger,
|
|
8940
8810
|
{
|
|
8941
8811
|
"data-slot": "navigation-menu-trigger",
|
|
@@ -9048,7 +8918,7 @@ import * as React36 from "react";
|
|
|
9048
8918
|
import * as SheetPrimitive from "@radix-ui/react-dialog";
|
|
9049
8919
|
import { cva as cva4 } from "class-variance-authority";
|
|
9050
8920
|
import { XIcon as XIcon8 } from "@phosphor-icons/react";
|
|
9051
|
-
import { jsx as jsx58, jsxs as
|
|
8921
|
+
import { jsx as jsx58, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
9052
8922
|
var SheetBase = SheetPrimitive.Root;
|
|
9053
8923
|
var SheetTriggerBase = SheetPrimitive.Trigger;
|
|
9054
8924
|
var SheetCloseBase = SheetPrimitive.Close;
|
|
@@ -9081,16 +8951,16 @@ var sheetVariants = cva4(
|
|
|
9081
8951
|
}
|
|
9082
8952
|
}
|
|
9083
8953
|
);
|
|
9084
|
-
var SheetContentBase = React36.forwardRef(({ side = "right", className, children, ...props }, ref) => /* @__PURE__ */
|
|
8954
|
+
var SheetContentBase = React36.forwardRef(({ side = "right", className, children, ...props }, ref) => /* @__PURE__ */ jsxs39(SheetPortalBase, { children: [
|
|
9085
8955
|
/* @__PURE__ */ jsx58(SheetOverlayBase, {}),
|
|
9086
|
-
/* @__PURE__ */
|
|
8956
|
+
/* @__PURE__ */ jsxs39(
|
|
9087
8957
|
SheetPrimitive.Content,
|
|
9088
8958
|
{
|
|
9089
8959
|
ref,
|
|
9090
8960
|
className: cn(sheetVariants({ side }), className),
|
|
9091
8961
|
...props,
|
|
9092
8962
|
children: [
|
|
9093
|
-
/* @__PURE__ */
|
|
8963
|
+
/* @__PURE__ */ jsxs39(SheetPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary", children: [
|
|
9094
8964
|
/* @__PURE__ */ jsx58(XIcon8, { className: "h-4 w-4" }),
|
|
9095
8965
|
/* @__PURE__ */ jsx58("span", { className: "sr-only", children: "Close" })
|
|
9096
8966
|
] }),
|
|
@@ -9149,7 +9019,7 @@ SheetDescriptionBase.displayName = SheetPrimitive.Description.displayName;
|
|
|
9149
9019
|
|
|
9150
9020
|
// src/components/ui/navigation/SidebarBase.tsx
|
|
9151
9021
|
import { SidebarSimpleIcon } from "@phosphor-icons/react";
|
|
9152
|
-
import { jsx as jsx59, jsxs as
|
|
9022
|
+
import { jsx as jsx59, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
9153
9023
|
var SIDEBAR_COOKIE_NAME = "sidebar:state";
|
|
9154
9024
|
var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
9155
9025
|
var SIDEBAR_WIDTH = "16rem";
|
|
@@ -9277,7 +9147,7 @@ var SidebarBase = React37.forwardRef(
|
|
|
9277
9147
|
}
|
|
9278
9148
|
) });
|
|
9279
9149
|
}
|
|
9280
|
-
return /* @__PURE__ */
|
|
9150
|
+
return /* @__PURE__ */ jsxs40(
|
|
9281
9151
|
"div",
|
|
9282
9152
|
{
|
|
9283
9153
|
ref,
|
|
@@ -9327,7 +9197,7 @@ var SidebarBase = React37.forwardRef(
|
|
|
9327
9197
|
SidebarBase.displayName = "SidebarBase";
|
|
9328
9198
|
var SidebarTriggerBase = React37.forwardRef(({ className, onClick, ...props }, ref) => {
|
|
9329
9199
|
const { toggleSidebar } = UseSideBarBase();
|
|
9330
|
-
return /* @__PURE__ */ jsx59("div", { children: /* @__PURE__ */
|
|
9200
|
+
return /* @__PURE__ */ jsx59("div", { children: /* @__PURE__ */ jsxs40(
|
|
9331
9201
|
ButtonBase,
|
|
9332
9202
|
{
|
|
9333
9203
|
ref,
|
|
@@ -9583,7 +9453,7 @@ var SidebarMenuButtonBase = React37.forwardRef(
|
|
|
9583
9453
|
children: tooltip
|
|
9584
9454
|
};
|
|
9585
9455
|
}
|
|
9586
|
-
return /* @__PURE__ */
|
|
9456
|
+
return /* @__PURE__ */ jsxs40(TooltipBase, { children: [
|
|
9587
9457
|
/* @__PURE__ */ jsx59(TooltipTriggerBase, { asChild: true, children: button }),
|
|
9588
9458
|
/* @__PURE__ */ jsx59(
|
|
9589
9459
|
TooltipContentBase,
|
|
@@ -9643,7 +9513,7 @@ var SidebarMenuSkeletonBase = React37.forwardRef(({ className, showIcon = false,
|
|
|
9643
9513
|
const width = React37.useMemo(() => {
|
|
9644
9514
|
return `${Math.floor(Math.random() * 40) + 50}%`;
|
|
9645
9515
|
}, []);
|
|
9646
|
-
return /* @__PURE__ */
|
|
9516
|
+
return /* @__PURE__ */ jsxs40(
|
|
9647
9517
|
"div",
|
|
9648
9518
|
{
|
|
9649
9519
|
ref,
|
|
@@ -9714,7 +9584,7 @@ SidebarMenuSubButtonBase.displayName = "SidebarMenuSubButtonBase";
|
|
|
9714
9584
|
|
|
9715
9585
|
// src/components/ui/overlays/DrawerBase.tsx
|
|
9716
9586
|
import { Drawer as DrawerPrimitive } from "vaul";
|
|
9717
|
-
import { jsx as jsx60, jsxs as
|
|
9587
|
+
import { jsx as jsx60, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
9718
9588
|
function DrawerBase({
|
|
9719
9589
|
...props
|
|
9720
9590
|
}) {
|
|
@@ -9756,9 +9626,9 @@ function DrawerContentBase({
|
|
|
9756
9626
|
children,
|
|
9757
9627
|
...props
|
|
9758
9628
|
}) {
|
|
9759
|
-
return /* @__PURE__ */
|
|
9629
|
+
return /* @__PURE__ */ jsxs41(DrawerPortalBase, { children: [
|
|
9760
9630
|
/* @__PURE__ */ jsx60(DrawerOverlayBase, {}),
|
|
9761
|
-
/* @__PURE__ */
|
|
9631
|
+
/* @__PURE__ */ jsxs41(
|
|
9762
9632
|
DrawerPrimitive.Content,
|
|
9763
9633
|
{
|
|
9764
9634
|
"data-slot": "drawer-content",
|
|
@@ -9895,7 +9765,7 @@ var useTooltip = () => {
|
|
|
9895
9765
|
|
|
9896
9766
|
// src/components/ui/UniversalTooltipRenderer.tsx
|
|
9897
9767
|
import { XIcon as XIcon9 } from "@phosphor-icons/react/dist/ssr";
|
|
9898
|
-
import { jsx as jsx62, jsxs as
|
|
9768
|
+
import { jsx as jsx62, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
9899
9769
|
var UniversalTooltipRenderer = ({
|
|
9900
9770
|
className,
|
|
9901
9771
|
showCloseButton = true,
|
|
@@ -9912,8 +9782,8 @@ var UniversalTooltipRenderer = ({
|
|
|
9912
9782
|
clearAllTooltips
|
|
9913
9783
|
} = useUniversalTooltip();
|
|
9914
9784
|
const { removeTooltip, handleElementMouseDown } = useTooltip();
|
|
9915
|
-
return /* @__PURE__ */
|
|
9916
|
-
showCloseAllButton && tooltips.length > 1 && /* @__PURE__ */ jsx62("div", { className: "fixed top-6 left-1/2 transform -translate-x-1/2 z-50 pointer-events-auto animate-in fade-in slide-in-from-top-2 duration-300", children: /* @__PURE__ */
|
|
9785
|
+
return /* @__PURE__ */ jsxs42("div", { className: cn("fixed inset-0 pointer-events-none z-50", className), children: [
|
|
9786
|
+
showCloseAllButton && tooltips.length > 1 && /* @__PURE__ */ jsx62("div", { className: "fixed top-6 left-1/2 transform -translate-x-1/2 z-50 pointer-events-auto animate-in fade-in slide-in-from-top-2 duration-300", children: /* @__PURE__ */ jsxs42(
|
|
9917
9787
|
"button",
|
|
9918
9788
|
{
|
|
9919
9789
|
onClick: clearAllTooltips,
|
|
@@ -9935,7 +9805,7 @@ var UniversalTooltipRenderer = ({
|
|
|
9935
9805
|
const endX = isHorizontal ? Math.max(guide.sourceTooltip.left + guide.sourceTooltip.width / 2, guide.targetTooltip.left + guide.targetTooltip.width / 2) : guide.targetTooltip.left + guide.targetTooltip.width / 2;
|
|
9936
9806
|
const startY = isHorizontal ? guide.sourceTooltip.top + guide.sourceTooltip.height / 2 : Math.min(guide.sourceTooltip.top + guide.sourceTooltip.height / 2, guide.targetTooltip.top + guide.targetTooltip.height / 2);
|
|
9937
9807
|
const endY = isHorizontal ? guide.targetTooltip.top + guide.targetTooltip.height / 2 : Math.max(guide.sourceTooltip.top + guide.sourceTooltip.height / 2, guide.targetTooltip.top + guide.targetTooltip.height / 2);
|
|
9938
|
-
return /* @__PURE__ */
|
|
9808
|
+
return /* @__PURE__ */ jsxs42("div", { className: "pointer-events-none", children: [
|
|
9939
9809
|
/* @__PURE__ */ jsx62(
|
|
9940
9810
|
"div",
|
|
9941
9811
|
{
|
|
@@ -9989,7 +9859,7 @@ var UniversalTooltipRenderer = ({
|
|
|
9989
9859
|
)
|
|
9990
9860
|
] }, index);
|
|
9991
9861
|
}),
|
|
9992
|
-
tooltips.map((tooltip) => /* @__PURE__ */
|
|
9862
|
+
tooltips.map((tooltip) => /* @__PURE__ */ jsxs42(
|
|
9993
9863
|
"div",
|
|
9994
9864
|
{
|
|
9995
9865
|
className: cn(
|
|
@@ -10003,8 +9873,8 @@ var UniversalTooltipRenderer = ({
|
|
|
10003
9873
|
},
|
|
10004
9874
|
onMouseDown: (e) => handleElementMouseDown(tooltip.id, e),
|
|
10005
9875
|
children: [
|
|
10006
|
-
/* @__PURE__ */
|
|
10007
|
-
/* @__PURE__ */
|
|
9876
|
+
/* @__PURE__ */ jsxs42("div", { className: "flex items-center justify-between p-3 border-b bg-muted/20 rounded-t-lg", children: [
|
|
9877
|
+
/* @__PURE__ */ jsxs42("div", { className: "flex items-center gap-2", children: [
|
|
10008
9878
|
/* @__PURE__ */ jsx62("div", { className: "w-2 h-2 bg-primary rounded-full" }),
|
|
10009
9879
|
/* @__PURE__ */ jsx62("span", { className: "text-sm font-medium text-muted-foreground", children: "Tooltip" })
|
|
10010
9880
|
] }),
|
|
@@ -10044,7 +9914,7 @@ import {
|
|
|
10044
9914
|
CalendarIcon
|
|
10045
9915
|
} from "@phosphor-icons/react";
|
|
10046
9916
|
import { AnimatePresence as AnimatePresence9 } from "framer-motion";
|
|
10047
|
-
import { jsx as jsx63, jsxs as
|
|
9917
|
+
import { jsx as jsx63, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
10048
9918
|
function CalendarBase2({
|
|
10049
9919
|
className,
|
|
10050
9920
|
classNames,
|
|
@@ -10065,7 +9935,7 @@ function CalendarBase2({
|
|
|
10065
9935
|
"div",
|
|
10066
9936
|
{
|
|
10067
9937
|
className: cn(
|
|
10068
|
-
"rounded-md border bg-background p-2 overflow-hidden flex flex-col",
|
|
9938
|
+
"rounded-md border bg-background p-2 sm:p-3 md:p-4 overflow-hidden flex flex-col",
|
|
10069
9939
|
className
|
|
10070
9940
|
),
|
|
10071
9941
|
children: /* @__PURE__ */ jsx63("div", { className: "relative flex-1 flex flex-col min-h-0", children: /* @__PURE__ */ jsx63(AnimatePresence9, { initial: false, mode: "wait", custom: direction, children: /* @__PURE__ */ jsx63(
|
|
@@ -10078,43 +9948,38 @@ function CalendarBase2({
|
|
|
10078
9948
|
showOutsideDays,
|
|
10079
9949
|
month,
|
|
10080
9950
|
onMonthChange: handleMonthChange,
|
|
10081
|
-
className: "w-full h-full
|
|
9951
|
+
className: "w-full h-full flex flex-col",
|
|
10082
9952
|
classNames: {
|
|
10083
|
-
months: "flex
|
|
10084
|
-
month: "
|
|
10085
|
-
caption: "flex
|
|
10086
|
-
caption_label: "text-[clamp(0.
|
|
10087
|
-
nav: "
|
|
9953
|
+
months: "flex flex-col sm:flex-row gap-3 sm:gap-4 w-full",
|
|
9954
|
+
month: "flex-1 min-w-0",
|
|
9955
|
+
caption: "flex items-center justify-between gap-2 pr-1 min-h-[2.25rem] mb-2",
|
|
9956
|
+
caption_label: "text-[clamp(0.85rem,1.4vw,1.125rem)] sm:text-[clamp(0.9rem,1.6vw,1.125rem)] font-semibold capitalize text-left",
|
|
9957
|
+
nav: "flex items-center gap-2",
|
|
10088
9958
|
nav_button: cn(
|
|
10089
9959
|
buttonVariantsBase({ variant: "outline" }),
|
|
10090
|
-
"h-8 w-8
|
|
10091
|
-
"[@media(min-width:400px)]:h-9 [@media(min-width:400px)]:w-9"
|
|
9960
|
+
"h-8 w-8 sm:h-9 sm:w-9 md:h-10 md:w-10 flex items-center justify-center p-0 rounded-md transition-transform duration-150 ease-out focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary/40 active:scale-95"
|
|
10092
9961
|
),
|
|
10093
|
-
nav_button_previous: "
|
|
10094
|
-
nav_button_next: "
|
|
10095
|
-
table: "w-full
|
|
10096
|
-
head_row: "
|
|
10097
|
-
head_cell: "text-muted-foreground rounded-md
|
|
10098
|
-
row: "
|
|
9962
|
+
nav_button_previous: "",
|
|
9963
|
+
nav_button_next: "",
|
|
9964
|
+
table: "w-full min-w-0 flex-1 grid grid-rows-[auto_1fr] gap-2",
|
|
9965
|
+
head_row: "grid grid-cols-7 gap-1 mb-1",
|
|
9966
|
+
head_cell: "text-muted-foreground rounded-md font-semibold text-[clamp(0.575rem,1.2vw,0.75rem)] sm:text-[clamp(0.65rem,1.1vw,0.825rem)] text-center pb-1 uppercase tracking-wider",
|
|
9967
|
+
row: "grid grid-cols-7 gap-1",
|
|
10099
9968
|
cell: cn(
|
|
10100
|
-
"
|
|
9969
|
+
"min-w-0 h-9 sm:h-10 md:h-10 p-0 relative flex items-center justify-center",
|
|
10101
9970
|
"[&:has([aria-selected].day-range-end)]:rounded-r-lg",
|
|
10102
9971
|
"[&:has([aria-selected].day-range-start)]:rounded-l-lg",
|
|
10103
9972
|
"[&:has([aria-selected].day-outside)]:bg-muted/50",
|
|
10104
|
-
"[&:has([aria-selected])]:bg-muted"
|
|
10105
|
-
"first:[&:has([aria-selected])]:rounded-l-lg",
|
|
10106
|
-
"last:[&:has([aria-selected])]:rounded-r-lg",
|
|
10107
|
-
"focus-within:relative focus-within:z-20"
|
|
9973
|
+
"[&:has([aria-selected])]:bg-muted"
|
|
10108
9974
|
),
|
|
10109
9975
|
day: cn(
|
|
10110
9976
|
buttonVariantsBase({ variant: "ghost" }),
|
|
10111
|
-
"w-full h-full p-0",
|
|
10112
|
-
"aria-selected:opacity-100 hover:bg-muted
|
|
10113
|
-
" transition-all duration-200 ease-out hover:scale-105 active:scale-95"
|
|
9977
|
+
"w-full h-full p-0 m-0 flex items-center justify-center text-[clamp(0.775rem,1.2vw,0.95rem)] sm:text-sm",
|
|
9978
|
+
"aria-selected:opacity-100 hover:bg-muted transition-all duration-150 ease-out active:scale-95"
|
|
10114
9979
|
),
|
|
10115
9980
|
day_selected: "bg-primary text-primary-foreground hover:bg-primary/90 focus:bg-primary/90 font-semibold hover:text-white",
|
|
10116
9981
|
day_today: "bg-muted text-foreground font-bold ring-2 ring-primary/30 ring-inset",
|
|
10117
|
-
day_outside: "
|
|
9982
|
+
day_outside: "text-muted-foreground/40 opacity-60 aria-selected:bg-muted/50 aria-selected:text-foreground",
|
|
10118
9983
|
day_disabled: "text-muted-foreground/30 opacity-40 cursor-not-allowed",
|
|
10119
9984
|
day_range_middle: "aria-selected:bg-muted aria-selected:text-foreground",
|
|
10120
9985
|
day_hidden: "invisible",
|
|
@@ -10287,7 +10152,7 @@ function display12HourValue(hours) {
|
|
|
10287
10152
|
}
|
|
10288
10153
|
|
|
10289
10154
|
// src/components/picker/TimePickerInput.tsx
|
|
10290
|
-
import { jsx as jsx64, jsxs as
|
|
10155
|
+
import { jsx as jsx64, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
10291
10156
|
var TimePickerInput = React40.forwardRef(
|
|
10292
10157
|
({
|
|
10293
10158
|
className,
|
|
@@ -10374,7 +10239,7 @@ var TimePickerInput = React40.forwardRef(
|
|
|
10374
10239
|
const baseLabel = getPickerLabel();
|
|
10375
10240
|
return `${baseLabel}, valor atual: ${calculatedValue}.`;
|
|
10376
10241
|
};
|
|
10377
|
-
return /* @__PURE__ */
|
|
10242
|
+
return /* @__PURE__ */ jsxs44("div", { className: "relative group flex flex-col items-center", children: [
|
|
10378
10243
|
getPickerLabel() && /* @__PURE__ */ jsx64(
|
|
10379
10244
|
"label",
|
|
10380
10245
|
{
|
|
@@ -10383,7 +10248,7 @@ var TimePickerInput = React40.forwardRef(
|
|
|
10383
10248
|
children: getPickerLabel()
|
|
10384
10249
|
}
|
|
10385
10250
|
),
|
|
10386
|
-
/* @__PURE__ */
|
|
10251
|
+
/* @__PURE__ */ jsxs44(
|
|
10387
10252
|
"div",
|
|
10388
10253
|
{
|
|
10389
10254
|
className: cn(
|
|
@@ -10410,7 +10275,7 @@ var TimePickerInput = React40.forwardRef(
|
|
|
10410
10275
|
children: /* @__PURE__ */ jsx64(CaretUpIcon2, { size: 14, className: "sm:w-4 sm:h-4" })
|
|
10411
10276
|
}
|
|
10412
10277
|
),
|
|
10413
|
-
/* @__PURE__ */
|
|
10278
|
+
/* @__PURE__ */ jsxs44("div", { className: "relative", children: [
|
|
10414
10279
|
/* @__PURE__ */ jsx64(
|
|
10415
10280
|
"input",
|
|
10416
10281
|
{
|
|
@@ -10486,7 +10351,7 @@ var TimePickerInput = React40.forwardRef(
|
|
|
10486
10351
|
TimePickerInput.displayName = "TimePickerInput";
|
|
10487
10352
|
|
|
10488
10353
|
// src/components/picker/TimePicker.tsx
|
|
10489
|
-
import { Fragment as Fragment8, jsx as jsx65, jsxs as
|
|
10354
|
+
import { Fragment as Fragment8, jsx as jsx65, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
10490
10355
|
function TimePicker({
|
|
10491
10356
|
date,
|
|
10492
10357
|
setDate,
|
|
@@ -10511,7 +10376,7 @@ function TimePicker({
|
|
|
10511
10376
|
hidden: { opacity: 0, y: 10 },
|
|
10512
10377
|
visible: { opacity: 1, y: 0 }
|
|
10513
10378
|
};
|
|
10514
|
-
return /* @__PURE__ */
|
|
10379
|
+
return /* @__PURE__ */ jsxs45(
|
|
10515
10380
|
motion14.div,
|
|
10516
10381
|
{
|
|
10517
10382
|
variants: containerVariants,
|
|
@@ -10584,7 +10449,7 @@ function TimePicker({
|
|
|
10584
10449
|
|
|
10585
10450
|
// src/components/picker/DateTimePicker.tsx
|
|
10586
10451
|
import { CalendarBlankIcon, ClockIcon } from "@phosphor-icons/react";
|
|
10587
|
-
import { jsx as jsx66, jsxs as
|
|
10452
|
+
import { jsx as jsx66, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
10588
10453
|
function DateTimePicker({
|
|
10589
10454
|
label,
|
|
10590
10455
|
date,
|
|
@@ -10592,8 +10457,6 @@ function DateTimePicker({
|
|
|
10592
10457
|
displayFormat,
|
|
10593
10458
|
hideTime,
|
|
10594
10459
|
hideSeconds,
|
|
10595
|
-
hideHour,
|
|
10596
|
-
hideMinute,
|
|
10597
10460
|
fromDate,
|
|
10598
10461
|
toDate,
|
|
10599
10462
|
disabled,
|
|
@@ -10622,41 +10485,56 @@ function DateTimePicker({
|
|
|
10622
10485
|
};
|
|
10623
10486
|
const getTimeFormat = () => {
|
|
10624
10487
|
if (hideTime) return "";
|
|
10625
|
-
if (hideHour && hideMinute) return "";
|
|
10626
|
-
if (hideHour) return hideSeconds ? "mm" : "mm:ss";
|
|
10627
|
-
if (hideMinute) return hideSeconds ? "HH" : "HH':00'";
|
|
10628
10488
|
return hideSeconds ? "HH:mm" : "HH:mm:ss";
|
|
10629
10489
|
};
|
|
10630
10490
|
const getDisplayFormat = () => {
|
|
10631
|
-
if (displayFormat) {
|
|
10632
|
-
return displayFormat;
|
|
10633
|
-
}
|
|
10634
10491
|
const timeFormat = getTimeFormat();
|
|
10635
|
-
if (
|
|
10636
|
-
|
|
10492
|
+
if (displayFormat === true) {
|
|
10493
|
+
if (!timeFormat) return "dd/MM/yyyy";
|
|
10494
|
+
return `dd/MM/yyyy ${timeFormat}`;
|
|
10495
|
+
}
|
|
10496
|
+
if (!timeFormat) return "dd MMMM yyyy";
|
|
10497
|
+
return `dd MMMM yyyy ${timeFormat}`;
|
|
10637
10498
|
};
|
|
10638
10499
|
useEffect16(() => {
|
|
10639
10500
|
if (date) {
|
|
10640
10501
|
setInternalDate(date);
|
|
10641
10502
|
}
|
|
10642
10503
|
}, [date, open]);
|
|
10643
|
-
return /* @__PURE__ */
|
|
10504
|
+
return /* @__PURE__ */ jsxs46("div", { className: cn("space-y-2 w-full sm:w-auto", className), children: [
|
|
10644
10505
|
label && /* @__PURE__ */ jsx66(LabelBase_default, { children: label }),
|
|
10645
|
-
/* @__PURE__ */
|
|
10646
|
-
/* @__PURE__ */ jsx66(
|
|
10647
|
-
|
|
10506
|
+
/* @__PURE__ */ jsxs46(PopoverBase, { open, onOpenChange: setOpen, children: [
|
|
10507
|
+
/* @__PURE__ */ jsx66(
|
|
10508
|
+
PopoverTriggerBase,
|
|
10648
10509
|
{
|
|
10649
|
-
|
|
10650
|
-
|
|
10651
|
-
|
|
10652
|
-
|
|
10653
|
-
|
|
10654
|
-
|
|
10655
|
-
|
|
10656
|
-
|
|
10657
|
-
|
|
10510
|
+
disabled,
|
|
10511
|
+
asChild: true,
|
|
10512
|
+
className: cn(error && "border-red-500"),
|
|
10513
|
+
children: /* @__PURE__ */ jsxs46(
|
|
10514
|
+
ButtonBase,
|
|
10515
|
+
{
|
|
10516
|
+
variant: "outline",
|
|
10517
|
+
className: cn(
|
|
10518
|
+
"w-full justify-start text-left min-w-0 overflow-hidden ",
|
|
10519
|
+
!date && "text-muted-foreground"
|
|
10520
|
+
),
|
|
10521
|
+
children: [
|
|
10522
|
+
/* @__PURE__ */ jsx66(
|
|
10523
|
+
"span",
|
|
10524
|
+
{
|
|
10525
|
+
className: cn(
|
|
10526
|
+
"truncate flex-1",
|
|
10527
|
+
!date && "text-muted-foreground"
|
|
10528
|
+
),
|
|
10529
|
+
children: date ? format(date, getDisplayFormat(), { locale: ptBR }) : "Selecione uma data"
|
|
10530
|
+
}
|
|
10531
|
+
),
|
|
10532
|
+
/* @__PURE__ */ jsx66(CalendarBlankIcon, { className: "flex-shrink-0 w-5 h-5 sm:w-6 sm:h-6" })
|
|
10533
|
+
]
|
|
10534
|
+
}
|
|
10535
|
+
)
|
|
10658
10536
|
}
|
|
10659
|
-
)
|
|
10537
|
+
),
|
|
10660
10538
|
/* @__PURE__ */ jsx66(ErrorMessage_default, { error }),
|
|
10661
10539
|
/* @__PURE__ */ jsx66(
|
|
10662
10540
|
PopoverContentBase,
|
|
@@ -10667,7 +10545,7 @@ function DateTimePicker({
|
|
|
10667
10545
|
side: "bottom",
|
|
10668
10546
|
avoidCollisions: true,
|
|
10669
10547
|
collisionPadding: 8,
|
|
10670
|
-
children: /* @__PURE__ */
|
|
10548
|
+
children: /* @__PURE__ */ jsxs46("div", { className: "flex flex-col space-y-2 sm:space-y-3 p-2 sm:p-3 md:p-4 max-h-[calc(100vh-4rem)] overflow-y-auto", children: [
|
|
10671
10549
|
/* @__PURE__ */ jsx66(
|
|
10672
10550
|
CalendarBase2,
|
|
10673
10551
|
{
|
|
@@ -10676,21 +10554,19 @@ function DateTimePicker({
|
|
|
10676
10554
|
selected: internalDate,
|
|
10677
10555
|
onSelect: (d) => handleSelect(d),
|
|
10678
10556
|
initialFocus: true,
|
|
10557
|
+
defaultMonth: fromDate ?? toDate ?? internalDate,
|
|
10679
10558
|
fromDate,
|
|
10680
10559
|
toDate,
|
|
10681
|
-
className: cn(
|
|
10682
|
-
"w-full",
|
|
10683
|
-
(hideTime || hideHour && hideMinute) && "border-0"
|
|
10684
|
-
)
|
|
10560
|
+
className: cn("w-full", hideTime && "border-0")
|
|
10685
10561
|
}
|
|
10686
10562
|
),
|
|
10687
|
-
!hideTime &&
|
|
10563
|
+
!hideTime && /* @__PURE__ */ jsx66("div", { className: "flex justify-center w-full px-2", children: /* @__PURE__ */ jsxs46(
|
|
10688
10564
|
PopoverBase,
|
|
10689
10565
|
{
|
|
10690
10566
|
open: timePickerOpen,
|
|
10691
10567
|
onOpenChange: setTimePickerOpen,
|
|
10692
10568
|
children: [
|
|
10693
|
-
/* @__PURE__ */ jsx66(PopoverTriggerBase, { asChild: true, children: /* @__PURE__ */
|
|
10569
|
+
/* @__PURE__ */ jsx66(PopoverTriggerBase, { asChild: true, children: /* @__PURE__ */ jsxs46(
|
|
10694
10570
|
ButtonBase,
|
|
10695
10571
|
{
|
|
10696
10572
|
variant: "outline",
|
|
@@ -10722,7 +10598,7 @@ function DateTimePicker({
|
|
|
10722
10598
|
sideOffset: 8,
|
|
10723
10599
|
avoidCollisions: true,
|
|
10724
10600
|
collisionPadding: 8,
|
|
10725
|
-
children: /* @__PURE__ */
|
|
10601
|
+
children: /* @__PURE__ */ jsxs46("div", { className: "flex flex-col items-center space-y-2 sm:space-y-3", children: [
|
|
10726
10602
|
/* @__PURE__ */ jsx66("h4", { className: "text-sm sm:text-base font-medium text-center", children: "Alterar Hor\xE1rio" }),
|
|
10727
10603
|
/* @__PURE__ */ jsx66(
|
|
10728
10604
|
TimePicker,
|
|
@@ -10760,6 +10636,8 @@ import * as React42 from "react";
|
|
|
10760
10636
|
import {
|
|
10761
10637
|
DayPicker as DayPicker3
|
|
10762
10638
|
} from "react-day-picker";
|
|
10639
|
+
import ptBR2 from "date-fns/locale/pt-BR";
|
|
10640
|
+
import { format as format2 } from "date-fns";
|
|
10763
10641
|
import {
|
|
10764
10642
|
CaretLeftIcon as CaretLeftIcon3,
|
|
10765
10643
|
CaretRightIcon as CaretRightIcon5,
|
|
@@ -10767,7 +10645,8 @@ import {
|
|
|
10767
10645
|
} from "@phosphor-icons/react";
|
|
10768
10646
|
import { motion as motion15, AnimatePresence as AnimatePresence11, useAnimation } from "framer-motion";
|
|
10769
10647
|
import { CalendarDotIcon } from "@phosphor-icons/react/dist/ssr";
|
|
10770
|
-
import { jsx as jsx67, jsxs as
|
|
10648
|
+
import { jsx as jsx67, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
10649
|
+
var dateFnsLocale = ptBR2?.default ?? ptBR2;
|
|
10771
10650
|
function RangePicker({
|
|
10772
10651
|
value,
|
|
10773
10652
|
onChange,
|
|
@@ -10790,14 +10669,14 @@ function RangePicker({
|
|
|
10790
10669
|
setRange(void 0);
|
|
10791
10670
|
onChange?.(void 0);
|
|
10792
10671
|
};
|
|
10793
|
-
return /* @__PURE__ */
|
|
10672
|
+
return /* @__PURE__ */ jsxs47(PopoverBase, { open, onOpenChange: setOpen, children: [
|
|
10794
10673
|
/* @__PURE__ */ jsx67(PopoverTriggerBase, { asChild: true, children: /* @__PURE__ */ jsx67(
|
|
10795
10674
|
motion15.div,
|
|
10796
10675
|
{
|
|
10797
10676
|
whileTap: { scale: 0.97 },
|
|
10798
10677
|
whileHover: { scale: open ? 1.03 : 1.01 },
|
|
10799
10678
|
transition: { type: "spring", stiffness: 300, damping: 20 },
|
|
10800
|
-
children: /* @__PURE__ */
|
|
10679
|
+
children: /* @__PURE__ */ jsxs47(
|
|
10801
10680
|
ButtonBase,
|
|
10802
10681
|
{
|
|
10803
10682
|
variant: "outline",
|
|
@@ -10809,7 +10688,9 @@ function RangePicker({
|
|
|
10809
10688
|
className: "text-sm font-medium",
|
|
10810
10689
|
transition: { duration: 0.2 },
|
|
10811
10690
|
animate: controls,
|
|
10812
|
-
children: range?.from && range?.to ? `${range.from
|
|
10691
|
+
children: range?.from && range?.to ? `${format2(range.from, "P", {
|
|
10692
|
+
locale: dateFnsLocale
|
|
10693
|
+
})} - ${format2(range.to, "P", { locale: dateFnsLocale })}` : label
|
|
10813
10694
|
}
|
|
10814
10695
|
),
|
|
10815
10696
|
/* @__PURE__ */ jsx67(
|
|
@@ -10831,7 +10712,7 @@ function RangePicker({
|
|
|
10831
10712
|
{
|
|
10832
10713
|
asChild: true,
|
|
10833
10714
|
className: "w-auto min-w-[250px] p-0 shadow-xl overflow-y-hidden",
|
|
10834
|
-
children: /* @__PURE__ */
|
|
10715
|
+
children: /* @__PURE__ */ jsxs47(
|
|
10835
10716
|
motion15.div,
|
|
10836
10717
|
{
|
|
10837
10718
|
initial: { opacity: 0, y: 16 },
|
|
@@ -10853,46 +10734,42 @@ function RangePicker({
|
|
|
10853
10734
|
mode: "range",
|
|
10854
10735
|
selected: range,
|
|
10855
10736
|
onSelect: handleSelect,
|
|
10737
|
+
locale: dateFnsLocale,
|
|
10856
10738
|
showOutsideDays: true,
|
|
10857
10739
|
fromDate: minDate,
|
|
10858
10740
|
toDate: maxDate,
|
|
10859
10741
|
className: "min-w-0 flex flex-col",
|
|
10860
10742
|
classNames: {
|
|
10861
|
-
months: "flex
|
|
10862
|
-
month: "
|
|
10863
|
-
caption: "flex
|
|
10864
|
-
caption_label: "text-[clamp(0.
|
|
10865
|
-
nav: "
|
|
10743
|
+
months: "flex flex-col sm:flex-row gap-3 sm:gap-4 w-full",
|
|
10744
|
+
month: "flex-1 min-w-0",
|
|
10745
|
+
caption: "flex items-center justify-between gap-2 pr-1 min-h-[2.25rem] mb-2",
|
|
10746
|
+
caption_label: "text-[clamp(0.85rem,1.4vw,1.125rem)] sm:text-[clamp(0.9rem,1.6vw,1.125rem)] font-semibold capitalize text-left",
|
|
10747
|
+
nav: "flex items-center gap-2",
|
|
10866
10748
|
nav_button: cn(
|
|
10867
10749
|
buttonVariantsBase({ variant: "outline" }),
|
|
10868
|
-
"h-8 w-8
|
|
10869
|
-
"[@media(min-width:400px)]:h-9 [@media(min-width:400px)]:w-9"
|
|
10750
|
+
"h-8 w-8 sm:h-9 sm:w-9 md:h-10 md:w-10 flex items-center justify-center p-0 rounded-md transition-transform duration-150 ease-out focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary/40 active:scale-95"
|
|
10870
10751
|
),
|
|
10871
|
-
nav_button_previous: "
|
|
10872
|
-
nav_button_next: "
|
|
10873
|
-
table: "w-full
|
|
10874
|
-
head_row: "
|
|
10875
|
-
head_cell: "text-muted-foreground rounded-md
|
|
10876
|
-
row: "
|
|
10752
|
+
nav_button_previous: "",
|
|
10753
|
+
nav_button_next: "",
|
|
10754
|
+
table: "w-full min-w-0 flex-1 grid grid-rows-[auto_1fr] gap-2",
|
|
10755
|
+
head_row: "grid grid-cols-7 gap-1 mb-1",
|
|
10756
|
+
head_cell: "text-muted-foreground rounded-md font-semibold text-[clamp(0.575rem,1.2vw,0.75rem)] sm:text-[clamp(0.65rem,1.1vw,0.825rem)] text-center pb-1 uppercase tracking-wider",
|
|
10757
|
+
row: "grid grid-cols-7 gap-1",
|
|
10877
10758
|
cell: cn(
|
|
10878
|
-
"
|
|
10759
|
+
"min-w-0 h-9 p-0 relative flex items-center justify-center",
|
|
10879
10760
|
"[&:has([aria-selected].day-range-end)]:rounded-r-lg",
|
|
10880
10761
|
"[&:has([aria-selected].day-range-start)]:rounded-l-lg",
|
|
10881
10762
|
"[&:has([aria-selected].day-outside)]:bg-muted/50",
|
|
10882
|
-
"[&:has([aria-selected])]:bg-muted"
|
|
10883
|
-
"first:[&:has([aria-selected])]:rounded-l-lg",
|
|
10884
|
-
"last:[&:has([aria-selected])]:rounded-r-lg",
|
|
10885
|
-
"focus-within:relative focus-within:z-20"
|
|
10763
|
+
"[&:has([aria-selected])]:bg-muted"
|
|
10886
10764
|
),
|
|
10887
10765
|
day: cn(
|
|
10888
10766
|
buttonVariantsBase({ variant: "ghost" }),
|
|
10889
|
-
"w-full h-full
|
|
10890
|
-
"aria-selected:opacity-100 hover:bg-muted
|
|
10891
|
-
"transition-all duration-200 ease-out !scale-100 aria-selected:!scale-100 hover:!scale-100 active:!scale-100"
|
|
10767
|
+
"w-full h-full p-0 m-0 flex items-center justify-center text-[clamp(0.775rem,1.2vw,0.95rem)] sm:text-sm",
|
|
10768
|
+
"aria-selected:opacity-100 hover:bg-muted transition-all duration-150 ease-out active:scale-95"
|
|
10892
10769
|
),
|
|
10893
|
-
day_selected: "bg-primary text-primary-foreground hover:bg-primary/90 focus:bg-primary/90 font-semibold hover:text-white
|
|
10894
|
-
day_today: "bg-muted text-foreground font-bold ring-2 ring-primary/
|
|
10895
|
-
day_outside: "
|
|
10770
|
+
day_selected: "bg-primary text-primary-foreground hover:bg-primary/90 focus:bg-primary/90 font-semibold hover:text-white",
|
|
10771
|
+
day_today: "bg-muted text-foreground font-bold ring-2 ring-primary/30 ring-inset",
|
|
10772
|
+
day_outside: "text-muted-foreground/40 opacity-60 aria-selected:bg-muted/50 aria-selected:text-foreground",
|
|
10896
10773
|
day_disabled: "text-muted-foreground/30 opacity-40 cursor-not-allowed",
|
|
10897
10774
|
day_range_middle: "aria-selected:bg-muted aria-selected:text-foreground",
|
|
10898
10775
|
day_hidden: "invisible"
|
|
@@ -10905,7 +10782,7 @@ function RangePicker({
|
|
|
10905
10782
|
)
|
|
10906
10783
|
}
|
|
10907
10784
|
) }),
|
|
10908
|
-
/* @__PURE__ */
|
|
10785
|
+
/* @__PURE__ */ jsxs47("div", { className: "flex justify-end gap-2 px-4 pb-4", children: [
|
|
10909
10786
|
/* @__PURE__ */ jsx67("div", { style: { display: "inline-block" }, children: /* @__PURE__ */ jsx67(
|
|
10910
10787
|
motion15.div,
|
|
10911
10788
|
{
|
|
@@ -10972,7 +10849,7 @@ RangePicker.displayName = "RangePicker";
|
|
|
10972
10849
|
// src/components/ui/navigation/ContextMenuBase.tsx
|
|
10973
10850
|
import * as ContextMenuPrimitive from "@radix-ui/react-context-menu";
|
|
10974
10851
|
import { CaretRightIcon as CaretRightIcon6, CheckIcon as CheckIcon9, CircleIcon as CircleIcon2 } from "@phosphor-icons/react";
|
|
10975
|
-
import { jsx as jsx68, jsxs as
|
|
10852
|
+
import { jsx as jsx68, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
10976
10853
|
function ContextMenuBase(props) {
|
|
10977
10854
|
return /* @__PURE__ */ jsx68(ContextMenuPrimitive.Root, { "data-slot": "context-menu", ...props });
|
|
10978
10855
|
}
|
|
@@ -10997,7 +10874,7 @@ function ContextMenuSubTriggerBase({
|
|
|
10997
10874
|
children,
|
|
10998
10875
|
...props
|
|
10999
10876
|
}) {
|
|
11000
|
-
return /* @__PURE__ */
|
|
10877
|
+
return /* @__PURE__ */ jsxs48(
|
|
11001
10878
|
ContextMenuPrimitive.SubTrigger,
|
|
11002
10879
|
{
|
|
11003
10880
|
"data-slot": "context-menu-sub-trigger",
|
|
@@ -11093,7 +10970,7 @@ function ContextMenuCheckboxItemBase({
|
|
|
11093
10970
|
checked,
|
|
11094
10971
|
...props
|
|
11095
10972
|
}) {
|
|
11096
|
-
return /* @__PURE__ */
|
|
10973
|
+
return /* @__PURE__ */ jsxs48(
|
|
11097
10974
|
ContextMenuPrimitive.CheckboxItem,
|
|
11098
10975
|
{
|
|
11099
10976
|
"data-slot": "context-menu-checkbox-item",
|
|
@@ -11119,7 +10996,7 @@ function ContextMenuRadioItemBase({
|
|
|
11119
10996
|
children,
|
|
11120
10997
|
...props
|
|
11121
10998
|
}) {
|
|
11122
|
-
return /* @__PURE__ */
|
|
10999
|
+
return /* @__PURE__ */ jsxs48(
|
|
11123
11000
|
ContextMenuPrimitive.RadioItem,
|
|
11124
11001
|
{
|
|
11125
11002
|
"data-slot": "context-menu-radio-item",
|
|
@@ -11181,6 +11058,387 @@ function ContextMenuShortcutBase({
|
|
|
11181
11058
|
);
|
|
11182
11059
|
}
|
|
11183
11060
|
|
|
11061
|
+
// src/components/ui/CodeBlock.tsx
|
|
11062
|
+
import {
|
|
11063
|
+
ArrowRightIcon as ArrowRightIcon3,
|
|
11064
|
+
ArrowsOutIcon,
|
|
11065
|
+
CheckIcon as CheckIcon10,
|
|
11066
|
+
CodeIcon,
|
|
11067
|
+
CopyIcon as CopyIcon2,
|
|
11068
|
+
DownloadIcon,
|
|
11069
|
+
FileArchiveIcon,
|
|
11070
|
+
FolderIcon,
|
|
11071
|
+
GearIcon as GearIcon2,
|
|
11072
|
+
TerminalIcon
|
|
11073
|
+
} from "@phosphor-icons/react";
|
|
11074
|
+
import React43 from "react";
|
|
11075
|
+
import { Prism as SyntaxHighlighter } from "react-syntax-highlighter";
|
|
11076
|
+
import { jsx as jsx69, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
11077
|
+
var CodeBlock = ({
|
|
11078
|
+
language,
|
|
11079
|
+
filename,
|
|
11080
|
+
code,
|
|
11081
|
+
highlightLines = [],
|
|
11082
|
+
tabs = [],
|
|
11083
|
+
breadcrumb = [],
|
|
11084
|
+
showStats = true
|
|
11085
|
+
}) => {
|
|
11086
|
+
const [copied, setCopied] = React43.useState(false);
|
|
11087
|
+
const [activeTab, setActiveTab] = React43.useState(0);
|
|
11088
|
+
const [isExpanded, setIsExpanded] = React43.useState(false);
|
|
11089
|
+
const tabsExist = tabs.length > 0;
|
|
11090
|
+
const cssVars = React43.useMemo(
|
|
11091
|
+
() => ({
|
|
11092
|
+
container: {
|
|
11093
|
+
backgroundColor: "hsl(var(--card))",
|
|
11094
|
+
borderColor: "hsl(var(--border))"
|
|
11095
|
+
},
|
|
11096
|
+
header: {
|
|
11097
|
+
backgroundColor: "hsl(var(--popover))",
|
|
11098
|
+
borderBottomColor: "hsl(var(--border))"
|
|
11099
|
+
},
|
|
11100
|
+
filename: { color: "hsl(var(--card-foreground))" },
|
|
11101
|
+
mutedText: { color: "hsl(var(--muted-foreground))" },
|
|
11102
|
+
icon: { color: "hsl(var(--muted-foreground))" },
|
|
11103
|
+
lineNumbers: {
|
|
11104
|
+
color: "hsl(var(--muted-foreground))",
|
|
11105
|
+
borderRight: `1px solid hsl(var(--border))`
|
|
11106
|
+
},
|
|
11107
|
+
highlightBorder: `3px solid hsl(var(--primary))`
|
|
11108
|
+
}),
|
|
11109
|
+
[]
|
|
11110
|
+
);
|
|
11111
|
+
const sanitizeCode = (input) => {
|
|
11112
|
+
if (!input) return "";
|
|
11113
|
+
let out = input.replace(
|
|
11114
|
+
/(^['"]use client['"];?\s*|\b'use client';|\b"use client";)/g,
|
|
11115
|
+
""
|
|
11116
|
+
);
|
|
11117
|
+
out = out.replace(/style=\{[\s\S]*?\}/g, "");
|
|
11118
|
+
out = out.replace(/style=(["'`])(?:\\.|(?!\1)[\s\S])*?\1/g, "");
|
|
11119
|
+
return out;
|
|
11120
|
+
};
|
|
11121
|
+
const getActiveRawCode = () => (tabsExist ? tabs[activeTab].code : code) || "";
|
|
11122
|
+
const activeRawCode = getActiveRawCode();
|
|
11123
|
+
const activeCodeSanitized = sanitizeCode(activeRawCode);
|
|
11124
|
+
const copyToClipboard = async () => {
|
|
11125
|
+
const textToCopy = activeCodeSanitized;
|
|
11126
|
+
if (textToCopy) {
|
|
11127
|
+
await navigator.clipboard.writeText(textToCopy);
|
|
11128
|
+
setCopied(true);
|
|
11129
|
+
setTimeout(() => setCopied(false), 2e3);
|
|
11130
|
+
}
|
|
11131
|
+
};
|
|
11132
|
+
const downloadCode = () => {
|
|
11133
|
+
const textToDownload = activeCodeSanitized;
|
|
11134
|
+
const activeFilename = tabsExist ? tabs[activeTab].name : filename;
|
|
11135
|
+
if (textToDownload) {
|
|
11136
|
+
const blob = new Blob([textToDownload], { type: "text/plain" });
|
|
11137
|
+
const url = URL.createObjectURL(blob);
|
|
11138
|
+
const a = document.createElement("a");
|
|
11139
|
+
a.href = url;
|
|
11140
|
+
a.download = activeFilename;
|
|
11141
|
+
document.body.appendChild(a);
|
|
11142
|
+
a.click();
|
|
11143
|
+
document.body.removeChild(a);
|
|
11144
|
+
URL.revokeObjectURL(url);
|
|
11145
|
+
}
|
|
11146
|
+
};
|
|
11147
|
+
const activeLanguage = tabsExist ? tabs[activeTab].language || language : language;
|
|
11148
|
+
const activeHighlightLines = tabsExist ? tabs[activeTab].highlightLines || [] : highlightLines;
|
|
11149
|
+
const getLanguageIcon = (lang) => {
|
|
11150
|
+
switch (lang.toLowerCase()) {
|
|
11151
|
+
case "javascript":
|
|
11152
|
+
case "jsx":
|
|
11153
|
+
case "typescript":
|
|
11154
|
+
case "tsx":
|
|
11155
|
+
return /* @__PURE__ */ jsx69(CodeIcon, { size: "1em", className: "text-yellow-400" });
|
|
11156
|
+
case "bash":
|
|
11157
|
+
case "shell":
|
|
11158
|
+
return /* @__PURE__ */ jsx69(TerminalIcon, { size: "1em", className: "text-green-400" });
|
|
11159
|
+
default:
|
|
11160
|
+
return /* @__PURE__ */ jsx69(FileArchiveIcon, { size: "1em", className: "text-blue-400" });
|
|
11161
|
+
}
|
|
11162
|
+
};
|
|
11163
|
+
const getCodeStats = (source) => {
|
|
11164
|
+
const lines = source.split("\n").length;
|
|
11165
|
+
const chars = source.length;
|
|
11166
|
+
const words = source.split(/\s+/).filter((word) => word.length > 0).length;
|
|
11167
|
+
return { lines, chars, words };
|
|
11168
|
+
};
|
|
11169
|
+
const stats = showStats ? getCodeStats(activeCodeSanitized) : null;
|
|
11170
|
+
return /* @__PURE__ */ jsxs49(
|
|
11171
|
+
"div",
|
|
11172
|
+
{
|
|
11173
|
+
className: `relative w-full rounded-xl overflow-hidden shadow-sm border no-underline-code`,
|
|
11174
|
+
style: cssVars.container,
|
|
11175
|
+
children: [
|
|
11176
|
+
/* @__PURE__ */ jsx69("style", { children: `.no-underline-code a { text-decoration: none !important; text-shadow: none !important; box-shadow: none !important; } .no-underline-code code a { text-decoration: none !important; }` }),
|
|
11177
|
+
/* @__PURE__ */ jsxs49("div", { className: `flex items-stretch min-h-[3rem]`, style: cssVars.header, children: [
|
|
11178
|
+
/* @__PURE__ */ jsxs49("div", { className: "flex-1 flex items-center min-w-0 px-3", children: [
|
|
11179
|
+
/* @__PURE__ */ jsxs49("div", { className: "flex gap-2 mr-3 shrink-0", children: [
|
|
11180
|
+
/* @__PURE__ */ jsx69("div", { className: "w-3 h-3 rounded-full bg-red-500" }),
|
|
11181
|
+
/* @__PURE__ */ jsx69("div", { className: "w-3 h-3 rounded-full bg-yellow-500" }),
|
|
11182
|
+
/* @__PURE__ */ jsx69("div", { className: "w-3 h-3 rounded-full bg-green-500" })
|
|
11183
|
+
] }),
|
|
11184
|
+
breadcrumb.length > 0 && /* @__PURE__ */ jsxs49("div", { className: "flex items-center min-w-0", children: [
|
|
11185
|
+
/* @__PURE__ */ jsx69(FolderIcon, { size: "1em", style: cssVars.icon }),
|
|
11186
|
+
/* @__PURE__ */ jsx69("div", { className: "flex items-center min-w-0 ml-2", children: breadcrumb.map((crumb, index) => /* @__PURE__ */ jsxs49(React43.Fragment, { children: [
|
|
11187
|
+
/* @__PURE__ */ jsx69(
|
|
11188
|
+
"span",
|
|
11189
|
+
{
|
|
11190
|
+
className: "text-xs truncate",
|
|
11191
|
+
style: cssVars.mutedText,
|
|
11192
|
+
children: crumb
|
|
11193
|
+
}
|
|
11194
|
+
),
|
|
11195
|
+
index < breadcrumb.length - 1 && /* @__PURE__ */ jsx69(
|
|
11196
|
+
ArrowRightIcon3,
|
|
11197
|
+
{
|
|
11198
|
+
size: "0.75em",
|
|
11199
|
+
style: cssVars.icon,
|
|
11200
|
+
className: "shrink-0 mx-1"
|
|
11201
|
+
}
|
|
11202
|
+
)
|
|
11203
|
+
] }, index)) })
|
|
11204
|
+
] })
|
|
11205
|
+
] }),
|
|
11206
|
+
/* @__PURE__ */ jsxs49("div", { className: "flex items-center justify-end shrink-0 px-2", children: [
|
|
11207
|
+
stats && /* @__PURE__ */ jsxs49(
|
|
11208
|
+
"div",
|
|
11209
|
+
{
|
|
11210
|
+
className: `text-xs mx-2 truncate hidden md:block`,
|
|
11211
|
+
style: cssVars.mutedText,
|
|
11212
|
+
children: [
|
|
11213
|
+
stats.lines,
|
|
11214
|
+
"L \u2022 ",
|
|
11215
|
+
stats.words,
|
|
11216
|
+
"W"
|
|
11217
|
+
]
|
|
11218
|
+
}
|
|
11219
|
+
),
|
|
11220
|
+
/* @__PURE__ */ jsxs49("div", { className: "flex", children: [
|
|
11221
|
+
/* @__PURE__ */ jsx69(
|
|
11222
|
+
"button",
|
|
11223
|
+
{
|
|
11224
|
+
onClick: () => setIsExpanded(!isExpanded),
|
|
11225
|
+
className: `p-2 transition-colors hover:bg-gray-200 dark:hover:bg-slate-700`,
|
|
11226
|
+
title: "Toggle fullscreen",
|
|
11227
|
+
children: /* @__PURE__ */ jsx69(ArrowsOutIcon, { size: "1em", style: cssVars.icon })
|
|
11228
|
+
}
|
|
11229
|
+
),
|
|
11230
|
+
/* @__PURE__ */ jsx69(
|
|
11231
|
+
"button",
|
|
11232
|
+
{
|
|
11233
|
+
onClick: downloadCode,
|
|
11234
|
+
className: `p-2 transition-colors hover:bg-gray-200 dark:hover:bg-slate-700`,
|
|
11235
|
+
title: "Download code",
|
|
11236
|
+
children: /* @__PURE__ */ jsx69(DownloadIcon, { size: "1em", style: cssVars.icon })
|
|
11237
|
+
}
|
|
11238
|
+
),
|
|
11239
|
+
/* @__PURE__ */ jsx69(
|
|
11240
|
+
"button",
|
|
11241
|
+
{
|
|
11242
|
+
onClick: copyToClipboard,
|
|
11243
|
+
className: `p-2 transition-colors hover:bg-gray-200 dark:hover:bg-slate-700`,
|
|
11244
|
+
title: "Copy code",
|
|
11245
|
+
children: copied ? /* @__PURE__ */ jsx69(
|
|
11246
|
+
CheckIcon10,
|
|
11247
|
+
{
|
|
11248
|
+
size: "1em",
|
|
11249
|
+
style: { color: "hsl(var(--primary))" }
|
|
11250
|
+
}
|
|
11251
|
+
) : /* @__PURE__ */ jsx69(CopyIcon2, { size: "1em", style: cssVars.icon })
|
|
11252
|
+
}
|
|
11253
|
+
)
|
|
11254
|
+
] })
|
|
11255
|
+
] })
|
|
11256
|
+
] }),
|
|
11257
|
+
tabsExist && /* @__PURE__ */ jsx69(
|
|
11258
|
+
"div",
|
|
11259
|
+
{
|
|
11260
|
+
className: `flex border-b overflow-x-auto`,
|
|
11261
|
+
style: {
|
|
11262
|
+
borderColor: "hsl(var(--border))",
|
|
11263
|
+
backgroundColor: "hsl(var(--popover))"
|
|
11264
|
+
},
|
|
11265
|
+
children: tabs.map((tab, index) => /* @__PURE__ */ jsxs49(
|
|
11266
|
+
"button",
|
|
11267
|
+
{
|
|
11268
|
+
onClick: () => setActiveTab(index),
|
|
11269
|
+
className: `flex items-center gap-2 px-4 py-2 text-sm transition-all duration-200 border-b-2 shrink-0 ${activeTab === index ? "border-blue-500" : "border-transparent"}`,
|
|
11270
|
+
style: activeTab === index ? {
|
|
11271
|
+
backgroundColor: "hsl(var(--card))",
|
|
11272
|
+
color: "hsl(var(--card-foreground))"
|
|
11273
|
+
} : void 0,
|
|
11274
|
+
children: [
|
|
11275
|
+
getLanguageIcon(tab.language || language),
|
|
11276
|
+
/* @__PURE__ */ jsx69("span", { className: "truncate max-w-[10rem]", children: tab.name })
|
|
11277
|
+
]
|
|
11278
|
+
},
|
|
11279
|
+
index
|
|
11280
|
+
))
|
|
11281
|
+
}
|
|
11282
|
+
),
|
|
11283
|
+
!tabsExist && filename && /* @__PURE__ */ jsx69(
|
|
11284
|
+
"div",
|
|
11285
|
+
{
|
|
11286
|
+
className: "flex items-center px-3 py-2 border-b",
|
|
11287
|
+
style: {
|
|
11288
|
+
borderColor: "hsl(var(--border))",
|
|
11289
|
+
backgroundColor: "hsl(var(--popover))"
|
|
11290
|
+
},
|
|
11291
|
+
children: /* @__PURE__ */ jsxs49("div", { className: "flex items-center gap-2 min-w-0", children: [
|
|
11292
|
+
getLanguageIcon(language),
|
|
11293
|
+
/* @__PURE__ */ jsx69(
|
|
11294
|
+
"span",
|
|
11295
|
+
{
|
|
11296
|
+
className: "text-sm font-medium truncate",
|
|
11297
|
+
style: cssVars.filename,
|
|
11298
|
+
children: filename
|
|
11299
|
+
}
|
|
11300
|
+
)
|
|
11301
|
+
] })
|
|
11302
|
+
}
|
|
11303
|
+
),
|
|
11304
|
+
/* @__PURE__ */ jsx69(
|
|
11305
|
+
"div",
|
|
11306
|
+
{
|
|
11307
|
+
className: `relative ${isExpanded ? "max-h-screen overflow-auto" : "max-h-96 overflow-auto"}`,
|
|
11308
|
+
children: /* @__PURE__ */ jsx69(
|
|
11309
|
+
SyntaxHighlighter,
|
|
11310
|
+
{
|
|
11311
|
+
language: activeLanguage,
|
|
11312
|
+
customStyle: {
|
|
11313
|
+
margin: 0,
|
|
11314
|
+
padding: "1rem",
|
|
11315
|
+
fontSize: "0.875rem",
|
|
11316
|
+
lineHeight: "1.5",
|
|
11317
|
+
backgroundColor: "hsl(var(--card))"
|
|
11318
|
+
},
|
|
11319
|
+
wrapLines: true,
|
|
11320
|
+
showLineNumbers: true,
|
|
11321
|
+
lineNumberStyle: {
|
|
11322
|
+
...cssVars.lineNumbers,
|
|
11323
|
+
minWidth: "3em",
|
|
11324
|
+
paddingRight: "1em",
|
|
11325
|
+
marginRight: "1em"
|
|
11326
|
+
},
|
|
11327
|
+
lineProps: (lineNumber) => ({
|
|
11328
|
+
style: {
|
|
11329
|
+
backgroundColor: activeHighlightLines.includes(lineNumber) ? "hsl(var(--highlight))" : "transparent",
|
|
11330
|
+
display: "block",
|
|
11331
|
+
width: "100%",
|
|
11332
|
+
borderLeft: activeHighlightLines.includes(lineNumber) ? cssVars.highlightBorder : "none",
|
|
11333
|
+
paddingLeft: "0.5rem"
|
|
11334
|
+
}
|
|
11335
|
+
}),
|
|
11336
|
+
PreTag: "div",
|
|
11337
|
+
children: String(activeCodeSanitized)
|
|
11338
|
+
}
|
|
11339
|
+
)
|
|
11340
|
+
}
|
|
11341
|
+
),
|
|
11342
|
+
showStats && stats && /* @__PURE__ */ jsxs49(
|
|
11343
|
+
"div",
|
|
11344
|
+
{
|
|
11345
|
+
className: "px-3 py-2 border-t text-xs flex items-center justify-between min-h-[2.5rem]",
|
|
11346
|
+
style: {
|
|
11347
|
+
borderTopColor: "hsl(var(--border))",
|
|
11348
|
+
backgroundColor: "hsl(var(--popover))",
|
|
11349
|
+
color: "hsl(var(--muted-foreground))"
|
|
11350
|
+
},
|
|
11351
|
+
children: [
|
|
11352
|
+
/* @__PURE__ */ jsxs49("div", { className: "flex items-center gap-3 min-w-0", children: [
|
|
11353
|
+
/* @__PURE__ */ jsx69("span", { className: "truncate", children: activeLanguage.toUpperCase() }),
|
|
11354
|
+
/* @__PURE__ */ jsxs49("span", { className: "truncate hidden sm:inline", children: [
|
|
11355
|
+
stats.lines,
|
|
11356
|
+
" lines"
|
|
11357
|
+
] }),
|
|
11358
|
+
/* @__PURE__ */ jsxs49("span", { className: "truncate hidden md:inline", children: [
|
|
11359
|
+
stats.chars,
|
|
11360
|
+
" chars"
|
|
11361
|
+
] })
|
|
11362
|
+
] }),
|
|
11363
|
+
/* @__PURE__ */ jsxs49("div", { className: "flex items-center gap-1 shrink-0", children: [
|
|
11364
|
+
/* @__PURE__ */ jsx69(GearIcon2, { size: "0.75em", style: cssVars.icon }),
|
|
11365
|
+
/* @__PURE__ */ jsx69("span", { children: "UTF-8" })
|
|
11366
|
+
] })
|
|
11367
|
+
]
|
|
11368
|
+
}
|
|
11369
|
+
)
|
|
11370
|
+
]
|
|
11371
|
+
}
|
|
11372
|
+
);
|
|
11373
|
+
};
|
|
11374
|
+
|
|
11375
|
+
// src/components/ui/data/StatusIndicator.tsx
|
|
11376
|
+
import { jsx as jsx70, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
11377
|
+
function StatusIndicator({
|
|
11378
|
+
color = "green",
|
|
11379
|
+
size = "sm",
|
|
11380
|
+
position = "top-right",
|
|
11381
|
+
show = true,
|
|
11382
|
+
children,
|
|
11383
|
+
className,
|
|
11384
|
+
...props
|
|
11385
|
+
}) {
|
|
11386
|
+
const absolutePositionClasses = {
|
|
11387
|
+
"top-right": "absolute top-0 right-0 translate-x-1/2 -translate-y-1/2",
|
|
11388
|
+
"top-left": "absolute top-0 left-0 -translate-x-1/2 -translate-y-1/2",
|
|
11389
|
+
"bottom-right": "absolute bottom-0 right-0 translate-x-1/2 translate-y-1/2",
|
|
11390
|
+
"bottom-left": "absolute bottom-0 left-0 -translate-x-1/2 translate-y-1/2"
|
|
11391
|
+
};
|
|
11392
|
+
const sizeClasses = {
|
|
11393
|
+
xs: "h-2 w-2",
|
|
11394
|
+
sm: "h-2.5 w-2.5",
|
|
11395
|
+
md: "h-3 w-3",
|
|
11396
|
+
lg: "h-4 w-4"
|
|
11397
|
+
};
|
|
11398
|
+
const colorClasses = {
|
|
11399
|
+
green: "bg-green-500",
|
|
11400
|
+
gray: "bg-gray-400",
|
|
11401
|
+
red: "bg-red-500",
|
|
11402
|
+
yellow: "bg-yellow-400",
|
|
11403
|
+
blue: "bg-blue-500",
|
|
11404
|
+
purple: "bg-purple-500",
|
|
11405
|
+
retire: "bg-slate-300/70 ring-1 ring-slate-200"
|
|
11406
|
+
};
|
|
11407
|
+
const dotClass = cn(
|
|
11408
|
+
"rounded-full inline-block",
|
|
11409
|
+
sizeClasses[size],
|
|
11410
|
+
colorClasses[color],
|
|
11411
|
+
"flex-shrink-0"
|
|
11412
|
+
);
|
|
11413
|
+
if (position === "inline") {
|
|
11414
|
+
return /* @__PURE__ */ jsxs50(
|
|
11415
|
+
"span",
|
|
11416
|
+
{
|
|
11417
|
+
className: cn("inline-flex items-center gap-2", className),
|
|
11418
|
+
...props,
|
|
11419
|
+
children: [
|
|
11420
|
+
show && /* @__PURE__ */ jsx70("span", { className: dotClass, "aria-hidden": !show }),
|
|
11421
|
+
children && /* @__PURE__ */ jsx70("span", { className: "truncate", children })
|
|
11422
|
+
]
|
|
11423
|
+
}
|
|
11424
|
+
);
|
|
11425
|
+
}
|
|
11426
|
+
return /* @__PURE__ */ jsxs50("div", { className: cn("relative inline-flex", className), ...props, children: [
|
|
11427
|
+
show && /* @__PURE__ */ jsx70(
|
|
11428
|
+
"span",
|
|
11429
|
+
{
|
|
11430
|
+
"aria-hidden": !show,
|
|
11431
|
+
className: cn(
|
|
11432
|
+
"pointer-events-none z-10",
|
|
11433
|
+
absolutePositionClasses[position]
|
|
11434
|
+
),
|
|
11435
|
+
children: /* @__PURE__ */ jsx70("span", { className: dotClass })
|
|
11436
|
+
}
|
|
11437
|
+
),
|
|
11438
|
+
/* @__PURE__ */ jsx70("div", { className: "min-w-0", children })
|
|
11439
|
+
] });
|
|
11440
|
+
}
|
|
11441
|
+
|
|
11184
11442
|
// src/hooks/use-drag.tsx
|
|
11185
11443
|
import { useState as useState20, useCallback as useCallback12, useRef as useRef8, useEffect as useEffect18 } from "react";
|
|
11186
11444
|
var useDrag = (options = {}) => {
|
|
@@ -11303,6 +11561,7 @@ export {
|
|
|
11303
11561
|
CheckboxBase,
|
|
11304
11562
|
CloseAllButton_default as CloseAllButton,
|
|
11305
11563
|
CloseButton,
|
|
11564
|
+
CodeBlock,
|
|
11306
11565
|
CollapsibleBase,
|
|
11307
11566
|
CollapsibleContentBase,
|
|
11308
11567
|
CollapsibleTriggerBase,
|
|
@@ -11478,6 +11737,7 @@ export {
|
|
|
11478
11737
|
SidebarTriggerBase,
|
|
11479
11738
|
SkeletonBase,
|
|
11480
11739
|
SlideBase,
|
|
11740
|
+
StatusIndicator,
|
|
11481
11741
|
SwitchBase,
|
|
11482
11742
|
TableBase,
|
|
11483
11743
|
TableBodyBase,
|