@cnc-ti/layout-basic 8.8.2 → 9.0.0
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.css +52 -12
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +175 -28
- package/dist/index.d.ts +175 -28
- package/dist/index.js +579 -338
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +567 -329
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -3388,7 +3388,7 @@ var ModalMudancaEntidade = ({
|
|
|
3388
3388
|
// src/components/Sidebar/index.tsx
|
|
3389
3389
|
import * as Accordion from "@radix-ui/react-accordion";
|
|
3390
3390
|
import { Slot as Slot2 } from "@radix-ui/react-slot";
|
|
3391
|
-
import {
|
|
3391
|
+
import React8, {
|
|
3392
3392
|
cloneElement,
|
|
3393
3393
|
isValidElement
|
|
3394
3394
|
} from "react";
|
|
@@ -3559,90 +3559,341 @@ function LogotipoDefault() {
|
|
|
3559
3559
|
);
|
|
3560
3560
|
}
|
|
3561
3561
|
|
|
3562
|
+
// src/components/molecules/overlay/popover.tsx
|
|
3563
|
+
import * as React5 from "react";
|
|
3564
|
+
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
3565
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
3566
|
+
var Popover = PopoverPrimitive.Root;
|
|
3567
|
+
var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
3568
|
+
var PopoverContent = React5.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx9(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx9(
|
|
3569
|
+
PopoverPrimitive.Content,
|
|
3570
|
+
{
|
|
3571
|
+
ref,
|
|
3572
|
+
align,
|
|
3573
|
+
sideOffset,
|
|
3574
|
+
className: cn(
|
|
3575
|
+
"cnc-z-50 cnc-w-72 cnc-rounded-md cnc-border cnc-bg-popover cnc-p-4 cnc-text-popover-foreground cnc-shadow-md cnc-outline-none data-[state=open]:cnc-animate-in data-[state=closed]:cnc-animate-out data-[state=closed]:cnc-fade-out-0 data-[state=open]:cnc-fade-in-0 data-[state=closed]:cnc-zoom-out-95 data-[state=open]:cnc-zoom-in-95 data-[side=bottom]:cnc-slide-in-from-top-2 data-[side=left]:cnc-slide-in-from-right-2 data-[side=right]:cnc-slide-in-from-left-2 data-[side=top]:cnc-slide-in-from-bottom-2 cnc-origin-[--radix-popover-content-transform-origin]",
|
|
3576
|
+
className
|
|
3577
|
+
),
|
|
3578
|
+
...props
|
|
3579
|
+
}
|
|
3580
|
+
) }));
|
|
3581
|
+
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
3582
|
+
|
|
3583
|
+
// src/components/Sidebar/sidebar-context.tsx
|
|
3584
|
+
import * as React6 from "react";
|
|
3585
|
+
var SidebarContext = React6.createContext(void 0);
|
|
3586
|
+
var FALLBACK = {
|
|
3587
|
+
variant: "expanded",
|
|
3588
|
+
isMobile: false,
|
|
3589
|
+
requestState: () => void 0
|
|
3590
|
+
};
|
|
3591
|
+
function useSidebar() {
|
|
3592
|
+
return React6.useContext(SidebarContext) ?? FALLBACK;
|
|
3593
|
+
}
|
|
3594
|
+
|
|
3595
|
+
// src/components/Sidebar/use-sidebar-breakpoint.ts
|
|
3596
|
+
import * as React7 from "react";
|
|
3597
|
+
var SIDEBAR_MOBILE_BREAKPOINT = 768;
|
|
3598
|
+
function useSidebarBreakpoint(options = {}) {
|
|
3599
|
+
const {
|
|
3600
|
+
mobileBreakpoint = SIDEBAR_MOBILE_BREAKPOINT,
|
|
3601
|
+
defaultState = "expanded"
|
|
3602
|
+
} = options;
|
|
3603
|
+
const [isMobile, setIsMobile] = React7.useState(false);
|
|
3604
|
+
React7.useEffect(() => {
|
|
3605
|
+
if (typeof window === "undefined") return;
|
|
3606
|
+
const query = window.matchMedia(`(max-width: ${mobileBreakpoint - 1}px)`);
|
|
3607
|
+
const sync = () => setIsMobile(query.matches);
|
|
3608
|
+
sync();
|
|
3609
|
+
if (query.addEventListener) {
|
|
3610
|
+
query.addEventListener("change", sync);
|
|
3611
|
+
return () => query.removeEventListener("change", sync);
|
|
3612
|
+
}
|
|
3613
|
+
query.addListener(sync);
|
|
3614
|
+
return () => query.removeListener(sync);
|
|
3615
|
+
}, [mobileBreakpoint]);
|
|
3616
|
+
const getNextState = React7.useCallback(
|
|
3617
|
+
(current) => {
|
|
3618
|
+
if (isMobile) {
|
|
3619
|
+
return current === "closed" ? "expanded" : "closed";
|
|
3620
|
+
}
|
|
3621
|
+
return current === "expanded" ? "mini" : "expanded";
|
|
3622
|
+
},
|
|
3623
|
+
[isMobile]
|
|
3624
|
+
);
|
|
3625
|
+
const suggested = isMobile ? "closed" : defaultState;
|
|
3626
|
+
return { isMobile, suggested, getNextState };
|
|
3627
|
+
}
|
|
3628
|
+
|
|
3562
3629
|
// src/components/Sidebar/index.tsx
|
|
3563
|
-
import { jsx as
|
|
3630
|
+
import { Fragment as Fragment5, jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
3631
|
+
var MINI_WIDTH = "4rem";
|
|
3632
|
+
var EXPANDED_WIDTH = "280px";
|
|
3633
|
+
function resolveVariant(variant, isOpen) {
|
|
3634
|
+
if (variant) return variant;
|
|
3635
|
+
if (isOpen === false) return "closed";
|
|
3636
|
+
return "expanded";
|
|
3637
|
+
}
|
|
3564
3638
|
function SidebarContainer({
|
|
3565
|
-
isOpen
|
|
3639
|
+
isOpen,
|
|
3640
|
+
variant,
|
|
3641
|
+
onVariantChange,
|
|
3642
|
+
mobileBreakpoint = SIDEBAR_MOBILE_BREAKPOINT,
|
|
3643
|
+
className,
|
|
3644
|
+
style,
|
|
3645
|
+
children,
|
|
3566
3646
|
...rest
|
|
3567
3647
|
}) {
|
|
3568
|
-
|
|
3648
|
+
const { isMobile } = useSidebarBreakpoint({ mobileBreakpoint });
|
|
3649
|
+
const resolved = resolveVariant(variant, isOpen);
|
|
3650
|
+
const requestState = React8.useCallback(
|
|
3651
|
+
(next) => onVariantChange?.(next),
|
|
3652
|
+
[onVariantChange]
|
|
3653
|
+
);
|
|
3654
|
+
const context = React8.useMemo(
|
|
3655
|
+
() => ({ variant: resolved, isMobile, requestState }),
|
|
3656
|
+
[resolved, isMobile, requestState]
|
|
3657
|
+
);
|
|
3658
|
+
if (resolved === "closed") {
|
|
3659
|
+
return /* @__PURE__ */ jsx10(SidebarContext.Provider, { value: context });
|
|
3660
|
+
}
|
|
3661
|
+
const width = resolved === "mini" ? MINI_WIDTH : isMobile ? "100vw" : EXPANDED_WIDTH;
|
|
3662
|
+
return /* @__PURE__ */ jsx10(SidebarContext.Provider, { value: context, children: /* @__PURE__ */ jsx10(
|
|
3569
3663
|
"div",
|
|
3570
3664
|
{
|
|
3571
|
-
"data-is-open":
|
|
3572
|
-
|
|
3573
|
-
|
|
3574
|
-
|
|
3665
|
+
"data-is-open": true,
|
|
3666
|
+
"data-state": resolved,
|
|
3667
|
+
style: { width, ...style },
|
|
3668
|
+
className: cn(
|
|
3669
|
+
"cnc-flex cnc-flex-col cnc-h-screen cnc-overflow-hidden",
|
|
3670
|
+
"cnc-transition-all cnc-duration-300 cnc-ease-in-out",
|
|
3671
|
+
"cnc-sidebar-container cnc-bg-primary-800",
|
|
3672
|
+
className
|
|
3673
|
+
),
|
|
3674
|
+
...rest,
|
|
3675
|
+
children
|
|
3575
3676
|
}
|
|
3576
|
-
);
|
|
3677
|
+
) });
|
|
3577
3678
|
}
|
|
3578
3679
|
function SidebarImageBrand({
|
|
3579
3680
|
asChild = false,
|
|
3580
3681
|
onChangeToggle,
|
|
3682
|
+
onToggleRequest,
|
|
3683
|
+
showToggle = true,
|
|
3581
3684
|
img,
|
|
3582
3685
|
children
|
|
3583
3686
|
}) {
|
|
3584
|
-
|
|
3585
|
-
|
|
3586
|
-
|
|
3587
|
-
|
|
3588
|
-
|
|
3589
|
-
|
|
3590
|
-
|
|
3591
|
-
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
|
|
3595
|
-
|
|
3596
|
-
|
|
3597
|
-
|
|
3598
|
-
|
|
3599
|
-
|
|
3687
|
+
const { variant, isMobile, requestState } = useSidebar();
|
|
3688
|
+
const isMini = variant === "mini";
|
|
3689
|
+
const handleToggle = () => {
|
|
3690
|
+
const next = isMobile ? variant === "closed" ? "expanded" : "closed" : variant === "expanded" ? "mini" : "expanded";
|
|
3691
|
+
onChangeToggle?.();
|
|
3692
|
+
if (onToggleRequest) {
|
|
3693
|
+
onToggleRequest(next);
|
|
3694
|
+
return;
|
|
3695
|
+
}
|
|
3696
|
+
requestState(next);
|
|
3697
|
+
};
|
|
3698
|
+
return /* @__PURE__ */ jsxs9(
|
|
3699
|
+
"div",
|
|
3700
|
+
{
|
|
3701
|
+
className: cn(
|
|
3702
|
+
"cnc-flex cnc-items-center cnc-shrink-0 cnc-bg-primary-900",
|
|
3703
|
+
"cnc-w-full cnc-max-h-[70px] cnc-py-5 cnc-px-6",
|
|
3704
|
+
"cnc-transition-all cnc-duration-300 cnc-ease-in-out",
|
|
3705
|
+
isMini ? "cnc-justify-center cnc-px-0" : "cnc-justify-between cnc-sidebar-child-w-0"
|
|
3706
|
+
),
|
|
3707
|
+
children: [
|
|
3708
|
+
!isMini && /* @__PURE__ */ jsx10("span", { className: "cnc-sidebar-child-hidden", children: asChild && !img ? children : img && img.src ? /* @__PURE__ */ jsx10(
|
|
3709
|
+
"img",
|
|
3600
3710
|
{
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
|
|
3605
|
-
|
|
3606
|
-
|
|
3607
|
-
|
|
3608
|
-
|
|
3609
|
-
|
|
3610
|
-
|
|
3711
|
+
src: img.src,
|
|
3712
|
+
alt: img?.alt,
|
|
3713
|
+
className: "cnc-w-[159px] cnc-h-[28px] cnc-object-contain"
|
|
3714
|
+
}
|
|
3715
|
+
) : /* @__PURE__ */ jsx10(LogotipoDefault, {}) }),
|
|
3716
|
+
showToggle && /* @__PURE__ */ jsx10(
|
|
3717
|
+
"button",
|
|
3718
|
+
{
|
|
3719
|
+
type: "button",
|
|
3720
|
+
onClick: handleToggle,
|
|
3721
|
+
"aria-label": "Alternar barra lateral",
|
|
3722
|
+
className: cn(
|
|
3723
|
+
"hover:cnc-brightness-75 cnc-cursor-pointer",
|
|
3724
|
+
!isMini && "cnc-sidebar-child-hidden"
|
|
3725
|
+
),
|
|
3726
|
+
children: /* @__PURE__ */ jsx10(
|
|
3727
|
+
"svg",
|
|
3611
3728
|
{
|
|
3612
|
-
|
|
3613
|
-
|
|
3614
|
-
|
|
3615
|
-
|
|
3616
|
-
|
|
3729
|
+
stroke: "currentColor",
|
|
3730
|
+
fill: "currentColor",
|
|
3731
|
+
strokeWidth: "0",
|
|
3732
|
+
viewBox: "0 0 512 512",
|
|
3733
|
+
className: "cnc-size-6 cnc-text-white",
|
|
3734
|
+
height: "1em",
|
|
3735
|
+
width: "1em",
|
|
3736
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3737
|
+
children: /* @__PURE__ */ jsx10(
|
|
3738
|
+
"path",
|
|
3739
|
+
{
|
|
3740
|
+
fill: "none",
|
|
3741
|
+
strokeLinecap: "round",
|
|
3742
|
+
strokeMiterlimit: "10",
|
|
3743
|
+
strokeWidth: "48",
|
|
3744
|
+
d: "M88 152h336M88 256h336M88 360h336"
|
|
3745
|
+
}
|
|
3746
|
+
)
|
|
3617
3747
|
}
|
|
3618
3748
|
)
|
|
3619
3749
|
}
|
|
3620
3750
|
)
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
|
|
3751
|
+
]
|
|
3752
|
+
}
|
|
3753
|
+
);
|
|
3624
3754
|
}
|
|
3625
|
-
function Sidebar({ children, ...rest }) {
|
|
3626
|
-
|
|
3627
|
-
|
|
3755
|
+
function Sidebar({ children, className, ...rest }) {
|
|
3756
|
+
const { variant } = useSidebar();
|
|
3757
|
+
const isMini = variant === "mini";
|
|
3758
|
+
return /* @__PURE__ */ jsx10(Accordion.Root, { ...rest, children: /* @__PURE__ */ jsx10(
|
|
3759
|
+
"nav",
|
|
3628
3760
|
{
|
|
3629
|
-
className:
|
|
3761
|
+
className: cn(
|
|
3762
|
+
"cnc-w-full cnc-flex-1 cnc-flex cnc-flex-col cnc-py-8 cnc-bg-primary-800",
|
|
3763
|
+
"cnc-scroll-smooth cnc-overflow-y-auto cnc-overflow-x-hidden",
|
|
3764
|
+
"[&::-webkit-scrollbar]:cnc-w-1",
|
|
3765
|
+
"[&::-webkit-scrollbar-track]:cnc-bg-brand-blue-500",
|
|
3766
|
+
"[&::-webkit-scrollbar-thumb]:cnc-rounded",
|
|
3767
|
+
"[&::-webkit-scrollbar-thumb]:cnc-border",
|
|
3768
|
+
"[&::-webkit-scrollbar-thumb]:cnc-border-solid",
|
|
3769
|
+
"[&::-webkit-scrollbar-thumb]:cnc-border-brand-gray-400",
|
|
3770
|
+
"[&::-webkit-scrollbar-thumb]:cnc-bg-brand-gray-200",
|
|
3771
|
+
isMini ? "cnc-px-2" : "cnc-px-5 cnc-sidebar-child-w-0",
|
|
3772
|
+
className
|
|
3773
|
+
),
|
|
3630
3774
|
children
|
|
3631
3775
|
}
|
|
3632
3776
|
) });
|
|
3633
3777
|
}
|
|
3778
|
+
function renderIconItem(icon) {
|
|
3779
|
+
if (!icon) return null;
|
|
3780
|
+
if (isValidElement(icon) && icon.type === "svg") {
|
|
3781
|
+
const svgIcon = icon;
|
|
3782
|
+
return cloneElement(svgIcon, {
|
|
3783
|
+
height: 20,
|
|
3784
|
+
width: 20
|
|
3785
|
+
});
|
|
3786
|
+
}
|
|
3787
|
+
return /* @__PURE__ */ jsx10("span", { className: "cnc-w-5 cnc-h-5 cnc-shrink-0 cnc-flex cnc-items-center cnc-justify-center cnc-overflow-hidden", children: icon });
|
|
3788
|
+
}
|
|
3789
|
+
var legacyWarned = /* @__PURE__ */ new Set();
|
|
3790
|
+
function warnLegacyChildren(context) {
|
|
3791
|
+
if (process.env.NODE_ENV === "production") return;
|
|
3792
|
+
if (legacyWarned.has(context)) return;
|
|
3793
|
+
legacyWarned.add(context);
|
|
3794
|
+
console.warn(
|
|
3795
|
+
`[layout-basic] ${context}: passar \xEDcone e texto como "children" est\xE1 obsoleto desde a v9. Use as props "icon" e "label" \u2014 sem elas o estado "mini" n\xE3o consegue ocultar o r\xF3tulo nem exibir o tooltip.`
|
|
3796
|
+
);
|
|
3797
|
+
}
|
|
3798
|
+
function MiniTooltip({ label }) {
|
|
3799
|
+
return /* @__PURE__ */ jsx10(
|
|
3800
|
+
"span",
|
|
3801
|
+
{
|
|
3802
|
+
role: "tooltip",
|
|
3803
|
+
className: cn(
|
|
3804
|
+
"cnc-pointer-events-none cnc-absolute cnc-left-full cnc-top-1/2",
|
|
3805
|
+
"cnc--translate-y-1/2 cnc-ml-2 cnc-z-50 cnc-whitespace-nowrap",
|
|
3806
|
+
"cnc-rounded-md cnc-bg-gray-900 cnc-px-2.5 cnc-py-1.5",
|
|
3807
|
+
"cnc-text-xs cnc-font-medium cnc-text-white cnc-shadow-lg",
|
|
3808
|
+
"cnc-opacity-0 cnc-transition-opacity cnc-duration-150",
|
|
3809
|
+
"group-hover:cnc-opacity-100 group-focus-within:cnc-opacity-100"
|
|
3810
|
+
),
|
|
3811
|
+
children: label
|
|
3812
|
+
}
|
|
3813
|
+
);
|
|
3814
|
+
}
|
|
3634
3815
|
function SidebarNavLink({
|
|
3635
3816
|
asChild = false,
|
|
3636
3817
|
type = "primary",
|
|
3818
|
+
icon,
|
|
3819
|
+
label,
|
|
3820
|
+
ativo = false,
|
|
3821
|
+
disabled = false,
|
|
3822
|
+
keepOpenOnClick = false,
|
|
3823
|
+
className,
|
|
3824
|
+
children,
|
|
3825
|
+
onClick,
|
|
3637
3826
|
...rest
|
|
3638
3827
|
}) {
|
|
3828
|
+
const { variant, isMobile, requestState } = useSidebar();
|
|
3829
|
+
const isMini = variant === "mini";
|
|
3830
|
+
const usesLegacyChildren = !icon && !label && children != null;
|
|
3831
|
+
React8.useEffect(() => {
|
|
3832
|
+
if (usesLegacyChildren) warnLegacyChildren("SidebarNavLink");
|
|
3833
|
+
}, [usesLegacyChildren]);
|
|
3639
3834
|
const Component = asChild ? Slot2 : "a";
|
|
3640
|
-
|
|
3835
|
+
const handleClick = (event) => {
|
|
3836
|
+
if (disabled) {
|
|
3837
|
+
event.preventDefault();
|
|
3838
|
+
return;
|
|
3839
|
+
}
|
|
3840
|
+
onClick?.(event);
|
|
3841
|
+
if (isMobile && !keepOpenOnClick && !event.defaultPrevented) {
|
|
3842
|
+
requestState("closed");
|
|
3843
|
+
}
|
|
3844
|
+
};
|
|
3845
|
+
const content = usesLegacyChildren ? children : /* @__PURE__ */ jsxs9(Fragment5, { children: [
|
|
3846
|
+
renderIconItem(icon),
|
|
3847
|
+
!isMini && label != null && /* @__PURE__ */ jsx10("span", { className: "cnc-truncate", children: label })
|
|
3848
|
+
] });
|
|
3849
|
+
const link = /* @__PURE__ */ jsx10(
|
|
3641
3850
|
Component,
|
|
3642
3851
|
{
|
|
3643
3852
|
"data-type": type,
|
|
3644
|
-
|
|
3645
|
-
|
|
3853
|
+
"data-active": ativo || void 0,
|
|
3854
|
+
"aria-current": ativo ? "page" : void 0,
|
|
3855
|
+
"aria-disabled": disabled || void 0,
|
|
3856
|
+
tabIndex: disabled ? -1 : void 0,
|
|
3857
|
+
onClick: handleClick,
|
|
3858
|
+
className: cn(
|
|
3859
|
+
"cnc-sidebar-item cnc-w-full cnc-flex cnc-items-center cnc-gap-2",
|
|
3860
|
+
"cnc-text-base cnc-text-white cnc-no-underline",
|
|
3861
|
+
"cnc-transition-colors cnc-duration-200",
|
|
3862
|
+
"hover:cnc-text-blue-600",
|
|
3863
|
+
"data-[type=secondary]:cnc-pl-0 data-[type=secondary]:cnc-text-sm",
|
|
3864
|
+
"data-[type=secondary]:cnc-py-0 data-[type=secondary]:cnc-my-2",
|
|
3865
|
+
isMini ? "cnc-justify-center cnc-rounded-md cnc-px-2 cnc-py-2.5" : "cnc-py-4 cnc-sidebar-child-hidden",
|
|
3866
|
+
ativo && "cnc-bg-white/20 cnc-rounded-md",
|
|
3867
|
+
disabled && "cnc-opacity-60 cnc-pointer-events-none",
|
|
3868
|
+
className
|
|
3869
|
+
),
|
|
3870
|
+
...rest,
|
|
3871
|
+
children: content
|
|
3872
|
+
}
|
|
3873
|
+
);
|
|
3874
|
+
if (isMini && label != null) {
|
|
3875
|
+
return /* @__PURE__ */ jsxs9("div", { className: "cnc-relative cnc-group cnc-mb-1", children: [
|
|
3876
|
+
link,
|
|
3877
|
+
/* @__PURE__ */ jsx10(MiniTooltip, { label })
|
|
3878
|
+
] });
|
|
3879
|
+
}
|
|
3880
|
+
return link;
|
|
3881
|
+
}
|
|
3882
|
+
function ChevronIcon({ className }) {
|
|
3883
|
+
return /* @__PURE__ */ jsx10(
|
|
3884
|
+
"svg",
|
|
3885
|
+
{
|
|
3886
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3887
|
+
width: "24",
|
|
3888
|
+
height: "24",
|
|
3889
|
+
viewBox: "0 0 24 24",
|
|
3890
|
+
fill: "none",
|
|
3891
|
+
stroke: "currentColor",
|
|
3892
|
+
strokeWidth: "2",
|
|
3893
|
+
strokeLinecap: "round",
|
|
3894
|
+
strokeLinejoin: "round",
|
|
3895
|
+
className,
|
|
3896
|
+
children: /* @__PURE__ */ jsx10("path", { d: "m9 18 6-6-6-6" })
|
|
3646
3897
|
}
|
|
3647
3898
|
);
|
|
3648
3899
|
}
|
|
@@ -3650,57 +3901,62 @@ function SidebarNavCollapse({
|
|
|
3650
3901
|
children,
|
|
3651
3902
|
title,
|
|
3652
3903
|
icon,
|
|
3904
|
+
className,
|
|
3653
3905
|
...rest
|
|
3654
3906
|
}) {
|
|
3655
|
-
|
|
3907
|
+
const { variant } = useSidebar();
|
|
3908
|
+
if (variant === "mini") {
|
|
3909
|
+
return /* @__PURE__ */ jsxs9(Popover, { children: [
|
|
3910
|
+
/* @__PURE__ */ jsx10(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx10(
|
|
3911
|
+
"button",
|
|
3912
|
+
{
|
|
3913
|
+
type: "button",
|
|
3914
|
+
"aria-label": title,
|
|
3915
|
+
className: cn(
|
|
3916
|
+
"cnc-sidebar-item cnc-w-full cnc-mb-1 cnc-flex cnc-items-center",
|
|
3917
|
+
"cnc-justify-center cnc-rounded-md cnc-px-2 cnc-py-2.5",
|
|
3918
|
+
"cnc-text-white cnc-transition-colors cnc-duration-200",
|
|
3919
|
+
"hover:cnc-bg-white/10 hover:cnc-text-blue-600",
|
|
3920
|
+
className
|
|
3921
|
+
),
|
|
3922
|
+
children: renderIconItem(icon)
|
|
3923
|
+
}
|
|
3924
|
+
) }),
|
|
3925
|
+
/* @__PURE__ */ jsxs9(
|
|
3926
|
+
PopoverContent,
|
|
3927
|
+
{
|
|
3928
|
+
side: "right",
|
|
3929
|
+
align: "start",
|
|
3930
|
+
sideOffset: 8,
|
|
3931
|
+
className: "cnc-w-56 cnc-bg-primary-800 cnc-border-primary-200 cnc-p-2",
|
|
3932
|
+
children: [
|
|
3933
|
+
/* @__PURE__ */ jsx10("p", { className: "cnc-px-2 cnc-pb-2 cnc-text-xs cnc-font-semibold cnc-text-white/70", children: title }),
|
|
3934
|
+
/* @__PURE__ */ jsx10("div", { className: "cnc-flex cnc-flex-col", children })
|
|
3935
|
+
]
|
|
3936
|
+
}
|
|
3937
|
+
)
|
|
3938
|
+
] });
|
|
3939
|
+
}
|
|
3940
|
+
return /* @__PURE__ */ jsxs9(Accordion.Item, { ...rest, className: cn("cnc-sidebar-item", className), children: [
|
|
3656
3941
|
/* @__PURE__ */ jsxs9(Accordion.Trigger, { className: "group cnc-w-full cnc-py-4 cnc-text-base cnc-text-white cnc-flex cnc-gap-2 cnc-items-center cnc-justify-between hover:cnc-text-blue-600 cnc-sidebar-child-hidden", children: [
|
|
3657
3942
|
/* @__PURE__ */ jsxs9("div", { className: "cnc-flex cnc-items-center cnc-gap-2", children: [
|
|
3658
|
-
|
|
3943
|
+
renderIconItem(icon),
|
|
3659
3944
|
title
|
|
3660
3945
|
] }),
|
|
3661
|
-
/* @__PURE__ */
|
|
3662
|
-
"svg",
|
|
3663
|
-
{
|
|
3664
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
3665
|
-
width: "24",
|
|
3666
|
-
height: "24",
|
|
3667
|
-
viewBox: "0 0 24 24",
|
|
3668
|
-
fill: "none",
|
|
3669
|
-
stroke: "currentColor",
|
|
3670
|
-
strokeWidth: "2",
|
|
3671
|
-
strokeLinecap: "round",
|
|
3672
|
-
strokeLinejoin: "round",
|
|
3673
|
-
className: "cnc-w-full cnc-h-full cnc-text-violet10 cnc-transition-transform cnc-duration-300 cnc-ease-[cubic-bezier(0.87,_0,_0.13,_1)] group-data-[state=open]:cnc-rotate-90",
|
|
3674
|
-
children: /* @__PURE__ */ jsx9("path", { d: "m9 18 6-6-6-6" })
|
|
3675
|
-
}
|
|
3676
|
-
) })
|
|
3946
|
+
/* @__PURE__ */ jsx10("div", { className: "cnc-w-4 cnc-h-4", children: /* @__PURE__ */ jsx10(ChevronIcon, { className: "cnc-w-full cnc-h-full cnc-text-violet10 cnc-transition-transform cnc-duration-300 cnc-ease-[cubic-bezier(0.87,_0,_0.13,_1)] group-data-[state=open]:cnc-rotate-90" }) })
|
|
3677
3947
|
] }),
|
|
3678
|
-
/* @__PURE__ */
|
|
3948
|
+
/* @__PURE__ */ jsx10(Accordion.Content, { className: "cnc-overflow-hidden data-[state=closed]:cnc-animate-slideUp data-[state=open]:cnc-animate-slideDown cnc-py-2", children: /* @__PURE__ */ jsx10("div", { className: "cnc-bg-white/10 cnc-rounded-md cnc-font-normal cnc-px-5 cnc-py-3", children }) })
|
|
3679
3949
|
] });
|
|
3680
3950
|
}
|
|
3681
|
-
function renderIconItem(icon) {
|
|
3682
|
-
if (!icon) return null;
|
|
3683
|
-
if (isValidElement(icon) && icon.type === "svg") {
|
|
3684
|
-
const svgIcon = icon;
|
|
3685
|
-
return cloneElement(svgIcon, {
|
|
3686
|
-
height: 20,
|
|
3687
|
-
width: 20
|
|
3688
|
-
});
|
|
3689
|
-
}
|
|
3690
|
-
if (isValidElement(icon)) {
|
|
3691
|
-
return /* @__PURE__ */ jsx9("span", { className: "cnc-w-5 cnc-h-5 cnc-overflow-hidden", children: icon });
|
|
3692
|
-
}
|
|
3693
|
-
return /* @__PURE__ */ jsx9("span", { className: "cnc-w-5 cnc-h-5 cnc-overflow-hidden", children: icon });
|
|
3694
|
-
}
|
|
3695
3951
|
|
|
3696
3952
|
// src/components/Popover/index.tsx
|
|
3697
|
-
import * as
|
|
3698
|
-
import * as
|
|
3699
|
-
import { jsx as
|
|
3700
|
-
var
|
|
3701
|
-
var
|
|
3702
|
-
var
|
|
3703
|
-
|
|
3953
|
+
import * as PopoverPrimitive2 from "@radix-ui/react-popover";
|
|
3954
|
+
import * as React9 from "react";
|
|
3955
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
3956
|
+
var Popover2 = PopoverPrimitive2.Root;
|
|
3957
|
+
var PopoverTrigger2 = PopoverPrimitive2.Trigger;
|
|
3958
|
+
var PopoverContent2 = React9.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx11(PopoverPrimitive2.Portal, { children: /* @__PURE__ */ jsx11(
|
|
3959
|
+
PopoverPrimitive2.Content,
|
|
3704
3960
|
{
|
|
3705
3961
|
ref,
|
|
3706
3962
|
align,
|
|
@@ -3712,18 +3968,18 @@ var PopoverContent = React6.forwardRef(({ className, align = "center", sideOffse
|
|
|
3712
3968
|
...props
|
|
3713
3969
|
}
|
|
3714
3970
|
) }));
|
|
3715
|
-
|
|
3971
|
+
PopoverContent2.displayName = PopoverPrimitive2.Content.displayName;
|
|
3716
3972
|
|
|
3717
3973
|
// src/components/Select/index.tsx
|
|
3718
|
-
import * as
|
|
3974
|
+
import * as React10 from "react";
|
|
3719
3975
|
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
3720
|
-
import { jsx as
|
|
3976
|
+
import { jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
3721
3977
|
var Select = SelectPrimitive.Root;
|
|
3722
3978
|
var SelectGroup = SelectPrimitive.Group;
|
|
3723
3979
|
var SelectValue = SelectPrimitive.Value;
|
|
3724
3980
|
var SelectPortal = SelectPrimitive.Portal;
|
|
3725
3981
|
var SelectViewport = SelectPrimitive.Viewport;
|
|
3726
|
-
var SelectTrigger =
|
|
3982
|
+
var SelectTrigger = React10.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs10(
|
|
3727
3983
|
SelectPrimitive.Trigger,
|
|
3728
3984
|
{
|
|
3729
3985
|
ref,
|
|
@@ -3734,12 +3990,12 @@ var SelectTrigger = React7.forwardRef(({ className, children, ...props }, ref) =
|
|
|
3734
3990
|
...props,
|
|
3735
3991
|
children: [
|
|
3736
3992
|
children,
|
|
3737
|
-
/* @__PURE__ */
|
|
3993
|
+
/* @__PURE__ */ jsx12(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx12(ChevronDown, { className: "h-4 w-4 opacity-50" }) })
|
|
3738
3994
|
]
|
|
3739
3995
|
}
|
|
3740
3996
|
));
|
|
3741
3997
|
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
3742
|
-
var SelectScrollUpButton =
|
|
3998
|
+
var SelectScrollUpButton = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx12(
|
|
3743
3999
|
SelectPrimitive.ScrollUpButton,
|
|
3744
4000
|
{
|
|
3745
4001
|
ref,
|
|
@@ -3748,11 +4004,11 @@ var SelectScrollUpButton = React7.forwardRef(({ className, ...props }, ref) => /
|
|
|
3748
4004
|
className
|
|
3749
4005
|
),
|
|
3750
4006
|
...props,
|
|
3751
|
-
children: /* @__PURE__ */
|
|
4007
|
+
children: /* @__PURE__ */ jsx12(ChevronUp, { className: "cnc-h-4 cnc-w-4" })
|
|
3752
4008
|
}
|
|
3753
4009
|
));
|
|
3754
4010
|
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
3755
|
-
var SelectScrollDownButton =
|
|
4011
|
+
var SelectScrollDownButton = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx12(
|
|
3756
4012
|
SelectPrimitive.ScrollDownButton,
|
|
3757
4013
|
{
|
|
3758
4014
|
ref,
|
|
@@ -3761,11 +4017,11 @@ var SelectScrollDownButton = React7.forwardRef(({ className, ...props }, ref) =>
|
|
|
3761
4017
|
className
|
|
3762
4018
|
),
|
|
3763
4019
|
...props,
|
|
3764
|
-
children: /* @__PURE__ */
|
|
4020
|
+
children: /* @__PURE__ */ jsx12(ChevronDown, { className: "cnc-h-4 cnc-w-4" })
|
|
3765
4021
|
}
|
|
3766
4022
|
));
|
|
3767
4023
|
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
3768
|
-
var SelectContent =
|
|
4024
|
+
var SelectContent = React10.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx12(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs10(
|
|
3769
4025
|
SelectPrimitive.Content,
|
|
3770
4026
|
{
|
|
3771
4027
|
ref,
|
|
@@ -3777,8 +4033,8 @@ var SelectContent = React7.forwardRef(({ className, children, position = "popper
|
|
|
3777
4033
|
position,
|
|
3778
4034
|
...props,
|
|
3779
4035
|
children: [
|
|
3780
|
-
/* @__PURE__ */
|
|
3781
|
-
/* @__PURE__ */
|
|
4036
|
+
/* @__PURE__ */ jsx12(SelectScrollUpButton, {}),
|
|
4037
|
+
/* @__PURE__ */ jsx12(
|
|
3782
4038
|
SelectPrimitive.Viewport,
|
|
3783
4039
|
{
|
|
3784
4040
|
className: cn(
|
|
@@ -3788,12 +4044,12 @@ var SelectContent = React7.forwardRef(({ className, children, position = "popper
|
|
|
3788
4044
|
children
|
|
3789
4045
|
}
|
|
3790
4046
|
),
|
|
3791
|
-
/* @__PURE__ */
|
|
4047
|
+
/* @__PURE__ */ jsx12(SelectScrollDownButton, {})
|
|
3792
4048
|
]
|
|
3793
4049
|
}
|
|
3794
4050
|
) }));
|
|
3795
4051
|
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
3796
|
-
var SelectLabel =
|
|
4052
|
+
var SelectLabel = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx12(
|
|
3797
4053
|
SelectPrimitive.Label,
|
|
3798
4054
|
{
|
|
3799
4055
|
ref,
|
|
@@ -3805,7 +4061,7 @@ var SelectLabel = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
3805
4061
|
}
|
|
3806
4062
|
));
|
|
3807
4063
|
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
3808
|
-
var SelectItem =
|
|
4064
|
+
var SelectItem = React10.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs10(
|
|
3809
4065
|
SelectPrimitive.Item,
|
|
3810
4066
|
{
|
|
3811
4067
|
ref,
|
|
@@ -3815,13 +4071,13 @@ var SelectItem = React7.forwardRef(({ className, children, ...props }, ref) => /
|
|
|
3815
4071
|
),
|
|
3816
4072
|
...props,
|
|
3817
4073
|
children: [
|
|
3818
|
-
/* @__PURE__ */
|
|
3819
|
-
/* @__PURE__ */
|
|
4074
|
+
/* @__PURE__ */ jsx12("span", { className: "cnc-absolute cnc-left-2 cnc-flex cnc-h-3.5 cnc-w-3.5 cnc-cnc-items-center cnc-justify-center", children: /* @__PURE__ */ jsx12(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx12(Check, { className: "cnc-h-4 cnc-w-4" }) }) }),
|
|
4075
|
+
/* @__PURE__ */ jsx12(SelectPrimitive.ItemText, { children })
|
|
3820
4076
|
]
|
|
3821
4077
|
}
|
|
3822
4078
|
));
|
|
3823
4079
|
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
3824
|
-
var SelectSeparator =
|
|
4080
|
+
var SelectSeparator = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx12(
|
|
3825
4081
|
SelectPrimitive.Separator,
|
|
3826
4082
|
{
|
|
3827
4083
|
ref,
|
|
@@ -3833,11 +4089,11 @@ SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
|
3833
4089
|
|
|
3834
4090
|
// src/components/Tabs/index.tsx
|
|
3835
4091
|
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
3836
|
-
import * as
|
|
3837
|
-
import { jsx as
|
|
4092
|
+
import * as React11 from "react";
|
|
4093
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
3838
4094
|
var Tabs = TabsPrimitive.Root;
|
|
3839
|
-
var TabsList =
|
|
3840
|
-
return /* @__PURE__ */
|
|
4095
|
+
var TabsList = React11.forwardRef(({ className, ...props }, ref) => {
|
|
4096
|
+
return /* @__PURE__ */ jsx13(
|
|
3841
4097
|
TabsPrimitive.List,
|
|
3842
4098
|
{
|
|
3843
4099
|
ref,
|
|
@@ -3847,7 +4103,7 @@ var TabsList = React8.forwardRef(({ className, ...props }, ref) => {
|
|
|
3847
4103
|
);
|
|
3848
4104
|
});
|
|
3849
4105
|
TabsList.displayName = TabsPrimitive.List.displayName;
|
|
3850
|
-
var TabsTrigger =
|
|
4106
|
+
var TabsTrigger = React11.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx13(
|
|
3851
4107
|
TabsPrimitive.Trigger,
|
|
3852
4108
|
{
|
|
3853
4109
|
ref,
|
|
@@ -3859,8 +4115,8 @@ var TabsTrigger = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
3859
4115
|
}
|
|
3860
4116
|
));
|
|
3861
4117
|
TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
|
|
3862
|
-
var TabsContent =
|
|
3863
|
-
return /* @__PURE__ */
|
|
4118
|
+
var TabsContent = React11.forwardRef(({ className, children, ...props }, ref) => {
|
|
4119
|
+
return /* @__PURE__ */ jsx13(
|
|
3864
4120
|
TabsPrimitive.Content,
|
|
3865
4121
|
{
|
|
3866
4122
|
ref,
|
|
@@ -3876,9 +4132,9 @@ var TabsContent = React8.forwardRef(({ className, children, ...props }, ref) =>
|
|
|
3876
4132
|
TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
3877
4133
|
|
|
3878
4134
|
// src/components/atoms/forms/input.tsx
|
|
3879
|
-
import * as
|
|
3880
|
-
import { jsx as
|
|
3881
|
-
var Input =
|
|
4135
|
+
import * as React12 from "react";
|
|
4136
|
+
import { jsx as jsx14, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
4137
|
+
var Input = React12.forwardRef(
|
|
3882
4138
|
({ className, type, id, label, required, ...props }, ref) => {
|
|
3883
4139
|
const idGenerate = id ? id : label && `field-${Date.now()}-${Math.random() * 1e5}`;
|
|
3884
4140
|
return /* @__PURE__ */ jsxs11("div", { className: "cnc-w-full", children: [
|
|
@@ -3889,11 +4145,11 @@ var Input = React9.forwardRef(
|
|
|
3889
4145
|
className: "cnc-block cnc-text-sm cnc-mb-1 cnc-font-medium cnc-text-brand-gray-600",
|
|
3890
4146
|
children: [
|
|
3891
4147
|
label,
|
|
3892
|
-
required && /* @__PURE__ */
|
|
4148
|
+
required && /* @__PURE__ */ jsx14("span", { className: "text-red-500", children: " *" })
|
|
3893
4149
|
]
|
|
3894
4150
|
}
|
|
3895
4151
|
),
|
|
3896
|
-
/* @__PURE__ */
|
|
4152
|
+
/* @__PURE__ */ jsx14(
|
|
3897
4153
|
"input",
|
|
3898
4154
|
{
|
|
3899
4155
|
type,
|
|
@@ -3915,9 +4171,9 @@ var Input = React9.forwardRef(
|
|
|
3915
4171
|
Input.displayName = "Input";
|
|
3916
4172
|
|
|
3917
4173
|
// src/components/atoms/forms/textarea.tsx
|
|
3918
|
-
import * as
|
|
3919
|
-
import { jsx as
|
|
3920
|
-
var Textarea =
|
|
4174
|
+
import * as React13 from "react";
|
|
4175
|
+
import { jsx as jsx15, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
4176
|
+
var Textarea = React13.forwardRef(
|
|
3921
4177
|
({ className, id, label, required, ...props }, ref) => {
|
|
3922
4178
|
const idGenerate = id ? id : label && `field-${Date.now()}-${Math.random() * 1e5}`;
|
|
3923
4179
|
return /* @__PURE__ */ jsxs12("div", { className: "cnc-w-full", children: [
|
|
@@ -3928,11 +4184,11 @@ var Textarea = React10.forwardRef(
|
|
|
3928
4184
|
className: "cnc-block cnc-text-sm cnc-mb-1 cnc-font-medium cnc-text-brand-gray-600",
|
|
3929
4185
|
children: [
|
|
3930
4186
|
label,
|
|
3931
|
-
required && /* @__PURE__ */
|
|
4187
|
+
required && /* @__PURE__ */ jsx15("span", { className: "text-red-500", children: " *" })
|
|
3932
4188
|
]
|
|
3933
4189
|
}
|
|
3934
4190
|
),
|
|
3935
|
-
/* @__PURE__ */
|
|
4191
|
+
/* @__PURE__ */ jsx15(
|
|
3936
4192
|
"textarea",
|
|
3937
4193
|
{
|
|
3938
4194
|
id: idGenerate,
|
|
@@ -3953,14 +4209,14 @@ var Textarea = React10.forwardRef(
|
|
|
3953
4209
|
Textarea.displayName = "Textarea";
|
|
3954
4210
|
|
|
3955
4211
|
// src/components/atoms/forms/checkbox.tsx
|
|
3956
|
-
import * as
|
|
3957
|
-
import { jsx as
|
|
3958
|
-
var Checkbox =
|
|
4212
|
+
import * as React14 from "react";
|
|
4213
|
+
import { jsx as jsx16, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
4214
|
+
var Checkbox = React14.forwardRef(
|
|
3959
4215
|
({ className, id, label, ...props }, ref) => {
|
|
3960
4216
|
console.log();
|
|
3961
4217
|
const idGenerate = id ? id : label && `field-${Date.now()}-${Math.random() * 1e5}`;
|
|
3962
4218
|
return /* @__PURE__ */ jsxs13("div", { className: "cnc-w-full cnc-flex cnc-flex-row", children: [
|
|
3963
|
-
/* @__PURE__ */
|
|
4219
|
+
/* @__PURE__ */ jsx16(
|
|
3964
4220
|
"input",
|
|
3965
4221
|
{
|
|
3966
4222
|
type: "checkbox",
|
|
@@ -3970,7 +4226,7 @@ var Checkbox = React11.forwardRef(
|
|
|
3970
4226
|
...props
|
|
3971
4227
|
}
|
|
3972
4228
|
),
|
|
3973
|
-
label && /* @__PURE__ */
|
|
4229
|
+
label && /* @__PURE__ */ jsx16(
|
|
3974
4230
|
"label",
|
|
3975
4231
|
{
|
|
3976
4232
|
htmlFor: idGenerate,
|
|
@@ -3984,9 +4240,9 @@ var Checkbox = React11.forwardRef(
|
|
|
3984
4240
|
Checkbox.displayName = "Checkbox";
|
|
3985
4241
|
|
|
3986
4242
|
// src/components/atoms/forms/switch.tsx
|
|
3987
|
-
import * as
|
|
3988
|
-
import { jsx as
|
|
3989
|
-
var Switch =
|
|
4243
|
+
import * as React15 from "react";
|
|
4244
|
+
import { jsx as jsx17, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
4245
|
+
var Switch = React15.forwardRef(
|
|
3990
4246
|
({
|
|
3991
4247
|
className,
|
|
3992
4248
|
id,
|
|
@@ -4000,12 +4256,12 @@ var Switch = React12.forwardRef(
|
|
|
4000
4256
|
name,
|
|
4001
4257
|
"aria-label": ariaLabel
|
|
4002
4258
|
}, ref) => {
|
|
4003
|
-
const [internalChecked, setInternalChecked] =
|
|
4259
|
+
const [internalChecked, setInternalChecked] = React15.useState(
|
|
4004
4260
|
defaultChecked ?? false
|
|
4005
4261
|
);
|
|
4006
4262
|
const isControlled = checked !== void 0;
|
|
4007
4263
|
const isChecked = isControlled ? checked : internalChecked;
|
|
4008
|
-
const reactId =
|
|
4264
|
+
const reactId = React15.useId();
|
|
4009
4265
|
const fieldId = id || reactId;
|
|
4010
4266
|
const handleToggle = () => {
|
|
4011
4267
|
if (disabled) return;
|
|
@@ -4016,7 +4272,7 @@ var Switch = React12.forwardRef(
|
|
|
4016
4272
|
onChange?.(newValue);
|
|
4017
4273
|
};
|
|
4018
4274
|
return /* @__PURE__ */ jsxs14("div", { className: cn("cnc-flex cnc-items-center cnc-gap-2", className), children: [
|
|
4019
|
-
/* @__PURE__ */
|
|
4275
|
+
/* @__PURE__ */ jsx17(
|
|
4020
4276
|
"input",
|
|
4021
4277
|
{
|
|
4022
4278
|
type: "checkbox",
|
|
@@ -4028,7 +4284,7 @@ var Switch = React12.forwardRef(
|
|
|
4028
4284
|
"aria-hidden": "true"
|
|
4029
4285
|
}
|
|
4030
4286
|
),
|
|
4031
|
-
/* @__PURE__ */
|
|
4287
|
+
/* @__PURE__ */ jsx17(
|
|
4032
4288
|
"button",
|
|
4033
4289
|
{
|
|
4034
4290
|
ref,
|
|
@@ -4046,7 +4302,7 @@ var Switch = React12.forwardRef(
|
|
|
4046
4302
|
"disabled:cnc-cursor-not-allowed disabled:cnc-opacity-50",
|
|
4047
4303
|
isChecked ? "cnc-bg-brand-blue-400 cnc-border-brand-blue-500" : "cnc-bg-brand-gray-20 cnc-border-brand-gray-100"
|
|
4048
4304
|
),
|
|
4049
|
-
children: /* @__PURE__ */
|
|
4305
|
+
children: /* @__PURE__ */ jsx17(
|
|
4050
4306
|
"span",
|
|
4051
4307
|
{
|
|
4052
4308
|
className: cn(
|
|
@@ -4064,7 +4320,7 @@ var Switch = React12.forwardRef(
|
|
|
4064
4320
|
className: "cnc-text-sm cnc-font-medium cnc-text-brand-gray-600 cnc-cursor-pointer",
|
|
4065
4321
|
children: [
|
|
4066
4322
|
label,
|
|
4067
|
-
required && /* @__PURE__ */
|
|
4323
|
+
required && /* @__PURE__ */ jsx17("span", { className: "cnc-text-red-500", children: " *" })
|
|
4068
4324
|
]
|
|
4069
4325
|
}
|
|
4070
4326
|
)
|
|
@@ -4074,7 +4330,7 @@ var Switch = React12.forwardRef(
|
|
|
4074
4330
|
Switch.displayName = "Switch";
|
|
4075
4331
|
|
|
4076
4332
|
// src/components/atoms/display/badge.tsx
|
|
4077
|
-
import { jsx as
|
|
4333
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
4078
4334
|
var Badge = ({
|
|
4079
4335
|
variant = "default",
|
|
4080
4336
|
rounded = true,
|
|
@@ -4096,7 +4352,7 @@ var Badge = ({
|
|
|
4096
4352
|
md: "cnc-text-sm cnc-px-3 cnc-py-1",
|
|
4097
4353
|
lg: "cnc-text-base cnc-px-4 cnc-py-2"
|
|
4098
4354
|
};
|
|
4099
|
-
return /* @__PURE__ */
|
|
4355
|
+
return /* @__PURE__ */ jsx18(
|
|
4100
4356
|
"span",
|
|
4101
4357
|
{
|
|
4102
4358
|
className: cn(
|
|
@@ -4112,8 +4368,8 @@ var Badge = ({
|
|
|
4112
4368
|
};
|
|
4113
4369
|
|
|
4114
4370
|
// src/components/atoms/display/avatar.tsx
|
|
4115
|
-
import * as
|
|
4116
|
-
import { jsx as
|
|
4371
|
+
import * as React16 from "react";
|
|
4372
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
4117
4373
|
var avatarSizeClasses = {
|
|
4118
4374
|
sm: "cnc-size-8 cnc-text-[10px]",
|
|
4119
4375
|
md: "cnc-size-12 cnc-text-xs",
|
|
@@ -4135,14 +4391,14 @@ function Avatar({
|
|
|
4135
4391
|
className,
|
|
4136
4392
|
...props
|
|
4137
4393
|
}) {
|
|
4138
|
-
const [hasError, setHasError] =
|
|
4394
|
+
const [hasError, setHasError] = React16.useState(false);
|
|
4139
4395
|
const baseClasses = cn(
|
|
4140
4396
|
"cnc-flex cnc-shrink-0 cnc-items-center cnc-justify-center cnc-overflow-hidden cnc-rounded-full cnc-border-2 cnc-border-brand-gray-50 cnc-bg-brand-gray-10 cnc-text-brand-gray-200",
|
|
4141
4397
|
avatarSizeClasses[size],
|
|
4142
4398
|
className
|
|
4143
4399
|
);
|
|
4144
4400
|
if (isLoading) {
|
|
4145
|
-
return /* @__PURE__ */
|
|
4401
|
+
return /* @__PURE__ */ jsx19(
|
|
4146
4402
|
"span",
|
|
4147
4403
|
{
|
|
4148
4404
|
className: cn(baseClasses, "cnc-animate-pulse cnc-bg-brand-gray-50"),
|
|
@@ -4153,7 +4409,7 @@ function Avatar({
|
|
|
4153
4409
|
);
|
|
4154
4410
|
}
|
|
4155
4411
|
const showImage = src && !hasError;
|
|
4156
|
-
return /* @__PURE__ */
|
|
4412
|
+
return /* @__PURE__ */ jsx19("span", { className: baseClasses, ...props, children: showImage ? /* @__PURE__ */ jsx19(
|
|
4157
4413
|
"img",
|
|
4158
4414
|
{
|
|
4159
4415
|
src,
|
|
@@ -4161,7 +4417,7 @@ function Avatar({
|
|
|
4161
4417
|
className: "cnc-h-full cnc-w-full cnc-object-cover",
|
|
4162
4418
|
onError: () => setHasError(true)
|
|
4163
4419
|
}
|
|
4164
|
-
) : fallback ? /* @__PURE__ */
|
|
4420
|
+
) : fallback ? /* @__PURE__ */ jsx19("span", { className: "cnc-font-bold", children: fallback }) : /* @__PURE__ */ jsx19(
|
|
4165
4421
|
User,
|
|
4166
4422
|
{
|
|
4167
4423
|
className: "cnc-shrink-0",
|
|
@@ -4172,12 +4428,12 @@ function Avatar({
|
|
|
4172
4428
|
}
|
|
4173
4429
|
|
|
4174
4430
|
// src/components/molecules/card.tsx
|
|
4175
|
-
import { jsx as
|
|
4431
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
4176
4432
|
function Card({
|
|
4177
4433
|
className,
|
|
4178
4434
|
...rest
|
|
4179
4435
|
}) {
|
|
4180
|
-
return /* @__PURE__ */
|
|
4436
|
+
return /* @__PURE__ */ jsx20(
|
|
4181
4437
|
"div",
|
|
4182
4438
|
{
|
|
4183
4439
|
className: cn(
|
|
@@ -4192,7 +4448,7 @@ function CardHeader({
|
|
|
4192
4448
|
className,
|
|
4193
4449
|
...rest
|
|
4194
4450
|
}) {
|
|
4195
|
-
return /* @__PURE__ */
|
|
4451
|
+
return /* @__PURE__ */ jsx20("div", { className: "cnc-px-6 cnc-pt-6", children: /* @__PURE__ */ jsx20(
|
|
4196
4452
|
"div",
|
|
4197
4453
|
{
|
|
4198
4454
|
className: cn(
|
|
@@ -4207,13 +4463,13 @@ function CardContent({
|
|
|
4207
4463
|
className,
|
|
4208
4464
|
...rest
|
|
4209
4465
|
}) {
|
|
4210
|
-
return /* @__PURE__ */
|
|
4466
|
+
return /* @__PURE__ */ jsx20("div", { className: cn("cnc-px-6 cnc-py-2", className), ...rest });
|
|
4211
4467
|
}
|
|
4212
4468
|
function CardFooter({
|
|
4213
4469
|
className,
|
|
4214
4470
|
...rest
|
|
4215
4471
|
}) {
|
|
4216
|
-
return /* @__PURE__ */
|
|
4472
|
+
return /* @__PURE__ */ jsx20(
|
|
4217
4473
|
"div",
|
|
4218
4474
|
{
|
|
4219
4475
|
className: cn(
|
|
@@ -4228,7 +4484,7 @@ function CardFooterItem({
|
|
|
4228
4484
|
className,
|
|
4229
4485
|
...rest
|
|
4230
4486
|
}) {
|
|
4231
|
-
return /* @__PURE__ */
|
|
4487
|
+
return /* @__PURE__ */ jsx20(
|
|
4232
4488
|
"div",
|
|
4233
4489
|
{
|
|
4234
4490
|
className: cn(
|
|
@@ -4242,7 +4498,7 @@ function CardFooterItem({
|
|
|
4242
4498
|
|
|
4243
4499
|
// src/components/molecules/collapsible.tsx
|
|
4244
4500
|
import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
|
|
4245
|
-
import { jsx as
|
|
4501
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
4246
4502
|
var Collapsible = CollapsiblePrimitive.Root;
|
|
4247
4503
|
var CollapsibleTrigger2 = CollapsiblePrimitive.CollapsibleTrigger;
|
|
4248
4504
|
var CollapsibleContent2 = CollapsiblePrimitive.CollapsibleContent;
|
|
@@ -4250,16 +4506,16 @@ var AnimatedCollapsibleContent = ({
|
|
|
4250
4506
|
className,
|
|
4251
4507
|
...rest
|
|
4252
4508
|
}) => {
|
|
4253
|
-
return /* @__PURE__ */
|
|
4509
|
+
return /* @__PURE__ */ jsx21(CollapsibleContent2, { className: "cnc-collapsible-content", ...rest });
|
|
4254
4510
|
};
|
|
4255
4511
|
|
|
4256
4512
|
// src/components/molecules/display/page-header.tsx
|
|
4257
|
-
import { jsx as
|
|
4513
|
+
import { jsx as jsx22, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
4258
4514
|
function PageHeader({
|
|
4259
4515
|
children,
|
|
4260
4516
|
className
|
|
4261
4517
|
}) {
|
|
4262
|
-
return /* @__PURE__ */
|
|
4518
|
+
return /* @__PURE__ */ jsx22(
|
|
4263
4519
|
"header",
|
|
4264
4520
|
{
|
|
4265
4521
|
className: cn(
|
|
@@ -4274,7 +4530,7 @@ function PageHeaderTitleContent({
|
|
|
4274
4530
|
children,
|
|
4275
4531
|
className
|
|
4276
4532
|
}) {
|
|
4277
|
-
return /* @__PURE__ */
|
|
4533
|
+
return /* @__PURE__ */ jsx22(
|
|
4278
4534
|
"div",
|
|
4279
4535
|
{
|
|
4280
4536
|
className: cn(
|
|
@@ -4292,15 +4548,15 @@ function PageHeaderTitle({
|
|
|
4292
4548
|
}) {
|
|
4293
4549
|
const ComponentTitle = titleAs;
|
|
4294
4550
|
return /* @__PURE__ */ jsxs15("div", { children: [
|
|
4295
|
-
/* @__PURE__ */
|
|
4296
|
-
description && /* @__PURE__ */
|
|
4551
|
+
/* @__PURE__ */ jsx22(ComponentTitle, { className: "cnc-text-2xl cnc-font-semibold cnc-text-brand-blue-600", children: title }),
|
|
4552
|
+
description && /* @__PURE__ */ jsx22("p", { className: "cnc-text-sm cnc-text-brand-gray-500", children: description })
|
|
4297
4553
|
] });
|
|
4298
4554
|
}
|
|
4299
4555
|
function PageHeaderActionsContainer({
|
|
4300
4556
|
children,
|
|
4301
4557
|
className
|
|
4302
4558
|
}) {
|
|
4303
|
-
return /* @__PURE__ */
|
|
4559
|
+
return /* @__PURE__ */ jsx22(
|
|
4304
4560
|
"div",
|
|
4305
4561
|
{
|
|
4306
4562
|
className: cn(
|
|
@@ -4312,11 +4568,11 @@ function PageHeaderActionsContainer({
|
|
|
4312
4568
|
);
|
|
4313
4569
|
}
|
|
4314
4570
|
function Title2({ title, as: Component = "h1" }) {
|
|
4315
|
-
return /* @__PURE__ */
|
|
4571
|
+
return /* @__PURE__ */ jsx22(Component, { className: "cnc-text-[24px] cnc-text-[#1F2C4D] cnc-font-bold cnc-mt-2 cnc-mb-4 text-center md:cnc-text-[28px] md:cnc-text-left", children: title });
|
|
4316
4572
|
}
|
|
4317
4573
|
|
|
4318
4574
|
// src/components/molecules/display/empty-state.tsx
|
|
4319
|
-
import { jsx as
|
|
4575
|
+
import { jsx as jsx23, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
4320
4576
|
function EmptyState({
|
|
4321
4577
|
icon,
|
|
4322
4578
|
title,
|
|
@@ -4336,17 +4592,17 @@ function EmptyState({
|
|
|
4336
4592
|
),
|
|
4337
4593
|
...props,
|
|
4338
4594
|
children: [
|
|
4339
|
-
/* @__PURE__ */
|
|
4340
|
-
/* @__PURE__ */
|
|
4341
|
-
description ? /* @__PURE__ */
|
|
4342
|
-
action ? /* @__PURE__ */
|
|
4595
|
+
/* @__PURE__ */ jsx23("div", { className: "cnc-mb-3 cnc-text-brand-gray-200", children: icon ?? /* @__PURE__ */ jsx23(FolderOpen, { className: "cnc-h-10 cnc-w-10" }) }),
|
|
4596
|
+
/* @__PURE__ */ jsx23("p", { className: "cnc-text-sm cnc-font-medium cnc-text-brand-blue-600", children: title }),
|
|
4597
|
+
description ? /* @__PURE__ */ jsx23("p", { className: "cnc-mt-1 cnc-max-w-md cnc-text-sm cnc-text-brand-gray-200", children: description }) : null,
|
|
4598
|
+
action ? /* @__PURE__ */ jsx23("div", { className: "cnc-mt-4", children: action }) : null
|
|
4343
4599
|
]
|
|
4344
4600
|
}
|
|
4345
4601
|
);
|
|
4346
4602
|
}
|
|
4347
4603
|
|
|
4348
4604
|
// src/components/molecules/display/result-metadata.tsx
|
|
4349
|
-
import { jsx as
|
|
4605
|
+
import { jsx as jsx24, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
4350
4606
|
function encontradosSuffix(resourceName, forceWordGender) {
|
|
4351
4607
|
if (forceWordGender === "masc") return "o";
|
|
4352
4608
|
if (forceWordGender === "fem") return "a";
|
|
@@ -4371,10 +4627,10 @@ function ResultMetadata({
|
|
|
4371
4627
|
"aria-live": "polite",
|
|
4372
4628
|
...props,
|
|
4373
4629
|
children: [
|
|
4374
|
-
/* @__PURE__ */
|
|
4630
|
+
/* @__PURE__ */ jsx24("div", { className: "cnc-text-base cnc-font-bold cnc-text-brand-blue-100", children: `${resourceName} encontrad${encontradVogal}s | ${isLoading ? "carregando ..." : total?.toLocaleString("pt-BR")}` }),
|
|
4375
4631
|
displayed >= truncationThreshold && /* @__PURE__ */ jsxs17("div", { children: [
|
|
4376
4632
|
"Exibindo os ",
|
|
4377
|
-
/* @__PURE__ */
|
|
4633
|
+
/* @__PURE__ */ jsx24("span", { className: "cnc-font-bold", children: displayed }),
|
|
4378
4634
|
" primeiros registros. Utilize os filtros para refinar sua busca."
|
|
4379
4635
|
] })
|
|
4380
4636
|
]
|
|
@@ -4383,7 +4639,7 @@ function ResultMetadata({
|
|
|
4383
4639
|
}
|
|
4384
4640
|
|
|
4385
4641
|
// src/components/molecules/display/label-value.tsx
|
|
4386
|
-
import { jsx as
|
|
4642
|
+
import { jsx as jsx25, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
4387
4643
|
function LabelValue({
|
|
4388
4644
|
label,
|
|
4389
4645
|
value,
|
|
@@ -4392,7 +4648,7 @@ function LabelValue({
|
|
|
4392
4648
|
valueClassName
|
|
4393
4649
|
}) {
|
|
4394
4650
|
return /* @__PURE__ */ jsxs18("div", { className, children: [
|
|
4395
|
-
/* @__PURE__ */
|
|
4651
|
+
/* @__PURE__ */ jsx25("div", { className: "cnc-mb-2 cnc-text-sm cnc-font-bold cnc-leading-4 cnc-text-primary", children: label }),
|
|
4396
4652
|
/* @__PURE__ */ jsxs18(
|
|
4397
4653
|
"div",
|
|
4398
4654
|
{
|
|
@@ -4402,7 +4658,7 @@ function LabelValue({
|
|
|
4402
4658
|
),
|
|
4403
4659
|
children: [
|
|
4404
4660
|
value ?? "-",
|
|
4405
|
-
href && /* @__PURE__ */
|
|
4661
|
+
href && /* @__PURE__ */ jsx25(
|
|
4406
4662
|
"a",
|
|
4407
4663
|
{
|
|
4408
4664
|
href,
|
|
@@ -4410,7 +4666,7 @@ function LabelValue({
|
|
|
4410
4666
|
rel: "noopener noreferrer",
|
|
4411
4667
|
className: "cnc-inline-flex cnc-items-center cnc-text-brand-blue-500 hover:cnc-opacity-80",
|
|
4412
4668
|
"aria-label": `Abrir link externo de ${label}`,
|
|
4413
|
-
children: /* @__PURE__ */
|
|
4669
|
+
children: /* @__PURE__ */ jsx25(ExternalLink, { className: "cnc-size-4" })
|
|
4414
4670
|
}
|
|
4415
4671
|
)
|
|
4416
4672
|
]
|
|
@@ -4420,10 +4676,10 @@ function LabelValue({
|
|
|
4420
4676
|
}
|
|
4421
4677
|
|
|
4422
4678
|
// src/components/molecules/forms/combobox.tsx
|
|
4423
|
-
import * as
|
|
4679
|
+
import * as React18 from "react";
|
|
4424
4680
|
|
|
4425
4681
|
// src/components/molecules/forms/combobox-footer.tsx
|
|
4426
|
-
import { jsx as
|
|
4682
|
+
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
4427
4683
|
function ComboboxDropdownFooter({
|
|
4428
4684
|
footerAction,
|
|
4429
4685
|
renderFooter,
|
|
@@ -4432,10 +4688,10 @@ function ComboboxDropdownFooter({
|
|
|
4432
4688
|
}) {
|
|
4433
4689
|
if (hidden) return null;
|
|
4434
4690
|
if (renderFooter) {
|
|
4435
|
-
return /* @__PURE__ */
|
|
4691
|
+
return /* @__PURE__ */ jsx26("div", { className: "cnc-border-t cnc-border-brand-gray-50 cnc-p-2", children: renderFooter({ close }) });
|
|
4436
4692
|
}
|
|
4437
4693
|
if (!footerAction) return null;
|
|
4438
|
-
return /* @__PURE__ */
|
|
4694
|
+
return /* @__PURE__ */ jsx26("div", { className: "cnc-border-t cnc-border-brand-gray-50 cnc-p-2", children: /* @__PURE__ */ jsx26(
|
|
4439
4695
|
Button,
|
|
4440
4696
|
{
|
|
4441
4697
|
type: "button",
|
|
@@ -4453,10 +4709,10 @@ function ComboboxDropdownFooter({
|
|
|
4453
4709
|
}
|
|
4454
4710
|
|
|
4455
4711
|
// src/components/molecules/overlay/command.tsx
|
|
4456
|
-
import * as
|
|
4712
|
+
import * as React17 from "react";
|
|
4457
4713
|
import { Command as CommandPrimitive } from "cmdk";
|
|
4458
|
-
import { jsx as
|
|
4459
|
-
var Command =
|
|
4714
|
+
import { jsx as jsx27, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
4715
|
+
var Command = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx27(
|
|
4460
4716
|
CommandPrimitive,
|
|
4461
4717
|
{
|
|
4462
4718
|
ref,
|
|
@@ -4469,16 +4725,16 @@ var Command = React14.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
4469
4725
|
));
|
|
4470
4726
|
Command.displayName = CommandPrimitive.displayName;
|
|
4471
4727
|
var CommandDialog = ({ children, ...props }) => {
|
|
4472
|
-
return /* @__PURE__ */
|
|
4728
|
+
return /* @__PURE__ */ jsx27(Dialog, { ...props, children: /* @__PURE__ */ jsx27(DialogContent, { className: "cnc-overflow-hidden cnc-p-0", children: /* @__PURE__ */ jsx27(Command, { className: "cnc-[&_cmdk-group-heading]:cnc-px-2 cnc-[&_cmdk-group-heading]:cnc-font-medium cnc-[&_cmdk-group-heading]:cnc-text-muted-foreground cnc-[&_cmdk-group]:not([hidden])~[cmdk-group]:cnc-pt-0 cnc-[&_cmdk-group]:cnc-px-2 cnc-[&_cmdk-input-wrapper]_svg:cnc-h-5 cnc-[&_cmdk-input-wrapper]_svg:cnc-w-5 cnc-[&_cmdk-input]:cnc-h-12 cnc-[&_cmdk-item]:cnc-px-2 cnc-[&_cmdk-item]:cnc-py-3 cnc-[&_cmdk-item]_svg:cnc-h-5 cnc-[&_cmdk-item]_svg:cnc-w-5", children }) }) });
|
|
4473
4729
|
};
|
|
4474
|
-
var CommandInput =
|
|
4730
|
+
var CommandInput = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs19(
|
|
4475
4731
|
"div",
|
|
4476
4732
|
{
|
|
4477
4733
|
className: "cnc-flex cnc-items-center cnc-border-b cnc-px-3",
|
|
4478
4734
|
"cmdk-input-wrapper": "",
|
|
4479
4735
|
children: [
|
|
4480
|
-
/* @__PURE__ */
|
|
4481
|
-
/* @__PURE__ */
|
|
4736
|
+
/* @__PURE__ */ jsx27(Search, { className: "cnc-mr-2 cnc-h-4 cnc-w-4 cnc-shrink-0 cnc-opacity-50" }),
|
|
4737
|
+
/* @__PURE__ */ jsx27(
|
|
4482
4738
|
CommandPrimitive.Input,
|
|
4483
4739
|
{
|
|
4484
4740
|
ref,
|
|
@@ -4493,7 +4749,7 @@ var CommandInput = React14.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
4493
4749
|
}
|
|
4494
4750
|
));
|
|
4495
4751
|
CommandInput.displayName = CommandPrimitive.Input.displayName;
|
|
4496
|
-
var CommandList =
|
|
4752
|
+
var CommandList = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx27(
|
|
4497
4753
|
CommandPrimitive.List,
|
|
4498
4754
|
{
|
|
4499
4755
|
ref,
|
|
@@ -4505,7 +4761,7 @@ var CommandList = React14.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
4505
4761
|
}
|
|
4506
4762
|
));
|
|
4507
4763
|
CommandList.displayName = CommandPrimitive.List.displayName;
|
|
4508
|
-
var CommandEmpty =
|
|
4764
|
+
var CommandEmpty = React17.forwardRef((props, ref) => /* @__PURE__ */ jsx27(
|
|
4509
4765
|
CommandPrimitive.Empty,
|
|
4510
4766
|
{
|
|
4511
4767
|
ref,
|
|
@@ -4514,7 +4770,7 @@ var CommandEmpty = React14.forwardRef((props, ref) => /* @__PURE__ */ jsx26(
|
|
|
4514
4770
|
}
|
|
4515
4771
|
));
|
|
4516
4772
|
CommandEmpty.displayName = CommandPrimitive.Empty.displayName;
|
|
4517
|
-
var CommandGroup =
|
|
4773
|
+
var CommandGroup = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx27(
|
|
4518
4774
|
CommandPrimitive.Group,
|
|
4519
4775
|
{
|
|
4520
4776
|
ref,
|
|
@@ -4526,7 +4782,7 @@ var CommandGroup = React14.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
4526
4782
|
}
|
|
4527
4783
|
));
|
|
4528
4784
|
CommandGroup.displayName = CommandPrimitive.Group.displayName;
|
|
4529
|
-
var CommandSeparator =
|
|
4785
|
+
var CommandSeparator = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx27(
|
|
4530
4786
|
CommandPrimitive.Separator,
|
|
4531
4787
|
{
|
|
4532
4788
|
ref,
|
|
@@ -4535,7 +4791,7 @@ var CommandSeparator = React14.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
4535
4791
|
}
|
|
4536
4792
|
));
|
|
4537
4793
|
CommandSeparator.displayName = CommandPrimitive.Separator.displayName;
|
|
4538
|
-
var CommandItem =
|
|
4794
|
+
var CommandItem = React17.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx27(
|
|
4539
4795
|
CommandPrimitive.Item,
|
|
4540
4796
|
{
|
|
4541
4797
|
ref,
|
|
@@ -4551,7 +4807,7 @@ var CommandShortcut = ({
|
|
|
4551
4807
|
className,
|
|
4552
4808
|
...props
|
|
4553
4809
|
}) => {
|
|
4554
|
-
return /* @__PURE__ */
|
|
4810
|
+
return /* @__PURE__ */ jsx27(
|
|
4555
4811
|
"span",
|
|
4556
4812
|
{
|
|
4557
4813
|
className: cn(
|
|
@@ -4564,27 +4820,6 @@ var CommandShortcut = ({
|
|
|
4564
4820
|
};
|
|
4565
4821
|
CommandShortcut.displayName = "CommandShortcut";
|
|
4566
4822
|
|
|
4567
|
-
// src/components/molecules/overlay/popover.tsx
|
|
4568
|
-
import * as React15 from "react";
|
|
4569
|
-
import * as PopoverPrimitive2 from "@radix-ui/react-popover";
|
|
4570
|
-
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
4571
|
-
var Popover2 = PopoverPrimitive2.Root;
|
|
4572
|
-
var PopoverTrigger2 = PopoverPrimitive2.Trigger;
|
|
4573
|
-
var PopoverContent2 = React15.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx27(PopoverPrimitive2.Portal, { children: /* @__PURE__ */ jsx27(
|
|
4574
|
-
PopoverPrimitive2.Content,
|
|
4575
|
-
{
|
|
4576
|
-
ref,
|
|
4577
|
-
align,
|
|
4578
|
-
sideOffset,
|
|
4579
|
-
className: cn(
|
|
4580
|
-
"cnc-z-50 cnc-w-72 cnc-rounded-md cnc-border cnc-bg-popover cnc-p-4 cnc-text-popover-foreground cnc-shadow-md cnc-outline-none data-[state=open]:cnc-animate-in data-[state=closed]:cnc-animate-out data-[state=closed]:cnc-fade-out-0 data-[state=open]:cnc-fade-in-0 data-[state=closed]:cnc-zoom-out-95 data-[state=open]:cnc-zoom-in-95 data-[side=bottom]:cnc-slide-in-from-top-2 data-[side=left]:cnc-slide-in-from-right-2 data-[side=right]:cnc-slide-in-from-left-2 data-[side=top]:cnc-slide-in-from-bottom-2 cnc-origin-[--radix-popover-content-transform-origin]",
|
|
4581
|
-
className
|
|
4582
|
-
),
|
|
4583
|
-
...props
|
|
4584
|
-
}
|
|
4585
|
-
) }));
|
|
4586
|
-
PopoverContent2.displayName = PopoverPrimitive2.Content.displayName;
|
|
4587
|
-
|
|
4588
4823
|
// src/components/molecules/forms/combobox.tsx
|
|
4589
4824
|
import { jsx as jsx28, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
4590
4825
|
function Combobox({
|
|
@@ -4601,9 +4836,9 @@ function Combobox({
|
|
|
4601
4836
|
footerAction,
|
|
4602
4837
|
renderFooter
|
|
4603
4838
|
}) {
|
|
4604
|
-
const [open, setOpen] =
|
|
4605
|
-
return /* @__PURE__ */ jsxs20(
|
|
4606
|
-
/* @__PURE__ */ jsx28(
|
|
4839
|
+
const [open, setOpen] = React18.useState(false);
|
|
4840
|
+
return /* @__PURE__ */ jsxs20(Popover, { open, onOpenChange: setOpen, modal, children: [
|
|
4841
|
+
/* @__PURE__ */ jsx28(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs20(
|
|
4607
4842
|
Button,
|
|
4608
4843
|
{
|
|
4609
4844
|
variant: "outline",
|
|
@@ -4621,7 +4856,7 @@ function Combobox({
|
|
|
4621
4856
|
}
|
|
4622
4857
|
) }),
|
|
4623
4858
|
/* @__PURE__ */ jsxs20(
|
|
4624
|
-
|
|
4859
|
+
PopoverContent,
|
|
4625
4860
|
{
|
|
4626
4861
|
align: "start",
|
|
4627
4862
|
className: cn(
|
|
@@ -4683,7 +4918,7 @@ function Combobox({
|
|
|
4683
4918
|
}
|
|
4684
4919
|
|
|
4685
4920
|
// src/components/molecules/forms/multi-select.tsx
|
|
4686
|
-
import * as
|
|
4921
|
+
import * as React19 from "react";
|
|
4687
4922
|
import { jsx as jsx29, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
4688
4923
|
function MultiSelect({
|
|
4689
4924
|
options,
|
|
@@ -4700,7 +4935,7 @@ function MultiSelect({
|
|
|
4700
4935
|
footerAction,
|
|
4701
4936
|
renderFooter
|
|
4702
4937
|
}) {
|
|
4703
|
-
const [open, setOpen] =
|
|
4938
|
+
const [open, setOpen] = React19.useState(false);
|
|
4704
4939
|
const buttonText = (() => {
|
|
4705
4940
|
if (value.length === 0) return placeholder;
|
|
4706
4941
|
if (value.length === 1) {
|
|
@@ -4714,8 +4949,8 @@ function MultiSelect({
|
|
|
4714
4949
|
value.includes(optionValue) ? value.filter((item) => item !== optionValue) : [...value, optionValue]
|
|
4715
4950
|
);
|
|
4716
4951
|
};
|
|
4717
|
-
return /* @__PURE__ */ jsxs21(
|
|
4718
|
-
/* @__PURE__ */ jsx29(
|
|
4952
|
+
return /* @__PURE__ */ jsxs21(Popover, { open, onOpenChange: setOpen, modal, children: [
|
|
4953
|
+
/* @__PURE__ */ jsx29(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs21(
|
|
4719
4954
|
Button,
|
|
4720
4955
|
{
|
|
4721
4956
|
type: "button",
|
|
@@ -4735,7 +4970,7 @@ function MultiSelect({
|
|
|
4735
4970
|
}
|
|
4736
4971
|
) }),
|
|
4737
4972
|
/* @__PURE__ */ jsxs21(
|
|
4738
|
-
|
|
4973
|
+
PopoverContent,
|
|
4739
4974
|
{
|
|
4740
4975
|
align: "start",
|
|
4741
4976
|
className: cn(
|
|
@@ -4790,7 +5025,7 @@ function MultiSelect({
|
|
|
4790
5025
|
}
|
|
4791
5026
|
|
|
4792
5027
|
// src/components/molecules/overlay/confirm-dialog.tsx
|
|
4793
|
-
import * as
|
|
5028
|
+
import * as React20 from "react";
|
|
4794
5029
|
import { jsx as jsx30, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
4795
5030
|
function ConfirmDialog({
|
|
4796
5031
|
open,
|
|
@@ -4809,7 +5044,7 @@ function ConfirmDialog({
|
|
|
4809
5044
|
isLoading,
|
|
4810
5045
|
className
|
|
4811
5046
|
}) {
|
|
4812
|
-
const [localLoading, setLocalLoading] =
|
|
5047
|
+
const [localLoading, setLocalLoading] = React20.useState(false);
|
|
4813
5048
|
const isBusy = isLoading ?? localLoading;
|
|
4814
5049
|
const handleConfirm = async () => {
|
|
4815
5050
|
if (isLoading !== void 0) {
|
|
@@ -4899,7 +5134,7 @@ function Tooltip({
|
|
|
4899
5134
|
}
|
|
4900
5135
|
|
|
4901
5136
|
// src/components/organisms/filter/index.tsx
|
|
4902
|
-
import * as
|
|
5137
|
+
import * as React21 from "react";
|
|
4903
5138
|
import {
|
|
4904
5139
|
Controller,
|
|
4905
5140
|
useForm,
|
|
@@ -4933,7 +5168,7 @@ function buildValidationRules(field) {
|
|
|
4933
5168
|
}
|
|
4934
5169
|
};
|
|
4935
5170
|
}
|
|
4936
|
-
var FilterFieldItem =
|
|
5171
|
+
var FilterFieldItem = React21.memo(function FilterFieldItem2({
|
|
4937
5172
|
field,
|
|
4938
5173
|
register,
|
|
4939
5174
|
control,
|
|
@@ -5015,7 +5250,7 @@ var FilterFieldItem = React19.memo(function FilterFieldItem2({
|
|
|
5015
5250
|
});
|
|
5016
5251
|
function CleanButton({ control, onClean }) {
|
|
5017
5252
|
const values = useWatch({ control });
|
|
5018
|
-
const hasActiveFilters =
|
|
5253
|
+
const hasActiveFilters = React21.useMemo(() => {
|
|
5019
5254
|
const keys = Object.keys(values);
|
|
5020
5255
|
return keys.some((key) => {
|
|
5021
5256
|
const val = values[key];
|
|
@@ -5039,7 +5274,7 @@ function CleanButton({ control, onClean }) {
|
|
|
5039
5274
|
}
|
|
5040
5275
|
);
|
|
5041
5276
|
}
|
|
5042
|
-
var Filter =
|
|
5277
|
+
var Filter = React21.forwardRef(
|
|
5043
5278
|
function Filter2({
|
|
5044
5279
|
fields,
|
|
5045
5280
|
collapsibleFields,
|
|
@@ -5049,12 +5284,12 @@ var Filter = React19.forwardRef(
|
|
|
5049
5284
|
isLoading = false,
|
|
5050
5285
|
className
|
|
5051
5286
|
}, ref) {
|
|
5052
|
-
const [isCollapsibleOpen, setIsCollapsibleOpen] =
|
|
5053
|
-
const allFields =
|
|
5287
|
+
const [isCollapsibleOpen, setIsCollapsibleOpen] = React21.useState(false);
|
|
5288
|
+
const allFields = React21.useMemo(
|
|
5054
5289
|
() => [...fields, ...collapsibleFields || []],
|
|
5055
5290
|
[fields, collapsibleFields]
|
|
5056
5291
|
);
|
|
5057
|
-
const defaultValues =
|
|
5292
|
+
const defaultValues = React21.useMemo(
|
|
5058
5293
|
() => buildDefaultValues(allFields),
|
|
5059
5294
|
[allFields]
|
|
5060
5295
|
);
|
|
@@ -5065,7 +5300,7 @@ var Filter = React19.forwardRef(
|
|
|
5065
5300
|
reset,
|
|
5066
5301
|
formState: { errors }
|
|
5067
5302
|
} = useForm({ defaultValues });
|
|
5068
|
-
|
|
5303
|
+
React21.useEffect(() => {
|
|
5069
5304
|
if (collapsibleFields?.some((f) => errors[f.name])) {
|
|
5070
5305
|
setIsCollapsibleOpen(true);
|
|
5071
5306
|
}
|
|
@@ -5073,7 +5308,7 @@ var Filter = React19.forwardRef(
|
|
|
5073
5308
|
const onSubmit = (data) => {
|
|
5074
5309
|
onSearch(data);
|
|
5075
5310
|
};
|
|
5076
|
-
const handleClean =
|
|
5311
|
+
const handleClean = React21.useCallback(() => {
|
|
5077
5312
|
const emptyValues = {};
|
|
5078
5313
|
for (const field of allFields) {
|
|
5079
5314
|
emptyValues[field.name] = field.type === "switch" ? false : "";
|
|
@@ -5154,7 +5389,7 @@ var Filter = React19.forwardRef(
|
|
|
5154
5389
|
);
|
|
5155
5390
|
|
|
5156
5391
|
// src/components/organisms/card-list/index.tsx
|
|
5157
|
-
import * as
|
|
5392
|
+
import * as React22 from "react";
|
|
5158
5393
|
import { jsx as jsx33, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
5159
5394
|
function CardList({
|
|
5160
5395
|
items,
|
|
@@ -5214,20 +5449,20 @@ function CardList({
|
|
|
5214
5449
|
{
|
|
5215
5450
|
className: cn("cnc-grid cnc-w-full", gap, className),
|
|
5216
5451
|
style: gridStyle,
|
|
5217
|
-
children: items.map((item, index) => /* @__PURE__ */ jsx33(
|
|
5452
|
+
children: items.map((item, index) => /* @__PURE__ */ jsx33(React22.Fragment, { children: renderCard(item, index) }, getKey ? getKey(item, index) : index))
|
|
5218
5453
|
}
|
|
5219
5454
|
);
|
|
5220
5455
|
}
|
|
5221
5456
|
|
|
5222
5457
|
// src/components/organisms/drawer/drawer.tsx
|
|
5223
5458
|
import * as DialogPrimitive2 from "@radix-ui/react-dialog";
|
|
5224
|
-
import * as
|
|
5459
|
+
import * as React23 from "react";
|
|
5225
5460
|
import { jsx as jsx34, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
5226
5461
|
var Drawer = DialogPrimitive2.Root;
|
|
5227
5462
|
var DrawerTrigger = DialogPrimitive2.Trigger;
|
|
5228
5463
|
var DrawerPortal = DialogPrimitive2.Portal;
|
|
5229
5464
|
var DrawerClose = DialogPrimitive2.Close;
|
|
5230
|
-
var DrawerOverlay =
|
|
5465
|
+
var DrawerOverlay = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx34(
|
|
5231
5466
|
DialogPrimitive2.Overlay,
|
|
5232
5467
|
{
|
|
5233
5468
|
ref,
|
|
@@ -5246,7 +5481,7 @@ var drawerSizeToWidth = {
|
|
|
5246
5481
|
xl: "48rem",
|
|
5247
5482
|
full: "100vw"
|
|
5248
5483
|
};
|
|
5249
|
-
var DrawerContent =
|
|
5484
|
+
var DrawerContent = React23.forwardRef(
|
|
5250
5485
|
({
|
|
5251
5486
|
className,
|
|
5252
5487
|
children,
|
|
@@ -5310,7 +5545,7 @@ var DrawerFooter = ({
|
|
|
5310
5545
|
...props
|
|
5311
5546
|
}) => /* @__PURE__ */ jsx34("div", { className: cn("cnc-border-t cnc-p-6", className), ...props });
|
|
5312
5547
|
DrawerFooter.displayName = "DrawerFooter";
|
|
5313
|
-
var DrawerTitle =
|
|
5548
|
+
var DrawerTitle = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx34(
|
|
5314
5549
|
DialogPrimitive2.Title,
|
|
5315
5550
|
{
|
|
5316
5551
|
ref,
|
|
@@ -5322,7 +5557,7 @@ var DrawerTitle = React21.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
5322
5557
|
}
|
|
5323
5558
|
));
|
|
5324
5559
|
DrawerTitle.displayName = DialogPrimitive2.Title.displayName;
|
|
5325
|
-
var DrawerDescription =
|
|
5560
|
+
var DrawerDescription = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx34(
|
|
5326
5561
|
DialogPrimitive2.Description,
|
|
5327
5562
|
{
|
|
5328
5563
|
ref,
|
|
@@ -5333,24 +5568,24 @@ var DrawerDescription = React21.forwardRef(({ className, ...props }, ref) => /*
|
|
|
5333
5568
|
DrawerDescription.displayName = DialogPrimitive2.Description.displayName;
|
|
5334
5569
|
|
|
5335
5570
|
// src/components/organisms/drawer/drawer-context.tsx
|
|
5336
|
-
import * as
|
|
5571
|
+
import * as React24 from "react";
|
|
5337
5572
|
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
5338
|
-
var DrawerContext =
|
|
5573
|
+
var DrawerContext = React24.createContext(
|
|
5339
5574
|
void 0
|
|
5340
5575
|
);
|
|
5341
5576
|
function DrawerProvider({ children }) {
|
|
5342
|
-
const [activeDrawer, setActiveDrawer] =
|
|
5343
|
-
const openDrawer =
|
|
5577
|
+
const [activeDrawer, setActiveDrawer] = React24.useState(null);
|
|
5578
|
+
const openDrawer = React24.useCallback((drawerId) => {
|
|
5344
5579
|
setActiveDrawer(drawerId);
|
|
5345
5580
|
}, []);
|
|
5346
|
-
const closeDrawer =
|
|
5581
|
+
const closeDrawer = React24.useCallback(() => {
|
|
5347
5582
|
setActiveDrawer(null);
|
|
5348
5583
|
}, []);
|
|
5349
|
-
const isOpen =
|
|
5584
|
+
const isOpen = React24.useCallback(
|
|
5350
5585
|
(drawerId) => activeDrawer === drawerId,
|
|
5351
5586
|
[activeDrawer]
|
|
5352
5587
|
);
|
|
5353
|
-
const value =
|
|
5588
|
+
const value = React24.useMemo(
|
|
5354
5589
|
() => ({ activeDrawer, openDrawer, closeDrawer, isOpen }),
|
|
5355
5590
|
[activeDrawer, openDrawer, closeDrawer, isOpen]
|
|
5356
5591
|
);
|
|
@@ -5358,9 +5593,9 @@ function DrawerProvider({ children }) {
|
|
|
5358
5593
|
}
|
|
5359
5594
|
|
|
5360
5595
|
// src/components/organisms/drawer/use-drawer.ts
|
|
5361
|
-
import * as
|
|
5596
|
+
import * as React25 from "react";
|
|
5362
5597
|
function useDrawer() {
|
|
5363
|
-
const context =
|
|
5598
|
+
const context = React25.useContext(DrawerContext);
|
|
5364
5599
|
if (!context) {
|
|
5365
5600
|
throw new Error("useDrawer deve ser usado dentro de um DrawerProvider");
|
|
5366
5601
|
}
|
|
@@ -5368,7 +5603,7 @@ function useDrawer() {
|
|
|
5368
5603
|
}
|
|
5369
5604
|
|
|
5370
5605
|
// src/components/organisms/upload/file-upload.tsx
|
|
5371
|
-
import * as
|
|
5606
|
+
import * as React26 from "react";
|
|
5372
5607
|
|
|
5373
5608
|
// src/components/organisms/upload/utils.ts
|
|
5374
5609
|
function formatSizeLimit(bytes) {
|
|
@@ -5439,7 +5674,7 @@ function validateFiles({
|
|
|
5439
5674
|
}
|
|
5440
5675
|
|
|
5441
5676
|
// src/components/organisms/upload/file-list.tsx
|
|
5442
|
-
import { Fragment as
|
|
5677
|
+
import { Fragment as Fragment7, jsx as jsx36, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
5443
5678
|
function FileList({
|
|
5444
5679
|
items,
|
|
5445
5680
|
onRemove,
|
|
@@ -5452,7 +5687,7 @@ function FileList({
|
|
|
5452
5687
|
...props
|
|
5453
5688
|
}) {
|
|
5454
5689
|
if (items.length === 0) {
|
|
5455
|
-
return emptyState ? /* @__PURE__ */ jsx36(
|
|
5690
|
+
return emptyState ? /* @__PURE__ */ jsx36(Fragment7, { children: emptyState }) : null;
|
|
5456
5691
|
}
|
|
5457
5692
|
return /* @__PURE__ */ jsx36(
|
|
5458
5693
|
"ul",
|
|
@@ -5543,7 +5778,7 @@ function fileToListItem(file, index) {
|
|
|
5543
5778
|
status: "pending"
|
|
5544
5779
|
};
|
|
5545
5780
|
}
|
|
5546
|
-
var FileUpload =
|
|
5781
|
+
var FileUpload = React26.forwardRef(
|
|
5547
5782
|
({
|
|
5548
5783
|
value = [],
|
|
5549
5784
|
onChange,
|
|
@@ -5564,9 +5799,9 @@ var FileUpload = React24.forwardRef(
|
|
|
5564
5799
|
listClassName,
|
|
5565
5800
|
...props
|
|
5566
5801
|
}, ref) => {
|
|
5567
|
-
const fileInputRef =
|
|
5568
|
-
const hintId =
|
|
5569
|
-
|
|
5802
|
+
const fileInputRef = React26.useRef(null);
|
|
5803
|
+
const hintId = React26.useId();
|
|
5804
|
+
React26.useImperativeHandle(ref, () => fileInputRef.current, []);
|
|
5570
5805
|
const isBusy = disabled || isLoading;
|
|
5571
5806
|
const items = value.map(fileToListItem);
|
|
5572
5807
|
const clearInput = () => {
|
|
@@ -5725,8 +5960,8 @@ function formatDayAriaLabel(date) {
|
|
|
5725
5960
|
}
|
|
5726
5961
|
|
|
5727
5962
|
// src/components/organisms/calendar/mini-month-calendar.tsx
|
|
5728
|
-
import * as
|
|
5729
|
-
import { Fragment as
|
|
5963
|
+
import * as React27 from "react";
|
|
5964
|
+
import { Fragment as Fragment8, jsx as jsx38, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
5730
5965
|
function MiniMonthCalendar({
|
|
5731
5966
|
month: monthProp,
|
|
5732
5967
|
onMonthChange,
|
|
@@ -5740,8 +5975,8 @@ function MiniMonthCalendar({
|
|
|
5740
5975
|
nextLabel = "Pr\xF3ximo m\xEAs",
|
|
5741
5976
|
className
|
|
5742
5977
|
}) {
|
|
5743
|
-
const month =
|
|
5744
|
-
const cells =
|
|
5978
|
+
const month = React27.useMemo(() => toLocalNoon(monthProp ?? /* @__PURE__ */ new Date()), [monthProp]);
|
|
5979
|
+
const cells = React27.useMemo(
|
|
5745
5980
|
() => buildMonthDays(month, selectedDate, hasItems),
|
|
5746
5981
|
[month, selectedDate, hasItems]
|
|
5747
5982
|
);
|
|
@@ -5799,7 +6034,7 @@ function MiniMonthCalendar({
|
|
|
5799
6034
|
cell.isSelected ? "cnc-bg-primary cnc-text-white" : "cnc-text-brand-gray-600 hover:cnc-bg-brand-blue-50 hover:cnc-text-primary",
|
|
5800
6035
|
cell.isToday && !cell.isSelected && "cnc-underline cnc-decoration-primary cnc-decoration-2 cnc-underline-offset-4"
|
|
5801
6036
|
),
|
|
5802
|
-
children: renderDay ? renderDay(cell) : /* @__PURE__ */ jsxs29(
|
|
6037
|
+
children: renderDay ? renderDay(cell) : /* @__PURE__ */ jsxs29(Fragment8, { children: [
|
|
5803
6038
|
/* @__PURE__ */ jsx38("span", { className: "cnc-text-xs cnc-font-semibold", children: cell.number }),
|
|
5804
6039
|
cell.hasItems && /* @__PURE__ */ jsx38("span", { className: "cnc-absolute cnc-bottom-1 cnc-size-1 cnc-rounded-full cnc-bg-primary group-aria-pressed:cnc-bg-white" })
|
|
5805
6040
|
] })
|
|
@@ -5812,7 +6047,7 @@ function MiniMonthCalendar({
|
|
|
5812
6047
|
}
|
|
5813
6048
|
|
|
5814
6049
|
// src/components/organisms/calendar/month-year-picker.tsx
|
|
5815
|
-
import * as
|
|
6050
|
+
import * as React28 from "react";
|
|
5816
6051
|
import { jsx as jsx39, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
5817
6052
|
function MonthYearPicker({
|
|
5818
6053
|
value,
|
|
@@ -5825,9 +6060,9 @@ function MonthYearPicker({
|
|
|
5825
6060
|
triggerClassName,
|
|
5826
6061
|
contentClassName
|
|
5827
6062
|
}) {
|
|
5828
|
-
const [open, setOpen] =
|
|
5829
|
-
const [viewYear, setViewYear] =
|
|
5830
|
-
|
|
6063
|
+
const [open, setOpen] = React28.useState(false);
|
|
6064
|
+
const [viewYear, setViewYear] = React28.useState(() => value.getFullYear());
|
|
6065
|
+
React28.useEffect(() => {
|
|
5831
6066
|
if (open) setViewYear(value.getFullYear());
|
|
5832
6067
|
}, [open, value]);
|
|
5833
6068
|
const isSelectedMonth = (monthIndex) => value.getFullYear() === viewYear && value.getMonth() === monthIndex;
|
|
@@ -5837,8 +6072,8 @@ function MonthYearPicker({
|
|
|
5837
6072
|
onChange(new Date(viewYear, monthIndex, day));
|
|
5838
6073
|
setOpen(false);
|
|
5839
6074
|
};
|
|
5840
|
-
return /* @__PURE__ */ jsxs30(
|
|
5841
|
-
/* @__PURE__ */ jsx39(
|
|
6075
|
+
return /* @__PURE__ */ jsxs30(Popover, { open, onOpenChange: setOpen, children: [
|
|
6076
|
+
/* @__PURE__ */ jsx39(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs30(
|
|
5842
6077
|
Button,
|
|
5843
6078
|
{
|
|
5844
6079
|
type: "button",
|
|
@@ -5864,7 +6099,7 @@ function MonthYearPicker({
|
|
|
5864
6099
|
}
|
|
5865
6100
|
) }),
|
|
5866
6101
|
/* @__PURE__ */ jsxs30(
|
|
5867
|
-
|
|
6102
|
+
PopoverContent,
|
|
5868
6103
|
{
|
|
5869
6104
|
align: "start",
|
|
5870
6105
|
className: cn("cnc-w-72 cnc-p-4", className, contentClassName),
|
|
@@ -5913,7 +6148,7 @@ function MonthYearPicker({
|
|
|
5913
6148
|
}
|
|
5914
6149
|
|
|
5915
6150
|
// src/components/organisms/period-range-list/index.tsx
|
|
5916
|
-
import * as
|
|
6151
|
+
import * as React29 from "react";
|
|
5917
6152
|
import { jsx as jsx40, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
5918
6153
|
var DEFAULT_LABELS = {
|
|
5919
6154
|
start: "In\xEDcio",
|
|
@@ -5974,9 +6209,9 @@ function PeriodRangeList({
|
|
|
5974
6209
|
const labels = { ...DEFAULT_LABELS, ...labelsProp };
|
|
5975
6210
|
const endAfterStart = validate?.endAfterStart ?? true;
|
|
5976
6211
|
const noDuplicates = validate?.noDuplicates ?? true;
|
|
5977
|
-
const [startDraft, setStartDraft] =
|
|
5978
|
-
const [endDraft, setEndDraft] =
|
|
5979
|
-
const periods =
|
|
6212
|
+
const [startDraft, setStartDraft] = React29.useState("");
|
|
6213
|
+
const [endDraft, setEndDraft] = React29.useState("");
|
|
6214
|
+
const periods = React29.useMemo(() => normalizePeriods(value), [value]);
|
|
5980
6215
|
const isInvalidRange = Boolean(startDraft && endDraft) && endAfterStart && startDraft >= endDraft;
|
|
5981
6216
|
const isDuplicate = Boolean(startDraft && endDraft) && noDuplicates && periods.some(
|
|
5982
6217
|
(period) => period.start === startDraft && period.end === endDraft
|
|
@@ -6093,7 +6328,7 @@ function PeriodRangeList({
|
|
|
6093
6328
|
var DateTimeRangeList = PeriodRangeList;
|
|
6094
6329
|
|
|
6095
6330
|
// src/components/organisms/header-notifications/index.tsx
|
|
6096
|
-
import * as
|
|
6331
|
+
import * as React31 from "react";
|
|
6097
6332
|
|
|
6098
6333
|
// src/components/organisms/header-notifications/cliente.ts
|
|
6099
6334
|
var URL_PADRAO_NOTIFICACOES = "https://dev-apinotificacoes-b5feekb4bdfyb7c2.eastus2-01.azurewebsites.net/v1";
|
|
@@ -6347,7 +6582,7 @@ function ModalLembretes({
|
|
|
6347
6582
|
}
|
|
6348
6583
|
|
|
6349
6584
|
// src/components/organisms/header-notifications/usar-notificacoes.ts
|
|
6350
|
-
import * as
|
|
6585
|
+
import * as React30 from "react";
|
|
6351
6586
|
function foiAbortado(erro) {
|
|
6352
6587
|
return erro?.name === "AbortError";
|
|
6353
6588
|
}
|
|
@@ -6360,20 +6595,20 @@ function usarNotificacoes({
|
|
|
6360
6595
|
habilitado = true,
|
|
6361
6596
|
onErro
|
|
6362
6597
|
}) {
|
|
6363
|
-
const [notificacoes, setNotificacoes] =
|
|
6364
|
-
const [carregando, setCarregando] =
|
|
6365
|
-
const notificacoesRef =
|
|
6366
|
-
const controladorRef =
|
|
6367
|
-
const jaCarregouRef =
|
|
6368
|
-
const onErroRef =
|
|
6369
|
-
|
|
6598
|
+
const [notificacoes, setNotificacoes] = React30.useState([]);
|
|
6599
|
+
const [carregando, setCarregando] = React30.useState(habilitado);
|
|
6600
|
+
const notificacoesRef = React30.useRef(notificacoes);
|
|
6601
|
+
const controladorRef = React30.useRef(null);
|
|
6602
|
+
const jaCarregouRef = React30.useRef(false);
|
|
6603
|
+
const onErroRef = React30.useRef(onErro);
|
|
6604
|
+
React30.useEffect(() => {
|
|
6370
6605
|
notificacoesRef.current = notificacoes;
|
|
6371
6606
|
}, [notificacoes]);
|
|
6372
|
-
|
|
6607
|
+
React30.useEffect(() => {
|
|
6373
6608
|
onErroRef.current = onErro;
|
|
6374
6609
|
}, [onErro]);
|
|
6375
6610
|
const chaveFiltros = JSON.stringify(filtros ?? {});
|
|
6376
|
-
const atualizar =
|
|
6611
|
+
const atualizar = React30.useCallback(() => {
|
|
6377
6612
|
if (!habilitado) return;
|
|
6378
6613
|
controladorRef.current?.abort();
|
|
6379
6614
|
const controlador = new AbortController();
|
|
@@ -6400,7 +6635,7 @@ function usarNotificacoes({
|
|
|
6400
6635
|
}
|
|
6401
6636
|
})();
|
|
6402
6637
|
}, [baseUrl, email, sistema, chaveFiltros, habilitado]);
|
|
6403
|
-
|
|
6638
|
+
React30.useEffect(() => {
|
|
6404
6639
|
if (!habilitado) {
|
|
6405
6640
|
setCarregando(false);
|
|
6406
6641
|
return;
|
|
@@ -6409,7 +6644,7 @@ function usarNotificacoes({
|
|
|
6409
6644
|
atualizar();
|
|
6410
6645
|
return () => controladorRef.current?.abort();
|
|
6411
6646
|
}, [atualizar, habilitado]);
|
|
6412
|
-
|
|
6647
|
+
React30.useEffect(() => {
|
|
6413
6648
|
if (!habilitado || !intervaloAtualizacao) return;
|
|
6414
6649
|
const temporizador = window.setInterval(() => {
|
|
6415
6650
|
if (typeof document !== "undefined" && document.hidden) return;
|
|
@@ -6417,7 +6652,7 @@ function usarNotificacoes({
|
|
|
6417
6652
|
}, intervaloAtualizacao);
|
|
6418
6653
|
return () => window.clearInterval(temporizador);
|
|
6419
6654
|
}, [atualizar, habilitado, intervaloAtualizacao]);
|
|
6420
|
-
const aplicarLeitura =
|
|
6655
|
+
const aplicarLeitura = React30.useCallback((ids) => {
|
|
6421
6656
|
const alvos = new Set(ids.map(String));
|
|
6422
6657
|
setNotificacoes(
|
|
6423
6658
|
(atuais) => atuais.map(
|
|
@@ -6425,7 +6660,7 @@ function usarNotificacoes({
|
|
|
6425
6660
|
)
|
|
6426
6661
|
);
|
|
6427
6662
|
}, []);
|
|
6428
|
-
const reverterLeitura =
|
|
6663
|
+
const reverterLeitura = React30.useCallback((anteriores) => {
|
|
6429
6664
|
const original = new Map(
|
|
6430
6665
|
anteriores.map((notificacao) => [String(notificacao.id), notificacao])
|
|
6431
6666
|
);
|
|
@@ -6440,7 +6675,7 @@ function usarNotificacoes({
|
|
|
6440
6675
|
})
|
|
6441
6676
|
);
|
|
6442
6677
|
}, []);
|
|
6443
|
-
const marcarUmaComoLida =
|
|
6678
|
+
const marcarUmaComoLida = React30.useCallback(
|
|
6444
6679
|
(id) => {
|
|
6445
6680
|
const alvo = notificacoesRef.current.find(
|
|
6446
6681
|
(notificacao) => String(notificacao.id) === String(id)
|
|
@@ -6454,7 +6689,7 @@ function usarNotificacoes({
|
|
|
6454
6689
|
},
|
|
6455
6690
|
[baseUrl, aplicarLeitura, reverterLeitura]
|
|
6456
6691
|
);
|
|
6457
|
-
const marcarComoLidas =
|
|
6692
|
+
const marcarComoLidas = React30.useCallback(
|
|
6458
6693
|
(ids) => {
|
|
6459
6694
|
const alvos = new Set(ids.map(String));
|
|
6460
6695
|
const naoLidas = notificacoesRef.current.filter(
|
|
@@ -6472,10 +6707,10 @@ function usarNotificacoes({
|
|
|
6472
6707
|
},
|
|
6473
6708
|
[baseUrl, aplicarLeitura, reverterLeitura]
|
|
6474
6709
|
);
|
|
6475
|
-
const marcarTodasComoLidas =
|
|
6710
|
+
const marcarTodasComoLidas = React30.useCallback(() => {
|
|
6476
6711
|
marcarComoLidas(notificacoesRef.current.map((notificacao) => notificacao.id));
|
|
6477
6712
|
}, [marcarComoLidas]);
|
|
6478
|
-
const marcarUmaComoNaoLida =
|
|
6713
|
+
const marcarUmaComoNaoLida = React30.useCallback(
|
|
6479
6714
|
(id) => {
|
|
6480
6715
|
const alvo = notificacoesRef.current.find(
|
|
6481
6716
|
(notificacao) => String(notificacao.id) === String(id)
|
|
@@ -6493,7 +6728,7 @@ function usarNotificacoes({
|
|
|
6493
6728
|
},
|
|
6494
6729
|
[baseUrl, reverterLeitura]
|
|
6495
6730
|
);
|
|
6496
|
-
const excluir =
|
|
6731
|
+
const excluir = React30.useCallback(
|
|
6497
6732
|
(id) => {
|
|
6498
6733
|
const alvo = notificacoesRef.current.find(
|
|
6499
6734
|
(notificacao) => String(notificacao.id) === String(id)
|
|
@@ -6522,7 +6757,7 @@ function usarNotificacoes({
|
|
|
6522
6757
|
}
|
|
6523
6758
|
|
|
6524
6759
|
// src/components/organisms/header-notifications/index.tsx
|
|
6525
|
-
import { Fragment as
|
|
6760
|
+
import { Fragment as Fragment9, jsx as jsx42, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
6526
6761
|
function HeaderNotifications(props) {
|
|
6527
6762
|
const {
|
|
6528
6763
|
items = [],
|
|
@@ -6554,11 +6789,11 @@ function HeaderNotifications(props) {
|
|
|
6554
6789
|
tituloLembretes,
|
|
6555
6790
|
rotuloDispensarLembretes
|
|
6556
6791
|
} = props;
|
|
6557
|
-
const [aberto, setAberto] =
|
|
6558
|
-
const [lembretesEmAlerta, setLembretesEmAlerta] =
|
|
6792
|
+
const [aberto, setAberto] = React31.useState(false);
|
|
6793
|
+
const [lembretesEmAlerta, setLembretesEmAlerta] = React31.useState(
|
|
6559
6794
|
[]
|
|
6560
6795
|
);
|
|
6561
|
-
const avaliouLembretesRef =
|
|
6796
|
+
const avaliouLembretesRef = React31.useRef(false);
|
|
6562
6797
|
const conectado = Boolean(email && sistema);
|
|
6563
6798
|
const remoto = usarNotificacoes({
|
|
6564
6799
|
email: email ?? "",
|
|
@@ -6569,17 +6804,17 @@ function HeaderNotifications(props) {
|
|
|
6569
6804
|
habilitado: conectado,
|
|
6570
6805
|
onErro
|
|
6571
6806
|
});
|
|
6572
|
-
const elegiveis =
|
|
6807
|
+
const elegiveis = React31.useMemo(
|
|
6573
6808
|
() => conectado ? selecionarVisiveis(remoto.notificacoes) : [],
|
|
6574
6809
|
[conectado, remoto.notificacoes]
|
|
6575
6810
|
);
|
|
6576
|
-
const itensRemotos =
|
|
6811
|
+
const itensRemotos = React31.useMemo(
|
|
6577
6812
|
() => elegiveis.slice(0, limite).map((notificacao) => mapearParaItem(notificacao, getHref)),
|
|
6578
6813
|
[elegiveis, limite, getHref]
|
|
6579
6814
|
);
|
|
6580
6815
|
const itens = conectado ? itensRemotos : items;
|
|
6581
6816
|
const carregandoLista = conectado ? remoto.carregando : isLoading;
|
|
6582
|
-
|
|
6817
|
+
React31.useEffect(() => {
|
|
6583
6818
|
if (!conectado || !alertarLembretes) return;
|
|
6584
6819
|
if (remoto.carregando || avaliouLembretesRef.current) return;
|
|
6585
6820
|
avaliouLembretesRef.current = true;
|
|
@@ -6734,7 +6969,7 @@ function HeaderNotifications(props) {
|
|
|
6734
6969
|
}) });
|
|
6735
6970
|
};
|
|
6736
6971
|
const temRodapePadrao = podeMarcarTodas && naoLidas > 0;
|
|
6737
|
-
return /* @__PURE__ */ jsxs33(
|
|
6972
|
+
return /* @__PURE__ */ jsxs33(Fragment9, { children: [
|
|
6738
6973
|
alertarLembretes && /* @__PURE__ */ jsx42(
|
|
6739
6974
|
ModalLembretes,
|
|
6740
6975
|
{
|
|
@@ -6745,8 +6980,8 @@ function HeaderNotifications(props) {
|
|
|
6745
6980
|
rotuloDispensar: rotuloDispensarLembretes
|
|
6746
6981
|
}
|
|
6747
6982
|
),
|
|
6748
|
-
/* @__PURE__ */ jsxs33(
|
|
6749
|
-
/* @__PURE__ */ jsx42(
|
|
6983
|
+
/* @__PURE__ */ jsxs33(Popover2, { open: aberto, onOpenChange: alterarAbertura, children: [
|
|
6984
|
+
/* @__PURE__ */ jsx42(PopoverTrigger2, { asChild: true, children: /* @__PURE__ */ jsxs33(
|
|
6750
6985
|
"button",
|
|
6751
6986
|
{
|
|
6752
6987
|
type: "button",
|
|
@@ -6776,7 +7011,7 @@ function HeaderNotifications(props) {
|
|
|
6776
7011
|
}
|
|
6777
7012
|
) }),
|
|
6778
7013
|
/* @__PURE__ */ jsxs33(
|
|
6779
|
-
|
|
7014
|
+
PopoverContent2,
|
|
6780
7015
|
{
|
|
6781
7016
|
align,
|
|
6782
7017
|
sideOffset: 20,
|
|
@@ -6812,10 +7047,10 @@ function HeaderNotifications(props) {
|
|
|
6812
7047
|
}
|
|
6813
7048
|
|
|
6814
7049
|
// src/alertas/alertas.tsx
|
|
6815
|
-
import * as
|
|
7050
|
+
import * as React34 from "react";
|
|
6816
7051
|
|
|
6817
7052
|
// src/alertas/formulario-alerta.tsx
|
|
6818
|
-
import * as
|
|
7053
|
+
import * as React32 from "react";
|
|
6819
7054
|
|
|
6820
7055
|
// src/alertas/date-utils.ts
|
|
6821
7056
|
function obterHojeDataHoraIsoLocal() {
|
|
@@ -6949,15 +7184,15 @@ function FormularioAlerta({
|
|
|
6949
7184
|
onSalvar,
|
|
6950
7185
|
onCancelar
|
|
6951
7186
|
}) {
|
|
6952
|
-
const [values, setValues] =
|
|
7187
|
+
const [values, setValues] = React32.useState(
|
|
6953
7188
|
() => alertaEmEdicao ? preencherFormDoAlerta(alertaEmEdicao) : FORM_VAZIO
|
|
6954
7189
|
);
|
|
6955
|
-
const [erro, setErro] =
|
|
6956
|
-
const [hojeDataHoraIso, setHojeDataHoraIso] =
|
|
6957
|
-
|
|
7190
|
+
const [erro, setErro] = React32.useState("");
|
|
7191
|
+
const [hojeDataHoraIso, setHojeDataHoraIso] = React32.useState("");
|
|
7192
|
+
React32.useEffect(() => {
|
|
6958
7193
|
setHojeDataHoraIso(obterHojeDataHoraIsoLocal());
|
|
6959
7194
|
}, []);
|
|
6960
|
-
|
|
7195
|
+
React32.useEffect(() => {
|
|
6961
7196
|
setValues(alertaEmEdicao ? preencherFormDoAlerta(alertaEmEdicao) : FORM_VAZIO);
|
|
6962
7197
|
setErro("");
|
|
6963
7198
|
}, [alertaEmEdicao]);
|
|
@@ -7314,7 +7549,7 @@ function AlertaItem({
|
|
|
7314
7549
|
}
|
|
7315
7550
|
|
|
7316
7551
|
// src/alertas/usar-alertas.ts
|
|
7317
|
-
import * as
|
|
7552
|
+
import * as React33 from "react";
|
|
7318
7553
|
|
|
7319
7554
|
// src/alertas/cliente.ts
|
|
7320
7555
|
var ErroAlertas = class _ErroAlertas extends Error {
|
|
@@ -7366,25 +7601,25 @@ function usarAlertas({
|
|
|
7366
7601
|
habilitado = true,
|
|
7367
7602
|
onErro
|
|
7368
7603
|
}) {
|
|
7369
|
-
const [alertas, setAlertas] =
|
|
7370
|
-
const [carregando, setCarregando] =
|
|
7371
|
-
const controladorRef =
|
|
7372
|
-
const jaCarregouRef =
|
|
7373
|
-
const onErroRef =
|
|
7374
|
-
const fetchFnRef =
|
|
7375
|
-
const filtrosRef =
|
|
7376
|
-
|
|
7604
|
+
const [alertas, setAlertas] = React33.useState([]);
|
|
7605
|
+
const [carregando, setCarregando] = React33.useState(habilitado);
|
|
7606
|
+
const controladorRef = React33.useRef(null);
|
|
7607
|
+
const jaCarregouRef = React33.useRef(false);
|
|
7608
|
+
const onErroRef = React33.useRef(onErro);
|
|
7609
|
+
const fetchFnRef = React33.useRef(fetchFn);
|
|
7610
|
+
const filtrosRef = React33.useRef(filtros);
|
|
7611
|
+
React33.useEffect(() => {
|
|
7377
7612
|
onErroRef.current = onErro;
|
|
7378
7613
|
}, [onErro]);
|
|
7379
|
-
|
|
7614
|
+
React33.useEffect(() => {
|
|
7380
7615
|
fetchFnRef.current = fetchFn;
|
|
7381
7616
|
}, [fetchFn]);
|
|
7382
|
-
|
|
7617
|
+
React33.useEffect(() => {
|
|
7383
7618
|
filtrosRef.current = filtros;
|
|
7384
7619
|
}, [filtros]);
|
|
7385
7620
|
const pronto = baseUrl !== void 0 && sistema !== void 0 && email !== void 0;
|
|
7386
7621
|
const filtrosChave = filtros ? JSON.stringify(filtros) : "";
|
|
7387
|
-
const atualizar =
|
|
7622
|
+
const atualizar = React33.useCallback(() => {
|
|
7388
7623
|
if (!habilitado || !pronto) return;
|
|
7389
7624
|
controladorRef.current?.abort();
|
|
7390
7625
|
const controlador = new AbortController();
|
|
@@ -7413,7 +7648,7 @@ function usarAlertas({
|
|
|
7413
7648
|
}
|
|
7414
7649
|
})();
|
|
7415
7650
|
}, [baseUrl, sistema, email, eventoId, filtrosChave, habilitado, pronto]);
|
|
7416
|
-
|
|
7651
|
+
React33.useEffect(() => {
|
|
7417
7652
|
if (!habilitado || !pronto) {
|
|
7418
7653
|
setCarregando(false);
|
|
7419
7654
|
return;
|
|
@@ -7449,10 +7684,10 @@ function Alertas({
|
|
|
7449
7684
|
filtros,
|
|
7450
7685
|
onErro
|
|
7451
7686
|
}) {
|
|
7452
|
-
const [formAberto, setFormAberto] =
|
|
7453
|
-
const [alertaEmEdicao, setAlertaEmEdicao] =
|
|
7454
|
-
const [salvandoLocal, setSalvandoLocal] =
|
|
7455
|
-
const [removendoLocal, setRemovendoLocal] =
|
|
7687
|
+
const [formAberto, setFormAberto] = React34.useState(false);
|
|
7688
|
+
const [alertaEmEdicao, setAlertaEmEdicao] = React34.useState(null);
|
|
7689
|
+
const [salvandoLocal, setSalvandoLocal] = React34.useState(false);
|
|
7690
|
+
const [removendoLocal, setRemovendoLocal] = React34.useState(false);
|
|
7456
7691
|
const conectado = Boolean(sistema && email);
|
|
7457
7692
|
const remoto = usarAlertas({
|
|
7458
7693
|
baseUrl,
|
|
@@ -7666,10 +7901,11 @@ export {
|
|
|
7666
7901
|
PageHeaderTitle,
|
|
7667
7902
|
PageHeaderTitleContent,
|
|
7668
7903
|
PeriodRangeList,
|
|
7669
|
-
Popover,
|
|
7670
|
-
PopoverContent,
|
|
7671
|
-
PopoverTrigger,
|
|
7904
|
+
Popover2 as Popover,
|
|
7905
|
+
PopoverContent2 as PopoverContent,
|
|
7906
|
+
PopoverTrigger2 as PopoverTrigger,
|
|
7672
7907
|
ResultMetadata,
|
|
7908
|
+
SIDEBAR_MOBILE_BREAKPOINT,
|
|
7673
7909
|
Select,
|
|
7674
7910
|
SelectContent,
|
|
7675
7911
|
SelectGroup,
|
|
@@ -7710,6 +7946,8 @@ export {
|
|
|
7710
7946
|
toLocalNoon,
|
|
7711
7947
|
usarAlertas,
|
|
7712
7948
|
useDrawer,
|
|
7949
|
+
useSidebar,
|
|
7950
|
+
useSidebarBreakpoint,
|
|
7713
7951
|
validateFiles
|
|
7714
7952
|
};
|
|
7715
7953
|
/*! Bundled license information:
|