@iclips/ui 0.0.7 → 0.0.8
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.cjs +609 -413
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +31 -1
- package/dist/index.d.ts +31 -1
- package/dist/index.js +396 -201
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -5,10 +5,11 @@ var lucideReact = require('lucide-react');
|
|
|
5
5
|
var clsx = require('clsx');
|
|
6
6
|
var tailwindMerge = require('tailwind-merge');
|
|
7
7
|
var jsxRuntime = require('react/jsx-runtime');
|
|
8
|
-
var
|
|
8
|
+
var React5 = require('react');
|
|
9
9
|
var AlertDialogPrimitive = require('@radix-ui/react-alert-dialog');
|
|
10
10
|
var reactSlot = require('@radix-ui/react-slot');
|
|
11
11
|
var classVarianceAuthority = require('class-variance-authority');
|
|
12
|
+
var ScrollAreaPrimitive = require('@radix-ui/react-scroll-area');
|
|
12
13
|
var AspectRatioPrimitive = require('@radix-ui/react-aspect-ratio');
|
|
13
14
|
var AvatarPrimitive = require('@radix-ui/react-avatar');
|
|
14
15
|
var reactDayPicker = require('react-day-picker');
|
|
@@ -30,7 +31,6 @@ var PopoverPrimitive = require('@radix-ui/react-popover');
|
|
|
30
31
|
var ProgressPrimitive = require('@radix-ui/react-progress');
|
|
31
32
|
var RadioGroupPrimitive = require('@radix-ui/react-radio-group');
|
|
32
33
|
var ResizablePrimitive = require('react-resizable-panels');
|
|
33
|
-
var ScrollAreaPrimitive = require('@radix-ui/react-scroll-area');
|
|
34
34
|
var SelectPrimitive = require('@radix-ui/react-select');
|
|
35
35
|
var SeparatorPrimitive = require('@radix-ui/react-separator');
|
|
36
36
|
var SliderPrimitive = require('@radix-ui/react-slider');
|
|
@@ -70,8 +70,9 @@ function _interopNamespace(e) {
|
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
var AccordionPrimitive__namespace = /*#__PURE__*/_interopNamespace(AccordionPrimitive);
|
|
73
|
-
var
|
|
73
|
+
var React5__namespace = /*#__PURE__*/_interopNamespace(React5);
|
|
74
74
|
var AlertDialogPrimitive__namespace = /*#__PURE__*/_interopNamespace(AlertDialogPrimitive);
|
|
75
|
+
var ScrollAreaPrimitive__namespace = /*#__PURE__*/_interopNamespace(ScrollAreaPrimitive);
|
|
75
76
|
var AspectRatioPrimitive__namespace = /*#__PURE__*/_interopNamespace(AspectRatioPrimitive);
|
|
76
77
|
var AvatarPrimitive__namespace = /*#__PURE__*/_interopNamespace(AvatarPrimitive);
|
|
77
78
|
var useEmblaCarousel__default = /*#__PURE__*/_interopDefault(useEmblaCarousel);
|
|
@@ -88,7 +89,6 @@ var PopoverPrimitive__namespace = /*#__PURE__*/_interopNamespace(PopoverPrimitiv
|
|
|
88
89
|
var ProgressPrimitive__namespace = /*#__PURE__*/_interopNamespace(ProgressPrimitive);
|
|
89
90
|
var RadioGroupPrimitive__namespace = /*#__PURE__*/_interopNamespace(RadioGroupPrimitive);
|
|
90
91
|
var ResizablePrimitive__namespace = /*#__PURE__*/_interopNamespace(ResizablePrimitive);
|
|
91
|
-
var ScrollAreaPrimitive__namespace = /*#__PURE__*/_interopNamespace(ScrollAreaPrimitive);
|
|
92
92
|
var SelectPrimitive__namespace = /*#__PURE__*/_interopNamespace(SelectPrimitive);
|
|
93
93
|
var SeparatorPrimitive__namespace = /*#__PURE__*/_interopNamespace(SeparatorPrimitive);
|
|
94
94
|
var SliderPrimitive__namespace = /*#__PURE__*/_interopNamespace(SliderPrimitive);
|
|
@@ -303,7 +303,7 @@ var buttonVariants = classVarianceAuthority.cva(
|
|
|
303
303
|
}
|
|
304
304
|
}
|
|
305
305
|
);
|
|
306
|
-
var Button =
|
|
306
|
+
var Button = React5__namespace.forwardRef(({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
307
307
|
const Comp = asChild ? reactSlot.Slot : "button";
|
|
308
308
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
309
309
|
Comp,
|
|
@@ -331,7 +331,7 @@ function AlertDialogPortal({
|
|
|
331
331
|
}) {
|
|
332
332
|
return /* @__PURE__ */ jsxRuntime.jsx(AlertDialogPrimitive__namespace.Portal, { "data-slot": "alert-dialog-portal", ...props });
|
|
333
333
|
}
|
|
334
|
-
var AlertDialogOverlay =
|
|
334
|
+
var AlertDialogOverlay = React5__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
335
335
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
336
336
|
AlertDialogPrimitive__namespace.Overlay,
|
|
337
337
|
{
|
|
@@ -502,6 +502,283 @@ function AlertDescription({
|
|
|
502
502
|
}
|
|
503
503
|
);
|
|
504
504
|
}
|
|
505
|
+
function ScrollArea({
|
|
506
|
+
className,
|
|
507
|
+
children,
|
|
508
|
+
...props
|
|
509
|
+
}) {
|
|
510
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
511
|
+
ScrollAreaPrimitive__namespace.Root,
|
|
512
|
+
{
|
|
513
|
+
"data-slot": "scroll-area",
|
|
514
|
+
className: cn("relative", className),
|
|
515
|
+
...props,
|
|
516
|
+
children: [
|
|
517
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
518
|
+
ScrollAreaPrimitive__namespace.Viewport,
|
|
519
|
+
{
|
|
520
|
+
"data-slot": "scroll-area-viewport",
|
|
521
|
+
className: "focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",
|
|
522
|
+
children
|
|
523
|
+
}
|
|
524
|
+
),
|
|
525
|
+
/* @__PURE__ */ jsxRuntime.jsx(ScrollBar, {}),
|
|
526
|
+
/* @__PURE__ */ jsxRuntime.jsx(ScrollAreaPrimitive__namespace.Corner, {})
|
|
527
|
+
]
|
|
528
|
+
}
|
|
529
|
+
);
|
|
530
|
+
}
|
|
531
|
+
function ScrollBar({
|
|
532
|
+
className,
|
|
533
|
+
orientation = "vertical",
|
|
534
|
+
...props
|
|
535
|
+
}) {
|
|
536
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
537
|
+
ScrollAreaPrimitive__namespace.ScrollAreaScrollbar,
|
|
538
|
+
{
|
|
539
|
+
"data-slot": "scroll-area-scrollbar",
|
|
540
|
+
orientation,
|
|
541
|
+
className: cn(
|
|
542
|
+
"flex touch-none p-px transition-colors select-none",
|
|
543
|
+
orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent",
|
|
544
|
+
orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent",
|
|
545
|
+
className
|
|
546
|
+
),
|
|
547
|
+
...props,
|
|
548
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
549
|
+
ScrollAreaPrimitive__namespace.ScrollAreaThumb,
|
|
550
|
+
{
|
|
551
|
+
"data-slot": "scroll-area-thumb",
|
|
552
|
+
className: "bg-border relative flex-1 rounded-full"
|
|
553
|
+
}
|
|
554
|
+
)
|
|
555
|
+
}
|
|
556
|
+
);
|
|
557
|
+
}
|
|
558
|
+
var badgeVariants = classVarianceAuthority.cva(
|
|
559
|
+
"inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",
|
|
560
|
+
{
|
|
561
|
+
variants: {
|
|
562
|
+
variant: {
|
|
563
|
+
default: "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
|
|
564
|
+
secondary: "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
|
|
565
|
+
destructive: "border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
|
|
566
|
+
outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"
|
|
567
|
+
}
|
|
568
|
+
},
|
|
569
|
+
defaultVariants: {
|
|
570
|
+
variant: "default"
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
);
|
|
574
|
+
var Badge = React5__namespace.forwardRef(({ className, variant, asChild = false, ...props }, ref) => {
|
|
575
|
+
const Comp = asChild ? reactSlot.Slot : "span";
|
|
576
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
577
|
+
Comp,
|
|
578
|
+
{
|
|
579
|
+
ref,
|
|
580
|
+
"data-slot": "badge",
|
|
581
|
+
className: cn(badgeVariants({ variant }), className),
|
|
582
|
+
...props
|
|
583
|
+
}
|
|
584
|
+
);
|
|
585
|
+
});
|
|
586
|
+
Badge.displayName = "Badge";
|
|
587
|
+
function BrandLogo({ variant = "full", className }) {
|
|
588
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
589
|
+
"svg",
|
|
590
|
+
{
|
|
591
|
+
viewBox: "0 0 120 40",
|
|
592
|
+
className: cn("h-8", className),
|
|
593
|
+
fill: "none",
|
|
594
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
595
|
+
children: [
|
|
596
|
+
/* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsxs("linearGradient", { id: "logoGradient", x1: "0%", y1: "0%", x2: "100%", y2: "100%", children: [
|
|
597
|
+
/* @__PURE__ */ jsxRuntime.jsx("stop", { offset: "0%", stopColor: "#7F26BF" }),
|
|
598
|
+
/* @__PURE__ */ jsxRuntime.jsx("stop", { offset: "100%", stopColor: "#A855F7" })
|
|
599
|
+
] }) }),
|
|
600
|
+
/* @__PURE__ */ jsxRuntime.jsx("rect", { x: "4", y: "8", width: "24", height: "24", rx: "6", fill: "url(#logoGradient)" }),
|
|
601
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M16 18 L16 28", stroke: "white", strokeWidth: "2", strokeLinecap: "round" }),
|
|
602
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "16", cy: "14", r: "2", fill: "white" }),
|
|
603
|
+
variant === "full" && /* @__PURE__ */ jsxRuntime.jsx("text", { x: "36", y: "26", fontFamily: "system-ui", fontSize: "18", fontWeight: "600", fill: "currentColor", children: "iClips" })
|
|
604
|
+
]
|
|
605
|
+
}
|
|
606
|
+
);
|
|
607
|
+
}
|
|
608
|
+
var DEFAULT_PRIMARY_NAV_ITEMS = [
|
|
609
|
+
{ id: "home", label: "In\xEDcio", icon: lucideReact.Home },
|
|
610
|
+
{ id: "projects", label: "Projetos", icon: lucideReact.Folder },
|
|
611
|
+
{ id: "clients", label: "Clientes", icon: lucideReact.Users },
|
|
612
|
+
{ id: "calendar", label: "Calend\xE1rio", icon: lucideReact.Calendar },
|
|
613
|
+
{ id: "reports", label: "Relat\xF3rios", icon: lucideReact.BarChart3 },
|
|
614
|
+
{ id: "settings", label: "Configura\xE7\xF5es", icon: lucideReact.Settings }
|
|
615
|
+
];
|
|
616
|
+
var DEFAULT_SECONDARY_NAV_ITEMS = [
|
|
617
|
+
{ label: "Todos os Projetos", icon: lucideReact.LayoutGrid },
|
|
618
|
+
{ label: "Documentos", icon: lucideReact.FileText, badge: "3" },
|
|
619
|
+
{ label: "Favoritos", icon: lucideReact.Star, chevron: true },
|
|
620
|
+
{ label: "Coment\xE1rios", icon: lucideReact.MessageSquare, badge: "12", highlighted: true },
|
|
621
|
+
{ label: "Downloads", icon: lucideReact.Download },
|
|
622
|
+
{ label: "Recentes", icon: lucideReact.Sparkles, chevron: true }
|
|
623
|
+
];
|
|
624
|
+
function AppLayout({
|
|
625
|
+
children,
|
|
626
|
+
title = "Dashboard",
|
|
627
|
+
theme = "light",
|
|
628
|
+
onThemeToggle,
|
|
629
|
+
primaryNavItems = DEFAULT_PRIMARY_NAV_ITEMS,
|
|
630
|
+
secondaryNavItems = DEFAULT_SECONDARY_NAV_ITEMS,
|
|
631
|
+
secondaryNavTitle = "Menu",
|
|
632
|
+
activePrimaryItem,
|
|
633
|
+
onPrimaryItemClick,
|
|
634
|
+
logoComponent,
|
|
635
|
+
hideSecondaryNav = false,
|
|
636
|
+
defaultPrimaryNavPinned = false,
|
|
637
|
+
defaultSecondaryNavOpen = true
|
|
638
|
+
}) {
|
|
639
|
+
const [isPrimaryNavPinned, setIsPrimaryNavPinned] = React5__namespace.useState(defaultPrimaryNavPinned);
|
|
640
|
+
const [isPrimaryNavHovered, setIsPrimaryNavHovered] = React5__namespace.useState(false);
|
|
641
|
+
const [isSecondaryNavOpen, setIsSecondaryNavOpen] = React5__namespace.useState(defaultSecondaryNavOpen);
|
|
642
|
+
const [activeItem, setActiveItem] = React5__namespace.useState(activePrimaryItem || primaryNavItems[0]?.id);
|
|
643
|
+
const isPrimaryNavExpanded = isPrimaryNavPinned || isPrimaryNavHovered;
|
|
644
|
+
const handlePrimaryItemClick = (id) => {
|
|
645
|
+
setActiveItem(id);
|
|
646
|
+
if (onPrimaryItemClick) {
|
|
647
|
+
onPrimaryItemClick(id);
|
|
648
|
+
}
|
|
649
|
+
};
|
|
650
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex h-screen w-full bg-background", children: [
|
|
651
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
652
|
+
"div",
|
|
653
|
+
{
|
|
654
|
+
className: cn(
|
|
655
|
+
"relative border-r bg-card transition-all duration-300 ease-in-out",
|
|
656
|
+
isPrimaryNavExpanded ? "w-56" : "w-16"
|
|
657
|
+
),
|
|
658
|
+
onMouseEnter: () => setIsPrimaryNavHovered(true),
|
|
659
|
+
onMouseLeave: () => setIsPrimaryNavHovered(false),
|
|
660
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(ScrollArea, { className: "h-full", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex h-full flex-col", children: [
|
|
661
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-16 items-center justify-between border-b px-4", children: logoComponent || /* @__PURE__ */ jsxRuntime.jsx(
|
|
662
|
+
BrandLogo,
|
|
663
|
+
{
|
|
664
|
+
variant: isPrimaryNavExpanded ? "full" : "symbol",
|
|
665
|
+
className: "transition-all duration-300"
|
|
666
|
+
}
|
|
667
|
+
) }),
|
|
668
|
+
/* @__PURE__ */ jsxRuntime.jsx("nav", { className: "flex-1 space-y-1 p-2", children: primaryNavItems.map((item) => {
|
|
669
|
+
const Icon2 = item.icon;
|
|
670
|
+
const isActive2 = activeItem === item.id;
|
|
671
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
672
|
+
"button",
|
|
673
|
+
{
|
|
674
|
+
onClick: () => handlePrimaryItemClick(item.id),
|
|
675
|
+
className: cn(
|
|
676
|
+
"flex w-full items-center gap-3 rounded-lg px-3 py-2.5 text-sm font-medium transition-colors",
|
|
677
|
+
isActive2 ? "bg-primary text-primary-foreground" : "text-muted-foreground hover:bg-accent hover:text-accent-foreground"
|
|
678
|
+
),
|
|
679
|
+
children: [
|
|
680
|
+
/* @__PURE__ */ jsxRuntime.jsx(Icon2, { className: "h-5 w-5 shrink-0" }),
|
|
681
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
682
|
+
"span",
|
|
683
|
+
{
|
|
684
|
+
className: cn(
|
|
685
|
+
"transition-all duration-300",
|
|
686
|
+
isPrimaryNavExpanded ? "opacity-100" : "w-0 opacity-0"
|
|
687
|
+
),
|
|
688
|
+
children: item.label
|
|
689
|
+
}
|
|
690
|
+
)
|
|
691
|
+
]
|
|
692
|
+
},
|
|
693
|
+
item.id
|
|
694
|
+
);
|
|
695
|
+
}) }),
|
|
696
|
+
isPrimaryNavExpanded && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "border-t p-2", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
697
|
+
Button,
|
|
698
|
+
{
|
|
699
|
+
variant: "ghost",
|
|
700
|
+
size: "sm",
|
|
701
|
+
onClick: () => setIsPrimaryNavPinned(!isPrimaryNavPinned),
|
|
702
|
+
className: "w-full justify-start gap-2",
|
|
703
|
+
children: [
|
|
704
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Pin, { className: cn("h-4 w-4", isPrimaryNavPinned && "fill-current") }),
|
|
705
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs", children: isPrimaryNavPinned ? "Desafixar" : "Fixar menu" })
|
|
706
|
+
]
|
|
707
|
+
}
|
|
708
|
+
) })
|
|
709
|
+
] }) })
|
|
710
|
+
}
|
|
711
|
+
),
|
|
712
|
+
!hideSecondaryNav && isSecondaryNavOpen && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-[264px] border-r bg-card", children: /* @__PURE__ */ jsxRuntime.jsx(ScrollArea, { className: "h-full", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex h-full flex-col", children: [
|
|
713
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex h-16 items-center justify-between border-b px-4", children: [
|
|
714
|
+
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-sm font-semibold", children: secondaryNavTitle }),
|
|
715
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "ghost", size: "icon", className: "h-8 w-8", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, { className: "h-4 w-4" }) })
|
|
716
|
+
] }),
|
|
717
|
+
/* @__PURE__ */ jsxRuntime.jsx("nav", { className: "flex-1 space-y-1 p-2", children: secondaryNavItems.map((item, index) => {
|
|
718
|
+
const Icon2 = item.icon;
|
|
719
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
720
|
+
"button",
|
|
721
|
+
{
|
|
722
|
+
className: cn(
|
|
723
|
+
"flex w-full items-center gap-3 rounded-lg px-3 py-2 text-sm transition-colors",
|
|
724
|
+
item.highlighted ? "bg-primary/10 text-primary hover:bg-primary/20" : "text-muted-foreground hover:bg-accent hover:text-accent-foreground"
|
|
725
|
+
),
|
|
726
|
+
children: [
|
|
727
|
+
/* @__PURE__ */ jsxRuntime.jsx(Icon2, { className: "h-4 w-4 shrink-0" }),
|
|
728
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-1 text-left", children: item.label }),
|
|
729
|
+
item.badge && /* @__PURE__ */ jsxRuntime.jsx(
|
|
730
|
+
Badge,
|
|
731
|
+
{
|
|
732
|
+
variant: item.highlighted ? "default" : "secondary",
|
|
733
|
+
className: "h-5 min-w-5 px-1.5 text-xs",
|
|
734
|
+
children: item.badge
|
|
735
|
+
}
|
|
736
|
+
),
|
|
737
|
+
item.chevron && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "h-4 w-4" })
|
|
738
|
+
]
|
|
739
|
+
},
|
|
740
|
+
index
|
|
741
|
+
);
|
|
742
|
+
}) }),
|
|
743
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "border-t p-4", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
744
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-8 w-8 items-center justify-center rounded-full bg-primary text-primary-foreground", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Zap, { className: "h-4 w-4" }) }),
|
|
745
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1", children: [
|
|
746
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-medium", children: "A\xE7\xF5es r\xE1pidas" }),
|
|
747
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground", children: "Ver todas" })
|
|
748
|
+
] })
|
|
749
|
+
] }) })
|
|
750
|
+
] }) }) }),
|
|
751
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-1 flex-col", children: [
|
|
752
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex h-16 items-center justify-between border-b bg-card px-6", children: [
|
|
753
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
754
|
+
!hideSecondaryNav && /* @__PURE__ */ jsxRuntime.jsx(
|
|
755
|
+
Button,
|
|
756
|
+
{
|
|
757
|
+
variant: "ghost",
|
|
758
|
+
size: "icon",
|
|
759
|
+
onClick: () => setIsSecondaryNavOpen(!isSecondaryNavOpen),
|
|
760
|
+
children: isSecondaryNavOpen ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.PanelLeftClose, { className: "h-5 w-5" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.PanelLeft, { className: "h-5 w-5" })
|
|
761
|
+
}
|
|
762
|
+
),
|
|
763
|
+
/* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-xl font-semibold", children: title })
|
|
764
|
+
] }),
|
|
765
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
766
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "ghost", size: "icon", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Bell, { className: "h-5 w-5" }) }),
|
|
767
|
+
onThemeToggle && /* @__PURE__ */ jsxRuntime.jsx(
|
|
768
|
+
Button,
|
|
769
|
+
{
|
|
770
|
+
variant: "outline",
|
|
771
|
+
size: "sm",
|
|
772
|
+
onClick: onThemeToggle,
|
|
773
|
+
children: theme === "light" ? "\u{1F319}" : "\u2600\uFE0F"
|
|
774
|
+
}
|
|
775
|
+
)
|
|
776
|
+
] })
|
|
777
|
+
] }),
|
|
778
|
+
/* @__PURE__ */ jsxRuntime.jsx(ScrollArea, { className: "flex-1", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-6", children }) })
|
|
779
|
+
] })
|
|
780
|
+
] });
|
|
781
|
+
}
|
|
505
782
|
function AspectRatio({
|
|
506
783
|
...props
|
|
507
784
|
}) {
|
|
@@ -552,35 +829,6 @@ function AvatarFallback({
|
|
|
552
829
|
}
|
|
553
830
|
);
|
|
554
831
|
}
|
|
555
|
-
var badgeVariants = classVarianceAuthority.cva(
|
|
556
|
-
"inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",
|
|
557
|
-
{
|
|
558
|
-
variants: {
|
|
559
|
-
variant: {
|
|
560
|
-
default: "border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
|
|
561
|
-
secondary: "border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
|
|
562
|
-
destructive: "border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
|
|
563
|
-
outline: "text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"
|
|
564
|
-
}
|
|
565
|
-
},
|
|
566
|
-
defaultVariants: {
|
|
567
|
-
variant: "default"
|
|
568
|
-
}
|
|
569
|
-
}
|
|
570
|
-
);
|
|
571
|
-
var Badge = React4__namespace.forwardRef(({ className, variant, asChild = false, ...props }, ref) => {
|
|
572
|
-
const Comp = asChild ? reactSlot.Slot : "span";
|
|
573
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
574
|
-
Comp,
|
|
575
|
-
{
|
|
576
|
-
ref,
|
|
577
|
-
"data-slot": "badge",
|
|
578
|
-
className: cn(badgeVariants({ variant }), className),
|
|
579
|
-
...props
|
|
580
|
-
}
|
|
581
|
-
);
|
|
582
|
-
});
|
|
583
|
-
Badge.displayName = "Badge";
|
|
584
832
|
function Breadcrumb({ ...props }) {
|
|
585
833
|
return /* @__PURE__ */ jsxRuntime.jsx("nav", { "aria-label": "breadcrumb", "data-slot": "breadcrumb", ...props });
|
|
586
834
|
}
|
|
@@ -671,7 +919,7 @@ function BreadcrumbEllipsis({
|
|
|
671
919
|
}
|
|
672
920
|
);
|
|
673
921
|
}
|
|
674
|
-
function
|
|
922
|
+
function Calendar2({
|
|
675
923
|
className,
|
|
676
924
|
classNames,
|
|
677
925
|
showOutsideDays = true,
|
|
@@ -805,9 +1053,9 @@ function CardFooter({ className, ...props }) {
|
|
|
805
1053
|
}
|
|
806
1054
|
);
|
|
807
1055
|
}
|
|
808
|
-
var CarouselContext =
|
|
1056
|
+
var CarouselContext = React5__namespace.createContext(null);
|
|
809
1057
|
function useCarousel() {
|
|
810
|
-
const context =
|
|
1058
|
+
const context = React5__namespace.useContext(CarouselContext);
|
|
811
1059
|
if (!context) {
|
|
812
1060
|
throw new Error("useCarousel must be used within a <Carousel />");
|
|
813
1061
|
}
|
|
@@ -829,20 +1077,20 @@ function Carousel({
|
|
|
829
1077
|
},
|
|
830
1078
|
plugins
|
|
831
1079
|
);
|
|
832
|
-
const [canScrollPrev, setCanScrollPrev] =
|
|
833
|
-
const [canScrollNext, setCanScrollNext] =
|
|
834
|
-
const onSelect =
|
|
1080
|
+
const [canScrollPrev, setCanScrollPrev] = React5__namespace.useState(false);
|
|
1081
|
+
const [canScrollNext, setCanScrollNext] = React5__namespace.useState(false);
|
|
1082
|
+
const onSelect = React5__namespace.useCallback((api2) => {
|
|
835
1083
|
if (!api2) return;
|
|
836
1084
|
setCanScrollPrev(api2.canScrollPrev());
|
|
837
1085
|
setCanScrollNext(api2.canScrollNext());
|
|
838
1086
|
}, []);
|
|
839
|
-
const scrollPrev =
|
|
1087
|
+
const scrollPrev = React5__namespace.useCallback(() => {
|
|
840
1088
|
api?.scrollPrev();
|
|
841
1089
|
}, [api]);
|
|
842
|
-
const scrollNext =
|
|
1090
|
+
const scrollNext = React5__namespace.useCallback(() => {
|
|
843
1091
|
api?.scrollNext();
|
|
844
1092
|
}, [api]);
|
|
845
|
-
const handleKeyDown2 =
|
|
1093
|
+
const handleKeyDown2 = React5__namespace.useCallback(
|
|
846
1094
|
(event) => {
|
|
847
1095
|
if (event.key === "ArrowLeft") {
|
|
848
1096
|
event.preventDefault();
|
|
@@ -854,11 +1102,11 @@ function Carousel({
|
|
|
854
1102
|
},
|
|
855
1103
|
[scrollPrev, scrollNext]
|
|
856
1104
|
);
|
|
857
|
-
|
|
1105
|
+
React5__namespace.useEffect(() => {
|
|
858
1106
|
if (!api || !setApi) return;
|
|
859
1107
|
setApi(api);
|
|
860
1108
|
}, [api, setApi]);
|
|
861
|
-
|
|
1109
|
+
React5__namespace.useEffect(() => {
|
|
862
1110
|
if (!api) return;
|
|
863
1111
|
onSelect(api);
|
|
864
1112
|
api.on("reInit", onSelect);
|
|
@@ -1061,7 +1309,7 @@ function DialogClose({
|
|
|
1061
1309
|
}) {
|
|
1062
1310
|
return /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Close, { "data-slot": "dialog-close", ...props });
|
|
1063
1311
|
}
|
|
1064
|
-
var DialogOverlay =
|
|
1312
|
+
var DialogOverlay = React5__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
1065
1313
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1066
1314
|
DialogPrimitive__namespace.Overlay,
|
|
1067
1315
|
{
|
|
@@ -1504,7 +1752,7 @@ function Drawer({
|
|
|
1504
1752
|
}) {
|
|
1505
1753
|
return /* @__PURE__ */ jsxRuntime.jsx(vaul.Drawer.Root, { "data-slot": "drawer", ...props });
|
|
1506
1754
|
}
|
|
1507
|
-
var DrawerTrigger =
|
|
1755
|
+
var DrawerTrigger = React5__namespace.forwardRef(({ ...props }, ref) => {
|
|
1508
1756
|
return /* @__PURE__ */ jsxRuntime.jsx(vaul.Drawer.Trigger, { ref, "data-slot": "drawer-trigger", ...props });
|
|
1509
1757
|
});
|
|
1510
1758
|
DrawerTrigger.displayName = "DrawerTrigger";
|
|
@@ -1513,11 +1761,11 @@ function DrawerPortal({
|
|
|
1513
1761
|
}) {
|
|
1514
1762
|
return /* @__PURE__ */ jsxRuntime.jsx(vaul.Drawer.Portal, { "data-slot": "drawer-portal", ...props });
|
|
1515
1763
|
}
|
|
1516
|
-
var DrawerClose =
|
|
1764
|
+
var DrawerClose = React5__namespace.forwardRef(({ ...props }, ref) => {
|
|
1517
1765
|
return /* @__PURE__ */ jsxRuntime.jsx(vaul.Drawer.Close, { ref, "data-slot": "drawer-close", ...props });
|
|
1518
1766
|
});
|
|
1519
1767
|
DrawerClose.displayName = "DrawerClose";
|
|
1520
|
-
var DrawerOverlay =
|
|
1768
|
+
var DrawerOverlay = React5__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
1521
1769
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1522
1770
|
vaul.Drawer.Overlay,
|
|
1523
1771
|
{
|
|
@@ -1532,7 +1780,7 @@ var DrawerOverlay = React4__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
1532
1780
|
);
|
|
1533
1781
|
});
|
|
1534
1782
|
DrawerOverlay.displayName = "DrawerOverlay";
|
|
1535
|
-
var DrawerContent =
|
|
1783
|
+
var DrawerContent = React5__namespace.forwardRef(({ className, children, ...props }, ref) => {
|
|
1536
1784
|
return /* @__PURE__ */ jsxRuntime.jsxs(DrawerPortal, { "data-slot": "drawer-portal", children: [
|
|
1537
1785
|
/* @__PURE__ */ jsxRuntime.jsx(DrawerOverlay, {}),
|
|
1538
1786
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -1578,7 +1826,7 @@ function DrawerFooter({ className, ...props }) {
|
|
|
1578
1826
|
}
|
|
1579
1827
|
);
|
|
1580
1828
|
}
|
|
1581
|
-
var DrawerTitle =
|
|
1829
|
+
var DrawerTitle = React5__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
1582
1830
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1583
1831
|
vaul.Drawer.Title,
|
|
1584
1832
|
{
|
|
@@ -1590,7 +1838,7 @@ var DrawerTitle = React4__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
1590
1838
|
);
|
|
1591
1839
|
});
|
|
1592
1840
|
DrawerTitle.displayName = "DrawerTitle";
|
|
1593
|
-
var DrawerDescription =
|
|
1841
|
+
var DrawerDescription = React5__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
1594
1842
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1595
1843
|
vaul.Drawer.Description,
|
|
1596
1844
|
{
|
|
@@ -1829,7 +2077,7 @@ function Label3({
|
|
|
1829
2077
|
);
|
|
1830
2078
|
}
|
|
1831
2079
|
var Form = reactHookForm.FormProvider;
|
|
1832
|
-
var FormFieldContext =
|
|
2080
|
+
var FormFieldContext = React5__namespace.createContext(
|
|
1833
2081
|
{}
|
|
1834
2082
|
);
|
|
1835
2083
|
var FormField = ({
|
|
@@ -1838,8 +2086,8 @@ var FormField = ({
|
|
|
1838
2086
|
return /* @__PURE__ */ jsxRuntime.jsx(FormFieldContext.Provider, { value: { name: props.name }, children: /* @__PURE__ */ jsxRuntime.jsx(reactHookForm.Controller, { ...props }) });
|
|
1839
2087
|
};
|
|
1840
2088
|
var useFormField = () => {
|
|
1841
|
-
const fieldContext =
|
|
1842
|
-
const itemContext =
|
|
2089
|
+
const fieldContext = React5__namespace.useContext(FormFieldContext);
|
|
2090
|
+
const itemContext = React5__namespace.useContext(FormItemContext);
|
|
1843
2091
|
const { getFieldState } = reactHookForm.useFormContext();
|
|
1844
2092
|
const formState = reactHookForm.useFormState({ name: fieldContext.name });
|
|
1845
2093
|
const fieldState = getFieldState(fieldContext.name, formState);
|
|
@@ -1856,11 +2104,11 @@ var useFormField = () => {
|
|
|
1856
2104
|
...fieldState
|
|
1857
2105
|
};
|
|
1858
2106
|
};
|
|
1859
|
-
var FormItemContext =
|
|
2107
|
+
var FormItemContext = React5__namespace.createContext(
|
|
1860
2108
|
{}
|
|
1861
2109
|
);
|
|
1862
2110
|
function FormItem({ className, ...props }) {
|
|
1863
|
-
const id =
|
|
2111
|
+
const id = React5__namespace.useId();
|
|
1864
2112
|
return /* @__PURE__ */ jsxRuntime.jsx(FormItemContext.Provider, { value: { id }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1865
2113
|
"div",
|
|
1866
2114
|
{
|
|
@@ -1991,7 +2239,7 @@ function InputOTPSlot({
|
|
|
1991
2239
|
className,
|
|
1992
2240
|
...props
|
|
1993
2241
|
}) {
|
|
1994
|
-
const inputOTPContext =
|
|
2242
|
+
const inputOTPContext = React5__namespace.useContext(inputOtp.OTPInputContext);
|
|
1995
2243
|
const { char, hasFakeCaret, isActive: isActive2 } = inputOTPContext?.slots[index] ?? {};
|
|
1996
2244
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1997
2245
|
"div",
|
|
@@ -2522,11 +2770,11 @@ function Popover({
|
|
|
2522
2770
|
}) {
|
|
2523
2771
|
return /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Root, { "data-slot": "popover", ...props });
|
|
2524
2772
|
}
|
|
2525
|
-
var PopoverTrigger =
|
|
2773
|
+
var PopoverTrigger = React5__namespace.forwardRef((props, ref) => {
|
|
2526
2774
|
return /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Trigger, { ref, "data-slot": "popover-trigger", ...props });
|
|
2527
2775
|
});
|
|
2528
2776
|
PopoverTrigger.displayName = PopoverPrimitive__namespace.Trigger.displayName;
|
|
2529
|
-
var PopoverContent =
|
|
2777
|
+
var PopoverContent = React5__namespace.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => {
|
|
2530
2778
|
return /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2531
2779
|
PopoverPrimitive__namespace.Content,
|
|
2532
2780
|
{
|
|
@@ -2543,7 +2791,7 @@ var PopoverContent = React4__namespace.forwardRef(({ className, align = "center"
|
|
|
2543
2791
|
) });
|
|
2544
2792
|
});
|
|
2545
2793
|
PopoverContent.displayName = PopoverPrimitive__namespace.Content.displayName;
|
|
2546
|
-
var PopoverAnchor =
|
|
2794
|
+
var PopoverAnchor = React5__namespace.forwardRef((props, ref) => {
|
|
2547
2795
|
return /* @__PURE__ */ jsxRuntime.jsx(PopoverPrimitive__namespace.Anchor, { ref, "data-slot": "popover-anchor", ...props });
|
|
2548
2796
|
});
|
|
2549
2797
|
PopoverAnchor.displayName = PopoverPrimitive__namespace.Anchor.displayName;
|
|
@@ -2648,59 +2896,6 @@ function ResizableHandle({
|
|
|
2648
2896
|
}
|
|
2649
2897
|
);
|
|
2650
2898
|
}
|
|
2651
|
-
function ScrollArea({
|
|
2652
|
-
className,
|
|
2653
|
-
children,
|
|
2654
|
-
...props
|
|
2655
|
-
}) {
|
|
2656
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2657
|
-
ScrollAreaPrimitive__namespace.Root,
|
|
2658
|
-
{
|
|
2659
|
-
"data-slot": "scroll-area",
|
|
2660
|
-
className: cn("relative", className),
|
|
2661
|
-
...props,
|
|
2662
|
-
children: [
|
|
2663
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2664
|
-
ScrollAreaPrimitive__namespace.Viewport,
|
|
2665
|
-
{
|
|
2666
|
-
"data-slot": "scroll-area-viewport",
|
|
2667
|
-
className: "focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",
|
|
2668
|
-
children
|
|
2669
|
-
}
|
|
2670
|
-
),
|
|
2671
|
-
/* @__PURE__ */ jsxRuntime.jsx(ScrollBar, {}),
|
|
2672
|
-
/* @__PURE__ */ jsxRuntime.jsx(ScrollAreaPrimitive__namespace.Corner, {})
|
|
2673
|
-
]
|
|
2674
|
-
}
|
|
2675
|
-
);
|
|
2676
|
-
}
|
|
2677
|
-
function ScrollBar({
|
|
2678
|
-
className,
|
|
2679
|
-
orientation = "vertical",
|
|
2680
|
-
...props
|
|
2681
|
-
}) {
|
|
2682
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2683
|
-
ScrollAreaPrimitive__namespace.ScrollAreaScrollbar,
|
|
2684
|
-
{
|
|
2685
|
-
"data-slot": "scroll-area-scrollbar",
|
|
2686
|
-
orientation,
|
|
2687
|
-
className: cn(
|
|
2688
|
-
"flex touch-none p-px transition-colors select-none",
|
|
2689
|
-
orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent",
|
|
2690
|
-
orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent",
|
|
2691
|
-
className
|
|
2692
|
-
),
|
|
2693
|
-
...props,
|
|
2694
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2695
|
-
ScrollAreaPrimitive__namespace.ScrollAreaThumb,
|
|
2696
|
-
{
|
|
2697
|
-
"data-slot": "scroll-area-thumb",
|
|
2698
|
-
className: "bg-border relative flex-1 rounded-full"
|
|
2699
|
-
}
|
|
2700
|
-
)
|
|
2701
|
-
}
|
|
2702
|
-
);
|
|
2703
|
-
}
|
|
2704
2899
|
function Select({
|
|
2705
2900
|
...props
|
|
2706
2901
|
}) {
|
|
@@ -2892,7 +3087,7 @@ function SheetPortal({
|
|
|
2892
3087
|
}) {
|
|
2893
3088
|
return /* @__PURE__ */ jsxRuntime.jsx(DialogPrimitive__namespace.Portal, { "data-slot": "sheet-portal", ...props });
|
|
2894
3089
|
}
|
|
2895
|
-
var SheetOverlay =
|
|
3090
|
+
var SheetOverlay = React5__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
2896
3091
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2897
3092
|
DialogPrimitive__namespace.Overlay,
|
|
2898
3093
|
{
|
|
@@ -3003,7 +3198,7 @@ function Slider({
|
|
|
3003
3198
|
max: max2 = 100,
|
|
3004
3199
|
...props
|
|
3005
3200
|
}) {
|
|
3006
|
-
const _values =
|
|
3201
|
+
const _values = React5__namespace.useMemo(
|
|
3007
3202
|
() => Array.isArray(value) ? value : Array.isArray(defaultValue) ? defaultValue : [min2, max2],
|
|
3008
3203
|
[value, defaultValue, min2, max2]
|
|
3009
3204
|
);
|
|
@@ -3142,7 +3337,7 @@ function TableFooter({ className, ...props }) {
|
|
|
3142
3337
|
}
|
|
3143
3338
|
);
|
|
3144
3339
|
}
|
|
3145
|
-
var TableRow =
|
|
3340
|
+
var TableRow = React5__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
3146
3341
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3147
3342
|
"tr",
|
|
3148
3343
|
{
|
|
@@ -3302,7 +3497,7 @@ function Toggle({
|
|
|
3302
3497
|
}
|
|
3303
3498
|
);
|
|
3304
3499
|
}
|
|
3305
|
-
var ToggleGroupContext =
|
|
3500
|
+
var ToggleGroupContext = React5__namespace.createContext({
|
|
3306
3501
|
size: "default",
|
|
3307
3502
|
variant: "default"
|
|
3308
3503
|
});
|
|
@@ -3335,7 +3530,7 @@ function ToggleGroupItem({
|
|
|
3335
3530
|
size,
|
|
3336
3531
|
...props
|
|
3337
3532
|
}) {
|
|
3338
|
-
const context =
|
|
3533
|
+
const context = React5__namespace.useContext(ToggleGroupContext);
|
|
3339
3534
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3340
3535
|
ToggleGroupPrimitive__namespace.Item,
|
|
3341
3536
|
{
|
|
@@ -3433,7 +3628,7 @@ var svg_agvoxj05dl_default = {
|
|
|
3433
3628
|
p75f2980: "M20.3786 15.1414V5.89714C20.3786 5.76004 20.4058 5.62432 20.4588 5.49788C20.5118 5.37144 20.5894 5.2568 20.6871 5.16067C20.7849 5.06453 20.9008 4.98881 21.0281 4.93792C21.1553 4.88704 21.2915 4.862 21.4286 4.86428H22.4186V16.1743H21.4286C21.2915 16.1766 21.1553 16.1515 21.0281 16.1006C20.9008 16.0498 20.7849 15.974 20.6871 15.8779C20.5894 15.7818 20.5118 15.6671 20.4588 15.5407C20.4058 15.4142 20.3786 15.2785 20.3786 15.1414V15.1414Z",
|
|
3434
3629
|
pb292700: "M35.4086 9.31285C36.1566 10.1046 36.5616 11.1597 36.5357 12.2486C36.562 13.3426 36.1572 14.4032 35.4086 15.2014C35.0701 15.5832 34.6534 15.8876 34.1867 16.094C33.7201 16.3003 33.2144 16.4037 32.7043 16.3971C32.2189 16.4239 31.7343 16.3336 31.2912 16.1337C30.8481 15.9337 30.4596 15.6302 30.1586 15.2486V19.6371H29.1686C28.8946 19.6371 28.6319 19.5283 28.4382 19.3346C28.2445 19.1409 28.1357 18.8782 28.1357 18.6043V8.31857H29.3314C29.4402 8.318 29.548 8.33901 29.6486 8.38037C29.7492 8.42174 29.8406 8.48264 29.9176 8.55957C29.9945 8.63649 30.0554 8.7279 30.0967 8.82851C30.1381 8.92912 30.1591 9.03693 30.1586 9.14571V9.24428C30.4606 8.864 30.8493 8.56165 31.2923 8.36255C31.7352 8.16346 32.2194 8.07343 32.7043 8.1C33.2156 8.09642 33.7218 8.20287 34.1884 8.41214C34.655 8.62141 35.0711 8.92859 35.4086 9.31285V9.31285ZM32.3271 14.4557C32.6145 14.465 32.9008 14.4155 33.1683 14.3101C33.4359 14.2047 33.679 14.0457 33.8828 13.8429C34.0917 13.6329 34.2554 13.3823 34.3638 13.1067C34.4721 12.831 34.5229 12.536 34.5128 12.24C34.5244 11.9463 34.4743 11.6535 34.3658 11.3804C34.2573 11.1073 34.0928 10.86 33.8828 10.6543C33.4656 10.2505 32.9077 10.0248 32.3271 10.0248C31.7465 10.0248 31.1887 10.2505 30.7714 10.6543C30.5665 10.8628 30.4064 11.1111 30.301 11.3838C30.1956 11.6565 30.1471 11.9479 30.1586 12.24C30.1495 12.5344 30.199 12.8278 30.3042 13.1029C30.4094 13.3781 30.5682 13.6296 30.7714 13.8429C30.9757 14.0456 31.2187 14.2051 31.486 14.3119C31.7533 14.4187 32.0394 14.4705 32.3271 14.4643V14.4557Z"
|
|
3435
3630
|
};
|
|
3436
|
-
function
|
|
3631
|
+
function BrandLogo2({ variant = "full", mode = "positive", className, ...props }) {
|
|
3437
3632
|
if (variant === "symbol") {
|
|
3438
3633
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("relative inline-block", className), ...props, "data-name": "Logo S\xEDmbolo", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3439
3634
|
"svg",
|
|
@@ -3503,9 +3698,9 @@ function BrandLogo({ variant = "full", mode = "positive", className, ...props })
|
|
|
3503
3698
|
) });
|
|
3504
3699
|
}
|
|
3505
3700
|
var THEMES = { light: "", dark: ".dark" };
|
|
3506
|
-
var ChartContext =
|
|
3701
|
+
var ChartContext = React5__namespace.createContext(null);
|
|
3507
3702
|
function useChart() {
|
|
3508
|
-
const context =
|
|
3703
|
+
const context = React5__namespace.useContext(ChartContext);
|
|
3509
3704
|
if (!context) {
|
|
3510
3705
|
throw new Error("useChart must be used within a <ChartContainer />");
|
|
3511
3706
|
}
|
|
@@ -3518,7 +3713,7 @@ function ChartContainer({
|
|
|
3518
3713
|
config,
|
|
3519
3714
|
...props
|
|
3520
3715
|
}) {
|
|
3521
|
-
const uniqueId =
|
|
3716
|
+
const uniqueId = React5__namespace.useId();
|
|
3522
3717
|
const chartId = `chart-${id || uniqueId.replace(/:/g, "")}`;
|
|
3523
3718
|
return /* @__PURE__ */ jsxRuntime.jsx(ChartContext.Provider, { value: { config }, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3524
3719
|
"div",
|
|
@@ -3579,7 +3774,7 @@ function ChartTooltipContent({
|
|
|
3579
3774
|
labelKey
|
|
3580
3775
|
}) {
|
|
3581
3776
|
const { config } = useChart();
|
|
3582
|
-
const tooltipLabel =
|
|
3777
|
+
const tooltipLabel = React5__namespace.useMemo(() => {
|
|
3583
3778
|
if (hideLabel || !payload?.length) {
|
|
3584
3779
|
return null;
|
|
3585
3780
|
}
|
|
@@ -3739,9 +3934,9 @@ function ColorPicker({
|
|
|
3739
3934
|
className,
|
|
3740
3935
|
disabled = false
|
|
3741
3936
|
}) {
|
|
3742
|
-
const [color, setColor] =
|
|
3743
|
-
const [open, setOpen] =
|
|
3744
|
-
|
|
3937
|
+
const [color, setColor] = React5.useState(value);
|
|
3938
|
+
const [open, setOpen] = React5.useState(false);
|
|
3939
|
+
React5__namespace.useEffect(() => {
|
|
3745
3940
|
setColor(value);
|
|
3746
3941
|
}, [value]);
|
|
3747
3942
|
const handleColorChange = (newColor) => {
|
|
@@ -21587,11 +21782,11 @@ function getInstance() {
|
|
|
21587
21782
|
}
|
|
21588
21783
|
};
|
|
21589
21784
|
}
|
|
21590
|
-
var PureEditorContent = class extends
|
|
21785
|
+
var PureEditorContent = class extends React5__namespace.default.Component {
|
|
21591
21786
|
constructor(props) {
|
|
21592
21787
|
var _a;
|
|
21593
21788
|
super(props);
|
|
21594
|
-
this.editorContentRef =
|
|
21789
|
+
this.editorContentRef = React5__namespace.default.createRef();
|
|
21595
21790
|
this.initialized = false;
|
|
21596
21791
|
this.state = {
|
|
21597
21792
|
hasContentComponentInitialized: Boolean((_a = props.editor) == null ? void 0 : _a.contentComponent)
|
|
@@ -21670,20 +21865,20 @@ var PureEditorContent = class extends React4__namespace.default.Component {
|
|
|
21670
21865
|
] });
|
|
21671
21866
|
}
|
|
21672
21867
|
};
|
|
21673
|
-
var EditorContentWithKey =
|
|
21868
|
+
var EditorContentWithKey = React5.forwardRef(
|
|
21674
21869
|
(props, ref) => {
|
|
21675
|
-
const key =
|
|
21870
|
+
const key = React5__namespace.default.useMemo(() => {
|
|
21676
21871
|
return Math.floor(Math.random() * 4294967295).toString();
|
|
21677
21872
|
}, [props.editor]);
|
|
21678
|
-
return
|
|
21873
|
+
return React5__namespace.default.createElement(PureEditorContent, {
|
|
21679
21874
|
key,
|
|
21680
21875
|
innerRef: ref,
|
|
21681
21876
|
...props
|
|
21682
21877
|
});
|
|
21683
21878
|
}
|
|
21684
21879
|
);
|
|
21685
|
-
var EditorContent =
|
|
21686
|
-
var useIsomorphicLayoutEffect = typeof window !== "undefined" ?
|
|
21880
|
+
var EditorContent = React5__namespace.default.memo(EditorContentWithKey);
|
|
21881
|
+
var useIsomorphicLayoutEffect = typeof window !== "undefined" ? React5.useLayoutEffect : React5.useEffect;
|
|
21687
21882
|
var EditorStateManager = class {
|
|
21688
21883
|
constructor(initialEditor) {
|
|
21689
21884
|
this.transactionNumber = 0;
|
|
@@ -21743,7 +21938,7 @@ var EditorStateManager = class {
|
|
|
21743
21938
|
};
|
|
21744
21939
|
function useEditorState(options) {
|
|
21745
21940
|
var _a;
|
|
21746
|
-
const [editorStateManager] =
|
|
21941
|
+
const [editorStateManager] = React5.useState(() => new EditorStateManager(options.editor));
|
|
21747
21942
|
const selectedState = withSelector_js.useSyncExternalStoreWithSelector(
|
|
21748
21943
|
editorStateManager.subscribe,
|
|
21749
21944
|
editorStateManager.getSnapshot,
|
|
@@ -21754,7 +21949,7 @@ function useEditorState(options) {
|
|
|
21754
21949
|
useIsomorphicLayoutEffect(() => {
|
|
21755
21950
|
return editorStateManager.watch(options.editor);
|
|
21756
21951
|
}, [options.editor, editorStateManager]);
|
|
21757
|
-
|
|
21952
|
+
React5.useDebugValue(selectedState);
|
|
21758
21953
|
return selectedState;
|
|
21759
21954
|
}
|
|
21760
21955
|
var isDev = process.env.NODE_ENV !== "production";
|
|
@@ -21991,16 +22186,16 @@ var EditorInstanceManager = class _EditorInstanceManager {
|
|
|
21991
22186
|
}
|
|
21992
22187
|
};
|
|
21993
22188
|
function useEditor(options = {}, deps = []) {
|
|
21994
|
-
const mostRecentOptions =
|
|
22189
|
+
const mostRecentOptions = React5.useRef(options);
|
|
21995
22190
|
mostRecentOptions.current = options;
|
|
21996
|
-
const [instanceManager] =
|
|
22191
|
+
const [instanceManager] = React5.useState(() => new EditorInstanceManager(mostRecentOptions));
|
|
21997
22192
|
const editor = index_js.useSyncExternalStore(
|
|
21998
22193
|
instanceManager.subscribe,
|
|
21999
22194
|
instanceManager.getEditor,
|
|
22000
22195
|
instanceManager.getServerSnapshot
|
|
22001
22196
|
);
|
|
22002
|
-
|
|
22003
|
-
|
|
22197
|
+
React5.useDebugValue(editor);
|
|
22198
|
+
React5.useEffect(instanceManager.onRender(deps));
|
|
22004
22199
|
useEditorState({
|
|
22005
22200
|
editor,
|
|
22006
22201
|
selector: ({ transactionNumber }) => {
|
|
@@ -22015,19 +22210,19 @@ function useEditor(options = {}, deps = []) {
|
|
|
22015
22210
|
});
|
|
22016
22211
|
return editor;
|
|
22017
22212
|
}
|
|
22018
|
-
var EditorContext =
|
|
22213
|
+
var EditorContext = React5.createContext({
|
|
22019
22214
|
editor: null
|
|
22020
22215
|
});
|
|
22021
22216
|
EditorContext.Consumer;
|
|
22022
|
-
var ReactNodeViewContext =
|
|
22217
|
+
var ReactNodeViewContext = React5.createContext({
|
|
22023
22218
|
onDragStart: () => {
|
|
22024
22219
|
},
|
|
22025
22220
|
nodeViewContentChildren: void 0,
|
|
22026
22221
|
nodeViewContentRef: () => {
|
|
22027
22222
|
}
|
|
22028
22223
|
});
|
|
22029
|
-
var useReactNodeView = () =>
|
|
22030
|
-
|
|
22224
|
+
var useReactNodeView = () => React5.useContext(ReactNodeViewContext);
|
|
22225
|
+
React5__namespace.default.forwardRef((props, ref) => {
|
|
22031
22226
|
const { onDragStart } = useReactNodeView();
|
|
22032
22227
|
const Tag = props.as || "div";
|
|
22033
22228
|
return (
|
|
@@ -22073,8 +22268,8 @@ function canReceiveRef(Component2) {
|
|
|
22073
22268
|
}
|
|
22074
22269
|
function isReact19Plus() {
|
|
22075
22270
|
try {
|
|
22076
|
-
if (
|
|
22077
|
-
const majorVersion = parseInt(
|
|
22271
|
+
if (React5.version) {
|
|
22272
|
+
const majorVersion = parseInt(React5.version.split(".")[0], 10);
|
|
22078
22273
|
return majorVersion >= 19;
|
|
22079
22274
|
}
|
|
22080
22275
|
} catch {
|
|
@@ -22161,7 +22356,7 @@ var ReactRenderer = class {
|
|
|
22161
22356
|
});
|
|
22162
22357
|
}
|
|
22163
22358
|
};
|
|
22164
|
-
|
|
22359
|
+
React5__namespace.default.createContext({
|
|
22165
22360
|
markViewContentRef: () => {
|
|
22166
22361
|
}
|
|
22167
22362
|
});
|
|
@@ -30499,8 +30694,8 @@ tippy.setDefaultProps({
|
|
|
30499
30694
|
render
|
|
30500
30695
|
});
|
|
30501
30696
|
var tippy_esm_default = tippy;
|
|
30502
|
-
var MentionList =
|
|
30503
|
-
const [selectedIndex, setSelectedIndex] =
|
|
30697
|
+
var MentionList = React5.forwardRef((props, ref) => {
|
|
30698
|
+
const [selectedIndex, setSelectedIndex] = React5.useState(0);
|
|
30504
30699
|
const selectItem = (index) => {
|
|
30505
30700
|
const item = props.items[index];
|
|
30506
30701
|
if (item) {
|
|
@@ -30516,10 +30711,10 @@ var MentionList = React4.forwardRef((props, ref) => {
|
|
|
30516
30711
|
const enterHandler = () => {
|
|
30517
30712
|
selectItem(selectedIndex);
|
|
30518
30713
|
};
|
|
30519
|
-
|
|
30714
|
+
React5.useEffect(() => {
|
|
30520
30715
|
setSelectedIndex(0);
|
|
30521
30716
|
}, [props.items]);
|
|
30522
|
-
|
|
30717
|
+
React5.useImperativeHandle(ref, () => ({
|
|
30523
30718
|
onKeyDown: ({ event }) => {
|
|
30524
30719
|
if (event.key === "ArrowUp") {
|
|
30525
30720
|
upHandler();
|
|
@@ -30992,8 +31187,8 @@ var commonStyles = /* @__PURE__ */ stylesheet.create({
|
|
|
30992
31187
|
".": ClassNames.hidden
|
|
30993
31188
|
}, hidden)
|
|
30994
31189
|
});
|
|
30995
|
-
var PickerStyleTag = /* @__PURE__ */
|
|
30996
|
-
return
|
|
31190
|
+
var PickerStyleTag = /* @__PURE__ */ React5.memo(function PickerStyleTag2() {
|
|
31191
|
+
return React5.createElement("style", {
|
|
30997
31192
|
suppressHydrationWarning: true,
|
|
30998
31193
|
dangerouslySetInnerHTML: {
|
|
30999
31194
|
__html: stylesheet.getStyle()
|
|
@@ -31089,8 +31284,8 @@ function useDebouncedState(initialValue, delay) {
|
|
|
31089
31284
|
if (delay === void 0) {
|
|
31090
31285
|
delay = 0;
|
|
31091
31286
|
}
|
|
31092
|
-
var _useState =
|
|
31093
|
-
var timer =
|
|
31287
|
+
var _useState = React5.useState(initialValue), state = _useState[0], setState = _useState[1];
|
|
31288
|
+
var timer = React5.useRef(null);
|
|
31094
31289
|
function debouncedSetState(value) {
|
|
31095
31290
|
return new Promise(function(resolve) {
|
|
31096
31291
|
var _window;
|
|
@@ -31112,9 +31307,9 @@ function useIsUnicodeHidden() {
|
|
|
31112
31307
|
};
|
|
31113
31308
|
}
|
|
31114
31309
|
function useDisallowedEmojis() {
|
|
31115
|
-
var DisallowedEmojisRef =
|
|
31310
|
+
var DisallowedEmojisRef = React5.useRef({});
|
|
31116
31311
|
var emojiVersionConfig = useEmojiVersionConfig();
|
|
31117
|
-
return
|
|
31312
|
+
return React5.useMemo(function() {
|
|
31118
31313
|
var emojiVersion = parseFloat("" + emojiVersionConfig);
|
|
31119
31314
|
if (!emojiVersionConfig || Number.isNaN(emojiVersion)) {
|
|
31120
31315
|
return DisallowedEmojisRef.current;
|
|
@@ -31139,7 +31334,7 @@ function addedInNewerVersion(emoji2, supportedLevel) {
|
|
|
31139
31334
|
return addedIn(emoji2) > supportedLevel;
|
|
31140
31335
|
}
|
|
31141
31336
|
function useMarkInitialLoad(dispatch) {
|
|
31142
|
-
|
|
31337
|
+
React5.useEffect(function() {
|
|
31143
31338
|
dispatch(true);
|
|
31144
31339
|
}, [dispatch]);
|
|
31145
31340
|
}
|
|
@@ -31194,23 +31389,23 @@ function PickerContextProvider(_ref) {
|
|
|
31194
31389
|
var disallowedEmojis = useDisallowedEmojis();
|
|
31195
31390
|
var defaultSkinTone = useDefaultSkinToneConfig();
|
|
31196
31391
|
var reactionsDefaultOpen = useReactionsOpenConfig();
|
|
31197
|
-
var filterRef =
|
|
31198
|
-
var disallowClickRef =
|
|
31199
|
-
var disallowMouseRef =
|
|
31200
|
-
var disallowedEmojisRef =
|
|
31392
|
+
var filterRef = React5.useRef(alphaNumericEmojiIndex);
|
|
31393
|
+
var disallowClickRef = React5.useRef(false);
|
|
31394
|
+
var disallowMouseRef = React5.useRef(false);
|
|
31395
|
+
var disallowedEmojisRef = React5.useRef(disallowedEmojis);
|
|
31201
31396
|
var suggestedUpdateState = useDebouncedState(Date.now(), 200);
|
|
31202
31397
|
var searchTerm = useDebouncedState("", 100);
|
|
31203
|
-
var skinToneFanOpenState =
|
|
31204
|
-
var activeSkinTone =
|
|
31205
|
-
var activeCategoryState =
|
|
31206
|
-
var emojisThatFailedToLoadState =
|
|
31207
|
-
var emojiVariationPickerState =
|
|
31208
|
-
var reactionsModeState =
|
|
31209
|
-
var _useState =
|
|
31210
|
-
var visibleCategoriesState =
|
|
31211
|
-
var emojiSizeState =
|
|
31398
|
+
var skinToneFanOpenState = React5.useState(false);
|
|
31399
|
+
var activeSkinTone = React5.useState(defaultSkinTone);
|
|
31400
|
+
var activeCategoryState = React5.useState(null);
|
|
31401
|
+
var emojisThatFailedToLoadState = React5.useState(/* @__PURE__ */ new Set());
|
|
31402
|
+
var emojiVariationPickerState = React5.useState(null);
|
|
31403
|
+
var reactionsModeState = React5.useState(reactionsDefaultOpen);
|
|
31404
|
+
var _useState = React5.useState(false), isPastInitialLoad = _useState[0], setIsPastInitialLoad = _useState[1];
|
|
31405
|
+
var visibleCategoriesState = React5.useState([]);
|
|
31406
|
+
var emojiSizeState = React5.useState(null);
|
|
31212
31407
|
useMarkInitialLoad(setIsPastInitialLoad);
|
|
31213
|
-
return
|
|
31408
|
+
return React5.createElement(PickerContext.Provider, {
|
|
31214
31409
|
value: {
|
|
31215
31410
|
activeCategoryState,
|
|
31216
31411
|
activeSkinTone,
|
|
@@ -31230,7 +31425,7 @@ function PickerContextProvider(_ref) {
|
|
|
31230
31425
|
}
|
|
31231
31426
|
}, children);
|
|
31232
31427
|
}
|
|
31233
|
-
var PickerContext = /* @__PURE__ */
|
|
31428
|
+
var PickerContext = /* @__PURE__ */ React5.createContext({
|
|
31234
31429
|
activeCategoryState: [null, function() {
|
|
31235
31430
|
}],
|
|
31236
31431
|
activeSkinTone: [SkinTones.NEUTRAL, function() {
|
|
@@ -31270,51 +31465,51 @@ var PickerContext = /* @__PURE__ */ React4.createContext({
|
|
|
31270
31465
|
}]
|
|
31271
31466
|
});
|
|
31272
31467
|
function useFilterRef() {
|
|
31273
|
-
var _React$useContext =
|
|
31468
|
+
var _React$useContext = React5.useContext(PickerContext), filterRef = _React$useContext.filterRef;
|
|
31274
31469
|
return filterRef;
|
|
31275
31470
|
}
|
|
31276
31471
|
function useDisallowClickRef() {
|
|
31277
|
-
var _React$useContext2 =
|
|
31472
|
+
var _React$useContext2 = React5.useContext(PickerContext), disallowClickRef = _React$useContext2.disallowClickRef;
|
|
31278
31473
|
return disallowClickRef;
|
|
31279
31474
|
}
|
|
31280
31475
|
function useDisallowMouseRef() {
|
|
31281
|
-
var _React$useContext3 =
|
|
31476
|
+
var _React$useContext3 = React5.useContext(PickerContext), disallowMouseRef = _React$useContext3.disallowMouseRef;
|
|
31282
31477
|
return disallowMouseRef;
|
|
31283
31478
|
}
|
|
31284
31479
|
function useReactionsModeState() {
|
|
31285
|
-
var _React$useContext4 =
|
|
31480
|
+
var _React$useContext4 = React5.useContext(PickerContext), reactionsModeState = _React$useContext4.reactionsModeState;
|
|
31286
31481
|
return reactionsModeState;
|
|
31287
31482
|
}
|
|
31288
31483
|
function useSearchTermState() {
|
|
31289
|
-
var _React$useContext5 =
|
|
31484
|
+
var _React$useContext5 = React5.useContext(PickerContext), searchTerm = _React$useContext5.searchTerm;
|
|
31290
31485
|
return searchTerm;
|
|
31291
31486
|
}
|
|
31292
31487
|
function useActiveSkinToneState() {
|
|
31293
|
-
var _React$useContext6 =
|
|
31488
|
+
var _React$useContext6 = React5.useContext(PickerContext), activeSkinTone = _React$useContext6.activeSkinTone;
|
|
31294
31489
|
return activeSkinTone;
|
|
31295
31490
|
}
|
|
31296
31491
|
function useEmojisThatFailedToLoadState() {
|
|
31297
|
-
var _React$useContext7 =
|
|
31492
|
+
var _React$useContext7 = React5.useContext(PickerContext), emojisThatFailedToLoadState = _React$useContext7.emojisThatFailedToLoadState;
|
|
31298
31493
|
return emojisThatFailedToLoadState;
|
|
31299
31494
|
}
|
|
31300
31495
|
function useEmojiVariationPickerState() {
|
|
31301
|
-
var _React$useContext9 =
|
|
31496
|
+
var _React$useContext9 = React5.useContext(PickerContext), emojiVariationPickerState = _React$useContext9.emojiVariationPickerState;
|
|
31302
31497
|
return emojiVariationPickerState;
|
|
31303
31498
|
}
|
|
31304
31499
|
function useSkinToneFanOpenState() {
|
|
31305
|
-
var _React$useContext0 =
|
|
31500
|
+
var _React$useContext0 = React5.useContext(PickerContext), skinToneFanOpenState = _React$useContext0.skinToneFanOpenState;
|
|
31306
31501
|
return skinToneFanOpenState;
|
|
31307
31502
|
}
|
|
31308
31503
|
function useVisibleCategoriesState() {
|
|
31309
|
-
var _React$useContext10 =
|
|
31504
|
+
var _React$useContext10 = React5.useContext(PickerContext), visibleCategoriesState = _React$useContext10.visibleCategoriesState;
|
|
31310
31505
|
return visibleCategoriesState;
|
|
31311
31506
|
}
|
|
31312
31507
|
function useEmojiSizeState() {
|
|
31313
|
-
var _React$useContext11 =
|
|
31508
|
+
var _React$useContext11 = React5.useContext(PickerContext), emojiSizeState = _React$useContext11.emojiSizeState;
|
|
31314
31509
|
return emojiSizeState;
|
|
31315
31510
|
}
|
|
31316
31511
|
function useUpdateSuggested() {
|
|
31317
|
-
var _React$useContext12 =
|
|
31512
|
+
var _React$useContext12 = React5.useContext(PickerContext), suggestedUpdateState = _React$useContext12.suggestedUpdateState;
|
|
31318
31513
|
var suggestedUpdated = suggestedUpdateState[0], setsuggestedUpdate = suggestedUpdateState[1];
|
|
31319
31514
|
return [suggestedUpdated, function updateSuggested() {
|
|
31320
31515
|
setsuggestedUpdate(Date.now());
|
|
@@ -48319,7 +48514,7 @@ function emojiUnified(emoji2, skinTone) {
|
|
|
48319
48514
|
function useGetEmojisByCategory() {
|
|
48320
48515
|
var suggestedEmojisModeConfig = useSuggestedEmojisModeConfig();
|
|
48321
48516
|
var _useUpdateSuggested = useUpdateSuggested(), suggestedUpdated = _useUpdateSuggested[0];
|
|
48322
|
-
var suggested =
|
|
48517
|
+
var suggested = React5__namespace.default.useMemo(
|
|
48323
48518
|
function() {
|
|
48324
48519
|
var _getSuggested;
|
|
48325
48520
|
var suggested2 = (_getSuggested = getSuggested(suggestedEmojisModeConfig)) != null ? _getSuggested : [];
|
|
@@ -48463,20 +48658,20 @@ var basePreviewConfig = {
|
|
|
48463
48658
|
showPreview: true
|
|
48464
48659
|
};
|
|
48465
48660
|
var _excluded = ["children"];
|
|
48466
|
-
var ConfigContext = /* @__PURE__ */
|
|
48661
|
+
var ConfigContext = /* @__PURE__ */ React5.createContext(/* @__PURE__ */ basePickerConfig());
|
|
48467
48662
|
function PickerConfigProvider(_ref) {
|
|
48468
48663
|
var children = _ref.children, config = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
48469
48664
|
var mergedConfig = useSetConfig(config);
|
|
48470
|
-
return
|
|
48665
|
+
return React5.createElement(ConfigContext.Provider, {
|
|
48471
48666
|
value: mergedConfig
|
|
48472
48667
|
}, children);
|
|
48473
48668
|
}
|
|
48474
48669
|
function useSetConfig(config) {
|
|
48475
48670
|
var _config$customEmojis;
|
|
48476
|
-
var _React$useState =
|
|
48671
|
+
var _React$useState = React5.useState(function() {
|
|
48477
48672
|
return mergeConfig(config);
|
|
48478
48673
|
}), mergedConfig = _React$useState[0], setMergedConfig = _React$useState[1];
|
|
48479
|
-
|
|
48674
|
+
React5.useEffect(function() {
|
|
48480
48675
|
if (compareConfig(mergedConfig, config)) {
|
|
48481
48676
|
return;
|
|
48482
48677
|
}
|
|
@@ -48485,24 +48680,24 @@ function useSetConfig(config) {
|
|
|
48485
48680
|
return mergedConfig;
|
|
48486
48681
|
}
|
|
48487
48682
|
function usePickerConfig() {
|
|
48488
|
-
return
|
|
48683
|
+
return React5.useContext(ConfigContext);
|
|
48489
48684
|
}
|
|
48490
|
-
var MutableConfigContext = /* @__PURE__ */
|
|
48685
|
+
var MutableConfigContext = /* @__PURE__ */ React5__namespace.default.createContext({});
|
|
48491
48686
|
function useMutableConfig() {
|
|
48492
|
-
var mutableConfig =
|
|
48687
|
+
var mutableConfig = React5__namespace.default.useContext(MutableConfigContext);
|
|
48493
48688
|
return mutableConfig;
|
|
48494
48689
|
}
|
|
48495
48690
|
function useDefineMutableConfig(config) {
|
|
48496
|
-
var MutableConfigRef =
|
|
48691
|
+
var MutableConfigRef = React5__namespace.default.useRef({
|
|
48497
48692
|
onEmojiClick: config.onEmojiClick || emptyFunc,
|
|
48498
48693
|
onReactionClick: config.onReactionClick || config.onEmojiClick,
|
|
48499
48694
|
onSkinToneChange: config.onSkinToneChange || emptyFunc
|
|
48500
48695
|
});
|
|
48501
|
-
|
|
48696
|
+
React5__namespace.default.useEffect(function() {
|
|
48502
48697
|
MutableConfigRef.current.onEmojiClick = config.onEmojiClick || emptyFunc;
|
|
48503
48698
|
MutableConfigRef.current.onReactionClick = config.onReactionClick || config.onEmojiClick;
|
|
48504
48699
|
}, [config.onEmojiClick, config.onReactionClick]);
|
|
48505
|
-
|
|
48700
|
+
React5__namespace.default.useEffect(function() {
|
|
48506
48701
|
MutableConfigRef.current.onSkinToneChange = config.onSkinToneChange || emptyFunc;
|
|
48507
48702
|
}, [config.onSkinToneChange]);
|
|
48508
48703
|
return MutableConfigRef;
|
|
@@ -48687,16 +48882,16 @@ function getActiveElement() {
|
|
|
48687
48882
|
}
|
|
48688
48883
|
function ElementRefContextProvider(_ref) {
|
|
48689
48884
|
var children = _ref.children;
|
|
48690
|
-
var PickerMainRef =
|
|
48691
|
-
var AnchoredEmojiRef =
|
|
48692
|
-
var BodyRef =
|
|
48693
|
-
var EmojiListRef =
|
|
48694
|
-
var SearchInputRef =
|
|
48695
|
-
var SkinTonePickerRef =
|
|
48696
|
-
var CategoryNavigationRef =
|
|
48697
|
-
var VariationPickerRef =
|
|
48698
|
-
var ReactionsRef =
|
|
48699
|
-
return
|
|
48885
|
+
var PickerMainRef = React5.useRef(null);
|
|
48886
|
+
var AnchoredEmojiRef = React5.useRef(null);
|
|
48887
|
+
var BodyRef = React5.useRef(null);
|
|
48888
|
+
var EmojiListRef = React5.useRef(null);
|
|
48889
|
+
var SearchInputRef = React5.useRef(null);
|
|
48890
|
+
var SkinTonePickerRef = React5.useRef(null);
|
|
48891
|
+
var CategoryNavigationRef = React5.useRef(null);
|
|
48892
|
+
var VariationPickerRef = React5.useRef(null);
|
|
48893
|
+
var ReactionsRef = React5.useRef(null);
|
|
48894
|
+
return React5.createElement(ElementRefContext.Provider, {
|
|
48700
48895
|
value: {
|
|
48701
48896
|
AnchoredEmojiRef,
|
|
48702
48897
|
BodyRef,
|
|
@@ -48710,19 +48905,19 @@ function ElementRefContextProvider(_ref) {
|
|
|
48710
48905
|
}
|
|
48711
48906
|
}, children);
|
|
48712
48907
|
}
|
|
48713
|
-
var ElementRefContext = /* @__PURE__ */
|
|
48714
|
-
AnchoredEmojiRef: /* @__PURE__ */
|
|
48715
|
-
BodyRef: /* @__PURE__ */
|
|
48716
|
-
CategoryNavigationRef: /* @__PURE__ */
|
|
48717
|
-
EmojiListRef: /* @__PURE__ */
|
|
48718
|
-
PickerMainRef: /* @__PURE__ */
|
|
48719
|
-
SearchInputRef: /* @__PURE__ */
|
|
48720
|
-
SkinTonePickerRef: /* @__PURE__ */
|
|
48721
|
-
VariationPickerRef: /* @__PURE__ */
|
|
48722
|
-
ReactionsRef: /* @__PURE__ */
|
|
48908
|
+
var ElementRefContext = /* @__PURE__ */ React5.createContext({
|
|
48909
|
+
AnchoredEmojiRef: /* @__PURE__ */ React5.createRef(),
|
|
48910
|
+
BodyRef: /* @__PURE__ */ React5.createRef(),
|
|
48911
|
+
CategoryNavigationRef: /* @__PURE__ */ React5.createRef(),
|
|
48912
|
+
EmojiListRef: /* @__PURE__ */ React5.createRef(),
|
|
48913
|
+
PickerMainRef: /* @__PURE__ */ React5.createRef(),
|
|
48914
|
+
SearchInputRef: /* @__PURE__ */ React5.createRef(),
|
|
48915
|
+
SkinTonePickerRef: /* @__PURE__ */ React5.createRef(),
|
|
48916
|
+
VariationPickerRef: /* @__PURE__ */ React5.createRef(),
|
|
48917
|
+
ReactionsRef: /* @__PURE__ */ React5.createRef()
|
|
48723
48918
|
});
|
|
48724
48919
|
function useElementRef() {
|
|
48725
|
-
return
|
|
48920
|
+
return React5.useContext(ElementRefContext);
|
|
48726
48921
|
}
|
|
48727
48922
|
function useEmojiListRef() {
|
|
48728
48923
|
return useElementRef()["EmojiListRef"];
|
|
@@ -48783,7 +48978,7 @@ function scrollBy(root, by) {
|
|
|
48783
48978
|
}
|
|
48784
48979
|
function useScrollTo() {
|
|
48785
48980
|
var BodyRef = useBodyRef();
|
|
48786
|
-
return
|
|
48981
|
+
return React5.useCallback(function(top2) {
|
|
48787
48982
|
requestAnimationFrame(function() {
|
|
48788
48983
|
if (BodyRef.current) {
|
|
48789
48984
|
BodyRef.current.scrollTop = top2;
|
|
@@ -48920,7 +49115,7 @@ function visibleEmojiOneRowDown(element) {
|
|
|
48920
49115
|
function useCloseAllOpenToggles() {
|
|
48921
49116
|
var _useEmojiVariationPic = useEmojiVariationPickerState(), variationPicker = _useEmojiVariationPic[0], setVariationPicker = _useEmojiVariationPic[1];
|
|
48922
49117
|
var _useSkinToneFanOpenSt = useSkinToneFanOpenState(), skinToneFanOpen = _useSkinToneFanOpenSt[0], setSkinToneFanOpen = _useSkinToneFanOpenSt[1];
|
|
48923
|
-
var closeAllOpenToggles =
|
|
49118
|
+
var closeAllOpenToggles = React5.useCallback(function() {
|
|
48924
49119
|
if (variationPicker) {
|
|
48925
49120
|
setVariationPicker(null);
|
|
48926
49121
|
}
|
|
@@ -48959,7 +49154,7 @@ function useOnMouseMove() {
|
|
|
48959
49154
|
var BodyRef = useBodyRef();
|
|
48960
49155
|
var allowMouseMove = useAllowMouseMove();
|
|
48961
49156
|
var isMouseDisallowed = useIsMouseDisallowed();
|
|
48962
|
-
|
|
49157
|
+
React5.useEffect(function() {
|
|
48963
49158
|
var bodyRef = BodyRef.current;
|
|
48964
49159
|
bodyRef == null ? void 0 : bodyRef.addEventListener("mousemove", onMouseMove, {
|
|
48965
49160
|
passive: true
|
|
@@ -48976,13 +49171,13 @@ function useOnMouseMove() {
|
|
|
48976
49171
|
}
|
|
48977
49172
|
function useFocusSearchInput() {
|
|
48978
49173
|
var SearchInputRef = useSearchInputRef();
|
|
48979
|
-
return
|
|
49174
|
+
return React5.useCallback(function() {
|
|
48980
49175
|
focusElement(SearchInputRef.current);
|
|
48981
49176
|
}, [SearchInputRef]);
|
|
48982
49177
|
}
|
|
48983
49178
|
function useFocusSkinTonePicker() {
|
|
48984
49179
|
var SkinTonePickerRef = useSkinTonePickerRef();
|
|
48985
|
-
return
|
|
49180
|
+
return React5.useCallback(function() {
|
|
48986
49181
|
if (!SkinTonePickerRef.current) {
|
|
48987
49182
|
return;
|
|
48988
49183
|
}
|
|
@@ -48991,7 +49186,7 @@ function useFocusSkinTonePicker() {
|
|
|
48991
49186
|
}
|
|
48992
49187
|
function useFocusCategoryNavigation() {
|
|
48993
49188
|
var CategoryNavigationRef = useCategoryNavigationRef();
|
|
48994
|
-
return
|
|
49189
|
+
return React5.useCallback(function() {
|
|
48995
49190
|
if (!CategoryNavigationRef.current) {
|
|
48996
49191
|
return;
|
|
48997
49192
|
}
|
|
@@ -49175,7 +49370,7 @@ function usePickerMainKeyboardEvents() {
|
|
|
49175
49370
|
var hasOpenToggles = useHasOpenToggles();
|
|
49176
49371
|
var disallowMouseMove = useDisallowMouseMove();
|
|
49177
49372
|
var closeAllOpenToggles = useCloseAllOpenToggles();
|
|
49178
|
-
var onKeyDown =
|
|
49373
|
+
var onKeyDown = React5.useMemo(function() {
|
|
49179
49374
|
return function onKeyDown2(event) {
|
|
49180
49375
|
var key = event.key;
|
|
49181
49376
|
disallowMouseMove();
|
|
@@ -49194,7 +49389,7 @@ function usePickerMainKeyboardEvents() {
|
|
|
49194
49389
|
}
|
|
49195
49390
|
};
|
|
49196
49391
|
}, [scrollTo2, clearSearch, closeAllOpenToggles, focusSearchInput, hasOpenToggles, disallowMouseMove]);
|
|
49197
|
-
|
|
49392
|
+
React5.useEffect(function() {
|
|
49198
49393
|
var current = PickerMainRef.current;
|
|
49199
49394
|
if (!current) {
|
|
49200
49395
|
return;
|
|
@@ -49213,7 +49408,7 @@ function useSearchInputKeyboardEvents() {
|
|
|
49213
49408
|
var _useSkinToneFanOpenSt = useSkinToneFanOpenState(), setSkinToneFanOpenState = _useSkinToneFanOpenSt[1];
|
|
49214
49409
|
var goDownFromSearchInput = useGoDownFromSearchInput();
|
|
49215
49410
|
var isSkinToneInSearch = useIsSkinToneInSearch();
|
|
49216
|
-
var onKeyDown =
|
|
49411
|
+
var onKeyDown = React5.useMemo(function() {
|
|
49217
49412
|
return function onKeyDown2(event) {
|
|
49218
49413
|
var key = event.key;
|
|
49219
49414
|
switch (key) {
|
|
@@ -49236,7 +49431,7 @@ function useSearchInputKeyboardEvents() {
|
|
|
49236
49431
|
}
|
|
49237
49432
|
};
|
|
49238
49433
|
}, [focusSkinTonePicker, goDownFromSearchInput, setSkinToneFanOpenState, BodyRef, isSkinToneInSearch]);
|
|
49239
|
-
|
|
49434
|
+
React5.useEffect(function() {
|
|
49240
49435
|
var current = SearchInputRef.current;
|
|
49241
49436
|
if (!current) {
|
|
49242
49437
|
return;
|
|
@@ -49256,7 +49451,7 @@ function useSkinTonePickerKeyboardEvents() {
|
|
|
49256
49451
|
var isSkinToneInPreview = useIsSkinToneInPreview();
|
|
49257
49452
|
var isSkinToneInSearch = useIsSkinToneInSearch();
|
|
49258
49453
|
var onType = useOnType();
|
|
49259
|
-
var onKeyDown =
|
|
49454
|
+
var onKeyDown = React5.useMemo(function() {
|
|
49260
49455
|
return (
|
|
49261
49456
|
// eslint-disable-next-line complexity
|
|
49262
49457
|
(function onKeyDown2(event) {
|
|
@@ -49313,7 +49508,7 @@ function useSkinTonePickerKeyboardEvents() {
|
|
|
49313
49508
|
})
|
|
49314
49509
|
);
|
|
49315
49510
|
}, [isOpen, focusSearchInput, setIsOpen, goDownFromSearchInput, onType, isSkinToneInPreview, isSkinToneInSearch]);
|
|
49316
|
-
|
|
49511
|
+
React5.useEffect(function() {
|
|
49317
49512
|
var current = SkinTonePickerRef.current;
|
|
49318
49513
|
if (!current) {
|
|
49319
49514
|
return;
|
|
@@ -49329,7 +49524,7 @@ function useCategoryNavigationKeyboardEvents() {
|
|
|
49329
49524
|
var CategoryNavigationRef = useCategoryNavigationRef();
|
|
49330
49525
|
var BodyRef = useBodyRef();
|
|
49331
49526
|
var onType = useOnType();
|
|
49332
|
-
var onKeyDown =
|
|
49527
|
+
var onKeyDown = React5.useMemo(function() {
|
|
49333
49528
|
return function onKeyDown2(event) {
|
|
49334
49529
|
var key = event.key;
|
|
49335
49530
|
switch (key) {
|
|
@@ -49355,7 +49550,7 @@ function useCategoryNavigationKeyboardEvents() {
|
|
|
49355
49550
|
}
|
|
49356
49551
|
};
|
|
49357
49552
|
}, [BodyRef, focusSearchInput, onType]);
|
|
49358
|
-
|
|
49553
|
+
React5.useEffect(function() {
|
|
49359
49554
|
var current = CategoryNavigationRef.current;
|
|
49360
49555
|
if (!current) {
|
|
49361
49556
|
return;
|
|
@@ -49373,7 +49568,7 @@ function useBodyKeyboardEvents() {
|
|
|
49373
49568
|
var hasOpenToggles = useHasOpenToggles();
|
|
49374
49569
|
var closeAllOpenToggles = useCloseAllOpenToggles();
|
|
49375
49570
|
var onType = useOnType();
|
|
49376
|
-
var onKeyDown =
|
|
49571
|
+
var onKeyDown = React5.useMemo(function() {
|
|
49377
49572
|
return (
|
|
49378
49573
|
// eslint-disable-next-line complexity
|
|
49379
49574
|
(function onKeyDown2(event) {
|
|
@@ -49415,7 +49610,7 @@ function useBodyKeyboardEvents() {
|
|
|
49415
49610
|
})
|
|
49416
49611
|
);
|
|
49417
49612
|
}, [goUpFromBody, onType, setVariationPicker, hasOpenToggles, closeAllOpenToggles]);
|
|
49418
|
-
|
|
49613
|
+
React5.useEffect(function() {
|
|
49419
49614
|
var current = BodyRef.current;
|
|
49420
49615
|
if (!current) {
|
|
49421
49616
|
return;
|
|
@@ -49430,7 +49625,7 @@ function useGoDownFromSearchInput() {
|
|
|
49430
49625
|
var focusCategoryNavigation = useFocusCategoryNavigation();
|
|
49431
49626
|
var isSearchMode = useIsSearchMode();
|
|
49432
49627
|
var BodyRef = useBodyRef();
|
|
49433
|
-
return
|
|
49628
|
+
return React5.useCallback(function goDownFromSearchInput() {
|
|
49434
49629
|
if (isSearchMode) {
|
|
49435
49630
|
return focusFirstVisibleEmoji(BodyRef.current);
|
|
49436
49631
|
}
|
|
@@ -49441,7 +49636,7 @@ function useGoUpFromBody() {
|
|
|
49441
49636
|
var focusSearchInput = useFocusSearchInput();
|
|
49442
49637
|
var focusCategoryNavigation = useFocusCategoryNavigation();
|
|
49443
49638
|
var isSearchMode = useIsSearchMode();
|
|
49444
|
-
return
|
|
49639
|
+
return React5.useCallback(function goUpFromEmoji() {
|
|
49445
49640
|
if (isSearchMode) {
|
|
49446
49641
|
return focusSearchInput();
|
|
49447
49642
|
}
|
|
@@ -49533,7 +49728,7 @@ function useOnFocus() {
|
|
|
49533
49728
|
var BodyRef = useBodyRef();
|
|
49534
49729
|
var emojiStyle = useEmojiStyleConfig();
|
|
49535
49730
|
var getEmojiUrl = useGetEmojiUrlConfig();
|
|
49536
|
-
|
|
49731
|
+
React5.useEffect(function() {
|
|
49537
49732
|
if (emojiStyle === EmojiStyle.NATIVE) {
|
|
49538
49733
|
return;
|
|
49539
49734
|
}
|
|
@@ -49561,7 +49756,7 @@ var _excluded$1 = ["width", "height"];
|
|
|
49561
49756
|
var DEFAULT_LABEL_HEIGHT = 40;
|
|
49562
49757
|
function PickerMain(_ref) {
|
|
49563
49758
|
var children = _ref.children;
|
|
49564
|
-
return
|
|
49759
|
+
return React5.createElement(PickerContextProvider, null, React5.createElement(PickerRootElement, null, children));
|
|
49565
49760
|
}
|
|
49566
49761
|
function PickerRootElement(_ref2) {
|
|
49567
49762
|
var _cx;
|
|
@@ -49575,7 +49770,7 @@ function PickerRootElement(_ref2) {
|
|
|
49575
49770
|
useKeyboardNavigation();
|
|
49576
49771
|
useOnFocus();
|
|
49577
49772
|
var _ref3 = style2 || {}, width = _ref3.width, height = _ref3.height, styleProps = _objectWithoutPropertiesLoose(_ref3, _excluded$1);
|
|
49578
|
-
return
|
|
49773
|
+
return React5.createElement("aside", {
|
|
49579
49774
|
className: cx(styles.main, styles.baseVariables, theme === Theme.DARK && styles.darkTheme, theme === Theme.AUTO && styles.autoThemeDark, (_cx = {}, _cx[ClassNames.searchActive] = searchModeActive, _cx), reactionsMode && styles.reactionsMenu, className),
|
|
49580
49775
|
ref: PickerMainRef,
|
|
49581
49776
|
style: _extends({}, styleProps, !reactionsMode && {
|
|
@@ -49986,7 +50181,7 @@ function isCustomEmoji(emoji2) {
|
|
|
49986
50181
|
return emoji2.imgUrl !== void 0;
|
|
49987
50182
|
}
|
|
49988
50183
|
function useMouseDownHandlers(ContainerRef, mouseEventSource) {
|
|
49989
|
-
var mouseDownTimerRef =
|
|
50184
|
+
var mouseDownTimerRef = React5.useRef();
|
|
49990
50185
|
var setVariationPicker = useSetVariationPicker();
|
|
49991
50186
|
var disallowClickRef = useDisallowClickRef();
|
|
49992
50187
|
var _useEmojiVariationPic = useEmojiVariationPickerState(), setEmojiVariationPicker = _useEmojiVariationPic[1];
|
|
@@ -49996,7 +50191,7 @@ function useMouseDownHandlers(ContainerRef, mouseEventSource) {
|
|
|
49996
50191
|
var _useUpdateSuggested = useUpdateSuggested(), updateSuggested = _useUpdateSuggested[1];
|
|
49997
50192
|
var getEmojiUrl = useGetEmojiUrlConfig();
|
|
49998
50193
|
var activeEmojiStyle = useEmojiStyleConfig();
|
|
49999
|
-
var onClick =
|
|
50194
|
+
var onClick = React5.useCallback(function onClick2(event) {
|
|
50000
50195
|
if (disallowClickRef.current) {
|
|
50001
50196
|
return;
|
|
50002
50197
|
}
|
|
@@ -50010,7 +50205,7 @@ function useMouseDownHandlers(ContainerRef, mouseEventSource) {
|
|
|
50010
50205
|
setSuggested(emoji2, skinToneToUse);
|
|
50011
50206
|
onEmojiClick(emojiClickOutput(emoji2, skinToneToUse, activeEmojiStyle, getEmojiUrl), event);
|
|
50012
50207
|
}, [activeSkinTone, closeAllOpenToggles, disallowClickRef, onEmojiClick, updateSuggested, getEmojiUrl, activeEmojiStyle]);
|
|
50013
|
-
var onMouseDown =
|
|
50208
|
+
var onMouseDown = React5.useCallback(function onMouseDown2(event) {
|
|
50014
50209
|
var _window;
|
|
50015
50210
|
if (mouseDownTimerRef.current) {
|
|
50016
50211
|
clearTimeout(mouseDownTimerRef.current);
|
|
@@ -50027,7 +50222,7 @@ function useMouseDownHandlers(ContainerRef, mouseEventSource) {
|
|
|
50027
50222
|
setEmojiVariationPicker(emoji2);
|
|
50028
50223
|
}, 500);
|
|
50029
50224
|
}, [disallowClickRef, closeAllOpenToggles, setVariationPicker, setEmojiVariationPicker]);
|
|
50030
|
-
var onMouseUp =
|
|
50225
|
+
var onMouseUp = React5.useCallback(function onMouseUp2() {
|
|
50031
50226
|
if (mouseDownTimerRef.current) {
|
|
50032
50227
|
clearTimeout(mouseDownTimerRef.current);
|
|
50033
50228
|
mouseDownTimerRef.current = void 0;
|
|
@@ -50037,7 +50232,7 @@ function useMouseDownHandlers(ContainerRef, mouseEventSource) {
|
|
|
50037
50232
|
});
|
|
50038
50233
|
}
|
|
50039
50234
|
}, [disallowClickRef]);
|
|
50040
|
-
|
|
50235
|
+
React5.useEffect(function() {
|
|
50041
50236
|
if (!ContainerRef.current) {
|
|
50042
50237
|
return;
|
|
50043
50238
|
}
|
|
@@ -50100,7 +50295,7 @@ function emojiClickOutput(emoji2, activeSkinTone, activeEmojiStyle, getEmojiUrl)
|
|
|
50100
50295
|
};
|
|
50101
50296
|
}
|
|
50102
50297
|
function Button3(props) {
|
|
50103
|
-
return
|
|
50298
|
+
return React5.createElement("button", Object.assign({
|
|
50104
50299
|
type: "button"
|
|
50105
50300
|
}, props, {
|
|
50106
50301
|
className: cx(styles$1.button, props.className)
|
|
@@ -50118,7 +50313,7 @@ var styles$1 = /* @__PURE__ */ stylesheet.create({
|
|
|
50118
50313
|
function ClickableEmojiButton(_ref) {
|
|
50119
50314
|
var _cx;
|
|
50120
50315
|
var emojiNames2 = _ref.emojiNames, unified = _ref.unified, hidden2 = _ref.hidden, hiddenOnSearch = _ref.hiddenOnSearch, _ref$showVariations = _ref.showVariations, showVariations = _ref$showVariations === void 0 ? true : _ref$showVariations, hasVariations = _ref.hasVariations, children = _ref.children, className = _ref.className, _ref$noBackground = _ref.noBackground, noBackground = _ref$noBackground === void 0 ? false : _ref$noBackground, style2 = _ref.style;
|
|
50121
|
-
return
|
|
50316
|
+
return React5.createElement(Button3, {
|
|
50122
50317
|
className: cx(styles$2.emoji, hidden2 && commonStyles.hidden, hiddenOnSearch && commonInteractionStyles.hiddenOnSearch, (_cx = {}, _cx[ClassNames.visible] = !hidden2 && !hiddenOnSearch, _cx), !!(hasVariations && showVariations) && styles$2.hasVariations, noBackground && styles$2.noBackground, className),
|
|
50123
50318
|
"data-unified": unified,
|
|
50124
50319
|
"aria-label": getAriaLabel(emojiNames2),
|
|
@@ -50197,7 +50392,7 @@ var emojiStyles = /* @__PURE__ */ stylesheet.create({
|
|
|
50197
50392
|
});
|
|
50198
50393
|
function EmojiImg(_ref) {
|
|
50199
50394
|
var emojiName2 = _ref.emojiName, style2 = _ref.style, _ref$lazyLoad = _ref.lazyLoad, lazyLoad = _ref$lazyLoad === void 0 ? false : _ref$lazyLoad, imgUrl = _ref.imgUrl, onError = _ref.onError, className = _ref.className;
|
|
50200
|
-
return
|
|
50395
|
+
return React5.createElement("img", {
|
|
50201
50396
|
src: imgUrl,
|
|
50202
50397
|
alt: emojiName2,
|
|
50203
50398
|
className: cx(styles$3.emojiImag, emojiStyles.external, emojiStyles.common, className),
|
|
@@ -50218,7 +50413,7 @@ var styles$3 = /* @__PURE__ */ stylesheet.create({
|
|
|
50218
50413
|
});
|
|
50219
50414
|
function NativeEmoji(_ref) {
|
|
50220
50415
|
var unified = _ref.unified, style2 = _ref.style, className = _ref.className;
|
|
50221
|
-
return
|
|
50416
|
+
return React5.createElement("span", {
|
|
50222
50417
|
className: cx(styles$4.nativeEmoji, emojiStyles.common, emojiStyles.external, className),
|
|
50223
50418
|
"data-unified": unified,
|
|
50224
50419
|
style: style2
|
|
@@ -50250,7 +50445,7 @@ function ViewOnlyEmoji(_ref) {
|
|
|
50250
50445
|
return null;
|
|
50251
50446
|
}
|
|
50252
50447
|
if (isCustomEmoji(emojiToRender)) {
|
|
50253
|
-
return
|
|
50448
|
+
return React5.createElement(EmojiImg, {
|
|
50254
50449
|
style: style2,
|
|
50255
50450
|
emojiName: unified,
|
|
50256
50451
|
emojiStyle: EmojiStyle.NATIVE,
|
|
@@ -50260,11 +50455,11 @@ function ViewOnlyEmoji(_ref) {
|
|
|
50260
50455
|
className
|
|
50261
50456
|
});
|
|
50262
50457
|
}
|
|
50263
|
-
return
|
|
50458
|
+
return React5.createElement(React5.Fragment, null, emojiStyle === EmojiStyle.NATIVE ? React5.createElement(NativeEmoji, {
|
|
50264
50459
|
unified,
|
|
50265
50460
|
style: style2,
|
|
50266
50461
|
className
|
|
50267
|
-
}) :
|
|
50462
|
+
}) : React5.createElement(EmojiImg, {
|
|
50268
50463
|
style: style2,
|
|
50269
50464
|
emojiName: emojiName(emojiToRender),
|
|
50270
50465
|
emojiStyle,
|
|
@@ -50282,7 +50477,7 @@ function ViewOnlyEmoji(_ref) {
|
|
|
50282
50477
|
function ClickableEmoji(_ref) {
|
|
50283
50478
|
var emoji2 = _ref.emoji, unified = _ref.unified, hidden2 = _ref.hidden, hiddenOnSearch = _ref.hiddenOnSearch, emojiStyle = _ref.emojiStyle, _ref$showVariations = _ref.showVariations, showVariations = _ref$showVariations === void 0 ? true : _ref$showVariations, size = _ref.size, lazyLoad = _ref.lazyLoad, getEmojiUrl = _ref.getEmojiUrl, className = _ref.className, _ref$noBackground = _ref.noBackground, noBackground = _ref$noBackground === void 0 ? false : _ref$noBackground, style2 = _ref.style;
|
|
50284
50479
|
var hasVariations = emojiHasVariations(emoji2);
|
|
50285
|
-
return
|
|
50480
|
+
return React5.createElement(ClickableEmojiButton, {
|
|
50286
50481
|
hasVariations,
|
|
50287
50482
|
showVariations,
|
|
50288
50483
|
hidden: hidden2,
|
|
@@ -50291,7 +50486,7 @@ function ClickableEmoji(_ref) {
|
|
|
50291
50486
|
unified,
|
|
50292
50487
|
noBackground,
|
|
50293
50488
|
style: style2
|
|
50294
|
-
},
|
|
50489
|
+
}, React5.createElement(ViewOnlyEmoji, {
|
|
50295
50490
|
unified,
|
|
50296
50491
|
emoji: emoji2,
|
|
50297
50492
|
size,
|
|
@@ -50301,10 +50496,10 @@ function ClickableEmoji(_ref) {
|
|
|
50301
50496
|
className
|
|
50302
50497
|
}));
|
|
50303
50498
|
}
|
|
50304
|
-
var
|
|
50499
|
+
var Plus2 = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI4LjEuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHdpZHRoPSIyMHB4IiBoZWlnaHQ9IjgwcHgiIHZpZXdCb3g9IjAgMCAyMCA4MCIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMjAgODAiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8cGF0aCBmaWxsPSIjODY4Njg2IiBkPSJNNS43LDEwLjRjMCwwLjEsMC4xLDAuMywwLjIsMC40QzYsMTAuOSw2LjEsMTEsNi4zLDExaDMuNHYzLjRjMCwwLjEsMC4xLDAuMywwLjIsMC40CgljMC4xLDAuMSwwLjIsMC4yLDAuNCwwLjJjMC4zLDAsMC41LTAuMiwwLjUtMC41di0zLjRoMy40YzAuMywwLDAuNS0wLjIsMC41LTAuNXMtMC4yLTAuNS0wLjUtMC41aC0zLjRWNi43YzAtMC4zLTAuMi0wLjUtMC41LTAuNQoJQzkuOCw2LDkuNiw2LjIsOS42LDYuNXYzLjRINi4yQzUuOSw5LjksNS43LDEwLjEsNS43LDEwLjRMNS43LDEwLjR6Ii8+CjxwYXRoIGZpbGw9IiMzMzcxQjciIGQ9Ik01LjcsMzAuNGMwLDAuMSwwLjEsMC4zLDAuMiwwLjRTNi4xLDMxLDYuMywzMWgzLjR2My40YzAsMC4xLDAuMSwwLjMsMC4yLDAuNGMwLjEsMC4xLDAuMiwwLjIsMC40LDAuMgoJYzAuMywwLDAuNS0wLjIsMC41LTAuNXYtMy40aDMuNGMwLjMsMCwwLjUtMC4yLDAuNS0wLjVzLTAuMi0wLjUtMC41LTAuNWgtMy40di0zLjRjMC0wLjMtMC4yLTAuNS0wLjUtMC41cy0wLjUsMC4yLTAuNSwwLjV2My40SDYuMgoJQzUuOSwyOS45LDUuNywzMC4xLDUuNywzMC40TDUuNywzMC40eiIvPgo8cGF0aCBmaWxsPSIjQzBDMEJGIiBkPSJNNS43LDUwLjRjMCwwLjEsMC4xLDAuMywwLjIsMC40QzYsNTAuOSw2LjEsNTEsNi4zLDUxaDMuNHYzLjRjMCwwLjEsMC4xLDAuMywwLjIsMC40CgljMC4xLDAuMSwwLjIsMC4yLDAuNCwwLjJjMC4zLDAsMC41LTAuMiwwLjUtMC41di0zLjRoMy40YzAuMywwLDAuNS0wLjIsMC41LTAuNXMtMC4yLTAuNS0wLjUtMC41aC0zLjR2LTMuNGMwLTAuMy0wLjItMC41LTAuNS0wLjUKCXMtMC41LDAuMi0wLjUsMC41djMuNEg2LjJDNS45LDQ5LjksNS43LDUwLjEsNS43LDUwLjRMNS43LDUwLjR6Ii8+CjxwYXRoIGZpbGw9IiM2QUE5REQiIGQ9Ik01LjcsNzAuNGMwLDAuMSwwLjEsMC4zLDAuMiwwLjRTNi4xLDcxLDYuMyw3MWgzLjR2My40YzAsMC4xLDAuMSwwLjMsMC4yLDAuNGMwLjEsMC4xLDAuMiwwLjIsMC40LDAuMgoJYzAuMywwLDAuNS0wLjIsMC41LTAuNXYtMy40aDMuNGMwLjMsMCwwLjUtMC4yLDAuNS0wLjVzLTAuMi0wLjUtMC41LTAuNWgtMy40di0zLjRjMC0wLjMtMC4yLTAuNS0wLjUtMC41cy0wLjUsMC4yLTAuNSwwLjV2My40SDYuNAoJQzUuOSw2OS45LDUuNyw3MC4xLDUuNyw3MC40TDUuNyw3MC40eiIvPgo8L3N2Zz4=";
|
|
50305
50500
|
function BtnPlus() {
|
|
50306
50501
|
var _useReactionsModeStat = useReactionsModeState(), setReactionsMode = _useReactionsModeStat[1];
|
|
50307
|
-
return
|
|
50502
|
+
return React5.createElement(Button3, {
|
|
50308
50503
|
"aria-label": "Show all Emojis",
|
|
50309
50504
|
title: "Show all Emojis",
|
|
50310
50505
|
tabIndex: 0,
|
|
@@ -50332,7 +50527,7 @@ var styles$5 = /* @__PURE__ */ stylesheet.create(/* @__PURE__ */ _extends({
|
|
|
50332
50527
|
content: "",
|
|
50333
50528
|
minWidth: "20px",
|
|
50334
50529
|
minHeight: "20px",
|
|
50335
|
-
backgroundImage: "url(" +
|
|
50530
|
+
backgroundImage: "url(" + Plus2 + ")",
|
|
50336
50531
|
backgroundColor: "transparent",
|
|
50337
50532
|
backgroundRepeat: "no-repeat",
|
|
50338
50533
|
backgroundSize: "20px",
|
|
@@ -50372,13 +50567,13 @@ function Reactions() {
|
|
|
50372
50567
|
if (!reactionsOpen) {
|
|
50373
50568
|
return null;
|
|
50374
50569
|
}
|
|
50375
|
-
return
|
|
50570
|
+
return React5.createElement("ul", {
|
|
50376
50571
|
className: cx(styles$6.list, !reactionsOpen && commonStyles.hidden),
|
|
50377
50572
|
ref: ReactionsRef
|
|
50378
50573
|
}, reactions.map(function(reaction) {
|
|
50379
|
-
return
|
|
50574
|
+
return React5.createElement("li", {
|
|
50380
50575
|
key: reaction
|
|
50381
|
-
},
|
|
50576
|
+
}, React5.createElement(ClickableEmoji, {
|
|
50382
50577
|
emoji: emojiByUnified(reaction),
|
|
50383
50578
|
emojiStyle,
|
|
50384
50579
|
unified: reaction,
|
|
@@ -50387,7 +50582,7 @@ function Reactions() {
|
|
|
50387
50582
|
noBackground: true,
|
|
50388
50583
|
getEmojiUrl
|
|
50389
50584
|
}));
|
|
50390
|
-
}), allowExpandReactions ?
|
|
50585
|
+
}), allowExpandReactions ? React5.createElement("li", null, React5.createElement(BtnPlus, null)) : null);
|
|
50391
50586
|
}
|
|
50392
50587
|
var styles$6 = /* @__PURE__ */ stylesheet.create({
|
|
50393
50588
|
list: {
|
|
@@ -50414,8 +50609,8 @@ var styles$6 = /* @__PURE__ */ stylesheet.create({
|
|
|
50414
50609
|
});
|
|
50415
50610
|
function useOnScroll(BodyRef) {
|
|
50416
50611
|
var closeAllOpenToggles = useCloseAllOpenToggles();
|
|
50417
|
-
var _useState =
|
|
50418
|
-
|
|
50612
|
+
var _useState = React5.useState(0), scrollTop = _useState[0], setScrollTop = _useState[1];
|
|
50613
|
+
React5.useEffect(function() {
|
|
50419
50614
|
var bodyRef = BodyRef.current;
|
|
50420
50615
|
if (!bodyRef) {
|
|
50421
50616
|
return;
|
|
@@ -50455,11 +50650,11 @@ function useCategoryHeight(emojiCount) {
|
|
|
50455
50650
|
var EmojiListRef = useEmojiListRef();
|
|
50456
50651
|
var _useReactionsModeStat = useReactionsModeState(), isReactionsMode = _useReactionsModeStat[0];
|
|
50457
50652
|
var PickerMainRef = usePickerMainRef();
|
|
50458
|
-
var emojiSizeRef =
|
|
50653
|
+
var emojiSizeRef = React5.useRef();
|
|
50459
50654
|
var _useVisibleCategories = useVisibleCategoriesState(), visibleCategories = _useVisibleCategories[0];
|
|
50460
50655
|
var _useEmojiSizeState = useEmojiSizeState(), emojiSizeFromContext = _useEmojiSizeState[0];
|
|
50461
|
-
var _React$useState =
|
|
50462
|
-
var computeAndSetDimensions =
|
|
50656
|
+
var _React$useState = React5.useState(), dimensions = _React$useState[0], setDimensions = _React$useState[1];
|
|
50657
|
+
var computeAndSetDimensions = React5.useCallback(function() {
|
|
50463
50658
|
var listEl = EmojiListRef.current;
|
|
50464
50659
|
if (!listEl) return;
|
|
50465
50660
|
var emojiElement = listEl.querySelector(EmojiButtonSelector);
|
|
@@ -50479,10 +50674,10 @@ function useCategoryHeight(emojiCount) {
|
|
|
50479
50674
|
emojiSize
|
|
50480
50675
|
});
|
|
50481
50676
|
}, [EmojiListRef, emojiCount, emojiSizeFromContext]);
|
|
50482
|
-
|
|
50677
|
+
React5.useEffect(function() {
|
|
50483
50678
|
computeAndSetDimensions();
|
|
50484
50679
|
}, [emojiCount, isReactionsMode, computeAndSetDimensions, visibleCategories.length]);
|
|
50485
|
-
|
|
50680
|
+
React5.useEffect(function() {
|
|
50486
50681
|
var rootEl = PickerMainRef.current;
|
|
50487
50682
|
if (!rootEl) return;
|
|
50488
50683
|
var handler = function handler2(e) {
|
|
@@ -50540,7 +50735,7 @@ function useEmojiVirtualization(_ref) {
|
|
|
50540
50735
|
return !failedToLoad && !filteredOut && !hidden2 && !isDisallowed;
|
|
50541
50736
|
});
|
|
50542
50737
|
var dimensions = useCategoryHeight(emojisToPush.length);
|
|
50543
|
-
|
|
50738
|
+
React5.useEffect(function() {
|
|
50544
50739
|
if (dimensions) {
|
|
50545
50740
|
onHeightReady(dimensions.categoryHeight);
|
|
50546
50741
|
}
|
|
@@ -50568,7 +50763,7 @@ function useEmojiVirtualization(_ref) {
|
|
|
50568
50763
|
virtualizedCounter++;
|
|
50569
50764
|
return accumulator;
|
|
50570
50765
|
}
|
|
50571
|
-
accumulator.push(
|
|
50766
|
+
accumulator.push(React5.createElement(ClickableEmoji, {
|
|
50572
50767
|
showVariations,
|
|
50573
50768
|
key: unified,
|
|
50574
50769
|
emoji: emoji2,
|
|
@@ -50592,13 +50787,13 @@ function EmojiCategory(_ref) {
|
|
|
50592
50787
|
var categoryConfig = _ref.categoryConfig, children = _ref.children, hidden2 = _ref.hidden, hiddenOnSearch = _ref.hiddenOnSearch, height = _ref.height;
|
|
50593
50788
|
var category = categoryFromCategoryConfig(categoryConfig);
|
|
50594
50789
|
var categoryName = categoryNameFromCategoryConfig(categoryConfig);
|
|
50595
|
-
return
|
|
50790
|
+
return React5.createElement("li", {
|
|
50596
50791
|
className: cx(styles$7.category, hidden2 && commonStyles.hidden, hiddenOnSearch && commonInteractionStyles.hiddenOnSearch),
|
|
50597
50792
|
"data-name": category,
|
|
50598
50793
|
"aria-label": categoryName
|
|
50599
|
-
},
|
|
50794
|
+
}, React5.createElement("h2", {
|
|
50600
50795
|
className: cx(styles$7.label)
|
|
50601
|
-
}, categoryName),
|
|
50796
|
+
}, categoryName), React5.createElement("div", {
|
|
50602
50797
|
className: cx(styles$7.categoryContent),
|
|
50603
50798
|
style: {
|
|
50604
50799
|
height
|
|
@@ -50648,8 +50843,8 @@ function MeasureEmoji() {
|
|
|
50648
50843
|
var lazyLoadEmojis = useLazyLoadEmojisConfig();
|
|
50649
50844
|
var _useActiveSkinToneSta = useActiveSkinToneState(), activeSkinTone = _useActiveSkinToneSta[0];
|
|
50650
50845
|
var _useEmojiSizeState = useEmojiSizeState(), emojiSize = _useEmojiSizeState[0], setEmojiSize = _useEmojiSizeState[1];
|
|
50651
|
-
var ref =
|
|
50652
|
-
|
|
50846
|
+
var ref = React5.useRef(null);
|
|
50847
|
+
React5.useLayoutEffect(function() {
|
|
50653
50848
|
if (ref.current) {
|
|
50654
50849
|
setEmojiSize(ref.current.clientHeight);
|
|
50655
50850
|
}
|
|
@@ -50663,9 +50858,9 @@ function MeasureEmoji() {
|
|
|
50663
50858
|
if (!dummyEmoji) {
|
|
50664
50859
|
return null;
|
|
50665
50860
|
}
|
|
50666
|
-
return
|
|
50861
|
+
return React5.createElement("div", {
|
|
50667
50862
|
ref
|
|
50668
|
-
},
|
|
50863
|
+
}, React5.createElement(ClickableEmoji, {
|
|
50669
50864
|
emoji: dummyEmoji,
|
|
50670
50865
|
unified,
|
|
50671
50866
|
emojiStyle,
|
|
@@ -50688,24 +50883,24 @@ function MeasureEmoji() {
|
|
|
50688
50883
|
function EmojiList(_ref) {
|
|
50689
50884
|
var scrollTop = _ref.scrollTop;
|
|
50690
50885
|
var categories = useCategoriesConfig();
|
|
50691
|
-
var _React$useState =
|
|
50886
|
+
var _React$useState = React5.useState({}), categoryHeights = _React$useState[0], setCategoryHeights = _React$useState[1];
|
|
50692
50887
|
var EmojiListRef = useEmojiListRef();
|
|
50693
50888
|
var getEmojisByCategory = useGetEmojisByCategory();
|
|
50694
50889
|
var labelHeight = getLabelHeight(EmojiListRef.current);
|
|
50695
50890
|
var topOffset = 0;
|
|
50696
|
-
return
|
|
50891
|
+
return React5.createElement("ul", {
|
|
50697
50892
|
className: cx(styles$8.emojiList),
|
|
50698
50893
|
ref: EmojiListRef
|
|
50699
|
-
},
|
|
50894
|
+
}, React5.createElement(MeasureEmoji, null), categories.map(function(categoryConfig) {
|
|
50700
50895
|
var category = categoryFromCategoryConfig(categoryConfig);
|
|
50701
50896
|
var currentOffset = topOffset;
|
|
50702
50897
|
var categoryHeight = categoryHeights[category];
|
|
50703
50898
|
if (categoryHeight) {
|
|
50704
50899
|
topOffset += categoryHeight + labelHeight;
|
|
50705
50900
|
}
|
|
50706
|
-
return
|
|
50901
|
+
return React5.createElement(React5.Suspense, {
|
|
50707
50902
|
key: category
|
|
50708
|
-
},
|
|
50903
|
+
}, React5.createElement(RenderCategory, {
|
|
50709
50904
|
categoryEmojis: getEmojisByCategory(category),
|
|
50710
50905
|
categoryConfig,
|
|
50711
50906
|
topOffset: currentOffset,
|
|
@@ -50731,7 +50926,7 @@ function RenderCategory(_ref2) {
|
|
|
50731
50926
|
scrollTop,
|
|
50732
50927
|
isCategoryVisible: visibleCategories.includes(categoryConfig.category)
|
|
50733
50928
|
}), virtualizedCounter = _useEmojiVirtualizati.virtualizedCounter, emojis2 = _useEmojiVirtualizati.emojis, dimensions = _useEmojiVirtualizati.dimensions;
|
|
50734
|
-
return
|
|
50929
|
+
return React5.createElement(EmojiCategory, {
|
|
50735
50930
|
categoryConfig,
|
|
50736
50931
|
height: dimensions == null ? void 0 : dimensions.categoryHeight,
|
|
50737
50932
|
// Indicates that there are no visible emojis
|
|
@@ -50764,7 +50959,7 @@ function EmojiVariationPicker() {
|
|
|
50764
50959
|
var getEmojiUrl = useGetEmojiUrlConfig();
|
|
50765
50960
|
var button = buttonFromTarget(AnchoredEmojiRef.current);
|
|
50766
50961
|
var visible = Boolean(emoji2 && button && emojiHasVariations(emoji2) && button.classList.contains(ClassNames.emojiHasVariations));
|
|
50767
|
-
|
|
50962
|
+
React5.useEffect(function() {
|
|
50768
50963
|
if (!visible) {
|
|
50769
50964
|
return;
|
|
50770
50965
|
}
|
|
@@ -50777,14 +50972,14 @@ function EmojiVariationPicker() {
|
|
|
50777
50972
|
top2 = getTop();
|
|
50778
50973
|
pointerStyle = getPointerStyle();
|
|
50779
50974
|
}
|
|
50780
|
-
return
|
|
50975
|
+
return React5.createElement("div", {
|
|
50781
50976
|
ref: VariationPickerRef,
|
|
50782
50977
|
className: cx(styles$9.variationPicker, getMenuDirection() === Direction.Down && styles$9.pointingUp, visible && styles$9.visible),
|
|
50783
50978
|
style: {
|
|
50784
50979
|
top: top2
|
|
50785
50980
|
}
|
|
50786
50981
|
}, visible && emoji2 ? [emojiUnified(emoji2)].concat(emojiVariations(emoji2)).slice(0, 6).map(function(unified) {
|
|
50787
|
-
return
|
|
50982
|
+
return React5.createElement(ClickableEmoji, {
|
|
50788
50983
|
key: unified,
|
|
50789
50984
|
emoji: emoji2,
|
|
50790
50985
|
unified,
|
|
@@ -50792,7 +50987,7 @@ function EmojiVariationPicker() {
|
|
|
50792
50987
|
showVariations: false,
|
|
50793
50988
|
getEmojiUrl
|
|
50794
50989
|
});
|
|
50795
|
-
}) : null,
|
|
50990
|
+
}) : null, React5.createElement("div", {
|
|
50796
50991
|
className: cx(styles$9.pointer),
|
|
50797
50992
|
style: pointerStyle
|
|
50798
50993
|
}));
|
|
@@ -50909,10 +51104,10 @@ function Body() {
|
|
|
50909
51104
|
var scrollTop = useOnScroll(BodyRef);
|
|
50910
51105
|
useMouseDownHandlers(BodyRef, MOUSE_EVENT_SOURCE.PICKER);
|
|
50911
51106
|
useOnMouseMove();
|
|
50912
|
-
return
|
|
51107
|
+
return React5.createElement("div", {
|
|
50913
51108
|
className: cx(styles$a.body, commonInteractionStyles.hiddenOnReactions),
|
|
50914
51109
|
ref: BodyRef
|
|
50915
|
-
},
|
|
51110
|
+
}, React5.createElement(EmojiVariationPicker, null), React5.createElement(EmojiList, {
|
|
50916
51111
|
scrollTop
|
|
50917
51112
|
}));
|
|
50918
51113
|
}
|
|
@@ -50937,7 +51132,7 @@ function useEmojiPreviewEvents(allow, setPreviewEmoji) {
|
|
|
50937
51132
|
var BodyRef = useBodyRef();
|
|
50938
51133
|
var isMouseDisallowed = useIsMouseDisallowed();
|
|
50939
51134
|
var allowMouseMove = useAllowMouseMove();
|
|
50940
|
-
|
|
51135
|
+
React5.useEffect(function() {
|
|
50941
51136
|
if (!allow) {
|
|
50942
51137
|
return;
|
|
50943
51138
|
}
|
|
@@ -51022,7 +51217,7 @@ var FlexDirection;
|
|
|
51022
51217
|
})(FlexDirection || (FlexDirection = {}));
|
|
51023
51218
|
function Flex(_ref) {
|
|
51024
51219
|
var children = _ref.children, className = _ref.className, _ref$style = _ref.style, style2 = _ref$style === void 0 ? {} : _ref$style, _ref$direction = _ref.direction, direction = _ref$direction === void 0 ? FlexDirection.ROW : _ref$direction;
|
|
51025
|
-
return
|
|
51220
|
+
return React5.createElement("div", {
|
|
51026
51221
|
style: _extends({}, style2),
|
|
51027
51222
|
className: cx(styles$b.flex, className, styles$b[direction])
|
|
51028
51223
|
}, children);
|
|
@@ -51038,7 +51233,7 @@ var styles$b = /* @__PURE__ */ stylesheet.create((_stylesheet$create = {
|
|
|
51038
51233
|
}, _stylesheet$create));
|
|
51039
51234
|
function Space(_ref) {
|
|
51040
51235
|
var className = _ref.className, _ref$style = _ref.style, style2 = _ref$style === void 0 ? {} : _ref$style;
|
|
51041
|
-
return
|
|
51236
|
+
return React5.createElement("div", {
|
|
51042
51237
|
style: _extends({
|
|
51043
51238
|
flex: 1
|
|
51044
51239
|
}, style2),
|
|
@@ -51047,7 +51242,7 @@ function Space(_ref) {
|
|
|
51047
51242
|
}
|
|
51048
51243
|
function Absolute(_ref) {
|
|
51049
51244
|
var children = _ref.children, className = _ref.className, style2 = _ref.style;
|
|
51050
|
-
return
|
|
51245
|
+
return React5.createElement("div", {
|
|
51051
51246
|
style: _extends({}, style2, {
|
|
51052
51247
|
position: "absolute"
|
|
51053
51248
|
}),
|
|
@@ -51056,7 +51251,7 @@ function Absolute(_ref) {
|
|
|
51056
51251
|
}
|
|
51057
51252
|
function Relative(_ref) {
|
|
51058
51253
|
var children = _ref.children, className = _ref.className, style2 = _ref.style;
|
|
51059
|
-
return
|
|
51254
|
+
return React5.createElement("div", {
|
|
51060
51255
|
style: _extends({}, style2, {
|
|
51061
51256
|
position: "relative"
|
|
51062
51257
|
}),
|
|
@@ -51065,7 +51260,7 @@ function Relative(_ref) {
|
|
|
51065
51260
|
}
|
|
51066
51261
|
function BtnSkinToneVariation(_ref) {
|
|
51067
51262
|
var isOpen = _ref.isOpen, onClick = _ref.onClick, isActive2 = _ref.isActive, skinToneVariation = _ref.skinToneVariation, style2 = _ref.style;
|
|
51068
|
-
return
|
|
51263
|
+
return React5.createElement(Button3, {
|
|
51069
51264
|
style: style2,
|
|
51070
51265
|
onClick,
|
|
51071
51266
|
className: cx("epr-tone-" + skinToneVariation, styles$c.tone, !isOpen && styles$c.closedTone, isActive2 && styles$c.active),
|
|
@@ -51124,16 +51319,16 @@ var styles$c = /* @__PURE__ */ stylesheet.create({
|
|
|
51124
51319
|
});
|
|
51125
51320
|
var ITEM_SIZE = 28;
|
|
51126
51321
|
function SkinTonePickerMenu() {
|
|
51127
|
-
return
|
|
51322
|
+
return React5.createElement(Relative, {
|
|
51128
51323
|
style: {
|
|
51129
51324
|
height: ITEM_SIZE
|
|
51130
51325
|
}
|
|
51131
|
-
},
|
|
51326
|
+
}, React5.createElement(Absolute, {
|
|
51132
51327
|
style: {
|
|
51133
51328
|
bottom: 0,
|
|
51134
51329
|
right: 0
|
|
51135
51330
|
}
|
|
51136
|
-
},
|
|
51331
|
+
}, React5.createElement(SkinTonePicker, {
|
|
51137
51332
|
direction: SkinTonePickerDirection.VERTICAL
|
|
51138
51333
|
})));
|
|
51139
51334
|
}
|
|
@@ -51152,7 +51347,7 @@ function SkinTonePicker(_ref) {
|
|
|
51152
51347
|
var fullWidth = ITEM_SIZE * skinToneVariations.length + "px";
|
|
51153
51348
|
var expandedSize = isOpen ? fullWidth : ITEM_SIZE + "px";
|
|
51154
51349
|
var vertical = direction === SkinTonePickerDirection.VERTICAL;
|
|
51155
|
-
return
|
|
51350
|
+
return React5.createElement(Relative, {
|
|
51156
51351
|
className: cx(styles$d.skinTones, vertical && styles$d.vertical, isOpen && styles$d.open, vertical && isOpen && styles$d.verticalShadow),
|
|
51157
51352
|
style: vertical ? {
|
|
51158
51353
|
flexBasis: expandedSize,
|
|
@@ -51160,12 +51355,12 @@ function SkinTonePicker(_ref) {
|
|
|
51160
51355
|
} : {
|
|
51161
51356
|
flexBasis: expandedSize
|
|
51162
51357
|
}
|
|
51163
|
-
},
|
|
51358
|
+
}, React5.createElement("div", {
|
|
51164
51359
|
className: cx(styles$d.select),
|
|
51165
51360
|
ref: SkinTonePickerRef
|
|
51166
51361
|
}, skinToneVariations.map(function(skinToneVariation, i) {
|
|
51167
51362
|
var active = skinToneVariation === activeSkinTone;
|
|
51168
|
-
return
|
|
51363
|
+
return React5.createElement(BtnSkinToneVariation, {
|
|
51169
51364
|
key: skinToneVariation,
|
|
51170
51365
|
skinToneVariation,
|
|
51171
51366
|
isOpen,
|
|
@@ -51235,42 +51430,42 @@ function Preview() {
|
|
|
51235
51430
|
if (!previewConfig.showPreview) {
|
|
51236
51431
|
return null;
|
|
51237
51432
|
}
|
|
51238
|
-
return
|
|
51433
|
+
return React5.createElement(Flex, {
|
|
51239
51434
|
className: cx(styles$e.preview, commonInteractionStyles.hiddenOnReactions, reactionsOpen && styles$e.hideOnReactions)
|
|
51240
|
-
},
|
|
51435
|
+
}, React5.createElement(PreviewBody, null), React5.createElement(Space, null), isSkinToneInPreview ? React5.createElement(SkinTonePickerMenu, null) : null);
|
|
51241
51436
|
}
|
|
51242
51437
|
function PreviewBody() {
|
|
51243
51438
|
var _previewEmoji$unified;
|
|
51244
51439
|
var previewConfig = usePreviewConfig();
|
|
51245
|
-
var _useState =
|
|
51440
|
+
var _useState = React5.useState(null), previewEmoji = _useState[0], setPreviewEmoji = _useState[1];
|
|
51246
51441
|
var emojiStyle = useEmojiStyleConfig();
|
|
51247
51442
|
var _useEmojiVariationPic = useEmojiVariationPickerState(), variationPickerEmoji = _useEmojiVariationPic[0];
|
|
51248
51443
|
var getEmojiUrl = useGetEmojiUrlConfig();
|
|
51249
51444
|
useEmojiPreviewEvents(previewConfig.showPreview, setPreviewEmoji);
|
|
51250
51445
|
var emoji2 = emojiByUnified((_previewEmoji$unified = previewEmoji == null ? void 0 : previewEmoji.unified) != null ? _previewEmoji$unified : previewEmoji == null ? void 0 : previewEmoji.originalUnified);
|
|
51251
51446
|
var show = emoji2 != null && previewEmoji != null;
|
|
51252
|
-
return
|
|
51447
|
+
return React5.createElement(PreviewContent, null);
|
|
51253
51448
|
function PreviewContent() {
|
|
51254
51449
|
var defaultEmoji = variationPickerEmoji != null ? variationPickerEmoji : emojiByUnified(previewConfig.defaultEmoji);
|
|
51255
51450
|
if (!defaultEmoji) {
|
|
51256
51451
|
return null;
|
|
51257
51452
|
}
|
|
51258
51453
|
var defaultText = variationPickerEmoji ? emojiName(variationPickerEmoji) : previewConfig.defaultCaption;
|
|
51259
|
-
return
|
|
51454
|
+
return React5.createElement(React5.Fragment, null, React5.createElement("div", null, show ? React5.createElement(ViewOnlyEmoji, {
|
|
51260
51455
|
unified: previewEmoji == null ? void 0 : previewEmoji.unified,
|
|
51261
51456
|
emoji: emoji2,
|
|
51262
51457
|
emojiStyle,
|
|
51263
51458
|
size: 45,
|
|
51264
51459
|
getEmojiUrl,
|
|
51265
51460
|
className: cx(styles$e.emoji)
|
|
51266
|
-
}) : defaultEmoji ?
|
|
51461
|
+
}) : defaultEmoji ? React5.createElement(ViewOnlyEmoji, {
|
|
51267
51462
|
unified: emojiUnified(defaultEmoji),
|
|
51268
51463
|
emoji: defaultEmoji,
|
|
51269
51464
|
emojiStyle,
|
|
51270
51465
|
size: 45,
|
|
51271
51466
|
getEmojiUrl,
|
|
51272
51467
|
className: cx(styles$e.emoji)
|
|
51273
|
-
}) : null),
|
|
51468
|
+
}) : null), React5.createElement("div", {
|
|
51274
51469
|
className: cx(styles$e.label)
|
|
51275
51470
|
}, show ? emojiName(emoji2) : defaultText));
|
|
51276
51471
|
}
|
|
@@ -51305,7 +51500,7 @@ function categoryNameFromDom($category) {
|
|
|
51305
51500
|
function useActiveCategoryScrollDetection(_ref) {
|
|
51306
51501
|
var setActiveCategory = _ref.setActiveCategory, setVisibleCategories = _ref.setVisibleCategories;
|
|
51307
51502
|
var BodyRef = useBodyRef();
|
|
51308
|
-
|
|
51503
|
+
React5.useEffect(function() {
|
|
51309
51504
|
var visibleCategories = /* @__PURE__ */ new Map();
|
|
51310
51505
|
var intersectingCategories = /* @__PURE__ */ new Map();
|
|
51311
51506
|
var bodyRef = BodyRef.current;
|
|
@@ -51381,7 +51576,7 @@ var SVGNavigation = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZ
|
|
|
51381
51576
|
function CategoryButton(_ref) {
|
|
51382
51577
|
var _cx;
|
|
51383
51578
|
var isActiveCategory = _ref.isActiveCategory, category = _ref.category, allowNavigation = _ref.allowNavigation, categoryConfig = _ref.categoryConfig, onClick = _ref.onClick;
|
|
51384
|
-
return
|
|
51579
|
+
return React5.createElement(Button3, {
|
|
51385
51580
|
tabIndex: allowNavigation ? 0 : -1,
|
|
51386
51581
|
className: cx(styles$f.catBtn, commonInteractionStyles.categoryBtn, "epr-icn-" + category, (_cx = {}, _cx[ClassNames.active] = isActiveCategory, _cx)),
|
|
51387
51582
|
onClick,
|
|
@@ -51463,7 +51658,7 @@ var styles$f = /* @__PURE__ */ stylesheet.create(/* @__PURE__ */ _extends({
|
|
|
51463
51658
|
".epr-auto-theme": /* @__PURE__ */ _extends({}, DarkInactivePosition)
|
|
51464
51659
|
}));
|
|
51465
51660
|
function CategoryNavigation() {
|
|
51466
|
-
var _useState =
|
|
51661
|
+
var _useState = React5.useState(null), activeCategory = _useState[0], setActiveCategory = _useState[1];
|
|
51467
51662
|
var _useVisibleCategories = useVisibleCategoriesState(), setVisibleCategories = _useVisibleCategories[1];
|
|
51468
51663
|
var scrollCategoryIntoView = useScrollCategoryIntoView();
|
|
51469
51664
|
useActiveCategoryScrollDetection({
|
|
@@ -51474,7 +51669,7 @@ function CategoryNavigation() {
|
|
|
51474
51669
|
var categoriesConfig = useCategoriesConfig();
|
|
51475
51670
|
var CategoryNavigationRef = useCategoryNavigationRef();
|
|
51476
51671
|
var hideCustomCategory = useShouldHideCustomEmojis();
|
|
51477
|
-
return
|
|
51672
|
+
return React5.createElement("div", {
|
|
51478
51673
|
className: cx(styles$g.nav),
|
|
51479
51674
|
role: "tablist",
|
|
51480
51675
|
"aria-label": "Category navigation",
|
|
@@ -51487,7 +51682,7 @@ function CategoryNavigation() {
|
|
|
51487
51682
|
return null;
|
|
51488
51683
|
}
|
|
51489
51684
|
var allowNavigation = !isSearchMode && !isActiveCategory;
|
|
51490
|
-
return
|
|
51685
|
+
return React5.createElement(CategoryButton, {
|
|
51491
51686
|
key: category,
|
|
51492
51687
|
category,
|
|
51493
51688
|
isActiveCategory,
|
|
@@ -51528,12 +51723,12 @@ var styles$g = /* @__PURE__ */ stylesheet.create({
|
|
|
51528
51723
|
var SVGTimes = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI2LjMuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHdpZHRoPSIyMHB4IiBoZWlnaHQ9IjgwcHgiIHZpZXdCb3g9IjAgMCAyMCA4MCIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMjAgODAiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8cGF0aCBmaWxsPSIjODY4Njg2IiBkPSJNNi45OCwxMy41OWMwLjEsMC4xLDAuMjQsMC4xNSwwLjM3LDAuMTVzMC4yNy0wLjA1LDAuMzctMC4xNWwyLjQyLTIuNDJsMi40MywyLjQzCgljMC4xLDAuMSwwLjI0LDAuMTUsMC4zNywwLjE1YzAuMTQsMCwwLjI3LTAuMDUsMC4zNy0wLjE1YzAuMjEtMC4yMSwwLjIxLTAuNTQsMC0wLjc1bC0yLjQzLTIuNDNMMTMuMzIsOAoJYzAuMjEtMC4yMSwwLjIxLTAuNTQsMC0wLjc1Yy0wLjIxLTAuMjEtMC41NC0wLjIxLTAuNzUsMGwtMi40MiwyLjQyTDcuNzQsNy4yN2MtMC4yMS0wLjIxLTAuNTQtMC4yMS0wLjc1LDAKCWMtMC4yMSwwLjIxLTAuMjEsMC41NCwwLDAuNzVsMi40MSwyLjQxbC0yLjQyLDIuNDJDNi43NywxMy4wNSw2Ljc3LDEzLjM5LDYuOTgsMTMuNTlMNi45OCwxMy41OXoiLz4KPHBhdGggZmlsbD0iIzg2ODY4NiIgZD0iTTEwLjE1LDE4LjQzYzQuNDEsMCw4LTMuNTksOC04YzAtNC40MS0zLjU5LTgtOC04Yy00LjQxLDAtOCwzLjU5LTgsOEMyLjE1LDE0Ljg0LDUuNzQsMTguNDMsMTAuMTUsMTguNDN6CgkgTTEwLjE1LDMuNDljMy44MywwLDYuOTQsMy4xMSw2Ljk0LDYuOTRjMCwzLjgzLTMuMTEsNi45NC02Ljk0LDYuOTRjLTMuODMsMC02Ljk0LTMuMTEtNi45NC02Ljk0QzMuMjEsNi42LDYuMzMsMy40OSwxMC4xNSwzLjQ5CglMMTAuMTUsMy40OXoiLz4KPHBhdGggZmlsbD0iIzMzNzFCNyIgZD0iTTYuOTgsMzMuNTljMC4xLDAuMSwwLjI0LDAuMTUsMC4zNywwLjE1czAuMjctMC4wNSwwLjM3LTAuMTVsMi40Mi0yLjQybDIuNDMsMi40MwoJYzAuMSwwLjEsMC4yNCwwLjE1LDAuMzcsMC4xNWMwLjE0LDAsMC4yNy0wLjA1LDAuMzctMC4xNWMwLjIxLTAuMjEsMC4yMS0wLjU0LDAtMC43NWwtMi40My0yLjQzTDEzLjMyLDI4CgljMC4yMS0wLjIxLDAuMjEtMC41NCwwLTAuNzVjLTAuMjEtMC4yMS0wLjU0LTAuMjEtMC43NSwwbC0yLjQyLDIuNDJsLTIuNDEtMi40MWMtMC4yMS0wLjIxLTAuNTQtMC4yMS0wLjc1LDAKCWMtMC4yMSwwLjIxLTAuMjEsMC41NCwwLDAuNzVsMi40MSwyLjQxbC0yLjQyLDIuNDJDNi43NywzMy4wNSw2Ljc3LDMzLjM5LDYuOTgsMzMuNTlMNi45OCwzMy41OXoiLz4KPHBhdGggZmlsbD0iIzMzNzFCNyIgZD0iTTEwLjE1LDM4LjQzYzQuNDEsMCw4LTMuNTksOC04YzAtNC40MS0zLjU5LTgtOC04Yy00LjQxLDAtOCwzLjU5LTgsOEMyLjE1LDM0Ljg0LDUuNzQsMzguNDMsMTAuMTUsMzguNDN6CgkgTTEwLjE1LDIzLjQ5YzMuODMsMCw2Ljk0LDMuMTEsNi45NCw2Ljk0YzAsMy44My0zLjExLDYuOTQtNi45NCw2Ljk0Yy0zLjgzLDAtNi45NC0zLjExLTYuOTQtNi45NAoJQzMuMjEsMjYuNiw2LjMzLDIzLjQ5LDEwLjE1LDIzLjQ5TDEwLjE1LDIzLjQ5eiIvPgo8cGF0aCBmaWxsPSIjQzBDMEJGIiBkPSJNNi45OCw1My41OWMwLjEsMC4xLDAuMjQsMC4xNSwwLjM3LDAuMTVzMC4yNy0wLjA1LDAuMzctMC4xNWwyLjQyLTIuNDJsMi40MywyLjQzCgljMC4xLDAuMSwwLjI0LDAuMTUsMC4zNywwLjE1YzAuMTQsMCwwLjI3LTAuMDUsMC4zNy0wLjE1YzAuMjEtMC4yMSwwLjIxLTAuNTQsMC0wLjc1bC0yLjQzLTIuNDNMMTMuMzIsNDgKCWMwLjIxLTAuMjEsMC4yMS0wLjU0LDAtMC43NWMtMC4yMS0wLjIxLTAuNTQtMC4yMS0wLjc1LDBsLTIuNDIsMi40MmwtMi40MS0yLjQxYy0wLjIxLTAuMjEtMC41NC0wLjIxLTAuNzUsMAoJYy0wLjIxLDAuMjEtMC4yMSwwLjU0LDAsMC43NWwyLjQxLDIuNDFsLTIuNDIsMi40MkM2Ljc3LDUzLjA1LDYuNzcsNTMuMzksNi45OCw1My41OUw2Ljk4LDUzLjU5eiIvPgo8cGF0aCBmaWxsPSIjQzBDMEJGIiBkPSJNMTAuMTUsNTguNDNjNC40MSwwLDgtMy41OSw4LThjMC00LjQxLTMuNTktOC04LThjLTQuNDEsMC04LDMuNTktOCw4QzIuMTUsNTQuODQsNS43NCw1OC40MywxMC4xNSw1OC40M3oKCSBNMTAuMTUsNDMuNDljMy44MywwLDYuOTQsMy4xMSw2Ljk0LDYuOTRjMCwzLjgzLTMuMTEsNi45NC02Ljk0LDYuOTRjLTMuODMsMC02Ljk0LTMuMTEtNi45NC02Ljk0CglDMy4yMSw0Ni42LDYuMzMsNDMuNDksMTAuMTUsNDMuNDlMMTAuMTUsNDMuNDl6Ii8+CjxwYXRoIGZpbGw9IiM2QUE5REQiIGQ9Ik02Ljk4LDczLjU5YzAuMSwwLjEsMC4yNCwwLjE1LDAuMzcsMC4xNXMwLjI3LTAuMDUsMC4zNy0wLjE1bDIuNDItMi40MmwyLjQzLDIuNDMKCWMwLjEsMC4xLDAuMjQsMC4xNSwwLjM3LDAuMTVjMC4xNCwwLDAuMjctMC4wNSwwLjM3LTAuMTVjMC4yMS0wLjIxLDAuMjEtMC41NCwwLTAuNzVsLTIuNDMtMi40M0wxMy4zMiw2OAoJYzAuMjEtMC4yMSwwLjIxLTAuNTQsMC0wLjc1Yy0wLjIxLTAuMjEtMC41NC0wLjIxLTAuNzUsMGwtMi40MiwyLjQybC0yLjQxLTIuNDFjLTAuMjEtMC4yMS0wLjU0LTAuMjEtMC43NSwwCgljLTAuMjEsMC4yMS0wLjIxLDAuNTQsMCwwLjc1bDIuNDEsMi40MWwtMi40MiwyLjQyQzYuNzcsNzMuMDUsNi43Nyw3My4zOSw2Ljk4LDczLjU5TDYuOTgsNzMuNTl6Ii8+CjxwYXRoIGZpbGw9IiM2QUE5REQiIGQ9Ik0xMC4xNSw3OC40M2M0LjQxLDAsOC0zLjU5LDgtOGMwLTQuNDEtMy41OS04LTgtOGMtNC40MSwwLTgsMy41OS04LDhDMi4xNSw3NC44NCw1Ljc0LDc4LjQzLDEwLjE1LDc4LjQzegoJIE0xMC4xNSw2My40OWMzLjgzLDAsNi45NCwzLjExLDYuOTQsNi45NGMwLDMuODMtMy4xMSw2Ljk0LTYuOTQsNi45NGMtMy44MywwLTYuOTQtMy4xMS02Ljk0LTYuOTQKCUMzLjIxLDY2LjYsNi4zMyw2My40OSwxMC4xNSw2My40OUwxMC4xNSw2My40OXoiLz4KPC9zdmc+";
|
|
51529
51724
|
function BtnClearSearch() {
|
|
51530
51725
|
var clearSearch = useClearSearch();
|
|
51531
|
-
return
|
|
51726
|
+
return React5.createElement(Button3, {
|
|
51532
51727
|
className: cx(styles$h.btnClearSearch, commonInteractionStyles.visibleOnSearchOnly),
|
|
51533
51728
|
onClick: clearSearch,
|
|
51534
51729
|
"aria-label": "Clear",
|
|
51535
51730
|
title: "Clear"
|
|
51536
|
-
},
|
|
51731
|
+
}, React5.createElement("div", {
|
|
51537
51732
|
className: cx(styles$h.icnClearnSearch)
|
|
51538
51733
|
}));
|
|
51539
51734
|
}
|
|
@@ -51585,7 +51780,7 @@ var styles$h = /* @__PURE__ */ stylesheet.create(/* @__PURE__ */ _extends({
|
|
|
51585
51780
|
}), /* @__PURE__ */ darkMode("btnClearSearch", HoverDark)));
|
|
51586
51781
|
var SVGMagnifier = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI2LjMuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHdpZHRoPSIyMHB4IiBoZWlnaHQ9IjQwcHgiIHZpZXdCb3g9IjAgMCAyMCA0MCIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMjAgNDAiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZmlsbD0iIzg2ODY4NiIgZD0iTTEyLDguODFjMCwyLjA4LTEuNjgsMy43Ni0zLjc2LDMuNzZjLTIuMDgsMC0zLjc2LTEuNjgtMy43Ni0zLjc2CgljMC0yLjA4LDEuNjgtMy43NiwzLjc2LTMuNzZDMTAuMzIsNS4wNSwxMiw2LjczLDEyLDguODF6IE0xMS4yMywxMi43MmMtMC44MywwLjY0LTEuODcsMS4wMS0yLjk5LDEuMDFjLTIuNzIsMC00LjkyLTIuMi00LjkyLTQuOTIKCWMwLTIuNzIsMi4yLTQuOTIsNC45Mi00LjkyYzIuNzIsMCw0LjkyLDIuMiw0LjkyLDQuOTJjMCwxLjEzLTAuMzgsMi4xNi0xLjAxLDIuOTlsMy45NCwzLjkzYzAuMjUsMC4yNSwwLjI1LDAuNjYsMCwwLjkyCgljLTAuMjUsMC4yNS0wLjY2LDAuMjUtMC45MiwwTDExLjIzLDEyLjcyeiIvPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZmlsbD0iI0MwQzBCRiIgZD0iTTEyLDI4LjgxYzAsMi4wOC0xLjY4LDMuNzYtMy43NiwzLjc2Yy0yLjA4LDAtMy43Ni0xLjY4LTMuNzYtMy43NgoJYzAtMi4wOCwxLjY4LTMuNzYsMy43Ni0zLjc2QzEwLjMyLDI1LjA1LDEyLDI2LjczLDEyLDI4LjgxeiBNMTEuMjMsMzIuNzJjLTAuODMsMC42NC0xLjg3LDEuMDEtMi45OSwxLjAxCgljLTIuNzIsMC00LjkyLTIuMi00LjkyLTQuOTJjMC0yLjcyLDIuMi00LjkyLDQuOTItNC45MmMyLjcyLDAsNC45MiwyLjIsNC45Miw0LjkyYzAsMS4xMy0wLjM4LDIuMTYtMS4wMSwyLjk5bDMuOTQsMy45MwoJYzAuMjUsMC4yNSwwLjI1LDAuNjYsMCwwLjkyYy0wLjI1LDAuMjUtMC42NiwwLjI1LTAuOTIsMEwxMS4yMywzMi43MnoiLz4KPC9zdmc+";
|
|
51587
51782
|
function IcnSearch() {
|
|
51588
|
-
return
|
|
51783
|
+
return React5.createElement("div", {
|
|
51589
51784
|
className: cx(styles$i.icnSearch)
|
|
51590
51785
|
});
|
|
51591
51786
|
}
|
|
@@ -51613,9 +51808,9 @@ function SearchContainer() {
|
|
|
51613
51808
|
if (searchDisabled) {
|
|
51614
51809
|
return null;
|
|
51615
51810
|
}
|
|
51616
|
-
return
|
|
51811
|
+
return React5.createElement(Flex, {
|
|
51617
51812
|
className: cx(styles$j.overlay)
|
|
51618
|
-
},
|
|
51813
|
+
}, React5.createElement(Search, null), isSkinToneInSearch ? React5.createElement(SkinTonePicker, null) : null);
|
|
51619
51814
|
}
|
|
51620
51815
|
function Search() {
|
|
51621
51816
|
var closeAllOpenToggles = useCloseAllOpenToggles();
|
|
@@ -51625,9 +51820,9 @@ function Search() {
|
|
|
51625
51820
|
var _useFilter = useFilter(), statusSearchResults = _useFilter.statusSearchResults, searchTerm = _useFilter.searchTerm, _onChange = _useFilter.onChange;
|
|
51626
51821
|
var input = SearchInputRef == null ? void 0 : SearchInputRef.current;
|
|
51627
51822
|
var value = input == null ? void 0 : input.value;
|
|
51628
|
-
return
|
|
51823
|
+
return React5.createElement(Relative, {
|
|
51629
51824
|
className: cx(styles$j.searchContainer)
|
|
51630
|
-
},
|
|
51825
|
+
}, React5.createElement("input", {
|
|
51631
51826
|
// eslint-disable-next-line jsx-a11y/no-autofocus
|
|
51632
51827
|
autoFocus,
|
|
51633
51828
|
"aria-label": "Type to search for an emoji",
|
|
@@ -51641,13 +51836,13 @@ function Search() {
|
|
|
51641
51836
|
_onChange((_event$target$value = event == null ? void 0 : (_event$target = event.target) == null ? void 0 : _event$target.value) != null ? _event$target$value : value);
|
|
51642
51837
|
},
|
|
51643
51838
|
ref: SearchInputRef
|
|
51644
|
-
}), searchTerm ?
|
|
51839
|
+
}), searchTerm ? React5.createElement("div", {
|
|
51645
51840
|
role: "status",
|
|
51646
51841
|
className: cx("epr-status-search-results", styles$j.visuallyHidden),
|
|
51647
51842
|
"aria-live": "polite",
|
|
51648
51843
|
id: "epr-search-id",
|
|
51649
51844
|
"aria-atomic": "true"
|
|
51650
|
-
}, statusSearchResults) : null,
|
|
51845
|
+
}, statusSearchResults) : null, React5.createElement(IcnSearch, null), React5.createElement(BtnClearSearch, null));
|
|
51651
51846
|
}
|
|
51652
51847
|
var styles$j = /* @__PURE__ */ stylesheet.create(/* @__PURE__ */ _extends({
|
|
51653
51848
|
overlay: {
|
|
@@ -51730,19 +51925,19 @@ var styles$j = /* @__PURE__ */ stylesheet.create(/* @__PURE__ */ _extends({
|
|
|
51730
51925
|
}
|
|
51731
51926
|
})));
|
|
51732
51927
|
function Header2() {
|
|
51733
|
-
return
|
|
51928
|
+
return React5.createElement(Relative, {
|
|
51734
51929
|
className: cx("epr-header", commonInteractionStyles.hiddenOnReactions)
|
|
51735
|
-
},
|
|
51930
|
+
}, React5.createElement(SearchContainer, null), React5.createElement(CategoryNavigation, null));
|
|
51736
51931
|
}
|
|
51737
51932
|
function EmojiPicker(props) {
|
|
51738
|
-
return
|
|
51933
|
+
return React5.createElement(ElementRefContextProvider, null, React5.createElement(PickerStyleTag, null), React5.createElement(PickerConfigProvider, Object.assign({}, props), React5.createElement(ContentControl, null)));
|
|
51739
51934
|
}
|
|
51740
51935
|
function ContentControl() {
|
|
51741
51936
|
var _useReactionsModeStat = useReactionsModeState(), reactionsDefaultOpen = _useReactionsModeStat[0];
|
|
51742
51937
|
var allowExpandReactions = useAllowExpandReactions();
|
|
51743
|
-
var _React$useState =
|
|
51938
|
+
var _React$useState = React5.useState(!reactionsDefaultOpen), renderAll = _React$useState[0], setRenderAll = _React$useState[1];
|
|
51744
51939
|
var isOpen = useOpenConfig();
|
|
51745
|
-
|
|
51940
|
+
React5.useEffect(function() {
|
|
51746
51941
|
if (reactionsDefaultOpen && !allowExpandReactions) {
|
|
51747
51942
|
return;
|
|
51748
51943
|
}
|
|
@@ -51753,7 +51948,7 @@ function ContentControl() {
|
|
|
51753
51948
|
if (!isOpen) {
|
|
51754
51949
|
return null;
|
|
51755
51950
|
}
|
|
51756
|
-
return
|
|
51951
|
+
return React5.createElement(PickerMain, null, React5.createElement(Reactions, null), React5.createElement(ExpandedPickerContent, {
|
|
51757
51952
|
renderAll
|
|
51758
51953
|
}));
|
|
51759
51954
|
}
|
|
@@ -51762,9 +51957,9 @@ function ExpandedPickerContent(_ref) {
|
|
|
51762
51957
|
if (!renderAll) {
|
|
51763
51958
|
return null;
|
|
51764
51959
|
}
|
|
51765
|
-
return
|
|
51960
|
+
return React5.createElement(React5.Fragment, null, React5.createElement(Header2, null), React5.createElement(Body, null), React5.createElement(Preview, null));
|
|
51766
51961
|
}
|
|
51767
|
-
var EmojiPickerReact = /* @__PURE__ */
|
|
51962
|
+
var EmojiPickerReact = /* @__PURE__ */ React5.memo(EmojiPicker, compareConfig);
|
|
51768
51963
|
var ErrorBoundary = /* @__PURE__ */ (function(_React$Component) {
|
|
51769
51964
|
_inheritsLoose(ErrorBoundary2, _React$Component);
|
|
51770
51965
|
function ErrorBoundary2(props) {
|
|
@@ -51791,16 +51986,16 @@ var ErrorBoundary = /* @__PURE__ */ (function(_React$Component) {
|
|
|
51791
51986
|
return this.props.children;
|
|
51792
51987
|
};
|
|
51793
51988
|
return ErrorBoundary2;
|
|
51794
|
-
})(
|
|
51989
|
+
})(React5.Component);
|
|
51795
51990
|
function EmojiPicker$1(props) {
|
|
51796
51991
|
var MutableConfigRef = useDefineMutableConfig({
|
|
51797
51992
|
onEmojiClick: props.onEmojiClick,
|
|
51798
51993
|
onReactionClick: props.onReactionClick,
|
|
51799
51994
|
onSkinToneChange: props.onSkinToneChange
|
|
51800
51995
|
});
|
|
51801
|
-
return
|
|
51996
|
+
return React5.createElement(ErrorBoundary, null, React5.createElement(MutableConfigContext.Provider, {
|
|
51802
51997
|
value: MutableConfigRef
|
|
51803
|
-
},
|
|
51998
|
+
}, React5.createElement(EmojiPickerReact, Object.assign({}, props))));
|
|
51804
51999
|
}
|
|
51805
52000
|
var emoji_picker_react_esm_default = EmojiPicker$1;
|
|
51806
52001
|
var RoleBadge = ({ role }) => {
|
|
@@ -51897,12 +52092,12 @@ var CommentEditor = ({
|
|
|
51897
52092
|
onSubmit,
|
|
51898
52093
|
users = []
|
|
51899
52094
|
}) => {
|
|
51900
|
-
const [isRevision, setIsRevision] =
|
|
51901
|
-
const [showToolbar, setShowToolbar] =
|
|
51902
|
-
const [attachments, setAttachments] =
|
|
51903
|
-
const [isEditorEmpty, setIsEditorEmpty] =
|
|
51904
|
-
const fileInputRef =
|
|
51905
|
-
const extensions =
|
|
52095
|
+
const [isRevision, setIsRevision] = React5__namespace.useState(false);
|
|
52096
|
+
const [showToolbar, setShowToolbar] = React5__namespace.useState(false);
|
|
52097
|
+
const [attachments, setAttachments] = React5__namespace.useState([]);
|
|
52098
|
+
const [isEditorEmpty, setIsEditorEmpty] = React5__namespace.useState(true);
|
|
52099
|
+
const fileInputRef = React5__namespace.useRef(null);
|
|
52100
|
+
const extensions = React5__namespace.useMemo(() => [
|
|
51906
52101
|
index_default3.configure({
|
|
51907
52102
|
// @ts-ignore
|
|
51908
52103
|
link: false,
|
|
@@ -52302,13 +52497,13 @@ function TimePicker({
|
|
|
52302
52497
|
className,
|
|
52303
52498
|
disabled = false
|
|
52304
52499
|
}) {
|
|
52305
|
-
const [hours, setHours2] =
|
|
52500
|
+
const [hours, setHours2] = React5__namespace.useState(
|
|
52306
52501
|
date ? String(date.getHours()).padStart(2, "0") : "00"
|
|
52307
52502
|
);
|
|
52308
|
-
const [minutes, setMinutes] =
|
|
52503
|
+
const [minutes, setMinutes] = React5__namespace.useState(
|
|
52309
52504
|
date ? String(date.getMinutes()).padStart(2, "0") : "00"
|
|
52310
52505
|
);
|
|
52311
|
-
|
|
52506
|
+
React5__namespace.useEffect(() => {
|
|
52312
52507
|
if (date) {
|
|
52313
52508
|
setHours2(String(date.getHours()).padStart(2, "0"));
|
|
52314
52509
|
setMinutes(String(date.getMinutes()).padStart(2, "0"));
|
|
@@ -52404,9 +52599,9 @@ function DateRangePicker({
|
|
|
52404
52599
|
disabled = false,
|
|
52405
52600
|
withTime = false
|
|
52406
52601
|
}) {
|
|
52407
|
-
const [open, setOpen] =
|
|
52408
|
-
const [range, setRange] =
|
|
52409
|
-
|
|
52602
|
+
const [open, setOpen] = React5__namespace.useState(false);
|
|
52603
|
+
const [range, setRange] = React5__namespace.useState(dateRange);
|
|
52604
|
+
React5__namespace.useEffect(() => {
|
|
52410
52605
|
setRange(dateRange);
|
|
52411
52606
|
}, [dateRange]);
|
|
52412
52607
|
const handleRangeSelect = (newRange) => {
|
|
@@ -52479,7 +52674,7 @@ function DateRangePicker({
|
|
|
52479
52674
|
) }),
|
|
52480
52675
|
/* @__PURE__ */ jsxRuntime.jsx(PopoverContent, { className: "w-auto p-0", align: "start", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-3 space-y-3", children: [
|
|
52481
52676
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
52482
|
-
|
|
52677
|
+
Calendar2,
|
|
52483
52678
|
{
|
|
52484
52679
|
mode: "range",
|
|
52485
52680
|
selected: range,
|
|
@@ -52542,9 +52737,9 @@ function DateTimePicker({
|
|
|
52542
52737
|
className,
|
|
52543
52738
|
disabled = false
|
|
52544
52739
|
}) {
|
|
52545
|
-
const [open, setOpen] =
|
|
52546
|
-
const [selectedDate, setSelectedDate] =
|
|
52547
|
-
|
|
52740
|
+
const [open, setOpen] = React5__namespace.useState(false);
|
|
52741
|
+
const [selectedDate, setSelectedDate] = React5__namespace.useState(date);
|
|
52742
|
+
React5__namespace.useEffect(() => {
|
|
52548
52743
|
setSelectedDate(date);
|
|
52549
52744
|
}, [date]);
|
|
52550
52745
|
const handleDateSelect = (newDate) => {
|
|
@@ -52590,7 +52785,7 @@ function DateTimePicker({
|
|
|
52590
52785
|
) }),
|
|
52591
52786
|
/* @__PURE__ */ jsxRuntime.jsx(PopoverContent, { className: "w-auto p-0", align: "start", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-3 space-y-3", children: [
|
|
52592
52787
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
52593
|
-
|
|
52788
|
+
Calendar2,
|
|
52594
52789
|
{
|
|
52595
52790
|
mode: "single",
|
|
52596
52791
|
selected: selectedDate,
|
|
@@ -52777,7 +52972,7 @@ function DocumentEditor({
|
|
|
52777
52972
|
readOnly = false,
|
|
52778
52973
|
label
|
|
52779
52974
|
}) {
|
|
52780
|
-
const extensions =
|
|
52975
|
+
const extensions = React5__namespace.useMemo(() => {
|
|
52781
52976
|
return [
|
|
52782
52977
|
index_default3.configure({
|
|
52783
52978
|
heading: {
|
|
@@ -52847,7 +53042,7 @@ function DocumentEditor({
|
|
|
52847
53042
|
] })
|
|
52848
53043
|
] });
|
|
52849
53044
|
}
|
|
52850
|
-
var DndContext =
|
|
53045
|
+
var DndContext = React5.createContext({
|
|
52851
53046
|
dragDropManager: void 0
|
|
52852
53047
|
});
|
|
52853
53048
|
|
|
@@ -54295,12 +54490,12 @@ function _objectWithoutPropertiesLoose2(source, excluded) {
|
|
|
54295
54490
|
}
|
|
54296
54491
|
var refCount = 0;
|
|
54297
54492
|
var INSTANCE_SYM = Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");
|
|
54298
|
-
var DndProvider = /* @__PURE__ */
|
|
54493
|
+
var DndProvider = /* @__PURE__ */ React5.memo(function DndProvider2(_param) {
|
|
54299
54494
|
var { children } = _param, props = _objectWithoutProperties(_param, [
|
|
54300
54495
|
"children"
|
|
54301
54496
|
]);
|
|
54302
54497
|
const [manager, isGlobalInstance] = getDndContextValue(props);
|
|
54303
|
-
|
|
54498
|
+
React5.useEffect(() => {
|
|
54304
54499
|
if (isGlobalInstance) {
|
|
54305
54500
|
const context = getGlobalContext();
|
|
54306
54501
|
++refCount;
|
|
@@ -54349,14 +54544,14 @@ function getGlobalContext() {
|
|
|
54349
54544
|
|
|
54350
54545
|
// ../node_modules/react-dnd/dist/hooks/useCollector.js
|
|
54351
54546
|
var import_fast_deep_equal = __toESM(require_fast_deep_equal());
|
|
54352
|
-
var useIsomorphicLayoutEffect2 = typeof window !== "undefined" ?
|
|
54547
|
+
var useIsomorphicLayoutEffect2 = typeof window !== "undefined" ? React5.useLayoutEffect : React5.useEffect;
|
|
54353
54548
|
|
|
54354
54549
|
// ../node_modules/react-dnd/dist/hooks/useCollector.js
|
|
54355
54550
|
function useCollector(monitor, collect, onUpdate) {
|
|
54356
|
-
const [collected, setCollected] =
|
|
54551
|
+
const [collected, setCollected] = React5.useState(
|
|
54357
54552
|
() => collect(monitor)
|
|
54358
54553
|
);
|
|
54359
|
-
const updateCollected =
|
|
54554
|
+
const updateCollected = React5.useCallback(() => {
|
|
54360
54555
|
const nextValue = collect(monitor);
|
|
54361
54556
|
if (!(0, import_fast_deep_equal.default)(collected, nextValue)) {
|
|
54362
54557
|
setCollected(nextValue);
|
|
@@ -54411,12 +54606,12 @@ function useOptionalFactory(arg, deps) {
|
|
|
54411
54606
|
if (deps == null && typeof arg !== "function") {
|
|
54412
54607
|
memoDeps.push(arg);
|
|
54413
54608
|
}
|
|
54414
|
-
return
|
|
54609
|
+
return React5.useMemo(() => {
|
|
54415
54610
|
return typeof arg === "function" ? arg() : arg;
|
|
54416
54611
|
}, memoDeps);
|
|
54417
54612
|
}
|
|
54418
54613
|
function useConnectDragSource(connector) {
|
|
54419
|
-
return
|
|
54614
|
+
return React5.useMemo(
|
|
54420
54615
|
() => connector.hooks.dragSource(),
|
|
54421
54616
|
[
|
|
54422
54617
|
connector
|
|
@@ -54424,7 +54619,7 @@ function useConnectDragSource(connector) {
|
|
|
54424
54619
|
);
|
|
54425
54620
|
}
|
|
54426
54621
|
function useConnectDragPreview(connector) {
|
|
54427
|
-
return
|
|
54622
|
+
return React5.useMemo(
|
|
54428
54623
|
() => connector.hooks.dragPreview(),
|
|
54429
54624
|
[
|
|
54430
54625
|
connector
|
|
@@ -54653,7 +54848,7 @@ function throwIfCompositeComponentElement(element) {
|
|
|
54653
54848
|
}
|
|
54654
54849
|
function wrapHookToRecognizeElement(hook) {
|
|
54655
54850
|
return (elementOrNode = null, options = null) => {
|
|
54656
|
-
if (!
|
|
54851
|
+
if (!React5.isValidElement(elementOrNode)) {
|
|
54657
54852
|
const node = elementOrNode;
|
|
54658
54853
|
hook(node, options);
|
|
54659
54854
|
return node;
|
|
@@ -54688,11 +54883,11 @@ function cloneWithRef(element, newRef) {
|
|
|
54688
54883
|
const previousRef = element.ref;
|
|
54689
54884
|
invariant(typeof previousRef !== "string", "Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs");
|
|
54690
54885
|
if (!previousRef) {
|
|
54691
|
-
return
|
|
54886
|
+
return React5.cloneElement(element, {
|
|
54692
54887
|
ref: newRef
|
|
54693
54888
|
});
|
|
54694
54889
|
} else {
|
|
54695
|
-
return
|
|
54890
|
+
return React5.cloneElement(element, {
|
|
54696
54891
|
ref: (node) => {
|
|
54697
54892
|
setRef(previousRef, node);
|
|
54698
54893
|
setRef(newRef, node);
|
|
@@ -54933,7 +55128,7 @@ var TargetConnector = class {
|
|
|
54933
55128
|
}
|
|
54934
55129
|
};
|
|
54935
55130
|
function useDragDropManager() {
|
|
54936
|
-
const { dragDropManager } =
|
|
55131
|
+
const { dragDropManager } = React5.useContext(DndContext);
|
|
54937
55132
|
invariant(dragDropManager != null, "Expected drag drop context");
|
|
54938
55133
|
return dragDropManager;
|
|
54939
55134
|
}
|
|
@@ -54941,7 +55136,7 @@ function useDragDropManager() {
|
|
|
54941
55136
|
// ../node_modules/react-dnd/dist/hooks/useDrag/useDragSourceConnector.js
|
|
54942
55137
|
function useDragSourceConnector(dragSourceOptions, dragPreviewOptions) {
|
|
54943
55138
|
const manager = useDragDropManager();
|
|
54944
|
-
const connector =
|
|
55139
|
+
const connector = React5.useMemo(
|
|
54945
55140
|
() => new SourceConnector(manager.getBackend()),
|
|
54946
55141
|
[
|
|
54947
55142
|
manager
|
|
@@ -54967,7 +55162,7 @@ function useDragSourceConnector(dragSourceOptions, dragPreviewOptions) {
|
|
|
54967
55162
|
}
|
|
54968
55163
|
function useDragSourceMonitor() {
|
|
54969
55164
|
const manager = useDragDropManager();
|
|
54970
|
-
return
|
|
55165
|
+
return React5.useMemo(
|
|
54971
55166
|
() => new DragSourceMonitorImpl(manager),
|
|
54972
55167
|
[
|
|
54973
55168
|
manager
|
|
@@ -55026,14 +55221,14 @@ var DragSourceImpl = class {
|
|
|
55026
55221
|
|
|
55027
55222
|
// ../node_modules/react-dnd/dist/hooks/useDrag/useDragSource.js
|
|
55028
55223
|
function useDragSource(spec, monitor, connector) {
|
|
55029
|
-
const handler =
|
|
55224
|
+
const handler = React5.useMemo(
|
|
55030
55225
|
() => new DragSourceImpl(spec, monitor, connector),
|
|
55031
55226
|
[
|
|
55032
55227
|
monitor,
|
|
55033
55228
|
connector
|
|
55034
55229
|
]
|
|
55035
55230
|
);
|
|
55036
|
-
|
|
55231
|
+
React5.useEffect(() => {
|
|
55037
55232
|
handler.spec = spec;
|
|
55038
55233
|
}, [
|
|
55039
55234
|
spec
|
|
@@ -55041,7 +55236,7 @@ function useDragSource(spec, monitor, connector) {
|
|
|
55041
55236
|
return handler;
|
|
55042
55237
|
}
|
|
55043
55238
|
function useDragType(spec) {
|
|
55044
|
-
return
|
|
55239
|
+
return React5.useMemo(() => {
|
|
55045
55240
|
const result = spec.type;
|
|
55046
55241
|
invariant(result != null, "spec.type must be defined");
|
|
55047
55242
|
return result;
|
|
@@ -55086,7 +55281,7 @@ function useDrag(specArg, deps) {
|
|
|
55086
55281
|
];
|
|
55087
55282
|
}
|
|
55088
55283
|
function useConnectDropTarget(connector) {
|
|
55089
|
-
return
|
|
55284
|
+
return React5.useMemo(
|
|
55090
55285
|
() => connector.hooks.dropTarget(),
|
|
55091
55286
|
[
|
|
55092
55287
|
connector
|
|
@@ -55095,7 +55290,7 @@ function useConnectDropTarget(connector) {
|
|
|
55095
55290
|
}
|
|
55096
55291
|
function useDropTargetConnector(options) {
|
|
55097
55292
|
const manager = useDragDropManager();
|
|
55098
|
-
const connector =
|
|
55293
|
+
const connector = React5.useMemo(
|
|
55099
55294
|
() => new TargetConnector(manager.getBackend()),
|
|
55100
55295
|
[
|
|
55101
55296
|
manager
|
|
@@ -55112,7 +55307,7 @@ function useDropTargetConnector(options) {
|
|
|
55112
55307
|
}
|
|
55113
55308
|
function useDropTargetMonitor() {
|
|
55114
55309
|
const manager = useDragDropManager();
|
|
55115
|
-
return
|
|
55310
|
+
return React5.useMemo(
|
|
55116
55311
|
() => new DropTargetMonitorImpl(manager),
|
|
55117
55312
|
[
|
|
55118
55313
|
manager
|
|
@@ -55121,7 +55316,7 @@ function useDropTargetMonitor() {
|
|
|
55121
55316
|
}
|
|
55122
55317
|
function useAccept(spec) {
|
|
55123
55318
|
const { accept } = spec;
|
|
55124
|
-
return
|
|
55319
|
+
return React5.useMemo(() => {
|
|
55125
55320
|
invariant(spec.accept != null, "accept must be defined");
|
|
55126
55321
|
return Array.isArray(accept) ? accept : [
|
|
55127
55322
|
accept
|
|
@@ -55161,13 +55356,13 @@ var DropTargetImpl = class {
|
|
|
55161
55356
|
|
|
55162
55357
|
// ../node_modules/react-dnd/dist/hooks/useDrop/useDropTarget.js
|
|
55163
55358
|
function useDropTarget(spec, monitor) {
|
|
55164
|
-
const dropTarget =
|
|
55359
|
+
const dropTarget = React5.useMemo(
|
|
55165
55360
|
() => new DropTargetImpl(spec, monitor),
|
|
55166
55361
|
[
|
|
55167
55362
|
monitor
|
|
55168
55363
|
]
|
|
55169
55364
|
);
|
|
55170
|
-
|
|
55365
|
+
React5.useEffect(() => {
|
|
55171
55366
|
dropTarget.spec = spec;
|
|
55172
55367
|
}, [
|
|
55173
55368
|
spec
|
|
@@ -56597,8 +56792,8 @@ function TaskModal({
|
|
|
56597
56792
|
onSave,
|
|
56598
56793
|
isNew = false
|
|
56599
56794
|
}) {
|
|
56600
|
-
const [editedTask, setEditedTask] =
|
|
56601
|
-
|
|
56795
|
+
const [editedTask, setEditedTask] = React5.useState(task || {});
|
|
56796
|
+
React5.useMemo(() => {
|
|
56602
56797
|
setEditedTask(task || {});
|
|
56603
56798
|
}, [task]);
|
|
56604
56799
|
const handleSave = () => {
|
|
@@ -56709,13 +56904,13 @@ function useCalendarController({
|
|
|
56709
56904
|
onTaskCreate,
|
|
56710
56905
|
defaultView = "month"
|
|
56711
56906
|
}) {
|
|
56712
|
-
const [currentDate, setCurrentDate] =
|
|
56713
|
-
const [view, setView] =
|
|
56714
|
-
const [isSidebarOpen, setIsSidebarOpen] =
|
|
56715
|
-
const [isModalOpen, setIsModalOpen] =
|
|
56716
|
-
const [editingTask, setEditingTask] =
|
|
56717
|
-
const [isNewTask, setIsNewTask] =
|
|
56718
|
-
const calendarDays =
|
|
56907
|
+
const [currentDate, setCurrentDate] = React5.useState(/* @__PURE__ */ new Date());
|
|
56908
|
+
const [view, setView] = React5.useState(defaultView);
|
|
56909
|
+
const [isSidebarOpen, setIsSidebarOpen] = React5.useState(true);
|
|
56910
|
+
const [isModalOpen, setIsModalOpen] = React5.useState(false);
|
|
56911
|
+
const [editingTask, setEditingTask] = React5.useState(null);
|
|
56912
|
+
const [isNewTask, setIsNewTask] = React5.useState(false);
|
|
56913
|
+
const calendarDays = React5.useMemo(() => {
|
|
56719
56914
|
let startDate, endDate;
|
|
56720
56915
|
if (view === "month") {
|
|
56721
56916
|
const monthStart = dateFns.startOfMonth(currentDate);
|
|
@@ -57439,7 +57634,7 @@ function getPositionAndWidth(taskStart, taskEnd, timelineStart, timelineEnd, col
|
|
|
57439
57634
|
const width = duration / totalDays * 100;
|
|
57440
57635
|
return { left: left2, width };
|
|
57441
57636
|
}
|
|
57442
|
-
var TaskRow =
|
|
57637
|
+
var TaskRow = React5__namespace.memo(({
|
|
57443
57638
|
task,
|
|
57444
57639
|
timelineStart,
|
|
57445
57640
|
timelineEnd,
|
|
@@ -57603,7 +57798,7 @@ var TaskRow = React4__namespace.memo(({
|
|
|
57603
57798
|
});
|
|
57604
57799
|
TaskRow.displayName = "TaskRow";
|
|
57605
57800
|
var WEEKDAYS = ["DOM", "SEG", "TER", "QUA", "QUI", "SEX", "SAB"];
|
|
57606
|
-
var GanttChart =
|
|
57801
|
+
var GanttChart = React5__namespace.forwardRef(
|
|
57607
57802
|
({
|
|
57608
57803
|
tasks,
|
|
57609
57804
|
projects = [],
|
|
@@ -57613,15 +57808,15 @@ var GanttChart = React4__namespace.forwardRef(
|
|
|
57613
57808
|
columnWidth = 40,
|
|
57614
57809
|
groupBy = "projects"
|
|
57615
57810
|
}, ref) => {
|
|
57616
|
-
const [currentDate, setCurrentDate] =
|
|
57617
|
-
const [collapsedGroups, setCollapsedGroups] =
|
|
57811
|
+
const [currentDate, setCurrentDate] = React5__namespace.useState(/* @__PURE__ */ new Date());
|
|
57812
|
+
const [collapsedGroups, setCollapsedGroups] = React5__namespace.useState(/* @__PURE__ */ new Set());
|
|
57618
57813
|
const timelineStart = dateFns.startOfMonth(currentDate);
|
|
57619
57814
|
const timelineEnd = dateFns.endOfMonth(currentDate);
|
|
57620
57815
|
const days = dateFns.eachDayOfInterval({ start: timelineStart, end: timelineEnd });
|
|
57621
57816
|
const handlePrevMonth = () => setCurrentDate(dateFns.subMonths(currentDate, 1));
|
|
57622
57817
|
const handleNextMonth = () => setCurrentDate(dateFns.addMonths(currentDate, 1));
|
|
57623
57818
|
const handleToday = () => setCurrentDate(/* @__PURE__ */ new Date());
|
|
57624
|
-
const taskGroups =
|
|
57819
|
+
const taskGroups = React5__namespace.useMemo(() => {
|
|
57625
57820
|
if (groupBy === "assignees") {
|
|
57626
57821
|
const grouped = /* @__PURE__ */ new Map();
|
|
57627
57822
|
tasks.forEach((task) => {
|
|
@@ -57837,7 +58032,7 @@ var GanttChart = React4__namespace.forwardRef(
|
|
|
57837
58032
|
}
|
|
57838
58033
|
);
|
|
57839
58034
|
GanttChart.displayName = "GanttChart";
|
|
57840
|
-
var GanttLegend =
|
|
58035
|
+
var GanttLegend = React5__namespace.forwardRef(
|
|
57841
58036
|
({ className }, ref) => {
|
|
57842
58037
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, className: cn("flex flex-wrap gap-4", className), children: [
|
|
57843
58038
|
Object.entries(statusConfig).map(([status, config]) => {
|
|
@@ -57880,7 +58075,7 @@ var priorityConfig = {
|
|
|
57880
58075
|
bgColor: "bg-red-50 dark:bg-red-950/20"
|
|
57881
58076
|
}
|
|
57882
58077
|
};
|
|
57883
|
-
var KanbanCard =
|
|
58078
|
+
var KanbanCard = React5__namespace.forwardRef(
|
|
57884
58079
|
({
|
|
57885
58080
|
title,
|
|
57886
58081
|
description,
|
|
@@ -58225,10 +58420,10 @@ function FilterMenuItem({
|
|
|
58225
58420
|
}
|
|
58226
58421
|
var MOBILE_BREAKPOINT = 768;
|
|
58227
58422
|
function useIsMobile() {
|
|
58228
|
-
const [isMobile, setIsMobile] =
|
|
58423
|
+
const [isMobile, setIsMobile] = React5__namespace.useState(
|
|
58229
58424
|
void 0
|
|
58230
58425
|
);
|
|
58231
|
-
|
|
58426
|
+
React5__namespace.useEffect(() => {
|
|
58232
58427
|
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
|
|
58233
58428
|
const onChange = () => {
|
|
58234
58429
|
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
@@ -58245,9 +58440,9 @@ var SIDEBAR_WIDTH = "16rem";
|
|
|
58245
58440
|
var SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
58246
58441
|
var SIDEBAR_WIDTH_ICON = "3rem";
|
|
58247
58442
|
var SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
|
58248
|
-
var SidebarContext =
|
|
58443
|
+
var SidebarContext = React5__namespace.createContext(null);
|
|
58249
58444
|
function useSidebar() {
|
|
58250
|
-
const context =
|
|
58445
|
+
const context = React5__namespace.useContext(SidebarContext);
|
|
58251
58446
|
if (!context) {
|
|
58252
58447
|
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
58253
58448
|
}
|
|
@@ -58263,10 +58458,10 @@ function SidebarProvider({
|
|
|
58263
58458
|
...props
|
|
58264
58459
|
}) {
|
|
58265
58460
|
const isMobile = useIsMobile();
|
|
58266
|
-
const [openMobile, setOpenMobile] =
|
|
58267
|
-
const [_open, _setOpen] =
|
|
58461
|
+
const [openMobile, setOpenMobile] = React5__namespace.useState(false);
|
|
58462
|
+
const [_open, _setOpen] = React5__namespace.useState(defaultOpen);
|
|
58268
58463
|
const open = openProp ?? _open;
|
|
58269
|
-
const setOpen =
|
|
58464
|
+
const setOpen = React5__namespace.useCallback(
|
|
58270
58465
|
(value) => {
|
|
58271
58466
|
const openState = typeof value === "function" ? value(open) : value;
|
|
58272
58467
|
if (setOpenProp) {
|
|
@@ -58278,10 +58473,10 @@ function SidebarProvider({
|
|
|
58278
58473
|
},
|
|
58279
58474
|
[setOpenProp, open]
|
|
58280
58475
|
);
|
|
58281
|
-
const toggleSidebar =
|
|
58476
|
+
const toggleSidebar = React5__namespace.useCallback(() => {
|
|
58282
58477
|
return isMobile ? setOpenMobile((open2) => !open2) : setOpen((open2) => !open2);
|
|
58283
58478
|
}, [isMobile, setOpen, setOpenMobile]);
|
|
58284
|
-
|
|
58479
|
+
React5__namespace.useEffect(() => {
|
|
58285
58480
|
const handleKeyDown2 = (event) => {
|
|
58286
58481
|
if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
|
|
58287
58482
|
event.preventDefault();
|
|
@@ -58292,7 +58487,7 @@ function SidebarProvider({
|
|
|
58292
58487
|
return () => window.removeEventListener("keydown", handleKeyDown2);
|
|
58293
58488
|
}, [toggleSidebar]);
|
|
58294
58489
|
const state = open ? "expanded" : "collapsed";
|
|
58295
|
-
const contextValue =
|
|
58490
|
+
const contextValue = React5__namespace.useMemo(
|
|
58296
58491
|
() => ({
|
|
58297
58492
|
state,
|
|
58298
58493
|
open,
|
|
@@ -58750,7 +58945,7 @@ function SidebarMenuSkeleton({
|
|
|
58750
58945
|
showIcon = false,
|
|
58751
58946
|
...props
|
|
58752
58947
|
}) {
|
|
58753
|
-
const width =
|
|
58948
|
+
const width = React5__namespace.useMemo(() => {
|
|
58754
58949
|
return `${Math.floor(Math.random() * 40) + 50}%`;
|
|
58755
58950
|
}, []);
|
|
58756
58951
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -58854,10 +59049,10 @@ function TaskEditDialog({
|
|
|
58854
59049
|
availableTasks = [],
|
|
58855
59050
|
availableAssignees = []
|
|
58856
59051
|
}) {
|
|
58857
|
-
const [formData, setFormData] =
|
|
58858
|
-
const [startDateOpen, setStartDateOpen] =
|
|
58859
|
-
const [endDateOpen, setEndDateOpen] =
|
|
58860
|
-
|
|
59052
|
+
const [formData, setFormData] = React5__namespace.useState(null);
|
|
59053
|
+
const [startDateOpen, setStartDateOpen] = React5__namespace.useState(false);
|
|
59054
|
+
const [endDateOpen, setEndDateOpen] = React5__namespace.useState(false);
|
|
59055
|
+
React5__namespace.useEffect(() => {
|
|
58861
59056
|
if (task) {
|
|
58862
59057
|
setFormData({ ...task });
|
|
58863
59058
|
}
|
|
@@ -58930,7 +59125,7 @@ function TaskEditDialog({
|
|
|
58930
59125
|
}
|
|
58931
59126
|
) }),
|
|
58932
59127
|
/* @__PURE__ */ jsxRuntime.jsx(PopoverContent, { className: "w-auto p-0", align: "start", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
58933
|
-
|
|
59128
|
+
Calendar2,
|
|
58934
59129
|
{
|
|
58935
59130
|
mode: "single",
|
|
58936
59131
|
selected: formData.startDate,
|
|
@@ -58963,7 +59158,7 @@ function TaskEditDialog({
|
|
|
58963
59158
|
}
|
|
58964
59159
|
) }),
|
|
58965
59160
|
/* @__PURE__ */ jsxRuntime.jsx(PopoverContent, { className: "w-auto p-0", align: "start", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
58966
|
-
|
|
59161
|
+
Calendar2,
|
|
58967
59162
|
{
|
|
58968
59163
|
mode: "single",
|
|
58969
59164
|
selected: formData.endDate,
|
|
@@ -59144,7 +59339,7 @@ var getActionColor = (type) => {
|
|
|
59144
59339
|
}
|
|
59145
59340
|
};
|
|
59146
59341
|
var TimelineItem = ({ event, isLast }) => {
|
|
59147
|
-
const [isOpen, setIsOpen] =
|
|
59342
|
+
const [isOpen, setIsOpen] = React5__namespace.useState(false);
|
|
59148
59343
|
const hasDetails = !!(event.metadata?.before || event.metadata?.after || event.metadata?.details);
|
|
59149
59344
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-4 group", children: [
|
|
59150
59345
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center", children: [
|
|
@@ -59204,9 +59399,9 @@ var Timeline = ({ events, className }) => {
|
|
|
59204
59399
|
event.id
|
|
59205
59400
|
)) });
|
|
59206
59401
|
};
|
|
59207
|
-
var UnderlineTabsContext =
|
|
59402
|
+
var UnderlineTabsContext = React5__namespace.createContext(void 0);
|
|
59208
59403
|
function useUnderlineTabs() {
|
|
59209
|
-
const context =
|
|
59404
|
+
const context = React5__namespace.useContext(UnderlineTabsContext);
|
|
59210
59405
|
if (!context) {
|
|
59211
59406
|
throw new Error("UnderlineTabs components must be used within UnderlineTabs");
|
|
59212
59407
|
}
|
|
@@ -59219,7 +59414,7 @@ function UnderlineTabs({
|
|
|
59219
59414
|
children,
|
|
59220
59415
|
className
|
|
59221
59416
|
}) {
|
|
59222
|
-
const [internalValue, setInternalValue] =
|
|
59417
|
+
const [internalValue, setInternalValue] = React5__namespace.useState(defaultValue || "");
|
|
59223
59418
|
const value = controlledValue !== void 0 ? controlledValue : internalValue;
|
|
59224
59419
|
const handleValueChange = (newValue) => {
|
|
59225
59420
|
if (controlledValue === void 0) {
|
|
@@ -59298,12 +59493,13 @@ exports.AlertDialogPortal = AlertDialogPortal;
|
|
|
59298
59493
|
exports.AlertDialogTitle = AlertDialogTitle;
|
|
59299
59494
|
exports.AlertDialogTrigger = AlertDialogTrigger;
|
|
59300
59495
|
exports.AlertTitle = AlertTitle;
|
|
59496
|
+
exports.AppLayout = AppLayout;
|
|
59301
59497
|
exports.AspectRatio = AspectRatio;
|
|
59302
59498
|
exports.Avatar = Avatar;
|
|
59303
59499
|
exports.AvatarFallback = AvatarFallback;
|
|
59304
59500
|
exports.AvatarImage = AvatarImage;
|
|
59305
59501
|
exports.Badge = Badge;
|
|
59306
|
-
exports.BrandLogo =
|
|
59502
|
+
exports.BrandLogo = BrandLogo2;
|
|
59307
59503
|
exports.Breadcrumb = Breadcrumb;
|
|
59308
59504
|
exports.BreadcrumbEllipsis = BreadcrumbEllipsis;
|
|
59309
59505
|
exports.BreadcrumbItem = BreadcrumbItem;
|
|
@@ -59312,7 +59508,7 @@ exports.BreadcrumbList = BreadcrumbList;
|
|
|
59312
59508
|
exports.BreadcrumbPage = BreadcrumbPage;
|
|
59313
59509
|
exports.BreadcrumbSeparator = BreadcrumbSeparator;
|
|
59314
59510
|
exports.Button = Button;
|
|
59315
|
-
exports.Calendar =
|
|
59511
|
+
exports.Calendar = Calendar2;
|
|
59316
59512
|
exports.Card = Card;
|
|
59317
59513
|
exports.CardAction = CardAction;
|
|
59318
59514
|
exports.CardContent = CardContent;
|