@mlw-packages/react-components 1.9.14 → 1.9.16

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
@@ -5,7 +5,7 @@ import { Slot } from '@radix-ui/react-slot';
5
5
  import { cva } from 'class-variance-authority';
6
6
  import { clsx } from 'clsx';
7
7
  import { twMerge } from 'tailwind-merge';
8
- import { XIcon, CircleNotchIcon, MagnifyingGlassIcon, CaretUpIcon, CaretDownIcon, CheckIcon, CaretRightIcon, CircleIcon, CloudArrowUpIcon, MinusIcon, CaretUpDownIcon, PencilSimpleIcon, ArrowsLeftRightIcon, FloppyDiskIcon, PlusIcon, TrashIcon, SidebarSimpleIcon, FilePdfIcon, FileDocIcon, FileXlsIcon, FilePptIcon, FileCsvIcon, FileTextIcon, FileImageIcon, FileVideoIcon, FileAudioIcon, FileZipIcon, FileIcon, DotsSixVerticalIcon, InfoIcon, WarningIcon, XCircleIcon, CheckCircleIcon, SunIcon, MoonIcon, CaretLeftIcon, DownloadSimpleIcon, UploadSimpleIcon, CopyIcon, ArrowClockwiseIcon, ArrowLeftIcon, GearIcon, BellIcon, DotsThreeIcon, FunnelIcon, HeartIcon, StarIcon, EyeIcon, EyeSlashIcon, LockIcon, LockOpenIcon, FolderIcon, ArrowRightIcon as ArrowRightIcon$1, ArrowsOutIcon, DownloadIcon, CalendarBlankIcon, CalendarIcon, CaretLeft, CaretRight, ArrowDownIcon, ClockUserIcon, EyeSlash, Eye, ArrowRight, ArrowUpRightIcon, ArrowDownRightIcon, FunnelSimpleIcon, FileArchiveIcon, TerminalIcon, CodeIcon, CalendarDotIcon as CalendarDotIcon$1, DesktopIcon } from '@phosphor-icons/react';
8
+ import { XIcon, CircleNotchIcon, MagnifyingGlassIcon, CaretUpIcon, CaretDownIcon, CheckIcon, CaretRightIcon, CircleIcon, CloudArrowUpIcon, MinusIcon, CaretUpDownIcon, PencilSimpleIcon, ArrowsLeftRightIcon, FloppyDiskIcon, PlusIcon, TrashIcon, SidebarSimpleIcon, FilePdfIcon, FileDocIcon, FileXlsIcon, FilePptIcon, FileCsvIcon, FileTextIcon, FileImageIcon, FileVideoIcon, FileAudioIcon, FileZipIcon, FileIcon, DotsSixVerticalIcon, InfoIcon, WarningIcon, XCircleIcon, CheckCircleIcon, SunIcon, MoonIcon, CaretLeftIcon, DownloadSimpleIcon, UploadSimpleIcon, CopyIcon, ArrowClockwiseIcon, ArrowLeftIcon, GearIcon, BellIcon, DotsThreeIcon, FunnelIcon, HeartIcon, StarIcon, EyeIcon, EyeSlashIcon, LockIcon, LockOpenIcon, FolderIcon, ArrowRightIcon as ArrowRightIcon$1, ArrowsOutIcon, DownloadIcon, CalendarBlankIcon, CalendarIcon, CaretLeft, CaretRight, ArrowDownIcon, ClockUserIcon, EyeSlash, Eye, ArrowRight, ArrowUpRightIcon, ArrowDownRightIcon, FunnelSimpleIcon, PencilIcon, FileArchiveIcon, TerminalIcon, CodeIcon, CalendarDotIcon as CalendarDotIcon$1, DesktopIcon } from '@phosphor-icons/react';
9
9
  import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
10
10
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
11
11
  import * as DialogPrimitive from '@radix-ui/react-dialog';
@@ -1171,6 +1171,8 @@ var Toaster = ({ testId, ...props }) => {
1171
1171
  className: "toaster group",
1172
1172
  position: "top-center",
1173
1173
  duration: 4e3,
1174
+ swipeDirections: ["top", "bottom", "left", "right"],
1175
+ closeButton: true,
1174
1176
  toastOptions: {
1175
1177
  style: {
1176
1178
  backdropFilter: "blur(8px)",
@@ -1184,9 +1186,8 @@ var Toaster = ({ testId, ...props }) => {
1184
1186
  shadow-xl rounded-lg
1185
1187
  border-l-4
1186
1188
 
1187
- flex items-center gap-3
1189
+ flex items-center gap-3 pr-10
1188
1190
  transition-all duration-300
1189
- hover:scale-[1.02] hover:shadow-2xl
1190
1191
  data-[type=success]:border-l-green-500 data-[type=success]:bg-green-50/95 data-[type=success]:text-green-800 data-[type=success]:border-green-500 data-
1191
1192
  data-[type=error]:border-l-red-500 data-[type=error]:bg-red-50/95 data-[type=error]:text-red-800 data-[type=error]:border-red-500
1192
1193
  data-[type=warning]:border-l-yellow-500 data-[type=warning]:bg-yellow-50/95 data-[type=warning]:text-yellow-800 data-[type=warning]:border-yellow-500
@@ -1212,6 +1213,13 @@ var Toaster = ({ testId, ...props }) => {
1212
1213
  hover:bg-neutral-200 hover:scale-105
1213
1214
  transition-all duration-200
1214
1215
  active:scale-95
1216
+ `,
1217
+ closeButton: `
1218
+ !bg-transparent hover:!bg-black/5 dark:hover:!bg-white/10
1219
+ !border-0 !text-neutral-400 hover:!text-neutral-900 dark:hover:!text-neutral-100
1220
+ transition-all duration-200 !left-[auto] !right-3 !top-1/2 !-translate-y-1/2
1221
+ !w-7 !h-7 !rounded-lg flex items-center justify-center
1222
+ active:scale-95
1215
1223
  `
1216
1224
  }
1217
1225
  },
@@ -2007,7 +2015,7 @@ var CommandDebouncedInputBase = React32.forwardRef(
2007
2015
  }, ref) => /* @__PURE__ */ jsxs(
2008
2016
  "div",
2009
2017
  {
2010
- className: "flex items-center px-3 border-border border-b",
2018
+ className: "flex items-center px-3 border-border border-b focus:ring-0",
2011
2019
  "cmdk-input-wrapper": "",
2012
2020
  children: [
2013
2021
  /* @__PURE__ */ jsx(MagnifyingGlassIcon, { className: "mr-2 h-4 w-4 shrink-0 text-primary" }),
@@ -19293,6 +19301,12 @@ function useMediaQuery(query) {
19293
19301
  }, [query]);
19294
19302
  return value;
19295
19303
  }
19304
+ var CRUD_ITEMS = [
19305
+ { id: "edit", label: "Editar", icon: PencilIcon },
19306
+ { id: "copy", label: "Copiar", icon: CopyIcon },
19307
+ { id: "download", label: "Baixar", icon: DownloadIcon },
19308
+ { id: "delete", label: "Excluir", icon: TrashIcon, color: "danger" }
19309
+ ];
19296
19310
  var FULL_CIRCLE = 360;
19297
19311
  var START_ANGLE = -90;
19298
19312
  function degToRad(deg) {
@@ -19318,7 +19332,7 @@ function slicePath(index, total, wedgeRadius, innerRadius) {
19318
19332
  }
19319
19333
  function RadialMenu({
19320
19334
  children,
19321
- menuItems,
19335
+ menuItems = CRUD_ITEMS,
19322
19336
  size = 240,
19323
19337
  iconSize = 24,
19324
19338
  bandWidth = 60,
@@ -19329,44 +19343,13 @@ function RadialMenu({
19329
19343
  }) {
19330
19344
  const isMobile = useMediaQuery("(max-width: 768px)");
19331
19345
  const radius = size / 2;
19332
- const outerRingOuterRadius = radius;
19333
- const outerRingInnerRadius = outerRingOuterRadius - outerRingWidth;
19346
+ const outerRingInnerRadius = radius - outerRingWidth;
19334
19347
  const wedgeOuterRadius = outerRingInnerRadius - outerGap;
19335
19348
  const wedgeInnerRadius = wedgeOuterRadius - bandWidth;
19336
19349
  const iconRingRadius = (wedgeOuterRadius + wedgeInnerRadius) / 2;
19337
19350
  const centerRadius = Math.max(wedgeInnerRadius - innerGap, 0);
19338
19351
  const slice = 360 / menuItems.length;
19339
19352
  const [activeIndex, setActiveIndex] = React32.useState(null);
19340
- const timerRef = React32.useRef(null);
19341
- const isLongPress = React32.useRef(false);
19342
- const handleTouchStart = (e) => {
19343
- isLongPress.current = false;
19344
- const touch = e.touches[0];
19345
- const { clientX, clientY } = touch;
19346
- timerRef.current = setTimeout(() => {
19347
- isLongPress.current = true;
19348
- const event = new MouseEvent("contextmenu", {
19349
- bubbles: true,
19350
- cancelable: true,
19351
- view: window,
19352
- clientX,
19353
- clientY,
19354
- button: 2,
19355
- buttons: 2
19356
- });
19357
- e.target.dispatchEvent(event);
19358
- }, 1e3);
19359
- };
19360
- const handleTouchEnd = () => {
19361
- if (timerRef.current) {
19362
- clearTimeout(timerRef.current);
19363
- }
19364
- };
19365
- const handleTouchMove = () => {
19366
- if (timerRef.current) {
19367
- clearTimeout(timerRef.current);
19368
- }
19369
- };
19370
19353
  const containerVariants = {
19371
19354
  hidden: { opacity: 0, scale: 0.8 },
19372
19355
  visible: {
@@ -19396,22 +19379,13 @@ function RadialMenu({
19396
19379
  }
19397
19380
  };
19398
19381
  return /* @__PURE__ */ jsxs(ContextMenuBase, { children: [
19399
- /* @__PURE__ */ jsx(ContextMenuTriggerBase, { asChild: true, children: /* @__PURE__ */ jsx(
19400
- "div",
19401
- {
19402
- className: "select-none outline-none group touch-none",
19403
- onTouchStart: handleTouchStart,
19404
- onTouchEnd: handleTouchEnd,
19405
- onTouchMove: handleTouchMove,
19406
- children: children || /* @__PURE__ */ jsx("div", { className: "size-80 flex justify-center items-center border-2 border-dashed border-muted-foreground/20 rounded-xl bg-muted/5 text-muted-foreground hover:bg-muted/10 transition-colors", children: "Right-click or Long-press here (1s)" })
19407
- }
19408
- ) }),
19382
+ /* @__PURE__ */ jsx(ContextMenuTriggerBase, { asChild: true, children: /* @__PURE__ */ jsx("div", { className: "select-none outline-none group touch-none", children: children || /* @__PURE__ */ jsx("div", { className: "size-80 flex justify-center items-center border-2 border-dashed border-muted-foreground/20 rounded-xl bg-muted/5 cursor-context-menu", children: "Clique com bot\xE3o direito" }) }) }),
19409
19383
  /* @__PURE__ */ jsx(
19410
19384
  ContextMenuContentBase,
19411
19385
  {
19412
19386
  className: "p-0 border-none bg-transparent shadow-none overflow-visible -translate-x-1/2 -translate-y-1/2",
19413
19387
  style: { width: size, height: size },
19414
- children: /* @__PURE__ */ jsx(AnimatePresence, { mode: "wait", children: /* @__PURE__ */ jsxs(
19388
+ children: /* @__PURE__ */ jsx(AnimatePresence, { mode: "wait", children: /* @__PURE__ */ jsx(
19415
19389
  motion.div,
19416
19390
  {
19417
19391
  className: "relative size-full drop-shadow-xl will-change-transform",
@@ -19419,97 +19393,260 @@ function RadialMenu({
19419
19393
  initial: "hidden",
19420
19394
  animate: "visible",
19421
19395
  exit: "exit",
19422
- children: [
19423
- /* @__PURE__ */ jsx("div", { className: "absolute inset-0 rounded-full bg-background/5 blur-2xl -z-10" }),
19424
- /* @__PURE__ */ jsxs(
19425
- "svg",
19426
- {
19427
- className: "absolute inset-0 size-full overflow-visible",
19428
- viewBox: `${-radius} ${-radius} ${radius * 2} ${radius * 2}`,
19429
- children: [
19430
- /* @__PURE__ */ jsx(
19431
- motion.circle,
19396
+ children: /* @__PURE__ */ jsxs(
19397
+ "svg",
19398
+ {
19399
+ className: "absolute inset-0 size-full overflow-visible",
19400
+ viewBox: `${-radius} ${-radius} ${radius * 2} ${radius * 2}`,
19401
+ children: [
19402
+ /* @__PURE__ */ jsx(motion.circle, { r: centerRadius, className: "fill-background stroke-border stroke-1" }),
19403
+ /* @__PURE__ */ jsx(AnimatePresence, { children: activeIndex !== null && /* @__PURE__ */ jsx(
19404
+ motion.text,
19405
+ {
19406
+ initial: { opacity: 0, y: 5 },
19407
+ animate: { opacity: 1, y: 0 },
19408
+ exit: { opacity: 0 },
19409
+ textAnchor: "middle",
19410
+ dominantBaseline: "middle",
19411
+ className: "fill-foreground text-[11px] font-bold uppercase tracking-tighter pointer-events-none",
19412
+ children: menuItems[activeIndex].label
19413
+ }
19414
+ ) }),
19415
+ menuItems.map((item, index) => {
19416
+ const Icon = item.icon;
19417
+ const midDeg = START_ANGLE + slice * index;
19418
+ const { x: iconX, y: iconY } = polarToCartesian(iconRingRadius, midDeg);
19419
+ const isActive = activeIndex === index;
19420
+ const ICON_BOX = iconSize * 2.5;
19421
+ return /* @__PURE__ */ jsxs(
19422
+ motion.g,
19432
19423
  {
19433
- r: centerRadius,
19434
- initial: { scale: 0 },
19435
- animate: { scale: 1 },
19436
- transition: isMobile ? { duration: 0 } : {
19437
- type: "spring",
19438
- stiffness: 300,
19439
- delay: 0.2
19424
+ variants: itemVariants2,
19425
+ className: "cursor-pointer outline-none",
19426
+ onMouseEnter: () => setActiveIndex(index),
19427
+ onMouseLeave: () => setActiveIndex(null),
19428
+ onClick: (e) => {
19429
+ e.stopPropagation();
19430
+ onSelect?.(item);
19440
19431
  },
19441
- className: "fill-background stroke-border stroke-1 shadow-inner"
19442
- }
19443
- ),
19444
- menuItems.map((item, index) => {
19445
- const Icon = item.icon;
19446
- const midDeg = START_ANGLE + slice * index;
19447
- const { x: iconX, y: iconY } = polarToCartesian(
19448
- iconRingRadius,
19449
- midDeg
19450
- );
19451
- const isActive = activeIndex === index;
19452
- const ICON_BOX = iconSize * 2.5;
19453
- return /* @__PURE__ */ jsxs(
19454
- motion.g,
19455
- {
19456
- variants: itemVariants2,
19457
- className: "cursor-pointer outline-none",
19458
- onMouseEnter: () => setActiveIndex(index),
19459
- onMouseLeave: () => setActiveIndex(null),
19460
- onClick: () => onSelect?.(item),
19461
- style: { originX: "0px", originY: "0px" },
19462
- children: [
19463
- /* @__PURE__ */ jsx(
19464
- "path",
19465
- {
19466
- d: slicePath(
19467
- index,
19468
- menuItems.length,
19469
- wedgeOuterRadius,
19470
- wedgeInnerRadius
19471
- ),
19472
- className: cn(
19473
- "transition-colors duration-200 stroke-1",
19474
- isActive ? "fill-primary stroke-primary-foreground/20" : "fill-background/90 stroke-border/50 hover:fill-accent"
19475
- )
19432
+ style: { originX: "0px", originY: "0px" },
19433
+ children: [
19434
+ /* @__PURE__ */ jsx(
19435
+ "path",
19436
+ {
19437
+ d: slicePath(index, menuItems.length, wedgeOuterRadius, wedgeInnerRadius),
19438
+ className: cn(
19439
+ "transition-colors duration-200 stroke-1",
19440
+ isActive ? item.color === "danger" ? "fill-destructive stroke-destructive-foreground/20" : "fill-primary stroke-primary-foreground/20" : "fill-background/90 stroke-border/50 hover:fill-accent"
19441
+ )
19442
+ }
19443
+ ),
19444
+ /* @__PURE__ */ jsx("foreignObject", { x: iconX - ICON_BOX / 2, y: iconY - ICON_BOX / 2, width: ICON_BOX, height: ICON_BOX, className: "pointer-events-none", children: /* @__PURE__ */ jsx("div", { className: "size-full flex items-center justify-center", children: /* @__PURE__ */ jsx(
19445
+ Icon,
19446
+ {
19447
+ size: iconSize,
19448
+ weight: isActive ? "fill" : "regular",
19449
+ className: cn(
19450
+ "transition-all duration-200",
19451
+ isActive ? "text-primary-foreground" : item.color === "danger" ? "text-destructive" : "text-muted-foreground"
19452
+ )
19453
+ }
19454
+ ) }) })
19455
+ ]
19456
+ },
19457
+ item.id
19458
+ );
19459
+ })
19460
+ ]
19461
+ }
19462
+ )
19463
+ }
19464
+ ) })
19465
+ }
19466
+ )
19467
+ ] });
19468
+ }
19469
+ function ControlledCombobox({
19470
+ items,
19471
+ renderSelected,
19472
+ handleSelection,
19473
+ checkIsSelected,
19474
+ disabled = false,
19475
+ keepOpen = false,
19476
+ searchPlaceholder,
19477
+ empty = "Nenhum dado encontrado",
19478
+ error,
19479
+ label,
19480
+ labelClassname,
19481
+ testIds = {},
19482
+ onClear,
19483
+ hasSelected = false,
19484
+ hideClear = false,
19485
+ onSearchChange,
19486
+ search,
19487
+ onEndReached,
19488
+ loading = false
19489
+ }) {
19490
+ const [open, setOpen] = useState(false);
19491
+ return /* @__PURE__ */ jsxs(
19492
+ "div",
19493
+ {
19494
+ className: "w-full flex flex-col",
19495
+ "data-testid": testIds.root ?? "combobox-base-root",
19496
+ children: [
19497
+ label && /* @__PURE__ */ jsx(LabelBase_default, { className: labelClassname, children: label }),
19498
+ /* @__PURE__ */ jsxs(
19499
+ PopoverBase,
19500
+ {
19501
+ open,
19502
+ onOpenChange: (v) => !disabled && setOpen(v),
19503
+ modal: false,
19504
+ children: [
19505
+ /* @__PURE__ */ jsx(
19506
+ PopoverTriggerBase,
19507
+ {
19508
+ asChild: true,
19509
+ className: "flex w-full justify-between dark:bg-[hsl(231,15%,19%)] p-3",
19510
+ children: /* @__PURE__ */ jsxs(
19511
+ ButtonBase,
19512
+ {
19513
+ variant: "select",
19514
+ size: "select",
19515
+ role: "combobox",
19516
+ "aria-expanded": open,
19517
+ "aria-disabled": disabled || void 0,
19518
+ disabled,
19519
+ className: cn(
19520
+ `flex items-center gap-2 justify-between [&>div]:line-clamp-1 relative h-9 no-active-animation`,
19521
+ error && "border-red-500"
19522
+ ),
19523
+ "data-testid": testIds.trigger ?? "combobox-trigger",
19524
+ children: [
19525
+ renderSelected,
19526
+ /* @__PURE__ */ jsx(motion.span, { className: "flex items-center", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-row gap-0 items-center ", children: [
19527
+ hasSelected && onClear && !disabled && !hideClear && /* @__PURE__ */ jsx(
19528
+ ClearButton,
19529
+ {
19530
+ onClick: (e) => {
19531
+ if (e) e.stopPropagation();
19532
+ if (onClear && !disabled) {
19533
+ onClear();
19534
+ if (!keepOpen) setOpen(false);
19535
+ }
19476
19536
  }
19477
- ),
19478
- /* @__PURE__ */ jsx(
19479
- "foreignObject",
19480
- {
19481
- x: iconX - ICON_BOX / 2,
19482
- y: iconY - ICON_BOX / 2,
19483
- width: ICON_BOX,
19484
- height: ICON_BOX,
19485
- className: "pointer-events-none",
19486
- children: /* @__PURE__ */ jsx("div", { className: "size-full flex items-center justify-center", children: /* @__PURE__ */ jsx(
19487
- Icon,
19537
+ }
19538
+ ),
19539
+ /* @__PURE__ */ jsx(
19540
+ motion.div,
19541
+ {
19542
+ animate: { rotate: open ? 180 : 0 },
19543
+ transition: { duration: 0.3 },
19544
+ children: /* @__PURE__ */ jsx(CaretDownIcon, { className: "h-4 w-4" })
19545
+ }
19546
+ )
19547
+ ] }) })
19548
+ ]
19549
+ }
19550
+ )
19551
+ }
19552
+ ),
19553
+ /* @__PURE__ */ jsx(
19554
+ PopoverContentBase,
19555
+ {
19556
+ className: "max-h-[--radix-popover-content-available-height] w-[--radix-popover-trigger-width] p-0 border-none focus:ring-0 focus:outline-none",
19557
+ "data-testid": testIds.popover ?? "combobox-popover",
19558
+ children: /* @__PURE__ */ jsxs(
19559
+ CommandBase,
19560
+ {
19561
+ className: "dark:text-white hover:bg-rsecondary focus:ring-0 focus:outline-none",
19562
+ "data-testid": testIds.command ?? "combobox-command",
19563
+ filter: onSearchChange ? () => 1 : (value, search2) => {
19564
+ const label2 = items.find((item) => item.value === value)?.label || value;
19565
+ if (label2.toLowerCase().includes(search2.toLowerCase()))
19566
+ return 1;
19567
+ return 0;
19568
+ },
19569
+ children: [
19570
+ /* @__PURE__ */ jsx(
19571
+ CommandDebouncedInputBase,
19572
+ {
19573
+ tabIndex: -1,
19574
+ disabled,
19575
+ placeholder: searchPlaceholder ?? "Busque uma op\xE7\xE3o...",
19576
+ "data-testid": testIds.search ?? "combobox-search",
19577
+ onSearch: onSearchChange,
19578
+ search,
19579
+ debounce: 500
19580
+ }
19581
+ ),
19582
+ /* @__PURE__ */ jsxs(
19583
+ CommandListBase,
19584
+ {
19585
+ "data-testid": testIds.list ?? "combobox-list",
19586
+ onEndReached,
19587
+ className: "focus:ring-0 focus:outline-none",
19588
+ children: [
19589
+ /* @__PURE__ */ jsx(CommandEmptyBase, { "data-testid": testIds.empty ?? "combobox-empty", children: loading ? "Carregando..." : empty }),
19590
+ /* @__PURE__ */ jsx(CommandGroupBase, { "data-testid": testIds.group ?? "combobox-group", children: items.map((item) => {
19591
+ const isSelected = checkIsSelected(item.value);
19592
+ return /* @__PURE__ */ jsxs(
19593
+ CommandItemBase,
19488
19594
  {
19489
- size: iconSize,
19490
- weight: isActive ? "fill" : "regular",
19491
- className: cn(
19492
- "transition-all duration-200",
19493
- isActive ? "text-primary-foreground " : "text-muted-foreground"
19494
- )
19495
- }
19496
- ) })
19497
- }
19498
- )
19499
- ]
19500
- },
19501
- item.id
19502
- );
19503
- })
19504
- ]
19595
+ keywords: [item.label],
19596
+ value: item.value,
19597
+ onSelect: (value) => {
19598
+ if (disabled) return;
19599
+ handleSelection(value);
19600
+ if (!keepOpen) setOpen(false);
19601
+ },
19602
+ disabled,
19603
+ "data-testid": testIds.option ?? "combobox-option",
19604
+ children: [
19605
+ item.label,
19606
+ /* @__PURE__ */ jsx(
19607
+ motion.div,
19608
+ {
19609
+ initial: { scale: 0 },
19610
+ animate: { scale: isSelected ? 1 : 0 },
19611
+ transition: {
19612
+ type: "spring",
19613
+ stiffness: 500,
19614
+ damping: 30
19615
+ },
19616
+ className: "ml-auto ",
19617
+ children: /* @__PURE__ */ jsx(
19618
+ CheckIcon,
19619
+ {
19620
+ className: cn(
19621
+ "ml-auto",
19622
+ isSelected ? "opacity-100" : "opacity-0"
19623
+ ),
19624
+ "data-testid": isSelected ? testIds.check ?? "combobox-option-check" : void 0
19625
+ }
19626
+ )
19627
+ }
19628
+ )
19629
+ ]
19630
+ },
19631
+ item.value
19632
+ );
19633
+ }) }),
19634
+ loading && items.length > 0 && /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center p-2", children: /* @__PURE__ */ jsx("span", { className: "text-sm text-muted-foreground", children: "Carregando mais..." }) })
19635
+ ]
19636
+ }
19637
+ )
19638
+ ]
19639
+ }
19640
+ )
19505
19641
  }
19506
19642
  )
19507
19643
  ]
19508
19644
  }
19509
- ) })
19510
- }
19511
- )
19512
- ] });
19645
+ ),
19646
+ /* @__PURE__ */ jsx(ErrorMessage_default, { error })
19647
+ ]
19648
+ }
19649
+ );
19513
19650
  }
19514
19651
 
19515
- export { AddButton, Agenda, AgendaDaysToShow, AgendaDaysToShowAgenda, AgendaView, AlertDialogActionBase, AlertDialogBase, AlertDialogCancelBase, AlertDialogContentBase, AlertDialogDescriptionBase, AlertDialogFooterBase, AlertDialogHeaderBase, AlertDialogOverlayBase, AlertDialogPortalBase, AlertDialogTitleBase, AlertDialogTriggerBase, AvatarBase, AvatarCombobox, AvatarFallbackBase, AvatarImageBase, BackButton, Badge, BreadcrumbBase, BreadcrumbEllipsisBase, BreadcrumbItemBase, BreadcrumbLinkBase, BreadcrumbListBase, BreadcrumbPageBase, BreadcrumbSeparatorBase, Brush_default as Brush, ButtonBase, ButtonGroupBase, CENTER_INDEX, CalendarBase, CalendarDndProvider, CalendarDndProviderAgenda, CardBase, CardContentBase, CardDescriptionBase, CardFooterBase, CardHeaderBase, CardTitleBase, CarouselBase, ChangeButton, Chart_default as Chart, ChartControls, ChartHeader, ChartTotalLegend_default as ChartTotalLegend, CheckButton, CheckboxBase, CheckboxTree, CloseAllButton_default as CloseAllButton, CloseButton, CodeBlock, CollapsibleBase, CollapsibleContentBase, CollapsibleTriggerBase, Combobox, CommandBase, CommandDebouncedInputBase, CommandDialogBase, CommandEmptyBase, CommandGroupBase, CommandInputBase, CommandItemBase, CommandListBase, CommandSeparatorBase, CommandShortcutBase, ContextMenuBase, ContextMenuCheckboxItemBase, ContextMenuContentBase, ContextMenuGroupBase, ContextMenuItemBase, ContextMenuLabelBase, ContextMenuPortalBase, ContextMenuRadioGroupBase, ContextMenuRadioItemBase, ContextMenuSeparatorBase, ContextMenuShortcutBase, ContextMenuSubBase, ContextMenuSubContentBase, ContextMenuSubTriggerBase, ContextMenuTriggerBase, CopyButton, DateTimePicker, DayView, DayViewAgenda, DebouncedInput, DefaultEndHour, DefaultEndHourAgenda, DefaultStartHour, DefaultStartHourAgenda, DestructiveDialog, DialogBase, DialogCloseBase, DialogContentBase, DialogDescriptionBase, DialogFooterBase, DialogHeaderBase, DialogOverlayBase, DialogPortalBase, DialogTitleBase, DialogTriggerBase, DownloadButton, DraggableEvent2 as DraggableEvent, DraggableTooltip_default as DraggableTooltip, DrawerBase, DrawerCloseBase, DrawerContentBase, DrawerDescriptionBase, DrawerFooterBase, DrawerHeaderBase, DrawerOverlayBase, DrawerPortalBase, DrawerTitleBase, DrawerTriggerBase, DropDownMenuBase, DropDownMenuCheckboxItemBase, DropDownMenuContentBase, DropDownMenuGroupBase, DropDownMenuItemBase, DropDownMenuLabelBase, DropDownMenuPortalBase, DropDownMenuRadioGroupBase, DropDownMenuRadioItemBase, DropDownMenuSeparatorBase, DropDownMenuShortcutBase, DropDownMenuSubBase, DropDownMenuSubContentBase, DropDownMenuSubTriggerBase, DropDownMenuTriggerBase, DroppableCell, DroppableCellAgenda, EditButton, EndHour, EndHourAgenda, ErrorMessage_default as ErrorMessage, EventAgenda, EventCalendar, EventDialog, EventGap, EventGapAgenda, EventHeight, EventHeightAgenda, EventItem, EventItemAgenda, EventsPopup, FavoriteButton, FileUploader, FilterButton, HideButton, Highlights_default as Highlights, HorizontalChart_default as HorizontalChart, HorizontalLegend_default as HorizontalLegend, HoverCardBase, HoverCardContentBase, HoverCardTriggerBase, ITEM_HEIGHT, InputBase, InputOTPBase, InputOTPGroupBase, InputOTPSeparatorBase, InputOTPSlotBase, LabelBase_default as LabelBase, Leaderboard, LikeButton, LoadingBase, LockButton, ModalBase, ModalCloseBase, ModalContentBase, ModalDescriptionBase, ModalFooterBase, ModalHeaderBase, ModalOverlayBase, ModalPortalBase, ModalTitleBase, ModalTriggerBase, ModeToggleBase, MonthView, MonthViewAgenda, MoreButton, MultiCombobox, MultiSelect, MultiSelectBase, MultiSelectContentBase, MultiSelectGroupBase, MultiSelectItemBase, MultiSelectSeparatorBase, MultiSelectTriggerBase, MultiSelectValueBase, NavigationMenuBase, NavigationMenuContentBase, NavigationMenuIndicatorBase, NavigationMenuItemBase, NavigationMenuLinkBase, NavigationMenuListBase, NavigationMenuTriggerBase, NavigationMenuViewportBase, NoData_default as NoData, NotificationButton, NumericInput, PeriodsDropdown_default as PeriodsDropdown, PopoverAnchorBase, PopoverBase, PopoverContentBase, PopoverTriggerBase, ProgressBase, ProgressCirclesBase, ProgressPanelsBase, ProgressSegmentsBase, RadialMenu, RangePicker, RefreshButton, SaveButton, ScrollAreaBase, ScrollBarBase, SearchButton, Select, SelectBase, SelectContentBase, SelectEmpty, SelectGroupBase, SelectItemBase, SelectLabelBase, SelectScrollDownButtonBase, SelectScrollUpButtonBase, SelectSeparatorBase, SelectTriggerBase, SelectValueBase, SeparatorBase, SettingsButton, SheetBase, SheetCloseBase, SheetContentBase, SheetDescriptionBase, SheetFooterBase, SheetHeaderBase, SheetOverlayBase, SheetPortalBase, SheetTitleBase, SheetTriggerBase, ShowOnly_default as ShowOnly, SidebarBase, SidebarContentBase, SidebarFooterBase, SidebarGroupActionBase, SidebarGroupBase, SidebarGroupContentBase, SidebarGroupLabelBase, SidebarHeaderBase, SidebarInputBase, SidebarInsetBase, SidebarMenuActionBase, SidebarMenuBadgeBase, SidebarMenuBase, SidebarMenuButtonBase, SidebarMenuItemBase, SidebarMenuSkeletonBase, SidebarMenuSubBase, SidebarMenuSubButtonBase, SidebarMenuSubItemBase, SidebarProviderBase, SidebarRailBase, SidebarSeparatorBase, SidebarTriggerBase, SkeletonBase, SlideBase, StartHour, StartHourAgenda, StatusIndicator, SwitchBase, SystemTooltip_default as SystemTooltip, TableBase, TableBodyBase, TableCaptionBase, TableCellBase, TableFooterBase, TableHeadBase, TableHeaderBase, TableRowBase, TabsBase, TabsContentBase, TabsListBase, TabsTriggerBase, TextAreaBase, ThemeProviderBase, TimePicker, TimePickerInput, TimeSeries_default as TimeSeries, Toaster, TooltipBase, TooltipContentBase, TooltipProviderBase, TooltipSimple_default as TooltipSimple, TooltipTriggerBase, TooltipWithTotal_default as TooltipWithTotal, UndatedEvents, UniversalTooltipRenderer, UnlockButton, UploadButton, UseSideBarBase, VISIBLE_ITEMS, ViewButton, VisibilityButton, WeekCellsHeight, WeekCellsHeightAgenda, WeekView, WeekViewAgenda, adaptDataForTooltip, addHoursToDate, addHoursToDateAgenda, addMinutesToDateAgenda, badgeVariants, buttonVariantsBase, compactTick, computeChartWidth, computeNiceMax, computeYAxisTickWidth, convert12HourTo24Hour, createValueFormatter, createYTickFormatter, detectDataFields, detectXAxis, display12HourValue, formatFieldName, formatLinePercentage, generateAdditionalColors, generateColorMap, getAgendaEventsForDay, getAgendaEventsForDayAgenda, getAllEventsForDay, getAllEventsForDayAgenda, getArrowByType, getBorderRadiusClasses, getBorderRadiusClassesAgenda, getDateByType, getEventColorClasses, getEventColorClassesAgenda, getEventEndDate, getEventStartDate, getEventsForDay, getEventsForDayAgenda, getItems, getMaxDataValue, getMinDataValue, getSpanningEventsForDay, getSpanningEventsForDayAgenda, getValid12Hour, getValidArrow12Hour, getValidArrowHour, getValidArrowMinuteOrSecond, getValidArrowNumber, getValidHour, getValidMinuteOrSecond, getValidNumber, isMultiDayEvent, isMultiDayEventAgenda, isValid12Hour, isValidHour, isValidMinuteOrSecond, niceCeil, normalizeAttendDate, processNeo4jData, renderInsideBarLabel, pillLabelRenderer_default as renderPillLabel, resolveChartMargins, resolveContainerPaddingLeft, set12Hours, setDateByType, setHours, setMinutes, setSeconds, sortEvents, sortEventsAgenda, toast, useBiaxial, useCalendarDnd, useCalendarDndAgenda, useChartClick, useChartDimensions, useChartHighlights, useChartLayout, useChartMinMax, useChartTooltips, useCurrentTimeIndicator, useCurrentTimeIndicatorAgenda, useDrag, useEventVisibility, useEventVisibilityAgenda, useIsMobile, useOpenTooltipForPeriod, useProcessedData, useSeriesOpacity, useTheme, useTimeSeriesRange, visualForItem };
19652
+ export { AddButton, Agenda, AgendaDaysToShow, AgendaDaysToShowAgenda, AgendaView, AlertDialogActionBase, AlertDialogBase, AlertDialogCancelBase, AlertDialogContentBase, AlertDialogDescriptionBase, AlertDialogFooterBase, AlertDialogHeaderBase, AlertDialogOverlayBase, AlertDialogPortalBase, AlertDialogTitleBase, AlertDialogTriggerBase, AvatarBase, AvatarCombobox, AvatarFallbackBase, AvatarImageBase, BackButton, Badge, BreadcrumbBase, BreadcrumbEllipsisBase, BreadcrumbItemBase, BreadcrumbLinkBase, BreadcrumbListBase, BreadcrumbPageBase, BreadcrumbSeparatorBase, Brush_default as Brush, ButtonBase, ButtonGroupBase, CENTER_INDEX, CalendarBase, CalendarDndProvider, CalendarDndProviderAgenda, CardBase, CardContentBase, CardDescriptionBase, CardFooterBase, CardHeaderBase, CardTitleBase, CarouselBase, ChangeButton, Chart_default as Chart, ChartControls, ChartHeader, ChartTotalLegend_default as ChartTotalLegend, CheckButton, CheckboxBase, CheckboxTree, CloseAllButton_default as CloseAllButton, CloseButton, CodeBlock, CollapsibleBase, CollapsibleContentBase, CollapsibleTriggerBase, Combobox, CommandBase, CommandDebouncedInputBase, CommandDialogBase, CommandEmptyBase, CommandGroupBase, CommandInputBase, CommandItemBase, CommandListBase, CommandSeparatorBase, CommandShortcutBase, ContextMenuBase, ContextMenuCheckboxItemBase, ContextMenuContentBase, ContextMenuGroupBase, ContextMenuItemBase, ContextMenuLabelBase, ContextMenuPortalBase, ContextMenuRadioGroupBase, ContextMenuRadioItemBase, ContextMenuSeparatorBase, ContextMenuShortcutBase, ContextMenuSubBase, ContextMenuSubContentBase, ContextMenuSubTriggerBase, ContextMenuTriggerBase, ControlledCombobox, CopyButton, DateTimePicker, DayView, DayViewAgenda, DebouncedInput, DefaultEndHour, DefaultEndHourAgenda, DefaultStartHour, DefaultStartHourAgenda, DestructiveDialog, DialogBase, DialogCloseBase, DialogContentBase, DialogDescriptionBase, DialogFooterBase, DialogHeaderBase, DialogOverlayBase, DialogPortalBase, DialogTitleBase, DialogTriggerBase, DownloadButton, DraggableEvent2 as DraggableEvent, DraggableTooltip_default as DraggableTooltip, DrawerBase, DrawerCloseBase, DrawerContentBase, DrawerDescriptionBase, DrawerFooterBase, DrawerHeaderBase, DrawerOverlayBase, DrawerPortalBase, DrawerTitleBase, DrawerTriggerBase, DropDownMenuBase, DropDownMenuCheckboxItemBase, DropDownMenuContentBase, DropDownMenuGroupBase, DropDownMenuItemBase, DropDownMenuLabelBase, DropDownMenuPortalBase, DropDownMenuRadioGroupBase, DropDownMenuRadioItemBase, DropDownMenuSeparatorBase, DropDownMenuShortcutBase, DropDownMenuSubBase, DropDownMenuSubContentBase, DropDownMenuSubTriggerBase, DropDownMenuTriggerBase, DroppableCell, DroppableCellAgenda, EditButton, EndHour, EndHourAgenda, ErrorMessage_default as ErrorMessage, EventAgenda, EventCalendar, EventDialog, EventGap, EventGapAgenda, EventHeight, EventHeightAgenda, EventItem, EventItemAgenda, EventsPopup, FavoriteButton, FileUploader, FilterButton, HideButton, Highlights_default as Highlights, HorizontalChart_default as HorizontalChart, HorizontalLegend_default as HorizontalLegend, HoverCardBase, HoverCardContentBase, HoverCardTriggerBase, ITEM_HEIGHT, InputBase, InputOTPBase, InputOTPGroupBase, InputOTPSeparatorBase, InputOTPSlotBase, LabelBase_default as LabelBase, Leaderboard, LikeButton, LoadingBase, LockButton, ModalBase, ModalCloseBase, ModalContentBase, ModalDescriptionBase, ModalFooterBase, ModalHeaderBase, ModalOverlayBase, ModalPortalBase, ModalTitleBase, ModalTriggerBase, ModeToggleBase, MonthView, MonthViewAgenda, MoreButton, MultiCombobox, MultiSelect, MultiSelectBase, MultiSelectContentBase, MultiSelectGroupBase, MultiSelectItemBase, MultiSelectSeparatorBase, MultiSelectTriggerBase, MultiSelectValueBase, NavigationMenuBase, NavigationMenuContentBase, NavigationMenuIndicatorBase, NavigationMenuItemBase, NavigationMenuLinkBase, NavigationMenuListBase, NavigationMenuTriggerBase, NavigationMenuViewportBase, NoData_default as NoData, NotificationButton, NumericInput, PeriodsDropdown_default as PeriodsDropdown, PopoverAnchorBase, PopoverBase, PopoverContentBase, PopoverTriggerBase, ProgressBase, ProgressCirclesBase, ProgressPanelsBase, ProgressSegmentsBase, RadialMenu, RangePicker, RefreshButton, SaveButton, ScrollAreaBase, ScrollBarBase, SearchButton, Select, SelectBase, SelectContentBase, SelectEmpty, SelectGroupBase, SelectItemBase, SelectLabelBase, SelectScrollDownButtonBase, SelectScrollUpButtonBase, SelectSeparatorBase, SelectTriggerBase, SelectValueBase, SeparatorBase, SettingsButton, SheetBase, SheetCloseBase, SheetContentBase, SheetDescriptionBase, SheetFooterBase, SheetHeaderBase, SheetOverlayBase, SheetPortalBase, SheetTitleBase, SheetTriggerBase, ShowOnly_default as ShowOnly, SidebarBase, SidebarContentBase, SidebarFooterBase, SidebarGroupActionBase, SidebarGroupBase, SidebarGroupContentBase, SidebarGroupLabelBase, SidebarHeaderBase, SidebarInputBase, SidebarInsetBase, SidebarMenuActionBase, SidebarMenuBadgeBase, SidebarMenuBase, SidebarMenuButtonBase, SidebarMenuItemBase, SidebarMenuSkeletonBase, SidebarMenuSubBase, SidebarMenuSubButtonBase, SidebarMenuSubItemBase, SidebarProviderBase, SidebarRailBase, SidebarSeparatorBase, SidebarTriggerBase, SkeletonBase, SlideBase, StartHour, StartHourAgenda, StatusIndicator, SwitchBase, SystemTooltip_default as SystemTooltip, TableBase, TableBodyBase, TableCaptionBase, TableCellBase, TableFooterBase, TableHeadBase, TableHeaderBase, TableRowBase, TabsBase, TabsContentBase, TabsListBase, TabsTriggerBase, TextAreaBase, ThemeProviderBase, TimePicker, TimePickerInput, TimeSeries_default as TimeSeries, Toaster, TooltipBase, TooltipContentBase, TooltipProviderBase, TooltipSimple_default as TooltipSimple, TooltipTriggerBase, TooltipWithTotal_default as TooltipWithTotal, UndatedEvents, UniversalTooltipRenderer, UnlockButton, UploadButton, UseSideBarBase, VISIBLE_ITEMS, ViewButton, VisibilityButton, WeekCellsHeight, WeekCellsHeightAgenda, WeekView, WeekViewAgenda, adaptDataForTooltip, addHoursToDate, addHoursToDateAgenda, addMinutesToDateAgenda, badgeVariants, buttonVariantsBase, compactTick, computeChartWidth, computeNiceMax, computeYAxisTickWidth, convert12HourTo24Hour, createValueFormatter, createYTickFormatter, detectDataFields, detectXAxis, display12HourValue, formatFieldName, formatLinePercentage, generateAdditionalColors, generateColorMap, getAgendaEventsForDay, getAgendaEventsForDayAgenda, getAllEventsForDay, getAllEventsForDayAgenda, getArrowByType, getBorderRadiusClasses, getBorderRadiusClassesAgenda, getDateByType, getEventColorClasses, getEventColorClassesAgenda, getEventEndDate, getEventStartDate, getEventsForDay, getEventsForDayAgenda, getItems, getMaxDataValue, getMinDataValue, getSpanningEventsForDay, getSpanningEventsForDayAgenda, getValid12Hour, getValidArrow12Hour, getValidArrowHour, getValidArrowMinuteOrSecond, getValidArrowNumber, getValidHour, getValidMinuteOrSecond, getValidNumber, isMultiDayEvent, isMultiDayEventAgenda, isValid12Hour, isValidHour, isValidMinuteOrSecond, niceCeil, normalizeAttendDate, processNeo4jData, renderInsideBarLabel, pillLabelRenderer_default as renderPillLabel, resolveChartMargins, resolveContainerPaddingLeft, set12Hours, setDateByType, setHours, setMinutes, setSeconds, sortEvents, sortEventsAgenda, toast, useBiaxial, useCalendarDnd, useCalendarDndAgenda, useChartClick, useChartDimensions, useChartHighlights, useChartLayout, useChartMinMax, useChartTooltips, useCurrentTimeIndicator, useCurrentTimeIndicatorAgenda, useDrag, useEventVisibility, useEventVisibilityAgenda, useIsMobile, useOpenTooltipForPeriod, useProcessedData, useSeriesOpacity, useTheme, useTimeSeriesRange, visualForItem };
package/package.json CHANGED
@@ -2,9 +2,10 @@
2
2
  "name": "@mlw-packages/react-components",
3
3
  "developer": "Eduardo Junio",
4
4
  "publishConfig": {
5
- "access": "public"
5
+ "access": "public",
6
+ "type":"module"
6
7
  },
7
- "version": "1.9.14",
8
+ "version": "1.9.16",
8
9
  "homepage": "https://main--68e80310a069c2f10b546ef3.chromatic.com/",
9
10
  "repository": {
10
11
  "type": "git",