@mlw-packages/react-components 1.5.9 → 1.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -500,6 +500,7 @@ var buttonVariantsBase = cva(
500
500
  default: "bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",
501
501
  destructive: "bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40",
502
502
  outline: "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-background dark:border-input dark:hover:bg-background/95",
503
+ select: "box-border border border-input bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-background dark:hover:bg-background/95",
503
504
  secondary: "bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",
504
505
  ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
505
506
  link: "text-primary underline-offset-4 hover:underline"
@@ -508,7 +509,8 @@ var buttonVariantsBase = cva(
508
509
  default: "h-9 py-2 px-4 has-[>svg]:px-3",
509
510
  sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
510
511
  lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
511
- icon: "size-9"
512
+ icon: "size-9",
513
+ select: "h-[34px] py-[7px] px-4 has-[>svg]:px-3"
512
514
  }
513
515
  },
514
516
  defaultVariants: {
@@ -518,7 +520,14 @@ var buttonVariantsBase = cva(
518
520
  }
519
521
  );
520
522
  var ButtonBase = React.forwardRef(
521
- ({ className, variant, size, asChild = false, testid = `button-${variant ?? "default"}`, ...props }, ref) => {
523
+ ({
524
+ className,
525
+ variant,
526
+ size,
527
+ asChild = false,
528
+ testid = `button-${variant ?? "default"}`,
529
+ ...props
530
+ }, ref) => {
522
531
  const Comp = asChild ? Slot : "button";
523
532
  return /* @__PURE__ */ jsx(
524
533
  Comp,
@@ -1577,7 +1586,7 @@ var CommandItemBase = React9.forwardRef(({ className, testid: dataTestId = "comm
1577
1586
  {
1578
1587
  ref,
1579
1588
  className: cn(
1580
- "relative flex cursor-pointer gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-all data-[disabled=true]:pointer-events-none data-[selected=true]:bg-primary data-[selected=true]:text-background data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover:scale-[1.02] active:scale-[0.98]",
1589
+ "relative flex cursor-pointer gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-all data-[disabled=true]:pointer-events-none data-[selected=true]:bg-muted data-[selected=true]:text-primary data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover:scale-[1.02] active:scale-[0.98]",
1581
1590
  className
1582
1591
  ),
1583
1592
  "data-testid": dataTestId,
@@ -2185,14 +2194,17 @@ var PopoverContentBase = React13.forwardRef(({ className, align = "center", side
2185
2194
  PopoverContentBase.displayName = PopoverPrimitive.Content.displayName;
2186
2195
 
2187
2196
  // src/components/selects/ComboboxBase.tsx
2188
- import { CaretDownIcon, CheckIcon as CheckIcon4 } from "@phosphor-icons/react";
2197
+ import { motion as motion4 } from "framer-motion";
2189
2198
  import { useState as useState2 } from "react";
2199
+ import { CaretDownIcon, CheckIcon as CheckIcon4 } from "@phosphor-icons/react";
2190
2200
  import { jsx as jsx19, jsxs as jsxs11 } from "react/jsx-runtime";
2191
2201
  function ComboboxBase({
2192
2202
  items,
2193
2203
  renderSelected,
2194
2204
  handleSelection,
2195
2205
  checkIsSelected,
2206
+ keepOpen = false,
2207
+ closeAll,
2196
2208
  searchPlaceholder,
2197
2209
  errorMessage,
2198
2210
  testIds = {}
@@ -2212,17 +2224,27 @@ function ComboboxBase({
2212
2224
  children: /* @__PURE__ */ jsxs11(
2213
2225
  ButtonBase,
2214
2226
  {
2215
- variant: "outline",
2227
+ variant: "select",
2228
+ size: "select",
2216
2229
  role: "combobox",
2217
2230
  "aria-expanded": open,
2218
2231
  className: cn(
2219
- "flex items-start gap-2 justify-between",
2232
+ "flex items-center gap-2 justify-between h-auto [&>div]:line-clamp-1 [&>span]:line-clamp-1",
2220
2233
  errorMessage && "border-red-500"
2221
2234
  ),
2222
2235
  "data-testid": testIds.trigger ?? "combobox-trigger",
2223
2236
  children: [
2224
2237
  renderSelected,
2225
- /* @__PURE__ */ jsx19(CaretDownIcon, { size: 16, className: "mt-0.5" })
2238
+ closeAll,
2239
+ /* @__PURE__ */ jsx19(
2240
+ motion4.div,
2241
+ {
2242
+ animate: { rotate: open ? 180 : 0 },
2243
+ transition: { duration: 0.3 },
2244
+ className: "flex",
2245
+ children: /* @__PURE__ */ jsx19(CaretDownIcon, { className: " flex-shrink-0" })
2246
+ }
2247
+ )
2226
2248
  ]
2227
2249
  }
2228
2250
  )
@@ -2236,7 +2258,7 @@ function ComboboxBase({
2236
2258
  children: /* @__PURE__ */ jsxs11(
2237
2259
  CommandBase,
2238
2260
  {
2239
- className: "dark:text-white",
2261
+ className: "dark:text-white hover:bg-rsecondary",
2240
2262
  "data-testid": testIds.command ?? "combobox-command",
2241
2263
  children: [
2242
2264
  /* @__PURE__ */ jsx19(
@@ -2258,19 +2280,32 @@ function ComboboxBase({
2258
2280
  value: item.value,
2259
2281
  onSelect: (value) => {
2260
2282
  handleSelection(value);
2261
- setOpen(false);
2283
+ if (!keepOpen) setOpen(false);
2262
2284
  },
2263
2285
  "data-testid": testIds.option ?? "combobox-option",
2264
2286
  children: [
2265
2287
  item.label,
2266
2288
  /* @__PURE__ */ jsx19(
2267
- CheckIcon4,
2289
+ motion4.div,
2268
2290
  {
2269
- className: cn(
2270
- "ml-auto",
2271
- isSelected ? "opacity-100" : "opacity-0"
2272
- ),
2273
- "data-testid": isSelected ? testIds.check ?? "combobox-option-check" : void 0
2291
+ initial: { scale: 0 },
2292
+ animate: { scale: isSelected ? 1 : 0 },
2293
+ transition: {
2294
+ type: "spring",
2295
+ stiffness: 500,
2296
+ damping: 30
2297
+ },
2298
+ className: "ml-auto ",
2299
+ children: /* @__PURE__ */ jsx19(
2300
+ CheckIcon4,
2301
+ {
2302
+ className: cn(
2303
+ "ml-auto",
2304
+ isSelected ? "opacity-100" : "opacity-0"
2305
+ ),
2306
+ "data-testid": isSelected ? testIds.check ?? "combobox-option-check" : void 0
2307
+ }
2308
+ )
2274
2309
  }
2275
2310
  )
2276
2311
  ]
@@ -2342,6 +2377,7 @@ function Combobox({
2342
2377
  // src/components/selects/MultiCombobox.tsx
2343
2378
  import { useCallback as useCallback3, useMemo as useMemo2 } from "react";
2344
2379
  import { XIcon as XIcon2 } from "@phosphor-icons/react";
2380
+ import { motion as motion5, AnimatePresence as AnimatePresence3 } from "framer-motion";
2345
2381
  import { jsx as jsx21, jsxs as jsxs13 } from "react/jsx-runtime";
2346
2382
  function MultiCombobox({
2347
2383
  items,
@@ -2352,7 +2388,8 @@ function MultiCombobox({
2352
2388
  searchPlaceholder,
2353
2389
  label,
2354
2390
  labelClassname,
2355
- testIds = {}
2391
+ testIds = {},
2392
+ keepOpen = true
2356
2393
  }) {
2357
2394
  const selectedItems = items.filter((item) => selected.includes(item.value));
2358
2395
  const checkIsSelected = useCallback3(
@@ -2370,13 +2407,27 @@ function MultiCombobox({
2370
2407
  },
2371
2408
  [selected, onChange]
2372
2409
  );
2410
+ const closeAll = selectedItems.length > 0 ? /* @__PURE__ */ jsx21("div", { className: " flex items-center", children: /* @__PURE__ */ jsx21(
2411
+ ButtonBase,
2412
+ {
2413
+ variant: "ghost",
2414
+ "data-testid": testIds.clearAll ?? "combobox-clear-all",
2415
+ size: "icon",
2416
+ onClick: (e) => {
2417
+ e.stopPropagation();
2418
+ onChange([]);
2419
+ },
2420
+ className: "text-xs hover:bg-red-50 hover:text-red-500 transition-colors rounded-md mr-2",
2421
+ children: /* @__PURE__ */ jsx21(XIcon2, {})
2422
+ }
2423
+ ) }) : null;
2373
2424
  const renderSelected = useMemo2(() => {
2374
2425
  if (selectedItems.length === 0) {
2375
2426
  return /* @__PURE__ */ jsx21(
2376
2427
  "span",
2377
2428
  {
2378
2429
  "data-testid": testIds.emptyPlaceholder ?? "combobox-selected-empty",
2379
- className: "text-gray-500",
2430
+ className: "text-gray-500 truncate",
2380
2431
  children: placeholder ?? "Selecione uma op\xE7\xE3o..."
2381
2432
  }
2382
2433
  );
@@ -2385,16 +2436,25 @@ function MultiCombobox({
2385
2436
  "div",
2386
2437
  {
2387
2438
  "data-testid": testIds.selectedWrapper ?? "combobox-selected-wrapper",
2388
- className: "flex w-full flex-wrap gap-2",
2389
- children: selectedItems.map((item) => /* @__PURE__ */ jsxs13(
2390
- "div",
2439
+ className: "flex w-full flex-wrap gap-2 overflow-hidden pr-1.5",
2440
+ children: /* @__PURE__ */ jsx21(AnimatePresence3, { mode: "popLayout", children: selectedItems.map((item) => /* @__PURE__ */ jsxs13(
2441
+ motion5.div,
2391
2442
  {
2392
- className: "flex items-center gap-1 rounded-md border p-1",
2443
+ layout: true,
2444
+ initial: { scale: 0, opacity: 0 },
2445
+ animate: { scale: 1, opacity: 1 },
2446
+ exit: { scale: 0, opacity: 0 },
2447
+ transition: {
2448
+ type: "spring",
2449
+ stiffness: 500,
2450
+ damping: 30
2451
+ },
2452
+ className: "flex items-center justify-between gap-2 my-1 rounded-md border p-1 max-w-full",
2393
2453
  "data-testid": testIds.selectedItem?.(item.value) ?? `combobox-selected-${item.value}`,
2394
2454
  children: [
2395
- /* @__PURE__ */ jsx21("span", { className: "whitespace-break-spaces text-xs", children: item.label }),
2455
+ /* @__PURE__ */ jsx21("span", { className: "text-xs truncate", children: item.label }),
2396
2456
  /* @__PURE__ */ jsx21(
2397
- "span",
2457
+ motion5.span,
2398
2458
  {
2399
2459
  role: "button",
2400
2460
  tabIndex: 0,
@@ -2402,14 +2462,16 @@ function MultiCombobox({
2402
2462
  e.stopPropagation();
2403
2463
  handleSelection(item.value);
2404
2464
  },
2405
- className: "cursor-pointer p-0 m-0 text-xs flex items-center justify-center hover:text-red-500 hover:scale-110 transition-all",
2465
+ whileHover: { scale: 1.1 },
2466
+ whileTap: { scale: 0.95 },
2467
+ className: "cursor-pointer p-0.5 text-xs flex items-center justify-center hover:text-red-500 transition-colors flex-shrink-0 rounded hover:bg-red-50 ",
2406
2468
  children: /* @__PURE__ */ jsx21(XIcon2, { size: 14 })
2407
2469
  }
2408
2470
  )
2409
2471
  ]
2410
2472
  },
2411
2473
  item.value
2412
- ))
2474
+ )) })
2413
2475
  }
2414
2476
  );
2415
2477
  }, [handleSelection, placeholder, selectedItems, testIds]);
@@ -2434,6 +2496,8 @@ function MultiCombobox({
2434
2496
  renderSelected,
2435
2497
  handleSelection,
2436
2498
  checkIsSelected,
2499
+ keepOpen,
2500
+ closeAll,
2437
2501
  searchPlaceholder
2438
2502
  }
2439
2503
  )
@@ -2890,7 +2954,7 @@ import { jsx as jsx28, jsxs as jsxs18 } from "react/jsx-runtime";
2890
2954
  var ProgressBase = React17.forwardRef(
2891
2955
  ({
2892
2956
  className,
2893
- value,
2957
+ value: rawValue,
2894
2958
  label,
2895
2959
  leftIcon,
2896
2960
  rightIcon,
@@ -2898,8 +2962,14 @@ var ProgressBase = React17.forwardRef(
2898
2962
  segments = 5,
2899
2963
  steps = [],
2900
2964
  currentStep = 0,
2965
+ showValue = false,
2966
+ valuePosition = "right",
2967
+ autocolor,
2968
+ plusIndicator,
2901
2969
  ...props
2902
2970
  }, ref) => {
2971
+ const value = Number(rawValue || 0);
2972
+ const indicatorWidth = Math.min(value, 100);
2903
2973
  switch (variant) {
2904
2974
  case "segments":
2905
2975
  return /* @__PURE__ */ jsx28(
@@ -2933,26 +3003,89 @@ var ProgressBase = React17.forwardRef(
2933
3003
  return /* @__PURE__ */ jsxs18("div", { className: "flex flex-col gap-1 w-full min-w-[150px]", children: [
2934
3004
  label && /* @__PURE__ */ jsx28(LabelBase_default, { className: "py-2", children: label }),
2935
3005
  /* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-2", children: [
3006
+ showValue && valuePosition === "left" && /* @__PURE__ */ jsxs18("div", { className: "w-12 text-sm text-right font-extrabold", children: [
3007
+ Math.round(value || 0),
3008
+ "%"
3009
+ ] }),
2936
3010
  leftIcon && /* @__PURE__ */ jsx28("div", { className: "flex items-center justify-center", children: leftIcon }),
2937
- /* @__PURE__ */ jsx28(
3011
+ /* @__PURE__ */ jsxs18(
2938
3012
  ProgressPrimitive.Root,
2939
3013
  {
2940
3014
  ref,
2941
3015
  className: cn(
2942
- "relative h-3 w-full overflow-hidden rounded-full bg-zinc-200 dark:bg-zinc-800 shadow-inner transition-all",
3016
+ " relative h-3 w-full overflow-visible rounded-full bg-muted/80 shadow-inner transition-all ",
2943
3017
  className
2944
3018
  ),
2945
3019
  value,
2946
3020
  ...props,
2947
- children: /* @__PURE__ */ jsx28(
2948
- ProgressPrimitive.Indicator,
2949
- {
2950
- className: "h-full w-full flex-1 bg-primary transition-all duration-500 ease-in-out",
2951
- style: { transform: `translateX(-${100 - (value || 0)}%)` }
2952
- }
2953
- )
3021
+ children: [
3022
+ /* @__PURE__ */ jsx28(
3023
+ ProgressPrimitive.Indicator,
3024
+ {
3025
+ className: cn(
3026
+ "h-full w-full flex-1 transition-all duration-500 ease-in-out rounded-lg ",
3027
+ autocolor && autocolor.length >= 2 ? "bg-transparent" : "bg-primary"
3028
+ ),
3029
+ style: { transform: `translateX(-${100 - indicatorWidth}%)` }
3030
+ }
3031
+ ),
3032
+ autocolor && Array.isArray(autocolor) && autocolor.length >= 2 && (() => {
3033
+ const [t1Raw, t2Raw] = autocolor;
3034
+ const [t1, t2] = [Number(t1Raw), Number(t2Raw)].sort(
3035
+ (a, b) => a - b
3036
+ );
3037
+ const v = Number(value || 0);
3038
+ let colorClass = "bg-red-500";
3039
+ if (v <= t1) {
3040
+ colorClass = "bg-red-500";
3041
+ } else if (v <= t2) {
3042
+ colorClass = "bg-yellow-500";
3043
+ } else {
3044
+ colorClass = "bg-emerald-500";
3045
+ }
3046
+ return /* @__PURE__ */ jsx28(
3047
+ "div",
3048
+ {
3049
+ "aria-hidden": true,
3050
+ className: cn(
3051
+ "absolute top-0 left-0 h-full transition-all duration-500 ease-in-out rounded-lg",
3052
+ colorClass
3053
+ ),
3054
+ style: { width: `${indicatorWidth}%` }
3055
+ }
3056
+ );
3057
+ })(),
3058
+ plusIndicator && value > 100 && /* @__PURE__ */ jsx28(
3059
+ "div",
3060
+ {
3061
+ "aria-hidden": "true",
3062
+ className: "absolute top-0 bottom-0 w-0.5 bg-black/70 transition-all duration-500 ease-in-out pointer-events-none",
3063
+ style: {
3064
+ left: `${100 / value * 100}%`
3065
+ },
3066
+ children: value > 115 && /* @__PURE__ */ jsx28("div", { className: "absolute left-full ml-2 top-1/2 -translate-y-1/2 text-xs whitespace-nowrap font-extrabold", children: `+${Math.round(
3067
+ value - 100
3068
+ )}%` })
3069
+ }
3070
+ ),
3071
+ showValue && valuePosition === "inside" && /* @__PURE__ */ jsxs18(
3072
+ "span",
3073
+ {
3074
+ className: "absolute inset-0 flex items-center justify-center text-sm select-none pointer-events-none text-secondary font-extrabold",
3075
+ "aria-hidden": true,
3076
+ children: [
3077
+ Math.round(value || 0),
3078
+ "%"
3079
+ ]
3080
+ }
3081
+ )
3082
+ ]
2954
3083
  }
2955
3084
  ),
3085
+ showValue && valuePosition === "right" && /* @__PURE__ */ jsxs18("div", { className: "w-12 text-sm font-extrabold text-left", children: [
3086
+ Math.round(value || 0),
3087
+ "%"
3088
+ ] }),
2956
3089
  rightIcon && /* @__PURE__ */ jsx28("div", { className: "flex items-center justify-center", children: rightIcon })
2957
3090
  ] })
2958
3091
  ] });
@@ -3109,7 +3242,7 @@ ScrollBarBase.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
3109
3242
  import * as React19 from "react";
3110
3243
  import * as SelectPrimitive from "@radix-ui/react-select";
3111
3244
  import { CheckIcon as CheckIcon5, CaretDownIcon as CaretDownIcon3, CaretUpIcon } from "@phosphor-icons/react";
3112
- import { motion as motion4, AnimatePresence as AnimatePresence3 } from "framer-motion";
3245
+ import { motion as motion6, AnimatePresence as AnimatePresence4 } from "framer-motion";
3113
3246
  import { Fragment as Fragment2, jsx as jsx30, jsxs as jsxs20 } from "react/jsx-runtime";
3114
3247
  var SelectBase = SelectPrimitive.Root;
3115
3248
  var SelectGroupBase = SelectPrimitive.Group;
@@ -3126,7 +3259,7 @@ var SelectTriggerBase = React19.forwardRef(({ className, children, open, ...prop
3126
3259
  children: [
3127
3260
  children,
3128
3261
  /* @__PURE__ */ jsx30(
3129
- motion4.span,
3262
+ motion6.span,
3130
3263
  {
3131
3264
  animate: { rotate: open ? 180 : 0 },
3132
3265
  transition: { duration: 0.3 },
@@ -3164,43 +3297,51 @@ var SelectScrollDownButtonBase = React19.forwardRef(({ className, ...props }, re
3164
3297
  }
3165
3298
  ));
3166
3299
  SelectScrollDownButtonBase.displayName = SelectPrimitive.ScrollDownButton.displayName;
3167
- var SelectContentBase = React19.forwardRef(({ className, children, position = "popper", testid: dataTestId = "select-content", ...props }, ref) => /* @__PURE__ */ jsx30(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsx30(AnimatePresence3, { children: /* @__PURE__ */ jsx30(
3168
- SelectPrimitive.Content,
3169
- {
3170
- ref,
3171
- className: cn(
3172
- "relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md",
3173
- className
3174
- ),
3175
- position,
3176
- "data-testid": dataTestId,
3177
- ...props,
3178
- asChild: true,
3179
- children: /* @__PURE__ */ jsx30(
3180
- motion4.div,
3181
- {
3182
- initial: { opacity: 0, scale: 0.95 },
3183
- animate: { opacity: 1, scale: 1 },
3184
- exit: { opacity: 0, scale: 0.95 },
3185
- transition: { duration: 0.2 },
3186
- children: /* @__PURE__ */ jsxs20(Fragment2, { children: [
3187
- /* @__PURE__ */ jsx30(SelectScrollUpButtonBase, {}),
3188
- /* @__PURE__ */ jsx30(
3189
- SelectPrimitive.Viewport,
3190
- {
3191
- className: cn(
3192
- "p-1",
3193
- position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
3194
- ),
3195
- children
3196
- }
3197
- ),
3198
- /* @__PURE__ */ jsx30(SelectScrollDownButtonBase, {})
3199
- ] })
3200
- }
3201
- )
3202
- }
3203
- ) }) }));
3300
+ var SelectContentBase = React19.forwardRef(
3301
+ ({
3302
+ className,
3303
+ children,
3304
+ position = "popper",
3305
+ testid: dataTestId = "select-content",
3306
+ ...props
3307
+ }, ref) => /* @__PURE__ */ jsx30(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsx30(AnimatePresence4, { children: /* @__PURE__ */ jsx30(
3308
+ SelectPrimitive.Content,
3309
+ {
3310
+ ref,
3311
+ className: cn(
3312
+ "relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md",
3313
+ className
3314
+ ),
3315
+ position,
3316
+ "data-testid": dataTestId,
3317
+ ...props,
3318
+ asChild: true,
3319
+ children: /* @__PURE__ */ jsx30(
3320
+ motion6.div,
3321
+ {
3322
+ initial: { opacity: 0, scale: 0.95 },
3323
+ animate: { opacity: 1, scale: 1 },
3324
+ exit: { opacity: 0, scale: 0.95 },
3325
+ transition: { duration: 0.2 },
3326
+ children: /* @__PURE__ */ jsxs20(Fragment2, { children: [
3327
+ /* @__PURE__ */ jsx30(SelectScrollUpButtonBase, {}),
3328
+ /* @__PURE__ */ jsx30(
3329
+ SelectPrimitive.Viewport,
3330
+ {
3331
+ className: cn(
3332
+ "p-1",
3333
+ position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
3334
+ ),
3335
+ children
3336
+ }
3337
+ ),
3338
+ /* @__PURE__ */ jsx30(SelectScrollDownButtonBase, {})
3339
+ ] })
3340
+ }
3341
+ )
3342
+ }
3343
+ ) }) })
3344
+ );
3204
3345
  SelectContentBase.displayName = SelectPrimitive.Content.displayName;
3205
3346
  var SelectLabelBase = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx30(
3206
3347
  SelectPrimitive.Label,
@@ -3211,19 +3352,36 @@ var SelectLabelBase = React19.forwardRef(({ className, ...props }, ref) => /* @_
3211
3352
  }
3212
3353
  ));
3213
3354
  SelectLabelBase.displayName = SelectPrimitive.Label.displayName;
3214
- var SelectItemBase = React19.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs20(
3355
+ var SelectItemBase = React19.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx30(
3215
3356
  SelectPrimitive.Item,
3216
3357
  {
3217
3358
  ref,
3218
3359
  className: cn(
3219
- "relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
3360
+ "relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 transition-colors",
3220
3361
  className
3221
3362
  ),
3222
3363
  ...props,
3223
- children: [
3224
- /* @__PURE__ */ jsx30("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx30(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx30(CheckIcon5, { className: "h-4 w-4" }) }) }),
3225
- /* @__PURE__ */ jsx30(SelectPrimitive.ItemText, { children })
3226
- ]
3364
+ asChild: true,
3365
+ children: /* @__PURE__ */ jsxs20(
3366
+ motion6.div,
3367
+ {
3368
+ whileHover: { x: 4 },
3369
+ whileTap: { scale: 0.98 },
3370
+ transition: { duration: 0.2 },
3371
+ children: [
3372
+ /* @__PURE__ */ jsx30("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx30(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx30(
3373
+ motion6.div,
3374
+ {
3375
+ initial: { scale: 0 },
3376
+ animate: { scale: 1 },
3377
+ transition: { type: "spring", stiffness: 500, damping: 30 },
3378
+ children: /* @__PURE__ */ jsx30(CheckIcon5, { className: "h-4 w-4" })
3379
+ }
3380
+ ) }) }),
3381
+ /* @__PURE__ */ jsx30(SelectPrimitive.ItemText, { children })
3382
+ ]
3383
+ }
3384
+ )
3227
3385
  }
3228
3386
  ));
3229
3387
  SelectItemBase.displayName = SelectPrimitive.Item.displayName;
@@ -3240,7 +3398,7 @@ SelectSeparatorBase.displayName = SelectPrimitive.Separator.displayName;
3240
3398
  // src/components/ui/SeparatorBase.tsx
3241
3399
  import * as React20 from "react";
3242
3400
  import * as SeparatorPrimitive from "@radix-ui/react-separator";
3243
- import { motion as motion5 } from "framer-motion";
3401
+ import { motion as motion7 } from "framer-motion";
3244
3402
  import { jsx as jsx31 } from "react/jsx-runtime";
3245
3403
  var SeparatorBase = React20.forwardRef(
3246
3404
  ({ className, orientation = "horizontal", decorative = true, ...props }, ref) => {
@@ -3254,7 +3412,7 @@ var SeparatorBase = React20.forwardRef(
3254
3412
  asChild: true,
3255
3413
  ...props,
3256
3414
  children: /* @__PURE__ */ jsx31(
3257
- motion5.div,
3415
+ motion7.div,
3258
3416
  {
3259
3417
  className: cn(
3260
3418
  "shrink-0 bg-border",
@@ -4311,7 +4469,7 @@ TabsContentBase.displayName = TabsPrimitive.Content.displayName;
4311
4469
 
4312
4470
  // src/components/ui/TextAreaBase.tsx
4313
4471
  import * as React28 from "react";
4314
- import { motion as motion6 } from "framer-motion";
4472
+ import { motion as motion8 } from "framer-motion";
4315
4473
  import { TrashIcon as TrashIcon2 } from "@phosphor-icons/react";
4316
4474
  import { jsx as jsx40, jsxs as jsxs24 } from "react/jsx-runtime";
4317
4475
  var TextAreaBase = React28.forwardRef(
@@ -4392,7 +4550,7 @@ var TextAreaBase = React28.forwardRef(
4392
4550
  onOpenChange: setShowConfirmTooltip,
4393
4551
  children: [
4394
4552
  /* @__PURE__ */ jsx40(TooltipTriggerBase, { asChild: true, children: /* @__PURE__ */ jsx40(
4395
- motion6.button,
4553
+ motion8.button,
4396
4554
  {
4397
4555
  type: "button",
4398
4556
  initial: { opacity: 0, scale: 0.8 },
@@ -4456,7 +4614,7 @@ var TextAreaBase = React28.forwardRef(
4456
4614
  }
4457
4615
  ) }),
4458
4616
  /* @__PURE__ */ jsx40(
4459
- motion6.div,
4617
+ motion8.div,
4460
4618
  {
4461
4619
  className: "pointer-events-none absolute inset-0 rounded-lg",
4462
4620
  initial: { opacity: 0 },
@@ -4466,7 +4624,7 @@ var TextAreaBase = React28.forwardRef(
4466
4624
  }
4467
4625
  ),
4468
4626
  isFocused && hasContent && props.maxLength && /* @__PURE__ */ jsxs24(
4469
- motion6.div,
4627
+ motion8.div,
4470
4628
  {
4471
4629
  initial: { opacity: 0, y: -10 },
4472
4630
  animate: { opacity: 1, y: 0 },
@@ -4685,7 +4843,7 @@ import {
4685
4843
  XIcon as XIcon4,
4686
4844
  CalendarIcon
4687
4845
  } from "@phosphor-icons/react";
4688
- import { AnimatePresence as AnimatePresence4 } from "framer-motion";
4846
+ import { AnimatePresence as AnimatePresence5 } from "framer-motion";
4689
4847
  import { jsx as jsx44, jsxs as jsxs27 } from "react/jsx-runtime";
4690
4848
  function CalendarBase2({
4691
4849
  className,
@@ -4707,10 +4865,10 @@ function CalendarBase2({
4707
4865
  "div",
4708
4866
  {
4709
4867
  className: cn(
4710
- "rounded-md border bg-background p-4 shadow-lg overflow-hidden w-full h-full flex flex-col",
4868
+ "rounded-md border bg-background p-2 overflow-hidden flex flex-col",
4711
4869
  className
4712
4870
  ),
4713
- children: /* @__PURE__ */ jsx44("div", { className: "relative flex-1 flex flex-col min-h-0", children: /* @__PURE__ */ jsx44(AnimatePresence4, { initial: false, mode: "wait", custom: direction, children: /* @__PURE__ */ jsx44(
4871
+ children: /* @__PURE__ */ jsx44("div", { className: "relative flex-1 flex flex-col min-h-0", children: /* @__PURE__ */ jsx44(AnimatePresence5, { initial: false, mode: "wait", custom: direction, children: /* @__PURE__ */ jsx44(
4714
4872
  "div",
4715
4873
  {
4716
4874
  className: "w-full h-full flex flex-col",
@@ -4750,11 +4908,11 @@ function CalendarBase2({
4750
4908
  ),
4751
4909
  day: cn(
4752
4910
  buttonVariantsBase({ variant: "ghost" }),
4753
- "w-full h-full p-0 rounded-lg",
4754
- "aria-selected:opacity-100 hover:bg-muted text-[clamp(0.75rem,2vw,1rem)] flex items-center justify-center",
4755
- "touch-manipulation transition-all duration-200 ease-out hover:scale-105 active:scale-95"
4911
+ "w-full h-full p-0",
4912
+ "aria-selected:opacity-100 hover:bg-muted flex items-center justify-center",
4913
+ " transition-all duration-200 ease-out hover:scale-105 active:scale-95"
4756
4914
  ),
4757
- day_selected: "bg-primary text-primary-foreground hover:bg-primary/90 focus:bg-primary/90 font-semibold",
4915
+ day_selected: "bg-primary text-primary-foreground hover:bg-primary/90 focus:bg-primary/90 font-semibold hover:text-white",
4758
4916
  day_today: "bg-muted text-foreground font-bold ring-2 ring-primary/30 ring-inset",
4759
4917
  day_outside: "day-outside text-muted-foreground/40 opacity-40 aria-selected:bg-muted/50 aria-selected:text-foreground",
4760
4918
  day_disabled: "text-muted-foreground/30 opacity-40 cursor-not-allowed",
@@ -4782,7 +4940,7 @@ import { ptBR } from "date-fns/locale";
4782
4940
  import { useEffect as useEffect8, useState as useState9 } from "react";
4783
4941
 
4784
4942
  // src/components/date-time-picker/TimePicker.tsx
4785
- import { motion as motion7, AnimatePresence as AnimatePresence5 } from "framer-motion";
4943
+ import { motion as motion9, AnimatePresence as AnimatePresence6 } from "framer-motion";
4786
4944
  import * as React32 from "react";
4787
4945
 
4788
4946
  // src/components/date-time-picker/TimePickerInput.tsx
@@ -5154,7 +5312,7 @@ function TimePicker({
5154
5312
  visible: { opacity: 1, y: 0 }
5155
5313
  };
5156
5314
  return /* @__PURE__ */ jsxs29(
5157
- motion7.div,
5315
+ motion9.div,
5158
5316
  {
5159
5317
  variants: containerVariants,
5160
5318
  initial: "hidden",
@@ -5162,7 +5320,7 @@ function TimePicker({
5162
5320
  className: "flex items-end justify-center gap-2 sm:gap-3 p-2 sm:p-3 md:p-4 rounded-lg bg-muted/20 border border-border/50 w-full max-w-full overflow-hidden",
5163
5321
  children: [
5164
5322
  /* @__PURE__ */ jsx46(
5165
- motion7.div,
5323
+ motion9.div,
5166
5324
  {
5167
5325
  variants: itemVariants2,
5168
5326
  className: "grid gap-1 sm:gap-2 text-center flex-shrink-0 min-w-0",
@@ -5180,7 +5338,7 @@ function TimePicker({
5180
5338
  }
5181
5339
  ),
5182
5340
  /* @__PURE__ */ jsx46(
5183
- motion7.div,
5341
+ motion9.div,
5184
5342
  {
5185
5343
  variants: itemVariants2,
5186
5344
  className: "grid gap-1 sm:gap-2 text-center flex-shrink-0 min-w-0",
@@ -5198,8 +5356,8 @@ function TimePicker({
5198
5356
  )
5199
5357
  }
5200
5358
  ),
5201
- /* @__PURE__ */ jsx46(AnimatePresence5, { children: !hideSeconds && /* @__PURE__ */ jsx46(Fragment4, { children: /* @__PURE__ */ jsx46(
5202
- motion7.div,
5359
+ /* @__PURE__ */ jsx46(AnimatePresence6, { children: !hideSeconds && /* @__PURE__ */ jsx46(Fragment4, { children: /* @__PURE__ */ jsx46(
5360
+ motion9.div,
5203
5361
  {
5204
5362
  variants: itemVariants2,
5205
5363
  initial: "hidden",
@@ -5284,9 +5442,9 @@ function DateTimePicker({
5284
5442
  variant: "outline",
5285
5443
  className: cn(
5286
5444
  "w-full justify-start text-left min-w-0 overflow-hidden",
5287
- "",
5445
+ "text-foreground/70",
5288
5446
  "text-sm sm:text-base",
5289
- !date && "text-muted-foreground"
5447
+ !date && "text-muted-foreground/"
5290
5448
  ),
5291
5449
  children: [
5292
5450
  /* @__PURE__ */ jsx47("span", { className: "truncate flex-1", children: date ? format(date, getDisplayFormat(), { locale: ptBR }) : "Pick a date" }),
@@ -5314,7 +5472,7 @@ function DateTimePicker({
5314
5472
  initialFocus: true,
5315
5473
  fromDate,
5316
5474
  toDate,
5317
- className: "w-full"
5475
+ className: cn("w-full", hideHour && hideMinute && "border-0")
5318
5476
  }
5319
5477
  ),
5320
5478
  !(hideHour && hideMinute) && /* @__PURE__ */ jsx47("div", { className: "flex justify-center w-full px-2", children: /* @__PURE__ */ jsxs30(
@@ -5340,7 +5498,7 @@ function DateTimePicker({
5340
5498
  ),
5341
5499
  children: [
5342
5500
  /* @__PURE__ */ jsx47(ClockIcon, { className: "text-primary flex-shrink-0 w-4 h-4 sm:w-5 sm:h-5" }),
5343
- /* @__PURE__ */ jsx47("span", { className: "text-foreground truncate", children: internalDate ? format(internalDate, getTimeFormat() || "HH:mm", {
5501
+ /* @__PURE__ */ jsx47("span", { className: "text-black truncate", children: internalDate ? format(internalDate, getTimeFormat() || "HH:mm", {
5344
5502
  locale: ptBR
5345
5503
  }) : "00:00" })
5346
5504
  ]
@@ -5389,6 +5547,7 @@ function DateTimePicker({
5389
5547
  }
5390
5548
 
5391
5549
  // src/components/selects/Select.tsx
5550
+ import { motion as motion10, AnimatePresence as AnimatePresence7 } from "framer-motion";
5392
5551
  import { Fragment as Fragment5, jsx as jsx48, jsxs as jsxs31 } from "react/jsx-runtime";
5393
5552
  function Select({
5394
5553
  items,
@@ -5399,53 +5558,77 @@ function Select({
5399
5558
  testIds = {}
5400
5559
  }) {
5401
5560
  return /* @__PURE__ */ jsxs31("div", { "data-testid": testIds.root ?? "select-root", children: [
5402
- /* @__PURE__ */ jsxs31(SelectBase, { onValueChange: onChange, "data-testid": testIds.base ?? "select-base", children: [
5403
- /* @__PURE__ */ jsx48(
5404
- SelectTriggerBase,
5405
- {
5406
- className: cn(
5407
- "flex h-12 w-full content-start text-lg shadow-md",
5408
- errorMessage && "border-red-500"
5409
- ),
5410
- "data-testid": testIds.trigger ?? "select-trigger",
5411
- children: /* @__PURE__ */ jsx48(
5412
- SelectValueBase,
5561
+ /* @__PURE__ */ jsxs31(
5562
+ SelectBase,
5563
+ {
5564
+ onValueChange: onChange,
5565
+ "data-testid": testIds.base ?? "select-base",
5566
+ children: [
5567
+ /* @__PURE__ */ jsx48(
5568
+ SelectTriggerBase,
5413
5569
  {
5414
- placeholder,
5415
- "data-testid": testIds.value ?? "select-value"
5570
+ className: cn(
5571
+ "flex h-9 w-full content-start text-lg shadow-md",
5572
+ errorMessage && "border-red-500"
5573
+ ),
5574
+ "data-testid": testIds.trigger ?? "select-trigger",
5575
+ children: /* @__PURE__ */ jsx48(
5576
+ SelectValueBase,
5577
+ {
5578
+ placeholder,
5579
+ "data-testid": testIds.value ?? "select-value"
5580
+ }
5581
+ )
5416
5582
  }
5417
- )
5418
- }
5419
- ),
5420
- /* @__PURE__ */ jsx48(ScrollAreaBase, { "data-testid": testIds.scrollarea ?? "select-scrollarea", children: /* @__PURE__ */ jsx48(SelectContentBase, { "data-testid": testIds.content ?? "select-content", children: groupItems ? /* @__PURE__ */ jsx48(Fragment5, { children: Object.keys(groupItems).map((key) => /* @__PURE__ */ jsxs31(SelectGroupBase, { "data-testid": testIds.group ?? "select-group", children: [
5421
- /* @__PURE__ */ jsx48(SelectLabelBase, { "data-testid": testIds.label ?? "select-label", children: key }),
5422
- groupItems[key].map((item) => /* @__PURE__ */ jsx48(
5423
- SelectItemBase,
5424
- {
5425
- value: item.value,
5426
- "data-testid": testIds.item?.(item.value) ?? `select-item-${item.value}`,
5427
- children: item.label
5428
- },
5429
- item.value
5430
- ))
5431
- ] }, key)) }) : /* @__PURE__ */ jsx48(SelectGroupBase, { "data-testid": testIds.group ?? "select-group", children: items.map((item) => /* @__PURE__ */ jsx48(
5432
- SelectItemBase,
5433
- {
5434
- value: item.value,
5435
- "data-testid": testIds.item?.(item.value) ?? `select-item-${item.value}`,
5436
- children: item.label
5437
- },
5438
- item.value
5439
- )) }) }) })
5440
- ] }),
5441
- errorMessage && /* @__PURE__ */ jsx48(
5442
- "p",
5583
+ ),
5584
+ /* @__PURE__ */ jsx48(ScrollAreaBase, { "data-testid": testIds.scrollarea ?? "select-scrollarea", children: /* @__PURE__ */ jsx48(SelectContentBase, { "data-testid": testIds.content ?? "select-content", children: groupItems ? /* @__PURE__ */ jsx48(Fragment5, { children: Object.keys(groupItems).map((key) => /* @__PURE__ */ jsxs31(
5585
+ SelectGroupBase,
5586
+ {
5587
+ "data-testid": testIds.group ?? "select-group",
5588
+ children: [
5589
+ /* @__PURE__ */ jsx48(
5590
+ SelectLabelBase,
5591
+ {
5592
+ "data-testid": testIds.label ?? "select-label",
5593
+ children: key
5594
+ }
5595
+ ),
5596
+ groupItems[key].map((item) => /* @__PURE__ */ jsx48(
5597
+ SelectItemBase,
5598
+ {
5599
+ value: item.value,
5600
+ "data-testid": testIds.item?.(item.value) ?? `select-item-${item.value}`,
5601
+ children: item.label
5602
+ },
5603
+ item.value
5604
+ ))
5605
+ ]
5606
+ },
5607
+ key
5608
+ )) }) : /* @__PURE__ */ jsx48(SelectGroupBase, { "data-testid": testIds.group ?? "select-group", children: items.map((item) => /* @__PURE__ */ jsx48(
5609
+ SelectItemBase,
5610
+ {
5611
+ value: item.value,
5612
+ "data-testid": testIds.item?.(item.value) ?? `select-item-${item.value}`,
5613
+ children: item.label
5614
+ },
5615
+ item.value
5616
+ )) }) }) })
5617
+ ]
5618
+ }
5619
+ ),
5620
+ /* @__PURE__ */ jsx48(AnimatePresence7, { children: errorMessage && /* @__PURE__ */ jsx48(
5621
+ motion10.p,
5443
5622
  {
5623
+ initial: { opacity: 0, y: -10 },
5624
+ animate: { opacity: 1, y: 0 },
5625
+ exit: { opacity: 0, y: -10 },
5626
+ transition: { duration: 0.2 },
5444
5627
  className: "text-sm text-red-500",
5445
5628
  "data-testid": testIds.error ?? "select-error",
5446
5629
  children: errorMessage
5447
5630
  }
5448
- )
5631
+ ) })
5449
5632
  ] });
5450
5633
  }
5451
5634
 
@@ -5619,7 +5802,7 @@ import { toast as toast2 } from "sonner";
5619
5802
 
5620
5803
  // src/components/charts/components/controls/PeriodsDropdown.tsx
5621
5804
  import { useState as useState10, useRef as useRef3, useEffect as useEffect9 } from "react";
5622
- import { motion as motion8, AnimatePresence as AnimatePresence6 } from "framer-motion";
5805
+ import { motion as motion11, AnimatePresence as AnimatePresence8 } from "framer-motion";
5623
5806
  import { DotsThreeIcon as DotsThreeIcon2 } from "@phosphor-icons/react/dist/ssr";
5624
5807
  import { Check } from "@phosphor-icons/react/dist/ssr";
5625
5808
  import { jsx as jsx49, jsxs as jsxs32 } from "react/jsx-runtime";
@@ -5694,8 +5877,8 @@ function PeriodsDropdown({
5694
5877
  ]
5695
5878
  }
5696
5879
  ),
5697
- /* @__PURE__ */ jsx49(AnimatePresence6, { children: open && /* @__PURE__ */ jsxs32(
5698
- motion8.div,
5880
+ /* @__PURE__ */ jsx49(AnimatePresence8, { children: open && /* @__PURE__ */ jsxs32(
5881
+ motion11.div,
5699
5882
  {
5700
5883
  initial: "hidden",
5701
5884
  animate: "visible",
@@ -5724,7 +5907,7 @@ function PeriodsDropdown({
5724
5907
  className: "flex flex-col p-2 gap-1",
5725
5908
  style: { maxHeight: 200, overflowY: "auto" },
5726
5909
  children: periods.map((p, idx) => /* @__PURE__ */ jsxs32(
5727
- motion8.button,
5910
+ motion11.button,
5728
5911
  {
5729
5912
  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"),
5730
5913
  variants: itemVariants,
@@ -5752,7 +5935,7 @@ function PeriodsDropdown({
5752
5935
  var PeriodsDropdown_default = PeriodsDropdown;
5753
5936
 
5754
5937
  // src/components/charts/components/controls/ShowOnly.tsx
5755
- import { motion as motion9 } from "framer-motion";
5938
+ import { motion as motion12 } from "framer-motion";
5756
5939
  import { Eye, EyeSlash } from "@phosphor-icons/react";
5757
5940
  import { Fragment as Fragment6, jsx as jsx50, jsxs as jsxs33 } from "react/jsx-runtime";
5758
5941
  var ShowOnly = ({
@@ -5763,7 +5946,7 @@ var ShowOnly = ({
5763
5946
  const hasHighlights = highlightedSeriesSize > 0;
5764
5947
  if (!hasHighlights) return null;
5765
5948
  return /* @__PURE__ */ jsx50("div", { className: "ml-auto flex items-center gap-2", children: /* @__PURE__ */ jsx50(
5766
- motion9.div,
5949
+ motion12.div,
5767
5950
  {
5768
5951
  whileTap: { scale: hasHighlights ? 0.985 : 1 },
5769
5952
  whileHover: { y: hasHighlights ? -2 : 0 },
@@ -5796,7 +5979,7 @@ var ShowOnly = ({
5796
5979
  var ShowOnly_default = ShowOnly;
5797
5980
 
5798
5981
  // src/components/charts/components/controls/Highlights.tsx
5799
- import { motion as motion10, AnimatePresence as AnimatePresence7 } from "framer-motion";
5982
+ import { motion as motion13, AnimatePresence as AnimatePresence9 } from "framer-motion";
5800
5983
  import { CheckIcon as CheckIcon7 } from "@phosphor-icons/react/dist/ssr";
5801
5984
  import { jsx as jsx51, jsxs as jsxs34 } from "react/jsx-runtime";
5802
5985
  var Highlights = ({
@@ -5817,13 +6000,13 @@ var Highlights = ({
5817
6000
  visible: { opacity: 1, transition: { staggerChildren: 0.03 } }
5818
6001
  };
5819
6002
  return /* @__PURE__ */ jsx51(
5820
- motion10.div,
6003
+ motion13.div,
5821
6004
  {
5822
6005
  className: "flex-1 flex items-center gap-2 flex-wrap",
5823
6006
  initial: "hidden",
5824
6007
  animate: "visible",
5825
6008
  variants: containerVariants,
5826
- children: /* @__PURE__ */ jsx51(AnimatePresence7, { initial: false, mode: "popLayout", children: allKeys.map((k) => {
6009
+ children: /* @__PURE__ */ jsx51(AnimatePresence9, { initial: false, mode: "popLayout", children: allKeys.map((k) => {
5827
6010
  const isHighlighted = highlightedSeries.has(k);
5828
6011
  const label = mapperConfig[k]?.label ?? k;
5829
6012
  const color = finalColors[k];
@@ -5833,7 +6016,7 @@ var Highlights = ({
5833
6016
  isHighlighted ? "bg-card/95 border-2 text-foreground shadow-[0_6px_18px_rgba(0,0,0,0.12)]" : "bg-muted/10 border-border text-muted-foreground hover:bg-muted/5"
5834
6017
  );
5835
6018
  return /* @__PURE__ */ jsx51(
5836
- motion10.div,
6019
+ motion13.div,
5837
6020
  {
5838
6021
  layout: true,
5839
6022
  initial: "hidden",
@@ -5850,7 +6033,7 @@ var Highlights = ({
5850
6033
  style: { minWidth: showFullLabel ? void 0 : 36 },
5851
6034
  "aria-pressed": isHighlighted,
5852
6035
  children: /* @__PURE__ */ jsxs34(
5853
- motion10.button,
6036
+ motion13.button,
5854
6037
  {
5855
6038
  whileHover: { scale: isHighlighted ? 1.04 : 1.03 },
5856
6039
  whileTap: { scale: 0.96 },
@@ -5858,7 +6041,7 @@ var Highlights = ({
5858
6041
  className: "flex items-center gap-2 min-w-0 pr-2",
5859
6042
  children: [
5860
6043
  /* @__PURE__ */ jsx51(
5861
- motion10.span,
6044
+ motion13.span,
5862
6045
  {
5863
6046
  className: cn("w-3 h-3 rounded-sm flex-shrink-0 border"),
5864
6047
  style: {
@@ -5872,8 +6055,8 @@ var Highlights = ({
5872
6055
  transition: { type: "spring", stiffness: 400, damping: 30 }
5873
6056
  }
5874
6057
  ),
5875
- showFullLabel ? /* @__PURE__ */ jsx51(motion10.span, { className: "truncate max-w-[10rem] pr-2", layout: true, children: label }) : showShortLabel ? /* @__PURE__ */ jsx51(
5876
- motion10.span,
6058
+ showFullLabel ? /* @__PURE__ */ jsx51(motion13.span, { className: "truncate max-w-[10rem] pr-2", layout: true, children: label }) : showShortLabel ? /* @__PURE__ */ jsx51(
6059
+ motion13.span,
5877
6060
  {
5878
6061
  className: "truncate max-w-[6rem] text-xs pr-2",
5879
6062
  layout: true,
@@ -5881,7 +6064,7 @@ var Highlights = ({
5881
6064
  }
5882
6065
  ) : null,
5883
6066
  /* @__PURE__ */ jsx51(
5884
- motion10.span,
6067
+ motion13.span,
5885
6068
  {
5886
6069
  "aria-hidden": true,
5887
6070
  initial: { opacity: 0, scale: 0.6 },
@@ -5997,7 +6180,7 @@ import React34, {
5997
6180
  useCallback as useCallback6,
5998
6181
  useMemo as useMemo5
5999
6182
  } from "react";
6000
- import { motion as motion11, AnimatePresence as AnimatePresence8 } from "framer-motion";
6183
+ import { motion as motion14, AnimatePresence as AnimatePresence10 } from "framer-motion";
6001
6184
  import { DotsSixVerticalIcon } from "@phosphor-icons/react";
6002
6185
  import { XIcon as XIcon6 } from "@phosphor-icons/react/dist/ssr";
6003
6186
  import { Fragment as Fragment7, jsx as jsx53, jsxs as jsxs36 } from "react/jsx-runtime";
@@ -6372,7 +6555,7 @@ var DraggableTooltipComponent = ({
6372
6555
  );
6373
6556
  return /* @__PURE__ */ jsxs36("div", { children: [
6374
6557
  /* @__PURE__ */ jsx53(
6375
- motion11.div,
6558
+ motion14.div,
6376
6559
  {
6377
6560
  className: "fixed pointer-events-none z-30",
6378
6561
  variants: guideVariants,
@@ -6394,7 +6577,7 @@ var DraggableTooltipComponent = ({
6394
6577
  }
6395
6578
  ),
6396
6579
  /* @__PURE__ */ jsx53(
6397
- motion11.div,
6580
+ motion14.div,
6398
6581
  {
6399
6582
  className: "fixed pointer-events-none z-31",
6400
6583
  variants: guideDotVariants,
@@ -6413,7 +6596,7 @@ var DraggableTooltipComponent = ({
6413
6596
  }
6414
6597
  ),
6415
6598
  /* @__PURE__ */ jsx53(
6416
- motion11.div,
6599
+ motion14.div,
6417
6600
  {
6418
6601
  className: "fixed pointer-events-none z-31",
6419
6602
  variants: guideDotVariants,
@@ -6433,8 +6616,8 @@ var DraggableTooltipComponent = ({
6433
6616
  )
6434
6617
  ] }, index);
6435
6618
  }),
6436
- /* @__PURE__ */ jsx53(AnimatePresence8, { children: /* @__PURE__ */ jsxs36(
6437
- motion11.div,
6619
+ /* @__PURE__ */ jsx53(AnimatePresence10, { children: /* @__PURE__ */ jsxs36(
6620
+ motion14.div,
6438
6621
  {
6439
6622
  className: "fixed bg-card border border-border rounded-lg shadow-lg z-50 min-w-80 select-none",
6440
6623
  variants: tooltipVariants,
@@ -8975,13 +9158,1401 @@ var useChartHighlights = () => {
8975
9158
  };
8976
9159
  };
8977
9160
 
9161
+ // src/components/ui/SmallButtons.tsx
9162
+ import * as React38 from "react";
9163
+ import {
9164
+ PencilSimpleIcon,
9165
+ FloppyDiskIcon,
9166
+ PlusIcon as PlusIcon2,
9167
+ XIcon as XIcon7,
9168
+ TrashIcon as TrashIcon3,
9169
+ DownloadSimpleIcon,
9170
+ UploadSimpleIcon,
9171
+ CopyIcon,
9172
+ ArrowClockwiseIcon,
9173
+ MagnifyingGlassIcon as MagnifyingGlassIcon2,
9174
+ ArrowLeftIcon as ArrowLeftIcon2,
9175
+ GearIcon,
9176
+ BellIcon,
9177
+ DotsThreeIcon as DotsThreeIcon3,
9178
+ CheckIcon as CheckIcon8,
9179
+ FunnelIcon,
9180
+ HeartIcon,
9181
+ StarIcon,
9182
+ EyeIcon,
9183
+ EyeSlashIcon,
9184
+ LockIcon,
9185
+ LockOpenIcon,
9186
+ ArrowsLeftRightIcon
9187
+ } from "@phosphor-icons/react";
9188
+ import { jsx as jsx61 } from "react/jsx-runtime";
9189
+ var EditButton = React38.forwardRef(
9190
+ ({
9191
+ disabled,
9192
+ onClick,
9193
+ testid = "button-edit",
9194
+ className,
9195
+ iconSize = 18,
9196
+ iconColor,
9197
+ variant = "default",
9198
+ size = "icon",
9199
+ ...props
9200
+ }, ref) => /* @__PURE__ */ jsx61(
9201
+ ButtonBase,
9202
+ {
9203
+ ref,
9204
+ variant,
9205
+ size,
9206
+ onClick,
9207
+ disabled,
9208
+ testid,
9209
+ className: cn(
9210
+ "transition-all duration-200 ease-in-out group",
9211
+ "hover:scale-105",
9212
+ "active:scale-95",
9213
+ "disabled:hover:scale-100",
9214
+ className
9215
+ ),
9216
+ ...props,
9217
+ children: /* @__PURE__ */ jsx61(
9218
+ PencilSimpleIcon,
9219
+ {
9220
+ size: iconSize,
9221
+ color: iconColor,
9222
+ className: "transition-transform duration-200 group-hover:-rotate-12"
9223
+ }
9224
+ )
9225
+ }
9226
+ )
9227
+ );
9228
+ EditButton.displayName = "EditButton";
9229
+ var ChangeButton = React38.forwardRef(
9230
+ ({
9231
+ disabled,
9232
+ onClick,
9233
+ testid = "button-edit",
9234
+ className,
9235
+ iconSize = 18,
9236
+ iconColor,
9237
+ variant = "default",
9238
+ size = "icon",
9239
+ ...props
9240
+ }, ref) => /* @__PURE__ */ jsx61(
9241
+ ButtonBase,
9242
+ {
9243
+ ref,
9244
+ variant,
9245
+ size,
9246
+ onClick,
9247
+ disabled,
9248
+ testid,
9249
+ className: cn(
9250
+ "transition-all duration-200 ease-in-out group",
9251
+ "hover:scale-105",
9252
+ "active:scale-95",
9253
+ "disabled:hover:scale-100",
9254
+ className
9255
+ ),
9256
+ ...props,
9257
+ children: /* @__PURE__ */ jsx61(
9258
+ ArrowsLeftRightIcon,
9259
+ {
9260
+ size: iconSize,
9261
+ color: iconColor,
9262
+ className: "transition-transform duration-200 group-hover:-rotate-180"
9263
+ }
9264
+ )
9265
+ }
9266
+ )
9267
+ );
9268
+ ChangeButton.displayName = "ChangeButton";
9269
+ var SaveButton = React38.forwardRef(
9270
+ ({
9271
+ disabled,
9272
+ onClick,
9273
+ testid = "button-save",
9274
+ className,
9275
+ iconSize = 18,
9276
+ iconColor,
9277
+ variant = "default",
9278
+ size = "icon",
9279
+ ...props
9280
+ }, ref) => /* @__PURE__ */ jsx61(
9281
+ ButtonBase,
9282
+ {
9283
+ ref,
9284
+ variant,
9285
+ size,
9286
+ onClick,
9287
+ disabled,
9288
+ testid,
9289
+ className: cn(
9290
+ "transition-all duration-200 ease-in-out group",
9291
+ "hover:scale-105",
9292
+ "active:scale-95",
9293
+ "disabled:hover:scale-100",
9294
+ className
9295
+ ),
9296
+ ...props,
9297
+ children: /* @__PURE__ */ jsx61(
9298
+ FloppyDiskIcon,
9299
+ {
9300
+ size: iconSize,
9301
+ color: iconColor,
9302
+ className: "transition-transform duration-200 group-hover:scale-110"
9303
+ }
9304
+ )
9305
+ }
9306
+ )
9307
+ );
9308
+ SaveButton.displayName = "SaveButton";
9309
+ var AddButton = React38.forwardRef(
9310
+ ({
9311
+ disabled,
9312
+ onClick,
9313
+ testid = "button-add",
9314
+ className,
9315
+ iconSize = 18,
9316
+ iconColor,
9317
+ variant = "default",
9318
+ size = "icon",
9319
+ ...props
9320
+ }, ref) => /* @__PURE__ */ jsx61(
9321
+ ButtonBase,
9322
+ {
9323
+ ref,
9324
+ variant,
9325
+ size,
9326
+ onClick,
9327
+ disabled,
9328
+ testid,
9329
+ className: cn(
9330
+ "transition-all duration-200 ease-in-out",
9331
+ "hover:scale-105",
9332
+ "active:scale-95",
9333
+ "disabled:hover:scale-100",
9334
+ className
9335
+ ),
9336
+ ...props,
9337
+ children: /* @__PURE__ */ jsx61(
9338
+ PlusIcon2,
9339
+ {
9340
+ size: iconSize,
9341
+ color: iconColor,
9342
+ className: "transition-transform duration-300"
9343
+ }
9344
+ )
9345
+ }
9346
+ )
9347
+ );
9348
+ AddButton.displayName = "AddButton";
9349
+ var CloseButton = React38.forwardRef(
9350
+ ({
9351
+ disabled,
9352
+ onClick,
9353
+ testid = "button-close",
9354
+ className,
9355
+ iconSize = 18,
9356
+ iconColor,
9357
+ variant = "ghost",
9358
+ size = "icon",
9359
+ ...props
9360
+ }, ref) => /* @__PURE__ */ jsx61(
9361
+ ButtonBase,
9362
+ {
9363
+ ref,
9364
+ variant,
9365
+ size,
9366
+ onClick,
9367
+ disabled,
9368
+ testid,
9369
+ className: cn(
9370
+ "transition-all duration-200 ease-in-out",
9371
+ "hover:scale-110 hover:rotate-90 hover:bg-destructive/10",
9372
+ "active:scale-95 active:rotate-0",
9373
+ "disabled:hover:scale-100 disabled:hover:rotate-0",
9374
+ className
9375
+ ),
9376
+ ...props,
9377
+ children: /* @__PURE__ */ jsx61(
9378
+ XIcon7,
9379
+ {
9380
+ size: iconSize,
9381
+ color: iconColor,
9382
+ className: "transition-transform duration-300"
9383
+ }
9384
+ )
9385
+ }
9386
+ )
9387
+ );
9388
+ CloseButton.displayName = "CloseButton";
9389
+ var DeleteButton = React38.forwardRef(
9390
+ ({
9391
+ disabled,
9392
+ onClick,
9393
+ testid = "button-delete",
9394
+ className,
9395
+ iconSize = 18,
9396
+ iconColor,
9397
+ variant = "destructive",
9398
+ size = "icon",
9399
+ destructiveTitle,
9400
+ destructiveDescription,
9401
+ destructiveOnConfirm,
9402
+ destructiveOnCancel,
9403
+ destructiveTriggerContent,
9404
+ ...props
9405
+ }, ref) => {
9406
+ const effectiveDestructiveTitle = destructiveTitle ?? props.title;
9407
+ const trigger = /* @__PURE__ */ jsx61(
9408
+ ButtonBase,
9409
+ {
9410
+ ref,
9411
+ variant,
9412
+ size,
9413
+ onClick,
9414
+ disabled,
9415
+ testid,
9416
+ className: cn(
9417
+ "transition-all duration-200 ease-in-out group",
9418
+ "hover:scale-105",
9419
+ "active:scale-95",
9420
+ "disabled:hover:scale-100",
9421
+ className
9422
+ ),
9423
+ ...props,
9424
+ children: /* @__PURE__ */ jsx61(
9425
+ TrashIcon3,
9426
+ {
9427
+ size: iconSize,
9428
+ color: iconColor,
9429
+ className: "transition-transform duration-200 group-hover:scale-110"
9430
+ }
9431
+ )
9432
+ }
9433
+ );
9434
+ if (effectiveDestructiveTitle) {
9435
+ return /* @__PURE__ */ jsx61(
9436
+ DestructiveDialog,
9437
+ {
9438
+ title: effectiveDestructiveTitle,
9439
+ description: destructiveDescription ?? "Essa a\xE7\xE3o \xE9 irrevers\xEDvel.",
9440
+ onConfirm: destructiveOnConfirm ?? (() => {
9441
+ }),
9442
+ onCancel: destructiveOnCancel,
9443
+ triggerContent: destructiveTriggerContent,
9444
+ children: trigger
9445
+ }
9446
+ );
9447
+ }
9448
+ return trigger;
9449
+ }
9450
+ );
9451
+ DeleteButton.displayName = "DeleteButton";
9452
+ var DownloadButton = ({
9453
+ disabled,
9454
+ onClick,
9455
+ testid = "button-download",
9456
+ ...props
9457
+ }) => /* @__PURE__ */ jsx61(
9458
+ ButtonBase,
9459
+ {
9460
+ variant: "outline",
9461
+ size: "icon",
9462
+ onClick,
9463
+ disabled,
9464
+ testid,
9465
+ className: cn(
9466
+ "transition-all duration-200 ease-in-out group",
9467
+ "hover:scale-105",
9468
+ "active:scale-95",
9469
+ "disabled:hover:scale-100"
9470
+ ),
9471
+ ...props,
9472
+ children: /* @__PURE__ */ jsx61(
9473
+ DownloadSimpleIcon,
9474
+ {
9475
+ size: 18,
9476
+ className: "transition-transform duration-300 group-hover:translate-y-0.5"
9477
+ }
9478
+ )
9479
+ }
9480
+ );
9481
+ var UploadButton = ({
9482
+ disabled,
9483
+ onClick,
9484
+ testid = "button-upload",
9485
+ ...props
9486
+ }) => /* @__PURE__ */ jsx61(
9487
+ ButtonBase,
9488
+ {
9489
+ variant: "outline",
9490
+ size: "icon",
9491
+ onClick,
9492
+ disabled,
9493
+ testid,
9494
+ className: cn(
9495
+ "transition-all duration-200 ease-in-out group",
9496
+ "hover:scale-105",
9497
+ "active:scale-95",
9498
+ "disabled:hover:scale-100"
9499
+ ),
9500
+ ...props,
9501
+ children: /* @__PURE__ */ jsx61(
9502
+ UploadSimpleIcon,
9503
+ {
9504
+ size: 18,
9505
+ className: "transition-transform duration-300 group-hover:-translate-y-0.5"
9506
+ }
9507
+ )
9508
+ }
9509
+ );
9510
+ var CopyButton = ({
9511
+ disabled,
9512
+ onClick,
9513
+ testid = "button-copy",
9514
+ ...props
9515
+ }) => /* @__PURE__ */ jsx61(
9516
+ ButtonBase,
9517
+ {
9518
+ variant: "ghost",
9519
+ size: "icon",
9520
+ onClick,
9521
+ disabled,
9522
+ testid,
9523
+ className: cn(
9524
+ "transition-all duration-200 ease-in-out group",
9525
+ "hover:scale-105",
9526
+ "active:scale-90",
9527
+ "disabled:hover:scale-100"
9528
+ ),
9529
+ ...props,
9530
+ children: /* @__PURE__ */ jsx61(
9531
+ CopyIcon,
9532
+ {
9533
+ size: 18,
9534
+ className: "transition-transform duration-200 group-hover:scale-110"
9535
+ }
9536
+ )
9537
+ }
9538
+ );
9539
+ var RefreshButton = ({
9540
+ disabled,
9541
+ onClick,
9542
+ testid = "button-refresh",
9543
+ ...props
9544
+ }) => /* @__PURE__ */ jsx61(
9545
+ ButtonBase,
9546
+ {
9547
+ variant: "ghost",
9548
+ size: "icon",
9549
+ onClick,
9550
+ disabled,
9551
+ testid,
9552
+ className: cn(
9553
+ "transition-all duration-200 ease-in-out group",
9554
+ "hover:scale-105",
9555
+ "active:scale-95",
9556
+ "disabled:hover:scale-100"
9557
+ ),
9558
+ ...props,
9559
+ children: /* @__PURE__ */ jsx61(
9560
+ ArrowClockwiseIcon,
9561
+ {
9562
+ size: 18,
9563
+ className: "transition-transform duration-500 group-hover:rotate-180"
9564
+ }
9565
+ )
9566
+ }
9567
+ );
9568
+ var SearchButton = ({
9569
+ disabled,
9570
+ onClick,
9571
+ testid = "button-search",
9572
+ ...props
9573
+ }) => /* @__PURE__ */ jsx61(
9574
+ ButtonBase,
9575
+ {
9576
+ variant: "outline",
9577
+ size: "icon",
9578
+ onClick,
9579
+ disabled,
9580
+ testid,
9581
+ className: cn(
9582
+ "transition-all duration-200 ease-in-out group",
9583
+ "hover:scale-105",
9584
+ "active:scale-95",
9585
+ "disabled:hover:scale-100"
9586
+ ),
9587
+ ...props,
9588
+ children: /* @__PURE__ */ jsx61(
9589
+ MagnifyingGlassIcon2,
9590
+ {
9591
+ size: 18,
9592
+ className: "transition-transform duration-200 group-hover:scale-110 group-hover:-rotate-12"
9593
+ }
9594
+ )
9595
+ }
9596
+ );
9597
+ var BackButton = ({
9598
+ disabled,
9599
+ onClick,
9600
+ testid = "button-back",
9601
+ ...props
9602
+ }) => /* @__PURE__ */ jsx61(
9603
+ ButtonBase,
9604
+ {
9605
+ variant: "ghost",
9606
+ size: "icon",
9607
+ onClick,
9608
+ disabled,
9609
+ testid,
9610
+ className: cn(
9611
+ "transition-all duration-200 ease-in-out group",
9612
+ "hover:scale-105",
9613
+ "active:scale-95",
9614
+ "disabled:hover:scale-100"
9615
+ ),
9616
+ ...props,
9617
+ children: /* @__PURE__ */ jsx61(
9618
+ ArrowLeftIcon2,
9619
+ {
9620
+ size: 18,
9621
+ className: "transition-transform duration-300 group-hover:-translate-x-1"
9622
+ }
9623
+ )
9624
+ }
9625
+ );
9626
+ var SettingsButton = ({
9627
+ disabled,
9628
+ onClick,
9629
+ testid = "button-settings",
9630
+ ...props
9631
+ }) => /* @__PURE__ */ jsx61(
9632
+ ButtonBase,
9633
+ {
9634
+ variant: "ghost",
9635
+ size: "icon",
9636
+ onClick,
9637
+ disabled,
9638
+ testid,
9639
+ className: cn(
9640
+ "transition-all duration-200 ease-in-out group",
9641
+ "hover:scale-105",
9642
+ "active:scale-95",
9643
+ "disabled:hover:scale-100"
9644
+ ),
9645
+ ...props,
9646
+ children: /* @__PURE__ */ jsx61(
9647
+ GearIcon,
9648
+ {
9649
+ size: 18,
9650
+ className: "transition-transform duration-500 group-hover:rotate-90"
9651
+ }
9652
+ )
9653
+ }
9654
+ );
9655
+ var NotificationButton = ({
9656
+ disabled,
9657
+ onClick,
9658
+ testid = "button-notification",
9659
+ ...props
9660
+ }) => /* @__PURE__ */ jsx61(
9661
+ ButtonBase,
9662
+ {
9663
+ variant: "ghost",
9664
+ size: "icon",
9665
+ onClick,
9666
+ disabled,
9667
+ testid,
9668
+ className: cn(
9669
+ "transition-all duration-200 ease-in-out group",
9670
+ "hover:scale-105",
9671
+ "active:scale-95",
9672
+ "disabled:hover:scale-100"
9673
+ ),
9674
+ ...props,
9675
+ children: /* @__PURE__ */ jsx61(
9676
+ BellIcon,
9677
+ {
9678
+ size: 18,
9679
+ className: "transition-transform duration-300 group-hover:scale-110 group-hover:-rotate-12"
9680
+ }
9681
+ )
9682
+ }
9683
+ );
9684
+ var MoreButton = ({
9685
+ disabled,
9686
+ onClick,
9687
+ testid = "button-more",
9688
+ ...props
9689
+ }) => /* @__PURE__ */ jsx61(
9690
+ ButtonBase,
9691
+ {
9692
+ variant: "ghost",
9693
+ size: "icon",
9694
+ onClick,
9695
+ disabled,
9696
+ testid,
9697
+ className: cn(
9698
+ "transition-all duration-200 ease-in-out group",
9699
+ "hover:scale-105",
9700
+ "active:scale-95",
9701
+ "disabled:hover:scale-100"
9702
+ ),
9703
+ ...props,
9704
+ children: /* @__PURE__ */ jsx61(
9705
+ DotsThreeIcon3,
9706
+ {
9707
+ size: 18,
9708
+ className: "transition-transform duration-200 group-hover:scale-110"
9709
+ }
9710
+ )
9711
+ }
9712
+ );
9713
+ var CheckButton = ({
9714
+ disabled,
9715
+ onClick,
9716
+ testid = "button-check",
9717
+ ...props
9718
+ }) => /* @__PURE__ */ jsx61(
9719
+ ButtonBase,
9720
+ {
9721
+ variant: "default",
9722
+ size: "icon",
9723
+ onClick,
9724
+ disabled,
9725
+ testid,
9726
+ className: cn(
9727
+ "transition-all duration-200 ease-in-out group",
9728
+ "hover:scale-110",
9729
+ "active:scale-95",
9730
+ "disabled:hover:scale-100"
9731
+ ),
9732
+ ...props,
9733
+ children: /* @__PURE__ */ jsx61(
9734
+ CheckIcon8,
9735
+ {
9736
+ size: 18,
9737
+ className: "transition-transform duration-200 group-hover:scale-110"
9738
+ }
9739
+ )
9740
+ }
9741
+ );
9742
+ var FilterButton = ({
9743
+ disabled,
9744
+ onClick,
9745
+ testid = "button-filter",
9746
+ active = false,
9747
+ className,
9748
+ iconSize = 18,
9749
+ iconColor,
9750
+ variant,
9751
+ size = "icon",
9752
+ ...props
9753
+ }) => /* @__PURE__ */ jsx61(
9754
+ ButtonBase,
9755
+ {
9756
+ variant: variant || (active ? "default" : "outline"),
9757
+ size,
9758
+ onClick,
9759
+ disabled,
9760
+ testid,
9761
+ className: cn(
9762
+ "transition-all duration-200 ease-in-out",
9763
+ "hover:scale-105",
9764
+ "active:scale-95",
9765
+ "disabled:hover:scale-100",
9766
+ className
9767
+ ),
9768
+ ...props,
9769
+ children: /* @__PURE__ */ jsx61(
9770
+ FunnelIcon,
9771
+ {
9772
+ size: iconSize,
9773
+ color: iconColor,
9774
+ weight: active ? "fill" : "regular",
9775
+ className: "transition-all duration-200"
9776
+ }
9777
+ )
9778
+ }
9779
+ );
9780
+ var LikeButton = ({
9781
+ disabled,
9782
+ onClick,
9783
+ testid = "button-like",
9784
+ isLiked = false,
9785
+ className,
9786
+ iconSize = 18,
9787
+ iconColor,
9788
+ variant = "ghost",
9789
+ size = "icon",
9790
+ ...props
9791
+ }) => /* @__PURE__ */ jsx61(
9792
+ ButtonBase,
9793
+ {
9794
+ variant,
9795
+ size,
9796
+ onClick,
9797
+ disabled,
9798
+ testid,
9799
+ className: cn(
9800
+ "transition-all duration-200 ease-in-out group",
9801
+ "hover:scale-110",
9802
+ "active:scale-95",
9803
+ "disabled:hover:scale-100",
9804
+ !iconColor && (isLiked ? "text-red-500 dark:text-red-400 hover:text-red-600 dark:hover:text-red-300" : "hover:text-red-500 dark:hover:text-red-400"),
9805
+ className
9806
+ ),
9807
+ ...props,
9808
+ children: /* @__PURE__ */ jsx61(
9809
+ HeartIcon,
9810
+ {
9811
+ size: iconSize,
9812
+ color: iconColor,
9813
+ weight: isLiked ? "fill" : "regular",
9814
+ className: "transition-all duration-300 group-hover:scale-110"
9815
+ }
9816
+ )
9817
+ }
9818
+ );
9819
+ var FavoriteButton = ({
9820
+ disabled,
9821
+ onClick,
9822
+ testid = "button-favorite",
9823
+ isFavorite = false,
9824
+ className,
9825
+ iconSize = 18,
9826
+ iconColor,
9827
+ variant = "ghost",
9828
+ size = "icon",
9829
+ ...props
9830
+ }) => /* @__PURE__ */ jsx61(
9831
+ ButtonBase,
9832
+ {
9833
+ variant,
9834
+ size,
9835
+ onClick,
9836
+ disabled,
9837
+ testid,
9838
+ className: cn(
9839
+ "transition-all duration-200 ease-in-out group",
9840
+ "hover:scale-110",
9841
+ "active:scale-95",
9842
+ "disabled:hover:scale-100",
9843
+ !iconColor && (isFavorite ? "text-yellow-500 dark:text-yellow-400 hover:text-yellow-600 dark:hover:text-yellow-300" : "hover:text-yellow-500 dark:hover:text-yellow-400"),
9844
+ className
9845
+ ),
9846
+ ...props,
9847
+ children: /* @__PURE__ */ jsx61(
9848
+ StarIcon,
9849
+ {
9850
+ size: iconSize,
9851
+ color: iconColor,
9852
+ weight: isFavorite ? "fill" : "regular",
9853
+ className: "transition-all duration-300 group-hover:rotate-12"
9854
+ }
9855
+ )
9856
+ }
9857
+ );
9858
+ var VisibilityButton = ({
9859
+ disabled,
9860
+ onClick,
9861
+ testid = "button-visibility",
9862
+ isVisible = true,
9863
+ className,
9864
+ iconSize = 18,
9865
+ iconColor,
9866
+ variant = "ghost",
9867
+ size = "icon",
9868
+ ...props
9869
+ }) => /* @__PURE__ */ jsx61(
9870
+ ButtonBase,
9871
+ {
9872
+ variant,
9873
+ size,
9874
+ onClick,
9875
+ disabled,
9876
+ testid,
9877
+ className: cn(
9878
+ "transition-all duration-200 ease-in-out",
9879
+ "hover:scale-105",
9880
+ "active:scale-95",
9881
+ "disabled:hover:scale-100",
9882
+ className
9883
+ ),
9884
+ ...props,
9885
+ children: isVisible ? /* @__PURE__ */ jsx61(
9886
+ EyeIcon,
9887
+ {
9888
+ size: iconSize,
9889
+ color: iconColor,
9890
+ className: "transition-opacity duration-200"
9891
+ }
9892
+ ) : /* @__PURE__ */ jsx61(
9893
+ EyeSlashIcon,
9894
+ {
9895
+ size: iconSize,
9896
+ color: iconColor,
9897
+ className: "transition-opacity duration-200"
9898
+ }
9899
+ )
9900
+ }
9901
+ );
9902
+ var ViewButton = (props) => /* @__PURE__ */ jsx61(VisibilityButton, { isVisible: true, testid: "button-view", ...props });
9903
+ var HideButton = (props) => /* @__PURE__ */ jsx61(VisibilityButton, { isVisible: false, testid: "button-hide", ...props });
9904
+ var LockButton = ({
9905
+ disabled,
9906
+ onClick,
9907
+ testid = "button-lock",
9908
+ isLocked = true,
9909
+ className,
9910
+ iconSize = 18,
9911
+ iconColor,
9912
+ variant = "ghost",
9913
+ size = "icon",
9914
+ ...props
9915
+ }) => /* @__PURE__ */ jsx61(
9916
+ ButtonBase,
9917
+ {
9918
+ variant,
9919
+ size,
9920
+ onClick,
9921
+ disabled,
9922
+ testid,
9923
+ className: cn(
9924
+ "transition-all duration-200 ease-in-out group",
9925
+ "hover:scale-105",
9926
+ "active:scale-95",
9927
+ "disabled:hover:scale-100",
9928
+ !iconColor && (isLocked ? "text-red-500 dark:text-red-400 hover:text-red-600 dark:hover:text-red-300" : "text-emerald-500 dark:text-emerald-400 hover:text-emerald-600 dark:hover:text-emerald-300"),
9929
+ className
9930
+ ),
9931
+ ...props,
9932
+ children: isLocked ? /* @__PURE__ */ jsx61(
9933
+ LockIcon,
9934
+ {
9935
+ size: iconSize,
9936
+ color: iconColor,
9937
+ className: "transition-all duration-200 group-hover:scale-110"
9938
+ }
9939
+ ) : /* @__PURE__ */ jsx61(
9940
+ LockOpenIcon,
9941
+ {
9942
+ size: iconSize,
9943
+ color: iconColor,
9944
+ className: "transition-all duration-200 group-hover:scale-110"
9945
+ }
9946
+ )
9947
+ }
9948
+ );
9949
+ var UnlockButton = (props) => /* @__PURE__ */ jsx61(LockButton, { isLocked: false, testid: "button-unlock", ...props });
9950
+
9951
+ // src/components/ui/DebounceInput.tsx
9952
+ import { useEffect as useEffect14, useState as useState16 } from "react";
9953
+ import { CircleNotchIcon } from "@phosphor-icons/react";
9954
+ import { jsx as jsx62 } from "react/jsx-runtime";
9955
+
9956
+ // src/components/ui/FileUploader.tsx
9957
+ import * as React39 from "react";
9958
+ import { motion as motion15, AnimatePresence as AnimatePresence11 } from "framer-motion";
9959
+ import {
9960
+ CloudArrowUpIcon,
9961
+ CheckIcon as CheckIcon9,
9962
+ XIcon as XIcon8,
9963
+ FileTextIcon,
9964
+ FilePdfIcon,
9965
+ FileImageIcon,
9966
+ FileVideoIcon,
9967
+ FileAudioIcon,
9968
+ FileZipIcon,
9969
+ FileIcon,
9970
+ FileCsvIcon,
9971
+ FileXlsIcon,
9972
+ FilePptIcon,
9973
+ FileDocIcon
9974
+ } from "@phosphor-icons/react";
9975
+ import { Fragment as Fragment8, jsx as jsx63, jsxs as jsxs44 } from "react/jsx-runtime";
9976
+ var formatFileSize = (bytes) => {
9977
+ if (bytes === 0) return "0 Bytes";
9978
+ const k = 1024;
9979
+ const sizes = ["Bytes", "KB", "MB", "GB"];
9980
+ const i = Math.floor(Math.log(bytes) / Math.log(k));
9981
+ return Math.round(bytes / Math.pow(k, i) * 100) / 100 + " " + sizes[i];
9982
+ };
9983
+ var getFileExtension = (filename) => {
9984
+ return filename.slice((filename.lastIndexOf(".") - 1 >>> 0) + 2);
9985
+ };
9986
+ var getFileTypeIcon = (file) => {
9987
+ const extension = getFileExtension(file.name).toLowerCase();
9988
+ const mimeType = file.type.toLowerCase();
9989
+ if (extension === "pdf" || mimeType === "application/pdf") {
9990
+ return /* @__PURE__ */ jsx63(FilePdfIcon, { size: 20, className: "text-red-500" });
9991
+ }
9992
+ if (["doc", "docx"].includes(extension) || mimeType.includes("word")) {
9993
+ return /* @__PURE__ */ jsx63(FileDocIcon, { size: 20, className: "text-blue-500" });
9994
+ }
9995
+ if (["xls", "xlsx"].includes(extension) || mimeType.includes("sheet")) {
9996
+ return /* @__PURE__ */ jsx63(FileXlsIcon, { size: 20, className: "text-green-500" });
9997
+ }
9998
+ if (["ppt", "pptx"].includes(extension) || mimeType.includes("presentation")) {
9999
+ return /* @__PURE__ */ jsx63(FilePptIcon, { size: 20, className: "text-orange-500" });
10000
+ }
10001
+ if (extension === "csv" || mimeType === "text/csv") {
10002
+ return /* @__PURE__ */ jsx63(FileCsvIcon, { size: 20, className: "text-green-600" });
10003
+ }
10004
+ if (["txt", "md", "json", "xml", "js", "ts", "html", "css"].includes(
10005
+ extension
10006
+ ) || mimeType.includes("text")) {
10007
+ return /* @__PURE__ */ jsx63(FileTextIcon, { size: 20, className: "text-gray-500" });
10008
+ }
10009
+ if (mimeType.startsWith("image/")) {
10010
+ return /* @__PURE__ */ jsx63(FileImageIcon, { size: 20, className: "text-purple-500" });
10011
+ }
10012
+ if (mimeType.startsWith("video/")) {
10013
+ return /* @__PURE__ */ jsx63(FileVideoIcon, { size: 20, className: "text-pink-500" });
10014
+ }
10015
+ if (mimeType.startsWith("audio/")) {
10016
+ return /* @__PURE__ */ jsx63(FileAudioIcon, { size: 20, className: "text-indigo-500" });
10017
+ }
10018
+ if (["zip", "rar", "7z", "tar", "gz"].includes(extension)) {
10019
+ return /* @__PURE__ */ jsx63(FileZipIcon, { size: 20, className: "text-yellow-600" });
10020
+ }
10021
+ return /* @__PURE__ */ jsx63(FileIcon, { size: 20, className: "text-muted-foreground" });
10022
+ };
10023
+ var createImagePreview = (file) => {
10024
+ return new Promise((resolve) => {
10025
+ if (!file.type.startsWith("image/")) {
10026
+ resolve(null);
10027
+ return;
10028
+ }
10029
+ const reader = new FileReader();
10030
+ reader.onload = (e) => {
10031
+ resolve(e.target?.result);
10032
+ };
10033
+ reader.onerror = () => {
10034
+ resolve(null);
10035
+ };
10036
+ reader.readAsDataURL(file);
10037
+ });
10038
+ };
10039
+ var FileUploader = React39.forwardRef(
10040
+ ({
10041
+ className,
10042
+ accept,
10043
+ maxSize,
10044
+ maxFiles = 1,
10045
+ disabled = false,
10046
+ value = [],
10047
+ onValueChange,
10048
+ onUpload,
10049
+ showPreview = true,
10050
+ dropzoneText = "Arraste arquivos aqui ou clique para selecionar",
10051
+ dropzoneSubtext,
10052
+ animate = true,
10053
+ ...props
10054
+ }, ref) => {
10055
+ const [isDragging, setIsDragging] = React39.useState(false);
10056
+ const [files, setFiles] = React39.useState(value);
10057
+ const inputRef = React39.useRef(null);
10058
+ const dragCounterRef = React39.useRef(0);
10059
+ const multiple = maxFiles > 1;
10060
+ React39.useEffect(() => {
10061
+ setFiles(value);
10062
+ }, [value]);
10063
+ React39.useEffect(() => {
10064
+ return () => {
10065
+ files.forEach((file) => {
10066
+ if (file.preview) {
10067
+ URL.revokeObjectURL(file.preview);
10068
+ }
10069
+ });
10070
+ };
10071
+ }, [files]);
10072
+ const validateFile = (file) => {
10073
+ if (file.size > maxSize) {
10074
+ return `Arquivo muito grande. M\xE1ximo: ${formatFileSize(maxSize)}`;
10075
+ }
10076
+ if (accept.length > 0) {
10077
+ const fileExtension = `.${getFileExtension(file.name)}`;
10078
+ const fileType = file.type;
10079
+ const isAccepted = accept.some((acceptItem) => {
10080
+ if (acceptItem.startsWith(".")) {
10081
+ return fileExtension.toLowerCase() === acceptItem.toLowerCase();
10082
+ }
10083
+ if (acceptItem.endsWith("/*")) {
10084
+ return fileType.startsWith(acceptItem.replace("/*", ""));
10085
+ }
10086
+ return fileType === acceptItem;
10087
+ });
10088
+ if (!isAccepted) {
10089
+ return `Tipo de arquivo n\xE3o permitido. Aceitos: ${accept.join(", ")}`;
10090
+ }
10091
+ }
10092
+ return null;
10093
+ };
10094
+ const createFileWithPreview = async (file) => {
10095
+ const fileWithPreview = file;
10096
+ fileWithPreview.id = `${file.name}-${Date.now()}-${Math.random()}`;
10097
+ const error = validateFile(file);
10098
+ if (error) {
10099
+ fileWithPreview.error = error;
10100
+ }
10101
+ if (file.type.startsWith("image/")) {
10102
+ try {
10103
+ const preview = await createImagePreview(file);
10104
+ if (preview) {
10105
+ fileWithPreview.preview = preview;
10106
+ }
10107
+ } catch (error2) {
10108
+ console.warn("Erro ao criar preview da imagem:", error2);
10109
+ }
10110
+ }
10111
+ return fileWithPreview;
10112
+ };
10113
+ const handleFiles = async (newFiles) => {
10114
+ if (disabled) return;
10115
+ const availableSlots = maxFiles - files.length;
10116
+ const filesToAdd = multiple ? newFiles.slice(0, availableSlots) : [newFiles[0]];
10117
+ const filesWithPreview = await Promise.all(
10118
+ filesToAdd.map((file) => createFileWithPreview(file))
10119
+ );
10120
+ const updatedFiles = multiple ? [...files, ...filesWithPreview] : filesWithPreview;
10121
+ setFiles(updatedFiles);
10122
+ onValueChange(updatedFiles);
10123
+ if (onUpload) {
10124
+ const validFiles = filesWithPreview.filter((f) => !f.error);
10125
+ if (validFiles.length > 0) {
10126
+ try {
10127
+ await onUpload(validFiles);
10128
+ } catch (error) {
10129
+ console.error("Erro no upload:", error);
10130
+ }
10131
+ }
10132
+ }
10133
+ };
10134
+ const handleDragEnter = (e) => {
10135
+ e.preventDefault();
10136
+ e.stopPropagation();
10137
+ dragCounterRef.current++;
10138
+ if (e.dataTransfer.items && e.dataTransfer.items.length > 0) {
10139
+ setIsDragging(true);
10140
+ }
10141
+ };
10142
+ const handleDragLeave = (e) => {
10143
+ e.preventDefault();
10144
+ e.stopPropagation();
10145
+ dragCounterRef.current--;
10146
+ if (dragCounterRef.current === 0) {
10147
+ setIsDragging(false);
10148
+ }
10149
+ };
10150
+ const handleDragOver = (e) => {
10151
+ e.preventDefault();
10152
+ e.stopPropagation();
10153
+ };
10154
+ const handleDrop = (e) => {
10155
+ e.preventDefault();
10156
+ e.stopPropagation();
10157
+ setIsDragging(false);
10158
+ dragCounterRef.current = 0;
10159
+ if (disabled) return;
10160
+ const droppedFiles = Array.from(e.dataTransfer.files);
10161
+ handleFiles(droppedFiles);
10162
+ };
10163
+ const handleInputChange = (e) => {
10164
+ if (e.target.files) {
10165
+ const selectedFiles = Array.from(e.target.files);
10166
+ handleFiles(selectedFiles);
10167
+ }
10168
+ };
10169
+ const handleRemoveFile = (fileId) => {
10170
+ const fileToRemove = files.find((f) => f.id === fileId);
10171
+ if (fileToRemove?.preview) {
10172
+ URL.revokeObjectURL(fileToRemove.preview);
10173
+ }
10174
+ const updatedFiles = files.filter((f) => f.id !== fileId);
10175
+ setFiles(updatedFiles);
10176
+ onValueChange(updatedFiles);
10177
+ };
10178
+ const handleClick = () => {
10179
+ if (!disabled) {
10180
+ inputRef.current?.click();
10181
+ }
10182
+ };
10183
+ const acceptString = accept.join(",");
10184
+ const defaultSubtext = dropzoneSubtext || `Formatos: ${accept.join(", ")}. M\xE1ximo: ${formatFileSize(maxSize)}`;
10185
+ return /* @__PURE__ */ jsx63("div", { ref, className: cn("w-full", className), ...props, children: /* @__PURE__ */ jsxs44(
10186
+ motion15.div,
10187
+ {
10188
+ className: cn(
10189
+ "relative flex cursor-pointer flex-col items-center justify-center rounded-xl border-2 border-dashed p-10 transition-all duration-300 dark:shadow-black/20",
10190
+ isDragging && "border-primary bg-primary/10 scale-[1.02]",
10191
+ !isDragging && "border-border hover:border-primary/60 hover:bg-muted/50",
10192
+ disabled && "cursor-not-allowed opacity-50 hover:scale-100"
10193
+ ),
10194
+ onDragEnter: handleDragEnter,
10195
+ onDragOver: handleDragOver,
10196
+ onDragLeave: handleDragLeave,
10197
+ onDrop: handleDrop,
10198
+ onClick: handleClick,
10199
+ whileHover: !disabled ? { scale: 1.01 } : void 0,
10200
+ whileTap: !disabled ? { scale: 0.99 } : void 0,
10201
+ animate: isDragging ? {
10202
+ borderColor: `hsl(var(--primary))`,
10203
+ backgroundColor: `hsl(var(--primary) / 0.1)`,
10204
+ scale: 1.02
10205
+ } : {
10206
+ borderColor: `hsl(var(--border))`,
10207
+ backgroundColor: `hsl(var(--background))`,
10208
+ scale: 1
10209
+ },
10210
+ transition: {
10211
+ type: "spring",
10212
+ stiffness: 300,
10213
+ damping: 25,
10214
+ duration: 0.3
10215
+ },
10216
+ children: [
10217
+ /* @__PURE__ */ jsx63(
10218
+ "input",
10219
+ {
10220
+ ref: inputRef,
10221
+ type: "file",
10222
+ className: "hidden",
10223
+ accept: acceptString,
10224
+ multiple,
10225
+ disabled,
10226
+ onChange: handleInputChange
10227
+ }
10228
+ ),
10229
+ /* @__PURE__ */ jsx63(
10230
+ motion15.div,
10231
+ {
10232
+ animate: isDragging ? { scale: 1.2, rotate: 10 } : { scale: 1, rotate: 0 },
10233
+ transition: {
10234
+ type: "spring",
10235
+ stiffness: 300,
10236
+ damping: 20,
10237
+ duration: 0.3
10238
+ },
10239
+ children: /* @__PURE__ */ jsx63(
10240
+ motion15.div,
10241
+ {
10242
+ className: cn(
10243
+ "mb-4 h-16 w-16 text-muted-foreground transition-colors duration-300 drop-shadow-lg flex items-center justify-center",
10244
+ isDragging && "text-primary"
10245
+ ),
10246
+ initial: false,
10247
+ animate: {
10248
+ color: isDragging ? `hsl(var(--primary))` : `hsl(var(--muted-foreground))`
10249
+ },
10250
+ transition: { duration: 0.3 },
10251
+ children: /* @__PURE__ */ jsx63(CloudArrowUpIcon, { size: 64 })
10252
+ }
10253
+ )
10254
+ }
10255
+ ),
10256
+ /* @__PURE__ */ jsx63(
10257
+ motion15.p,
10258
+ {
10259
+ className: "mb-2 text-base font-semibold text-foreground",
10260
+ initial: animate ? { opacity: 0, y: -10 } : false,
10261
+ animate: { opacity: 1, y: 0 },
10262
+ transition: { delay: 0.1 },
10263
+ children: dropzoneText
10264
+ }
10265
+ ),
10266
+ /* @__PURE__ */ jsx63(
10267
+ motion15.p,
10268
+ {
10269
+ className: "text-sm text-muted-foreground",
10270
+ initial: animate ? { opacity: 0, y: -10 } : false,
10271
+ animate: { opacity: 1, y: 0 },
10272
+ transition: { delay: 0.2 },
10273
+ children: defaultSubtext
10274
+ }
10275
+ ),
10276
+ /* @__PURE__ */ jsx63(AnimatePresence11, { children: files.length > 0 && /* @__PURE__ */ jsxs44(
10277
+ motion15.div,
10278
+ {
10279
+ initial: { opacity: 0, scale: 0.8, y: 10 },
10280
+ animate: {
10281
+ opacity: 1,
10282
+ scale: 1,
10283
+ y: 0,
10284
+ backgroundColor: `hsl(var(--primary) / 0.1)`,
10285
+ borderColor: `hsl(var(--primary) / 0.2)`
10286
+ },
10287
+ exit: { opacity: 0, scale: 0.8, y: 10 },
10288
+ className: cn(
10289
+ "mt-4 flex items-center gap-2 rounded-full border px-4 py-2 backdrop-blur-sm bg-primary/20 border-primary/30 shadow-lg"
10290
+ ),
10291
+ transition: { duration: 0.3 },
10292
+ children: [
10293
+ /* @__PURE__ */ jsx63("div", { className: "h-4 w-4 text-primary flex items-center justify-center", children: /* @__PURE__ */ jsx63(CheckIcon9, { size: 16, className: "text-emerald-500" }) }),
10294
+ /* @__PURE__ */ jsxs44(
10295
+ motion15.span,
10296
+ {
10297
+ className: "text-sm font-semibold text-primary",
10298
+ animate: { color: `hsl(var(--primary))` },
10299
+ transition: { duration: 0.3 },
10300
+ children: [
10301
+ files.length,
10302
+ " ",
10303
+ files.length === 1 ? "arquivo selecionado" : "arquivos selecionados"
10304
+ ]
10305
+ }
10306
+ )
10307
+ ]
10308
+ }
10309
+ ) }),
10310
+ showPreview && files.length > 0 && /* @__PURE__ */ jsx63(
10311
+ motion15.div,
10312
+ {
10313
+ className: "mt-6 w-full",
10314
+ initial: animate ? { opacity: 0, y: 10 } : false,
10315
+ animate: { opacity: 1, y: 0 },
10316
+ transition: { delay: 0.3 },
10317
+ children: /* @__PURE__ */ jsxs44("div", { children: [
10318
+ /* @__PURE__ */ jsxs44("h4", { className: "mb-3 text-sm font-medium text-muted-foreground", children: [
10319
+ "Arquivos selecionados (",
10320
+ files.length,
10321
+ "/",
10322
+ maxFiles,
10323
+ ")"
10324
+ ] }),
10325
+ /* @__PURE__ */ jsx63("div", { className: "space-y-2 overflow-y-auto max-h-44", children: /* @__PURE__ */ jsx63(AnimatePresence11, { mode: "popLayout", children: files.map((file, index) => /* @__PURE__ */ jsxs44(
10326
+ motion15.div,
10327
+ {
10328
+ layout: true,
10329
+ initial: animate ? { opacity: 0, x: -20 } : false,
10330
+ animate: { opacity: 1, x: 0 },
10331
+ exit: {
10332
+ opacity: 0,
10333
+ x: -20,
10334
+ transition: { duration: 0.2 }
10335
+ },
10336
+ transition: {
10337
+ delay: animate ? index * 0.05 : 0,
10338
+ layout: { duration: 0.2 }
10339
+ },
10340
+ className: cn(
10341
+ "flex items-center gap-3 rounded-md border p-3 transition-all duration-300",
10342
+ file.error ? "border-destructive/50 bg-destructive/5" : "border-border bg-background/80 hover:bg-muted/50 hover:shadow-md hover:shadow-primary/10 hover:border-primary/30"
10343
+ ),
10344
+ children: [
10345
+ /* @__PURE__ */ jsx63("div", { className: "flex h-12 w-12 shrink-0 items-center justify-center rounded-md bg-muted overflow-hidden", children: file.preview ? (
10346
+ // Preview de imagem
10347
+ /* @__PURE__ */ jsx63(
10348
+ "img",
10349
+ {
10350
+ src: file.preview,
10351
+ alt: file.name,
10352
+ className: "h-full w-full object-cover rounded-md"
10353
+ }
10354
+ )
10355
+ ) : (
10356
+ // Ícone baseado no tipo de arquivo
10357
+ getFileTypeIcon(file)
10358
+ ) }),
10359
+ /* @__PURE__ */ jsxs44("div", { className: "min-w-0 flex-1", children: [
10360
+ /* @__PURE__ */ jsx63(
10361
+ "p",
10362
+ {
10363
+ className: "truncate text-sm font-medium text-foreground",
10364
+ title: `${file.name} (${file.type || "Tipo desconhecido"})`,
10365
+ children: file.name
10366
+ }
10367
+ ),
10368
+ /* @__PURE__ */ jsxs44("div", { className: "flex items-center gap-2 text-xs text-muted-foreground", children: [
10369
+ /* @__PURE__ */ jsx63("span", { children: formatFileSize(file.size) }),
10370
+ file.type && /* @__PURE__ */ jsxs44(Fragment8, { children: [
10371
+ /* @__PURE__ */ jsx63("span", { children: "\u2022" }),
10372
+ /* @__PURE__ */ jsx63("span", { className: "uppercase", children: getFileExtension(file.name) })
10373
+ ] })
10374
+ ] }),
10375
+ file.error && /* @__PURE__ */ jsx63(
10376
+ motion15.p,
10377
+ {
10378
+ className: "mt-1 text-xs text-destructive",
10379
+ initial: { opacity: 0, y: -5 },
10380
+ animate: { opacity: 1, y: 0 },
10381
+ children: file.error
10382
+ }
10383
+ )
10384
+ ] }),
10385
+ /* @__PURE__ */ jsx63(
10386
+ DeleteButton,
10387
+ {
10388
+ type: "button",
10389
+ variant: "destructive",
10390
+ size: "icon",
10391
+ onClick: (e) => {
10392
+ e?.stopPropagation();
10393
+ handleRemoveFile(file.id);
10394
+ },
10395
+ className: "",
10396
+ children: /* @__PURE__ */ jsx63(XIcon8, { size: 12 })
10397
+ }
10398
+ )
10399
+ ]
10400
+ },
10401
+ file.id
10402
+ )) }) })
10403
+ ] })
10404
+ }
10405
+ )
10406
+ ]
10407
+ }
10408
+ ) });
10409
+ }
10410
+ );
10411
+ FileUploader.displayName = "FileUploader";
10412
+
10413
+ // src/components/ui/ModalBase.tsx
10414
+ import * as React40 from "react";
10415
+ import * as DialogPrimitive2 from "@radix-ui/react-dialog";
10416
+ import { XIcon as XIcon9 } from "@phosphor-icons/react";
10417
+ import { jsx as jsx64, jsxs as jsxs45 } from "react/jsx-runtime";
10418
+ var ModalBase = DialogPrimitive2.Root;
10419
+ var ModalTriggerBase = DialogPrimitive2.Trigger;
10420
+ var ModalPortalBase = DialogPrimitive2.Portal;
10421
+ var ModalCloseBase = DialogPrimitive2.Close;
10422
+ var ModalOverlayBase = React40.forwardRef(({ className, testid: dataTestId = "modal-overlay", ...props }, ref) => /* @__PURE__ */ jsx64(
10423
+ DialogPrimitive2.Overlay,
10424
+ {
10425
+ ref,
10426
+ className: cn(
10427
+ "fixed inset-0 z-50 bg-black/60 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
10428
+ className
10429
+ ),
10430
+ "data-testid": dataTestId,
10431
+ ...props
10432
+ }
10433
+ ));
10434
+ ModalOverlayBase.displayName = DialogPrimitive2.Overlay.displayName;
10435
+ var ModalContentBase = React40.forwardRef(
10436
+ ({
10437
+ className,
10438
+ children,
10439
+ testid: dataTestId = "modal-content",
10440
+ size = "md",
10441
+ centered = true,
10442
+ backdropBlur = true,
10443
+ ...props
10444
+ }, ref) => {
10445
+ const sizeClass = size === "sm" ? "max-w-md" : size === "lg" ? "max-w-4xl" : size === "full" ? "w-full max-w-[calc(100%-2rem)]" : "max-w-2xl";
10446
+ 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";
10447
+ return /* @__PURE__ */ jsxs45(ModalPortalBase, { children: [
10448
+ /* @__PURE__ */ jsx64(
10449
+ ModalOverlayBase,
10450
+ {
10451
+ className: cn("bg-black/40", backdropBlur ? "backdrop-blur-sm" : "")
10452
+ }
10453
+ ),
10454
+ /* @__PURE__ */ jsx64(
10455
+ "style",
10456
+ {
10457
+ dangerouslySetInnerHTML: {
10458
+ __html: `
10459
+ @keyframes modal-fade-in { from { opacity: 0 } to { opacity: 1 } }
10460
+ @keyframes modal-fade-out { from { opacity: 1 } to { opacity: 0 } }
10461
+ @keyframes modal-scale-in { from { opacity: 0; transform: translate(-50%, -48%) scale(.98) } to { opacity:1; transform: translate(-50%, -50%) scale(1) } }
10462
+ @keyframes modal-scale-out { from { opacity:1; transform: translate(-50%, -50%) scale(1) } to { opacity: 0; transform: translate(-50%, -48%) scale(.98) } }
10463
+ @keyframes overlay-fade-in { from { opacity: 0 } to { opacity: 1 } }
10464
+ @keyframes overlay-fade-out { from { opacity: 1 } to { opacity: 0 } }
10465
+ .data-[state=open]\\:animate-modal-in { animation: modal-fade-in 220ms cubic-bezier(.16,.84,.24,1) both, modal-scale-in 220ms cubic-bezier(.16,.84,.24,1) both }
10466
+ .data-[state=closed]\\:animate-modal-out { animation: modal-scale-out 160ms cubic-bezier(.16,.84,.24,1) both, modal-fade-out 160ms cubic-bezier(.16,.84,.24,1) both }
10467
+ .data-[state=open]\\:animate-overlay-in { animation: overlay-fade-in 220ms cubic-bezier(.16,.84,.24,1) both }
10468
+ .data-[state=closed]\\:animate-overlay-out { animation: overlay-fade-out 160ms cubic-bezier(.16,.84,.24,1) both }
10469
+ `
10470
+ }
10471
+ }
10472
+ ),
10473
+ /* @__PURE__ */ jsxs45(
10474
+ DialogPrimitive2.Content,
10475
+ {
10476
+ ref,
10477
+ className: cn(
10478
+ "fixed z-50 grid w-full gap-4 border bg-background p-6 shadow-lg sm:rounded-lg max-h-[90dvh] overflow-auto",
10479
+ "data-[state=open]:animate-modal-in data-[state=closed]:animate-modal-out",
10480
+ positionClass,
10481
+ sizeClass,
10482
+ className
10483
+ ),
10484
+ "data-testid": dataTestId,
10485
+ ...props,
10486
+ children: [
10487
+ children,
10488
+ /* @__PURE__ */ jsxs45(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: [
10489
+ /* @__PURE__ */ jsx64(XIcon9, { className: "h-5 w-5 sm:h-4 sm:w-4 text-foreground" }),
10490
+ /* @__PURE__ */ jsx64("span", { className: "sr-only", children: "Close" })
10491
+ ] })
10492
+ ]
10493
+ }
10494
+ )
10495
+ ] });
10496
+ }
10497
+ );
10498
+ ModalContentBase.displayName = DialogPrimitive2.Content.displayName;
10499
+ var ModalHeaderBase = React40.forwardRef(({ className, testid: dataTestId = "modal-header", ...props }, ref) => /* @__PURE__ */ jsx64(
10500
+ "div",
10501
+ {
10502
+ ref,
10503
+ className: cn(
10504
+ "flex flex-col space-y-1.5 text-center sm:text-left",
10505
+ className
10506
+ ),
10507
+ "data-testid": dataTestId,
10508
+ ...props
10509
+ }
10510
+ ));
10511
+ ModalHeaderBase.displayName = "ModalHeader";
10512
+ var ModalFooterBase = React40.forwardRef(({ className, testid: dataTestId = "modal-footer", ...props }, ref) => /* @__PURE__ */ jsx64(
10513
+ "div",
10514
+ {
10515
+ ref,
10516
+ className: cn(
10517
+ "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
10518
+ className
10519
+ ),
10520
+ "data-testid": dataTestId,
10521
+ ...props
10522
+ }
10523
+ ));
10524
+ ModalFooterBase.displayName = "ModalFooter";
10525
+ var ModalTitleBase = React40.forwardRef(({ className, testid: dataTestId = "modal-title", ...props }, ref) => /* @__PURE__ */ jsx64(
10526
+ DialogPrimitive2.Title,
10527
+ {
10528
+ ref,
10529
+ className: cn(
10530
+ "text-lg font-semibold leading-none tracking-tight",
10531
+ className
10532
+ ),
10533
+ "data-testid": dataTestId,
10534
+ ...props
10535
+ }
10536
+ ));
10537
+ ModalTitleBase.displayName = DialogPrimitive2.Title.displayName;
10538
+ var ModalDescriptionBase = React40.forwardRef(({ className, testid: dataTestId = "modal-description", ...props }, ref) => /* @__PURE__ */ jsx64(
10539
+ DialogPrimitive2.Description,
10540
+ {
10541
+ ref,
10542
+ className: cn("text-sm text-muted-foreground", className),
10543
+ "data-testid": dataTestId,
10544
+ ...props
10545
+ }
10546
+ ));
10547
+ ModalDescriptionBase.displayName = DialogPrimitive2.Description.displayName;
10548
+
8978
10549
  // src/hooks/use-drag.tsx
8979
- import { useState as useState16, useCallback as useCallback11, useRef as useRef6, useEffect as useEffect14 } from "react";
10550
+ import { useState as useState18, useCallback as useCallback11, useRef as useRef7, useEffect as useEffect16 } from "react";
8980
10551
  var useDrag = (options = {}) => {
8981
- const [isDragging, setIsDragging] = useState16(null);
8982
- const [positions, setPositions] = useState16({});
8983
- const dragStartPos = useRef6(null);
8984
- const dragId = useRef6(null);
10552
+ const [isDragging, setIsDragging] = useState18(null);
10553
+ const [positions, setPositions] = useState18({});
10554
+ const dragStartPos = useRef7(null);
10555
+ const dragId = useRef7(null);
8985
10556
  const handleMouseDown = useCallback11((id, e) => {
8986
10557
  e.preventDefault();
8987
10558
  const currentPosition = positions[id] || { top: 0, left: 0 };
@@ -9019,7 +10590,7 @@ var useDrag = (options = {}) => {
9019
10590
  dragStartPos.current = null;
9020
10591
  dragId.current = null;
9021
10592
  }, [options]);
9022
- useEffect14(() => {
10593
+ useEffect16(() => {
9023
10594
  if (isDragging) {
9024
10595
  document.addEventListener("mousemove", handleMouseMove);
9025
10596
  document.addEventListener("mouseup", handleMouseUp);
@@ -9052,6 +10623,7 @@ var useDrag = (options = {}) => {
9052
10623
  };
9053
10624
  };
9054
10625
  export {
10626
+ AddButton,
9055
10627
  AlertDialogActionBase,
9056
10628
  AlertDialogBase,
9057
10629
  AlertDialogCancelBase,
@@ -9066,6 +10638,7 @@ export {
9066
10638
  AvatarBase,
9067
10639
  AvatarFallbackBase,
9068
10640
  AvatarImageBase,
10641
+ BackButton,
9069
10642
  BadgeBase,
9070
10643
  BarChart_default as BarChart,
9071
10644
  BreadcrumbBase,
@@ -9089,9 +10662,12 @@ export {
9089
10662
  CarouselItemBase,
9090
10663
  CarouselNextBase,
9091
10664
  CarouselPrevious,
10665
+ ChangeButton,
9092
10666
  Chart_default as Chart,
10667
+ CheckButton,
9093
10668
  CheckboxBase,
9094
10669
  CloseAllButton_default as CloseAllButton,
10670
+ CloseButton,
9095
10671
  CollapsibleBase,
9096
10672
  CollapsibleContentBase,
9097
10673
  CollapsibleTriggerBase,
@@ -9120,7 +10696,9 @@ export {
9120
10696
  ContextMenuSubContentBase,
9121
10697
  ContextMenuSubTriggerBase,
9122
10698
  ContextMenuTriggerBase,
10699
+ CopyButton,
9123
10700
  DateTimePicker,
10701
+ DeleteButton,
9124
10702
  DestructiveDialog,
9125
10703
  DialogBase,
9126
10704
  DialogCloseBase,
@@ -9132,6 +10710,7 @@ export {
9132
10710
  DialogPortalBase,
9133
10711
  DialogTitleBase,
9134
10712
  DialogTriggerBase,
10713
+ DownloadButton,
9135
10714
  DraggableTooltip_default as DraggableTooltip,
9136
10715
  DrawerBase,
9137
10716
  DrawerCloseBase,
@@ -9158,6 +10737,11 @@ export {
9158
10737
  DropDownMenuSubContentBase,
9159
10738
  DropDownMenuSubTriggerBase,
9160
10739
  DropDownMenuTriggerBase,
10740
+ EditButton,
10741
+ FavoriteButton,
10742
+ FileUploader,
10743
+ FilterButton,
10744
+ HideButton,
9161
10745
  Highlights_default as Highlights,
9162
10746
  HoverCardBase,
9163
10747
  HoverCardContentBase,
@@ -9168,9 +10752,22 @@ export {
9168
10752
  InputOTPSeparatorBase,
9169
10753
  InputOTPSlotBase,
9170
10754
  LabelBase_default as LabelBase,
10755
+ LikeButton,
9171
10756
  LineChart_default as LineChart,
9172
10757
  LoadingBase,
10758
+ LockButton,
10759
+ ModalBase,
10760
+ ModalCloseBase,
10761
+ ModalContentBase,
10762
+ ModalDescriptionBase,
10763
+ ModalFooterBase,
10764
+ ModalHeaderBase,
10765
+ ModalOverlayBase,
10766
+ ModalPortalBase,
10767
+ ModalTitleBase,
10768
+ ModalTriggerBase,
9173
10769
  ModeToggleBase,
10770
+ MoreButton,
9174
10771
  MultiCombobox,
9175
10772
  NavigationMenuBase,
9176
10773
  NavigationMenuContentBase,
@@ -9180,6 +10777,7 @@ export {
9180
10777
  NavigationMenuListBase,
9181
10778
  NavigationMenuTriggerBase,
9182
10779
  NavigationMenuViewportBase,
10780
+ NotificationButton,
9183
10781
  PeriodsDropdown_default as PeriodsDropdown,
9184
10782
  PieChart_default as PieChart,
9185
10783
  PopoverAnchorBase,
@@ -9190,8 +10788,11 @@ export {
9190
10788
  ProgressCirclesBase,
9191
10789
  ProgressPanelsBase,
9192
10790
  ProgressSegmentsBase,
10791
+ RefreshButton,
10792
+ SaveButton,
9193
10793
  ScrollAreaBase,
9194
10794
  ScrollBarBase,
10795
+ SearchButton,
9195
10796
  Select,
9196
10797
  SelectBase,
9197
10798
  SelectContentBase,
@@ -9204,6 +10805,7 @@ export {
9204
10805
  SelectTriggerBase,
9205
10806
  SelectValueBase,
9206
10807
  SeparatorBase,
10808
+ SettingsButton,
9207
10809
  SheetBase,
9208
10810
  SheetCloseBase,
9209
10811
  SheetContentBase,
@@ -9264,7 +10866,11 @@ export {
9264
10866
  TooltipSimple_default as TooltipSimple,
9265
10867
  TooltipTriggerBase,
9266
10868
  TooltipWithTotal_default as TooltipWithTotal,
10869
+ UnlockButton,
10870
+ UploadButton,
9267
10871
  UseSideBarBase,
10872
+ ViewButton,
10873
+ VisibilityButton,
9268
10874
  badgeVariants,
9269
10875
  buttonVariantsBase,
9270
10876
  compactTick,