magick-ui 0.2.2 → 0.2.3
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 +626 -406
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +626 -401
- package/dist/index.js.map +1 -1
- package/dist/schema.cjs +292 -158
- package/dist/schema.cjs.map +1 -1
- package/dist/schema.d.cts +252 -25
- package/dist/schema.d.ts +252 -25
- package/dist/schema.js +291 -158
- package/dist/schema.js.map +1 -1
- package/dist/ui/index.cjs +337 -248
- package/dist/ui/index.cjs.map +1 -1
- package/dist/ui/index.d.cts +26 -1
- package/dist/ui/index.d.ts +26 -1
- package/dist/ui/index.js +337 -243
- package/dist/ui/index.js.map +1 -1
- package/package.json +2 -1
- package/schema/component-schema.json +106 -0
package/dist/ui/index.js
CHANGED
|
@@ -3604,11 +3604,104 @@ function LinkButton({
|
|
|
3604
3604
|
);
|
|
3605
3605
|
}
|
|
3606
3606
|
|
|
3607
|
+
// src/ui/Map/index.tsx
|
|
3608
|
+
import {
|
|
3609
|
+
APIProvider,
|
|
3610
|
+
Map as GoogleMap,
|
|
3611
|
+
AdvancedMarker,
|
|
3612
|
+
InfoWindow,
|
|
3613
|
+
Pin
|
|
3614
|
+
} from "@vis.gl/react-google-maps";
|
|
3615
|
+
import { useState as useState6, useCallback as useCallback3 } from "react";
|
|
3616
|
+
import { jsx as jsx34, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
3617
|
+
function MarkerWithInfo({
|
|
3618
|
+
marker,
|
|
3619
|
+
index,
|
|
3620
|
+
onMarkerClick
|
|
3621
|
+
}) {
|
|
3622
|
+
const [open, setOpen] = useState6(false);
|
|
3623
|
+
const handleClick = useCallback3(() => {
|
|
3624
|
+
setOpen((prev) => !prev);
|
|
3625
|
+
onMarkerClick?.(marker, index);
|
|
3626
|
+
}, [marker, index, onMarkerClick]);
|
|
3627
|
+
return /* @__PURE__ */ jsxs25(
|
|
3628
|
+
AdvancedMarker,
|
|
3629
|
+
{
|
|
3630
|
+
position: { lat: marker.lat, lng: marker.lng },
|
|
3631
|
+
title: marker.title,
|
|
3632
|
+
onClick: handleClick,
|
|
3633
|
+
children: [
|
|
3634
|
+
marker.color && /* @__PURE__ */ jsx34(
|
|
3635
|
+
Pin,
|
|
3636
|
+
{
|
|
3637
|
+
background: marker.color,
|
|
3638
|
+
borderColor: marker.color,
|
|
3639
|
+
glyphColor: "#fff"
|
|
3640
|
+
}
|
|
3641
|
+
),
|
|
3642
|
+
open && (marker.title || marker.description) && /* @__PURE__ */ jsx34(
|
|
3643
|
+
InfoWindow,
|
|
3644
|
+
{
|
|
3645
|
+
position: { lat: marker.lat, lng: marker.lng },
|
|
3646
|
+
onCloseClick: () => setOpen(false),
|
|
3647
|
+
children: /* @__PURE__ */ jsxs25("div", { className: "max-w-xs", children: [
|
|
3648
|
+
marker.title && /* @__PURE__ */ jsx34("h3", { className: "text-body-sm font-semibold", children: marker.title }),
|
|
3649
|
+
marker.description && /* @__PURE__ */ jsx34("p", { className: "text-body-sm text-element-inverse-gray mt-1", children: marker.description })
|
|
3650
|
+
] })
|
|
3651
|
+
}
|
|
3652
|
+
)
|
|
3653
|
+
]
|
|
3654
|
+
}
|
|
3655
|
+
);
|
|
3656
|
+
}
|
|
3657
|
+
var DEFAULT_CENTER = { lat: 16.8661, lng: 96.1951 };
|
|
3658
|
+
function GoogleMapView({
|
|
3659
|
+
apiKey,
|
|
3660
|
+
center = DEFAULT_CENTER,
|
|
3661
|
+
zoom = 12,
|
|
3662
|
+
markers = [],
|
|
3663
|
+
mapId,
|
|
3664
|
+
height = "400px",
|
|
3665
|
+
width = "100%",
|
|
3666
|
+
className,
|
|
3667
|
+
gestureHandling = "cooperative",
|
|
3668
|
+
disableDefaultUI = false,
|
|
3669
|
+
onMarkerClick
|
|
3670
|
+
}) {
|
|
3671
|
+
return /* @__PURE__ */ jsx34(APIProvider, { apiKey, children: /* @__PURE__ */ jsx34(
|
|
3672
|
+
"div",
|
|
3673
|
+
{
|
|
3674
|
+
className: cn("overflow-hidden rounded-unit-corner-radius-xl", className),
|
|
3675
|
+
style: { height, width },
|
|
3676
|
+
children: /* @__PURE__ */ jsx34(
|
|
3677
|
+
GoogleMap,
|
|
3678
|
+
{
|
|
3679
|
+
defaultCenter: center,
|
|
3680
|
+
defaultZoom: zoom,
|
|
3681
|
+
mapId,
|
|
3682
|
+
gestureHandling,
|
|
3683
|
+
disableDefaultUI,
|
|
3684
|
+
style: { width: "100%", height: "100%" },
|
|
3685
|
+
children: markers.map((marker, i) => /* @__PURE__ */ jsx34(
|
|
3686
|
+
MarkerWithInfo,
|
|
3687
|
+
{
|
|
3688
|
+
marker,
|
|
3689
|
+
index: i,
|
|
3690
|
+
onMarkerClick
|
|
3691
|
+
},
|
|
3692
|
+
`${marker.lat}-${marker.lng}-${i}`
|
|
3693
|
+
))
|
|
3694
|
+
}
|
|
3695
|
+
)
|
|
3696
|
+
}
|
|
3697
|
+
) });
|
|
3698
|
+
}
|
|
3699
|
+
|
|
3607
3700
|
// src/ui/Media/index.tsx
|
|
3608
3701
|
import { cva as cva10 } from "class-variance-authority";
|
|
3609
3702
|
import { Pause, Play } from "lucide-react";
|
|
3610
3703
|
import * as React10 from "react";
|
|
3611
|
-
import { Fragment as Fragment5, jsx as
|
|
3704
|
+
import { Fragment as Fragment5, jsx as jsx35, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
3612
3705
|
var mediaVariants = cva10(
|
|
3613
3706
|
"relative overflow-hidden bg-gray-100 dark:bg-gray-800",
|
|
3614
3707
|
{
|
|
@@ -3706,7 +3799,7 @@ var Media = React10.forwardRef(
|
|
|
3706
3799
|
const handleImageError = () => {
|
|
3707
3800
|
setImageError(true);
|
|
3708
3801
|
};
|
|
3709
|
-
return /* @__PURE__ */
|
|
3802
|
+
return /* @__PURE__ */ jsx35(
|
|
3710
3803
|
"div",
|
|
3711
3804
|
{
|
|
3712
3805
|
ref,
|
|
@@ -3714,8 +3807,8 @@ var Media = React10.forwardRef(
|
|
|
3714
3807
|
onMouseEnter: () => setIsHovered(true),
|
|
3715
3808
|
onMouseLeave: () => setIsHovered(false),
|
|
3716
3809
|
...props,
|
|
3717
|
-
children: type === "image" ? /* @__PURE__ */
|
|
3718
|
-
/* @__PURE__ */
|
|
3810
|
+
children: type === "image" ? /* @__PURE__ */ jsxs26(Fragment5, { children: [
|
|
3811
|
+
/* @__PURE__ */ jsx35(
|
|
3719
3812
|
"img",
|
|
3720
3813
|
{
|
|
3721
3814
|
src,
|
|
@@ -3733,13 +3826,13 @@ var Media = React10.forwardRef(
|
|
|
3733
3826
|
style: { objectFit }
|
|
3734
3827
|
}
|
|
3735
3828
|
),
|
|
3736
|
-
!imageLoaded && !imageError && /* @__PURE__ */
|
|
3737
|
-
imageError && /* @__PURE__ */
|
|
3738
|
-
/* @__PURE__ */
|
|
3739
|
-
/* @__PURE__ */
|
|
3829
|
+
!imageLoaded && !imageError && /* @__PURE__ */ jsx35("div", { className: "absolute inset-0 flex items-center justify-center bg-gray-200 dark:bg-gray-700", children: /* @__PURE__ */ jsx35("div", { className: "h-8 w-8 animate-spin rounded-full border-2 border-gray-300 border-t-gray-600" }) }),
|
|
3830
|
+
imageError && /* @__PURE__ */ jsx35("div", { className: "absolute inset-0 flex items-center justify-center bg-gray-200 dark:bg-gray-700", children: /* @__PURE__ */ jsxs26("div", { className: "text-center text-gray-500", children: [
|
|
3831
|
+
/* @__PURE__ */ jsx35("div", { className: "text-2xl", children: "\u{1F4F7}" }),
|
|
3832
|
+
/* @__PURE__ */ jsx35("div", { className: "text-sm", children: "Failed to load" })
|
|
3740
3833
|
] }) })
|
|
3741
|
-
] }) : /* @__PURE__ */
|
|
3742
|
-
/* @__PURE__ */
|
|
3834
|
+
] }) : /* @__PURE__ */ jsxs26(Fragment5, { children: [
|
|
3835
|
+
/* @__PURE__ */ jsx35(
|
|
3743
3836
|
"video",
|
|
3744
3837
|
{
|
|
3745
3838
|
ref: videoRef,
|
|
@@ -3752,7 +3845,7 @@ var Media = React10.forwardRef(
|
|
|
3752
3845
|
preload: "metadata"
|
|
3753
3846
|
}
|
|
3754
3847
|
),
|
|
3755
|
-
showPlayButton && /* @__PURE__ */
|
|
3848
|
+
showPlayButton && /* @__PURE__ */ jsx35(
|
|
3756
3849
|
"div",
|
|
3757
3850
|
{
|
|
3758
3851
|
className: cn(
|
|
@@ -3762,10 +3855,10 @@ var Media = React10.forwardRef(
|
|
|
3762
3855
|
"opacity-0": !isHovered && !videoPlaying
|
|
3763
3856
|
}
|
|
3764
3857
|
),
|
|
3765
|
-
children: /* @__PURE__ */
|
|
3858
|
+
children: /* @__PURE__ */ jsx35(
|
|
3766
3859
|
IconButton,
|
|
3767
3860
|
{
|
|
3768
|
-
icon: videoPlaying ? /* @__PURE__ */
|
|
3861
|
+
icon: videoPlaying ? /* @__PURE__ */ jsx35(Pause, { className: "text-gray-900" }) : /* @__PURE__ */ jsx35(Play, { className: "ml-1 text-gray-900" }),
|
|
3769
3862
|
onClick: videoPlaying ? handlePause : handlePlay,
|
|
3770
3863
|
varient: "outline",
|
|
3771
3864
|
size: "md",
|
|
@@ -3786,7 +3879,7 @@ Media.displayName = "Media";
|
|
|
3786
3879
|
// src/ui/MultiSelect/index.tsx
|
|
3787
3880
|
import { ChevronDown as ChevronDown2, CircleXIcon, X as X3 } from "lucide-react";
|
|
3788
3881
|
import * as React11 from "react";
|
|
3789
|
-
import { jsx as
|
|
3882
|
+
import { jsx as jsx36, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
3790
3883
|
function MultiSelect({
|
|
3791
3884
|
options,
|
|
3792
3885
|
selected,
|
|
@@ -3859,8 +3952,8 @@ function MultiSelect({
|
|
|
3859
3952
|
e.preventDefault();
|
|
3860
3953
|
inputRef.current?.focus();
|
|
3861
3954
|
};
|
|
3862
|
-
return /* @__PURE__ */
|
|
3863
|
-
/* @__PURE__ */
|
|
3955
|
+
return /* @__PURE__ */ jsxs27(Popover, { open, onOpenChange: setOpen, children: [
|
|
3956
|
+
/* @__PURE__ */ jsx36(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs27(
|
|
3864
3957
|
"div",
|
|
3865
3958
|
{
|
|
3866
3959
|
ref: containerRef,
|
|
@@ -3872,10 +3965,10 @@ function MultiSelect({
|
|
|
3872
3965
|
),
|
|
3873
3966
|
onClick: handleContainerClick,
|
|
3874
3967
|
children: [
|
|
3875
|
-
/* @__PURE__ */
|
|
3968
|
+
/* @__PURE__ */ jsxs27("div", { className: "flex flex-1 flex-wrap items-center gap-1", children: [
|
|
3876
3969
|
selected.map((value) => {
|
|
3877
3970
|
const option = options.find((opt) => opt.value === value);
|
|
3878
|
-
return /* @__PURE__ */
|
|
3971
|
+
return /* @__PURE__ */ jsx36(
|
|
3879
3972
|
Chip,
|
|
3880
3973
|
{
|
|
3881
3974
|
label: option?.label || value,
|
|
@@ -3886,12 +3979,12 @@ function MultiSelect({
|
|
|
3886
3979
|
className: cn(
|
|
3887
3980
|
disabled && "pointer-events-none cursor-not-allowed"
|
|
3888
3981
|
),
|
|
3889
|
-
children: /* @__PURE__ */
|
|
3982
|
+
children: /* @__PURE__ */ jsx36(X3, { className: "hover:text-destructive ml-1.5 h-3 w-3 cursor-pointer" })
|
|
3890
3983
|
},
|
|
3891
3984
|
value
|
|
3892
3985
|
);
|
|
3893
3986
|
}),
|
|
3894
|
-
/* @__PURE__ */
|
|
3987
|
+
/* @__PURE__ */ jsx36(
|
|
3895
3988
|
"input",
|
|
3896
3989
|
{
|
|
3897
3990
|
ref: inputRef,
|
|
@@ -3905,25 +3998,25 @@ function MultiSelect({
|
|
|
3905
3998
|
}
|
|
3906
3999
|
)
|
|
3907
4000
|
] }),
|
|
3908
|
-
selected.length > 0 && /* @__PURE__ */
|
|
4001
|
+
selected.length > 0 && /* @__PURE__ */ jsx36(
|
|
3909
4002
|
CircleXIcon,
|
|
3910
4003
|
{
|
|
3911
4004
|
className: "text-icon-default size-4.5 shrink-0",
|
|
3912
4005
|
onClick: () => onChange([])
|
|
3913
4006
|
}
|
|
3914
4007
|
),
|
|
3915
|
-
!createConfig?.enabled && /* @__PURE__ */
|
|
4008
|
+
!createConfig?.enabled && /* @__PURE__ */ jsx36(ChevronDown2, { className: "text-icon-default size-4.5 shrink-0" })
|
|
3916
4009
|
]
|
|
3917
4010
|
}
|
|
3918
4011
|
) }),
|
|
3919
|
-
/* @__PURE__ */
|
|
4012
|
+
/* @__PURE__ */ jsx36(
|
|
3920
4013
|
PopoverContent,
|
|
3921
4014
|
{
|
|
3922
4015
|
className: "shadow-box w-[var(--radix-popover-trigger-width)] border-none bg-white p-2",
|
|
3923
4016
|
align: "start",
|
|
3924
|
-
children: /* @__PURE__ */
|
|
3925
|
-
createConfig?.enabled && /* @__PURE__ */
|
|
3926
|
-
filteredOptions.map((option) => /* @__PURE__ */
|
|
4017
|
+
children: /* @__PURE__ */ jsx36("div", { className: "p-0", children: /* @__PURE__ */ jsx36("div", { className: "max-h-[300px] overflow-y-auto", children: filteredOptions.length === 0 && !canCreate ? /* @__PURE__ */ jsx36("div", { className: "py-6 text-center text-gray-500", children: inputValue ? "No results found." : "Start typing to search..." }) : /* @__PURE__ */ jsxs27("div", { className: "flex flex-col gap-1.5 px-1.5 pt-1.5 pb-0.5", children: [
|
|
4018
|
+
createConfig?.enabled && /* @__PURE__ */ jsx36("p", { className: "text-text-default pb-0.5 font-semibold", children: "Select or create one" }),
|
|
4019
|
+
filteredOptions.map((option) => /* @__PURE__ */ jsx36(
|
|
3927
4020
|
Chip,
|
|
3928
4021
|
{
|
|
3929
4022
|
label: option.label,
|
|
@@ -3932,14 +4025,14 @@ function MultiSelect({
|
|
|
3932
4025
|
},
|
|
3933
4026
|
option.value
|
|
3934
4027
|
)),
|
|
3935
|
-
canCreate && /* @__PURE__ */
|
|
4028
|
+
canCreate && /* @__PURE__ */ jsxs27(
|
|
3936
4029
|
"div",
|
|
3937
4030
|
{
|
|
3938
4031
|
onClick: async () => await handleCreate(),
|
|
3939
4032
|
className: "flex items-center justify-between",
|
|
3940
4033
|
children: [
|
|
3941
|
-
/* @__PURE__ */
|
|
3942
|
-
/* @__PURE__ */
|
|
4034
|
+
/* @__PURE__ */ jsx36(Chip, { label: inputValue.trim(), className: "rounded-md" }),
|
|
4035
|
+
/* @__PURE__ */ jsx36(
|
|
3943
4036
|
Button,
|
|
3944
4037
|
{
|
|
3945
4038
|
variant: "ghost",
|
|
@@ -3963,7 +4056,7 @@ import {
|
|
|
3963
4056
|
OTPInputContext as BaseOTPInputContext
|
|
3964
4057
|
} from "input-otp";
|
|
3965
4058
|
import * as React12 from "react";
|
|
3966
|
-
import { jsx as
|
|
4059
|
+
import { jsx as jsx37, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
3967
4060
|
function OTPInput({
|
|
3968
4061
|
type = 4,
|
|
3969
4062
|
separate = false,
|
|
@@ -3971,8 +4064,8 @@ function OTPInput({
|
|
|
3971
4064
|
className,
|
|
3972
4065
|
...props
|
|
3973
4066
|
}) {
|
|
3974
|
-
return /* @__PURE__ */
|
|
3975
|
-
/* @__PURE__ */
|
|
4067
|
+
return /* @__PURE__ */ jsx37("div", { className: cn(className), children: /* @__PURE__ */ jsxs28(InputOTP, { disabled, className: "w-full", ...props, children: [
|
|
4068
|
+
/* @__PURE__ */ jsx37(InputOTPGroup, { className: "w-full", children: [...new Array(type / 2)].map((_, index) => /* @__PURE__ */ jsx37(
|
|
3976
4069
|
InputOTPSlot,
|
|
3977
4070
|
{
|
|
3978
4071
|
className: "w-full",
|
|
@@ -3981,8 +4074,8 @@ function OTPInput({
|
|
|
3981
4074
|
},
|
|
3982
4075
|
index
|
|
3983
4076
|
)) }),
|
|
3984
|
-
separate && /* @__PURE__ */
|
|
3985
|
-
/* @__PURE__ */
|
|
4077
|
+
separate && /* @__PURE__ */ jsx37(InputOTPSeparator, {}),
|
|
4078
|
+
/* @__PURE__ */ jsx37(InputOTPGroup, { className: "w-full", children: [...new Array(type / 2)].map((_, index) => /* @__PURE__ */ jsx37(
|
|
3986
4079
|
InputOTPSlot,
|
|
3987
4080
|
{
|
|
3988
4081
|
className: "w-full",
|
|
@@ -3998,7 +4091,7 @@ function InputOTP({
|
|
|
3998
4091
|
containerClassName,
|
|
3999
4092
|
...props
|
|
4000
4093
|
}) {
|
|
4001
|
-
return /* @__PURE__ */
|
|
4094
|
+
return /* @__PURE__ */ jsx37(
|
|
4002
4095
|
BaseOTPInput,
|
|
4003
4096
|
{
|
|
4004
4097
|
"data-slot": "input-otp",
|
|
@@ -4009,7 +4102,7 @@ function InputOTP({
|
|
|
4009
4102
|
);
|
|
4010
4103
|
}
|
|
4011
4104
|
function InputOTPGroup({ className, ...props }) {
|
|
4012
|
-
return /* @__PURE__ */
|
|
4105
|
+
return /* @__PURE__ */ jsx37(
|
|
4013
4106
|
"div",
|
|
4014
4107
|
{
|
|
4015
4108
|
"data-slot": "input-otp-group",
|
|
@@ -4027,7 +4120,7 @@ function InputOTPSlot({
|
|
|
4027
4120
|
}) {
|
|
4028
4121
|
const inputOTPContext = React12.useContext(BaseOTPInputContext);
|
|
4029
4122
|
const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {};
|
|
4030
|
-
return /* @__PURE__ */
|
|
4123
|
+
return /* @__PURE__ */ jsxs28(
|
|
4031
4124
|
"div",
|
|
4032
4125
|
{
|
|
4033
4126
|
"data-slot": "input-otp-slot",
|
|
@@ -4042,26 +4135,26 @@ function InputOTPSlot({
|
|
|
4042
4135
|
),
|
|
4043
4136
|
...props,
|
|
4044
4137
|
children: [
|
|
4045
|
-
/* @__PURE__ */
|
|
4046
|
-
hasFakeCaret && /* @__PURE__ */
|
|
4138
|
+
/* @__PURE__ */ jsx37("span", { className: "text-h6", children: char || placeholder }),
|
|
4139
|
+
hasFakeCaret && /* @__PURE__ */ jsx37("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsx37("div", { className: "animate-caret-blink bg-foreground h-4 w-px duration-1000" }) })
|
|
4047
4140
|
]
|
|
4048
4141
|
}
|
|
4049
4142
|
);
|
|
4050
4143
|
}
|
|
4051
4144
|
function InputOTPSeparator({ ...props }) {
|
|
4052
|
-
return /* @__PURE__ */
|
|
4145
|
+
return /* @__PURE__ */ jsx37("div", { "data-slot": "input-otp-separator", role: "separator", ...props, children: /* @__PURE__ */ jsx37("div", { className: "bg-border-primary-normal h-0.5 w-2" }) });
|
|
4053
4146
|
}
|
|
4054
4147
|
|
|
4055
4148
|
// src/ui/PasswordInput/index.tsx
|
|
4056
4149
|
import * as React13 from "react";
|
|
4057
4150
|
import { Eye, EyeOff } from "lucide-react";
|
|
4058
|
-
import { jsx as
|
|
4151
|
+
import { jsx as jsx38, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
4059
4152
|
var PasswordInput = React13.memo(
|
|
4060
4153
|
({ type, label, className, ...props }) => {
|
|
4061
4154
|
const [showPassword, setShowPassword] = React13.useState(false);
|
|
4062
4155
|
const error = props["aria-invalid"] || false;
|
|
4063
4156
|
const inputRef = React13.useRef(null);
|
|
4064
|
-
return /* @__PURE__ */
|
|
4157
|
+
return /* @__PURE__ */ jsxs29(
|
|
4065
4158
|
"div",
|
|
4066
4159
|
{
|
|
4067
4160
|
className: cn(
|
|
@@ -4081,7 +4174,7 @@ var PasswordInput = React13.memo(
|
|
|
4081
4174
|
}
|
|
4082
4175
|
),
|
|
4083
4176
|
children: [
|
|
4084
|
-
/* @__PURE__ */
|
|
4177
|
+
/* @__PURE__ */ jsx38(
|
|
4085
4178
|
"input",
|
|
4086
4179
|
{
|
|
4087
4180
|
ref: inputRef,
|
|
@@ -4105,7 +4198,7 @@ var PasswordInput = React13.memo(
|
|
|
4105
4198
|
}
|
|
4106
4199
|
}
|
|
4107
4200
|
),
|
|
4108
|
-
/* @__PURE__ */
|
|
4201
|
+
/* @__PURE__ */ jsx38(
|
|
4109
4202
|
"button",
|
|
4110
4203
|
{
|
|
4111
4204
|
tabIndex: -1,
|
|
@@ -4114,7 +4207,7 @@ var PasswordInput = React13.memo(
|
|
|
4114
4207
|
onClick: () => setShowPassword(!showPassword),
|
|
4115
4208
|
"aria-label": showPassword ? "Hide password" : "Show password",
|
|
4116
4209
|
className: "hover:bg-primary-bg-soft absolute right-2 flex h-5 w-5 cursor-pointer items-center justify-center rounded-sm bg-white",
|
|
4117
|
-
children: showPassword ? /* @__PURE__ */
|
|
4210
|
+
children: showPassword ? /* @__PURE__ */ jsx38(Eye, { size: 16, className: "text-element-inverse-default-alt" }) : /* @__PURE__ */ jsx38(EyeOff, { size: 16, className: "text-element-inverse-default-alt" })
|
|
4118
4211
|
}
|
|
4119
4212
|
)
|
|
4120
4213
|
]
|
|
@@ -4126,16 +4219,16 @@ var PasswordInput = React13.memo(
|
|
|
4126
4219
|
// src/ui/Radio/index.tsx
|
|
4127
4220
|
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
|
|
4128
4221
|
import { CircleIcon as CircleIcon2 } from "lucide-react";
|
|
4129
|
-
import { jsx as
|
|
4222
|
+
import { jsx as jsx39, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
4130
4223
|
function Radio({ onSelect, options, ...props }) {
|
|
4131
|
-
return /* @__PURE__ */
|
|
4132
|
-
return /* @__PURE__ */
|
|
4224
|
+
return /* @__PURE__ */ jsx39(BaseRadioGroup, { ...props, children: options.map((option) => {
|
|
4225
|
+
return /* @__PURE__ */ jsxs30(
|
|
4133
4226
|
Label2,
|
|
4134
4227
|
{
|
|
4135
4228
|
htmlFor: option.value,
|
|
4136
4229
|
className: "hover:bg-surface-bg flex cursor-pointer items-center gap-x-2 rounded-lg p-1.5",
|
|
4137
4230
|
children: [
|
|
4138
|
-
/* @__PURE__ */
|
|
4231
|
+
/* @__PURE__ */ jsx39(
|
|
4139
4232
|
BaseRadioGroupItem,
|
|
4140
4233
|
{
|
|
4141
4234
|
onClick: () => {
|
|
@@ -4156,7 +4249,7 @@ function BaseRadioGroup({
|
|
|
4156
4249
|
className,
|
|
4157
4250
|
...props
|
|
4158
4251
|
}) {
|
|
4159
|
-
return /* @__PURE__ */
|
|
4252
|
+
return /* @__PURE__ */ jsx39(
|
|
4160
4253
|
RadioGroupPrimitive.Root,
|
|
4161
4254
|
{
|
|
4162
4255
|
"data-slot": "radio-group",
|
|
@@ -4169,7 +4262,7 @@ function BaseRadioGroupItem({
|
|
|
4169
4262
|
className,
|
|
4170
4263
|
...props
|
|
4171
4264
|
}) {
|
|
4172
|
-
return /* @__PURE__ */
|
|
4265
|
+
return /* @__PURE__ */ jsx39(
|
|
4173
4266
|
RadioGroupPrimitive.Item,
|
|
4174
4267
|
{
|
|
4175
4268
|
"data-slot": "radio-group-item",
|
|
@@ -4178,12 +4271,12 @@ function BaseRadioGroupItem({
|
|
|
4178
4271
|
className
|
|
4179
4272
|
),
|
|
4180
4273
|
...props,
|
|
4181
|
-
children: /* @__PURE__ */
|
|
4274
|
+
children: /* @__PURE__ */ jsx39(
|
|
4182
4275
|
RadioGroupPrimitive.Indicator,
|
|
4183
4276
|
{
|
|
4184
4277
|
"data-slot": "radio-group-indicator",
|
|
4185
4278
|
className: "relative flex items-center justify-center",
|
|
4186
|
-
children: /* @__PURE__ */
|
|
4279
|
+
children: /* @__PURE__ */ jsx39(CircleIcon2, { className: "fill-check-box-and-radio-checked-enabled group-data-[state=checked]:hover:fill-check-box-and-radio-checked-hovered absolute top-1/2 left-1/2 size-[16px] -translate-x-1/2 -translate-y-1/2 stroke-none" })
|
|
4187
4280
|
}
|
|
4188
4281
|
)
|
|
4189
4282
|
}
|
|
@@ -4194,8 +4287,8 @@ function BaseRadioGroupItem({
|
|
|
4194
4287
|
import { debounce } from "lodash";
|
|
4195
4288
|
import { SearchIcon as SearchIcon2 } from "lucide-react";
|
|
4196
4289
|
import { useQueryState } from "nuqs";
|
|
4197
|
-
import { useCallback as
|
|
4198
|
-
import { jsx as
|
|
4290
|
+
import { useCallback as useCallback4, useEffect as useEffect6, useState as useState10 } from "react";
|
|
4291
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
4199
4292
|
function SearchInput({
|
|
4200
4293
|
searchKey,
|
|
4201
4294
|
placeholder = "Search by...",
|
|
@@ -4207,8 +4300,8 @@ function SearchInput({
|
|
|
4207
4300
|
const [search, setSearch] = useQueryState(searchKey, {
|
|
4208
4301
|
defaultValue: ""
|
|
4209
4302
|
});
|
|
4210
|
-
const [inputValue, setInputValue] =
|
|
4211
|
-
const debouncedSetValue =
|
|
4303
|
+
const [inputValue, setInputValue] = useState10(search ?? "");
|
|
4304
|
+
const debouncedSetValue = useCallback4(
|
|
4212
4305
|
debounce((value) => {
|
|
4213
4306
|
if (addToParam) {
|
|
4214
4307
|
setSearch(value);
|
|
@@ -4224,7 +4317,7 @@ function SearchInput({
|
|
|
4224
4317
|
debouncedSetValue.cancel();
|
|
4225
4318
|
};
|
|
4226
4319
|
}, [inputValue, debouncedSetValue]);
|
|
4227
|
-
return /* @__PURE__ */
|
|
4320
|
+
return /* @__PURE__ */ jsx40("div", { className: cn("relative", className), children: /* @__PURE__ */ jsx40(
|
|
4228
4321
|
Input,
|
|
4229
4322
|
{
|
|
4230
4323
|
onChange: (e) => {
|
|
@@ -4233,7 +4326,7 @@ function SearchInput({
|
|
|
4233
4326
|
},
|
|
4234
4327
|
placeholder,
|
|
4235
4328
|
prefixNode: {
|
|
4236
|
-
node: /* @__PURE__ */
|
|
4329
|
+
node: /* @__PURE__ */ jsx40(SearchIcon2, { className: "text-element-inverse-default" }),
|
|
4237
4330
|
withBorder: false
|
|
4238
4331
|
},
|
|
4239
4332
|
value: inputValue,
|
|
@@ -4246,7 +4339,7 @@ function SearchInput({
|
|
|
4246
4339
|
// src/ui/SelectHover/index.tsx
|
|
4247
4340
|
import { Check as Check2 } from "lucide-react";
|
|
4248
4341
|
import * as React14 from "react";
|
|
4249
|
-
import { jsx as
|
|
4342
|
+
import { jsx as jsx41, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
4250
4343
|
function SelectHover({
|
|
4251
4344
|
options,
|
|
4252
4345
|
placeholder = "Select an option",
|
|
@@ -4273,15 +4366,15 @@ function SelectHover({
|
|
|
4273
4366
|
setIsOpen(false);
|
|
4274
4367
|
}, 300);
|
|
4275
4368
|
};
|
|
4276
|
-
return /* @__PURE__ */
|
|
4277
|
-
/* @__PURE__ */
|
|
4278
|
-
/* @__PURE__ */
|
|
4369
|
+
return /* @__PURE__ */ jsx41(Popover, { open: isOpen, onOpenChange: setIsOpen, children: /* @__PURE__ */ jsxs31("div", { onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, children: [
|
|
4370
|
+
/* @__PURE__ */ jsx41(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx41(Button, { role: "combobox", "aria-expanded": isOpen, className, children: /* @__PURE__ */ jsx41("span", { className: "truncate", children: selectedOption ? selectedOption.label : placeholder }) }) }),
|
|
4371
|
+
/* @__PURE__ */ jsx41(
|
|
4279
4372
|
PopoverContent,
|
|
4280
4373
|
{
|
|
4281
4374
|
className: "bg-surface-bg-container w-full rounded-3xl border-none p-2 shadow-md",
|
|
4282
4375
|
onMouseEnter: handleMouseEnter,
|
|
4283
4376
|
onMouseLeave: handleMouseLeave,
|
|
4284
|
-
children: /* @__PURE__ */
|
|
4377
|
+
children: /* @__PURE__ */ jsx41("div", { className: "flex max-h-[300px] flex-col items-start gap-[2px] overflow-auto", children: options.map((option) => /* @__PURE__ */ jsxs31(
|
|
4285
4378
|
"button",
|
|
4286
4379
|
{
|
|
4287
4380
|
className: cn(
|
|
@@ -4290,8 +4383,8 @@ function SelectHover({
|
|
|
4290
4383
|
),
|
|
4291
4384
|
onClick: () => handleSelect(option.value),
|
|
4292
4385
|
children: [
|
|
4293
|
-
/* @__PURE__ */
|
|
4294
|
-
value === option.value && /* @__PURE__ */
|
|
4386
|
+
/* @__PURE__ */ jsx41("span", { className: "flex-1", children: option.label }),
|
|
4387
|
+
value === option.value && /* @__PURE__ */ jsx41(Check2, { className: "text-icon-secondary ml-2 h-4 w-4" })
|
|
4295
4388
|
]
|
|
4296
4389
|
},
|
|
4297
4390
|
option.value
|
|
@@ -4304,7 +4397,7 @@ function SelectHover({
|
|
|
4304
4397
|
// src/ui/SelectInput/index.tsx
|
|
4305
4398
|
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
4306
4399
|
import { CheckIcon as CheckIcon4, ChevronDownIcon as ChevronDownIcon3, ChevronUpIcon } from "lucide-react";
|
|
4307
|
-
import { jsx as
|
|
4400
|
+
import { jsx as jsx42, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
4308
4401
|
function SelectInput({
|
|
4309
4402
|
defaultValue,
|
|
4310
4403
|
options,
|
|
@@ -4317,8 +4410,8 @@ function SelectInput({
|
|
|
4317
4410
|
itemProps,
|
|
4318
4411
|
...props
|
|
4319
4412
|
}) {
|
|
4320
|
-
return /* @__PURE__ */
|
|
4321
|
-
/* @__PURE__ */
|
|
4413
|
+
return /* @__PURE__ */ jsxs32(BaseSelect, { onValueChange: onChange, defaultValue, ...props, children: [
|
|
4414
|
+
/* @__PURE__ */ jsx42(
|
|
4322
4415
|
BaseSelectTrigger,
|
|
4323
4416
|
{
|
|
4324
4417
|
withArrow,
|
|
@@ -4326,7 +4419,7 @@ function SelectInput({
|
|
|
4326
4419
|
"aria-invalid": props["aria-invalid"],
|
|
4327
4420
|
className: cn("w-full cursor-pointer", className),
|
|
4328
4421
|
variant,
|
|
4329
|
-
children: /* @__PURE__ */
|
|
4422
|
+
children: /* @__PURE__ */ jsx42(
|
|
4330
4423
|
BaseSelectValue,
|
|
4331
4424
|
{
|
|
4332
4425
|
className: "flex-1",
|
|
@@ -4335,7 +4428,7 @@ function SelectInput({
|
|
|
4335
4428
|
)
|
|
4336
4429
|
}
|
|
4337
4430
|
),
|
|
4338
|
-
/* @__PURE__ */
|
|
4431
|
+
/* @__PURE__ */ jsx42(
|
|
4339
4432
|
BaseSelectContent,
|
|
4340
4433
|
{
|
|
4341
4434
|
...contentProps,
|
|
@@ -4343,7 +4436,7 @@ function SelectInput({
|
|
|
4343
4436
|
"border-stroke-inverse-slate-02 border",
|
|
4344
4437
|
contentProps?.className
|
|
4345
4438
|
),
|
|
4346
|
-
children: options.map((option) => /* @__PURE__ */
|
|
4439
|
+
children: options.map((option) => /* @__PURE__ */ jsxs32(
|
|
4347
4440
|
BaseSelectItem,
|
|
4348
4441
|
{
|
|
4349
4442
|
value: option.value,
|
|
@@ -4363,12 +4456,12 @@ function SelectInput({
|
|
|
4363
4456
|
function BaseSelect({
|
|
4364
4457
|
...props
|
|
4365
4458
|
}) {
|
|
4366
|
-
return /* @__PURE__ */
|
|
4459
|
+
return /* @__PURE__ */ jsx42(SelectPrimitive.Root, { "data-slot": "select", ...props });
|
|
4367
4460
|
}
|
|
4368
4461
|
function BaseSelectValue({
|
|
4369
4462
|
...props
|
|
4370
4463
|
}) {
|
|
4371
|
-
return /* @__PURE__ */
|
|
4464
|
+
return /* @__PURE__ */ jsx42(SelectPrimitive.Value, { "data-slot": "select-value", ...props });
|
|
4372
4465
|
}
|
|
4373
4466
|
function BaseSelectTrigger({
|
|
4374
4467
|
className,
|
|
@@ -4378,7 +4471,7 @@ function BaseSelectTrigger({
|
|
|
4378
4471
|
children,
|
|
4379
4472
|
...props
|
|
4380
4473
|
}) {
|
|
4381
|
-
return /* @__PURE__ */
|
|
4474
|
+
return /* @__PURE__ */ jsxs32(
|
|
4382
4475
|
SelectPrimitive.Trigger,
|
|
4383
4476
|
{
|
|
4384
4477
|
"data-slot": "select-trigger",
|
|
@@ -4399,7 +4492,7 @@ function BaseSelectTrigger({
|
|
|
4399
4492
|
...props,
|
|
4400
4493
|
children: [
|
|
4401
4494
|
children,
|
|
4402
|
-
withArrow && /* @__PURE__ */
|
|
4495
|
+
withArrow && /* @__PURE__ */ jsx42(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx42(ChevronDownIcon3, { className: "text-icon-default size-4" }) })
|
|
4403
4496
|
]
|
|
4404
4497
|
}
|
|
4405
4498
|
);
|
|
@@ -4410,7 +4503,7 @@ function BaseSelectContent({
|
|
|
4410
4503
|
position = "popper",
|
|
4411
4504
|
...props
|
|
4412
4505
|
}) {
|
|
4413
|
-
return /* @__PURE__ */
|
|
4506
|
+
return /* @__PURE__ */ jsx42(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs32(
|
|
4414
4507
|
SelectPrimitive.Content,
|
|
4415
4508
|
{
|
|
4416
4509
|
"data-slot": "select-content",
|
|
@@ -4422,8 +4515,8 @@ function BaseSelectContent({
|
|
|
4422
4515
|
position,
|
|
4423
4516
|
...props,
|
|
4424
4517
|
children: [
|
|
4425
|
-
/* @__PURE__ */
|
|
4426
|
-
/* @__PURE__ */
|
|
4518
|
+
/* @__PURE__ */ jsx42(BaseSelectScrollUpButton, {}),
|
|
4519
|
+
/* @__PURE__ */ jsx42(
|
|
4427
4520
|
SelectPrimitive.Viewport,
|
|
4428
4521
|
{
|
|
4429
4522
|
className: cn(
|
|
@@ -4433,7 +4526,7 @@ function BaseSelectContent({
|
|
|
4433
4526
|
children
|
|
4434
4527
|
}
|
|
4435
4528
|
),
|
|
4436
|
-
/* @__PURE__ */
|
|
4529
|
+
/* @__PURE__ */ jsx42(BaseSelectScrollDownButton, {})
|
|
4437
4530
|
]
|
|
4438
4531
|
}
|
|
4439
4532
|
) });
|
|
@@ -4443,7 +4536,7 @@ function BaseSelectItem({
|
|
|
4443
4536
|
children,
|
|
4444
4537
|
...props
|
|
4445
4538
|
}) {
|
|
4446
|
-
return /* @__PURE__ */
|
|
4539
|
+
return /* @__PURE__ */ jsxs32(
|
|
4447
4540
|
SelectPrimitive.Item,
|
|
4448
4541
|
{
|
|
4449
4542
|
"data-slot": "select-item",
|
|
@@ -4453,8 +4546,8 @@ function BaseSelectItem({
|
|
|
4453
4546
|
),
|
|
4454
4547
|
...props,
|
|
4455
4548
|
children: [
|
|
4456
|
-
/* @__PURE__ */
|
|
4457
|
-
/* @__PURE__ */
|
|
4549
|
+
/* @__PURE__ */ jsx42("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx42(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx42(CheckIcon4, { className: "text-icon-secondary size-4" }) }) }),
|
|
4550
|
+
/* @__PURE__ */ jsx42(SelectPrimitive.ItemText, { children })
|
|
4458
4551
|
]
|
|
4459
4552
|
}
|
|
4460
4553
|
);
|
|
@@ -4463,7 +4556,7 @@ function BaseSelectScrollUpButton({
|
|
|
4463
4556
|
className,
|
|
4464
4557
|
...props
|
|
4465
4558
|
}) {
|
|
4466
|
-
return /* @__PURE__ */
|
|
4559
|
+
return /* @__PURE__ */ jsx42(
|
|
4467
4560
|
SelectPrimitive.ScrollUpButton,
|
|
4468
4561
|
{
|
|
4469
4562
|
"data-slot": "select-scroll-up-button",
|
|
@@ -4472,7 +4565,7 @@ function BaseSelectScrollUpButton({
|
|
|
4472
4565
|
className
|
|
4473
4566
|
),
|
|
4474
4567
|
...props,
|
|
4475
|
-
children: /* @__PURE__ */
|
|
4568
|
+
children: /* @__PURE__ */ jsx42(ChevronUpIcon, { className: "size-4" })
|
|
4476
4569
|
}
|
|
4477
4570
|
);
|
|
4478
4571
|
}
|
|
@@ -4480,7 +4573,7 @@ function BaseSelectScrollDownButton({
|
|
|
4480
4573
|
className,
|
|
4481
4574
|
...props
|
|
4482
4575
|
}) {
|
|
4483
|
-
return /* @__PURE__ */
|
|
4576
|
+
return /* @__PURE__ */ jsx42(
|
|
4484
4577
|
SelectPrimitive.ScrollDownButton,
|
|
4485
4578
|
{
|
|
4486
4579
|
"data-slot": "select-scroll-down-button",
|
|
@@ -4489,7 +4582,7 @@ function BaseSelectScrollDownButton({
|
|
|
4489
4582
|
className
|
|
4490
4583
|
),
|
|
4491
4584
|
...props,
|
|
4492
|
-
children: /* @__PURE__ */
|
|
4585
|
+
children: /* @__PURE__ */ jsx42(ChevronDownIcon3, { className: "size-4" })
|
|
4493
4586
|
}
|
|
4494
4587
|
);
|
|
4495
4588
|
}
|
|
@@ -4497,15 +4590,15 @@ function BaseSelectScrollDownButton({
|
|
|
4497
4590
|
// src/ui/Sheet/index.tsx
|
|
4498
4591
|
import * as SheetPrimitive from "@radix-ui/react-dialog";
|
|
4499
4592
|
import { XIcon as XIcon3 } from "lucide-react";
|
|
4500
|
-
import { jsx as
|
|
4593
|
+
import { jsx as jsx43, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
4501
4594
|
function Sheet({ ...props }) {
|
|
4502
|
-
return /* @__PURE__ */
|
|
4595
|
+
return /* @__PURE__ */ jsx43(SheetPrimitive.Root, { "data-slot": "sheet", ...props });
|
|
4503
4596
|
}
|
|
4504
4597
|
|
|
4505
4598
|
// src/ui/Skeleton/index.tsx
|
|
4506
|
-
import { jsx as
|
|
4599
|
+
import { jsx as jsx44 } from "react/jsx-runtime";
|
|
4507
4600
|
function Skeleton({ className, ...props }) {
|
|
4508
|
-
return /* @__PURE__ */
|
|
4601
|
+
return /* @__PURE__ */ jsx44(
|
|
4509
4602
|
"div",
|
|
4510
4603
|
{
|
|
4511
4604
|
"data-slot": "skeleton",
|
|
@@ -4521,7 +4614,7 @@ function Skeleton({ className, ...props }) {
|
|
|
4521
4614
|
// src/ui/Slider/index.tsx
|
|
4522
4615
|
import * as SliderPrimitive from "@radix-ui/react-slider";
|
|
4523
4616
|
import * as React15 from "react";
|
|
4524
|
-
import { jsx as
|
|
4617
|
+
import { jsx as jsx45, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
4525
4618
|
function Slider({
|
|
4526
4619
|
className,
|
|
4527
4620
|
defaultValue,
|
|
@@ -4534,7 +4627,7 @@ function Slider({
|
|
|
4534
4627
|
() => Array.isArray(value) ? value : Array.isArray(defaultValue) ? defaultValue : [min, max],
|
|
4535
4628
|
[value, defaultValue, min, max]
|
|
4536
4629
|
);
|
|
4537
|
-
return /* @__PURE__ */
|
|
4630
|
+
return /* @__PURE__ */ jsxs34(
|
|
4538
4631
|
SliderPrimitive.Root,
|
|
4539
4632
|
{
|
|
4540
4633
|
"data-slot": "slider",
|
|
@@ -4548,14 +4641,14 @@ function Slider({
|
|
|
4548
4641
|
),
|
|
4549
4642
|
...props,
|
|
4550
4643
|
children: [
|
|
4551
|
-
/* @__PURE__ */
|
|
4644
|
+
/* @__PURE__ */ jsx45(
|
|
4552
4645
|
SliderPrimitive.Track,
|
|
4553
4646
|
{
|
|
4554
4647
|
"data-slot": "slider-track",
|
|
4555
4648
|
className: cn(
|
|
4556
4649
|
"bg-audioProgress-bg relative grow overflow-hidden rounded-full data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"
|
|
4557
4650
|
),
|
|
4558
|
-
children: /* @__PURE__ */
|
|
4651
|
+
children: /* @__PURE__ */ jsx45(
|
|
4559
4652
|
SliderPrimitive.Range,
|
|
4560
4653
|
{
|
|
4561
4654
|
"data-slot": "slider-range",
|
|
@@ -4566,7 +4659,7 @@ function Slider({
|
|
|
4566
4659
|
)
|
|
4567
4660
|
}
|
|
4568
4661
|
),
|
|
4569
|
-
Array.from({ length: _values.length }, (_, index) => /* @__PURE__ */
|
|
4662
|
+
Array.from({ length: _values.length }, (_, index) => /* @__PURE__ */ jsx45(
|
|
4570
4663
|
SliderPrimitive.Thumb,
|
|
4571
4664
|
{
|
|
4572
4665
|
"data-slot": "slider-thumb",
|
|
@@ -4582,10 +4675,10 @@ function Slider({
|
|
|
4582
4675
|
// src/ui/Sooner/index.tsx
|
|
4583
4676
|
import { useTheme } from "next-themes";
|
|
4584
4677
|
import { Toaster as Sonner } from "sonner";
|
|
4585
|
-
import { jsx as
|
|
4678
|
+
import { jsx as jsx46 } from "react/jsx-runtime";
|
|
4586
4679
|
var Toaster = ({ ...props }) => {
|
|
4587
4680
|
const { theme = "system" } = useTheme();
|
|
4588
|
-
return /* @__PURE__ */
|
|
4681
|
+
return /* @__PURE__ */ jsx46(
|
|
4589
4682
|
Sonner,
|
|
4590
4683
|
{
|
|
4591
4684
|
theme,
|
|
@@ -4602,14 +4695,14 @@ var Toaster = ({ ...props }) => {
|
|
|
4602
4695
|
|
|
4603
4696
|
// src/ui/Switch/index.tsx
|
|
4604
4697
|
import * as SwitchPrimitive from "@radix-ui/react-switch";
|
|
4605
|
-
import { jsx as
|
|
4698
|
+
import { jsx as jsx47, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
4606
4699
|
function Switch({
|
|
4607
4700
|
className,
|
|
4608
4701
|
label,
|
|
4609
4702
|
...props
|
|
4610
4703
|
}) {
|
|
4611
|
-
return /* @__PURE__ */
|
|
4612
|
-
/* @__PURE__ */
|
|
4704
|
+
return /* @__PURE__ */ jsxs35("div", { className: "flex items-center space-x-2", children: [
|
|
4705
|
+
/* @__PURE__ */ jsx47(
|
|
4613
4706
|
SwitchPrimitive.Root,
|
|
4614
4707
|
{
|
|
4615
4708
|
"data-slot": "switch",
|
|
@@ -4619,7 +4712,7 @@ function Switch({
|
|
|
4619
4712
|
className
|
|
4620
4713
|
),
|
|
4621
4714
|
...props,
|
|
4622
|
-
children: /* @__PURE__ */
|
|
4715
|
+
children: /* @__PURE__ */ jsx47(
|
|
4623
4716
|
SwitchPrimitive.Thumb,
|
|
4624
4717
|
{
|
|
4625
4718
|
"data-slot": "switch-thumb",
|
|
@@ -4630,7 +4723,7 @@ function Switch({
|
|
|
4630
4723
|
)
|
|
4631
4724
|
}
|
|
4632
4725
|
),
|
|
4633
|
-
label && /* @__PURE__ */
|
|
4726
|
+
label && /* @__PURE__ */ jsx47(Label2, { htmlFor: props.id || label, children: label })
|
|
4634
4727
|
] });
|
|
4635
4728
|
}
|
|
4636
4729
|
|
|
@@ -4653,8 +4746,8 @@ import {
|
|
|
4653
4746
|
MagickoCopySuccess
|
|
4654
4747
|
} from "magick-icons";
|
|
4655
4748
|
import * as React16 from "react";
|
|
4656
|
-
import { useState as
|
|
4657
|
-
import { Fragment as Fragment6, jsx as
|
|
4749
|
+
import { useState as useState12 } from "react";
|
|
4750
|
+
import { Fragment as Fragment6, jsx as jsx48, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
4658
4751
|
var Table = ({
|
|
4659
4752
|
columns,
|
|
4660
4753
|
tableData,
|
|
@@ -4662,7 +4755,7 @@ var Table = ({
|
|
|
4662
4755
|
emptyState = {
|
|
4663
4756
|
emptyAction: void 0,
|
|
4664
4757
|
label: "There is currently no data available to display in this table.",
|
|
4665
|
-
icon: /* @__PURE__ */
|
|
4758
|
+
icon: /* @__PURE__ */ jsx48(IconProfile, { icon: /* @__PURE__ */ jsx48(IconsaxBriefcaseBold, {}), color: "teal" })
|
|
4666
4759
|
},
|
|
4667
4760
|
onRowClick
|
|
4668
4761
|
}) => {
|
|
@@ -4674,41 +4767,41 @@ var Table = ({
|
|
|
4674
4767
|
getSortedRowModel: getSortedRowModel()
|
|
4675
4768
|
});
|
|
4676
4769
|
const rowCount = table.getRowModel().rows.length;
|
|
4677
|
-
return /* @__PURE__ */
|
|
4678
|
-
isLoading ? /* @__PURE__ */
|
|
4770
|
+
return /* @__PURE__ */ jsxs36("div", { className: "relative flex flex-col overflow-auto", children: [
|
|
4771
|
+
isLoading ? /* @__PURE__ */ jsx48(
|
|
4679
4772
|
"div",
|
|
4680
4773
|
{
|
|
4681
4774
|
className: cn(
|
|
4682
4775
|
rowCount === 0 ? "" : "bg-gray-100 dark:bg-gray-700",
|
|
4683
4776
|
"absolute top-10 left-0 w-full h-full min-h-[100px] opacity-70 z-10 flex items-center justify-center"
|
|
4684
4777
|
),
|
|
4685
|
-
children: /* @__PURE__ */
|
|
4778
|
+
children: /* @__PURE__ */ jsx48(Spinner, { className: "size-10 text-stroke-inverse-slate-04 " })
|
|
4686
4779
|
}
|
|
4687
4780
|
) : null,
|
|
4688
|
-
!isLoading && rowCount === 0 ? /* @__PURE__ */
|
|
4781
|
+
!isLoading && rowCount === 0 ? /* @__PURE__ */ jsx48("div", { className: "absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 z-2", children: /* @__PURE__ */ jsxs36("div", { className: "flex flex-col items-center gap-4", children: [
|
|
4689
4782
|
emptyState?.icon,
|
|
4690
|
-
/* @__PURE__ */
|
|
4691
|
-
emptyState?.emptyAction ? /* @__PURE__ */
|
|
4783
|
+
/* @__PURE__ */ jsx48(Text, { children: emptyState?.label }),
|
|
4784
|
+
emptyState?.emptyAction ? /* @__PURE__ */ jsx48(
|
|
4692
4785
|
Button,
|
|
4693
4786
|
{
|
|
4694
4787
|
variant: "outline",
|
|
4695
|
-
prefix: /* @__PURE__ */
|
|
4788
|
+
prefix: /* @__PURE__ */ jsx48(MagickoAdd, { className: "[&_path]:fill-element-inverse-default" }),
|
|
4696
4789
|
onClick: () => emptyState?.emptyAction?.(),
|
|
4697
4790
|
children: "Create new"
|
|
4698
4791
|
}
|
|
4699
4792
|
) : null
|
|
4700
4793
|
] }) }) : null,
|
|
4701
|
-
/* @__PURE__ */
|
|
4794
|
+
/* @__PURE__ */ jsx48("div", { className: "max-w-full flex-1 overflow-x-auto", children: /* @__PURE__ */ jsxs36(
|
|
4702
4795
|
"table",
|
|
4703
4796
|
{
|
|
4704
4797
|
className: "w-full caption-bottom text-sm",
|
|
4705
4798
|
style: { minWidth: "max-content" },
|
|
4706
4799
|
children: [
|
|
4707
|
-
/* @__PURE__ */
|
|
4800
|
+
/* @__PURE__ */ jsx48("thead", { className: "bg-fill-inverse-slate-03", children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx48(
|
|
4708
4801
|
"tr",
|
|
4709
4802
|
{
|
|
4710
4803
|
className: "hover:bg-muted/50 border-stroke-inverse-slate-02 border-b transition-colors",
|
|
4711
|
-
children: headerGroup.headers.map((header) => /* @__PURE__ */
|
|
4804
|
+
children: headerGroup.headers.map((header) => /* @__PURE__ */ jsx48(
|
|
4712
4805
|
"th",
|
|
4713
4806
|
{
|
|
4714
4807
|
className: "text-muted-foreground h-12 px-4 text-left align-middle font-medium",
|
|
@@ -4722,14 +4815,14 @@ var Table = ({
|
|
|
4722
4815
|
},
|
|
4723
4816
|
headerGroup.id
|
|
4724
4817
|
)) }),
|
|
4725
|
-
/* @__PURE__ */
|
|
4818
|
+
/* @__PURE__ */ jsxs36("tbody", { className: "relative", children: [
|
|
4726
4819
|
table.getRowModel().rows.map((row) => {
|
|
4727
|
-
return /* @__PURE__ */
|
|
4820
|
+
return /* @__PURE__ */ jsx48(
|
|
4728
4821
|
"tr",
|
|
4729
4822
|
{
|
|
4730
4823
|
className: "hover:bg-muted/50 bg-table-table-cell-unselected group/row border-stroke-inverse-slate-02 cursor-pointer border-b transition-colors",
|
|
4731
4824
|
onClick: () => onRowClick?.(row.original),
|
|
4732
|
-
children: row.getVisibleCells().map((cell) => /* @__PURE__ */
|
|
4825
|
+
children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx48("td", { className: "p-4", children: flexRender(
|
|
4733
4826
|
cell.column.columnDef.cell,
|
|
4734
4827
|
cell.getContext()
|
|
4735
4828
|
) }, cell.id))
|
|
@@ -4737,7 +4830,7 @@ var Table = ({
|
|
|
4737
4830
|
row.id
|
|
4738
4831
|
);
|
|
4739
4832
|
}),
|
|
4740
|
-
rowCount === 0 && Array.from({ length: 6 }).map((_, index) => /* @__PURE__ */
|
|
4833
|
+
rowCount === 0 && Array.from({ length: 6 }).map((_, index) => /* @__PURE__ */ jsx48("tr", { children: /* @__PURE__ */ jsx48("td", { colSpan: columns.length, className: "h-12 p-4", children: /* @__PURE__ */ jsx48("div", { className: "" }) }) }, index))
|
|
4741
4834
|
] })
|
|
4742
4835
|
]
|
|
4743
4836
|
}
|
|
@@ -4772,13 +4865,13 @@ var PrimaryCell = React16.forwardRef(
|
|
|
4772
4865
|
}, ref) => {
|
|
4773
4866
|
let content = children;
|
|
4774
4867
|
if (variant === "badge") {
|
|
4775
|
-
content = /* @__PURE__ */
|
|
4868
|
+
content = /* @__PURE__ */ jsxs36("div", { className: "flex items-center gap-2", children: [
|
|
4776
4869
|
children,
|
|
4777
|
-
badgeContent && /* @__PURE__ */
|
|
4870
|
+
badgeContent && /* @__PURE__ */ jsx48(Badge, { type: badgeType, size: badgeSize, children: badgeContent })
|
|
4778
4871
|
] });
|
|
4779
4872
|
} else if (variant === "progress") {
|
|
4780
|
-
content = /* @__PURE__ */
|
|
4781
|
-
progressValue !== 100 && /* @__PURE__ */
|
|
4873
|
+
content = /* @__PURE__ */ jsxs36(Fragment6, { children: [
|
|
4874
|
+
progressValue !== 100 && /* @__PURE__ */ jsx48(
|
|
4782
4875
|
ProgressIndicator,
|
|
4783
4876
|
{
|
|
4784
4877
|
variant: "circle",
|
|
@@ -4787,23 +4880,23 @@ var PrimaryCell = React16.forwardRef(
|
|
|
4787
4880
|
showPercentage: showProgressPercentage
|
|
4788
4881
|
}
|
|
4789
4882
|
),
|
|
4790
|
-
children && /* @__PURE__ */
|
|
4883
|
+
children && /* @__PURE__ */ jsx48("span", { className: "text-body-sm text-element-inverse-default", children })
|
|
4791
4884
|
] });
|
|
4792
4885
|
} else if (variant === "error") {
|
|
4793
|
-
content = /* @__PURE__ */
|
|
4794
|
-
/* @__PURE__ */
|
|
4795
|
-
errorMessage ? /* @__PURE__ */
|
|
4886
|
+
content = /* @__PURE__ */ jsxs36(Fragment6, { children: [
|
|
4887
|
+
/* @__PURE__ */ jsx48(AlertCircle, { className: "size-4 shrink-0" }),
|
|
4888
|
+
errorMessage ? /* @__PURE__ */ jsx48("span", { className: "text-body-sm", children: errorMessage }) : children
|
|
4796
4889
|
] });
|
|
4797
4890
|
}
|
|
4798
|
-
return /* @__PURE__ */
|
|
4891
|
+
return /* @__PURE__ */ jsxs36(
|
|
4799
4892
|
"div",
|
|
4800
4893
|
{
|
|
4801
4894
|
ref,
|
|
4802
4895
|
className: cn(primaryCellVariants({ variant })),
|
|
4803
4896
|
...props,
|
|
4804
4897
|
children: [
|
|
4805
|
-
/* @__PURE__ */
|
|
4806
|
-
hoverUI && /* @__PURE__ */
|
|
4898
|
+
/* @__PURE__ */ jsx48("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: content }),
|
|
4899
|
+
hoverUI && /* @__PURE__ */ jsx48("div", { className: "ml-2 flex items-center gap-2 opacity-0 transition-opacity duration-200 group-hover/row:opacity-100", children: hoverUI })
|
|
4807
4900
|
]
|
|
4808
4901
|
}
|
|
4809
4902
|
);
|
|
@@ -4812,7 +4905,7 @@ var PrimaryCell = React16.forwardRef(
|
|
|
4812
4905
|
PrimaryCell.displayName = "PrimaryCell";
|
|
4813
4906
|
Table.PrimaryCell = PrimaryCell;
|
|
4814
4907
|
var TextCell = React16.forwardRef(({ text, copyable = true, className, ...props }, ref) => {
|
|
4815
|
-
const [isCopied, setIsCopied] =
|
|
4908
|
+
const [isCopied, setIsCopied] = useState12(false);
|
|
4816
4909
|
const [hoverRef, isHovering] = useHover();
|
|
4817
4910
|
const handleCopy = () => {
|
|
4818
4911
|
navigator.clipboard.writeText(text);
|
|
@@ -4825,11 +4918,11 @@ var TextCell = React16.forwardRef(({ text, copyable = true, className, ...props
|
|
|
4825
4918
|
}, 1200);
|
|
4826
4919
|
}
|
|
4827
4920
|
}, [isCopied]);
|
|
4828
|
-
return /* @__PURE__ */
|
|
4829
|
-
copyable && isHovering && /* @__PURE__ */
|
|
4921
|
+
return /* @__PURE__ */ jsx48("div", { className: cn("w-full h-full", className), ref, ...props, children: /* @__PURE__ */ jsxs36("div", { className: "relative", ref: hoverRef, children: [
|
|
4922
|
+
copyable && isHovering && /* @__PURE__ */ jsx48(
|
|
4830
4923
|
IconButton,
|
|
4831
4924
|
{
|
|
4832
|
-
icon: isCopied ? /* @__PURE__ */
|
|
4925
|
+
icon: isCopied ? /* @__PURE__ */ jsx48(
|
|
4833
4926
|
MagickoCopySuccess,
|
|
4834
4927
|
{
|
|
4835
4928
|
className: cn(
|
|
@@ -4837,16 +4930,16 @@ var TextCell = React16.forwardRef(({ text, copyable = true, className, ...props
|
|
|
4837
4930
|
"transition-all ease-in duration-200"
|
|
4838
4931
|
)
|
|
4839
4932
|
}
|
|
4840
|
-
) : /* @__PURE__ */
|
|
4933
|
+
) : /* @__PURE__ */ jsx48(MagickoCopy, { className: "size-4" }),
|
|
4841
4934
|
className: "absolute top-1/2 -right-3 -translate-y-1/2",
|
|
4842
4935
|
size: "sm",
|
|
4843
4936
|
varient: "soft",
|
|
4844
4937
|
onClick: handleCopy
|
|
4845
4938
|
}
|
|
4846
4939
|
),
|
|
4847
|
-
/* @__PURE__ */
|
|
4848
|
-
/* @__PURE__ */
|
|
4849
|
-
/* @__PURE__ */
|
|
4940
|
+
/* @__PURE__ */ jsxs36(Popover, { children: [
|
|
4941
|
+
/* @__PURE__ */ jsx48(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx48(Text, { className: "truncate line-clamp-1", children: text ?? "-" }) }),
|
|
4942
|
+
/* @__PURE__ */ jsx48(PopoverContent, { className: "", children: /* @__PURE__ */ jsx48(Text, { children: text ?? "-" }) })
|
|
4850
4943
|
] })
|
|
4851
4944
|
] }) });
|
|
4852
4945
|
});
|
|
@@ -4856,7 +4949,7 @@ var Table_default = Table;
|
|
|
4856
4949
|
|
|
4857
4950
|
// src/ui/Tabs/index.tsx
|
|
4858
4951
|
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
4859
|
-
import { jsx as
|
|
4952
|
+
import { jsx as jsx49, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
4860
4953
|
function Tabs({
|
|
4861
4954
|
defaultActiveTab,
|
|
4862
4955
|
tabSmall,
|
|
@@ -4865,8 +4958,8 @@ function Tabs({
|
|
|
4865
4958
|
showContent = true,
|
|
4866
4959
|
...props
|
|
4867
4960
|
}) {
|
|
4868
|
-
return /* @__PURE__ */
|
|
4869
|
-
/* @__PURE__ */
|
|
4961
|
+
return /* @__PURE__ */ jsxs37(BaseTabs, { defaultValue: defaultActiveTab, className, ...props, children: [
|
|
4962
|
+
/* @__PURE__ */ jsx49(BaseTabsList, { children: tabs.map((tab) => /* @__PURE__ */ jsxs37(
|
|
4870
4963
|
BaseTabsTrigger,
|
|
4871
4964
|
{
|
|
4872
4965
|
tabSmall,
|
|
@@ -4874,22 +4967,22 @@ function Tabs({
|
|
|
4874
4967
|
className: "relative flex cursor-pointer items-center justify-center gap-x-2",
|
|
4875
4968
|
onClick: typeof tab === "object" && "onClick" in tab ? tab.onClick : void 0,
|
|
4876
4969
|
children: [
|
|
4877
|
-
tab.icon && /* @__PURE__ */
|
|
4970
|
+
tab.icon && /* @__PURE__ */ jsx49("div", { children: tab.icon }),
|
|
4878
4971
|
tab.label,
|
|
4879
|
-
tab.notification && /* @__PURE__ */
|
|
4880
|
-
!!tab.count && /* @__PURE__ */
|
|
4972
|
+
tab.notification && /* @__PURE__ */ jsx49("div", { className: "bg-icon-destructive absolute top-1 right-1 size-1.5 rounded-full" }),
|
|
4973
|
+
!!tab.count && /* @__PURE__ */ jsx49(Badge, { type: "primary-soft", children: tab.count })
|
|
4881
4974
|
]
|
|
4882
4975
|
},
|
|
4883
4976
|
tab.value
|
|
4884
4977
|
)) }),
|
|
4885
|
-
showContent && "content" in tabs[0] && tabs.map((tab) => /* @__PURE__ */
|
|
4978
|
+
showContent && "content" in tabs[0] && tabs.map((tab) => /* @__PURE__ */ jsx49(BaseTabsContent, { value: tab.value, children: tab.content }, tab.value))
|
|
4886
4979
|
] });
|
|
4887
4980
|
}
|
|
4888
4981
|
function BaseTabs({
|
|
4889
4982
|
className,
|
|
4890
4983
|
...props
|
|
4891
4984
|
}) {
|
|
4892
|
-
return /* @__PURE__ */
|
|
4985
|
+
return /* @__PURE__ */ jsx49(
|
|
4893
4986
|
TabsPrimitive.Root,
|
|
4894
4987
|
{
|
|
4895
4988
|
"data-slot": "tabs",
|
|
@@ -4902,7 +4995,7 @@ function BaseTabsList({
|
|
|
4902
4995
|
className,
|
|
4903
4996
|
...props
|
|
4904
4997
|
}) {
|
|
4905
|
-
return /* @__PURE__ */
|
|
4998
|
+
return /* @__PURE__ */ jsx49(
|
|
4906
4999
|
TabsPrimitive.List,
|
|
4907
5000
|
{
|
|
4908
5001
|
"data-slot": "tabs-list",
|
|
@@ -4919,7 +5012,7 @@ function BaseTabsTrigger({
|
|
|
4919
5012
|
tabSmall,
|
|
4920
5013
|
...props
|
|
4921
5014
|
}) {
|
|
4922
|
-
return /* @__PURE__ */
|
|
5015
|
+
return /* @__PURE__ */ jsx49(
|
|
4923
5016
|
TabsPrimitive.Trigger,
|
|
4924
5017
|
{
|
|
4925
5018
|
"data-slot": "tabs-trigger",
|
|
@@ -4936,7 +5029,7 @@ function BaseTabsContent({
|
|
|
4936
5029
|
className,
|
|
4937
5030
|
...props
|
|
4938
5031
|
}) {
|
|
4939
|
-
return /* @__PURE__ */
|
|
5032
|
+
return /* @__PURE__ */ jsx49(
|
|
4940
5033
|
TabsPrimitive.Content,
|
|
4941
5034
|
{
|
|
4942
5035
|
"data-slot": "tabs-content",
|
|
@@ -4948,7 +5041,7 @@ function BaseTabsContent({
|
|
|
4948
5041
|
|
|
4949
5042
|
// src/ui/Tag/index.tsx
|
|
4950
5043
|
import { cva as cva12 } from "class-variance-authority";
|
|
4951
|
-
import { jsx as
|
|
5044
|
+
import { jsx as jsx50 } from "react/jsx-runtime";
|
|
4952
5045
|
var tagVariants = cva12("px-1 rounded-sm", {
|
|
4953
5046
|
variants: {
|
|
4954
5047
|
variant: {
|
|
@@ -4966,14 +5059,14 @@ function Tag({
|
|
|
4966
5059
|
variant,
|
|
4967
5060
|
className
|
|
4968
5061
|
}) {
|
|
4969
|
-
return /* @__PURE__ */
|
|
5062
|
+
return /* @__PURE__ */ jsx50("div", { "data-slot": "tag", className: cn(tagVariants({ variant }), className), children: /* @__PURE__ */ jsx50("span", { className: "text-caption font-semibold text-white", children: label }) });
|
|
4970
5063
|
}
|
|
4971
5064
|
|
|
4972
5065
|
// src/ui/TextAreaInput/index.tsx
|
|
4973
5066
|
import * as React17 from "react";
|
|
4974
|
-
import { jsx as
|
|
5067
|
+
import { jsx as jsx51 } from "react/jsx-runtime";
|
|
4975
5068
|
var TextareaInput = React17.forwardRef(({ className, label, ...props }, ref) => {
|
|
4976
|
-
return /* @__PURE__ */
|
|
5069
|
+
return /* @__PURE__ */ jsx51(
|
|
4977
5070
|
"textarea",
|
|
4978
5071
|
{
|
|
4979
5072
|
ref,
|
|
@@ -4993,8 +5086,8 @@ var TextAreaInput_default = TextareaInput;
|
|
|
4993
5086
|
|
|
4994
5087
|
// src/ui/TimePicker/index.tsx
|
|
4995
5088
|
import { Clock } from "lucide-react";
|
|
4996
|
-
import { useState as
|
|
4997
|
-
import { jsx as
|
|
5089
|
+
import { useState as useState13 } from "react";
|
|
5090
|
+
import { jsx as jsx52, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
4998
5091
|
function TimePicker({
|
|
4999
5092
|
label,
|
|
5000
5093
|
onValueChange,
|
|
@@ -5003,7 +5096,7 @@ function TimePicker({
|
|
|
5003
5096
|
value,
|
|
5004
5097
|
...props
|
|
5005
5098
|
}) {
|
|
5006
|
-
const [isOpen, setIsOpen] =
|
|
5099
|
+
const [isOpen, setIsOpen] = useState13(false);
|
|
5007
5100
|
const currentValue = value || defaultValue || "";
|
|
5008
5101
|
const formatTimeForDisplay = (timeValue) => {
|
|
5009
5102
|
if (!timeValue) return "";
|
|
@@ -5015,10 +5108,10 @@ function TimePicker({
|
|
|
5015
5108
|
const handleChange = (value2) => {
|
|
5016
5109
|
onValueChange?.(value2);
|
|
5017
5110
|
};
|
|
5018
|
-
return /* @__PURE__ */
|
|
5019
|
-
label && /* @__PURE__ */
|
|
5020
|
-
/* @__PURE__ */
|
|
5021
|
-
/* @__PURE__ */
|
|
5111
|
+
return /* @__PURE__ */ jsxs38("div", { className: "flex flex-col gap-3", children: [
|
|
5112
|
+
label && /* @__PURE__ */ jsx52(Label2, { htmlFor: "time-picker", className: "px-1", children: "Time" }),
|
|
5113
|
+
/* @__PURE__ */ jsxs38(DropdownMenu, { open: isOpen, onOpenChange: setIsOpen, children: [
|
|
5114
|
+
/* @__PURE__ */ jsx52(DropdownMenuTrigger, { className: "!p-0", children: /* @__PURE__ */ jsx52(
|
|
5022
5115
|
Input,
|
|
5023
5116
|
{
|
|
5024
5117
|
...props,
|
|
@@ -5026,17 +5119,17 @@ function TimePicker({
|
|
|
5026
5119
|
value: currentValue ? formatTimeForDisplay(currentValue) : "",
|
|
5027
5120
|
onKeyDown: (e) => e.preventDefault(),
|
|
5028
5121
|
prefixNode: {
|
|
5029
|
-
node: /* @__PURE__ */
|
|
5122
|
+
node: /* @__PURE__ */ jsx52(Clock, { className: "pointer-events-none h-5 w-5 text-gray-700" }),
|
|
5030
5123
|
withBorder: false
|
|
5031
5124
|
}
|
|
5032
5125
|
}
|
|
5033
5126
|
) }),
|
|
5034
|
-
/* @__PURE__ */
|
|
5127
|
+
/* @__PURE__ */ jsx52(
|
|
5035
5128
|
DropdownMenuContent,
|
|
5036
5129
|
{
|
|
5037
5130
|
align: "start",
|
|
5038
5131
|
className: "max-h-60 min-w-41 overflow-y-auto",
|
|
5039
|
-
children: timeOptions?.map((item) => /* @__PURE__ */
|
|
5132
|
+
children: timeOptions?.map((item) => /* @__PURE__ */ jsx52(
|
|
5040
5133
|
DropdownMenuItem,
|
|
5041
5134
|
{
|
|
5042
5135
|
className: cn(
|
|
@@ -5057,11 +5150,11 @@ function TimePicker({
|
|
|
5057
5150
|
// src/ui/Title/index.tsx
|
|
5058
5151
|
import { Slot as Slot6 } from "@radix-ui/react-slot";
|
|
5059
5152
|
import * as React18 from "react";
|
|
5060
|
-
import { jsx as
|
|
5153
|
+
import { jsx as jsx53 } from "react/jsx-runtime";
|
|
5061
5154
|
var Title2 = React18.forwardRef(
|
|
5062
5155
|
({ className, asChild = false, ...props }, ref) => {
|
|
5063
5156
|
const Comp = asChild ? Slot6 : "h2";
|
|
5064
|
-
return /* @__PURE__ */
|
|
5157
|
+
return /* @__PURE__ */ jsx53(
|
|
5065
5158
|
Comp,
|
|
5066
5159
|
{
|
|
5067
5160
|
ref,
|
|
@@ -5080,7 +5173,7 @@ var Title_default = Title2;
|
|
|
5080
5173
|
// src/ui/Toggle/index.tsx
|
|
5081
5174
|
import * as TogglePrimitive from "@radix-ui/react-toggle";
|
|
5082
5175
|
import { cva as cva13 } from "class-variance-authority";
|
|
5083
|
-
import { jsx as
|
|
5176
|
+
import { jsx as jsx54 } from "react/jsx-runtime";
|
|
5084
5177
|
var toggleVariants = cva13(
|
|
5085
5178
|
"inline-flex items-center justify-center gap-2 text-sm font-medium disabled:pointer-events-none disabled:text-icon-inactive data-[state=on]:disabled:text-icon-inactive data-[state=on]:disabled:bg-toggle-bg-inactiveDefault data-[state=on]:bg-toggle-bg-activeDefault data-[state=on]:hover:bg-toggle-bg-activeHover data-[state=on]:text-icon-white hover:bg-toggle-bg-inactiveHover hover:text-icon-default [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap cursor-pointer",
|
|
5086
5179
|
{
|
|
@@ -5115,7 +5208,7 @@ function Toggle({
|
|
|
5115
5208
|
size,
|
|
5116
5209
|
...props
|
|
5117
5210
|
}) {
|
|
5118
|
-
return /* @__PURE__ */
|
|
5211
|
+
return /* @__PURE__ */ jsx54(
|
|
5119
5212
|
TogglePrimitive.Root,
|
|
5120
5213
|
{
|
|
5121
5214
|
"data-slot": "toggle",
|
|
@@ -5132,7 +5225,7 @@ import { useRef as useRef10 } from "react";
|
|
|
5132
5225
|
// src/ui/ToggleDropdownButton/ToggleDropdownLeftButton.tsx
|
|
5133
5226
|
import { cva as cva14 } from "class-variance-authority";
|
|
5134
5227
|
import * as React19 from "react";
|
|
5135
|
-
import { jsx as
|
|
5228
|
+
import { jsx as jsx55 } from "react/jsx-runtime";
|
|
5136
5229
|
var toggleDropdownLeftButtonVariants = cva14(
|
|
5137
5230
|
"flex items-center justify-center cursor-pointer transition-all",
|
|
5138
5231
|
{
|
|
@@ -5228,7 +5321,7 @@ function ToggleDropdownLeftButton({
|
|
|
5228
5321
|
}) {
|
|
5229
5322
|
const iconClass = selected ? "text-element-static-white fill-element-static-white" : "text-element-inverse-default fill-element-inverse-default";
|
|
5230
5323
|
const isIcon = React19.isValidElement(children);
|
|
5231
|
-
return type === "text" ? /* @__PURE__ */
|
|
5324
|
+
return type === "text" ? /* @__PURE__ */ jsx55(
|
|
5232
5325
|
"button",
|
|
5233
5326
|
{
|
|
5234
5327
|
type: "button",
|
|
@@ -5237,7 +5330,7 @@ function ToggleDropdownLeftButton({
|
|
|
5237
5330
|
className
|
|
5238
5331
|
),
|
|
5239
5332
|
...props,
|
|
5240
|
-
children: isIcon ? /* @__PURE__ */
|
|
5333
|
+
children: isIcon ? /* @__PURE__ */ jsx55(
|
|
5241
5334
|
IconContainer,
|
|
5242
5335
|
{
|
|
5243
5336
|
colorInFill: false,
|
|
@@ -5250,7 +5343,7 @@ function ToggleDropdownLeftButton({
|
|
|
5250
5343
|
}
|
|
5251
5344
|
) : children
|
|
5252
5345
|
}
|
|
5253
|
-
) : /* @__PURE__ */
|
|
5346
|
+
) : /* @__PURE__ */ jsx55(
|
|
5254
5347
|
"button",
|
|
5255
5348
|
{
|
|
5256
5349
|
type: "button",
|
|
@@ -5259,7 +5352,7 @@ function ToggleDropdownLeftButton({
|
|
|
5259
5352
|
className
|
|
5260
5353
|
),
|
|
5261
5354
|
...props,
|
|
5262
|
-
children: /* @__PURE__ */
|
|
5355
|
+
children: /* @__PURE__ */ jsx55(
|
|
5263
5356
|
IconContainer,
|
|
5264
5357
|
{
|
|
5265
5358
|
colorInFill: false,
|
|
@@ -5278,7 +5371,7 @@ function ToggleDropdownLeftButton({
|
|
|
5278
5371
|
// src/ui/ToggleDropdownButton/ToggleDropdownRightButton.tsx
|
|
5279
5372
|
import { cva as cva15 } from "class-variance-authority";
|
|
5280
5373
|
import * as React20 from "react";
|
|
5281
|
-
import { jsx as
|
|
5374
|
+
import { jsx as jsx56 } from "react/jsx-runtime";
|
|
5282
5375
|
var toggleDropdownRightButtonVariants = cva15(
|
|
5283
5376
|
"flex items-center justify-center group cursor-pointer transition-all",
|
|
5284
5377
|
{
|
|
@@ -5374,7 +5467,7 @@ function ToggleDropdownRightButton({
|
|
|
5374
5467
|
}) {
|
|
5375
5468
|
const iconClass = selected ? "text-element-static-white fill-element-static-white" : "text-element-inverse-default fill-element-inverse-default";
|
|
5376
5469
|
const isIcon = React20.isValidElement(children);
|
|
5377
|
-
return type === "text" ? /* @__PURE__ */
|
|
5470
|
+
return type === "text" ? /* @__PURE__ */ jsx56(
|
|
5378
5471
|
"button",
|
|
5379
5472
|
{
|
|
5380
5473
|
type: "button",
|
|
@@ -5383,7 +5476,7 @@ function ToggleDropdownRightButton({
|
|
|
5383
5476
|
className
|
|
5384
5477
|
),
|
|
5385
5478
|
...props,
|
|
5386
|
-
children: isIcon ? /* @__PURE__ */
|
|
5479
|
+
children: isIcon ? /* @__PURE__ */ jsx56(
|
|
5387
5480
|
IconContainer,
|
|
5388
5481
|
{
|
|
5389
5482
|
colorInFill: false,
|
|
@@ -5396,7 +5489,7 @@ function ToggleDropdownRightButton({
|
|
|
5396
5489
|
}
|
|
5397
5490
|
) : children
|
|
5398
5491
|
}
|
|
5399
|
-
) : /* @__PURE__ */
|
|
5492
|
+
) : /* @__PURE__ */ jsx56(
|
|
5400
5493
|
"button",
|
|
5401
5494
|
{
|
|
5402
5495
|
type: "button",
|
|
@@ -5405,7 +5498,7 @@ function ToggleDropdownRightButton({
|
|
|
5405
5498
|
className
|
|
5406
5499
|
),
|
|
5407
5500
|
...props,
|
|
5408
|
-
children: /* @__PURE__ */
|
|
5501
|
+
children: /* @__PURE__ */ jsx56(
|
|
5409
5502
|
IconContainer,
|
|
5410
5503
|
{
|
|
5411
5504
|
colorInFill: false,
|
|
@@ -5422,10 +5515,10 @@ function ToggleDropdownRightButton({
|
|
|
5422
5515
|
}
|
|
5423
5516
|
|
|
5424
5517
|
// src/ui/ToggleDropdownButton/useToggleDropdown.ts
|
|
5425
|
-
import { useState as
|
|
5518
|
+
import { useState as useState14, useCallback as useCallback5 } from "react";
|
|
5426
5519
|
|
|
5427
5520
|
// src/ui/ToggleDropdownButton/index.tsx
|
|
5428
|
-
import { jsx as
|
|
5521
|
+
import { jsx as jsx57, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
5429
5522
|
var ToggleDropdownButton = ({
|
|
5430
5523
|
type,
|
|
5431
5524
|
selected,
|
|
@@ -5443,8 +5536,8 @@ var ToggleDropdownButton = ({
|
|
|
5443
5536
|
const handleLeftButtonClick = () => {
|
|
5444
5537
|
onLeftButtonClick?.();
|
|
5445
5538
|
};
|
|
5446
|
-
return /* @__PURE__ */
|
|
5447
|
-
/* @__PURE__ */
|
|
5539
|
+
return /* @__PURE__ */ jsxs39("div", { className: "gap-x-unit-1px flex items-center", children: [
|
|
5540
|
+
/* @__PURE__ */ jsx57(
|
|
5448
5541
|
ToggleDropdownLeftButton,
|
|
5449
5542
|
{
|
|
5450
5543
|
selected,
|
|
@@ -5455,8 +5548,8 @@ var ToggleDropdownButton = ({
|
|
|
5455
5548
|
children: leftButtonChildren
|
|
5456
5549
|
}
|
|
5457
5550
|
),
|
|
5458
|
-
/* @__PURE__ */
|
|
5459
|
-
/* @__PURE__ */
|
|
5551
|
+
/* @__PURE__ */ jsxs39("div", { className: "relative", children: [
|
|
5552
|
+
/* @__PURE__ */ jsx57(
|
|
5460
5553
|
ToggleDropdownRightButton,
|
|
5461
5554
|
{
|
|
5462
5555
|
ref: rightButtonRef,
|
|
@@ -5476,8 +5569,8 @@ var ToggleDropdownButton_default = ToggleDropdownButton;
|
|
|
5476
5569
|
|
|
5477
5570
|
// src/ui/ToolToggle/index.tsx
|
|
5478
5571
|
import { ChevronDown as ChevronDown3 } from "lucide-react";
|
|
5479
|
-
import { useState as
|
|
5480
|
-
import { jsx as
|
|
5572
|
+
import { useState as useState15 } from "react";
|
|
5573
|
+
import { jsx as jsx58, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
5481
5574
|
var ToolToggle = ({
|
|
5482
5575
|
dropdown,
|
|
5483
5576
|
dropdownContent,
|
|
@@ -5485,41 +5578,41 @@ var ToolToggle = ({
|
|
|
5485
5578
|
className,
|
|
5486
5579
|
onClick
|
|
5487
5580
|
}) => {
|
|
5488
|
-
const [active, setActive] =
|
|
5581
|
+
const [active, setActive] = useState15(false);
|
|
5489
5582
|
const handleClick = () => {
|
|
5490
5583
|
setActive(!active);
|
|
5491
5584
|
onClick?.(active);
|
|
5492
5585
|
};
|
|
5493
|
-
return /* @__PURE__ */
|
|
5494
|
-
/* @__PURE__ */
|
|
5586
|
+
return /* @__PURE__ */ jsx58("div", { className: cn(dropdown ? "min-w-20" : "min-w-[52px]", className), children: /* @__PURE__ */ jsxs40(DropdownMenu, { children: [
|
|
5587
|
+
/* @__PURE__ */ jsx58(
|
|
5495
5588
|
DropdownMenuTrigger,
|
|
5496
5589
|
{
|
|
5497
5590
|
className: cn(
|
|
5498
5591
|
"border-border-primary-light !bg-toggle-bg-inactiveDefault hover:!bg-toggle-bg-inactiveHover flex h-full w-full items-center justify-center gap-x-2 !rounded-full border p-4 transition-all",
|
|
5499
5592
|
active && "!bg-toggle-bg-activeDefault hover:!bg-toggle-bg-activeHover"
|
|
5500
5593
|
),
|
|
5501
|
-
children: /* @__PURE__ */
|
|
5594
|
+
children: /* @__PURE__ */ jsxs40(
|
|
5502
5595
|
"div",
|
|
5503
5596
|
{
|
|
5504
5597
|
className: "flex items-center justify-center gap-x-2",
|
|
5505
5598
|
onClick: handleClick,
|
|
5506
5599
|
children: [
|
|
5507
5600
|
icon,
|
|
5508
|
-
dropdown && /* @__PURE__ */
|
|
5601
|
+
dropdown && /* @__PURE__ */ jsx58(ChevronDown3, { className: "text-icon-default size-5" })
|
|
5509
5602
|
]
|
|
5510
5603
|
}
|
|
5511
5604
|
)
|
|
5512
5605
|
}
|
|
5513
5606
|
),
|
|
5514
|
-
dropdown && /* @__PURE__ */
|
|
5607
|
+
dropdown && /* @__PURE__ */ jsx58(DropdownMenuContent, { align: "start", className: "min-w-41", children: dropdownContent })
|
|
5515
5608
|
] }) });
|
|
5516
5609
|
};
|
|
5517
5610
|
|
|
5518
5611
|
// src/ui/WrapperCard/index.tsx
|
|
5519
|
-
import { jsx as
|
|
5612
|
+
import { jsx as jsx59 } from "react/jsx-runtime";
|
|
5520
5613
|
var WrapperCard = (props) => {
|
|
5521
5614
|
const { children, className } = props;
|
|
5522
|
-
return /* @__PURE__ */
|
|
5615
|
+
return /* @__PURE__ */ jsx59(
|
|
5523
5616
|
"div",
|
|
5524
5617
|
{
|
|
5525
5618
|
className: cn(
|
|
@@ -5540,7 +5633,7 @@ import {
|
|
|
5540
5633
|
useFormContext,
|
|
5541
5634
|
useFormState
|
|
5542
5635
|
} from "react-hook-form";
|
|
5543
|
-
import { jsx as
|
|
5636
|
+
import { jsx as jsx60 } from "react/jsx-runtime";
|
|
5544
5637
|
var BaseForm = FormProvider;
|
|
5545
5638
|
var FormFieldContext = React21.createContext(
|
|
5546
5639
|
{}
|
|
@@ -5548,7 +5641,7 @@ var FormFieldContext = React21.createContext(
|
|
|
5548
5641
|
var BaseFormField = ({
|
|
5549
5642
|
...props
|
|
5550
5643
|
}) => {
|
|
5551
|
-
return /* @__PURE__ */
|
|
5644
|
+
return /* @__PURE__ */ jsx60(FormFieldContext.Provider, { value: { name: props.name }, children: /* @__PURE__ */ jsx60(Controller, { ...props }) });
|
|
5552
5645
|
};
|
|
5553
5646
|
var useFormField = () => {
|
|
5554
5647
|
const fieldContext = React21.useContext(FormFieldContext);
|
|
@@ -5574,7 +5667,7 @@ var FormItemContext = React21.createContext(
|
|
|
5574
5667
|
);
|
|
5575
5668
|
function BaseFormItem({ className, ...props }) {
|
|
5576
5669
|
const id = React21.useId();
|
|
5577
|
-
return /* @__PURE__ */
|
|
5670
|
+
return /* @__PURE__ */ jsx60(FormItemContext.Provider, { value: { id }, children: /* @__PURE__ */ jsx60(
|
|
5578
5671
|
"div",
|
|
5579
5672
|
{
|
|
5580
5673
|
"data-slot": "form-item",
|
|
@@ -5588,7 +5681,7 @@ function BaseFormLabel({
|
|
|
5588
5681
|
...props
|
|
5589
5682
|
}) {
|
|
5590
5683
|
const { error, formItemId } = useFormField();
|
|
5591
|
-
return /* @__PURE__ */
|
|
5684
|
+
return /* @__PURE__ */ jsx60(
|
|
5592
5685
|
Label2,
|
|
5593
5686
|
{
|
|
5594
5687
|
"data-slot": "form-label",
|
|
@@ -5604,7 +5697,7 @@ function BaseFormLabel({
|
|
|
5604
5697
|
}
|
|
5605
5698
|
function BaseFormControl({ ...props }) {
|
|
5606
5699
|
const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
|
|
5607
|
-
return /* @__PURE__ */
|
|
5700
|
+
return /* @__PURE__ */ jsx60(
|
|
5608
5701
|
Slot7,
|
|
5609
5702
|
{
|
|
5610
5703
|
"data-slot": "form-control",
|
|
@@ -5620,7 +5713,7 @@ function BaseFormDescription({
|
|
|
5620
5713
|
...props
|
|
5621
5714
|
}) {
|
|
5622
5715
|
const { formDescriptionId } = useFormField();
|
|
5623
|
-
return /* @__PURE__ */
|
|
5716
|
+
return /* @__PURE__ */ jsx60(
|
|
5624
5717
|
"p",
|
|
5625
5718
|
{
|
|
5626
5719
|
"data-slot": "form-description",
|
|
@@ -5636,7 +5729,7 @@ function BaseFormMessage({ className, ...props }) {
|
|
|
5636
5729
|
if (!body) {
|
|
5637
5730
|
return null;
|
|
5638
5731
|
}
|
|
5639
|
-
return /* @__PURE__ */
|
|
5732
|
+
return /* @__PURE__ */ jsx60(
|
|
5640
5733
|
"p",
|
|
5641
5734
|
{
|
|
5642
5735
|
"data-slot": "form-message",
|
|
@@ -5650,7 +5743,7 @@ function BaseFormMessage({ className, ...props }) {
|
|
|
5650
5743
|
|
|
5651
5744
|
// src/ui/form/FormField.tsx
|
|
5652
5745
|
import * as React22 from "react";
|
|
5653
|
-
import { jsx as
|
|
5746
|
+
import { jsx as jsx61, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
5654
5747
|
var FormField = ({
|
|
5655
5748
|
control,
|
|
5656
5749
|
field,
|
|
@@ -5658,18 +5751,18 @@ var FormField = ({
|
|
|
5658
5751
|
onBlur,
|
|
5659
5752
|
className
|
|
5660
5753
|
}) => {
|
|
5661
|
-
return /* @__PURE__ */
|
|
5754
|
+
return /* @__PURE__ */ jsx61(
|
|
5662
5755
|
BaseFormField,
|
|
5663
5756
|
{
|
|
5664
5757
|
control,
|
|
5665
5758
|
name: field.name,
|
|
5666
|
-
render: ({ field: formField }) => /* @__PURE__ */
|
|
5667
|
-
field.label && /* @__PURE__ */
|
|
5759
|
+
render: ({ field: formField }) => /* @__PURE__ */ jsxs41(BaseFormItem, { className: cn("w-full", className), children: [
|
|
5760
|
+
field.label && /* @__PURE__ */ jsxs41(BaseFormLabel, { className: "gap-1", children: [
|
|
5668
5761
|
field.label,
|
|
5669
|
-
field.required && /* @__PURE__ */
|
|
5670
|
-
field.optional && /* @__PURE__ */
|
|
5762
|
+
field.required && /* @__PURE__ */ jsx61("span", { className: "text-element-inverse-red", children: "*" }),
|
|
5763
|
+
field.optional && /* @__PURE__ */ jsx61("span", { className: "text-title-sm!", children: "(Optional)" })
|
|
5671
5764
|
] }),
|
|
5672
|
-
/* @__PURE__ */
|
|
5765
|
+
/* @__PURE__ */ jsx61(BaseFormControl, { children: React22.isValidElement(field.render) ? React22.cloneElement(
|
|
5673
5766
|
field.render,
|
|
5674
5767
|
{
|
|
5675
5768
|
...formField,
|
|
@@ -5679,7 +5772,7 @@ var FormField = ({
|
|
|
5679
5772
|
}
|
|
5680
5773
|
}
|
|
5681
5774
|
) : field.render }),
|
|
5682
|
-
isShowError && /* @__PURE__ */
|
|
5775
|
+
isShowError && /* @__PURE__ */ jsx61(BaseFormMessage, {})
|
|
5683
5776
|
] })
|
|
5684
5777
|
},
|
|
5685
5778
|
field.name
|
|
@@ -5692,7 +5785,7 @@ import {
|
|
|
5692
5785
|
Controller as Controller2,
|
|
5693
5786
|
useFormContext as useFormContext2
|
|
5694
5787
|
} from "react-hook-form";
|
|
5695
|
-
import { jsx as
|
|
5788
|
+
import { jsx as jsx62, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
5696
5789
|
var FormMethodsContext = createContext4(
|
|
5697
5790
|
null
|
|
5698
5791
|
);
|
|
@@ -5703,11 +5796,11 @@ function Form({
|
|
|
5703
5796
|
className,
|
|
5704
5797
|
children
|
|
5705
5798
|
}) {
|
|
5706
|
-
return /* @__PURE__ */
|
|
5799
|
+
return /* @__PURE__ */ jsx62(
|
|
5707
5800
|
FormMethodsContext.Provider,
|
|
5708
5801
|
{
|
|
5709
5802
|
value: formMethods,
|
|
5710
|
-
children: /* @__PURE__ */
|
|
5803
|
+
children: /* @__PURE__ */ jsx62(BaseForm, { ...formMethods, children: /* @__PURE__ */ jsx62(
|
|
5711
5804
|
"form",
|
|
5712
5805
|
{
|
|
5713
5806
|
id,
|
|
@@ -5728,7 +5821,7 @@ Form.InputField = function InputField({
|
|
|
5728
5821
|
...props
|
|
5729
5822
|
}) {
|
|
5730
5823
|
const { control } = useFormContext2();
|
|
5731
|
-
return /* @__PURE__ */
|
|
5824
|
+
return /* @__PURE__ */ jsx62(
|
|
5732
5825
|
FormField,
|
|
5733
5826
|
{
|
|
5734
5827
|
className: "w-full",
|
|
@@ -5739,7 +5832,7 @@ Form.InputField = function InputField({
|
|
|
5739
5832
|
name,
|
|
5740
5833
|
label,
|
|
5741
5834
|
required,
|
|
5742
|
-
render: /* @__PURE__ */
|
|
5835
|
+
render: /* @__PURE__ */ jsx62(Input, { ...props, inputClassName: props.inputClassName })
|
|
5743
5836
|
}
|
|
5744
5837
|
}
|
|
5745
5838
|
);
|
|
@@ -5750,7 +5843,7 @@ Form.PasswordField = function PasswordField({
|
|
|
5750
5843
|
...props
|
|
5751
5844
|
}) {
|
|
5752
5845
|
const { control } = useFormContext2();
|
|
5753
|
-
return /* @__PURE__ */
|
|
5846
|
+
return /* @__PURE__ */ jsx62(
|
|
5754
5847
|
FormField,
|
|
5755
5848
|
{
|
|
5756
5849
|
className: "w-full",
|
|
@@ -5758,7 +5851,7 @@ Form.PasswordField = function PasswordField({
|
|
|
5758
5851
|
field: {
|
|
5759
5852
|
name,
|
|
5760
5853
|
label,
|
|
5761
|
-
render: /* @__PURE__ */
|
|
5854
|
+
render: /* @__PURE__ */ jsx62(PasswordInput, { ...props })
|
|
5762
5855
|
}
|
|
5763
5856
|
}
|
|
5764
5857
|
);
|
|
@@ -5770,7 +5863,7 @@ Form.SelectInputField = function SelectInputField({
|
|
|
5770
5863
|
...props
|
|
5771
5864
|
}) {
|
|
5772
5865
|
const { control } = useFormContext2();
|
|
5773
|
-
return /* @__PURE__ */
|
|
5866
|
+
return /* @__PURE__ */ jsx62(
|
|
5774
5867
|
FormField,
|
|
5775
5868
|
{
|
|
5776
5869
|
control,
|
|
@@ -5778,7 +5871,7 @@ Form.SelectInputField = function SelectInputField({
|
|
|
5778
5871
|
name,
|
|
5779
5872
|
required,
|
|
5780
5873
|
label,
|
|
5781
|
-
render: /* @__PURE__ */
|
|
5874
|
+
render: /* @__PURE__ */ jsx62(SelectInput, { ...props })
|
|
5782
5875
|
}
|
|
5783
5876
|
}
|
|
5784
5877
|
);
|
|
@@ -5790,14 +5883,14 @@ Form.MultiSelectField = function MultiSelectField({
|
|
|
5790
5883
|
}) {
|
|
5791
5884
|
const { control, watch, setValue } = useFormContext2();
|
|
5792
5885
|
const selectedValues = watch(name) || [];
|
|
5793
|
-
return /* @__PURE__ */
|
|
5886
|
+
return /* @__PURE__ */ jsx62(
|
|
5794
5887
|
FormField,
|
|
5795
5888
|
{
|
|
5796
5889
|
control,
|
|
5797
5890
|
field: {
|
|
5798
5891
|
name,
|
|
5799
5892
|
label,
|
|
5800
|
-
render: /* @__PURE__ */
|
|
5893
|
+
render: /* @__PURE__ */ jsx62(
|
|
5801
5894
|
MultiSelect,
|
|
5802
5895
|
{
|
|
5803
5896
|
...props,
|
|
@@ -5816,7 +5909,7 @@ Form.TextareaField = function TextareaField({
|
|
|
5816
5909
|
...props
|
|
5817
5910
|
}) {
|
|
5818
5911
|
const { control } = useFormContext2();
|
|
5819
|
-
return /* @__PURE__ */
|
|
5912
|
+
return /* @__PURE__ */ jsx62(
|
|
5820
5913
|
FormField,
|
|
5821
5914
|
{
|
|
5822
5915
|
control,
|
|
@@ -5824,7 +5917,7 @@ Form.TextareaField = function TextareaField({
|
|
|
5824
5917
|
name,
|
|
5825
5918
|
label,
|
|
5826
5919
|
optional,
|
|
5827
|
-
render: /* @__PURE__ */
|
|
5920
|
+
render: /* @__PURE__ */ jsx62(TextAreaInput_default, { ...props })
|
|
5828
5921
|
}
|
|
5829
5922
|
}
|
|
5830
5923
|
);
|
|
@@ -5842,14 +5935,14 @@ Form.FileUploadField = function FileUploadFieldComponent({
|
|
|
5842
5935
|
const { control, formState } = useFormContext2();
|
|
5843
5936
|
const fieldError = formState.errors[name];
|
|
5844
5937
|
const hasValidationError = !!fieldError;
|
|
5845
|
-
return /* @__PURE__ */
|
|
5938
|
+
return /* @__PURE__ */ jsx62(
|
|
5846
5939
|
Controller2,
|
|
5847
5940
|
{
|
|
5848
5941
|
control,
|
|
5849
5942
|
name,
|
|
5850
|
-
render: ({ field: formField }) => /* @__PURE__ */
|
|
5851
|
-
label && /* @__PURE__ */
|
|
5852
|
-
/* @__PURE__ */
|
|
5943
|
+
render: ({ field: formField }) => /* @__PURE__ */ jsxs42("div", { className: "space-y-1", children: [
|
|
5944
|
+
label && /* @__PURE__ */ jsx62("label", { htmlFor: name, className: "font-medium", children: label }),
|
|
5945
|
+
/* @__PURE__ */ jsx62(
|
|
5853
5946
|
FileUploadField,
|
|
5854
5947
|
{
|
|
5855
5948
|
field: { name, isMultiple, maxFiles, children },
|
|
@@ -5880,7 +5973,7 @@ Form.DateInputField = function DateInputField({
|
|
|
5880
5973
|
}) {
|
|
5881
5974
|
const { control, watch, setValue } = useFormContext2();
|
|
5882
5975
|
const value = watch(name);
|
|
5883
|
-
return /* @__PURE__ */
|
|
5976
|
+
return /* @__PURE__ */ jsx62(
|
|
5884
5977
|
FormField,
|
|
5885
5978
|
{
|
|
5886
5979
|
control,
|
|
@@ -5888,7 +5981,7 @@ Form.DateInputField = function DateInputField({
|
|
|
5888
5981
|
name,
|
|
5889
5982
|
label,
|
|
5890
5983
|
required,
|
|
5891
|
-
render: /* @__PURE__ */
|
|
5984
|
+
render: /* @__PURE__ */ jsx62(
|
|
5892
5985
|
DatePickerInput,
|
|
5893
5986
|
{
|
|
5894
5987
|
...props,
|
|
@@ -5907,14 +6000,14 @@ Form.TimeInputField = function TimeInputField({
|
|
|
5907
6000
|
...props
|
|
5908
6001
|
}) {
|
|
5909
6002
|
const { control, setValue } = useFormContext2();
|
|
5910
|
-
return /* @__PURE__ */
|
|
6003
|
+
return /* @__PURE__ */ jsx62(
|
|
5911
6004
|
FormField,
|
|
5912
6005
|
{
|
|
5913
6006
|
control,
|
|
5914
6007
|
field: {
|
|
5915
6008
|
name,
|
|
5916
6009
|
label,
|
|
5917
|
-
render: /* @__PURE__ */
|
|
6010
|
+
render: /* @__PURE__ */ jsx62(
|
|
5918
6011
|
TimePicker,
|
|
5919
6012
|
{
|
|
5920
6013
|
onValueChange: (value) => {
|
|
@@ -5933,13 +6026,13 @@ Form.CheckboxField = function CheckboxField({
|
|
|
5933
6026
|
...props
|
|
5934
6027
|
}) {
|
|
5935
6028
|
const { control } = useFormContext2();
|
|
5936
|
-
return /* @__PURE__ */
|
|
6029
|
+
return /* @__PURE__ */ jsx62(
|
|
5937
6030
|
FormField,
|
|
5938
6031
|
{
|
|
5939
6032
|
control,
|
|
5940
6033
|
field: {
|
|
5941
6034
|
name,
|
|
5942
|
-
render: /* @__PURE__ */
|
|
6035
|
+
render: /* @__PURE__ */ jsx62(Checkbox, { value: name, label, ...props })
|
|
5943
6036
|
}
|
|
5944
6037
|
}
|
|
5945
6038
|
);
|
|
@@ -5949,12 +6042,12 @@ Form.OTPInputField = function OTPInputField({
|
|
|
5949
6042
|
...props
|
|
5950
6043
|
}) {
|
|
5951
6044
|
const { control } = useFormContext2();
|
|
5952
|
-
return /* @__PURE__ */
|
|
6045
|
+
return /* @__PURE__ */ jsx62(
|
|
5953
6046
|
FormField,
|
|
5954
6047
|
{
|
|
5955
6048
|
className: "w-full",
|
|
5956
6049
|
control,
|
|
5957
|
-
field: { name, render: /* @__PURE__ */
|
|
6050
|
+
field: { name, render: /* @__PURE__ */ jsx62(OTPInput, { ...props }) }
|
|
5958
6051
|
}
|
|
5959
6052
|
);
|
|
5960
6053
|
};
|
|
@@ -5965,14 +6058,14 @@ Form.RadioField = function RadioField({
|
|
|
5965
6058
|
}) {
|
|
5966
6059
|
const { control } = useFormContext2();
|
|
5967
6060
|
const { setValue } = useFormContext2();
|
|
5968
|
-
return /* @__PURE__ */
|
|
6061
|
+
return /* @__PURE__ */ jsx62(
|
|
5969
6062
|
FormField,
|
|
5970
6063
|
{
|
|
5971
6064
|
control,
|
|
5972
6065
|
field: {
|
|
5973
6066
|
name,
|
|
5974
6067
|
label,
|
|
5975
|
-
render: /* @__PURE__ */
|
|
6068
|
+
render: /* @__PURE__ */ jsx62(
|
|
5976
6069
|
Radio,
|
|
5977
6070
|
{
|
|
5978
6071
|
...props,
|
|
@@ -5989,13 +6082,13 @@ Form.ComboboxField = function ComboboxField({
|
|
|
5989
6082
|
}) {
|
|
5990
6083
|
const { control, setValue, watch } = useFormContext2();
|
|
5991
6084
|
const value = watch(name);
|
|
5992
|
-
return /* @__PURE__ */
|
|
6085
|
+
return /* @__PURE__ */ jsx62(
|
|
5993
6086
|
FormField,
|
|
5994
6087
|
{
|
|
5995
6088
|
control,
|
|
5996
6089
|
field: {
|
|
5997
6090
|
name,
|
|
5998
|
-
render: /* @__PURE__ */
|
|
6091
|
+
render: /* @__PURE__ */ jsx62(
|
|
5999
6092
|
Combobox,
|
|
6000
6093
|
{
|
|
6001
6094
|
...props,
|
|
@@ -6017,7 +6110,7 @@ Form.SwitchField = function SwitchField({
|
|
|
6017
6110
|
}) {
|
|
6018
6111
|
const { control, setValue, watch } = useFormContext2();
|
|
6019
6112
|
const value = watch(name);
|
|
6020
|
-
return /* @__PURE__ */
|
|
6113
|
+
return /* @__PURE__ */ jsx62(
|
|
6021
6114
|
FormField,
|
|
6022
6115
|
{
|
|
6023
6116
|
control,
|
|
@@ -6025,9 +6118,9 @@ Form.SwitchField = function SwitchField({
|
|
|
6025
6118
|
field: {
|
|
6026
6119
|
name,
|
|
6027
6120
|
label,
|
|
6028
|
-
render: /* @__PURE__ */
|
|
6029
|
-
prefix && /* @__PURE__ */
|
|
6030
|
-
/* @__PURE__ */
|
|
6121
|
+
render: /* @__PURE__ */ jsxs42("div", { className: "flex items-center", children: [
|
|
6122
|
+
prefix && /* @__PURE__ */ jsx62("span", { className: "mr-2", children: prefix }),
|
|
6123
|
+
/* @__PURE__ */ jsx62(
|
|
6031
6124
|
Switch,
|
|
6032
6125
|
{
|
|
6033
6126
|
...props,
|
|
@@ -6035,7 +6128,7 @@ Form.SwitchField = function SwitchField({
|
|
|
6035
6128
|
onCheckedChange: (checked) => setValue(name, checked)
|
|
6036
6129
|
}
|
|
6037
6130
|
),
|
|
6038
|
-
suffix && /* @__PURE__ */
|
|
6131
|
+
suffix && /* @__PURE__ */ jsx62("span", { className: "ml-2", children: suffix })
|
|
6039
6132
|
] })
|
|
6040
6133
|
}
|
|
6041
6134
|
}
|
|
@@ -6089,6 +6182,7 @@ export {
|
|
|
6089
6182
|
FileUploadField,
|
|
6090
6183
|
Form,
|
|
6091
6184
|
FormField,
|
|
6185
|
+
GoogleMapView,
|
|
6092
6186
|
GradientContainer,
|
|
6093
6187
|
Grid,
|
|
6094
6188
|
IconButton,
|