easykar-backoffice-ui 0.0.5 → 0.0.7
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 +711 -518
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +28 -2
- package/dist/index.d.ts +28 -2
- package/dist/index.js +688 -499
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -41,6 +41,7 @@ __export(index_exports, {
|
|
|
41
41
|
EasyEmailInput: () => EasyEmailInput,
|
|
42
42
|
EasyErrorMessage: () => EasyErrorMessage,
|
|
43
43
|
EasyHeading: () => EasyHeading,
|
|
44
|
+
EasyIBANInput: () => EasyIBANInput,
|
|
44
45
|
EasyLabel: () => EasyLabel,
|
|
45
46
|
EasyMessageDialog: () => EasyMessageDialog,
|
|
46
47
|
EasyOtp: () => EasyOtp,
|
|
@@ -74,9 +75,11 @@ __export(index_exports, {
|
|
|
74
75
|
designTokens: () => designTokens,
|
|
75
76
|
easyButtonVariants: () => easyButtonVariants,
|
|
76
77
|
elevations: () => elevations,
|
|
78
|
+
extractIBANDigits: () => extractIBANDigits,
|
|
77
79
|
formatEmail: () => formatEmail,
|
|
78
80
|
formatPhoneNumber: () => formatPhoneNumber,
|
|
79
81
|
formatPhoneNumberWithPattern: () => formatPhoneNumberWithPattern,
|
|
82
|
+
formatTurkishIBAN: () => formatTurkishIBAN,
|
|
80
83
|
generateBreadcrumbItems: () => generateBreadcrumbItems,
|
|
81
84
|
getTypographyClass: () => getTypographyClass,
|
|
82
85
|
primitiveColors: () => primitiveColors,
|
|
@@ -88,7 +91,8 @@ __export(index_exports, {
|
|
|
88
91
|
typographyScale: () => typographyScale,
|
|
89
92
|
typographyTokens: () => typographyTokens,
|
|
90
93
|
useEasyOtp: () => useEasyOtp,
|
|
91
|
-
useTheme: () => useTheme
|
|
94
|
+
useTheme: () => useTheme,
|
|
95
|
+
validateTurkishIBAN: () => validateTurkishIBAN
|
|
92
96
|
});
|
|
93
97
|
module.exports = __toCommonJS(index_exports);
|
|
94
98
|
|
|
@@ -325,6 +329,51 @@ function formatPhoneNumberWithPattern(value, format2) {
|
|
|
325
329
|
}
|
|
326
330
|
return formatted;
|
|
327
331
|
}
|
|
332
|
+
function formatTurkishIBAN(value) {
|
|
333
|
+
const cleaned = value.replace(/[^a-zA-Z0-9]/g, "").toUpperCase();
|
|
334
|
+
const parts = [];
|
|
335
|
+
if (cleaned.length > 0) {
|
|
336
|
+
parts.push(cleaned.slice(0, 2));
|
|
337
|
+
}
|
|
338
|
+
for (let i = 2; i < Math.min(cleaned.length, 22); i += 4) {
|
|
339
|
+
const end = Math.min(i + 4, cleaned.length);
|
|
340
|
+
if (i < cleaned.length) {
|
|
341
|
+
parts.push(cleaned.slice(i, end));
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
if (cleaned.length > 22) {
|
|
345
|
+
parts.push(cleaned.slice(22, 24));
|
|
346
|
+
}
|
|
347
|
+
return parts.join(" ");
|
|
348
|
+
}
|
|
349
|
+
function validateTurkishIBAN(iban) {
|
|
350
|
+
const cleaned = iban.replace(/\s/g, "").toUpperCase();
|
|
351
|
+
if (cleaned.length !== 26 || !cleaned.startsWith("TR")) {
|
|
352
|
+
return false;
|
|
353
|
+
}
|
|
354
|
+
const afterTR = cleaned.slice(2);
|
|
355
|
+
if (!/^\d{24}$/.test(afterTR)) {
|
|
356
|
+
return false;
|
|
357
|
+
}
|
|
358
|
+
const rearranged = cleaned.slice(4) + cleaned.slice(0, 4);
|
|
359
|
+
let numericString = "";
|
|
360
|
+
for (const char of rearranged) {
|
|
361
|
+
if (char >= "A" && char <= "Z") {
|
|
362
|
+
numericString += (char.charCodeAt(0) - 55).toString();
|
|
363
|
+
} else {
|
|
364
|
+
numericString += char;
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
let remainder = 0;
|
|
368
|
+
for (let i = 0; i < numericString.length; i += 7) {
|
|
369
|
+
const chunk = numericString.slice(i, i + 7);
|
|
370
|
+
remainder = parseInt(remainder.toString() + chunk, 10) % 97;
|
|
371
|
+
}
|
|
372
|
+
return remainder === 1;
|
|
373
|
+
}
|
|
374
|
+
function extractIBANDigits(value) {
|
|
375
|
+
return value.replace(/[^0-9]/g, "").slice(0, 24);
|
|
376
|
+
}
|
|
328
377
|
|
|
329
378
|
// src/theme/typography.ts
|
|
330
379
|
var typographyClasses = {
|
|
@@ -725,36 +774,173 @@ var EasyEmailInput = React7.forwardRef(
|
|
|
725
774
|
);
|
|
726
775
|
EasyEmailInput.displayName = "EasyEmailInput";
|
|
727
776
|
|
|
728
|
-
// src/components/easy/input/
|
|
777
|
+
// src/components/easy/input/iban-input.tsx
|
|
729
778
|
var React8 = __toESM(require("react"), 1);
|
|
730
779
|
var import_lucide_react3 = require("lucide-react");
|
|
731
780
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
732
|
-
var
|
|
781
|
+
var ibanPlaceholder = "## #### #### #### #### #### ##";
|
|
782
|
+
var EasyIBANInput = React8.forwardRef(
|
|
733
783
|
({
|
|
734
784
|
className,
|
|
735
785
|
label,
|
|
736
786
|
helperText,
|
|
737
|
-
helperIcon,
|
|
738
787
|
errorText,
|
|
739
|
-
|
|
788
|
+
value = "",
|
|
789
|
+
onChange,
|
|
790
|
+
onValidationChange,
|
|
740
791
|
id,
|
|
741
792
|
name,
|
|
793
|
+
actionButton,
|
|
794
|
+
disabled,
|
|
742
795
|
...props
|
|
743
796
|
}, ref) => {
|
|
744
797
|
const generatedId = React8.useId();
|
|
745
798
|
const inputId = id ?? generatedId;
|
|
746
|
-
const
|
|
799
|
+
const helperId = helperText && !errorText ? `${inputId}-helper` : void 0;
|
|
800
|
+
const errorId = errorText ? `${inputId}-error` : void 0;
|
|
801
|
+
const [isFocused, setIsFocused] = React8.useState(false);
|
|
802
|
+
const formattedValue = React8.useMemo(() => {
|
|
803
|
+
if (!value) return "";
|
|
804
|
+
const digitsOnly = extractIBANDigits(value);
|
|
805
|
+
return formatTurkishIBAN(digitsOnly);
|
|
806
|
+
}, [value]);
|
|
807
|
+
React8.useEffect(() => {
|
|
808
|
+
if (onValidationChange) {
|
|
809
|
+
const digitsOnly = extractIBANDigits(value);
|
|
810
|
+
if (digitsOnly.length === 24) {
|
|
811
|
+
const fullIBAN = `TR${digitsOnly}`;
|
|
812
|
+
const isValid = validateTurkishIBAN(fullIBAN);
|
|
813
|
+
onValidationChange(isValid);
|
|
814
|
+
} else {
|
|
815
|
+
onValidationChange(false);
|
|
816
|
+
}
|
|
817
|
+
}
|
|
818
|
+
}, [value, onValidationChange]);
|
|
819
|
+
const handleInputChange = (e) => {
|
|
820
|
+
const inputValue = e.target.value;
|
|
821
|
+
const digitsOnly = inputValue.replace(/[^0-9]/g, "").slice(0, 24);
|
|
822
|
+
const formatted = formatTurkishIBAN(digitsOnly);
|
|
823
|
+
onChange?.(formatted);
|
|
824
|
+
};
|
|
825
|
+
const handleFocus = () => {
|
|
826
|
+
setIsFocused(true);
|
|
827
|
+
};
|
|
828
|
+
const handleBlur = () => {
|
|
829
|
+
setIsFocused(false);
|
|
830
|
+
};
|
|
831
|
+
const handlePaste = (e) => {
|
|
832
|
+
e.preventDefault();
|
|
833
|
+
const pastedText = e.clipboardData.getData("text");
|
|
834
|
+
let cleanedText = pastedText.toUpperCase();
|
|
835
|
+
if (cleanedText.startsWith("TR")) {
|
|
836
|
+
cleanedText = cleanedText.slice(2);
|
|
837
|
+
}
|
|
838
|
+
const digitsOnly = cleanedText.replace(/[^0-9]/g, "").slice(0, 24);
|
|
839
|
+
const formatted = formatTurkishIBAN(digitsOnly);
|
|
840
|
+
onChange?.(formatted);
|
|
841
|
+
};
|
|
842
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex w-full flex-col gap-1.5", children: [
|
|
843
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
844
|
+
"label",
|
|
845
|
+
{
|
|
846
|
+
htmlFor: inputId,
|
|
847
|
+
className: "text-base font-medium text-[var(--ui-text-900)]",
|
|
848
|
+
children: label
|
|
849
|
+
}
|
|
850
|
+
),
|
|
851
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "relative", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
852
|
+
"div",
|
|
853
|
+
{
|
|
854
|
+
className: cn(
|
|
855
|
+
"flex h-12 rounded-lg border bg-[var(--ui-background-0)] transition-all duration-200 overflow-hidden",
|
|
856
|
+
errorText ? "border-[var(--ui-danger-base)]" : "border-[var(--ui-border-200)]",
|
|
857
|
+
isFocused && !errorText && "border-[var(--ui-border-900)] shadow-[0_0_0_2px_var(--ui-background-0),_0_0_0_4px_var(--ui-border-200)]",
|
|
858
|
+
isFocused && errorText && "border-[var(--ui-danger-base)] shadow-[0_0_0_2px_var(--ui-background-0),_0_0_0_4px_var(--ui-danger-light)]",
|
|
859
|
+
disabled && "cursor-not-allowed opacity-50",
|
|
860
|
+
!isFocused && !disabled && "hover:bg-[var(--ui-background-100)]",
|
|
861
|
+
className
|
|
862
|
+
),
|
|
863
|
+
children: [
|
|
864
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "px-3 py-3 flex items-center gap-2 rounded-l-lg border-r border-[var(--ui-border-200)]", children: [
|
|
865
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "text-lg", children: "\u{1F1F9}\u{1F1F7}" }),
|
|
866
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "text-base font-medium", children: "TR" })
|
|
867
|
+
] }),
|
|
868
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
869
|
+
Input,
|
|
870
|
+
{
|
|
871
|
+
ref,
|
|
872
|
+
type: "text",
|
|
873
|
+
inputMode: "numeric",
|
|
874
|
+
name: name ?? inputId,
|
|
875
|
+
id: inputId,
|
|
876
|
+
value: formattedValue,
|
|
877
|
+
onChange: handleInputChange,
|
|
878
|
+
onFocus: handleFocus,
|
|
879
|
+
onBlur: handleBlur,
|
|
880
|
+
onPaste: handlePaste,
|
|
881
|
+
placeholder: ibanPlaceholder,
|
|
882
|
+
className: cn(
|
|
883
|
+
"h-full rounded-none px-4 py-3 text-base flex-1 border-0 focus-visible:ring-0 focus-visible:ring-offset-0 bg-transparent font-mono tracking-wider",
|
|
884
|
+
actionButton ? "rounded-l-none" : "rounded-r-lg",
|
|
885
|
+
"[&::-webkit-autofill]:!bg-transparent [&::-webkit-autofill]:!shadow-none [&::-webkit-autofill]:!text-current"
|
|
886
|
+
),
|
|
887
|
+
style: { fontSize: "16px" },
|
|
888
|
+
"aria-invalid": Boolean(errorText),
|
|
889
|
+
"aria-describedby": errorId ?? helperId,
|
|
890
|
+
disabled,
|
|
891
|
+
...props
|
|
892
|
+
}
|
|
893
|
+
),
|
|
894
|
+
actionButton && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "flex items-center pr-1.5 pl-2 border-l border-[var(--ui-border-200)]", children: actionButton })
|
|
895
|
+
]
|
|
896
|
+
}
|
|
897
|
+
) }),
|
|
898
|
+
errorText ? /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
899
|
+
"p",
|
|
900
|
+
{
|
|
901
|
+
id: errorId,
|
|
902
|
+
className: "flex items-center gap-1 text-sm text-[var(--ui-danger-base)]",
|
|
903
|
+
children: [
|
|
904
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react3.AlertCircle, { className: "size-4" }),
|
|
905
|
+
errorText
|
|
906
|
+
]
|
|
907
|
+
}
|
|
908
|
+
) : helperText ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("p", { id: helperId, className: "text-sm text-[var(--ui-text-500)]", children: helperText }) : null
|
|
909
|
+
] });
|
|
910
|
+
}
|
|
911
|
+
);
|
|
912
|
+
EasyIBANInput.displayName = "EasyIBANInput";
|
|
913
|
+
|
|
914
|
+
// src/components/easy/input/password-input.tsx
|
|
915
|
+
var React9 = __toESM(require("react"), 1);
|
|
916
|
+
var import_lucide_react4 = require("lucide-react");
|
|
917
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
918
|
+
var EasyPasswordInput = React9.forwardRef(
|
|
919
|
+
({
|
|
920
|
+
className,
|
|
921
|
+
label,
|
|
922
|
+
helperText,
|
|
923
|
+
helperIcon,
|
|
924
|
+
errorText,
|
|
925
|
+
errorIcon = /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_lucide_react4.AlertCircle, { className: "size-4" }),
|
|
926
|
+
id,
|
|
927
|
+
name,
|
|
928
|
+
...props
|
|
929
|
+
}, ref) => {
|
|
930
|
+
const generatedId = React9.useId();
|
|
931
|
+
const inputId = id ?? generatedId;
|
|
932
|
+
const normalizedErrors = React9.useMemo(() => {
|
|
747
933
|
if (!errorText) return [];
|
|
748
934
|
return Array.isArray(errorText) ? errorText : [errorText];
|
|
749
935
|
}, [errorText]);
|
|
750
936
|
const hasErrors = normalizedErrors.length > 0;
|
|
751
937
|
const helperId = helperText && !hasErrors ? `${inputId}-helper` : void 0;
|
|
752
938
|
const errorId = hasErrors ? `${inputId}-error` : void 0;
|
|
753
|
-
const [showPassword, setShowPassword] =
|
|
754
|
-
const [isFocused, setIsFocused] =
|
|
939
|
+
const [showPassword, setShowPassword] = React9.useState(false);
|
|
940
|
+
const [isFocused, setIsFocused] = React9.useState(false);
|
|
755
941
|
const toggleVisibility = () => setShowPassword((prev) => !prev);
|
|
756
|
-
return /* @__PURE__ */ (0,
|
|
757
|
-
label && /* @__PURE__ */ (0,
|
|
942
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex w-full flex-col gap-1.5", children: [
|
|
943
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
758
944
|
"label",
|
|
759
945
|
{
|
|
760
946
|
htmlFor: inputId,
|
|
@@ -762,8 +948,8 @@ var EasyPasswordInput = React8.forwardRef(
|
|
|
762
948
|
children: label
|
|
763
949
|
}
|
|
764
950
|
),
|
|
765
|
-
/* @__PURE__ */ (0,
|
|
766
|
-
/* @__PURE__ */ (0,
|
|
951
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "relative", children: [
|
|
952
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
767
953
|
Input,
|
|
768
954
|
{
|
|
769
955
|
ref,
|
|
@@ -793,7 +979,7 @@ var EasyPasswordInput = React8.forwardRef(
|
|
|
793
979
|
...props
|
|
794
980
|
}
|
|
795
981
|
),
|
|
796
|
-
/* @__PURE__ */ (0,
|
|
982
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
797
983
|
"button",
|
|
798
984
|
{
|
|
799
985
|
type: "button",
|
|
@@ -801,21 +987,21 @@ var EasyPasswordInput = React8.forwardRef(
|
|
|
801
987
|
className: "absolute right-3 top-1/2 -translate-y-1/2 inline-flex h-6 w-6 items-center justify-center text-[var(--ui-text-500)] transition-colors hover:text-[var(--ui-text-900)]",
|
|
802
988
|
tabIndex: -1,
|
|
803
989
|
"aria-label": showPassword ? "\u015Eifreyi gizle" : "\u015Eifreyi g\xF6ster",
|
|
804
|
-
children: showPassword ? /* @__PURE__ */ (0,
|
|
990
|
+
children: showPassword ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_lucide_react4.EyeOff, { className: "size-5" }) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_lucide_react4.Eye, { className: "size-5" })
|
|
805
991
|
}
|
|
806
992
|
)
|
|
807
993
|
] }),
|
|
808
|
-
hasErrors ? /* @__PURE__ */ (0,
|
|
994
|
+
hasErrors ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
809
995
|
"div",
|
|
810
996
|
{
|
|
811
997
|
id: errorId,
|
|
812
998
|
className: "flex flex-col gap-1 text-sm text-[var(--ui-danger-base)]",
|
|
813
|
-
children: normalizedErrors.map((text, index) => /* @__PURE__ */ (0,
|
|
999
|
+
children: normalizedErrors.map((text, index) => /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("p", { className: "flex items-center gap-1", children: [
|
|
814
1000
|
errorIcon,
|
|
815
1001
|
text
|
|
816
1002
|
] }, index))
|
|
817
1003
|
}
|
|
818
|
-
) : helperText ? /* @__PURE__ */ (0,
|
|
1004
|
+
) : helperText ? /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
819
1005
|
"p",
|
|
820
1006
|
{
|
|
821
1007
|
id: helperId,
|
|
@@ -832,12 +1018,12 @@ var EasyPasswordInput = React8.forwardRef(
|
|
|
832
1018
|
EasyPasswordInput.displayName = "EasyPasswordInput";
|
|
833
1019
|
|
|
834
1020
|
// src/components/easy/input/phone-input.tsx
|
|
835
|
-
var
|
|
836
|
-
var
|
|
837
|
-
var
|
|
1021
|
+
var React10 = __toESM(require("react"), 1);
|
|
1022
|
+
var import_lucide_react5 = require("lucide-react");
|
|
1023
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
838
1024
|
var phoneFormat = "(###) ### ## ##";
|
|
839
1025
|
var phonePlaceholder = "(5xx) xxx xx xx";
|
|
840
|
-
var EasyPhoneInput =
|
|
1026
|
+
var EasyPhoneInput = React10.forwardRef(
|
|
841
1027
|
({
|
|
842
1028
|
className,
|
|
843
1029
|
label,
|
|
@@ -851,12 +1037,12 @@ var EasyPhoneInput = React9.forwardRef(
|
|
|
851
1037
|
disabled,
|
|
852
1038
|
...props
|
|
853
1039
|
}, ref) => {
|
|
854
|
-
const generatedId =
|
|
1040
|
+
const generatedId = React10.useId();
|
|
855
1041
|
const inputId = id ?? generatedId;
|
|
856
1042
|
const helperId = helperText && !errorText ? `${inputId}-helper` : void 0;
|
|
857
1043
|
const errorId = errorText ? `${inputId}-error` : void 0;
|
|
858
|
-
const [isFocused, setIsFocused] =
|
|
859
|
-
const formattedValue =
|
|
1044
|
+
const [isFocused, setIsFocused] = React10.useState(false);
|
|
1045
|
+
const formattedValue = React10.useMemo(() => {
|
|
860
1046
|
if (!value) return "";
|
|
861
1047
|
const numbersOnly = value.replace(/\D/g, "");
|
|
862
1048
|
return formatPhoneNumberWithPattern(numbersOnly, phoneFormat);
|
|
@@ -873,8 +1059,8 @@ var EasyPhoneInput = React9.forwardRef(
|
|
|
873
1059
|
const handleBlur = () => {
|
|
874
1060
|
setIsFocused(false);
|
|
875
1061
|
};
|
|
876
|
-
return /* @__PURE__ */ (0,
|
|
877
|
-
label && /* @__PURE__ */ (0,
|
|
1062
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex w-full flex-col gap-1.5", children: [
|
|
1063
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
878
1064
|
"label",
|
|
879
1065
|
{
|
|
880
1066
|
htmlFor: inputId,
|
|
@@ -882,7 +1068,7 @@ var EasyPhoneInput = React9.forwardRef(
|
|
|
882
1068
|
children: label
|
|
883
1069
|
}
|
|
884
1070
|
),
|
|
885
|
-
/* @__PURE__ */ (0,
|
|
1071
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "relative", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
886
1072
|
"div",
|
|
887
1073
|
{
|
|
888
1074
|
className: cn(
|
|
@@ -895,11 +1081,11 @@ var EasyPhoneInput = React9.forwardRef(
|
|
|
895
1081
|
className
|
|
896
1082
|
),
|
|
897
1083
|
children: [
|
|
898
|
-
/* @__PURE__ */ (0,
|
|
899
|
-
/* @__PURE__ */ (0,
|
|
900
|
-
/* @__PURE__ */ (0,
|
|
1084
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "px-3 py-3 flex items-center gap-2 rounded-l-lg border-r border-[var(--ui-border-200)]", children: [
|
|
1085
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "text-lg", children: "\u{1F1F9}\u{1F1F7}" }),
|
|
1086
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "text-base font-medium", children: "(+90)" })
|
|
901
1087
|
] }),
|
|
902
|
-
/* @__PURE__ */ (0,
|
|
1088
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
903
1089
|
Input,
|
|
904
1090
|
{
|
|
905
1091
|
ref,
|
|
@@ -923,31 +1109,31 @@ var EasyPhoneInput = React9.forwardRef(
|
|
|
923
1109
|
...props
|
|
924
1110
|
}
|
|
925
1111
|
),
|
|
926
|
-
actionButton && /* @__PURE__ */ (0,
|
|
1112
|
+
actionButton && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "flex items-center pr-1.5 pl-2 border-l border-[var(--ui-border-200)]", children: actionButton })
|
|
927
1113
|
]
|
|
928
1114
|
}
|
|
929
1115
|
) }),
|
|
930
|
-
errorText ? /* @__PURE__ */ (0,
|
|
1116
|
+
errorText ? /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
931
1117
|
"p",
|
|
932
1118
|
{
|
|
933
1119
|
id: errorId,
|
|
934
1120
|
className: "flex items-center gap-1 text-sm text-[var(--ui-danger-base)]",
|
|
935
1121
|
children: [
|
|
936
|
-
/* @__PURE__ */ (0,
|
|
1122
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react5.AlertCircle, { className: "size-4" }),
|
|
937
1123
|
errorText
|
|
938
1124
|
]
|
|
939
1125
|
}
|
|
940
|
-
) : helperText ? /* @__PURE__ */ (0,
|
|
1126
|
+
) : helperText ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { id: helperId, className: "text-sm text-[var(--ui-text-500)]", children: helperText }) : null
|
|
941
1127
|
] });
|
|
942
1128
|
}
|
|
943
1129
|
);
|
|
944
1130
|
EasyPhoneInput.displayName = "EasyPhoneInput";
|
|
945
1131
|
|
|
946
1132
|
// src/components/easy/input/text-input.tsx
|
|
947
|
-
var
|
|
948
|
-
var
|
|
949
|
-
var
|
|
950
|
-
var EasyTextInput =
|
|
1133
|
+
var React11 = __toESM(require("react"), 1);
|
|
1134
|
+
var import_lucide_react6 = require("lucide-react");
|
|
1135
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
1136
|
+
var EasyTextInput = React11.forwardRef(
|
|
951
1137
|
({
|
|
952
1138
|
className,
|
|
953
1139
|
label,
|
|
@@ -958,13 +1144,13 @@ var EasyTextInput = React10.forwardRef(
|
|
|
958
1144
|
onChange,
|
|
959
1145
|
...props
|
|
960
1146
|
}, ref) => {
|
|
961
|
-
const generatedId =
|
|
1147
|
+
const generatedId = React11.useId();
|
|
962
1148
|
const inputId = id ?? generatedId;
|
|
963
1149
|
const helperId = helperText && !errorText ? `${inputId}-helper` : void 0;
|
|
964
1150
|
const errorId = errorText ? `${inputId}-error` : void 0;
|
|
965
|
-
const [isFocused, setIsFocused] =
|
|
966
|
-
return /* @__PURE__ */ (0,
|
|
967
|
-
label && /* @__PURE__ */ (0,
|
|
1151
|
+
const [isFocused, setIsFocused] = React11.useState(false);
|
|
1152
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex w-full flex-col gap-1.5", children: [
|
|
1153
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
968
1154
|
"label",
|
|
969
1155
|
{
|
|
970
1156
|
htmlFor: inputId,
|
|
@@ -972,7 +1158,7 @@ var EasyTextInput = React10.forwardRef(
|
|
|
972
1158
|
children: label
|
|
973
1159
|
}
|
|
974
1160
|
),
|
|
975
|
-
/* @__PURE__ */ (0,
|
|
1161
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
976
1162
|
Input,
|
|
977
1163
|
{
|
|
978
1164
|
ref,
|
|
@@ -1002,31 +1188,31 @@ var EasyTextInput = React10.forwardRef(
|
|
|
1002
1188
|
...props
|
|
1003
1189
|
}
|
|
1004
1190
|
),
|
|
1005
|
-
errorText ? /* @__PURE__ */ (0,
|
|
1191
|
+
errorText ? /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
1006
1192
|
"p",
|
|
1007
1193
|
{
|
|
1008
1194
|
id: errorId,
|
|
1009
1195
|
className: "flex items-center gap-1 text-sm text-[var(--ui-danger-base)]",
|
|
1010
1196
|
children: [
|
|
1011
|
-
/* @__PURE__ */ (0,
|
|
1197
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react6.AlertCircle, { className: "size-4" }),
|
|
1012
1198
|
errorText
|
|
1013
1199
|
]
|
|
1014
1200
|
}
|
|
1015
|
-
) : helperText ? /* @__PURE__ */ (0,
|
|
1201
|
+
) : helperText ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { id: helperId, className: "text-sm text-[var(--ui-text-500)]", children: helperText }) : null
|
|
1016
1202
|
] });
|
|
1017
1203
|
}
|
|
1018
1204
|
);
|
|
1019
1205
|
EasyTextInput.displayName = "EasyTextInput";
|
|
1020
1206
|
|
|
1021
1207
|
// src/components/easy/input/textarea.tsx
|
|
1022
|
-
var
|
|
1023
|
-
var
|
|
1208
|
+
var React13 = __toESM(require("react"), 1);
|
|
1209
|
+
var import_lucide_react7 = require("lucide-react");
|
|
1024
1210
|
|
|
1025
1211
|
// src/components/ui/textarea.tsx
|
|
1026
|
-
var
|
|
1027
|
-
var
|
|
1028
|
-
var Textarea =
|
|
1029
|
-
return /* @__PURE__ */ (0,
|
|
1212
|
+
var React12 = __toESM(require("react"), 1);
|
|
1213
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
1214
|
+
var Textarea = React12.forwardRef(({ className, ...props }, ref) => {
|
|
1215
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1030
1216
|
"textarea",
|
|
1031
1217
|
{
|
|
1032
1218
|
className: cn(
|
|
@@ -1041,20 +1227,20 @@ var Textarea = React11.forwardRef(({ className, ...props }, ref) => {
|
|
|
1041
1227
|
Textarea.displayName = "Textarea";
|
|
1042
1228
|
|
|
1043
1229
|
// src/components/easy/input/textarea.tsx
|
|
1044
|
-
var
|
|
1045
|
-
var EasyTextarea =
|
|
1230
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
1231
|
+
var EasyTextarea = React13.forwardRef(
|
|
1046
1232
|
({ label, helperText, errorText, id, name, className, ...props }, ref) => {
|
|
1047
|
-
const generatedId =
|
|
1233
|
+
const generatedId = React13.useId();
|
|
1048
1234
|
const textareaId = id ?? generatedId;
|
|
1049
1235
|
const helperId = helperText && !errorText ? `${textareaId}-helper` : void 0;
|
|
1050
1236
|
const errorId = errorText ? `${textareaId}-error` : void 0;
|
|
1051
|
-
const [isFocused, setIsFocused] =
|
|
1237
|
+
const [isFocused, setIsFocused] = React13.useState(false);
|
|
1052
1238
|
const hasError = Boolean(errorText);
|
|
1053
1239
|
const baseTextareaClasses = "min-h-[96px] w-full rounded-[var(--ui-radius-lg)] border border-[var(--ui-border-200)] bg-[var(--ui-background-0)] px-4 py-3 text-base font-medium text-[var(--ui-text-900)] placeholder:text-[var(--ui-text-400)] transition-all resize-y";
|
|
1054
1240
|
const focusClasses2 = "focus-visible:outline-none focus-visible:ring-0 focus-visible:ring-offset-0 focus-visible:shadow-[0_0_0_1px_var(--ui-background-0),_0_0_0_2px_var(--ui-border-200)]";
|
|
1055
1241
|
const disabledClasses2 = "disabled:cursor-not-allowed disabled:bg-[var(--ui-background-100)] disabled:text-[var(--ui-text-400)]";
|
|
1056
|
-
return /* @__PURE__ */ (0,
|
|
1057
|
-
label && /* @__PURE__ */ (0,
|
|
1242
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "flex w-full flex-col gap-1.5", children: [
|
|
1243
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1058
1244
|
"label",
|
|
1059
1245
|
{
|
|
1060
1246
|
htmlFor: textareaId,
|
|
@@ -1062,7 +1248,7 @@ var EasyTextarea = React12.forwardRef(
|
|
|
1062
1248
|
children: label
|
|
1063
1249
|
}
|
|
1064
1250
|
),
|
|
1065
|
-
/* @__PURE__ */ (0,
|
|
1251
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1066
1252
|
Textarea,
|
|
1067
1253
|
{
|
|
1068
1254
|
ref,
|
|
@@ -1090,27 +1276,27 @@ var EasyTextarea = React12.forwardRef(
|
|
|
1090
1276
|
...props
|
|
1091
1277
|
}
|
|
1092
1278
|
),
|
|
1093
|
-
hasError ? /* @__PURE__ */ (0,
|
|
1279
|
+
hasError ? /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
1094
1280
|
"p",
|
|
1095
1281
|
{
|
|
1096
1282
|
id: errorId,
|
|
1097
1283
|
className: "flex items-center gap-1 text-sm text-[var(--ui-danger-base)]",
|
|
1098
1284
|
children: [
|
|
1099
|
-
/* @__PURE__ */ (0,
|
|
1285
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_lucide_react7.AlertCircle, { className: "size-4" }),
|
|
1100
1286
|
errorText
|
|
1101
1287
|
]
|
|
1102
1288
|
}
|
|
1103
|
-
) : helperText ? /* @__PURE__ */ (0,
|
|
1289
|
+
) : helperText ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { id: helperId, className: "text-sm text-[var(--ui-text-500)]", children: helperText }) : null
|
|
1104
1290
|
] });
|
|
1105
1291
|
}
|
|
1106
1292
|
);
|
|
1107
1293
|
EasyTextarea.displayName = "EasyTextarea";
|
|
1108
1294
|
|
|
1109
1295
|
// src/components/easy/checkbox.tsx
|
|
1110
|
-
var
|
|
1111
|
-
var
|
|
1112
|
-
var
|
|
1113
|
-
var EasyCheckbox =
|
|
1296
|
+
var React14 = __toESM(require("react"), 1);
|
|
1297
|
+
var import_lucide_react8 = require("lucide-react");
|
|
1298
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
1299
|
+
var EasyCheckbox = React14.forwardRef(
|
|
1114
1300
|
({
|
|
1115
1301
|
label,
|
|
1116
1302
|
helperText,
|
|
@@ -1121,11 +1307,11 @@ var EasyCheckbox = React13.forwardRef(
|
|
|
1121
1307
|
disabled,
|
|
1122
1308
|
...props
|
|
1123
1309
|
}, ref) => {
|
|
1124
|
-
const generatedId =
|
|
1310
|
+
const generatedId = React14.useId();
|
|
1125
1311
|
const inputId = id ?? generatedId;
|
|
1126
1312
|
const helperId = helperText && !errorText ? `${inputId}-helper` : void 0;
|
|
1127
1313
|
const errorId = errorText ? `${inputId}-error` : void 0;
|
|
1128
|
-
return /* @__PURE__ */ (0,
|
|
1314
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: cn("flex w-full flex-col gap-1.5", className), children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
1129
1315
|
"label",
|
|
1130
1316
|
{
|
|
1131
1317
|
htmlFor: inputId,
|
|
@@ -1134,7 +1320,7 @@ var EasyCheckbox = React13.forwardRef(
|
|
|
1134
1320
|
disabled && "cursor-not-allowed opacity-60"
|
|
1135
1321
|
),
|
|
1136
1322
|
children: [
|
|
1137
|
-
/* @__PURE__ */ (0,
|
|
1323
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1138
1324
|
ShadcnCheckbox,
|
|
1139
1325
|
{
|
|
1140
1326
|
ref,
|
|
@@ -1153,9 +1339,9 @@ var EasyCheckbox = React13.forwardRef(
|
|
|
1153
1339
|
...props
|
|
1154
1340
|
}
|
|
1155
1341
|
),
|
|
1156
|
-
/* @__PURE__ */ (0,
|
|
1157
|
-
label && /* @__PURE__ */ (0,
|
|
1158
|
-
helperText && !errorText && /* @__PURE__ */ (0,
|
|
1342
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex flex-col gap-0.5", children: [
|
|
1343
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: cn(getTypographyClass("body-medium"), "text-[var(--ui-text-500)]"), children: label }),
|
|
1344
|
+
helperText && !errorText && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1159
1345
|
"span",
|
|
1160
1346
|
{
|
|
1161
1347
|
id: helperId,
|
|
@@ -1163,13 +1349,13 @@ var EasyCheckbox = React13.forwardRef(
|
|
|
1163
1349
|
children: helperText
|
|
1164
1350
|
}
|
|
1165
1351
|
),
|
|
1166
|
-
errorText && /* @__PURE__ */ (0,
|
|
1352
|
+
errorText && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
1167
1353
|
"span",
|
|
1168
1354
|
{
|
|
1169
1355
|
id: errorId,
|
|
1170
1356
|
className: "flex items-center gap-1 text-sm text-[var(--ui-danger-base)]",
|
|
1171
1357
|
children: [
|
|
1172
|
-
/* @__PURE__ */ (0,
|
|
1358
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react8.AlertCircle, { className: "size-4" }),
|
|
1173
1359
|
errorText
|
|
1174
1360
|
]
|
|
1175
1361
|
}
|
|
@@ -1183,9 +1369,9 @@ var EasyCheckbox = React13.forwardRef(
|
|
|
1183
1369
|
EasyCheckbox.displayName = "EasyCheckbox";
|
|
1184
1370
|
|
|
1185
1371
|
// src/components/easy/container.tsx
|
|
1186
|
-
var
|
|
1372
|
+
var React15 = __toESM(require("react"), 1);
|
|
1187
1373
|
var import_class_variance_authority3 = require("class-variance-authority");
|
|
1188
|
-
var
|
|
1374
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
1189
1375
|
var containerVariants = (0, import_class_variance_authority3.cva)(
|
|
1190
1376
|
"mx-auto w-full",
|
|
1191
1377
|
{
|
|
@@ -1211,9 +1397,9 @@ var containerVariants = (0, import_class_variance_authority3.cva)(
|
|
|
1211
1397
|
}
|
|
1212
1398
|
}
|
|
1213
1399
|
);
|
|
1214
|
-
var EasyContainer =
|
|
1400
|
+
var EasyContainer = React15.forwardRef(
|
|
1215
1401
|
({ className, size, padding, ...props }, ref) => {
|
|
1216
|
-
return /* @__PURE__ */ (0,
|
|
1402
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1217
1403
|
"div",
|
|
1218
1404
|
{
|
|
1219
1405
|
ref,
|
|
@@ -1226,11 +1412,11 @@ var EasyContainer = React14.forwardRef(
|
|
|
1226
1412
|
EasyContainer.displayName = "EasyContainer";
|
|
1227
1413
|
|
|
1228
1414
|
// src/components/easy/typography/display.tsx
|
|
1229
|
-
var
|
|
1230
|
-
var
|
|
1231
|
-
var EasyDisplay =
|
|
1415
|
+
var React16 = __toESM(require("react"), 1);
|
|
1416
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
1417
|
+
var EasyDisplay = React16.forwardRef(
|
|
1232
1418
|
({ className, variant = "medium", as: Component = "h1", ...props }, ref) => {
|
|
1233
|
-
return /* @__PURE__ */ (0,
|
|
1419
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1234
1420
|
Component,
|
|
1235
1421
|
{
|
|
1236
1422
|
ref,
|
|
@@ -1246,18 +1432,18 @@ var EasyDisplay = React15.forwardRef(
|
|
|
1246
1432
|
EasyDisplay.displayName = "EasyDisplay";
|
|
1247
1433
|
|
|
1248
1434
|
// src/components/easy/typography/heading.tsx
|
|
1249
|
-
var
|
|
1250
|
-
var
|
|
1435
|
+
var React17 = __toESM(require("react"), 1);
|
|
1436
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1251
1437
|
var defaultHeadingElements = {
|
|
1252
1438
|
large: "h1",
|
|
1253
1439
|
medium: "h2",
|
|
1254
1440
|
small: "h3",
|
|
1255
1441
|
xsmall: "h4"
|
|
1256
1442
|
};
|
|
1257
|
-
var EasyHeading =
|
|
1443
|
+
var EasyHeading = React17.forwardRef(
|
|
1258
1444
|
({ className, variant = "medium", as, ...props }, ref) => {
|
|
1259
1445
|
const Component = as ?? defaultHeadingElements[variant];
|
|
1260
|
-
return /* @__PURE__ */ (0,
|
|
1446
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1261
1447
|
Component,
|
|
1262
1448
|
{
|
|
1263
1449
|
ref,
|
|
@@ -1273,11 +1459,11 @@ var EasyHeading = React16.forwardRef(
|
|
|
1273
1459
|
EasyHeading.displayName = "EasyHeading";
|
|
1274
1460
|
|
|
1275
1461
|
// src/components/easy/typography/label.tsx
|
|
1276
|
-
var
|
|
1277
|
-
var
|
|
1278
|
-
var EasyLabel =
|
|
1462
|
+
var React18 = __toESM(require("react"), 1);
|
|
1463
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1464
|
+
var EasyLabel = React18.forwardRef(
|
|
1279
1465
|
({ className, variant = "medium", as: Component = "label", ...props }, ref) => {
|
|
1280
|
-
return /* @__PURE__ */ (0,
|
|
1466
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1281
1467
|
Component,
|
|
1282
1468
|
{
|
|
1283
1469
|
ref,
|
|
@@ -1293,11 +1479,11 @@ var EasyLabel = React17.forwardRef(
|
|
|
1293
1479
|
EasyLabel.displayName = "EasyLabel";
|
|
1294
1480
|
|
|
1295
1481
|
// src/components/easy/typography/body.tsx
|
|
1296
|
-
var
|
|
1297
|
-
var
|
|
1298
|
-
var EasyBody =
|
|
1482
|
+
var React19 = __toESM(require("react"), 1);
|
|
1483
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1484
|
+
var EasyBody = React19.forwardRef(
|
|
1299
1485
|
({ className, variant = "medium", as: Component = "p", ...props }, ref) => {
|
|
1300
|
-
return /* @__PURE__ */ (0,
|
|
1486
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1301
1487
|
Component,
|
|
1302
1488
|
{
|
|
1303
1489
|
ref,
|
|
@@ -1321,17 +1507,17 @@ var EasyTypography = {
|
|
|
1321
1507
|
};
|
|
1322
1508
|
|
|
1323
1509
|
// src/components/easy/error-message.tsx
|
|
1324
|
-
var
|
|
1325
|
-
var
|
|
1326
|
-
var WarningTriangleIcon = () => /* @__PURE__ */ (0,
|
|
1327
|
-
/* @__PURE__ */ (0,
|
|
1328
|
-
/* @__PURE__ */ (0,
|
|
1329
|
-
/* @__PURE__ */ (0,
|
|
1330
|
-
/* @__PURE__ */ (0,
|
|
1510
|
+
var React20 = __toESM(require("react"), 1);
|
|
1511
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1512
|
+
var WarningTriangleIcon = () => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("svg", { width: "32", height: "32", viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
1513
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("path", { d: "M6.6027 21.8034L13.6201 7.8074C14.6039 5.84505 17.405 5.84556 18.3881 7.80828L25.399 21.8043C26.2873 23.5775 24.998 25.6653 23.0148 25.6653H8.98652C7.00288 25.6653 5.71363 23.5767 6.6027 21.8034Z", fill: "#E93534", stroke: "#E93534", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
1514
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M17.1951 8.40674C16.7035 7.42539 15.303 7.42513 14.8111 8.40631L7.79374 22.4023C7.3492 23.289 7.99383 24.3333 8.98564 24.3333H23.0139C24.0055 24.3333 24.6502 23.2894 24.206 22.4028L17.1951 8.40674ZM12.4273 7.2111C13.9031 4.26757 18.1046 4.26834 19.5794 7.21241L26.5903 21.2084C27.9226 23.8682 25.9887 26.9999 23.0139 26.9999H8.98564C6.01018 26.9999 4.07631 23.867 5.40991 21.2071L12.4273 7.2111Z", fill: "#E93534" }),
|
|
1515
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("path", { d: "M17.3327 21.3333C17.3327 22.0697 16.7357 22.6667 15.9993 22.6667C15.263 22.6667 14.666 22.0697 14.666 21.3333C14.666 20.597 15.263 20 15.9993 20C16.7357 20 17.3327 20.597 17.3327 21.3333Z", fill: "white" }),
|
|
1516
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("path", { d: "M14.666 12.0013C14.666 11.2649 15.263 10.668 15.9993 10.668C16.7357 10.668 17.3327 11.2649 17.3327 12.0013V17.3346C17.3327 18.071 16.7357 18.668 15.9993 18.668C15.263 18.668 14.666 18.071 14.666 17.3346V12.0013Z", fill: "white" })
|
|
1331
1517
|
] });
|
|
1332
|
-
var EasyErrorMessage =
|
|
1518
|
+
var EasyErrorMessage = React20.forwardRef(
|
|
1333
1519
|
({ className, title, description, icon, ...props }, ref) => {
|
|
1334
|
-
return /* @__PURE__ */ (0,
|
|
1520
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
1335
1521
|
"div",
|
|
1336
1522
|
{
|
|
1337
1523
|
ref,
|
|
@@ -1342,9 +1528,9 @@ var EasyErrorMessage = React19.forwardRef(
|
|
|
1342
1528
|
),
|
|
1343
1529
|
...props,
|
|
1344
1530
|
children: [
|
|
1345
|
-
/* @__PURE__ */ (0,
|
|
1346
|
-
/* @__PURE__ */ (0,
|
|
1347
|
-
/* @__PURE__ */ (0,
|
|
1531
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: "flex-shrink-0", children: icon ?? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(WarningTriangleIcon, {}) }),
|
|
1532
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "flex flex-col items-center text-center", children: [
|
|
1533
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1348
1534
|
"div",
|
|
1349
1535
|
{
|
|
1350
1536
|
className: cn(
|
|
@@ -1354,7 +1540,7 @@ var EasyErrorMessage = React19.forwardRef(
|
|
|
1354
1540
|
children: title
|
|
1355
1541
|
}
|
|
1356
1542
|
),
|
|
1357
|
-
description && /* @__PURE__ */ (0,
|
|
1543
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1358
1544
|
"div",
|
|
1359
1545
|
{
|
|
1360
1546
|
className: cn(
|
|
@@ -1373,16 +1559,16 @@ var EasyErrorMessage = React19.forwardRef(
|
|
|
1373
1559
|
EasyErrorMessage.displayName = "EasyErrorMessage";
|
|
1374
1560
|
|
|
1375
1561
|
// src/components/easy/message-dialog.tsx
|
|
1376
|
-
var
|
|
1562
|
+
var import_lucide_react10 = require("lucide-react");
|
|
1377
1563
|
|
|
1378
1564
|
// src/components/ui/dialog.tsx
|
|
1379
|
-
var
|
|
1565
|
+
var React21 = __toESM(require("react"), 1);
|
|
1380
1566
|
var DialogPrimitive = __toESM(require("@radix-ui/react-dialog"), 1);
|
|
1381
|
-
var
|
|
1382
|
-
var
|
|
1567
|
+
var import_lucide_react9 = require("lucide-react");
|
|
1568
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1383
1569
|
var ShadcnDialog = DialogPrimitive.Root;
|
|
1384
1570
|
var ShadcnDialogPortal = DialogPrimitive.Portal;
|
|
1385
|
-
var ShadcnDialogOverlay =
|
|
1571
|
+
var ShadcnDialogOverlay = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1386
1572
|
DialogPrimitive.Overlay,
|
|
1387
1573
|
{
|
|
1388
1574
|
ref,
|
|
@@ -1394,9 +1580,9 @@ var ShadcnDialogOverlay = React20.forwardRef(({ className, ...props }, ref) => /
|
|
|
1394
1580
|
}
|
|
1395
1581
|
));
|
|
1396
1582
|
ShadcnDialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
1397
|
-
var ShadcnDialogContent =
|
|
1398
|
-
/* @__PURE__ */ (0,
|
|
1399
|
-
/* @__PURE__ */ (0,
|
|
1583
|
+
var ShadcnDialogContent = React21.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(ShadcnDialogPortal, { children: [
|
|
1584
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(ShadcnDialogOverlay, {}),
|
|
1585
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
1400
1586
|
DialogPrimitive.Content,
|
|
1401
1587
|
{
|
|
1402
1588
|
ref,
|
|
@@ -1407,16 +1593,16 @@ var ShadcnDialogContent = React20.forwardRef(({ className, children, ...props },
|
|
|
1407
1593
|
...props,
|
|
1408
1594
|
children: [
|
|
1409
1595
|
children,
|
|
1410
|
-
/* @__PURE__ */ (0,
|
|
1411
|
-
/* @__PURE__ */ (0,
|
|
1412
|
-
/* @__PURE__ */ (0,
|
|
1596
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(DialogPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-[var(--ui-ring)] focus:ring-offset-2 disabled:pointer-events-none", children: [
|
|
1597
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_lucide_react9.X, { className: "size-4" }),
|
|
1598
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "sr-only", children: "Kapat" })
|
|
1413
1599
|
] })
|
|
1414
1600
|
]
|
|
1415
1601
|
}
|
|
1416
1602
|
)
|
|
1417
1603
|
] }));
|
|
1418
1604
|
ShadcnDialogContent.displayName = DialogPrimitive.Content.displayName;
|
|
1419
|
-
var ShadcnDialogHeader = ({ className, ...props }) => /* @__PURE__ */ (0,
|
|
1605
|
+
var ShadcnDialogHeader = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1420
1606
|
"div",
|
|
1421
1607
|
{
|
|
1422
1608
|
className: cn(
|
|
@@ -1427,7 +1613,7 @@ var ShadcnDialogHeader = ({ className, ...props }) => /* @__PURE__ */ (0, import
|
|
|
1427
1613
|
}
|
|
1428
1614
|
);
|
|
1429
1615
|
ShadcnDialogHeader.displayName = "ShadcnDialogHeader";
|
|
1430
|
-
var ShadcnDialogFooter = ({ className, ...props }) => /* @__PURE__ */ (0,
|
|
1616
|
+
var ShadcnDialogFooter = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1431
1617
|
"div",
|
|
1432
1618
|
{
|
|
1433
1619
|
className: cn(
|
|
@@ -1438,7 +1624,7 @@ var ShadcnDialogFooter = ({ className, ...props }) => /* @__PURE__ */ (0, import
|
|
|
1438
1624
|
}
|
|
1439
1625
|
);
|
|
1440
1626
|
ShadcnDialogFooter.displayName = "ShadcnDialogFooter";
|
|
1441
|
-
var ShadcnDialogTitle =
|
|
1627
|
+
var ShadcnDialogTitle = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1442
1628
|
DialogPrimitive.Title,
|
|
1443
1629
|
{
|
|
1444
1630
|
ref,
|
|
@@ -1450,7 +1636,7 @@ var ShadcnDialogTitle = React20.forwardRef(({ className, ...props }, ref) => /*
|
|
|
1450
1636
|
}
|
|
1451
1637
|
));
|
|
1452
1638
|
ShadcnDialogTitle.displayName = DialogPrimitive.Title.displayName;
|
|
1453
|
-
var ShadcnDialogDescription =
|
|
1639
|
+
var ShadcnDialogDescription = React21.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1454
1640
|
DialogPrimitive.Description,
|
|
1455
1641
|
{
|
|
1456
1642
|
ref,
|
|
@@ -1464,22 +1650,22 @@ var ShadcnDialogDescription = React20.forwardRef(({ className, ...props }, ref)
|
|
|
1464
1650
|
ShadcnDialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
1465
1651
|
|
|
1466
1652
|
// src/components/easy/message-dialog.tsx
|
|
1467
|
-
var
|
|
1653
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1468
1654
|
var iconConfig = {
|
|
1469
1655
|
success: {
|
|
1470
|
-
Icon:
|
|
1656
|
+
Icon: import_lucide_react10.CheckCircle,
|
|
1471
1657
|
containerClass: "bg-[var(--ui-success-light)]",
|
|
1472
1658
|
iconClass: "text-[var(--ui-success-base)]",
|
|
1473
1659
|
titleClass: "text-[var(--ui-success-base)]"
|
|
1474
1660
|
},
|
|
1475
1661
|
warning: {
|
|
1476
|
-
Icon:
|
|
1662
|
+
Icon: import_lucide_react10.AlertTriangle,
|
|
1477
1663
|
containerClass: "bg-[var(--ui-warning-light)]",
|
|
1478
1664
|
iconClass: "text-[var(--ui-warning-base)]",
|
|
1479
1665
|
titleClass: "text-[var(--ui-warning-base)]"
|
|
1480
1666
|
},
|
|
1481
1667
|
error: {
|
|
1482
|
-
Icon:
|
|
1668
|
+
Icon: import_lucide_react10.AlertTriangle,
|
|
1483
1669
|
containerClass: "bg-[var(--ui-danger-light)]",
|
|
1484
1670
|
iconClass: "text-[var(--ui-danger-base)]",
|
|
1485
1671
|
titleClass: "text-[var(--ui-danger-base)]"
|
|
@@ -1505,21 +1691,21 @@ var EasyMessageDialog = ({
|
|
|
1505
1691
|
onClose();
|
|
1506
1692
|
}
|
|
1507
1693
|
};
|
|
1508
|
-
return /* @__PURE__ */ (0,
|
|
1509
|
-
/* @__PURE__ */ (0,
|
|
1510
|
-
/* @__PURE__ */ (0,
|
|
1511
|
-
/* @__PURE__ */ (0,
|
|
1512
|
-
/* @__PURE__ */ (0,
|
|
1694
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ShadcnDialog, { open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(ShadcnDialogContent, { className: "sm:max-w-md rounded-xl", children: [
|
|
1695
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ShadcnDialogTitle, { className: "sr-only", children: title }),
|
|
1696
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ShadcnDialogDescription, { className: "sr-only", children: message }),
|
|
1697
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: "flex flex-col items-center gap-4 px-6 py-4 text-center", children: [
|
|
1698
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1513
1699
|
"div",
|
|
1514
1700
|
{
|
|
1515
1701
|
className: cn(
|
|
1516
1702
|
"flex size-16 items-center justify-center rounded-full",
|
|
1517
1703
|
containerClass
|
|
1518
1704
|
),
|
|
1519
|
-
children: /* @__PURE__ */ (0,
|
|
1705
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Icon2, { className: cn("size-8", iconClass) })
|
|
1520
1706
|
}
|
|
1521
1707
|
),
|
|
1522
|
-
/* @__PURE__ */ (0,
|
|
1708
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1523
1709
|
EasyHeading,
|
|
1524
1710
|
{
|
|
1525
1711
|
as: "h3",
|
|
@@ -1529,8 +1715,8 @@ var EasyMessageDialog = ({
|
|
|
1529
1715
|
children: title
|
|
1530
1716
|
}
|
|
1531
1717
|
),
|
|
1532
|
-
/* @__PURE__ */ (0,
|
|
1533
|
-
/* @__PURE__ */ (0,
|
|
1718
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(EasyBody, { as: "p", variant: "medium", className: "text-[var(--ui-text-500)]", children: message }),
|
|
1719
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1534
1720
|
EasyButton,
|
|
1535
1721
|
{
|
|
1536
1722
|
variant: "important",
|
|
@@ -1547,7 +1733,7 @@ var EasyMessageDialog = ({
|
|
|
1547
1733
|
EasyMessageDialog.displayName = "EasyMessageDialog";
|
|
1548
1734
|
|
|
1549
1735
|
// src/components/easy/dialog.tsx
|
|
1550
|
-
var
|
|
1736
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1551
1737
|
var EasyDialog = ({
|
|
1552
1738
|
open,
|
|
1553
1739
|
onOpenChange,
|
|
@@ -1580,11 +1766,11 @@ var EasyDialog = ({
|
|
|
1580
1766
|
onOpenChange(false);
|
|
1581
1767
|
}
|
|
1582
1768
|
};
|
|
1583
|
-
return /* @__PURE__ */ (0,
|
|
1584
|
-
title && /* @__PURE__ */ (0,
|
|
1585
|
-
/* @__PURE__ */ (0,
|
|
1586
|
-
(showCancel || showOk) && /* @__PURE__ */ (0,
|
|
1587
|
-
showCancel && /* @__PURE__ */ (0,
|
|
1769
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ShadcnDialog, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(ShadcnDialogContent, { className: cn("sm:max-w-lg rounded-xl", className), children: [
|
|
1770
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ShadcnDialogHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ShadcnDialogTitle, { children: title }) }),
|
|
1771
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: cn("py-4", !title && "pt-0", contentClassName), children: content }),
|
|
1772
|
+
(showCancel || showOk) && /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(ShadcnDialogFooter, { className: "flex flex-row gap-4 w-full", children: [
|
|
1773
|
+
showCancel && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1588
1774
|
EasyButton,
|
|
1589
1775
|
{
|
|
1590
1776
|
variant: cancelVariant,
|
|
@@ -1595,7 +1781,7 @@ var EasyDialog = ({
|
|
|
1595
1781
|
children: cancelText
|
|
1596
1782
|
}
|
|
1597
1783
|
),
|
|
1598
|
-
showOk && /* @__PURE__ */ (0,
|
|
1784
|
+
showOk && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1599
1785
|
EasyButton,
|
|
1600
1786
|
{
|
|
1601
1787
|
variant: okVariant,
|
|
@@ -1612,20 +1798,20 @@ var EasyDialog = ({
|
|
|
1612
1798
|
EasyDialog.displayName = "EasyDialog";
|
|
1613
1799
|
|
|
1614
1800
|
// src/components/easy/sidebar.tsx
|
|
1615
|
-
var
|
|
1801
|
+
var React27 = __toESM(require("react"), 1);
|
|
1616
1802
|
|
|
1617
1803
|
// src/components/ui/sidebar.tsx
|
|
1618
|
-
var
|
|
1804
|
+
var React26 = __toESM(require("react"), 1);
|
|
1619
1805
|
var import_react_slot2 = require("@radix-ui/react-slot");
|
|
1620
1806
|
var import_class_variance_authority5 = require("class-variance-authority");
|
|
1621
|
-
var
|
|
1807
|
+
var import_lucide_react12 = require("lucide-react");
|
|
1622
1808
|
|
|
1623
1809
|
// src/hooks/use-mobile.tsx
|
|
1624
|
-
var
|
|
1810
|
+
var React22 = __toESM(require("react"), 1);
|
|
1625
1811
|
var MOBILE_BREAKPOINT = 768;
|
|
1626
1812
|
function useIsMobile() {
|
|
1627
|
-
const [isMobile, setIsMobile] =
|
|
1628
|
-
|
|
1813
|
+
const [isMobile, setIsMobile] = React22.useState(void 0);
|
|
1814
|
+
React22.useEffect(() => {
|
|
1629
1815
|
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
|
|
1630
1816
|
const onChange = () => {
|
|
1631
1817
|
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
@@ -1638,11 +1824,11 @@ function useIsMobile() {
|
|
|
1638
1824
|
}
|
|
1639
1825
|
|
|
1640
1826
|
// src/components/ui/separator.tsx
|
|
1641
|
-
var
|
|
1827
|
+
var React23 = __toESM(require("react"), 1);
|
|
1642
1828
|
var SeparatorPrimitive = __toESM(require("@radix-ui/react-separator"), 1);
|
|
1643
|
-
var
|
|
1644
|
-
var Separator =
|
|
1645
|
-
({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ (0,
|
|
1829
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1830
|
+
var Separator = React23.forwardRef(
|
|
1831
|
+
({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1646
1832
|
SeparatorPrimitive.Root,
|
|
1647
1833
|
{
|
|
1648
1834
|
ref,
|
|
@@ -1660,14 +1846,14 @@ var Separator = React22.forwardRef(
|
|
|
1660
1846
|
Separator.displayName = SeparatorPrimitive.Root.displayName;
|
|
1661
1847
|
|
|
1662
1848
|
// src/components/ui/sheet.tsx
|
|
1663
|
-
var
|
|
1849
|
+
var React24 = __toESM(require("react"), 1);
|
|
1664
1850
|
var SheetPrimitive = __toESM(require("@radix-ui/react-dialog"), 1);
|
|
1665
1851
|
var import_class_variance_authority4 = require("class-variance-authority");
|
|
1666
|
-
var
|
|
1667
|
-
var
|
|
1852
|
+
var import_lucide_react11 = require("lucide-react");
|
|
1853
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1668
1854
|
var Sheet = SheetPrimitive.Root;
|
|
1669
1855
|
var SheetPortal = SheetPrimitive.Portal;
|
|
1670
|
-
var SheetOverlay =
|
|
1856
|
+
var SheetOverlay = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1671
1857
|
SheetPrimitive.Overlay,
|
|
1672
1858
|
{
|
|
1673
1859
|
className: cn(
|
|
@@ -1695,9 +1881,9 @@ var sheetVariants = (0, import_class_variance_authority4.cva)(
|
|
|
1695
1881
|
}
|
|
1696
1882
|
}
|
|
1697
1883
|
);
|
|
1698
|
-
var SheetContent =
|
|
1699
|
-
/* @__PURE__ */ (0,
|
|
1700
|
-
/* @__PURE__ */ (0,
|
|
1884
|
+
var SheetContent = React24.forwardRef(({ side = "right", className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(SheetPortal, { children: [
|
|
1885
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(SheetOverlay, {}),
|
|
1886
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
1701
1887
|
SheetPrimitive.Content,
|
|
1702
1888
|
{
|
|
1703
1889
|
ref,
|
|
@@ -1705,9 +1891,9 @@ var SheetContent = React23.forwardRef(({ side = "right", className, children, ..
|
|
|
1705
1891
|
...props,
|
|
1706
1892
|
children: [
|
|
1707
1893
|
children,
|
|
1708
|
-
/* @__PURE__ */ (0,
|
|
1709
|
-
/* @__PURE__ */ (0,
|
|
1710
|
-
/* @__PURE__ */ (0,
|
|
1894
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(SheetPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary", children: [
|
|
1895
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_lucide_react11.X, { className: "h-4 w-4" }),
|
|
1896
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "sr-only", children: "Close" })
|
|
1711
1897
|
] })
|
|
1712
1898
|
]
|
|
1713
1899
|
}
|
|
@@ -1717,7 +1903,7 @@ SheetContent.displayName = SheetPrimitive.Content.displayName;
|
|
|
1717
1903
|
var SheetHeader = ({
|
|
1718
1904
|
className,
|
|
1719
1905
|
...props
|
|
1720
|
-
}) => /* @__PURE__ */ (0,
|
|
1906
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1721
1907
|
"div",
|
|
1722
1908
|
{
|
|
1723
1909
|
className: cn(
|
|
@@ -1731,7 +1917,7 @@ SheetHeader.displayName = "SheetHeader";
|
|
|
1731
1917
|
var SheetFooter = ({
|
|
1732
1918
|
className,
|
|
1733
1919
|
...props
|
|
1734
|
-
}) => /* @__PURE__ */ (0,
|
|
1920
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1735
1921
|
"div",
|
|
1736
1922
|
{
|
|
1737
1923
|
className: cn(
|
|
@@ -1742,7 +1928,7 @@ var SheetFooter = ({
|
|
|
1742
1928
|
}
|
|
1743
1929
|
);
|
|
1744
1930
|
SheetFooter.displayName = "SheetFooter";
|
|
1745
|
-
var SheetTitle =
|
|
1931
|
+
var SheetTitle = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1746
1932
|
SheetPrimitive.Title,
|
|
1747
1933
|
{
|
|
1748
1934
|
ref,
|
|
@@ -1751,7 +1937,7 @@ var SheetTitle = React23.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
1751
1937
|
}
|
|
1752
1938
|
));
|
|
1753
1939
|
SheetTitle.displayName = SheetPrimitive.Title.displayName;
|
|
1754
|
-
var SheetDescription =
|
|
1940
|
+
var SheetDescription = React24.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1755
1941
|
SheetPrimitive.Description,
|
|
1756
1942
|
{
|
|
1757
1943
|
ref,
|
|
@@ -1762,12 +1948,12 @@ var SheetDescription = React23.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
1762
1948
|
SheetDescription.displayName = SheetPrimitive.Description.displayName;
|
|
1763
1949
|
|
|
1764
1950
|
// src/components/ui/skeleton.tsx
|
|
1765
|
-
var
|
|
1951
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1766
1952
|
function Skeleton({
|
|
1767
1953
|
className,
|
|
1768
1954
|
...props
|
|
1769
1955
|
}) {
|
|
1770
|
-
return /* @__PURE__ */ (0,
|
|
1956
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1771
1957
|
"div",
|
|
1772
1958
|
{
|
|
1773
1959
|
className: cn("animate-pulse rounded-md bg-muted", className),
|
|
@@ -1777,13 +1963,13 @@ function Skeleton({
|
|
|
1777
1963
|
}
|
|
1778
1964
|
|
|
1779
1965
|
// src/components/ui/tooltip.tsx
|
|
1780
|
-
var
|
|
1966
|
+
var React25 = __toESM(require("react"), 1);
|
|
1781
1967
|
var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"), 1);
|
|
1782
|
-
var
|
|
1968
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
1783
1969
|
var TooltipProvider = TooltipPrimitive.Provider;
|
|
1784
1970
|
var Tooltip = TooltipPrimitive.Root;
|
|
1785
1971
|
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
1786
|
-
var TooltipContent =
|
|
1972
|
+
var TooltipContent = React25.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1787
1973
|
TooltipPrimitive.Content,
|
|
1788
1974
|
{
|
|
1789
1975
|
ref,
|
|
@@ -1798,22 +1984,22 @@ var TooltipContent = React24.forwardRef(({ className, sideOffset = 4, ...props }
|
|
|
1798
1984
|
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
1799
1985
|
|
|
1800
1986
|
// src/components/ui/sidebar.tsx
|
|
1801
|
-
var
|
|
1987
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
1802
1988
|
var SIDEBAR_COOKIE_NAME = "sidebar_state";
|
|
1803
1989
|
var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
1804
1990
|
var SIDEBAR_WIDTH = "16rem";
|
|
1805
1991
|
var SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
1806
1992
|
var SIDEBAR_WIDTH_ICON = "3rem";
|
|
1807
1993
|
var SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
|
1808
|
-
var SidebarContext =
|
|
1994
|
+
var SidebarContext = React26.createContext(null);
|
|
1809
1995
|
function useSidebar() {
|
|
1810
|
-
const context =
|
|
1996
|
+
const context = React26.useContext(SidebarContext);
|
|
1811
1997
|
if (!context) {
|
|
1812
1998
|
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
1813
1999
|
}
|
|
1814
2000
|
return context;
|
|
1815
2001
|
}
|
|
1816
|
-
var SidebarProvider =
|
|
2002
|
+
var SidebarProvider = React26.forwardRef(
|
|
1817
2003
|
({
|
|
1818
2004
|
defaultOpen = true,
|
|
1819
2005
|
open: openProp,
|
|
@@ -1824,10 +2010,10 @@ var SidebarProvider = React25.forwardRef(
|
|
|
1824
2010
|
...props
|
|
1825
2011
|
}, ref) => {
|
|
1826
2012
|
const isMobile = useIsMobile();
|
|
1827
|
-
const [openMobile, setOpenMobile] =
|
|
1828
|
-
const [_open, _setOpen] =
|
|
2013
|
+
const [openMobile, setOpenMobile] = React26.useState(false);
|
|
2014
|
+
const [_open, _setOpen] = React26.useState(defaultOpen);
|
|
1829
2015
|
const open = openProp ?? _open;
|
|
1830
|
-
const setOpen =
|
|
2016
|
+
const setOpen = React26.useCallback(
|
|
1831
2017
|
(value) => {
|
|
1832
2018
|
const openState = typeof value === "function" ? value(open) : value;
|
|
1833
2019
|
if (setOpenProp) {
|
|
@@ -1839,10 +2025,10 @@ var SidebarProvider = React25.forwardRef(
|
|
|
1839
2025
|
},
|
|
1840
2026
|
[setOpenProp, open]
|
|
1841
2027
|
);
|
|
1842
|
-
const toggleSidebar =
|
|
2028
|
+
const toggleSidebar = React26.useCallback(() => {
|
|
1843
2029
|
return isMobile ? setOpenMobile((open2) => !open2) : setOpen((open2) => !open2);
|
|
1844
2030
|
}, [isMobile, setOpen, setOpenMobile]);
|
|
1845
|
-
|
|
2031
|
+
React26.useEffect(() => {
|
|
1846
2032
|
const handleKeyDown = (event) => {
|
|
1847
2033
|
if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
|
|
1848
2034
|
event.preventDefault();
|
|
@@ -1853,7 +2039,7 @@ var SidebarProvider = React25.forwardRef(
|
|
|
1853
2039
|
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
1854
2040
|
}, [toggleSidebar]);
|
|
1855
2041
|
const state = open ? "expanded" : "collapsed";
|
|
1856
|
-
const contextValue =
|
|
2042
|
+
const contextValue = React26.useMemo(
|
|
1857
2043
|
() => ({
|
|
1858
2044
|
state,
|
|
1859
2045
|
open,
|
|
@@ -1865,7 +2051,7 @@ var SidebarProvider = React25.forwardRef(
|
|
|
1865
2051
|
}),
|
|
1866
2052
|
[state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar]
|
|
1867
2053
|
);
|
|
1868
|
-
return /* @__PURE__ */ (0,
|
|
2054
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1869
2055
|
"div",
|
|
1870
2056
|
{
|
|
1871
2057
|
style: {
|
|
@@ -1885,7 +2071,7 @@ var SidebarProvider = React25.forwardRef(
|
|
|
1885
2071
|
}
|
|
1886
2072
|
);
|
|
1887
2073
|
SidebarProvider.displayName = "SidebarProvider";
|
|
1888
|
-
var Sidebar =
|
|
2074
|
+
var Sidebar = React26.forwardRef(
|
|
1889
2075
|
({
|
|
1890
2076
|
side = "left",
|
|
1891
2077
|
variant = "sidebar",
|
|
@@ -1896,7 +2082,7 @@ var Sidebar = React25.forwardRef(
|
|
|
1896
2082
|
}, ref) => {
|
|
1897
2083
|
const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
|
|
1898
2084
|
if (collapsible === "none") {
|
|
1899
|
-
return /* @__PURE__ */ (0,
|
|
2085
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1900
2086
|
"div",
|
|
1901
2087
|
{
|
|
1902
2088
|
className: cn(
|
|
@@ -1910,7 +2096,7 @@ var Sidebar = React25.forwardRef(
|
|
|
1910
2096
|
);
|
|
1911
2097
|
}
|
|
1912
2098
|
if (isMobile) {
|
|
1913
|
-
return /* @__PURE__ */ (0,
|
|
2099
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Sheet, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
1914
2100
|
SheetContent,
|
|
1915
2101
|
{
|
|
1916
2102
|
"data-sidebar": "sidebar",
|
|
@@ -1921,16 +2107,16 @@ var Sidebar = React25.forwardRef(
|
|
|
1921
2107
|
},
|
|
1922
2108
|
side,
|
|
1923
2109
|
children: [
|
|
1924
|
-
/* @__PURE__ */ (0,
|
|
1925
|
-
/* @__PURE__ */ (0,
|
|
1926
|
-
/* @__PURE__ */ (0,
|
|
2110
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(SheetHeader, { className: "sr-only", children: [
|
|
2111
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(SheetTitle, { children: "Sidebar" }),
|
|
2112
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(SheetDescription, { children: "Displays the mobile sidebar." })
|
|
1927
2113
|
] }),
|
|
1928
|
-
/* @__PURE__ */ (0,
|
|
2114
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "flex h-full w-full flex-col", children })
|
|
1929
2115
|
]
|
|
1930
2116
|
}
|
|
1931
2117
|
) });
|
|
1932
2118
|
}
|
|
1933
|
-
return /* @__PURE__ */ (0,
|
|
2119
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
1934
2120
|
"div",
|
|
1935
2121
|
{
|
|
1936
2122
|
ref,
|
|
@@ -1940,7 +2126,7 @@ var Sidebar = React25.forwardRef(
|
|
|
1940
2126
|
"data-variant": variant,
|
|
1941
2127
|
"data-side": side,
|
|
1942
2128
|
children: [
|
|
1943
|
-
/* @__PURE__ */ (0,
|
|
2129
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1944
2130
|
"div",
|
|
1945
2131
|
{
|
|
1946
2132
|
className: cn(
|
|
@@ -1951,7 +2137,7 @@ var Sidebar = React25.forwardRef(
|
|
|
1951
2137
|
)
|
|
1952
2138
|
}
|
|
1953
2139
|
),
|
|
1954
|
-
/* @__PURE__ */ (0,
|
|
2140
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1955
2141
|
"div",
|
|
1956
2142
|
{
|
|
1957
2143
|
className: cn(
|
|
@@ -1962,7 +2148,7 @@ var Sidebar = React25.forwardRef(
|
|
|
1962
2148
|
className
|
|
1963
2149
|
),
|
|
1964
2150
|
...props,
|
|
1965
|
-
children: /* @__PURE__ */ (0,
|
|
2151
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
1966
2152
|
"div",
|
|
1967
2153
|
{
|
|
1968
2154
|
"data-sidebar": "sidebar",
|
|
@@ -1978,9 +2164,9 @@ var Sidebar = React25.forwardRef(
|
|
|
1978
2164
|
}
|
|
1979
2165
|
);
|
|
1980
2166
|
Sidebar.displayName = "Sidebar";
|
|
1981
|
-
var SidebarTrigger =
|
|
2167
|
+
var SidebarTrigger = React26.forwardRef(({ className, onClick, ...props }, ref) => {
|
|
1982
2168
|
const { toggleSidebar } = useSidebar();
|
|
1983
|
-
return /* @__PURE__ */ (0,
|
|
2169
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
1984
2170
|
ShadcnButton,
|
|
1985
2171
|
{
|
|
1986
2172
|
ref,
|
|
@@ -1994,16 +2180,16 @@ var SidebarTrigger = React25.forwardRef(({ className, onClick, ...props }, ref)
|
|
|
1994
2180
|
},
|
|
1995
2181
|
...props,
|
|
1996
2182
|
children: [
|
|
1997
|
-
/* @__PURE__ */ (0,
|
|
1998
|
-
/* @__PURE__ */ (0,
|
|
2183
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_lucide_react12.PanelLeft, {}),
|
|
2184
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "sr-only", children: "Toggle Sidebar" })
|
|
1999
2185
|
]
|
|
2000
2186
|
}
|
|
2001
2187
|
);
|
|
2002
2188
|
});
|
|
2003
2189
|
SidebarTrigger.displayName = "SidebarTrigger";
|
|
2004
|
-
var SidebarRail =
|
|
2190
|
+
var SidebarRail = React26.forwardRef(({ className, ...props }, ref) => {
|
|
2005
2191
|
const { toggleSidebar } = useSidebar();
|
|
2006
|
-
return /* @__PURE__ */ (0,
|
|
2192
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2007
2193
|
"button",
|
|
2008
2194
|
{
|
|
2009
2195
|
ref,
|
|
@@ -2026,8 +2212,8 @@ var SidebarRail = React25.forwardRef(({ className, ...props }, ref) => {
|
|
|
2026
2212
|
);
|
|
2027
2213
|
});
|
|
2028
2214
|
SidebarRail.displayName = "SidebarRail";
|
|
2029
|
-
var SidebarInset =
|
|
2030
|
-
return /* @__PURE__ */ (0,
|
|
2215
|
+
var SidebarInset = React26.forwardRef(({ className, ...props }, ref) => {
|
|
2216
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2031
2217
|
"main",
|
|
2032
2218
|
{
|
|
2033
2219
|
ref,
|
|
@@ -2041,8 +2227,8 @@ var SidebarInset = React25.forwardRef(({ className, ...props }, ref) => {
|
|
|
2041
2227
|
);
|
|
2042
2228
|
});
|
|
2043
2229
|
SidebarInset.displayName = "SidebarInset";
|
|
2044
|
-
var SidebarInput =
|
|
2045
|
-
return /* @__PURE__ */ (0,
|
|
2230
|
+
var SidebarInput = React26.forwardRef(({ className, ...props }, ref) => {
|
|
2231
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2046
2232
|
ShadcnInput,
|
|
2047
2233
|
{
|
|
2048
2234
|
ref,
|
|
@@ -2056,8 +2242,8 @@ var SidebarInput = React25.forwardRef(({ className, ...props }, ref) => {
|
|
|
2056
2242
|
);
|
|
2057
2243
|
});
|
|
2058
2244
|
SidebarInput.displayName = "SidebarInput";
|
|
2059
|
-
var SidebarHeader =
|
|
2060
|
-
return /* @__PURE__ */ (0,
|
|
2245
|
+
var SidebarHeader = React26.forwardRef(({ className, ...props }, ref) => {
|
|
2246
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2061
2247
|
"div",
|
|
2062
2248
|
{
|
|
2063
2249
|
ref,
|
|
@@ -2068,8 +2254,8 @@ var SidebarHeader = React25.forwardRef(({ className, ...props }, ref) => {
|
|
|
2068
2254
|
);
|
|
2069
2255
|
});
|
|
2070
2256
|
SidebarHeader.displayName = "SidebarHeader";
|
|
2071
|
-
var SidebarFooter =
|
|
2072
|
-
return /* @__PURE__ */ (0,
|
|
2257
|
+
var SidebarFooter = React26.forwardRef(({ className, ...props }, ref) => {
|
|
2258
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2073
2259
|
"div",
|
|
2074
2260
|
{
|
|
2075
2261
|
ref,
|
|
@@ -2080,8 +2266,8 @@ var SidebarFooter = React25.forwardRef(({ className, ...props }, ref) => {
|
|
|
2080
2266
|
);
|
|
2081
2267
|
});
|
|
2082
2268
|
SidebarFooter.displayName = "SidebarFooter";
|
|
2083
|
-
var SidebarSeparator =
|
|
2084
|
-
return /* @__PURE__ */ (0,
|
|
2269
|
+
var SidebarSeparator = React26.forwardRef(({ className, ...props }, ref) => {
|
|
2270
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2085
2271
|
Separator,
|
|
2086
2272
|
{
|
|
2087
2273
|
ref,
|
|
@@ -2092,8 +2278,8 @@ var SidebarSeparator = React25.forwardRef(({ className, ...props }, ref) => {
|
|
|
2092
2278
|
);
|
|
2093
2279
|
});
|
|
2094
2280
|
SidebarSeparator.displayName = "SidebarSeparator";
|
|
2095
|
-
var SidebarContent =
|
|
2096
|
-
return /* @__PURE__ */ (0,
|
|
2281
|
+
var SidebarContent = React26.forwardRef(({ className, ...props }, ref) => {
|
|
2282
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2097
2283
|
"div",
|
|
2098
2284
|
{
|
|
2099
2285
|
ref,
|
|
@@ -2107,8 +2293,8 @@ var SidebarContent = React25.forwardRef(({ className, ...props }, ref) => {
|
|
|
2107
2293
|
);
|
|
2108
2294
|
});
|
|
2109
2295
|
SidebarContent.displayName = "SidebarContent";
|
|
2110
|
-
var SidebarGroup =
|
|
2111
|
-
return /* @__PURE__ */ (0,
|
|
2296
|
+
var SidebarGroup = React26.forwardRef(({ className, ...props }, ref) => {
|
|
2297
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2112
2298
|
"div",
|
|
2113
2299
|
{
|
|
2114
2300
|
ref,
|
|
@@ -2119,9 +2305,9 @@ var SidebarGroup = React25.forwardRef(({ className, ...props }, ref) => {
|
|
|
2119
2305
|
);
|
|
2120
2306
|
});
|
|
2121
2307
|
SidebarGroup.displayName = "SidebarGroup";
|
|
2122
|
-
var SidebarGroupLabel =
|
|
2308
|
+
var SidebarGroupLabel = React26.forwardRef(({ className, asChild = false, ...props }, ref) => {
|
|
2123
2309
|
const Comp = asChild ? import_react_slot2.Slot : "div";
|
|
2124
|
-
return /* @__PURE__ */ (0,
|
|
2310
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2125
2311
|
Comp,
|
|
2126
2312
|
{
|
|
2127
2313
|
ref,
|
|
@@ -2136,9 +2322,9 @@ var SidebarGroupLabel = React25.forwardRef(({ className, asChild = false, ...pro
|
|
|
2136
2322
|
);
|
|
2137
2323
|
});
|
|
2138
2324
|
SidebarGroupLabel.displayName = "SidebarGroupLabel";
|
|
2139
|
-
var SidebarGroupAction =
|
|
2325
|
+
var SidebarGroupAction = React26.forwardRef(({ className, asChild = false, ...props }, ref) => {
|
|
2140
2326
|
const Comp = asChild ? import_react_slot2.Slot : "button";
|
|
2141
|
-
return /* @__PURE__ */ (0,
|
|
2327
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2142
2328
|
Comp,
|
|
2143
2329
|
{
|
|
2144
2330
|
ref,
|
|
@@ -2155,7 +2341,7 @@ var SidebarGroupAction = React25.forwardRef(({ className, asChild = false, ...pr
|
|
|
2155
2341
|
);
|
|
2156
2342
|
});
|
|
2157
2343
|
SidebarGroupAction.displayName = "SidebarGroupAction";
|
|
2158
|
-
var SidebarGroupContent =
|
|
2344
|
+
var SidebarGroupContent = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2159
2345
|
"div",
|
|
2160
2346
|
{
|
|
2161
2347
|
ref,
|
|
@@ -2165,7 +2351,7 @@ var SidebarGroupContent = React25.forwardRef(({ className, ...props }, ref) => /
|
|
|
2165
2351
|
}
|
|
2166
2352
|
));
|
|
2167
2353
|
SidebarGroupContent.displayName = "SidebarGroupContent";
|
|
2168
|
-
var SidebarMenu =
|
|
2354
|
+
var SidebarMenu = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2169
2355
|
"ul",
|
|
2170
2356
|
{
|
|
2171
2357
|
ref,
|
|
@@ -2175,7 +2361,7 @@ var SidebarMenu = React25.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
2175
2361
|
}
|
|
2176
2362
|
));
|
|
2177
2363
|
SidebarMenu.displayName = "SidebarMenu";
|
|
2178
|
-
var SidebarMenuItem =
|
|
2364
|
+
var SidebarMenuItem = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2179
2365
|
"li",
|
|
2180
2366
|
{
|
|
2181
2367
|
ref,
|
|
@@ -2205,7 +2391,7 @@ var sidebarMenuButtonVariants = (0, import_class_variance_authority5.cva)(
|
|
|
2205
2391
|
}
|
|
2206
2392
|
}
|
|
2207
2393
|
);
|
|
2208
|
-
var SidebarMenuButton =
|
|
2394
|
+
var SidebarMenuButton = React26.forwardRef(
|
|
2209
2395
|
({
|
|
2210
2396
|
asChild = false,
|
|
2211
2397
|
isActive = false,
|
|
@@ -2217,7 +2403,7 @@ var SidebarMenuButton = React25.forwardRef(
|
|
|
2217
2403
|
}, ref) => {
|
|
2218
2404
|
const Comp = asChild ? import_react_slot2.Slot : "button";
|
|
2219
2405
|
const { isMobile, state } = useSidebar();
|
|
2220
|
-
const button = /* @__PURE__ */ (0,
|
|
2406
|
+
const button = /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2221
2407
|
Comp,
|
|
2222
2408
|
{
|
|
2223
2409
|
ref,
|
|
@@ -2236,9 +2422,9 @@ var SidebarMenuButton = React25.forwardRef(
|
|
|
2236
2422
|
children: tooltip
|
|
2237
2423
|
};
|
|
2238
2424
|
}
|
|
2239
|
-
return /* @__PURE__ */ (0,
|
|
2240
|
-
/* @__PURE__ */ (0,
|
|
2241
|
-
/* @__PURE__ */ (0,
|
|
2425
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(Tooltip, { children: [
|
|
2426
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(TooltipTrigger, { asChild: true, children: button }),
|
|
2427
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2242
2428
|
TooltipContent,
|
|
2243
2429
|
{
|
|
2244
2430
|
side: "right",
|
|
@@ -2251,9 +2437,9 @@ var SidebarMenuButton = React25.forwardRef(
|
|
|
2251
2437
|
}
|
|
2252
2438
|
);
|
|
2253
2439
|
SidebarMenuButton.displayName = "SidebarMenuButton";
|
|
2254
|
-
var SidebarMenuAction =
|
|
2440
|
+
var SidebarMenuAction = React26.forwardRef(({ className, asChild = false, showOnHover = false, ...props }, ref) => {
|
|
2255
2441
|
const Comp = asChild ? import_react_slot2.Slot : "button";
|
|
2256
|
-
return /* @__PURE__ */ (0,
|
|
2442
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2257
2443
|
Comp,
|
|
2258
2444
|
{
|
|
2259
2445
|
ref,
|
|
@@ -2274,7 +2460,7 @@ var SidebarMenuAction = React25.forwardRef(({ className, asChild = false, showOn
|
|
|
2274
2460
|
);
|
|
2275
2461
|
});
|
|
2276
2462
|
SidebarMenuAction.displayName = "SidebarMenuAction";
|
|
2277
|
-
var SidebarMenuBadge =
|
|
2463
|
+
var SidebarMenuBadge = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2278
2464
|
"div",
|
|
2279
2465
|
{
|
|
2280
2466
|
ref,
|
|
@@ -2292,11 +2478,11 @@ var SidebarMenuBadge = React25.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
2292
2478
|
}
|
|
2293
2479
|
));
|
|
2294
2480
|
SidebarMenuBadge.displayName = "SidebarMenuBadge";
|
|
2295
|
-
var SidebarMenuSkeleton =
|
|
2296
|
-
const width =
|
|
2481
|
+
var SidebarMenuSkeleton = React26.forwardRef(({ className, showIcon = false, ...props }, ref) => {
|
|
2482
|
+
const width = React26.useMemo(() => {
|
|
2297
2483
|
return `${Math.floor(Math.random() * 40) + 50}%`;
|
|
2298
2484
|
}, []);
|
|
2299
|
-
return /* @__PURE__ */ (0,
|
|
2485
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
2300
2486
|
"div",
|
|
2301
2487
|
{
|
|
2302
2488
|
ref,
|
|
@@ -2304,14 +2490,14 @@ var SidebarMenuSkeleton = React25.forwardRef(({ className, showIcon = false, ...
|
|
|
2304
2490
|
className: cn("flex h-8 items-center gap-2 rounded-md px-2", className),
|
|
2305
2491
|
...props,
|
|
2306
2492
|
children: [
|
|
2307
|
-
showIcon && /* @__PURE__ */ (0,
|
|
2493
|
+
showIcon && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2308
2494
|
Skeleton,
|
|
2309
2495
|
{
|
|
2310
2496
|
className: "size-4 rounded-md",
|
|
2311
2497
|
"data-sidebar": "menu-skeleton-icon"
|
|
2312
2498
|
}
|
|
2313
2499
|
),
|
|
2314
|
-
/* @__PURE__ */ (0,
|
|
2500
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2315
2501
|
Skeleton,
|
|
2316
2502
|
{
|
|
2317
2503
|
className: "h-4 max-w-[--skeleton-width] flex-1",
|
|
@@ -2326,7 +2512,7 @@ var SidebarMenuSkeleton = React25.forwardRef(({ className, showIcon = false, ...
|
|
|
2326
2512
|
);
|
|
2327
2513
|
});
|
|
2328
2514
|
SidebarMenuSkeleton.displayName = "SidebarMenuSkeleton";
|
|
2329
|
-
var SidebarMenuSub =
|
|
2515
|
+
var SidebarMenuSub = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2330
2516
|
"ul",
|
|
2331
2517
|
{
|
|
2332
2518
|
ref,
|
|
@@ -2340,11 +2526,11 @@ var SidebarMenuSub = React25.forwardRef(({ className, ...props }, ref) => /* @__
|
|
|
2340
2526
|
}
|
|
2341
2527
|
));
|
|
2342
2528
|
SidebarMenuSub.displayName = "SidebarMenuSub";
|
|
2343
|
-
var SidebarMenuSubItem =
|
|
2529
|
+
var SidebarMenuSubItem = React26.forwardRef(({ ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("li", { ref, ...props }));
|
|
2344
2530
|
SidebarMenuSubItem.displayName = "SidebarMenuSubItem";
|
|
2345
|
-
var SidebarMenuSubButton =
|
|
2531
|
+
var SidebarMenuSubButton = React26.forwardRef(({ asChild = false, size = "md", isActive, className, ...props }, ref) => {
|
|
2346
2532
|
const Comp = asChild ? import_react_slot2.Slot : "a";
|
|
2347
|
-
return /* @__PURE__ */ (0,
|
|
2533
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2348
2534
|
Comp,
|
|
2349
2535
|
{
|
|
2350
2536
|
ref,
|
|
@@ -2366,10 +2552,10 @@ var SidebarMenuSubButton = React25.forwardRef(({ asChild = false, size = "md", i
|
|
|
2366
2552
|
SidebarMenuSubButton.displayName = "SidebarMenuSubButton";
|
|
2367
2553
|
|
|
2368
2554
|
// src/components/easy/sidebar.tsx
|
|
2369
|
-
var
|
|
2370
|
-
var EasySidebar =
|
|
2555
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
2556
|
+
var EasySidebar = React27.forwardRef(
|
|
2371
2557
|
({ title, description, menuItems, className, ...props }, ref) => {
|
|
2372
|
-
return /* @__PURE__ */ (0,
|
|
2558
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2373
2559
|
SidebarProvider,
|
|
2374
2560
|
{
|
|
2375
2561
|
ref,
|
|
@@ -2379,12 +2565,12 @@ var EasySidebar = React26.forwardRef(
|
|
|
2379
2565
|
),
|
|
2380
2566
|
style: { "--sidebar-width": "100%" },
|
|
2381
2567
|
...props,
|
|
2382
|
-
children: /* @__PURE__ */ (0,
|
|
2383
|
-
(title || description) && /* @__PURE__ */ (0,
|
|
2384
|
-
title && /* @__PURE__ */ (0,
|
|
2385
|
-
description && /* @__PURE__ */ (0,
|
|
2568
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Sidebar, { collapsible: "none", className: "w-full bg-transparent text-[var(--ui-text-900)]", children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(SidebarContent, { className: "gap-6 px-0", children: [
|
|
2569
|
+
(title || description) && /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "space-y-1 px-2 text-left", children: [
|
|
2570
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(EasyHeading, { variant: "large", as: "h2", className: "text-[var(--ui-text-900)] font-semibold text-xl", children: title }),
|
|
2571
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(EasyBody, { variant: "small", className: "text-[var(--ui-text-600)]", children: description })
|
|
2386
2572
|
] }),
|
|
2387
|
-
/* @__PURE__ */ (0,
|
|
2573
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(SidebarMenu, { className: "gap-2 px-1", children: menuItems.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(SidebarMenuItem, { children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
2388
2574
|
SidebarMenuButton,
|
|
2389
2575
|
{
|
|
2390
2576
|
type: "button",
|
|
@@ -2392,13 +2578,13 @@ var EasySidebar = React26.forwardRef(
|
|
|
2392
2578
|
className: "h-11 bg-transparent px-3 py-1.5 text-[var(--ui-text-600)] data-[active=true]:bg-[var(--ui-decorative-green)] data-[active=true]:text-[var(--ui-text-900)] data-[active=true]:rounded-md",
|
|
2393
2579
|
onClick: () => item.onClick?.(),
|
|
2394
2580
|
children: [
|
|
2395
|
-
item.icon && /* @__PURE__ */ (0,
|
|
2581
|
+
item.icon && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: cn(
|
|
2396
2582
|
"text-[var(--ui-text-500)]",
|
|
2397
2583
|
item.active && "text-[var(--ui-primary-500)]"
|
|
2398
2584
|
), children: item.icon }),
|
|
2399
|
-
/* @__PURE__ */ (0,
|
|
2400
|
-
/* @__PURE__ */ (0,
|
|
2401
|
-
item.description && /* @__PURE__ */ (0,
|
|
2585
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("span", { className: "flex flex-1 flex-col text-left", children: [
|
|
2586
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(EasyBody, { variant: "medium", className: "text-[var(--ui-text-900)] font-medium", children: item.label }),
|
|
2587
|
+
item.description && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(EasyBody, { variant: "small", className: "text-[var(--ui-text-500)]", children: item.description })
|
|
2402
2588
|
] })
|
|
2403
2589
|
]
|
|
2404
2590
|
}
|
|
@@ -2411,9 +2597,9 @@ var EasySidebar = React26.forwardRef(
|
|
|
2411
2597
|
EasySidebar.displayName = "EasySidebar";
|
|
2412
2598
|
|
|
2413
2599
|
// src/components/easy/tabs.tsx
|
|
2414
|
-
var
|
|
2600
|
+
var React28 = __toESM(require("react"), 1);
|
|
2415
2601
|
var import_class_variance_authority6 = require("class-variance-authority");
|
|
2416
|
-
var
|
|
2602
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
2417
2603
|
var tabsListVariants = (0, import_class_variance_authority6.cva)(
|
|
2418
2604
|
"inline-flex items-center justify-start gap-1 rounded-lg bg-transparent",
|
|
2419
2605
|
{
|
|
@@ -2445,8 +2631,8 @@ var tabsTriggerVariants = (0, import_class_variance_authority6.cva)(
|
|
|
2445
2631
|
}
|
|
2446
2632
|
);
|
|
2447
2633
|
var EasyTabs = Tabs;
|
|
2448
|
-
var EasyTabsList =
|
|
2449
|
-
return /* @__PURE__ */ (0,
|
|
2634
|
+
var EasyTabsList = React28.forwardRef(({ className, size, ...props }, ref) => {
|
|
2635
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2450
2636
|
TabsList,
|
|
2451
2637
|
{
|
|
2452
2638
|
ref,
|
|
@@ -2456,8 +2642,8 @@ var EasyTabsList = React27.forwardRef(({ className, size, ...props }, ref) => {
|
|
|
2456
2642
|
);
|
|
2457
2643
|
});
|
|
2458
2644
|
EasyTabsList.displayName = "EasyTabsList";
|
|
2459
|
-
var EasyTabsTrigger =
|
|
2460
|
-
return /* @__PURE__ */ (0,
|
|
2645
|
+
var EasyTabsTrigger = React28.forwardRef(({ className, size, children, ...props }, ref) => {
|
|
2646
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
2461
2647
|
TabsTrigger,
|
|
2462
2648
|
{
|
|
2463
2649
|
ref,
|
|
@@ -2471,14 +2657,14 @@ var EasyTabsTrigger = React27.forwardRef(({ className, size, children, ...props
|
|
|
2471
2657
|
...props,
|
|
2472
2658
|
children: [
|
|
2473
2659
|
children,
|
|
2474
|
-
/* @__PURE__ */ (0,
|
|
2660
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "absolute bottom-[-10px] left-0 right-0 h-0.5 bg-gradient-to-r from-[var(--ui-primary-500)] to-[var(--ui-cabir-yellow)] opacity-0 transition-opacity duration-200" })
|
|
2475
2661
|
]
|
|
2476
2662
|
}
|
|
2477
2663
|
);
|
|
2478
2664
|
});
|
|
2479
2665
|
EasyTabsTrigger.displayName = "EasyTabsTrigger";
|
|
2480
|
-
var EasyTabsContent =
|
|
2481
|
-
return /* @__PURE__ */ (0,
|
|
2666
|
+
var EasyTabsContent = React28.forwardRef(({ className, ...props }, ref) => {
|
|
2667
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2482
2668
|
TabsContent,
|
|
2483
2669
|
{
|
|
2484
2670
|
ref,
|
|
@@ -2490,16 +2676,16 @@ var EasyTabsContent = React27.forwardRef(({ className, ...props }, ref) => {
|
|
|
2490
2676
|
EasyTabsContent.displayName = "EasyTabsContent";
|
|
2491
2677
|
|
|
2492
2678
|
// src/components/easy/breadcrumb.tsx
|
|
2493
|
-
var
|
|
2679
|
+
var import_lucide_react14 = require("lucide-react");
|
|
2494
2680
|
|
|
2495
2681
|
// src/components/ui/breadcrumb.tsx
|
|
2496
|
-
var
|
|
2682
|
+
var React29 = __toESM(require("react"), 1);
|
|
2497
2683
|
var import_react_slot3 = require("@radix-ui/react-slot");
|
|
2498
|
-
var
|
|
2499
|
-
var
|
|
2500
|
-
var Breadcrumb =
|
|
2684
|
+
var import_lucide_react13 = require("lucide-react");
|
|
2685
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
2686
|
+
var Breadcrumb = React29.forwardRef(({ ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("nav", { ref, "aria-label": "breadcrumb", ...props }));
|
|
2501
2687
|
Breadcrumb.displayName = "Breadcrumb";
|
|
2502
|
-
var BreadcrumbList =
|
|
2688
|
+
var BreadcrumbList = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2503
2689
|
"ol",
|
|
2504
2690
|
{
|
|
2505
2691
|
ref,
|
|
@@ -2511,7 +2697,7 @@ var BreadcrumbList = React28.forwardRef(({ className, ...props }, ref) => /* @__
|
|
|
2511
2697
|
}
|
|
2512
2698
|
));
|
|
2513
2699
|
BreadcrumbList.displayName = "BreadcrumbList";
|
|
2514
|
-
var BreadcrumbItem =
|
|
2700
|
+
var BreadcrumbItem = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2515
2701
|
"li",
|
|
2516
2702
|
{
|
|
2517
2703
|
ref,
|
|
@@ -2520,9 +2706,9 @@ var BreadcrumbItem = React28.forwardRef(({ className, ...props }, ref) => /* @__
|
|
|
2520
2706
|
}
|
|
2521
2707
|
));
|
|
2522
2708
|
BreadcrumbItem.displayName = "BreadcrumbItem";
|
|
2523
|
-
var BreadcrumbLink =
|
|
2709
|
+
var BreadcrumbLink = React29.forwardRef(({ asChild, className, ...props }, ref) => {
|
|
2524
2710
|
const Comp = asChild ? import_react_slot3.Slot : "a";
|
|
2525
|
-
return /* @__PURE__ */ (0,
|
|
2711
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2526
2712
|
Comp,
|
|
2527
2713
|
{
|
|
2528
2714
|
ref,
|
|
@@ -2532,7 +2718,7 @@ var BreadcrumbLink = React28.forwardRef(({ asChild, className, ...props }, ref)
|
|
|
2532
2718
|
);
|
|
2533
2719
|
});
|
|
2534
2720
|
BreadcrumbLink.displayName = "BreadcrumbLink";
|
|
2535
|
-
var BreadcrumbPage =
|
|
2721
|
+
var BreadcrumbPage = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2536
2722
|
"span",
|
|
2537
2723
|
{
|
|
2538
2724
|
ref,
|
|
@@ -2548,21 +2734,21 @@ var BreadcrumbSeparator = ({
|
|
|
2548
2734
|
children,
|
|
2549
2735
|
className,
|
|
2550
2736
|
...props
|
|
2551
|
-
}) => /* @__PURE__ */ (0,
|
|
2737
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2552
2738
|
"li",
|
|
2553
2739
|
{
|
|
2554
2740
|
role: "presentation",
|
|
2555
2741
|
"aria-hidden": "true",
|
|
2556
2742
|
className: cn("[&>svg]:w-3.5 [&>svg]:h-3.5", className),
|
|
2557
2743
|
...props,
|
|
2558
|
-
children: children ?? /* @__PURE__ */ (0,
|
|
2744
|
+
children: children ?? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_lucide_react13.ChevronRight, {})
|
|
2559
2745
|
}
|
|
2560
2746
|
);
|
|
2561
2747
|
BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
|
|
2562
2748
|
var BreadcrumbEllipsis = ({
|
|
2563
2749
|
className,
|
|
2564
2750
|
...props
|
|
2565
|
-
}) => /* @__PURE__ */ (0,
|
|
2751
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
2566
2752
|
"span",
|
|
2567
2753
|
{
|
|
2568
2754
|
role: "presentation",
|
|
@@ -2570,15 +2756,15 @@ var BreadcrumbEllipsis = ({
|
|
|
2570
2756
|
className: cn("flex h-9 w-9 items-center justify-center", className),
|
|
2571
2757
|
...props,
|
|
2572
2758
|
children: [
|
|
2573
|
-
/* @__PURE__ */ (0,
|
|
2574
|
-
/* @__PURE__ */ (0,
|
|
2759
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_lucide_react13.MoreHorizontal, { className: "h-4 w-4" }),
|
|
2760
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "sr-only", children: "More" })
|
|
2575
2761
|
]
|
|
2576
2762
|
}
|
|
2577
2763
|
);
|
|
2578
2764
|
BreadcrumbEllipsis.displayName = "BreadcrumbElipssis";
|
|
2579
2765
|
|
|
2580
2766
|
// src/components/easy/breadcrumb.tsx
|
|
2581
|
-
var
|
|
2767
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
2582
2768
|
var defaultBreadcrumbMap = {
|
|
2583
2769
|
home: "Anasayfa",
|
|
2584
2770
|
"my-account": "Hesab\u0131m",
|
|
@@ -2615,11 +2801,11 @@ function EasyBreadcrumb({
|
|
|
2615
2801
|
if (displayItems.length <= 1) {
|
|
2616
2802
|
return null;
|
|
2617
2803
|
}
|
|
2618
|
-
return /* @__PURE__ */ (0,
|
|
2804
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Breadcrumb, { className, children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(BreadcrumbList, { children: displayItems.map((item, index) => {
|
|
2619
2805
|
const isLast = index === displayItems.length - 1;
|
|
2620
2806
|
const isActive = item.isActive ?? isLast;
|
|
2621
|
-
return /* @__PURE__ */ (0,
|
|
2622
|
-
/* @__PURE__ */ (0,
|
|
2807
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex items-center", children: [
|
|
2808
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(BreadcrumbItem, { children: isActive ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(BreadcrumbPage, { children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2623
2809
|
EasyLabel,
|
|
2624
2810
|
{
|
|
2625
2811
|
variant: "xsmall",
|
|
@@ -2629,7 +2815,7 @@ function EasyBreadcrumb({
|
|
|
2629
2815
|
),
|
|
2630
2816
|
children: item.label
|
|
2631
2817
|
}
|
|
2632
|
-
) }) : /* @__PURE__ */ (0,
|
|
2818
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(BreadcrumbLink, { href: item.href || "#", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2633
2819
|
EasyLabel,
|
|
2634
2820
|
{
|
|
2635
2821
|
variant: "xsmall",
|
|
@@ -2640,8 +2826,8 @@ function EasyBreadcrumb({
|
|
|
2640
2826
|
children: item.label
|
|
2641
2827
|
}
|
|
2642
2828
|
) }) }),
|
|
2643
|
-
!isLast && /* @__PURE__ */ (0,
|
|
2644
|
-
|
|
2829
|
+
!isLast && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(BreadcrumbSeparator, { className: "ml-2", children: separator ?? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2830
|
+
import_lucide_react14.ChevronRight,
|
|
2645
2831
|
{
|
|
2646
2832
|
size: 10,
|
|
2647
2833
|
className: "text-[var(--ui-icon-500)]"
|
|
@@ -2674,14 +2860,14 @@ function generateBreadcrumbItems(pathname) {
|
|
|
2674
2860
|
}
|
|
2675
2861
|
|
|
2676
2862
|
// src/components/easy/pagination.tsx
|
|
2677
|
-
var
|
|
2678
|
-
var
|
|
2863
|
+
var React32 = __toESM(require("react"), 1);
|
|
2864
|
+
var import_lucide_react17 = require("lucide-react");
|
|
2679
2865
|
|
|
2680
2866
|
// src/components/ui/pagination.tsx
|
|
2681
|
-
var
|
|
2682
|
-
var
|
|
2683
|
-
var
|
|
2684
|
-
var Pagination = ({ className, ...props }) => /* @__PURE__ */ (0,
|
|
2867
|
+
var React30 = __toESM(require("react"), 1);
|
|
2868
|
+
var import_lucide_react15 = require("lucide-react");
|
|
2869
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
2870
|
+
var Pagination = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2685
2871
|
"nav",
|
|
2686
2872
|
{
|
|
2687
2873
|
role: "navigation",
|
|
@@ -2691,7 +2877,7 @@ var Pagination = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_run
|
|
|
2691
2877
|
}
|
|
2692
2878
|
);
|
|
2693
2879
|
Pagination.displayName = "Pagination";
|
|
2694
|
-
var PaginationContent =
|
|
2880
|
+
var PaginationContent = React30.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2695
2881
|
"ul",
|
|
2696
2882
|
{
|
|
2697
2883
|
ref,
|
|
@@ -2700,14 +2886,14 @@ var PaginationContent = React29.forwardRef(({ className, ...props }, ref) => /*
|
|
|
2700
2886
|
}
|
|
2701
2887
|
));
|
|
2702
2888
|
PaginationContent.displayName = "PaginationContent";
|
|
2703
|
-
var PaginationItem =
|
|
2889
|
+
var PaginationItem = React30.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("li", { ref, className: cn("", className), ...props }));
|
|
2704
2890
|
PaginationItem.displayName = "PaginationItem";
|
|
2705
2891
|
var PaginationLink = ({
|
|
2706
2892
|
className,
|
|
2707
2893
|
isActive,
|
|
2708
2894
|
size = "icon",
|
|
2709
2895
|
...props
|
|
2710
|
-
}) => /* @__PURE__ */ (0,
|
|
2896
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2711
2897
|
"a",
|
|
2712
2898
|
{
|
|
2713
2899
|
"aria-current": isActive ? "page" : void 0,
|
|
@@ -2725,7 +2911,7 @@ PaginationLink.displayName = "PaginationLink";
|
|
|
2725
2911
|
var PaginationPrevious = ({
|
|
2726
2912
|
className,
|
|
2727
2913
|
...props
|
|
2728
|
-
}) => /* @__PURE__ */ (0,
|
|
2914
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
2729
2915
|
PaginationLink,
|
|
2730
2916
|
{
|
|
2731
2917
|
"aria-label": "Go to previous page",
|
|
@@ -2733,8 +2919,8 @@ var PaginationPrevious = ({
|
|
|
2733
2919
|
className: cn("gap-1 pl-2.5", className),
|
|
2734
2920
|
...props,
|
|
2735
2921
|
children: [
|
|
2736
|
-
/* @__PURE__ */ (0,
|
|
2737
|
-
/* @__PURE__ */ (0,
|
|
2922
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_lucide_react15.ChevronLeft, { className: "h-4 w-4" }),
|
|
2923
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { children: "Previous" })
|
|
2738
2924
|
]
|
|
2739
2925
|
}
|
|
2740
2926
|
);
|
|
@@ -2742,7 +2928,7 @@ PaginationPrevious.displayName = "PaginationPrevious";
|
|
|
2742
2928
|
var PaginationNext = ({
|
|
2743
2929
|
className,
|
|
2744
2930
|
...props
|
|
2745
|
-
}) => /* @__PURE__ */ (0,
|
|
2931
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
2746
2932
|
PaginationLink,
|
|
2747
2933
|
{
|
|
2748
2934
|
"aria-label": "Go to next page",
|
|
@@ -2750,8 +2936,8 @@ var PaginationNext = ({
|
|
|
2750
2936
|
className: cn("gap-1 pr-2.5", className),
|
|
2751
2937
|
...props,
|
|
2752
2938
|
children: [
|
|
2753
|
-
/* @__PURE__ */ (0,
|
|
2754
|
-
/* @__PURE__ */ (0,
|
|
2939
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { children: "Next" }),
|
|
2940
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_lucide_react15.ChevronRight, { className: "h-4 w-4" })
|
|
2755
2941
|
]
|
|
2756
2942
|
}
|
|
2757
2943
|
);
|
|
@@ -2759,28 +2945,28 @@ PaginationNext.displayName = "PaginationNext";
|
|
|
2759
2945
|
var PaginationEllipsis = ({
|
|
2760
2946
|
className,
|
|
2761
2947
|
...props
|
|
2762
|
-
}) => /* @__PURE__ */ (0,
|
|
2948
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
2763
2949
|
"span",
|
|
2764
2950
|
{
|
|
2765
2951
|
"aria-hidden": true,
|
|
2766
2952
|
className: cn("flex h-9 w-9 items-center justify-center", className),
|
|
2767
2953
|
...props,
|
|
2768
2954
|
children: [
|
|
2769
|
-
/* @__PURE__ */ (0,
|
|
2770
|
-
/* @__PURE__ */ (0,
|
|
2955
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_lucide_react15.MoreHorizontal, { className: "h-4 w-4" }),
|
|
2956
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "sr-only", children: "More pages" })
|
|
2771
2957
|
]
|
|
2772
2958
|
}
|
|
2773
2959
|
);
|
|
2774
2960
|
PaginationEllipsis.displayName = "PaginationEllipsis";
|
|
2775
2961
|
|
|
2776
2962
|
// src/components/ui/select.tsx
|
|
2777
|
-
var
|
|
2963
|
+
var React31 = __toESM(require("react"), 1);
|
|
2778
2964
|
var SelectPrimitive = __toESM(require("@radix-ui/react-select"), 1);
|
|
2779
|
-
var
|
|
2780
|
-
var
|
|
2965
|
+
var import_lucide_react16 = require("lucide-react");
|
|
2966
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
2781
2967
|
var Select = SelectPrimitive.Root;
|
|
2782
2968
|
var SelectValue = SelectPrimitive.Value;
|
|
2783
|
-
var SelectTrigger =
|
|
2969
|
+
var SelectTrigger = React31.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
2784
2970
|
SelectPrimitive.Trigger,
|
|
2785
2971
|
{
|
|
2786
2972
|
ref,
|
|
@@ -2791,12 +2977,12 @@ var SelectTrigger = React30.forwardRef(({ className, children, ...props }, ref)
|
|
|
2791
2977
|
...props,
|
|
2792
2978
|
children: [
|
|
2793
2979
|
children,
|
|
2794
|
-
/* @__PURE__ */ (0,
|
|
2980
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react16.ChevronDown, { className: "h-4 w-4 opacity-50" }) })
|
|
2795
2981
|
]
|
|
2796
2982
|
}
|
|
2797
2983
|
));
|
|
2798
2984
|
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
2799
|
-
var SelectScrollUpButton =
|
|
2985
|
+
var SelectScrollUpButton = React31.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2800
2986
|
SelectPrimitive.ScrollUpButton,
|
|
2801
2987
|
{
|
|
2802
2988
|
ref,
|
|
@@ -2805,11 +2991,11 @@ var SelectScrollUpButton = React30.forwardRef(({ className, ...props }, ref) =>
|
|
|
2805
2991
|
className
|
|
2806
2992
|
),
|
|
2807
2993
|
...props,
|
|
2808
|
-
children: /* @__PURE__ */ (0,
|
|
2994
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react16.ChevronUp, { className: "h-4 w-4" })
|
|
2809
2995
|
}
|
|
2810
2996
|
));
|
|
2811
2997
|
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
2812
|
-
var SelectScrollDownButton =
|
|
2998
|
+
var SelectScrollDownButton = React31.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2813
2999
|
SelectPrimitive.ScrollDownButton,
|
|
2814
3000
|
{
|
|
2815
3001
|
ref,
|
|
@@ -2818,11 +3004,11 @@ var SelectScrollDownButton = React30.forwardRef(({ className, ...props }, ref) =
|
|
|
2818
3004
|
className
|
|
2819
3005
|
),
|
|
2820
3006
|
...props,
|
|
2821
|
-
children: /* @__PURE__ */ (0,
|
|
3007
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react16.ChevronDown, { className: "h-4 w-4" })
|
|
2822
3008
|
}
|
|
2823
3009
|
));
|
|
2824
3010
|
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
2825
|
-
var SelectContent =
|
|
3011
|
+
var SelectContent = React31.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(SelectPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
2826
3012
|
SelectPrimitive.Content,
|
|
2827
3013
|
{
|
|
2828
3014
|
ref,
|
|
@@ -2834,8 +3020,8 @@ var SelectContent = React30.forwardRef(({ className, children, position = "poppe
|
|
|
2834
3020
|
position,
|
|
2835
3021
|
...props,
|
|
2836
3022
|
children: [
|
|
2837
|
-
/* @__PURE__ */ (0,
|
|
2838
|
-
/* @__PURE__ */ (0,
|
|
3023
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(SelectScrollUpButton, {}),
|
|
3024
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2839
3025
|
SelectPrimitive.Viewport,
|
|
2840
3026
|
{
|
|
2841
3027
|
className: cn(
|
|
@@ -2845,12 +3031,12 @@ var SelectContent = React30.forwardRef(({ className, children, position = "poppe
|
|
|
2845
3031
|
children
|
|
2846
3032
|
}
|
|
2847
3033
|
),
|
|
2848
|
-
/* @__PURE__ */ (0,
|
|
3034
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(SelectScrollDownButton, {})
|
|
2849
3035
|
]
|
|
2850
3036
|
}
|
|
2851
3037
|
) }));
|
|
2852
3038
|
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
2853
|
-
var SelectLabel =
|
|
3039
|
+
var SelectLabel = React31.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2854
3040
|
SelectPrimitive.Label,
|
|
2855
3041
|
{
|
|
2856
3042
|
ref,
|
|
@@ -2859,7 +3045,7 @@ var SelectLabel = React30.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
2859
3045
|
}
|
|
2860
3046
|
));
|
|
2861
3047
|
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
2862
|
-
var SelectItem =
|
|
3048
|
+
var SelectItem = React31.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
2863
3049
|
SelectPrimitive.Item,
|
|
2864
3050
|
{
|
|
2865
3051
|
ref,
|
|
@@ -2869,13 +3055,13 @@ var SelectItem = React30.forwardRef(({ className, children, ...props }, ref) =>
|
|
|
2869
3055
|
),
|
|
2870
3056
|
...props,
|
|
2871
3057
|
children: [
|
|
2872
|
-
/* @__PURE__ */ (0,
|
|
2873
|
-
/* @__PURE__ */ (0,
|
|
3058
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_lucide_react16.Check, { className: "h-4 w-4" }) }) }),
|
|
3059
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(SelectPrimitive.ItemText, { children })
|
|
2874
3060
|
]
|
|
2875
3061
|
}
|
|
2876
3062
|
));
|
|
2877
3063
|
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
2878
|
-
var SelectSeparator =
|
|
3064
|
+
var SelectSeparator = React31.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2879
3065
|
SelectPrimitive.Separator,
|
|
2880
3066
|
{
|
|
2881
3067
|
ref,
|
|
@@ -2886,7 +3072,7 @@ var SelectSeparator = React30.forwardRef(({ className, ...props }, ref) => /* @_
|
|
|
2886
3072
|
SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
2887
3073
|
|
|
2888
3074
|
// src/components/easy/pagination.tsx
|
|
2889
|
-
var
|
|
3075
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
2890
3076
|
function getItemRange(currentPage, pageSize, total) {
|
|
2891
3077
|
const start = (currentPage - 1) * pageSize + 1;
|
|
2892
3078
|
const end = Math.min(currentPage * pageSize, total);
|
|
@@ -2923,7 +3109,7 @@ function generatePageNumbers(currentPage, totalPages) {
|
|
|
2923
3109
|
}
|
|
2924
3110
|
return pages;
|
|
2925
3111
|
}
|
|
2926
|
-
var EasyPagination =
|
|
3112
|
+
var EasyPagination = React32.forwardRef(
|
|
2927
3113
|
({
|
|
2928
3114
|
total,
|
|
2929
3115
|
currentPage,
|
|
@@ -2934,7 +3120,7 @@ var EasyPagination = React31.forwardRef(
|
|
|
2934
3120
|
labels = {},
|
|
2935
3121
|
className
|
|
2936
3122
|
}, ref) => {
|
|
2937
|
-
const [goToPageValue, setGoToPageValue] =
|
|
3123
|
+
const [goToPageValue, setGoToPageValue] = React32.useState(currentPage.toString());
|
|
2938
3124
|
const totalPages = Math.ceil(total / pageSize);
|
|
2939
3125
|
const { start, end } = getItemRange(currentPage, pageSize, total);
|
|
2940
3126
|
const pageNumbers = generatePageNumbers(currentPage, totalPages);
|
|
@@ -2968,16 +3154,16 @@ var EasyPagination = React31.forwardRef(
|
|
|
2968
3154
|
onPageSizeChange?.(newPageSize);
|
|
2969
3155
|
onPageChange?.(1);
|
|
2970
3156
|
};
|
|
2971
|
-
|
|
3157
|
+
React32.useEffect(() => {
|
|
2972
3158
|
setGoToPageValue(currentPage.toString());
|
|
2973
3159
|
}, [currentPage]);
|
|
2974
|
-
return /* @__PURE__ */ (0,
|
|
3160
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
2975
3161
|
"div",
|
|
2976
3162
|
{
|
|
2977
3163
|
ref,
|
|
2978
3164
|
className: cn("flex w-full items-center justify-between gap-4", className),
|
|
2979
3165
|
children: [
|
|
2980
|
-
/* @__PURE__ */ (0,
|
|
3166
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
2981
3167
|
EasyBody,
|
|
2982
3168
|
{
|
|
2983
3169
|
variant: "medium",
|
|
@@ -2991,9 +3177,9 @@ var EasyPagination = React31.forwardRef(
|
|
|
2991
3177
|
]
|
|
2992
3178
|
}
|
|
2993
3179
|
),
|
|
2994
|
-
/* @__PURE__ */ (0,
|
|
2995
|
-
/* @__PURE__ */ (0,
|
|
2996
|
-
/* @__PURE__ */ (0,
|
|
3180
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "flex items-center gap-4", children: [
|
|
3181
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
3182
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
2997
3183
|
EasyBody,
|
|
2998
3184
|
{
|
|
2999
3185
|
variant: "medium",
|
|
@@ -3001,13 +3187,13 @@ var EasyPagination = React31.forwardRef(
|
|
|
3001
3187
|
children: perPage
|
|
3002
3188
|
}
|
|
3003
3189
|
),
|
|
3004
|
-
/* @__PURE__ */ (0,
|
|
3005
|
-
/* @__PURE__ */ (0,
|
|
3006
|
-
/* @__PURE__ */ (0,
|
|
3190
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(Select, { value: pageSize.toString(), onValueChange: handlePageSizeChange, children: [
|
|
3191
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(SelectTrigger, { className: "h-8 w-[80px] border-[var(--ui-border-200)] bg-[var(--ui-background-0)] text-base font-medium text-[var(--ui-text-900)] rounded-sm px-3 focus:outline-none focus:ring-0 focus:ring-offset-0 focus:shadow-[0_0_0_1px_var(--ui-background-0),_0_0_0_2px_var(--ui-border-200)]", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(SelectValue, {}) }),
|
|
3192
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(SelectContent, { children: pageSizeOptions.map((size) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(SelectItem, { value: size.toString(), children: size }, size)) })
|
|
3007
3193
|
] })
|
|
3008
3194
|
] }),
|
|
3009
|
-
/* @__PURE__ */ (0,
|
|
3010
|
-
/* @__PURE__ */ (0,
|
|
3195
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
3196
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3011
3197
|
EasyBody,
|
|
3012
3198
|
{
|
|
3013
3199
|
variant: "medium",
|
|
@@ -3015,7 +3201,7 @@ var EasyPagination = React31.forwardRef(
|
|
|
3015
3201
|
children: goToPage
|
|
3016
3202
|
}
|
|
3017
3203
|
),
|
|
3018
|
-
/* @__PURE__ */ (0,
|
|
3204
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("form", { onSubmit: handleGoToPage, className: "flex items-center gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3019
3205
|
Input,
|
|
3020
3206
|
{
|
|
3021
3207
|
type: "text",
|
|
@@ -3026,8 +3212,8 @@ var EasyPagination = React31.forwardRef(
|
|
|
3026
3212
|
}
|
|
3027
3213
|
) })
|
|
3028
3214
|
] }),
|
|
3029
|
-
/* @__PURE__ */ (0,
|
|
3030
|
-
/* @__PURE__ */ (0,
|
|
3215
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Pagination, { children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(PaginationContent, { children: [
|
|
3216
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(PaginationItem, { children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3031
3217
|
EasyButton,
|
|
3032
3218
|
{
|
|
3033
3219
|
variant: "text",
|
|
@@ -3035,15 +3221,15 @@ var EasyPagination = React31.forwardRef(
|
|
|
3035
3221
|
onClick: () => onPageChange?.(currentPage - 1),
|
|
3036
3222
|
disabled: currentPage === 1,
|
|
3037
3223
|
className: "h-8 w-8 p-0 rounded-sm border border-[var(--ui-border-200)] bg-[var(--ui-background-200)] hover:bg-[var(--ui-background-100)] disabled:opacity-50",
|
|
3038
|
-
children: /* @__PURE__ */ (0,
|
|
3224
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_lucide_react17.ChevronLeft, { className: "h-4 w-4" })
|
|
3039
3225
|
}
|
|
3040
3226
|
) }),
|
|
3041
3227
|
pageNumbers.map((page, index) => {
|
|
3042
3228
|
if (page === "ellipsis") {
|
|
3043
|
-
return /* @__PURE__ */ (0,
|
|
3229
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(PaginationItem, { children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(PaginationEllipsis, { className: "h-8 text-[var(--ui-text-600)]" }) }, `ellipsis-${index}`);
|
|
3044
3230
|
}
|
|
3045
3231
|
const isActive = page === currentPage;
|
|
3046
|
-
return /* @__PURE__ */ (0,
|
|
3232
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(PaginationItem, { children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3047
3233
|
EasyButton,
|
|
3048
3234
|
{
|
|
3049
3235
|
variant: isActive ? "primary" : "text",
|
|
@@ -3057,7 +3243,7 @@ var EasyPagination = React31.forwardRef(
|
|
|
3057
3243
|
}
|
|
3058
3244
|
) }, page);
|
|
3059
3245
|
}),
|
|
3060
|
-
/* @__PURE__ */ (0,
|
|
3246
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(PaginationItem, { children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3061
3247
|
EasyButton,
|
|
3062
3248
|
{
|
|
3063
3249
|
variant: "text",
|
|
@@ -3065,7 +3251,7 @@ var EasyPagination = React31.forwardRef(
|
|
|
3065
3251
|
onClick: () => onPageChange?.(currentPage + 1),
|
|
3066
3252
|
disabled: currentPage === totalPages,
|
|
3067
3253
|
className: "h-8 w-8 p-0 rounded-sm border border-[var(--ui-border-200)] bg-[var(--ui-background-200)] hover:bg-[var(--ui-background-100)] disabled:opacity-50",
|
|
3068
|
-
children: /* @__PURE__ */ (0,
|
|
3254
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_lucide_react17.ChevronRight, { className: "h-4 w-4" })
|
|
3069
3255
|
}
|
|
3070
3256
|
) })
|
|
3071
3257
|
] }) })
|
|
@@ -3078,15 +3264,15 @@ var EasyPagination = React31.forwardRef(
|
|
|
3078
3264
|
EasyPagination.displayName = "EasyPagination";
|
|
3079
3265
|
|
|
3080
3266
|
// src/components/easy/otp.tsx
|
|
3081
|
-
var
|
|
3082
|
-
var
|
|
3267
|
+
var React35 = __toESM(require("react"), 1);
|
|
3268
|
+
var import_lucide_react19 = require("lucide-react");
|
|
3083
3269
|
|
|
3084
3270
|
// src/components/ui/input-otp.tsx
|
|
3085
|
-
var
|
|
3271
|
+
var React33 = __toESM(require("react"), 1);
|
|
3086
3272
|
var import_input_otp = require("input-otp");
|
|
3087
|
-
var
|
|
3088
|
-
var
|
|
3089
|
-
var InputOTP =
|
|
3273
|
+
var import_lucide_react18 = require("lucide-react");
|
|
3274
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
3275
|
+
var InputOTP = React33.forwardRef(({ className, containerClassName, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3090
3276
|
import_input_otp.OTPInput,
|
|
3091
3277
|
{
|
|
3092
3278
|
ref,
|
|
@@ -3099,15 +3285,15 @@ var InputOTP = React32.forwardRef(({ className, containerClassName, ...props },
|
|
|
3099
3285
|
}
|
|
3100
3286
|
));
|
|
3101
3287
|
InputOTP.displayName = "InputOTP";
|
|
3102
|
-
var InputOTPGroup =
|
|
3288
|
+
var InputOTPGroup = React33.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { ref, className: cn("flex items-center", className), ...props }));
|
|
3103
3289
|
InputOTPGroup.displayName = "InputOTPGroup";
|
|
3104
|
-
var InputOTPSlot =
|
|
3105
|
-
const inputOTPContext =
|
|
3290
|
+
var InputOTPSlot = React33.forwardRef(({ index, className, ...props }, ref) => {
|
|
3291
|
+
const inputOTPContext = React33.useContext(import_input_otp.OTPInputContext);
|
|
3106
3292
|
const slot = inputOTPContext.slots[index];
|
|
3107
3293
|
const char = slot?.char ?? "";
|
|
3108
3294
|
const hasFakeCaret = slot?.hasFakeCaret ?? false;
|
|
3109
3295
|
const isActive = slot?.isActive ?? false;
|
|
3110
|
-
return /* @__PURE__ */ (0,
|
|
3296
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
3111
3297
|
"div",
|
|
3112
3298
|
{
|
|
3113
3299
|
ref,
|
|
@@ -3119,23 +3305,23 @@ var InputOTPSlot = React32.forwardRef(({ index, className, ...props }, ref) => {
|
|
|
3119
3305
|
...props,
|
|
3120
3306
|
children: [
|
|
3121
3307
|
char,
|
|
3122
|
-
hasFakeCaret && /* @__PURE__ */ (0,
|
|
3308
|
+
hasFakeCaret && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: "h-4 w-px animate-caret-blink bg-foreground duration-1000" }) })
|
|
3123
3309
|
]
|
|
3124
3310
|
}
|
|
3125
3311
|
);
|
|
3126
3312
|
});
|
|
3127
3313
|
InputOTPSlot.displayName = "InputOTPSlot";
|
|
3128
|
-
var InputOTPSeparator =
|
|
3314
|
+
var InputOTPSeparator = React33.forwardRef(({ ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { ref, role: "separator", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_lucide_react18.Dot, {}) }));
|
|
3129
3315
|
InputOTPSeparator.displayName = "InputOTPSeparator";
|
|
3130
3316
|
|
|
3131
3317
|
// src/components/ui/drawer.tsx
|
|
3132
|
-
var
|
|
3318
|
+
var React34 = __toESM(require("react"), 1);
|
|
3133
3319
|
var import_vaul = require("vaul");
|
|
3134
|
-
var
|
|
3320
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
3135
3321
|
var Drawer = ({
|
|
3136
3322
|
shouldScaleBackground = true,
|
|
3137
3323
|
...props
|
|
3138
|
-
}) => /* @__PURE__ */ (0,
|
|
3324
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3139
3325
|
import_vaul.Drawer.Root,
|
|
3140
3326
|
{
|
|
3141
3327
|
shouldScaleBackground,
|
|
@@ -3146,7 +3332,7 @@ Drawer.displayName = "Drawer";
|
|
|
3146
3332
|
var DrawerTrigger = import_vaul.Drawer.Trigger;
|
|
3147
3333
|
var DrawerPortal = import_vaul.Drawer.Portal;
|
|
3148
3334
|
var DrawerClose = import_vaul.Drawer.Close;
|
|
3149
|
-
var DrawerOverlay =
|
|
3335
|
+
var DrawerOverlay = React34.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3150
3336
|
import_vaul.Drawer.Overlay,
|
|
3151
3337
|
{
|
|
3152
3338
|
ref,
|
|
@@ -3155,9 +3341,9 @@ var DrawerOverlay = React33.forwardRef(({ className, ...props }, ref) => /* @__P
|
|
|
3155
3341
|
}
|
|
3156
3342
|
));
|
|
3157
3343
|
DrawerOverlay.displayName = import_vaul.Drawer.Overlay.displayName;
|
|
3158
|
-
var DrawerContent =
|
|
3159
|
-
/* @__PURE__ */ (0,
|
|
3160
|
-
/* @__PURE__ */ (0,
|
|
3344
|
+
var DrawerContent = React34.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(DrawerPortal, { children: [
|
|
3345
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(DrawerOverlay, {}),
|
|
3346
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
3161
3347
|
import_vaul.Drawer.Content,
|
|
3162
3348
|
{
|
|
3163
3349
|
ref,
|
|
@@ -3167,7 +3353,7 @@ var DrawerContent = React33.forwardRef(({ className, children, ...props }, ref)
|
|
|
3167
3353
|
),
|
|
3168
3354
|
...props,
|
|
3169
3355
|
children: [
|
|
3170
|
-
/* @__PURE__ */ (0,
|
|
3356
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted" }),
|
|
3171
3357
|
children
|
|
3172
3358
|
]
|
|
3173
3359
|
}
|
|
@@ -3177,7 +3363,7 @@ DrawerContent.displayName = "DrawerContent";
|
|
|
3177
3363
|
var DrawerHeader = ({
|
|
3178
3364
|
className,
|
|
3179
3365
|
...props
|
|
3180
|
-
}) => /* @__PURE__ */ (0,
|
|
3366
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3181
3367
|
"div",
|
|
3182
3368
|
{
|
|
3183
3369
|
className: cn("grid gap-1.5 p-4 text-center sm:text-left", className),
|
|
@@ -3188,7 +3374,7 @@ DrawerHeader.displayName = "DrawerHeader";
|
|
|
3188
3374
|
var DrawerFooter = ({
|
|
3189
3375
|
className,
|
|
3190
3376
|
...props
|
|
3191
|
-
}) => /* @__PURE__ */ (0,
|
|
3377
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3192
3378
|
"div",
|
|
3193
3379
|
{
|
|
3194
3380
|
className: cn("mt-auto flex flex-col gap-2 p-4", className),
|
|
@@ -3196,7 +3382,7 @@ var DrawerFooter = ({
|
|
|
3196
3382
|
}
|
|
3197
3383
|
);
|
|
3198
3384
|
DrawerFooter.displayName = "DrawerFooter";
|
|
3199
|
-
var DrawerTitle =
|
|
3385
|
+
var DrawerTitle = React34.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3200
3386
|
import_vaul.Drawer.Title,
|
|
3201
3387
|
{
|
|
3202
3388
|
ref,
|
|
@@ -3208,7 +3394,7 @@ var DrawerTitle = React33.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
3208
3394
|
}
|
|
3209
3395
|
));
|
|
3210
3396
|
DrawerTitle.displayName = import_vaul.Drawer.Title.displayName;
|
|
3211
|
-
var DrawerDescription =
|
|
3397
|
+
var DrawerDescription = React34.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3212
3398
|
import_vaul.Drawer.Description,
|
|
3213
3399
|
{
|
|
3214
3400
|
ref,
|
|
@@ -3219,8 +3405,8 @@ var DrawerDescription = React33.forwardRef(({ className, ...props }, ref) => /*
|
|
|
3219
3405
|
DrawerDescription.displayName = import_vaul.Drawer.Description.displayName;
|
|
3220
3406
|
|
|
3221
3407
|
// src/components/easy/otp.tsx
|
|
3222
|
-
var
|
|
3223
|
-
var EasyOtp =
|
|
3408
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
3409
|
+
var EasyOtp = React35.forwardRef(
|
|
3224
3410
|
({
|
|
3225
3411
|
value,
|
|
3226
3412
|
onChange,
|
|
@@ -3231,8 +3417,8 @@ var EasyOtp = React34.forwardRef(
|
|
|
3231
3417
|
className,
|
|
3232
3418
|
slotClassName
|
|
3233
3419
|
}, ref) => {
|
|
3234
|
-
return /* @__PURE__ */ (0,
|
|
3235
|
-
/* @__PURE__ */ (0,
|
|
3420
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { ref, className: cn("flex flex-col items-center w-full", className), children: [
|
|
3421
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "w-full overflow-hidden relative", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3236
3422
|
InputOTP,
|
|
3237
3423
|
{
|
|
3238
3424
|
maxLength: length,
|
|
@@ -3242,7 +3428,7 @@ var EasyOtp = React34.forwardRef(
|
|
|
3242
3428
|
autoFocus,
|
|
3243
3429
|
className: "gap-3",
|
|
3244
3430
|
containerClassName: "w-full max-w-full overflow-hidden justify-center relative",
|
|
3245
|
-
children: /* @__PURE__ */ (0,
|
|
3431
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(InputOTPGroup, { className: "flex p-1 gap-3.5 justify-center", children: Array.from({ length }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3246
3432
|
InputOTPSlot,
|
|
3247
3433
|
{
|
|
3248
3434
|
index,
|
|
@@ -3260,22 +3446,25 @@ var EasyOtp = React34.forwardRef(
|
|
|
3260
3446
|
)) })
|
|
3261
3447
|
}
|
|
3262
3448
|
) }),
|
|
3263
|
-
error && /* @__PURE__ */ (0,
|
|
3264
|
-
/* @__PURE__ */ (0,
|
|
3265
|
-
/* @__PURE__ */ (0,
|
|
3449
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex items-center gap-1 mt-3", children: [
|
|
3450
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_lucide_react19.AlertCircle, { className: "size-4 text-[var(--ui-danger-base)]" }),
|
|
3451
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(EasyBody, { variant: "small", className: "text-[var(--ui-danger-base)]", children: error })
|
|
3266
3452
|
] })
|
|
3267
3453
|
] });
|
|
3268
3454
|
}
|
|
3269
3455
|
);
|
|
3270
3456
|
EasyOtp.displayName = "EasyOtp";
|
|
3271
|
-
|
|
3272
|
-
if (phone
|
|
3273
|
-
|
|
3274
|
-
|
|
3275
|
-
|
|
3457
|
+
function formatPhoneNumber(phone) {
|
|
3458
|
+
if (!phone) return phone;
|
|
3459
|
+
const cleaned = phone.replace(/\D/g, "");
|
|
3460
|
+
const phoneWithoutCountryCode = cleaned.startsWith("90") ? cleaned.slice(2) : cleaned;
|
|
3461
|
+
if (phoneWithoutCountryCode.length < 10) {
|
|
3462
|
+
return phone.startsWith("+") ? phone : `+90${phone}`;
|
|
3276
3463
|
}
|
|
3277
|
-
|
|
3278
|
-
|
|
3464
|
+
const firstThreeDigits = phoneWithoutCountryCode.slice(0, 3);
|
|
3465
|
+
const lastTwoDigits = phoneWithoutCountryCode.slice(-2);
|
|
3466
|
+
return `+90 (${firstThreeDigits}) *** ** ${lastTwoDigits}`;
|
|
3467
|
+
}
|
|
3279
3468
|
var formatEmail = (emailAddress) => {
|
|
3280
3469
|
const [localPart, domain] = emailAddress.split("@");
|
|
3281
3470
|
if (localPart && domain) {
|
|
@@ -3300,21 +3489,21 @@ var EasyOtpModal = ({
|
|
|
3300
3489
|
className,
|
|
3301
3490
|
contentClassName
|
|
3302
3491
|
}) => {
|
|
3303
|
-
const [otpValue, setOtpValue] =
|
|
3304
|
-
const [isVerifying, setIsVerifying] =
|
|
3305
|
-
const [isResending, setIsResending] =
|
|
3306
|
-
const [timeLeft, setTimeLeft] =
|
|
3307
|
-
const [error, setError] =
|
|
3492
|
+
const [otpValue, setOtpValue] = React35.useState("");
|
|
3493
|
+
const [isVerifying, setIsVerifying] = React35.useState(false);
|
|
3494
|
+
const [isResending, setIsResending] = React35.useState(false);
|
|
3495
|
+
const [timeLeft, setTimeLeft] = React35.useState(resendCooldown);
|
|
3496
|
+
const [error, setError] = React35.useState(null);
|
|
3308
3497
|
const isMobile = useIsMobile();
|
|
3309
3498
|
const defaultTitle = email ? "E-posta Adresi Do\u011Frulama" : "Telefon Do\u011Frulama";
|
|
3310
3499
|
const modalTitle = title || defaultTitle;
|
|
3311
|
-
|
|
3500
|
+
React35.useEffect(() => {
|
|
3312
3501
|
if (timeLeft > 0 && open) {
|
|
3313
3502
|
const timer = setTimeout(() => setTimeLeft(timeLeft - 1), 1e3);
|
|
3314
3503
|
return () => clearTimeout(timer);
|
|
3315
3504
|
}
|
|
3316
3505
|
}, [timeLeft, open]);
|
|
3317
|
-
|
|
3506
|
+
React35.useEffect(() => {
|
|
3318
3507
|
if (open) {
|
|
3319
3508
|
setTimeLeft(resendCooldown);
|
|
3320
3509
|
setOtpValue("");
|
|
@@ -3373,19 +3562,19 @@ var EasyOtpModal = ({
|
|
|
3373
3562
|
};
|
|
3374
3563
|
const canResend = timeLeft === 0 && !isResending;
|
|
3375
3564
|
const isVerifyDisabled = otpValue.length !== length || isVerifying;
|
|
3376
|
-
const modalContent = /* @__PURE__ */ (0,
|
|
3377
|
-
!isMobile && /* @__PURE__ */ (0,
|
|
3378
|
-
/* @__PURE__ */ (0,
|
|
3379
|
-
/* @__PURE__ */ (0,
|
|
3380
|
-
!isMobile && /* @__PURE__ */ (0,
|
|
3381
|
-
/* @__PURE__ */ (0,
|
|
3565
|
+
const modalContent = /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex flex-col items-center", children: [
|
|
3566
|
+
!isMobile && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "flex h-16 w-16 items-center justify-center rounded-full border-2 border-[var(--ui-border-200)] mb-3", children: email ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_lucide_react19.Mail, { className: "size-6 text-[var(--ui-text-900)]" }) : /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_lucide_react19.Smartphone, { className: "size-6 text-[var(--ui-text-900)]" }) }),
|
|
3567
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(EasyLabel, { variant: "large", className: "text-[var(--ui-primary-500)] mb-1", children: modalTitle }),
|
|
3568
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "text-center space-y-2", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(EasyBody, { variant: "small", className: "text-[var(--ui-text-500)] font-normal", children: description || getDefaultDescription() }) }),
|
|
3569
|
+
!isMobile && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Separator, { className: "my-6" }),
|
|
3570
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "text-center mb-3", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(EasyBody, { variant: "small", className: "text-[var(--ui-text-500)]", children: [
|
|
3382
3571
|
"Kalan Zaman: ",
|
|
3383
|
-
/* @__PURE__ */ (0,
|
|
3572
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("span", { className: "font-medium text-[var(--ui-text-900)]", children: [
|
|
3384
3573
|
timeLeft,
|
|
3385
3574
|
" Saniye"
|
|
3386
3575
|
] })
|
|
3387
3576
|
] }) }),
|
|
3388
|
-
/* @__PURE__ */ (0,
|
|
3577
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3389
3578
|
EasyOtp,
|
|
3390
3579
|
{
|
|
3391
3580
|
value: otpValue,
|
|
@@ -3395,10 +3584,10 @@ var EasyOtpModal = ({
|
|
|
3395
3584
|
autoFocus: true
|
|
3396
3585
|
}
|
|
3397
3586
|
),
|
|
3398
|
-
/* @__PURE__ */ (0,
|
|
3587
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "text-center mt-2", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(EasyBody, { variant: "small", className: "text-[var(--ui-text-500)]", children: [
|
|
3399
3588
|
"Kod gelmedi mi?",
|
|
3400
3589
|
" ",
|
|
3401
|
-
/* @__PURE__ */ (0,
|
|
3590
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3402
3591
|
"button",
|
|
3403
3592
|
{
|
|
3404
3593
|
type: "button",
|
|
@@ -3412,10 +3601,10 @@ var EasyOtpModal = ({
|
|
|
3412
3601
|
}
|
|
3413
3602
|
)
|
|
3414
3603
|
] }) }),
|
|
3415
|
-
!isMobile && /* @__PURE__ */ (0,
|
|
3604
|
+
!isMobile && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Separator, { className: "my-6" })
|
|
3416
3605
|
] });
|
|
3417
|
-
const footer = /* @__PURE__ */ (0,
|
|
3418
|
-
/* @__PURE__ */ (0,
|
|
3606
|
+
const footer = /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "flex flex-col gap-3 w-full", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex flex-row gap-4 w-full", children: [
|
|
3607
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3419
3608
|
EasyButton,
|
|
3420
3609
|
{
|
|
3421
3610
|
variant: "important",
|
|
@@ -3426,7 +3615,7 @@ var EasyOtpModal = ({
|
|
|
3426
3615
|
children: "Vazge\xE7"
|
|
3427
3616
|
}
|
|
3428
3617
|
),
|
|
3429
|
-
/* @__PURE__ */ (0,
|
|
3618
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3430
3619
|
EasyButton,
|
|
3431
3620
|
{
|
|
3432
3621
|
variant: "primary",
|
|
@@ -3438,16 +3627,16 @@ var EasyOtpModal = ({
|
|
|
3438
3627
|
)
|
|
3439
3628
|
] }) });
|
|
3440
3629
|
if (isMobile) {
|
|
3441
|
-
return /* @__PURE__ */ (0,
|
|
3442
|
-
/* @__PURE__ */ (0,
|
|
3443
|
-
modalTitle && /* @__PURE__ */ (0,
|
|
3444
|
-
description && /* @__PURE__ */ (0,
|
|
3630
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Drawer, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(DrawerContent, { className: "!rounded-t-[32px]", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "!rounded-t-[32px] overflow-auto mb-[60px]", children: [
|
|
3631
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(DrawerHeader, { className: "text-left border-b border-[var(--ui-border-200)]", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "flex flex-row items-start justify-between", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex flex-col items-start gap-2", children: [
|
|
3632
|
+
modalTitle && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(DrawerTitle, { className: "text-lg font-medium text-[var(--ui-text-900)]", children: modalTitle }),
|
|
3633
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(DrawerDescription, { className: "text-left", children: description || getDefaultDescription() })
|
|
3445
3634
|
] }) }) }),
|
|
3446
|
-
/* @__PURE__ */ (0,
|
|
3447
|
-
/* @__PURE__ */ (0,
|
|
3635
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: cn("mt-6 px-6 pt-6 pb-6", contentClassName), children: modalContent }),
|
|
3636
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(DrawerFooter, { className: "pt-0", children: footer })
|
|
3448
3637
|
] }) }) });
|
|
3449
3638
|
}
|
|
3450
|
-
return /* @__PURE__ */ (0,
|
|
3639
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(ShadcnDialog, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
|
|
3451
3640
|
ShadcnDialogContent,
|
|
3452
3641
|
{
|
|
3453
3642
|
className: cn(
|
|
@@ -3456,12 +3645,12 @@ var EasyOtpModal = ({
|
|
|
3456
3645
|
contentClassName
|
|
3457
3646
|
),
|
|
3458
3647
|
children: [
|
|
3459
|
-
/* @__PURE__ */ (0,
|
|
3460
|
-
/* @__PURE__ */ (0,
|
|
3461
|
-
/* @__PURE__ */ (0,
|
|
3648
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(ShadcnDialogHeader, { className: "hidden", children: [
|
|
3649
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(ShadcnDialogTitle, { className: "sr-only", children: modalTitle }),
|
|
3650
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(ShadcnDialogDescription, { className: "sr-only", children: description || getDefaultDescription() })
|
|
3462
3651
|
] }),
|
|
3463
|
-
/* @__PURE__ */ (0,
|
|
3464
|
-
/* @__PURE__ */ (0,
|
|
3652
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className, children: modalContent }),
|
|
3653
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "mt-0", children: footer })
|
|
3465
3654
|
]
|
|
3466
3655
|
}
|
|
3467
3656
|
) });
|
|
@@ -3469,15 +3658,15 @@ var EasyOtpModal = ({
|
|
|
3469
3658
|
EasyOtpModal.displayName = "EasyOtpModal";
|
|
3470
3659
|
|
|
3471
3660
|
// src/components/easy/select.tsx
|
|
3472
|
-
var
|
|
3473
|
-
var
|
|
3661
|
+
var React39 = __toESM(require("react"), 1);
|
|
3662
|
+
var import_lucide_react21 = require("lucide-react");
|
|
3474
3663
|
|
|
3475
3664
|
// src/components/ui/command.tsx
|
|
3476
|
-
var
|
|
3665
|
+
var React36 = __toESM(require("react"), 1);
|
|
3477
3666
|
var import_cmdk = require("cmdk");
|
|
3478
|
-
var
|
|
3479
|
-
var
|
|
3480
|
-
var Command =
|
|
3667
|
+
var import_lucide_react20 = require("lucide-react");
|
|
3668
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
3669
|
+
var Command = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3481
3670
|
import_cmdk.Command,
|
|
3482
3671
|
{
|
|
3483
3672
|
ref,
|
|
@@ -3489,9 +3678,9 @@ var Command = React35.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
3489
3678
|
}
|
|
3490
3679
|
));
|
|
3491
3680
|
Command.displayName = import_cmdk.Command.displayName;
|
|
3492
|
-
var CommandInput =
|
|
3493
|
-
/* @__PURE__ */ (0,
|
|
3494
|
-
/* @__PURE__ */ (0,
|
|
3681
|
+
var CommandInput = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
|
|
3682
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_lucide_react20.Search, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
|
3683
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3495
3684
|
import_cmdk.Command.Input,
|
|
3496
3685
|
{
|
|
3497
3686
|
ref,
|
|
@@ -3504,7 +3693,7 @@ var CommandInput = React35.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
3504
3693
|
)
|
|
3505
3694
|
] }));
|
|
3506
3695
|
CommandInput.displayName = import_cmdk.Command.Input.displayName;
|
|
3507
|
-
var CommandList =
|
|
3696
|
+
var CommandList = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3508
3697
|
import_cmdk.Command.List,
|
|
3509
3698
|
{
|
|
3510
3699
|
ref,
|
|
@@ -3513,7 +3702,7 @@ var CommandList = React35.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
3513
3702
|
}
|
|
3514
3703
|
));
|
|
3515
3704
|
CommandList.displayName = import_cmdk.Command.List.displayName;
|
|
3516
|
-
var CommandEmpty =
|
|
3705
|
+
var CommandEmpty = React36.forwardRef((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3517
3706
|
import_cmdk.Command.Empty,
|
|
3518
3707
|
{
|
|
3519
3708
|
ref,
|
|
@@ -3522,7 +3711,7 @@ var CommandEmpty = React35.forwardRef((props, ref) => /* @__PURE__ */ (0, import
|
|
|
3522
3711
|
}
|
|
3523
3712
|
));
|
|
3524
3713
|
CommandEmpty.displayName = import_cmdk.Command.Empty.displayName;
|
|
3525
|
-
var CommandGroup =
|
|
3714
|
+
var CommandGroup = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3526
3715
|
import_cmdk.Command.Group,
|
|
3527
3716
|
{
|
|
3528
3717
|
ref,
|
|
@@ -3534,7 +3723,7 @@ var CommandGroup = React35.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
3534
3723
|
}
|
|
3535
3724
|
));
|
|
3536
3725
|
CommandGroup.displayName = import_cmdk.Command.Group.displayName;
|
|
3537
|
-
var CommandSeparator =
|
|
3726
|
+
var CommandSeparator = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3538
3727
|
import_cmdk.Command.Separator,
|
|
3539
3728
|
{
|
|
3540
3729
|
ref,
|
|
@@ -3543,7 +3732,7 @@ var CommandSeparator = React35.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
3543
3732
|
}
|
|
3544
3733
|
));
|
|
3545
3734
|
CommandSeparator.displayName = import_cmdk.Command.Separator.displayName;
|
|
3546
|
-
var CommandItem =
|
|
3735
|
+
var CommandItem = React36.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3547
3736
|
import_cmdk.Command.Item,
|
|
3548
3737
|
{
|
|
3549
3738
|
ref,
|
|
@@ -3559,7 +3748,7 @@ var CommandShortcut = ({
|
|
|
3559
3748
|
className,
|
|
3560
3749
|
...props
|
|
3561
3750
|
}) => {
|
|
3562
|
-
return /* @__PURE__ */ (0,
|
|
3751
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3563
3752
|
"span",
|
|
3564
3753
|
{
|
|
3565
3754
|
className: cn(
|
|
@@ -3573,12 +3762,12 @@ var CommandShortcut = ({
|
|
|
3573
3762
|
CommandShortcut.displayName = "CommandShortcut";
|
|
3574
3763
|
|
|
3575
3764
|
// src/components/ui/popover.tsx
|
|
3576
|
-
var
|
|
3765
|
+
var React37 = __toESM(require("react"), 1);
|
|
3577
3766
|
var PopoverPrimitive = __toESM(require("@radix-ui/react-popover"), 1);
|
|
3578
|
-
var
|
|
3767
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
3579
3768
|
var Popover = PopoverPrimitive.Root;
|
|
3580
3769
|
var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
3581
|
-
var PopoverContent =
|
|
3770
|
+
var PopoverContent = React37.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(PopoverPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3582
3771
|
PopoverPrimitive.Content,
|
|
3583
3772
|
{
|
|
3584
3773
|
ref,
|
|
@@ -3594,24 +3783,24 @@ var PopoverContent = React36.forwardRef(({ className, align = "center", sideOffs
|
|
|
3594
3783
|
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
3595
3784
|
|
|
3596
3785
|
// src/components/ui/scroll-area.tsx
|
|
3597
|
-
var
|
|
3786
|
+
var React38 = __toESM(require("react"), 1);
|
|
3598
3787
|
var ScrollAreaPrimitive = __toESM(require("@radix-ui/react-scroll-area"), 1);
|
|
3599
|
-
var
|
|
3600
|
-
var ScrollArea =
|
|
3788
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
3789
|
+
var ScrollArea = React38.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
3601
3790
|
ScrollAreaPrimitive.Root,
|
|
3602
3791
|
{
|
|
3603
3792
|
ref,
|
|
3604
3793
|
className: cn("relative overflow-hidden", className),
|
|
3605
3794
|
...props,
|
|
3606
3795
|
children: [
|
|
3607
|
-
/* @__PURE__ */ (0,
|
|
3608
|
-
/* @__PURE__ */ (0,
|
|
3609
|
-
/* @__PURE__ */ (0,
|
|
3796
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(ScrollAreaPrimitive.Viewport, { className: "h-full w-full rounded-[inherit]", children }),
|
|
3797
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(ScrollBar, {}),
|
|
3798
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(ScrollAreaPrimitive.Corner, {})
|
|
3610
3799
|
]
|
|
3611
3800
|
}
|
|
3612
3801
|
));
|
|
3613
3802
|
ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
|
|
3614
|
-
var ScrollBar =
|
|
3803
|
+
var ScrollBar = React38.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3615
3804
|
ScrollAreaPrimitive.ScrollAreaScrollbar,
|
|
3616
3805
|
{
|
|
3617
3806
|
ref,
|
|
@@ -3623,14 +3812,14 @@ var ScrollBar = React37.forwardRef(({ className, orientation = "vertical", ...pr
|
|
|
3623
3812
|
className
|
|
3624
3813
|
),
|
|
3625
3814
|
...props,
|
|
3626
|
-
children: /* @__PURE__ */ (0,
|
|
3815
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(ScrollAreaPrimitive.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
|
|
3627
3816
|
}
|
|
3628
3817
|
));
|
|
3629
3818
|
ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
|
|
3630
3819
|
|
|
3631
3820
|
// src/components/easy/select.tsx
|
|
3632
|
-
var
|
|
3633
|
-
var EasySelect =
|
|
3821
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
3822
|
+
var EasySelect = React39.forwardRef(
|
|
3634
3823
|
({
|
|
3635
3824
|
label,
|
|
3636
3825
|
bottomSheetLabel,
|
|
@@ -3648,11 +3837,11 @@ var EasySelect = React38.forwardRef(
|
|
|
3648
3837
|
name,
|
|
3649
3838
|
...props
|
|
3650
3839
|
}, ref) => {
|
|
3651
|
-
const [open, setOpen] =
|
|
3652
|
-
const [searchValue, setSearchValue] =
|
|
3840
|
+
const [open, setOpen] = React39.useState(false);
|
|
3841
|
+
const [searchValue, setSearchValue] = React39.useState("");
|
|
3653
3842
|
const isMobile = useIsMobile();
|
|
3654
3843
|
const selectedOption = options.find((option) => option.value === value);
|
|
3655
|
-
const filteredOptions =
|
|
3844
|
+
const filteredOptions = React39.useMemo(
|
|
3656
3845
|
() => options.filter(
|
|
3657
3846
|
(option) => option.label.toLocaleLowerCase("tr").includes(searchValue.toLocaleLowerCase("tr"))
|
|
3658
3847
|
),
|
|
@@ -3677,10 +3866,10 @@ var EasySelect = React38.forwardRef(
|
|
|
3677
3866
|
!value && "text-[var(--ui-text-400)]",
|
|
3678
3867
|
className
|
|
3679
3868
|
);
|
|
3680
|
-
const content = /* @__PURE__ */ (0,
|
|
3681
|
-
/* @__PURE__ */ (0,
|
|
3682
|
-
/* @__PURE__ */ (0,
|
|
3683
|
-
/* @__PURE__ */ (0,
|
|
3869
|
+
const content = /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_jsx_runtime43.Fragment, { children: [
|
|
3870
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "relative mx-3 mt-3", children: [
|
|
3871
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_lucide_react21.Search, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" }),
|
|
3872
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3684
3873
|
"input",
|
|
3685
3874
|
{
|
|
3686
3875
|
placeholder: searchPlaceholder,
|
|
@@ -3690,7 +3879,7 @@ var EasySelect = React38.forwardRef(
|
|
|
3690
3879
|
style: { fontSize: "16px" }
|
|
3691
3880
|
}
|
|
3692
3881
|
),
|
|
3693
|
-
searchValue && /* @__PURE__ */ (0,
|
|
3882
|
+
searchValue && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3694
3883
|
ShadcnButton,
|
|
3695
3884
|
{
|
|
3696
3885
|
variant: "link",
|
|
@@ -3698,16 +3887,16 @@ var EasySelect = React38.forwardRef(
|
|
|
3698
3887
|
className: "absolute right-2 top-1/2 h-5 w-5 -translate-y-1/2 rounded-full bg-transparent p-0 text-muted-foreground hover:bg-muted",
|
|
3699
3888
|
onClick: () => setSearchValue(""),
|
|
3700
3889
|
type: "button",
|
|
3701
|
-
children: /* @__PURE__ */ (0,
|
|
3890
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_lucide_react21.X, { className: "h-3 w-3" })
|
|
3702
3891
|
}
|
|
3703
3892
|
)
|
|
3704
3893
|
] }),
|
|
3705
|
-
/* @__PURE__ */ (0,
|
|
3706
|
-
/* @__PURE__ */ (0,
|
|
3707
|
-
/* @__PURE__ */ (0,
|
|
3894
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(CommandList, { className: "max-h-72 overflow-auto bg-[var(--ui-background-0)]", children: [
|
|
3895
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(CommandEmpty, { children: emptyMessage }),
|
|
3896
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(CommandGroup, { className: "px-3", children: filteredOptions.map((option, index) => {
|
|
3708
3897
|
const isSelected = value === option.value;
|
|
3709
3898
|
const isLast = index === filteredOptions.length - 1;
|
|
3710
|
-
return /* @__PURE__ */ (0,
|
|
3899
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
3711
3900
|
CommandItem,
|
|
3712
3901
|
{
|
|
3713
3902
|
value: option.value,
|
|
@@ -3721,17 +3910,17 @@ var EasySelect = React38.forwardRef(
|
|
|
3721
3910
|
!isLast && "border-b border-[var(--ui-border)]"
|
|
3722
3911
|
),
|
|
3723
3912
|
children: [
|
|
3724
|
-
/* @__PURE__ */ (0,
|
|
3913
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3725
3914
|
"span",
|
|
3726
3915
|
{
|
|
3727
3916
|
className: cn(
|
|
3728
3917
|
"flex h-4 w-4 items-center justify-center rounded-full",
|
|
3729
3918
|
isSelected ? "bg-[var(--ui-primary-500)]" : "border border-[var(--ui-text-300)] bg-transparent"
|
|
3730
3919
|
),
|
|
3731
|
-
children: isSelected && /* @__PURE__ */ (0,
|
|
3920
|
+
children: isSelected && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "block h-2.5 w-2.5 rounded-full bg-white" })
|
|
3732
3921
|
}
|
|
3733
3922
|
),
|
|
3734
|
-
/* @__PURE__ */ (0,
|
|
3923
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3735
3924
|
"span",
|
|
3736
3925
|
{
|
|
3737
3926
|
className: cn(
|
|
@@ -3748,8 +3937,8 @@ var EasySelect = React38.forwardRef(
|
|
|
3748
3937
|
}) })
|
|
3749
3938
|
] })
|
|
3750
3939
|
] });
|
|
3751
|
-
return /* @__PURE__ */ (0,
|
|
3752
|
-
label && /* @__PURE__ */ (0,
|
|
3940
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex w-full flex-col gap-1.5", children: [
|
|
3941
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3753
3942
|
EasyLabel,
|
|
3754
3943
|
{
|
|
3755
3944
|
as: "label",
|
|
@@ -3759,8 +3948,8 @@ var EasySelect = React38.forwardRef(
|
|
|
3759
3948
|
children: label
|
|
3760
3949
|
}
|
|
3761
3950
|
),
|
|
3762
|
-
isMobile ? /* @__PURE__ */ (0,
|
|
3763
|
-
/* @__PURE__ */ (0,
|
|
3951
|
+
isMobile ? /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Drawer, { open, onOpenChange: setOpen, children: [
|
|
3952
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(DrawerTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
3764
3953
|
ShadcnButton,
|
|
3765
3954
|
{
|
|
3766
3955
|
ref,
|
|
@@ -3771,29 +3960,29 @@ var EasySelect = React38.forwardRef(
|
|
|
3771
3960
|
type: "button",
|
|
3772
3961
|
...props,
|
|
3773
3962
|
children: [
|
|
3774
|
-
/* @__PURE__ */ (0,
|
|
3775
|
-
/* @__PURE__ */ (0,
|
|
3963
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "truncate text-left", children: selectedOption ? selectedOption.label : placeholder }),
|
|
3964
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_lucide_react21.ChevronDown, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })
|
|
3776
3965
|
]
|
|
3777
3966
|
}
|
|
3778
3967
|
) }),
|
|
3779
|
-
/* @__PURE__ */ (0,
|
|
3780
|
-
/* @__PURE__ */ (0,
|
|
3781
|
-
/* @__PURE__ */ (0,
|
|
3782
|
-
/* @__PURE__ */ (0,
|
|
3968
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(DrawerContent, { className: "max-h-[80vh] rounded-t-[32px]", children: [
|
|
3969
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(DrawerHeader, { className: "border-b", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex items-center justify-between", children: [
|
|
3970
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(DrawerTitle, { className: "text-lg font-semibold", children: bottomSheetLabel || "Se\xE7im Yap\u0131n" }),
|
|
3971
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(DrawerClose, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3783
3972
|
ShadcnButton,
|
|
3784
3973
|
{
|
|
3785
3974
|
variant: "link",
|
|
3786
3975
|
size: "icon",
|
|
3787
3976
|
className: "h-8 w-8 rounded-full p-0 text-muted-foreground hover:bg-muted",
|
|
3788
3977
|
type: "button",
|
|
3789
|
-
children: /* @__PURE__ */ (0,
|
|
3978
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_lucide_react21.X, { className: "h-4 w-4" })
|
|
3790
3979
|
}
|
|
3791
3980
|
) })
|
|
3792
3981
|
] }) }),
|
|
3793
|
-
/* @__PURE__ */ (0,
|
|
3794
|
-
/* @__PURE__ */ (0,
|
|
3795
|
-
/* @__PURE__ */ (0,
|
|
3796
|
-
/* @__PURE__ */ (0,
|
|
3982
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "flex-1 overflow-hidden px-6 pb-6 pt-2", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "flex-col items-start gap-[10px]", children: [
|
|
3983
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: "relative my-4", children: [
|
|
3984
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_lucide_react21.Search, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" }),
|
|
3985
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3797
3986
|
"input",
|
|
3798
3987
|
{
|
|
3799
3988
|
placeholder: searchPlaceholder,
|
|
@@ -3803,7 +3992,7 @@ var EasySelect = React38.forwardRef(
|
|
|
3803
3992
|
style: { fontSize: "16px" }
|
|
3804
3993
|
}
|
|
3805
3994
|
),
|
|
3806
|
-
searchValue && /* @__PURE__ */ (0,
|
|
3995
|
+
searchValue && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3807
3996
|
ShadcnButton,
|
|
3808
3997
|
{
|
|
3809
3998
|
variant: "link",
|
|
@@ -3811,14 +4000,14 @@ var EasySelect = React38.forwardRef(
|
|
|
3811
4000
|
className: "absolute right-2 top-1/2 h-5 w-5 -translate-y-1/2 rounded-full bg-transparent p-0 text-muted-foreground hover:bg-muted",
|
|
3812
4001
|
onClick: () => setSearchValue(""),
|
|
3813
4002
|
type: "button",
|
|
3814
|
-
children: /* @__PURE__ */ (0,
|
|
4003
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_lucide_react21.X, { className: "h-3 w-3" })
|
|
3815
4004
|
}
|
|
3816
4005
|
)
|
|
3817
4006
|
] }),
|
|
3818
|
-
/* @__PURE__ */ (0,
|
|
4007
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(ScrollArea, { className: "h-[60vh] bg-[var(--ui-background-0)] rounded-[24px]", children: filteredOptions.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "py-8 text-center text-muted-foreground text-sm", children: emptyMessage }) : /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: "space-y-0 pb-4", children: filteredOptions.map((option, index) => {
|
|
3819
4008
|
const isSelected = value === option.value;
|
|
3820
4009
|
const isLast = index === filteredOptions.length - 1;
|
|
3821
|
-
return /* @__PURE__ */ (0,
|
|
4010
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
3822
4011
|
"button",
|
|
3823
4012
|
{
|
|
3824
4013
|
type: "button",
|
|
@@ -3833,7 +4022,7 @@ var EasySelect = React38.forwardRef(
|
|
|
3833
4022
|
!isLast && "border-b border-[var(--ui-border-200)]"
|
|
3834
4023
|
),
|
|
3835
4024
|
children: [
|
|
3836
|
-
/* @__PURE__ */ (0,
|
|
4025
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3837
4026
|
"span",
|
|
3838
4027
|
{
|
|
3839
4028
|
className: cn(
|
|
@@ -3841,10 +4030,10 @@ var EasySelect = React38.forwardRef(
|
|
|
3841
4030
|
isSelected ? "bg-[var(--ui-primary-500)]" : "border border-[var(--ui-text-300)] bg-transparent"
|
|
3842
4031
|
),
|
|
3843
4032
|
children: isSelected && // İçteki beyaz boşluk
|
|
3844
|
-
/* @__PURE__ */ (0,
|
|
4033
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "block h-2.5 w-2.5 rounded-full bg-white" })
|
|
3845
4034
|
}
|
|
3846
4035
|
),
|
|
3847
|
-
/* @__PURE__ */ (0,
|
|
4036
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3848
4037
|
"span",
|
|
3849
4038
|
{
|
|
3850
4039
|
className: cn(
|
|
@@ -3861,8 +4050,8 @@ var EasySelect = React38.forwardRef(
|
|
|
3861
4050
|
}) }) })
|
|
3862
4051
|
] }) })
|
|
3863
4052
|
] })
|
|
3864
|
-
] }) : /* @__PURE__ */ (0,
|
|
3865
|
-
/* @__PURE__ */ (0,
|
|
4053
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(Popover, { open, onOpenChange: setOpen, children: [
|
|
4054
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(
|
|
3866
4055
|
ShadcnButton,
|
|
3867
4056
|
{
|
|
3868
4057
|
ref,
|
|
@@ -3873,9 +4062,9 @@ var EasySelect = React38.forwardRef(
|
|
|
3873
4062
|
type: "button",
|
|
3874
4063
|
...props,
|
|
3875
4064
|
children: [
|
|
3876
|
-
/* @__PURE__ */ (0,
|
|
3877
|
-
/* @__PURE__ */ (0,
|
|
3878
|
-
|
|
4065
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "truncate text-left", children: selectedOption ? selectedOption.label : placeholder }),
|
|
4066
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
4067
|
+
import_lucide_react21.ChevronDown,
|
|
3879
4068
|
{
|
|
3880
4069
|
className: cn(
|
|
3881
4070
|
"ml-2 h-4 w-4 shrink-0 opacity-50 transition-transform",
|
|
@@ -3886,24 +4075,24 @@ var EasySelect = React38.forwardRef(
|
|
|
3886
4075
|
]
|
|
3887
4076
|
}
|
|
3888
4077
|
) }),
|
|
3889
|
-
/* @__PURE__ */ (0,
|
|
4078
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(PopoverContent, { className: "w-[var(--radix-popover-trigger-width)] max-w-[var(--radix-popover-trigger-width)] p-0", align: "start", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Command, { children: content }) })
|
|
3890
4079
|
] }),
|
|
3891
|
-
errorText ? /* @__PURE__ */ (0,
|
|
4080
|
+
errorText ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { className: "text-sm text-[var(--ui-danger-base)]", role: "alert", children: errorText }) : helperText ? /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { className: "text-sm text-[var(--ui-text-500)]", children: helperText }) : null
|
|
3892
4081
|
] });
|
|
3893
4082
|
}
|
|
3894
4083
|
);
|
|
3895
4084
|
EasySelect.displayName = "EasySelect";
|
|
3896
4085
|
|
|
3897
4086
|
// src/components/easy/date-picker.tsx
|
|
3898
|
-
var
|
|
3899
|
-
var
|
|
4087
|
+
var React41 = __toESM(require("react"), 1);
|
|
4088
|
+
var import_lucide_react23 = require("lucide-react");
|
|
3900
4089
|
var import_date_fns = require("date-fns");
|
|
3901
4090
|
|
|
3902
4091
|
// src/components/ui/calendar.tsx
|
|
3903
|
-
var
|
|
3904
|
-
var
|
|
4092
|
+
var React40 = __toESM(require("react"), 1);
|
|
4093
|
+
var import_lucide_react22 = require("lucide-react");
|
|
3905
4094
|
var import_react_day_picker = require("react-day-picker");
|
|
3906
|
-
var
|
|
4095
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
3907
4096
|
function Calendar({
|
|
3908
4097
|
className,
|
|
3909
4098
|
classNames,
|
|
@@ -3915,7 +4104,7 @@ function Calendar({
|
|
|
3915
4104
|
...props
|
|
3916
4105
|
}) {
|
|
3917
4106
|
const defaultClassNames = (0, import_react_day_picker.getDefaultClassNames)();
|
|
3918
|
-
return /* @__PURE__ */ (0,
|
|
4107
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
3919
4108
|
import_react_day_picker.DayPicker,
|
|
3920
4109
|
{
|
|
3921
4110
|
showOutsideDays,
|
|
@@ -4014,7 +4203,7 @@ function Calendar({
|
|
|
4014
4203
|
},
|
|
4015
4204
|
components: {
|
|
4016
4205
|
Root: ({ className: className2, rootRef, ...props2 }) => {
|
|
4017
|
-
return /* @__PURE__ */ (0,
|
|
4206
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
4018
4207
|
"div",
|
|
4019
4208
|
{
|
|
4020
4209
|
"data-slot": "calendar",
|
|
@@ -4026,22 +4215,22 @@ function Calendar({
|
|
|
4026
4215
|
},
|
|
4027
4216
|
Chevron: ({ className: className2, orientation, ...props2 }) => {
|
|
4028
4217
|
if (orientation === "left") {
|
|
4029
|
-
return /* @__PURE__ */ (0,
|
|
4218
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_lucide_react22.ChevronLeftIcon, { className: cn("size-4", className2), ...props2 });
|
|
4030
4219
|
}
|
|
4031
4220
|
if (orientation === "right") {
|
|
4032
|
-
return /* @__PURE__ */ (0,
|
|
4033
|
-
|
|
4221
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
4222
|
+
import_lucide_react22.ChevronRightIcon,
|
|
4034
4223
|
{
|
|
4035
4224
|
className: cn("size-4", className2),
|
|
4036
4225
|
...props2
|
|
4037
4226
|
}
|
|
4038
4227
|
);
|
|
4039
4228
|
}
|
|
4040
|
-
return /* @__PURE__ */ (0,
|
|
4229
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_lucide_react22.ChevronDownIcon, { className: cn("size-4", className2), ...props2 });
|
|
4041
4230
|
},
|
|
4042
4231
|
DayButton: CalendarDayButton,
|
|
4043
4232
|
WeekNumber: ({ children, ...props2 }) => {
|
|
4044
|
-
return /* @__PURE__ */ (0,
|
|
4233
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("td", { ...props2, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "flex size-[--cell-size] items-center justify-center text-center", children }) });
|
|
4045
4234
|
},
|
|
4046
4235
|
...components
|
|
4047
4236
|
},
|
|
@@ -4056,11 +4245,11 @@ function CalendarDayButton({
|
|
|
4056
4245
|
...props
|
|
4057
4246
|
}) {
|
|
4058
4247
|
const defaultClassNames = (0, import_react_day_picker.getDefaultClassNames)();
|
|
4059
|
-
const ref =
|
|
4060
|
-
|
|
4248
|
+
const ref = React40.useRef(null);
|
|
4249
|
+
React40.useEffect(() => {
|
|
4061
4250
|
if (modifiers.focused) ref.current?.focus();
|
|
4062
4251
|
}, [modifiers.focused]);
|
|
4063
|
-
return /* @__PURE__ */ (0,
|
|
4252
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
4064
4253
|
ShadcnButton,
|
|
4065
4254
|
{
|
|
4066
4255
|
ref,
|
|
@@ -4082,8 +4271,8 @@ function CalendarDayButton({
|
|
|
4082
4271
|
}
|
|
4083
4272
|
|
|
4084
4273
|
// src/components/easy/date-picker.tsx
|
|
4085
|
-
var
|
|
4086
|
-
var EasyDatePicker =
|
|
4274
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
4275
|
+
var EasyDatePicker = React41.forwardRef(
|
|
4087
4276
|
({
|
|
4088
4277
|
label,
|
|
4089
4278
|
helperText,
|
|
@@ -4099,12 +4288,12 @@ var EasyDatePicker = React40.forwardRef(
|
|
|
4099
4288
|
toDate,
|
|
4100
4289
|
...props
|
|
4101
4290
|
}, ref) => {
|
|
4102
|
-
const generatedId =
|
|
4291
|
+
const generatedId = React41.useId();
|
|
4103
4292
|
const inputId = id ?? generatedId;
|
|
4104
4293
|
const helperId = helperText && !errorText ? `${inputId}-helper` : void 0;
|
|
4105
4294
|
const errorId = errorText ? `${inputId}-error` : void 0;
|
|
4106
|
-
const [open, setOpen] =
|
|
4107
|
-
const [isFocused, setIsFocused] =
|
|
4295
|
+
const [open, setOpen] = React41.useState(false);
|
|
4296
|
+
const [isFocused, setIsFocused] = React41.useState(false);
|
|
4108
4297
|
const hasError = Boolean(errorText);
|
|
4109
4298
|
const triggerClassName = cn(
|
|
4110
4299
|
"flex h-12 w-full items-center justify-between rounded-[var(--ui-radius-lg)] border px-4 py-3 text-base font-medium",
|
|
@@ -4118,8 +4307,8 @@ var EasyDatePicker = React40.forwardRef(
|
|
|
4118
4307
|
"disabled:cursor-not-allowed disabled:bg-[var(--ui-background-100)] disabled:text-[var(--ui-text-400)]",
|
|
4119
4308
|
className
|
|
4120
4309
|
);
|
|
4121
|
-
return /* @__PURE__ */ (0,
|
|
4122
|
-
label && /* @__PURE__ */ (0,
|
|
4310
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "flex w-full flex-col gap-1.5", children: [
|
|
4311
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4123
4312
|
"label",
|
|
4124
4313
|
{
|
|
4125
4314
|
htmlFor: inputId,
|
|
@@ -4127,7 +4316,7 @@ var EasyDatePicker = React40.forwardRef(
|
|
|
4127
4316
|
children: label
|
|
4128
4317
|
}
|
|
4129
4318
|
),
|
|
4130
|
-
/* @__PURE__ */ (0,
|
|
4319
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
4131
4320
|
Popover,
|
|
4132
4321
|
{
|
|
4133
4322
|
open,
|
|
@@ -4136,7 +4325,7 @@ var EasyDatePicker = React40.forwardRef(
|
|
|
4136
4325
|
setIsFocused(next);
|
|
4137
4326
|
},
|
|
4138
4327
|
children: [
|
|
4139
|
-
/* @__PURE__ */ (0,
|
|
4328
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
4140
4329
|
ShadcnButton,
|
|
4141
4330
|
{
|
|
4142
4331
|
ref,
|
|
@@ -4150,7 +4339,7 @@ var EasyDatePicker = React40.forwardRef(
|
|
|
4150
4339
|
"aria-describedby": errorId ?? helperId,
|
|
4151
4340
|
...props,
|
|
4152
4341
|
children: [
|
|
4153
|
-
/* @__PURE__ */ (0,
|
|
4342
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4154
4343
|
"span",
|
|
4155
4344
|
{
|
|
4156
4345
|
className: cn(
|
|
@@ -4160,16 +4349,16 @@ var EasyDatePicker = React40.forwardRef(
|
|
|
4160
4349
|
children: value ? (0, import_date_fns.format)(value, "dd.MM.yyyy") : placeholder
|
|
4161
4350
|
}
|
|
4162
4351
|
),
|
|
4163
|
-
/* @__PURE__ */ (0,
|
|
4352
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_lucide_react23.Calendar, { className: "ml-3 h-5 w-5 text-[var(--ui-icon-900)]" })
|
|
4164
4353
|
]
|
|
4165
4354
|
}
|
|
4166
4355
|
) }),
|
|
4167
|
-
/* @__PURE__ */ (0,
|
|
4356
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4168
4357
|
PopoverContent,
|
|
4169
4358
|
{
|
|
4170
4359
|
className: "w-auto p-0 bg-[var(--ui-background-0)] border border-[var(--ui-border-200)] rounded-[24px] shadow-md",
|
|
4171
4360
|
align: "start",
|
|
4172
|
-
children: /* @__PURE__ */ (0,
|
|
4361
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
4173
4362
|
Calendar,
|
|
4174
4363
|
{
|
|
4175
4364
|
mode: "single",
|
|
@@ -4188,26 +4377,26 @@ var EasyDatePicker = React40.forwardRef(
|
|
|
4188
4377
|
]
|
|
4189
4378
|
}
|
|
4190
4379
|
),
|
|
4191
|
-
hasError ? /* @__PURE__ */ (0,
|
|
4380
|
+
hasError ? /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
4192
4381
|
"p",
|
|
4193
4382
|
{
|
|
4194
4383
|
id: errorId,
|
|
4195
4384
|
className: "flex items-center gap-1 text-sm text-[var(--ui-danger-base)]",
|
|
4196
4385
|
children: [
|
|
4197
|
-
/* @__PURE__ */ (0,
|
|
4386
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_lucide_react23.AlertCircle, { className: "size-4" }),
|
|
4198
4387
|
errorText
|
|
4199
4388
|
]
|
|
4200
4389
|
}
|
|
4201
|
-
) : helperText ? /* @__PURE__ */ (0,
|
|
4390
|
+
) : helperText ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { id: helperId, className: "text-sm text-[var(--ui-text-500)]", children: helperText }) : null
|
|
4202
4391
|
] });
|
|
4203
4392
|
}
|
|
4204
4393
|
);
|
|
4205
4394
|
EasyDatePicker.displayName = "EasyDatePicker";
|
|
4206
4395
|
|
|
4207
4396
|
// src/hooks/use-easy-otp.ts
|
|
4208
|
-
var
|
|
4397
|
+
var React42 = __toESM(require("react"), 1);
|
|
4209
4398
|
var useEasyOtp = (options) => {
|
|
4210
|
-
const [open, setOpen] =
|
|
4399
|
+
const [open, setOpen] = React42.useState(false);
|
|
4211
4400
|
return {
|
|
4212
4401
|
open,
|
|
4213
4402
|
setOpen,
|
|
@@ -4230,6 +4419,7 @@ var useEasyOtp = (options) => {
|
|
|
4230
4419
|
EasyEmailInput,
|
|
4231
4420
|
EasyErrorMessage,
|
|
4232
4421
|
EasyHeading,
|
|
4422
|
+
EasyIBANInput,
|
|
4233
4423
|
EasyLabel,
|
|
4234
4424
|
EasyMessageDialog,
|
|
4235
4425
|
EasyOtp,
|
|
@@ -4263,9 +4453,11 @@ var useEasyOtp = (options) => {
|
|
|
4263
4453
|
designTokens,
|
|
4264
4454
|
easyButtonVariants,
|
|
4265
4455
|
elevations,
|
|
4456
|
+
extractIBANDigits,
|
|
4266
4457
|
formatEmail,
|
|
4267
4458
|
formatPhoneNumber,
|
|
4268
4459
|
formatPhoneNumberWithPattern,
|
|
4460
|
+
formatTurkishIBAN,
|
|
4269
4461
|
generateBreadcrumbItems,
|
|
4270
4462
|
getTypographyClass,
|
|
4271
4463
|
primitiveColors,
|
|
@@ -4277,6 +4469,7 @@ var useEasyOtp = (options) => {
|
|
|
4277
4469
|
typographyScale,
|
|
4278
4470
|
typographyTokens,
|
|
4279
4471
|
useEasyOtp,
|
|
4280
|
-
useTheme
|
|
4472
|
+
useTheme,
|
|
4473
|
+
validateTurkishIBAN
|
|
4281
4474
|
});
|
|
4282
4475
|
//# sourceMappingURL=index.cjs.map
|