@melv1c/ui-kit 1.0.1 → 1.2.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/chunk-5SGT7Y7J.js +172 -0
- package/dist/chunk-5SGT7Y7J.js.map +1 -0
- package/dist/chunk-RKE7ZPNV.cjs +180 -0
- package/dist/chunk-RKE7ZPNV.cjs.map +1 -0
- package/dist/code-editors/index.cjs +0 -43
- package/dist/code-editors/index.cjs.map +1 -1
- package/dist/code-editors/index.js +0 -43
- package/dist/code-editors/index.js.map +1 -1
- package/dist/index.cjs +426 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +63 -1
- package/dist/index.d.ts +63 -1
- package/dist/index.js +413 -2
- package/dist/index.js.map +1 -1
- package/dist/locales/index.cjs +7 -7
- package/dist/locales/index.d.cts +132 -6
- package/dist/locales/index.d.ts +132 -6
- package/dist/locales/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-4H5OSMBC.js +0 -52
- package/dist/chunk-4H5OSMBC.js.map +0 -1
- package/dist/chunk-QV4CTFLS.cjs +0 -60
- package/dist/chunk-QV4CTFLS.cjs.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var chunkQ4GFV3J3_cjs = require('./chunk-Q4GFV3J3.cjs');
|
|
4
4
|
var chunkGQ6Z5A4R_cjs = require('./chunk-GQ6Z5A4R.cjs');
|
|
5
5
|
var chunkI7WHASOO_cjs = require('./chunk-I7WHASOO.cjs');
|
|
6
|
-
var
|
|
6
|
+
var chunkRKE7ZPNV_cjs = require('./chunk-RKE7ZPNV.cjs');
|
|
7
7
|
require('./chunk-Q7SFCCGT.cjs');
|
|
8
8
|
var React9 = require('react');
|
|
9
9
|
var AccordionPrimitive = require('@radix-ui/react-accordion');
|
|
@@ -3808,6 +3808,417 @@ function Textarea({ className, ...props }) {
|
|
|
3808
3808
|
}
|
|
3809
3809
|
);
|
|
3810
3810
|
}
|
|
3811
|
+
var appleIconVariants = classVarianceAuthority.cva("shrink-0 transition-all", {
|
|
3812
|
+
variants: {
|
|
3813
|
+
variant: {
|
|
3814
|
+
default: "",
|
|
3815
|
+
light: "bg-white",
|
|
3816
|
+
dark: "bg-gray-900",
|
|
3817
|
+
transparent: "bg-transparent"
|
|
3818
|
+
},
|
|
3819
|
+
shape: {
|
|
3820
|
+
default: "rounded",
|
|
3821
|
+
square: "rounded-none",
|
|
3822
|
+
rounded: "rounded-full"
|
|
3823
|
+
},
|
|
3824
|
+
size: {
|
|
3825
|
+
sm: "size-6 p-1",
|
|
3826
|
+
default: "size-10 p-2",
|
|
3827
|
+
lg: "size-14 p-3",
|
|
3828
|
+
xl: "size-20 p-4"
|
|
3829
|
+
}
|
|
3830
|
+
},
|
|
3831
|
+
defaultVariants: {
|
|
3832
|
+
variant: "default",
|
|
3833
|
+
shape: "default",
|
|
3834
|
+
size: "default"
|
|
3835
|
+
}
|
|
3836
|
+
});
|
|
3837
|
+
function AppleIcon({
|
|
3838
|
+
className,
|
|
3839
|
+
variant = "default",
|
|
3840
|
+
shape = "default",
|
|
3841
|
+
size = "default",
|
|
3842
|
+
...props
|
|
3843
|
+
}) {
|
|
3844
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3845
|
+
"div",
|
|
3846
|
+
{
|
|
3847
|
+
className: chunkI7WHASOO_cjs.cn(appleIconVariants({ variant, shape, size, className })),
|
|
3848
|
+
...props,
|
|
3849
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3850
|
+
"svg",
|
|
3851
|
+
{
|
|
3852
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3853
|
+
viewBox: "0 0 24 24",
|
|
3854
|
+
className: "size-full",
|
|
3855
|
+
fill: "currentColor",
|
|
3856
|
+
"aria-label": "Apple",
|
|
3857
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12.152 6.896c-.948 0-2.415-1.078-3.96-1.04-2.04.027-3.91 1.183-4.961 3.014-2.117 3.675-.546 9.103 1.519 12.09 1.013 1.454 2.208 3.09 3.792 3.039 1.52-.065 2.09-.987 3.935-.987 1.831 0 2.35.987 3.96.948 1.637-.026 2.676-1.48 3.676-2.948 1.156-1.688 1.636-3.325 1.662-3.415-.039-.013-3.182-1.221-3.22-4.857-.026-3.04 2.48-4.494 2.597-4.559-1.429-2.09-3.623-2.324-4.39-2.376-2-.156-3.675 1.09-4.61 1.09zM15.53 3.83c.843-1.012 1.4-2.427 1.245-3.83-1.207.052-2.662.805-3.532 1.818-.78.896-1.454 2.338-1.273 3.714 1.338.104 2.715-.688 3.559-1.701" })
|
|
3858
|
+
}
|
|
3859
|
+
)
|
|
3860
|
+
}
|
|
3861
|
+
);
|
|
3862
|
+
}
|
|
3863
|
+
var facebookIconVariants = classVarianceAuthority.cva("shrink-0 transition-all", {
|
|
3864
|
+
variants: {
|
|
3865
|
+
variant: {
|
|
3866
|
+
default: "",
|
|
3867
|
+
light: "bg-white",
|
|
3868
|
+
dark: "bg-gray-900",
|
|
3869
|
+
transparent: "bg-transparent"
|
|
3870
|
+
},
|
|
3871
|
+
shape: {
|
|
3872
|
+
default: "rounded",
|
|
3873
|
+
square: "rounded-none",
|
|
3874
|
+
rounded: "rounded-full"
|
|
3875
|
+
},
|
|
3876
|
+
size: {
|
|
3877
|
+
sm: "size-6 p-1",
|
|
3878
|
+
default: "size-10 p-2",
|
|
3879
|
+
lg: "size-14 p-3",
|
|
3880
|
+
xl: "size-20 p-4"
|
|
3881
|
+
}
|
|
3882
|
+
},
|
|
3883
|
+
defaultVariants: {
|
|
3884
|
+
variant: "default",
|
|
3885
|
+
shape: "default",
|
|
3886
|
+
size: "default"
|
|
3887
|
+
}
|
|
3888
|
+
});
|
|
3889
|
+
function FacebookIcon({
|
|
3890
|
+
className,
|
|
3891
|
+
variant = "default",
|
|
3892
|
+
shape = "default",
|
|
3893
|
+
size = "default",
|
|
3894
|
+
...props
|
|
3895
|
+
}) {
|
|
3896
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3897
|
+
"div",
|
|
3898
|
+
{
|
|
3899
|
+
className: chunkI7WHASOO_cjs.cn(facebookIconVariants({ variant, shape, size, className })),
|
|
3900
|
+
...props,
|
|
3901
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3902
|
+
"svg",
|
|
3903
|
+
{
|
|
3904
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3905
|
+
viewBox: "0 0 24 24",
|
|
3906
|
+
className: "size-full",
|
|
3907
|
+
fill: "#1877F2",
|
|
3908
|
+
"aria-label": "Facebook",
|
|
3909
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z" })
|
|
3910
|
+
}
|
|
3911
|
+
)
|
|
3912
|
+
}
|
|
3913
|
+
);
|
|
3914
|
+
}
|
|
3915
|
+
var githubIconVariants = classVarianceAuthority.cva("shrink-0 transition-all", {
|
|
3916
|
+
variants: {
|
|
3917
|
+
variant: {
|
|
3918
|
+
default: "",
|
|
3919
|
+
light: "bg-white",
|
|
3920
|
+
dark: "bg-gray-900",
|
|
3921
|
+
transparent: "bg-transparent"
|
|
3922
|
+
},
|
|
3923
|
+
shape: {
|
|
3924
|
+
default: "rounded",
|
|
3925
|
+
square: "rounded-none",
|
|
3926
|
+
rounded: "rounded-full"
|
|
3927
|
+
},
|
|
3928
|
+
size: {
|
|
3929
|
+
sm: "size-6 p-1",
|
|
3930
|
+
default: "size-10 p-2",
|
|
3931
|
+
lg: "size-14 p-3",
|
|
3932
|
+
xl: "size-20 p-4"
|
|
3933
|
+
}
|
|
3934
|
+
},
|
|
3935
|
+
defaultVariants: {
|
|
3936
|
+
variant: "default",
|
|
3937
|
+
shape: "default",
|
|
3938
|
+
size: "default"
|
|
3939
|
+
}
|
|
3940
|
+
});
|
|
3941
|
+
function GithubIcon({
|
|
3942
|
+
className,
|
|
3943
|
+
variant = "default",
|
|
3944
|
+
shape = "default",
|
|
3945
|
+
size = "default",
|
|
3946
|
+
...props
|
|
3947
|
+
}) {
|
|
3948
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3949
|
+
"div",
|
|
3950
|
+
{
|
|
3951
|
+
className: chunkI7WHASOO_cjs.cn(githubIconVariants({ variant, shape, size, className })),
|
|
3952
|
+
...props,
|
|
3953
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3954
|
+
"svg",
|
|
3955
|
+
{
|
|
3956
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3957
|
+
viewBox: "0 0 24 24",
|
|
3958
|
+
className: "size-full",
|
|
3959
|
+
fill: "currentColor",
|
|
3960
|
+
"aria-label": "GitHub",
|
|
3961
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z" })
|
|
3962
|
+
}
|
|
3963
|
+
)
|
|
3964
|
+
}
|
|
3965
|
+
);
|
|
3966
|
+
}
|
|
3967
|
+
var googleIconVariants = classVarianceAuthority.cva("shrink-0 transition-all", {
|
|
3968
|
+
variants: {
|
|
3969
|
+
variant: {
|
|
3970
|
+
default: "",
|
|
3971
|
+
light: "bg-white",
|
|
3972
|
+
dark: "bg-gray-900",
|
|
3973
|
+
transparent: "bg-transparent"
|
|
3974
|
+
},
|
|
3975
|
+
shape: {
|
|
3976
|
+
default: "rounded",
|
|
3977
|
+
square: "rounded-none",
|
|
3978
|
+
rounded: "rounded-full"
|
|
3979
|
+
},
|
|
3980
|
+
size: {
|
|
3981
|
+
sm: "size-6 p-1",
|
|
3982
|
+
default: "size-10 p-2",
|
|
3983
|
+
lg: "size-14 p-3",
|
|
3984
|
+
xl: "size-20 p-4"
|
|
3985
|
+
}
|
|
3986
|
+
},
|
|
3987
|
+
defaultVariants: {
|
|
3988
|
+
variant: "default",
|
|
3989
|
+
shape: "default",
|
|
3990
|
+
size: "default"
|
|
3991
|
+
}
|
|
3992
|
+
});
|
|
3993
|
+
function GoogleIcon({
|
|
3994
|
+
className,
|
|
3995
|
+
variant = "default",
|
|
3996
|
+
shape = "default",
|
|
3997
|
+
size = "default",
|
|
3998
|
+
...props
|
|
3999
|
+
}) {
|
|
4000
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4001
|
+
"div",
|
|
4002
|
+
{
|
|
4003
|
+
className: chunkI7WHASOO_cjs.cn(googleIconVariants({ variant, shape, size, className })),
|
|
4004
|
+
...props,
|
|
4005
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4006
|
+
"svg",
|
|
4007
|
+
{
|
|
4008
|
+
version: "1.1",
|
|
4009
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4010
|
+
viewBox: "0 0 48 48",
|
|
4011
|
+
className: "size-full",
|
|
4012
|
+
"aria-label": "Google",
|
|
4013
|
+
children: [
|
|
4014
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4015
|
+
"path",
|
|
4016
|
+
{
|
|
4017
|
+
fill: "#EA4335",
|
|
4018
|
+
d: "M24 9.5c3.54 0 6.71 1.22 9.21 3.6l6.85-6.85C35.9 2.38 30.47 0 24 0 14.62 0 6.51 5.38 2.56 13.22l7.98 6.19C12.43 13.72 17.74 9.5 24 9.5z"
|
|
4019
|
+
}
|
|
4020
|
+
),
|
|
4021
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4022
|
+
"path",
|
|
4023
|
+
{
|
|
4024
|
+
fill: "#4285F4",
|
|
4025
|
+
d: "M46.98 24.55c0-1.57-.15-3.09-.38-4.55H24v9.02h12.94c-.58 2.96-2.26 5.48-4.78 7.18l7.73 6c4.51-4.18 7.09-10.36 7.09-17.65z"
|
|
4026
|
+
}
|
|
4027
|
+
),
|
|
4028
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4029
|
+
"path",
|
|
4030
|
+
{
|
|
4031
|
+
fill: "#FBBC05",
|
|
4032
|
+
d: "M10.53 28.59c-.48-1.45-.76-2.99-.76-4.59s.27-3.14.76-4.59l-7.98-6.19C.92 16.46 0 20.12 0 24c0 3.88.92 7.54 2.56 10.78l7.97-6.19z"
|
|
4033
|
+
}
|
|
4034
|
+
),
|
|
4035
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4036
|
+
"path",
|
|
4037
|
+
{
|
|
4038
|
+
fill: "#34A853",
|
|
4039
|
+
d: "M24 48c6.48 0 11.93-2.13 15.89-5.81l-7.73-6c-2.15 1.45-4.92 2.3-8.16 2.3-6.26 0-11.57-4.22-13.47-9.91l-7.98 6.19C6.51 42.62 14.62 48 24 48z"
|
|
4040
|
+
}
|
|
4041
|
+
),
|
|
4042
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { fill: "none", d: "M0 0h48v48H0z" })
|
|
4043
|
+
]
|
|
4044
|
+
}
|
|
4045
|
+
)
|
|
4046
|
+
}
|
|
4047
|
+
);
|
|
4048
|
+
}
|
|
4049
|
+
var microsoftIconVariants = classVarianceAuthority.cva("shrink-0 transition-all", {
|
|
4050
|
+
variants: {
|
|
4051
|
+
variant: {
|
|
4052
|
+
default: "",
|
|
4053
|
+
light: "bg-white",
|
|
4054
|
+
dark: "bg-gray-900",
|
|
4055
|
+
transparent: "bg-transparent"
|
|
4056
|
+
},
|
|
4057
|
+
shape: {
|
|
4058
|
+
default: "rounded",
|
|
4059
|
+
square: "rounded-none",
|
|
4060
|
+
rounded: "rounded-full"
|
|
4061
|
+
},
|
|
4062
|
+
size: {
|
|
4063
|
+
sm: "size-6 p-1",
|
|
4064
|
+
default: "size-10 p-2",
|
|
4065
|
+
lg: "size-14 p-3",
|
|
4066
|
+
xl: "size-20 p-4"
|
|
4067
|
+
}
|
|
4068
|
+
},
|
|
4069
|
+
defaultVariants: {
|
|
4070
|
+
variant: "default",
|
|
4071
|
+
shape: "default",
|
|
4072
|
+
size: "default"
|
|
4073
|
+
}
|
|
4074
|
+
});
|
|
4075
|
+
function MicrosoftIcon({
|
|
4076
|
+
className,
|
|
4077
|
+
variant = "default",
|
|
4078
|
+
shape = "default",
|
|
4079
|
+
size = "default",
|
|
4080
|
+
...props
|
|
4081
|
+
}) {
|
|
4082
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4083
|
+
"div",
|
|
4084
|
+
{
|
|
4085
|
+
className: chunkI7WHASOO_cjs.cn(microsoftIconVariants({ variant, shape, size, className })),
|
|
4086
|
+
...props,
|
|
4087
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4088
|
+
"svg",
|
|
4089
|
+
{
|
|
4090
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4091
|
+
viewBox: "0 0 24 24",
|
|
4092
|
+
className: "size-full",
|
|
4093
|
+
"aria-label": "Microsoft",
|
|
4094
|
+
children: [
|
|
4095
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { fill: "#F25022", d: "M1 1h10v10H1z" }),
|
|
4096
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { fill: "#00A4EF", d: "M1 13h10v10H1z" }),
|
|
4097
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { fill: "#7FBA00", d: "M13 1h10v10H13z" }),
|
|
4098
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { fill: "#FFB900", d: "M13 13h10v10H13z" })
|
|
4099
|
+
]
|
|
4100
|
+
}
|
|
4101
|
+
)
|
|
4102
|
+
}
|
|
4103
|
+
);
|
|
4104
|
+
}
|
|
4105
|
+
var providerIcons = {
|
|
4106
|
+
google: /* @__PURE__ */ jsxRuntime.jsx(GoogleIcon, { className: "size-4 p-0" }),
|
|
4107
|
+
github: /* @__PURE__ */ jsxRuntime.jsx(GithubIcon, { className: "size-4 p-0" }),
|
|
4108
|
+
apple: /* @__PURE__ */ jsxRuntime.jsx(AppleIcon, { className: "size-4 p-0" }),
|
|
4109
|
+
microsoft: /* @__PURE__ */ jsxRuntime.jsx(MicrosoftIcon, { className: "size-4 p-0" }),
|
|
4110
|
+
facebook: /* @__PURE__ */ jsxRuntime.jsx(FacebookIcon, { className: "size-4 p-0" })
|
|
4111
|
+
};
|
|
4112
|
+
function LoginForm({
|
|
4113
|
+
onSubmit,
|
|
4114
|
+
onProviderLogin,
|
|
4115
|
+
onForgotPassword,
|
|
4116
|
+
onSignUp,
|
|
4117
|
+
providers = [],
|
|
4118
|
+
showForgotPassword = true,
|
|
4119
|
+
showSignUp = true,
|
|
4120
|
+
title,
|
|
4121
|
+
description,
|
|
4122
|
+
isLoading = false,
|
|
4123
|
+
className
|
|
4124
|
+
}) {
|
|
4125
|
+
const { t } = reactI18next.useTranslation("ui");
|
|
4126
|
+
const [email, setEmail] = React9.useState("");
|
|
4127
|
+
const [password, setPassword] = React9.useState("");
|
|
4128
|
+
const handleSubmit = (e) => {
|
|
4129
|
+
e.preventDefault();
|
|
4130
|
+
onSubmit?.(email, password);
|
|
4131
|
+
};
|
|
4132
|
+
const displayTitle = title ?? t("loginForm.title");
|
|
4133
|
+
const displayDescription = description ?? t("loginForm.description");
|
|
4134
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Card, { className: chunkI7WHASOO_cjs.cn("w-full max-w-md", className), children: [
|
|
4135
|
+
/* @__PURE__ */ jsxRuntime.jsxs(CardHeader, { className: "text-center", children: [
|
|
4136
|
+
/* @__PURE__ */ jsxRuntime.jsx(CardTitle, { className: "text-xl", children: displayTitle }),
|
|
4137
|
+
/* @__PURE__ */ jsxRuntime.jsx(CardDescription, { children: displayDescription })
|
|
4138
|
+
] }),
|
|
4139
|
+
/* @__PURE__ */ jsxRuntime.jsx(CardContent, { children: /* @__PURE__ */ jsxRuntime.jsx("form", { onSubmit: handleSubmit, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-6", children: [
|
|
4140
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid gap-2", children: [
|
|
4141
|
+
/* @__PURE__ */ jsxRuntime.jsx(Label3, { htmlFor: "login-email", children: t("loginForm.email") }),
|
|
4142
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4143
|
+
chunkGQ6Z5A4R_cjs.Input,
|
|
4144
|
+
{
|
|
4145
|
+
id: "login-email",
|
|
4146
|
+
type: "email",
|
|
4147
|
+
placeholder: t("loginForm.emailPlaceholder"),
|
|
4148
|
+
value: email,
|
|
4149
|
+
onChange: (e) => setEmail(e.target.value),
|
|
4150
|
+
required: true,
|
|
4151
|
+
disabled: isLoading,
|
|
4152
|
+
autoComplete: "email"
|
|
4153
|
+
}
|
|
4154
|
+
)
|
|
4155
|
+
] }),
|
|
4156
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid gap-2", children: [
|
|
4157
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center", children: [
|
|
4158
|
+
/* @__PURE__ */ jsxRuntime.jsx(Label3, { htmlFor: "login-password", children: t("loginForm.password") }),
|
|
4159
|
+
showForgotPassword && /* @__PURE__ */ jsxRuntime.jsx(
|
|
4160
|
+
"button",
|
|
4161
|
+
{
|
|
4162
|
+
type: "button",
|
|
4163
|
+
onClick: onForgotPassword,
|
|
4164
|
+
className: "text-muted-foreground hover:text-primary ml-auto text-sm underline-offset-4 hover:underline",
|
|
4165
|
+
disabled: isLoading,
|
|
4166
|
+
children: t("loginForm.forgotPassword")
|
|
4167
|
+
}
|
|
4168
|
+
)
|
|
4169
|
+
] }),
|
|
4170
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4171
|
+
chunkGQ6Z5A4R_cjs.Input,
|
|
4172
|
+
{
|
|
4173
|
+
id: "login-password",
|
|
4174
|
+
type: "password",
|
|
4175
|
+
value: password,
|
|
4176
|
+
onChange: (e) => setPassword(e.target.value),
|
|
4177
|
+
required: true,
|
|
4178
|
+
disabled: isLoading,
|
|
4179
|
+
autoComplete: "current-password"
|
|
4180
|
+
}
|
|
4181
|
+
)
|
|
4182
|
+
] }),
|
|
4183
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkGQ6Z5A4R_cjs.Button, { type: "submit", className: "w-full", disabled: isLoading, children: isLoading ? t("loginForm.loggingIn") : t("loginForm.login") }),
|
|
4184
|
+
providers.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
4185
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
|
|
4186
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 flex items-center", children: /* @__PURE__ */ jsxRuntime.jsx(chunkGQ6Z5A4R_cjs.Separator, { className: "w-full" }) }),
|
|
4187
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative flex justify-center text-xs uppercase", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "bg-card text-muted-foreground px-2", children: t("loginForm.orContinueWith") }) })
|
|
4188
|
+
] }),
|
|
4189
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-3", children: providers.map((provider) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4190
|
+
chunkGQ6Z5A4R_cjs.Button,
|
|
4191
|
+
{
|
|
4192
|
+
type: "button",
|
|
4193
|
+
variant: "outline",
|
|
4194
|
+
className: "w-full",
|
|
4195
|
+
onClick: () => onProviderLogin?.(provider),
|
|
4196
|
+
disabled: isLoading,
|
|
4197
|
+
children: [
|
|
4198
|
+
providerIcons[provider],
|
|
4199
|
+
t(`loginForm.providers.${provider}`)
|
|
4200
|
+
]
|
|
4201
|
+
},
|
|
4202
|
+
provider
|
|
4203
|
+
)) })
|
|
4204
|
+
] })
|
|
4205
|
+
] }) }) }),
|
|
4206
|
+
showSignUp && /* @__PURE__ */ jsxRuntime.jsx(CardFooter, { className: "justify-center", children: /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-muted-foreground text-sm", children: [
|
|
4207
|
+
t("loginForm.noAccount"),
|
|
4208
|
+
" ",
|
|
4209
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4210
|
+
"button",
|
|
4211
|
+
{
|
|
4212
|
+
type: "button",
|
|
4213
|
+
onClick: onSignUp,
|
|
4214
|
+
className: "text-primary underline-offset-4 hover:underline",
|
|
4215
|
+
disabled: isLoading,
|
|
4216
|
+
children: t("loginForm.signUp")
|
|
4217
|
+
}
|
|
4218
|
+
)
|
|
4219
|
+
] }) })
|
|
4220
|
+
] });
|
|
4221
|
+
}
|
|
3811
4222
|
function NextButton(props) {
|
|
3812
4223
|
const { t } = reactI18next.useTranslation("ui");
|
|
3813
4224
|
return /* @__PURE__ */ jsxRuntime.jsxs(chunkGQ6Z5A4R_cjs.Button, { ...props, children: [
|
|
@@ -3830,7 +4241,7 @@ function LocaleProvider({
|
|
|
3830
4241
|
const [isReady, setIsReady] = React9.useState(false);
|
|
3831
4242
|
const instance = React9.useMemo(() => i18n__default.default.createInstance(), []);
|
|
3832
4243
|
React9.useEffect(() => {
|
|
3833
|
-
const baseTranslations =
|
|
4244
|
+
const baseTranslations = chunkRKE7ZPNV_cjs.locales_exports[language] ?? {};
|
|
3834
4245
|
const mergedTranslations = overrides ? { ...baseTranslations, ...overrides } : baseTranslations;
|
|
3835
4246
|
instance.use(reactI18next.initReactI18next).init({
|
|
3836
4247
|
lng: language,
|
|
@@ -3859,7 +4270,7 @@ function TranslationProvider({
|
|
|
3859
4270
|
}) {
|
|
3860
4271
|
const [isReady, setIsReady] = React9.useState(false);
|
|
3861
4272
|
React9.useEffect(() => {
|
|
3862
|
-
for (const [lng, resources] of Object.entries(
|
|
4273
|
+
for (const [lng, resources] of Object.entries(chunkRKE7ZPNV_cjs.locales_exports)) {
|
|
3863
4274
|
const language = lng;
|
|
3864
4275
|
const languageOverrides = overrides?.[language];
|
|
3865
4276
|
if (i18n2.hasResourceBundle(language, "ui") && !languageOverrides) {
|
|
@@ -3869,7 +4280,7 @@ function TranslationProvider({
|
|
|
3869
4280
|
i18n2.addResourceBundle(language, "ui", mergedResources, true, true);
|
|
3870
4281
|
}
|
|
3871
4282
|
if (overrides) {
|
|
3872
|
-
const supportedLanguages = Object.keys(
|
|
4283
|
+
const supportedLanguages = Object.keys(chunkRKE7ZPNV_cjs.locales_exports);
|
|
3873
4284
|
for (const [lng, resources] of Object.entries(overrides)) {
|
|
3874
4285
|
if (supportedLanguages.includes(lng)) continue;
|
|
3875
4286
|
i18n2.addResourceBundle(lng, "ui", resources, true, true);
|
|
@@ -3957,6 +4368,7 @@ exports.AlertDialogPortal = AlertDialogPortal;
|
|
|
3957
4368
|
exports.AlertDialogTitle = AlertDialogTitle;
|
|
3958
4369
|
exports.AlertDialogTrigger = AlertDialogTrigger;
|
|
3959
4370
|
exports.AlertTitle = AlertTitle;
|
|
4371
|
+
exports.AppleIcon = AppleIcon;
|
|
3960
4372
|
exports.Avatar = Avatar;
|
|
3961
4373
|
exports.AvatarFallback = AvatarFallback;
|
|
3962
4374
|
exports.AvatarImage = AvatarImage;
|
|
@@ -4048,6 +4460,7 @@ exports.DropdownMenuSub = DropdownMenuSub;
|
|
|
4048
4460
|
exports.DropdownMenuSubContent = DropdownMenuSubContent;
|
|
4049
4461
|
exports.DropdownMenuSubTrigger = DropdownMenuSubTrigger;
|
|
4050
4462
|
exports.DropdownMenuTrigger = DropdownMenuTrigger;
|
|
4463
|
+
exports.FacebookIcon = FacebookIcon;
|
|
4051
4464
|
exports.Form = Form;
|
|
4052
4465
|
exports.FormControl = FormControl;
|
|
4053
4466
|
exports.FormDescription = FormDescription;
|
|
@@ -4055,11 +4468,14 @@ exports.FormField = FormField;
|
|
|
4055
4468
|
exports.FormItem = FormItem;
|
|
4056
4469
|
exports.FormLabel = FormLabel;
|
|
4057
4470
|
exports.FormMessage = FormMessage;
|
|
4471
|
+
exports.GithubIcon = GithubIcon;
|
|
4472
|
+
exports.GoogleIcon = GoogleIcon;
|
|
4058
4473
|
exports.HoverCard = HoverCard;
|
|
4059
4474
|
exports.HoverCardContent = HoverCardContent;
|
|
4060
4475
|
exports.HoverCardTrigger = HoverCardTrigger;
|
|
4061
4476
|
exports.Label = Label3;
|
|
4062
4477
|
exports.LocaleProvider = LocaleProvider;
|
|
4478
|
+
exports.LoginForm = LoginForm;
|
|
4063
4479
|
exports.Menubar = Menubar;
|
|
4064
4480
|
exports.MenubarCheckboxItem = MenubarCheckboxItem;
|
|
4065
4481
|
exports.MenubarContent = MenubarContent;
|
|
@@ -4076,6 +4492,7 @@ exports.MenubarSub = MenubarSub;
|
|
|
4076
4492
|
exports.MenubarSubContent = MenubarSubContent;
|
|
4077
4493
|
exports.MenubarSubTrigger = MenubarSubTrigger;
|
|
4078
4494
|
exports.MenubarTrigger = MenubarTrigger;
|
|
4495
|
+
exports.MicrosoftIcon = MicrosoftIcon;
|
|
4079
4496
|
exports.NavigationMenu = NavigationMenu;
|
|
4080
4497
|
exports.NavigationMenuContent = NavigationMenuContent;
|
|
4081
4498
|
exports.NavigationMenuIndicator = NavigationMenuIndicator;
|
|
@@ -4160,8 +4577,13 @@ exports.TooltipContent = TooltipContent;
|
|
|
4160
4577
|
exports.TooltipProvider = TooltipProvider;
|
|
4161
4578
|
exports.TooltipTrigger = TooltipTrigger;
|
|
4162
4579
|
exports.TranslationProvider = TranslationProvider;
|
|
4580
|
+
exports.appleIconVariants = appleIconVariants;
|
|
4163
4581
|
exports.badgeVariants = badgeVariants;
|
|
4164
4582
|
exports.buttonGroupVariants = buttonGroupVariants;
|
|
4583
|
+
exports.facebookIconVariants = facebookIconVariants;
|
|
4584
|
+
exports.githubIconVariants = githubIconVariants;
|
|
4585
|
+
exports.googleIconVariants = googleIconVariants;
|
|
4586
|
+
exports.microsoftIconVariants = microsoftIconVariants;
|
|
4165
4587
|
exports.navigationMenuTriggerStyle = navigationMenuTriggerStyle;
|
|
4166
4588
|
exports.useFormField = useFormField;
|
|
4167
4589
|
exports.useSidebar = useSidebar;
|