alope-ui 1.6.0 → 1.6.1
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/README.md +197 -2
- package/dist/components/BottomNavbar/BottomNavbar.d.ts +3 -1
- package/dist/components/BottomNavbar/BottomNavbarAction.d.ts +2 -1
- package/dist/components/CodeInput/CodeInput.d.ts +8 -9
- package/dist/components/Collection/Collection.d.ts +9 -10
- package/dist/components/DatePicker/DatePicker.d.ts +0 -42
- package/dist/components/FAB/FAB.d.ts +7 -12
- package/dist/components/Masonry/Masonry.d.ts +6 -6
- package/dist/components/Skeleton/Skeleton.d.ts +3 -4
- package/dist/components/Slider/Slider.d.ts +14 -17
- package/dist/components/Timeline/Timeline.d.ts +19 -13
- package/dist/main.cjs +120 -142
- package/dist/main.d.ts +3 -2
- package/dist/main.js +585 -752
- package/package.json +1 -1
- /package/dist/components/FileUpload/{FileUpload.d.ts → FIleUpload.d.ts} +0 -0
package/dist/main.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
|
-
import React, { useState, useEffect, isValidElement, cloneElement, useRef,
|
|
2
|
+
import React, { useState, useEffect, isValidElement, cloneElement, useRef, Children, createContext, useContext, useId } from "react";
|
|
3
3
|
import { cn } from "clsx-for-tailwind";
|
|
4
4
|
import { Link } from "react-router-dom";
|
|
5
5
|
import Select from "react-select";
|
|
@@ -355,53 +355,59 @@ const BottomNavbarAction = ({
|
|
|
355
355
|
value,
|
|
356
356
|
selectedValue,
|
|
357
357
|
onChangeValue,
|
|
358
|
-
|
|
358
|
+
labelClassName,
|
|
359
|
+
className
|
|
359
360
|
}) => {
|
|
360
361
|
const isActive = value === selectedValue;
|
|
361
362
|
return /* @__PURE__ */ jsxs(
|
|
362
363
|
"button",
|
|
363
364
|
{
|
|
364
|
-
|
|
365
|
-
disabled,
|
|
366
|
-
"aria-current": isActive ? "page" : void 0,
|
|
367
|
-
onClick: () => {
|
|
368
|
-
if (!disabled) onChangeValue?.(value);
|
|
369
|
-
},
|
|
365
|
+
onClick: () => onChangeValue?.(value),
|
|
370
366
|
className: cn(
|
|
371
|
-
|
|
372
|
-
|
|
367
|
+
`inline-flex flex-1 flex-col items-center justify-center p-5 group`,
|
|
368
|
+
isActive ? "bg-secondary-30-50 dark:bg-secondary/10" : "hover:bg-secondary-30 dark:hover:bg-secondary/30",
|
|
369
|
+
className
|
|
373
370
|
),
|
|
374
371
|
children: [
|
|
375
|
-
icon
|
|
376
|
-
|
|
372
|
+
icon,
|
|
373
|
+
/* @__PURE__ */ jsx("span", { className: cn(
|
|
374
|
+
`text-sm`,
|
|
375
|
+
isActive ? "text-primary" : "text-secondary-dark-700 dark:text-secondary-dark group-hover:text-secondary-700 dark:group-hover:text-white",
|
|
376
|
+
labelClassName
|
|
377
|
+
), children: label })
|
|
377
378
|
]
|
|
378
379
|
}
|
|
379
380
|
);
|
|
380
381
|
};
|
|
381
382
|
const BottomNavbar = ({
|
|
382
383
|
children,
|
|
384
|
+
className,
|
|
383
385
|
value,
|
|
384
386
|
onChangeValue
|
|
385
387
|
}) => {
|
|
386
|
-
return /* @__PURE__ */ jsx(
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
388
|
+
return /* @__PURE__ */ jsx("div", { className: `fixed bottom-0 left-0 z-50 w-full bg-white border-t border-secondary dark:bg-gray-800 dark:border-secondary-dark-700 ${className ?? ""}`, children: /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center h-full max-w-lg md:max-w-md mx-auto font-medium", children: React.Children.map(children, (child) => {
|
|
389
|
+
if (isValidElement(child)) {
|
|
390
|
+
if (child.type === BottomNavbarAction) {
|
|
391
|
+
return cloneElement(child, {
|
|
392
|
+
selectedValue: value,
|
|
393
|
+
onChangeValue
|
|
394
|
+
});
|
|
395
|
+
} else {
|
|
396
|
+
if (process.env.NODE_ENV !== "production") {
|
|
397
|
+
console.warn(
|
|
398
|
+
`[BottomNavbar] Invalid child component: Only <BottomNavbarAction> is allowed.
|
|
399
|
+
Received:`,
|
|
400
|
+
child.type
|
|
399
401
|
);
|
|
400
402
|
}
|
|
401
403
|
return null;
|
|
402
|
-
}
|
|
404
|
+
}
|
|
403
405
|
}
|
|
404
|
-
|
|
406
|
+
if (process.env.NODE_ENV !== "production") {
|
|
407
|
+
console.warn(`[BottomNavbar] Invalid child: Only <BottomNavbarAction> components are allowed.`);
|
|
408
|
+
}
|
|
409
|
+
return null;
|
|
410
|
+
}) }) });
|
|
405
411
|
};
|
|
406
412
|
const colorStyles = {
|
|
407
413
|
primary: "text-primary dark:text-primary-dark-30",
|
|
@@ -874,470 +880,118 @@ const CodeInputSize = {
|
|
|
874
880
|
const CodeInput = ({
|
|
875
881
|
id,
|
|
876
882
|
label,
|
|
877
|
-
error,
|
|
878
883
|
length,
|
|
879
|
-
value
|
|
884
|
+
value,
|
|
880
885
|
disabled,
|
|
886
|
+
labelClassName,
|
|
881
887
|
name,
|
|
882
888
|
onCodeChange,
|
|
883
889
|
inputSize = "md",
|
|
884
|
-
inputMode = "numeric",
|
|
885
890
|
...props
|
|
886
891
|
}) => {
|
|
887
892
|
const inputRefs = useRef([]);
|
|
888
893
|
const inputSizeClasses = CodeInputSize[inputSize];
|
|
889
|
-
const
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
894
|
+
const findFirstEmptyIndex = () => {
|
|
895
|
+
for (let i = 0; i < length; i++) {
|
|
896
|
+
if (!inputRefs.current[i]?.value) {
|
|
897
|
+
return i;
|
|
898
|
+
}
|
|
899
|
+
}
|
|
900
|
+
return -1;
|
|
901
|
+
};
|
|
902
|
+
const handleInputChange = (index) => {
|
|
903
|
+
const code = inputRefs.current.map((input) => input?.value || "").join("");
|
|
904
|
+
if (onCodeChange) {
|
|
905
|
+
onCodeChange(code);
|
|
906
|
+
}
|
|
907
|
+
if (inputRefs.current[index]?.value && index < length - 1) {
|
|
896
908
|
inputRefs.current[index + 1]?.focus();
|
|
897
909
|
}
|
|
898
910
|
};
|
|
899
911
|
const handleFocus = (index) => {
|
|
900
|
-
const firstEmptyIndex =
|
|
901
|
-
|
|
902
|
-
);
|
|
903
|
-
if (firstEmptyIndex !== void 0 && firstEmptyIndex < index) {
|
|
912
|
+
const firstEmptyIndex = findFirstEmptyIndex();
|
|
913
|
+
if (firstEmptyIndex !== -1 && firstEmptyIndex < index) {
|
|
904
914
|
inputRefs.current[firstEmptyIndex]?.focus();
|
|
905
915
|
}
|
|
906
916
|
};
|
|
907
917
|
const handleKeyDown = (e, index) => {
|
|
908
|
-
if (e.key === "Backspace") {
|
|
909
|
-
if (value[index]) {
|
|
910
|
-
const chars = Array.from({ length }, (_, i) => value[i] ?? "");
|
|
911
|
-
chars[index] = "";
|
|
912
|
-
onCodeChange(chars.join(""));
|
|
913
|
-
} else if (index > 0) {
|
|
914
|
-
inputRefs.current[index - 1]?.focus();
|
|
915
|
-
}
|
|
916
|
-
} else if (e.key === "ArrowLeft" && index > 0) {
|
|
917
|
-
e.preventDefault();
|
|
918
|
+
if (e.key === "Backspace" && !inputRefs.current[index]?.value && index > 0) {
|
|
918
919
|
inputRefs.current[index - 1]?.focus();
|
|
919
|
-
} else if (e.key === "ArrowRight" && index < length - 1) {
|
|
920
|
-
e.preventDefault();
|
|
921
|
-
inputRefs.current[index + 1]?.focus();
|
|
922
920
|
}
|
|
923
921
|
};
|
|
924
922
|
const handlePaste = (e) => {
|
|
925
923
|
e.preventDefault();
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
const nextFocusIndex = Math.min(pastedData.length, length - 1);
|
|
932
|
-
inputRefs.current[nextFocusIndex]?.focus();
|
|
933
|
-
};
|
|
934
|
-
return /* @__PURE__ */ jsxs("div", { className: "w-full", children: [
|
|
935
|
-
label && /* @__PURE__ */ jsx(
|
|
936
|
-
"label",
|
|
937
|
-
{
|
|
938
|
-
htmlFor: id || name ? `${id || name}-0` : void 0,
|
|
939
|
-
className: "block text-sm font-medium mb-1.5 text-gray-900 dark:text-neutral-100",
|
|
940
|
-
children: label
|
|
924
|
+
const pastedData = e.clipboardData.getData("text").slice(0, length);
|
|
925
|
+
pastedData.split("").forEach((char, index) => {
|
|
926
|
+
if (inputRefs.current[index]) {
|
|
927
|
+
inputRefs.current[index].value = char;
|
|
928
|
+
handleInputChange(index);
|
|
941
929
|
}
|
|
942
|
-
)
|
|
943
|
-
|
|
930
|
+
});
|
|
931
|
+
};
|
|
932
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
933
|
+
label && /* @__PURE__ */ jsx("label", { htmlFor: id || name, className: cn("block text-sm font-medium mb-1 dark:text-white", labelClassName), children: label }),
|
|
934
|
+
/* @__PURE__ */ jsx("div", { className: "flex gap-2", onPaste: handlePaste, children: Array.from({ length }, (_, index) => /* @__PURE__ */ jsx(
|
|
944
935
|
"input",
|
|
945
936
|
{
|
|
946
|
-
id: id || name ? `${id || name}-${index}` : void 0,
|
|
947
|
-
name: name ? `${name}[${index}]` : void 0,
|
|
948
937
|
ref: (el) => {
|
|
949
938
|
inputRefs.current[index] = el;
|
|
950
939
|
},
|
|
951
940
|
type: "text",
|
|
952
|
-
inputMode,
|
|
953
|
-
autoComplete: index === 0 ? "one-time-code" : "off",
|
|
954
|
-
"aria-label": `${label ?? "Code"} digit ${index + 1}`,
|
|
955
941
|
disabled,
|
|
956
|
-
value: value[index]
|
|
942
|
+
value: value?.[index],
|
|
957
943
|
maxLength: 1,
|
|
958
|
-
onChange: (
|
|
944
|
+
onChange: () => handleInputChange(index),
|
|
959
945
|
onKeyDown: (e) => handleKeyDown(e, index),
|
|
960
946
|
onFocus: () => handleFocus(index),
|
|
961
947
|
className: cn(
|
|
962
|
-
"text-center
|
|
963
|
-
"bg-white border-gray-200 text-gray-900 placeholder:text-gray-400",
|
|
964
|
-
"dark:bg-neutral-900 dark:border-neutral-800 dark:text-neutral-100 dark:placeholder:text-neutral-500",
|
|
965
|
-
"focus:outline-none focus:ring-1 focus:ring-primary focus:border-primary dark:focus:ring-primary-dark dark:focus:border-primary-dark",
|
|
948
|
+
"text-center border rounded-md shadow-sm focus:outline-none focus:ring-primary focus:border-primary border-secondary dark:text-white dark:placeholder:text-white",
|
|
966
949
|
inputSizeClasses,
|
|
967
|
-
|
|
968
|
-
|
|
950
|
+
{
|
|
951
|
+
"bg-secondary/40 cursor-not-allowed ": disabled
|
|
952
|
+
}
|
|
969
953
|
),
|
|
970
954
|
...props
|
|
971
955
|
},
|
|
972
956
|
index
|
|
973
|
-
)) })
|
|
974
|
-
error && /* @__PURE__ */ jsx("p", { className: "mt-1.5 text-sm text-error dark:text-error-dark", children: error })
|
|
957
|
+
)) })
|
|
975
958
|
] });
|
|
976
959
|
};
|
|
977
960
|
function Collection({
|
|
978
961
|
data,
|
|
979
962
|
title,
|
|
963
|
+
className,
|
|
964
|
+
wrapperClassName,
|
|
980
965
|
children,
|
|
981
966
|
suffixIcon,
|
|
982
967
|
activeItem,
|
|
983
|
-
onChangeActive
|
|
984
|
-
emptyMessage = "No items to display."
|
|
968
|
+
onChangeActive
|
|
985
969
|
}) {
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
onChangeActive(item, index);
|
|
992
|
-
}
|
|
993
|
-
};
|
|
994
|
-
return /* @__PURE__ */ jsxs("div", { className: "w-full p-4 rounded-lg border border-gray-200 bg-white text-gray-900 dark:border-neutral-800 dark:bg-neutral-900 dark:text-neutral-100", children: [
|
|
995
|
-
title && /* @__PURE__ */ jsx("h2", { className: "text-base font-semibold mb-3 text-gray-900 dark:text-neutral-100", children: title }),
|
|
996
|
-
data.length > 0 ? /* @__PURE__ */ jsx("ul", { className: "space-y-2.5", children: data.map((item, index) => {
|
|
997
|
-
const isActive = activeItem !== void 0 && item.id === activeItem;
|
|
998
|
-
return /* @__PURE__ */ jsx("li", { children: children ? /* @__PURE__ */ jsx(
|
|
970
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("p-3 border border-secondary-700 inline-block dark:border-secondary-dark-700 rounded-md dark:text-white", className), children: [
|
|
971
|
+
title && /* @__PURE__ */ jsx("h2", { className: "text-lg font-semibold mb-4", children: title }),
|
|
972
|
+
data.length > 0 ? /* @__PURE__ */ jsx("ul", { className: cn("space-y-3", wrapperClassName), children: data.map((item, index) => {
|
|
973
|
+
const isActive = item.id === activeItem;
|
|
974
|
+
return /* @__PURE__ */ jsx("li", { children: children ? /* @__PURE__ */ jsx("div", { onClick: () => onChangeActive?.(item, index), children: children(item, index, isActive) }) : /* @__PURE__ */ jsxs(
|
|
999
975
|
"div",
|
|
1000
976
|
{
|
|
1001
|
-
role: isInteractive ? "button" : void 0,
|
|
1002
|
-
tabIndex: isInteractive ? 0 : void 0,
|
|
1003
|
-
"aria-pressed": isInteractive ? isActive : void 0,
|
|
1004
977
|
onClick: () => onChangeActive?.(item, index),
|
|
1005
|
-
onKeyDown: (e) => handleKeyDown(e, item, index),
|
|
1006
|
-
className: cn(isInteractive && "cursor-pointer"),
|
|
1007
|
-
children: children(item, index, isActive)
|
|
1008
|
-
}
|
|
1009
|
-
) : /* @__PURE__ */ jsxs(
|
|
1010
|
-
"div",
|
|
1011
|
-
{
|
|
1012
|
-
role: isInteractive ? "button" : void 0,
|
|
1013
|
-
tabIndex: isInteractive ? 0 : void 0,
|
|
1014
|
-
"aria-pressed": isInteractive ? isActive : void 0,
|
|
1015
|
-
onClick: () => onChangeActive?.(item, index),
|
|
1016
|
-
onKeyDown: (e) => handleKeyDown(e, item, index),
|
|
1017
978
|
className: cn(
|
|
1018
|
-
"
|
|
1019
|
-
|
|
1020
|
-
isActive ? "border-primary bg-primary/10 text-primary dark:border-primary-dark dark:bg-primary/15 dark:text-neutral-100" : cn(
|
|
1021
|
-
"border-gray-200 bg-white text-gray-800 dark:border-neutral-800 dark:bg-neutral-900 dark:text-neutral-200",
|
|
1022
|
-
isInteractive && "hover:bg-gray-50 dark:hover:bg-neutral-800/70"
|
|
1023
|
-
)
|
|
979
|
+
"p-3 border border-secondary-700 dark:border-secondary-dark-700 rounded-md flex gap-3 items-center justify-between cursor-pointer",
|
|
980
|
+
{ "bg-primary-100 dark:bg-primary-dark-100": isActive }
|
|
1024
981
|
),
|
|
1025
982
|
children: [
|
|
1026
|
-
/* @__PURE__ */ jsx("
|
|
1027
|
-
suffixIcon && /* @__PURE__ */ jsx(
|
|
1028
|
-
"span",
|
|
1029
|
-
{
|
|
1030
|
-
className: cn(
|
|
1031
|
-
"shrink-0 inline-flex items-center",
|
|
1032
|
-
isActive ? "text-primary dark:text-primary-dark" : "text-gray-400 dark:text-neutral-500"
|
|
1033
|
-
),
|
|
1034
|
-
children: typeof suffixIcon === "function" ? suffixIcon(item, index, isActive) : suffixIcon
|
|
1035
|
-
}
|
|
1036
|
-
)
|
|
983
|
+
/* @__PURE__ */ jsx("p", { className: "font-bold", children: item.name || `Item ${item.id}` }),
|
|
984
|
+
suffixIcon && /* @__PURE__ */ jsx("span", { children: typeof suffixIcon === "function" ? suffixIcon(item, index, isActive) : suffixIcon })
|
|
1037
985
|
]
|
|
1038
986
|
}
|
|
1039
987
|
) }, item.id);
|
|
1040
|
-
}) }) : /* @__PURE__ */ jsx("
|
|
988
|
+
}) }) : /* @__PURE__ */ jsx("p", { children: "No items to display." })
|
|
1041
989
|
] });
|
|
1042
990
|
}
|
|
1043
|
-
const TextInput = React.forwardRef(
|
|
1044
|
-
({
|
|
1045
|
-
label,
|
|
1046
|
-
id,
|
|
1047
|
-
name,
|
|
1048
|
-
error,
|
|
1049
|
-
...props
|
|
1050
|
-
}, ref) => {
|
|
1051
|
-
return /* @__PURE__ */ jsxs("div", { className: "w-full", children: [
|
|
1052
|
-
label && /* @__PURE__ */ jsx(
|
|
1053
|
-
"label",
|
|
1054
|
-
{
|
|
1055
|
-
htmlFor: id || name,
|
|
1056
|
-
className: "block text-sm font-medium mb-1 text-gray-900 dark:text-neutral-100",
|
|
1057
|
-
children: label
|
|
1058
|
-
}
|
|
1059
|
-
),
|
|
1060
|
-
/* @__PURE__ */ jsx(
|
|
1061
|
-
"input",
|
|
1062
|
-
{
|
|
1063
|
-
ref,
|
|
1064
|
-
id: id || name,
|
|
1065
|
-
name,
|
|
1066
|
-
className: cn(
|
|
1067
|
-
"block w-full px-3 py-2 border rounded-md shadow-sm sm:text-sm transition-colors",
|
|
1068
|
-
"bg-white border-gray-200 text-gray-900 placeholder:text-gray-400",
|
|
1069
|
-
"dark:bg-neutral-900 dark:border-neutral-800 dark:text-neutral-100 dark:placeholder:text-neutral-500",
|
|
1070
|
-
"focus:outline-none focus:ring-1 focus:ring-primary focus:border-primary dark:focus:ring-primary-dark dark:focus:border-primary-dark",
|
|
1071
|
-
error && "border-error dark:border-error-dark focus:ring-error focus:border-error dark:focus:ring-error-dark dark:focus:border-error-dark",
|
|
1072
|
-
props.disabled && "opacity-50 bg-gray-100 dark:bg-neutral-800 cursor-not-allowed"
|
|
1073
|
-
),
|
|
1074
|
-
...props
|
|
1075
|
-
}
|
|
1076
|
-
),
|
|
1077
|
-
error && /* @__PURE__ */ jsx("p", { className: "mt-1 text-sm text-error dark:text-error-dark", children: error })
|
|
1078
|
-
] });
|
|
1079
|
-
}
|
|
1080
|
-
);
|
|
1081
|
-
TextInput.displayName = "TextInput";
|
|
1082
|
-
const DatePickerColors = {
|
|
1083
|
-
primary: {
|
|
1084
|
-
header: "bg-primary dark:bg-primary-dark",
|
|
1085
|
-
icon: "hover:bg-primary-700 dark:hover:bg-primary-dark-700",
|
|
1086
|
-
day: "bg-primary dark:bg-primary-dark text-white",
|
|
1087
|
-
today: "ring-1 ring-primary dark:ring-primary-dark"
|
|
1088
|
-
},
|
|
1089
|
-
success: {
|
|
1090
|
-
header: "bg-success dark:bg-success-dark",
|
|
1091
|
-
icon: "hover:bg-success-700 dark:hover:bg-success-dark-700",
|
|
1092
|
-
day: "bg-success dark:bg-success-dark text-white",
|
|
1093
|
-
today: "ring-1 ring-success dark:ring-success-dark"
|
|
1094
|
-
},
|
|
1095
|
-
info: {
|
|
1096
|
-
header: "bg-info dark:bg-info-dark",
|
|
1097
|
-
icon: "hover:bg-info-700 dark:hover:bg-info-dark-700",
|
|
1098
|
-
day: "bg-info dark:bg-info-dark text-white",
|
|
1099
|
-
today: "ring-1 ring-info dark:ring-info-dark"
|
|
1100
|
-
},
|
|
1101
|
-
error: {
|
|
1102
|
-
header: "bg-error dark:bg-error-dark",
|
|
1103
|
-
icon: "hover:bg-error-700 dark:hover:bg-error-dark-700",
|
|
1104
|
-
day: "bg-error dark:bg-error-dark text-white",
|
|
1105
|
-
today: "ring-1 ring-error dark:ring-error-dark"
|
|
1106
|
-
},
|
|
1107
|
-
warning: {
|
|
1108
|
-
header: "bg-warning dark:bg-warning-dark",
|
|
1109
|
-
icon: "hover:bg-warning-700 dark:hover:bg-warning-dark-700",
|
|
1110
|
-
day: "bg-warning dark:bg-warning-dark text-white",
|
|
1111
|
-
today: "ring-1 ring-warning dark:ring-warning-dark"
|
|
1112
|
-
}
|
|
1113
|
-
};
|
|
1114
|
-
const DatePicker = ({
|
|
1115
|
-
label,
|
|
1116
|
-
error,
|
|
1117
|
-
id,
|
|
1118
|
-
name,
|
|
1119
|
-
color = "primary",
|
|
1120
|
-
selectedDate: initialSelectedDate,
|
|
1121
|
-
onDateChange,
|
|
1122
|
-
placeholder = "Select a date",
|
|
1123
|
-
disabled,
|
|
1124
|
-
...props
|
|
1125
|
-
}) => {
|
|
1126
|
-
const [selectedDate, setSelectedDate] = useState(
|
|
1127
|
-
initialSelectedDate ?? null
|
|
1128
|
-
);
|
|
1129
|
-
const [isOpen, setIsOpen] = useState(false);
|
|
1130
|
-
const [currentMonth, setCurrentMonth] = useState(
|
|
1131
|
-
selectedDate ? selectedDate.getMonth() : (/* @__PURE__ */ new Date()).getMonth()
|
|
1132
|
-
);
|
|
1133
|
-
const [currentYear, setCurrentYear] = useState(
|
|
1134
|
-
selectedDate ? selectedDate.getFullYear() : (/* @__PURE__ */ new Date()).getFullYear()
|
|
1135
|
-
);
|
|
1136
|
-
const [calendarPosition, setCalendarPosition] = useState("bottom");
|
|
1137
|
-
const datePickerRef = useRef(null);
|
|
1138
|
-
const inputRef = useRef(null);
|
|
1139
|
-
const colorClasses = DatePickerColors[color];
|
|
1140
|
-
useLayoutEffect(() => {
|
|
1141
|
-
if (isOpen && inputRef.current) {
|
|
1142
|
-
const inputRect = inputRef.current.getBoundingClientRect();
|
|
1143
|
-
const spaceBelow = window.innerHeight - inputRect.bottom;
|
|
1144
|
-
const calendarHeight = 320;
|
|
1145
|
-
setCalendarPosition(spaceBelow < calendarHeight ? "top" : "bottom");
|
|
1146
|
-
}
|
|
1147
|
-
}, [isOpen]);
|
|
1148
|
-
useEffect(() => {
|
|
1149
|
-
if (initialSelectedDate !== void 0) {
|
|
1150
|
-
setSelectedDate(initialSelectedDate);
|
|
1151
|
-
if (initialSelectedDate) {
|
|
1152
|
-
setCurrentMonth(initialSelectedDate.getMonth());
|
|
1153
|
-
setCurrentYear(initialSelectedDate.getFullYear());
|
|
1154
|
-
}
|
|
1155
|
-
}
|
|
1156
|
-
}, [initialSelectedDate]);
|
|
1157
|
-
useEffect(() => {
|
|
1158
|
-
if (!isOpen) return;
|
|
1159
|
-
const handleClickOutside = (event) => {
|
|
1160
|
-
if (datePickerRef.current && !datePickerRef.current.contains(event.target)) {
|
|
1161
|
-
setIsOpen(false);
|
|
1162
|
-
}
|
|
1163
|
-
};
|
|
1164
|
-
const handleEsc = (event) => {
|
|
1165
|
-
if (event.key === "Escape") {
|
|
1166
|
-
setIsOpen(false);
|
|
1167
|
-
}
|
|
1168
|
-
};
|
|
1169
|
-
document.addEventListener("mousedown", handleClickOutside);
|
|
1170
|
-
document.addEventListener("keydown", handleEsc);
|
|
1171
|
-
return () => {
|
|
1172
|
-
document.removeEventListener("mousedown", handleClickOutside);
|
|
1173
|
-
document.removeEventListener("keydown", handleEsc);
|
|
1174
|
-
};
|
|
1175
|
-
}, [isOpen]);
|
|
1176
|
-
const handleDateChange = (date) => {
|
|
1177
|
-
setSelectedDate(date);
|
|
1178
|
-
onDateChange?.(date);
|
|
1179
|
-
setIsOpen(false);
|
|
1180
|
-
};
|
|
1181
|
-
const daysInMonth = (month, year) => {
|
|
1182
|
-
return new Date(year, month + 1, 0).getDate();
|
|
1183
|
-
};
|
|
1184
|
-
const firstDayOfMonth = (month, year) => {
|
|
1185
|
-
return new Date(year, month, 1).getDay();
|
|
1186
|
-
};
|
|
1187
|
-
const handlePrevMonth = () => {
|
|
1188
|
-
if (currentMonth === 0) {
|
|
1189
|
-
setCurrentMonth(11);
|
|
1190
|
-
setCurrentYear((prev) => prev - 1);
|
|
1191
|
-
} else {
|
|
1192
|
-
setCurrentMonth((prev) => prev - 1);
|
|
1193
|
-
}
|
|
1194
|
-
};
|
|
1195
|
-
const handleNextMonth = () => {
|
|
1196
|
-
if (currentMonth === 11) {
|
|
1197
|
-
setCurrentMonth(0);
|
|
1198
|
-
setCurrentYear((prev) => prev + 1);
|
|
1199
|
-
} else {
|
|
1200
|
-
setCurrentMonth((prev) => prev + 1);
|
|
1201
|
-
}
|
|
1202
|
-
};
|
|
1203
|
-
const renderCalendar = () => {
|
|
1204
|
-
const days = [];
|
|
1205
|
-
const safeYear = Number.isFinite(currentYear) && currentYear > 0 ? currentYear : (/* @__PURE__ */ new Date()).getFullYear();
|
|
1206
|
-
const totalDays = daysInMonth(currentMonth, safeYear);
|
|
1207
|
-
const firstDay = firstDayOfMonth(currentMonth, safeYear);
|
|
1208
|
-
const today = /* @__PURE__ */ new Date();
|
|
1209
|
-
for (let i = 0; i < firstDay; i++) {
|
|
1210
|
-
days.push(/* @__PURE__ */ jsx("div", { className: "h-9" }, `empty-${i}`));
|
|
1211
|
-
}
|
|
1212
|
-
for (let i = 1; i <= totalDays; i++) {
|
|
1213
|
-
const date = new Date(safeYear, currentMonth, i);
|
|
1214
|
-
const isSelected = selectedDate !== null && date.getDate() === selectedDate.getDate() && date.getMonth() === selectedDate.getMonth() && date.getFullYear() === selectedDate.getFullYear();
|
|
1215
|
-
const isToday = date.getDate() === today.getDate() && date.getMonth() === today.getMonth() && date.getFullYear() === today.getFullYear();
|
|
1216
|
-
days.push(
|
|
1217
|
-
/* @__PURE__ */ jsx(
|
|
1218
|
-
"button",
|
|
1219
|
-
{
|
|
1220
|
-
type: "button",
|
|
1221
|
-
onClick: () => handleDateChange(date),
|
|
1222
|
-
className: cn(
|
|
1223
|
-
"h-9 w-full flex items-center justify-center rounded-md text-sm font-medium transition-colors cursor-pointer select-none",
|
|
1224
|
-
isSelected ? colorClasses.day : cn(
|
|
1225
|
-
"text-gray-700 dark:text-neutral-300 hover:bg-gray-100 dark:hover:bg-neutral-800",
|
|
1226
|
-
isToday && colorClasses.today
|
|
1227
|
-
)
|
|
1228
|
-
),
|
|
1229
|
-
children: i
|
|
1230
|
-
},
|
|
1231
|
-
i
|
|
1232
|
-
)
|
|
1233
|
-
);
|
|
1234
|
-
}
|
|
1235
|
-
return /* @__PURE__ */ jsxs("div", { className: "p-3", children: [
|
|
1236
|
-
/* @__PURE__ */ jsx("div", { className: "grid grid-cols-7 gap-1 mb-1", children: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"].map((day) => /* @__PURE__ */ jsx(
|
|
1237
|
-
"div",
|
|
1238
|
-
{
|
|
1239
|
-
className: "h-8 flex items-center justify-center text-xs font-semibold text-gray-500 dark:text-neutral-400 select-none",
|
|
1240
|
-
children: day
|
|
1241
|
-
},
|
|
1242
|
-
day
|
|
1243
|
-
)) }),
|
|
1244
|
-
/* @__PURE__ */ jsx("div", { className: "grid grid-cols-7 gap-1", children: days })
|
|
1245
|
-
] });
|
|
1246
|
-
};
|
|
1247
|
-
const displayMonthYear = Number.isFinite(currentYear) && currentYear > 0 ? currentYear : (/* @__PURE__ */ new Date()).getFullYear();
|
|
1248
|
-
return /* @__PURE__ */ jsxs("div", { className: "relative w-full", ref: datePickerRef, children: [
|
|
1249
|
-
/* @__PURE__ */ jsx(
|
|
1250
|
-
TextInput,
|
|
1251
|
-
{
|
|
1252
|
-
...props,
|
|
1253
|
-
id,
|
|
1254
|
-
name,
|
|
1255
|
-
label,
|
|
1256
|
-
error,
|
|
1257
|
-
type: "text",
|
|
1258
|
-
readOnly: true,
|
|
1259
|
-
disabled,
|
|
1260
|
-
ref: inputRef,
|
|
1261
|
-
value: selectedDate ? selectedDate.toLocaleDateString() : "",
|
|
1262
|
-
onClick: () => {
|
|
1263
|
-
if (!disabled) setIsOpen((prev) => !prev);
|
|
1264
|
-
},
|
|
1265
|
-
placeholder
|
|
1266
|
-
}
|
|
1267
|
-
),
|
|
1268
|
-
isOpen && !disabled && /* @__PURE__ */ jsxs(
|
|
1269
|
-
"div",
|
|
1270
|
-
{
|
|
1271
|
-
className: cn(
|
|
1272
|
-
"absolute z-30 w-full min-w-[280px] max-w-xs overflow-hidden rounded-xl border border-gray-200 dark:border-neutral-800 bg-white dark:bg-neutral-900 shadow-xl",
|
|
1273
|
-
calendarPosition === "top" ? "bottom-full mb-2" : "top-full mt-2"
|
|
1274
|
-
),
|
|
1275
|
-
children: [
|
|
1276
|
-
/* @__PURE__ */ jsxs(
|
|
1277
|
-
"div",
|
|
1278
|
-
{
|
|
1279
|
-
className: cn(
|
|
1280
|
-
"flex items-center justify-between gap-2 px-3 py-2.5 text-white",
|
|
1281
|
-
colorClasses.header
|
|
1282
|
-
),
|
|
1283
|
-
children: [
|
|
1284
|
-
/* @__PURE__ */ jsx(
|
|
1285
|
-
"button",
|
|
1286
|
-
{
|
|
1287
|
-
type: "button",
|
|
1288
|
-
"aria-label": "Previous month",
|
|
1289
|
-
onClick: handlePrevMonth,
|
|
1290
|
-
className: cn(
|
|
1291
|
-
"p-1.5 rounded-lg transition-colors cursor-pointer",
|
|
1292
|
-
colorClasses.icon
|
|
1293
|
-
),
|
|
1294
|
-
children: /* @__PURE__ */ jsx("svg", { className: "w-4 h-4", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M15 19l-7-7 7-7", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) })
|
|
1295
|
-
}
|
|
1296
|
-
),
|
|
1297
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5", children: [
|
|
1298
|
-
/* @__PURE__ */ jsx("span", { className: "text-sm font-semibold select-none", children: new Date(displayMonthYear, currentMonth).toLocaleString("default", {
|
|
1299
|
-
month: "long"
|
|
1300
|
-
}) }),
|
|
1301
|
-
/* @__PURE__ */ jsx(
|
|
1302
|
-
"input",
|
|
1303
|
-
{
|
|
1304
|
-
type: "number",
|
|
1305
|
-
"aria-label": "Year",
|
|
1306
|
-
value: currentYear || "",
|
|
1307
|
-
onChange: (e) => {
|
|
1308
|
-
const val = parseInt(e.target.value, 10);
|
|
1309
|
-
setCurrentYear(Number.isNaN(val) ? 0 : val);
|
|
1310
|
-
},
|
|
1311
|
-
className: "w-16 px-1.5 py-0.5 text-sm font-semibold text-center rounded bg-black/15 text-white border border-white/25 focus:outline-none focus:border-white"
|
|
1312
|
-
}
|
|
1313
|
-
)
|
|
1314
|
-
] }),
|
|
1315
|
-
/* @__PURE__ */ jsx(
|
|
1316
|
-
"button",
|
|
1317
|
-
{
|
|
1318
|
-
type: "button",
|
|
1319
|
-
"aria-label": "Next month",
|
|
1320
|
-
onClick: handleNextMonth,
|
|
1321
|
-
className: cn(
|
|
1322
|
-
"p-1.5 rounded-lg transition-colors cursor-pointer",
|
|
1323
|
-
colorClasses.icon
|
|
1324
|
-
),
|
|
1325
|
-
children: /* @__PURE__ */ jsx("svg", { className: "w-4 h-4", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M9 5l7 7-7 7", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) })
|
|
1326
|
-
}
|
|
1327
|
-
)
|
|
1328
|
-
]
|
|
1329
|
-
}
|
|
1330
|
-
),
|
|
1331
|
-
renderCalendar()
|
|
1332
|
-
]
|
|
1333
|
-
}
|
|
1334
|
-
)
|
|
1335
|
-
] });
|
|
1336
|
-
};
|
|
1337
991
|
const FABSizes = {
|
|
1338
|
-
sm: "w-11 h-11
|
|
1339
|
-
md: "w-14 h-14
|
|
1340
|
-
lg: "w-
|
|
992
|
+
sm: "w-11 h-11 font-medium rounded-sm rounded rounded-full",
|
|
993
|
+
md: "w-14 h-14 font-semibold tracking-[.2px] rounded-md rounded rounded-full",
|
|
994
|
+
lg: "w-19 h-19 text-lg font-semibold rounded-lg rounded rounded-full"
|
|
1341
995
|
};
|
|
1342
996
|
const FAB = ({
|
|
1343
997
|
children,
|
|
@@ -1347,114 +1001,64 @@ const FAB = ({
|
|
|
1347
1001
|
variantType = "primary",
|
|
1348
1002
|
isOpen,
|
|
1349
1003
|
onOpen,
|
|
1350
|
-
icon
|
|
1351
|
-
disabled = false,
|
|
1352
|
-
ariaLabel = "Toggle floating actions"
|
|
1004
|
+
icon = "+"
|
|
1353
1005
|
}) => {
|
|
1354
1006
|
const [shouldRender, setShouldRender] = useState(isOpen);
|
|
1355
1007
|
const [isAnimatingOut, setIsAnimatingOut] = useState(false);
|
|
1356
|
-
const validChildren = Children.toArray(children).filter(isValidElement);
|
|
1357
1008
|
useEffect(() => {
|
|
1358
1009
|
if (isOpen) {
|
|
1359
1010
|
setShouldRender(true);
|
|
1360
1011
|
setIsAnimatingOut(false);
|
|
1361
1012
|
} else if (shouldRender) {
|
|
1362
1013
|
setIsAnimatingOut(true);
|
|
1363
|
-
const totalDuration = 300 + Math.max(0, validChildren.length - 1) * 100;
|
|
1364
1014
|
const timeout = setTimeout(() => {
|
|
1365
1015
|
setShouldRender(false);
|
|
1366
1016
|
setIsAnimatingOut(false);
|
|
1367
|
-
},
|
|
1017
|
+
}, 300);
|
|
1368
1018
|
return () => clearTimeout(timeout);
|
|
1369
1019
|
}
|
|
1370
|
-
}, [isOpen, shouldRender
|
|
1020
|
+
}, [isOpen, shouldRender]);
|
|
1021
|
+
const directionClasses = {
|
|
1022
|
+
vertical: "flex-col-reverse space-y-2 space-y-reverse mb-2",
|
|
1023
|
+
horizontal: "flex-row-reverse space-x-2 space-x-reverse mr-2"
|
|
1024
|
+
};
|
|
1371
1025
|
const sizeClasses2 = FABSizes[size];
|
|
1372
1026
|
const variantClasses = getVariantClasses(variant, variantType);
|
|
1373
|
-
const
|
|
1374
|
-
|
|
1027
|
+
const animatedChildren = Children.toArray(children).map((child, index, arr) => {
|
|
1028
|
+
if (!isValidElement(child)) return child;
|
|
1375
1029
|
const reverseIndex = arr.length - 1 - index;
|
|
1376
1030
|
return /* @__PURE__ */ jsx(
|
|
1377
1031
|
"div",
|
|
1378
1032
|
{
|
|
1379
|
-
style: {
|
|
1380
|
-
animationDelay: `${isAnimatingOut ? reverseIndex * 100 : index * 100}ms`,
|
|
1381
|
-
animationFillMode: "forwards"
|
|
1382
|
-
},
|
|
1033
|
+
style: { animationDelay: `${isAnimatingOut ? reverseIndex * 100 : index * 100}ms` },
|
|
1383
1034
|
className: cn(
|
|
1384
1035
|
!isAnimatingOut && "opacity-0",
|
|
1385
1036
|
isAnimatingOut ? "animate-pop-out" : "animate-pop"
|
|
1386
1037
|
),
|
|
1387
1038
|
children: child
|
|
1388
1039
|
},
|
|
1389
|
-
|
|
1040
|
+
index
|
|
1390
1041
|
);
|
|
1391
1042
|
});
|
|
1392
|
-
return /* @__PURE__ */ jsxs(
|
|
1393
|
-
"div",
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
role: "menu",
|
|
1404
|
-
className: cn(
|
|
1405
|
-
"flex items-center gap-2.5",
|
|
1406
|
-
direction === "vertical" ? "flex-col-reverse" : "flex-row-reverse"
|
|
1407
|
-
),
|
|
1408
|
-
children: animatedChildren
|
|
1409
|
-
}
|
|
1410
|
-
),
|
|
1411
|
-
/* @__PURE__ */ jsx(
|
|
1412
|
-
"button",
|
|
1043
|
+
return /* @__PURE__ */ jsx("div", { className: "fixed bottom-8 right-8 flex flex-col items-end z-50", children: /* @__PURE__ */ jsxs("div", { className: direction === "vertical" ? "block" : "flex", children: [
|
|
1044
|
+
/* @__PURE__ */ jsx("div", { className: cn("flex items-center transition-all duration-300 ease-in-out", directionClasses[direction]), children: shouldRender && animatedChildren }),
|
|
1045
|
+
/* @__PURE__ */ jsx(
|
|
1046
|
+
"button",
|
|
1047
|
+
{
|
|
1048
|
+
onClick: onOpen,
|
|
1049
|
+
className: cn("shadow-lg flex w-full items-center justify-center hover:cursor-pointer", sizeClasses2, variantClasses),
|
|
1050
|
+
"aria-expanded": isOpen,
|
|
1051
|
+
"aria-haspopup": "true",
|
|
1052
|
+
children: /* @__PURE__ */ jsx(
|
|
1053
|
+
"span",
|
|
1413
1054
|
{
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
disabled,
|
|
1417
|
-
"aria-label": ariaLabel,
|
|
1418
|
-
"aria-expanded": isOpen,
|
|
1419
|
-
"aria-haspopup": "menu",
|
|
1420
|
-
className: cn(
|
|
1421
|
-
"shrink-0 shadow-lg flex items-center justify-center transition-all duration-200 select-none",
|
|
1422
|
-
disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer active:scale-95",
|
|
1423
|
-
sizeClasses2,
|
|
1424
|
-
variantClasses
|
|
1425
|
-
),
|
|
1426
|
-
children: /* @__PURE__ */ jsx(
|
|
1427
|
-
"span",
|
|
1428
|
-
{
|
|
1429
|
-
className: cn(
|
|
1430
|
-
"inline-flex items-center justify-center transition-transform duration-300",
|
|
1431
|
-
isDefaultIcon && (isOpen ? "rotate-45" : "rotate-0")
|
|
1432
|
-
),
|
|
1433
|
-
children: isDefaultIcon ? /* @__PURE__ */ jsx(
|
|
1434
|
-
"svg",
|
|
1435
|
-
{
|
|
1436
|
-
className: "w-6 h-6",
|
|
1437
|
-
viewBox: "0 0 24 24",
|
|
1438
|
-
fill: "none",
|
|
1439
|
-
stroke: "currentColor",
|
|
1440
|
-
children: /* @__PURE__ */ jsx(
|
|
1441
|
-
"path",
|
|
1442
|
-
{
|
|
1443
|
-
d: "M12 5v14M5 12h14",
|
|
1444
|
-
strokeWidth: "2.2",
|
|
1445
|
-
strokeLinecap: "round",
|
|
1446
|
-
strokeLinejoin: "round"
|
|
1447
|
-
}
|
|
1448
|
-
)
|
|
1449
|
-
}
|
|
1450
|
-
) : icon
|
|
1451
|
-
}
|
|
1452
|
-
)
|
|
1055
|
+
className: `transform transition-transform duration-300 ${isOpen ? "rotate-45" : "rotate-0"}`,
|
|
1056
|
+
children: icon
|
|
1453
1057
|
}
|
|
1454
1058
|
)
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
);
|
|
1059
|
+
}
|
|
1060
|
+
)
|
|
1061
|
+
] }) });
|
|
1458
1062
|
};
|
|
1459
1063
|
const FileUpload = ({
|
|
1460
1064
|
acceptedFiles = "image/*",
|
|
@@ -1630,6 +1234,292 @@ const FileUpload = ({
|
|
|
1630
1234
|
errorMessage ? /* @__PURE__ */ jsx("p", { className: "text-error text-sm mt-2", children: errorMessage }) : helperText && /* @__PURE__ */ jsx("p", { className: "text-sm text-gray-500 dark:text-secondary-dark mt-2", children: helperText })
|
|
1631
1235
|
] });
|
|
1632
1236
|
};
|
|
1237
|
+
const responsiveColsClass$1 = {
|
|
1238
|
+
base: {
|
|
1239
|
+
1: "grid-cols-1",
|
|
1240
|
+
2: "grid-cols-2",
|
|
1241
|
+
3: "grid-cols-3",
|
|
1242
|
+
4: "grid-cols-4",
|
|
1243
|
+
5: "grid-cols-5",
|
|
1244
|
+
6: "grid-cols-6",
|
|
1245
|
+
7: "grid-cols-7",
|
|
1246
|
+
8: "grid-cols-8",
|
|
1247
|
+
9: "grid-cols-9",
|
|
1248
|
+
10: "grid-cols-10",
|
|
1249
|
+
11: "grid-cols-11",
|
|
1250
|
+
12: "grid-cols-12"
|
|
1251
|
+
},
|
|
1252
|
+
sm: {
|
|
1253
|
+
1: "sm:grid-cols-1",
|
|
1254
|
+
2: "sm:grid-cols-2",
|
|
1255
|
+
3: "sm:grid-cols-3",
|
|
1256
|
+
4: "sm:grid-cols-4",
|
|
1257
|
+
5: "sm:grid-cols-5",
|
|
1258
|
+
6: "sm:grid-cols-6",
|
|
1259
|
+
7: "sm:grid-cols-7",
|
|
1260
|
+
8: "sm:grid-cols-8",
|
|
1261
|
+
9: "sm:grid-cols-9",
|
|
1262
|
+
10: "sm:grid-cols-10",
|
|
1263
|
+
11: "sm:grid-cols-11",
|
|
1264
|
+
12: "sm:grid-cols-12"
|
|
1265
|
+
},
|
|
1266
|
+
md: {
|
|
1267
|
+
1: "md:grid-cols-1",
|
|
1268
|
+
2: "md:grid-cols-2",
|
|
1269
|
+
3: "md:grid-cols-3",
|
|
1270
|
+
4: "md:grid-cols-4",
|
|
1271
|
+
5: "md:grid-cols-5",
|
|
1272
|
+
6: "md:grid-cols-6",
|
|
1273
|
+
7: "md:grid-cols-7",
|
|
1274
|
+
8: "md:grid-cols-8",
|
|
1275
|
+
9: "md:grid-cols-9",
|
|
1276
|
+
10: "md:grid-cols-10",
|
|
1277
|
+
11: "md:grid-cols-11",
|
|
1278
|
+
12: "md:grid-cols-12"
|
|
1279
|
+
},
|
|
1280
|
+
lg: {
|
|
1281
|
+
1: "lg:grid-cols-1",
|
|
1282
|
+
2: "lg:grid-cols-2",
|
|
1283
|
+
3: "lg:grid-cols-3",
|
|
1284
|
+
4: "lg:grid-cols-4",
|
|
1285
|
+
5: "lg:grid-cols-5",
|
|
1286
|
+
6: "lg:grid-cols-6",
|
|
1287
|
+
7: "lg:grid-cols-7",
|
|
1288
|
+
8: "lg:grid-cols-8",
|
|
1289
|
+
9: "lg:grid-cols-9",
|
|
1290
|
+
10: "lg:grid-cols-10",
|
|
1291
|
+
11: "lg:grid-cols-11",
|
|
1292
|
+
12: "lg:grid-cols-12"
|
|
1293
|
+
},
|
|
1294
|
+
xl: {
|
|
1295
|
+
1: "xl:grid-cols-1",
|
|
1296
|
+
2: "xl:grid-cols-2",
|
|
1297
|
+
3: "xl:grid-cols-3",
|
|
1298
|
+
4: "xl:grid-cols-4",
|
|
1299
|
+
5: "xl:grid-cols-5",
|
|
1300
|
+
6: "xl:grid-cols-6",
|
|
1301
|
+
7: "xl:grid-cols-7",
|
|
1302
|
+
8: "xl:grid-cols-8",
|
|
1303
|
+
9: "xl:grid-cols-9",
|
|
1304
|
+
10: "xl:grid-cols-10",
|
|
1305
|
+
11: "xl:grid-cols-11",
|
|
1306
|
+
12: "xl:grid-cols-12"
|
|
1307
|
+
},
|
|
1308
|
+
"2xl": {
|
|
1309
|
+
1: "2xl:grid-cols-1",
|
|
1310
|
+
2: "2xl:grid-cols-2",
|
|
1311
|
+
3: "2xl:grid-cols-3",
|
|
1312
|
+
4: "2xl:grid-cols-4",
|
|
1313
|
+
5: "2xl:grid-cols-5",
|
|
1314
|
+
6: "2xl:grid-cols-6",
|
|
1315
|
+
7: "2xl:grid-cols-7",
|
|
1316
|
+
8: "2xl:grid-cols-8",
|
|
1317
|
+
9: "2xl:grid-cols-9",
|
|
1318
|
+
10: "2xl:grid-cols-10",
|
|
1319
|
+
11: "2xl:grid-cols-11",
|
|
1320
|
+
12: "2xl:grid-cols-12"
|
|
1321
|
+
}
|
|
1322
|
+
};
|
|
1323
|
+
const responsiveGapClass$1 = {
|
|
1324
|
+
base: {
|
|
1325
|
+
1: "gap-1",
|
|
1326
|
+
2: "gap-2",
|
|
1327
|
+
3: "gap-3",
|
|
1328
|
+
4: "gap-4",
|
|
1329
|
+
5: "gap-5",
|
|
1330
|
+
6: "gap-6"
|
|
1331
|
+
},
|
|
1332
|
+
sm: {
|
|
1333
|
+
1: "sm:gap-1",
|
|
1334
|
+
2: "sm:gap-2",
|
|
1335
|
+
3: "sm:gap-3",
|
|
1336
|
+
4: "sm:gap-4",
|
|
1337
|
+
5: "sm:gap-5",
|
|
1338
|
+
6: "sm:gap-6"
|
|
1339
|
+
},
|
|
1340
|
+
md: {
|
|
1341
|
+
1: "md:gap-1",
|
|
1342
|
+
2: "md:gap-2",
|
|
1343
|
+
3: "md:gap-3",
|
|
1344
|
+
4: "md:gap-4",
|
|
1345
|
+
5: "md:gap-5",
|
|
1346
|
+
6: "md:gap-6"
|
|
1347
|
+
},
|
|
1348
|
+
lg: {
|
|
1349
|
+
1: "lg:gap-1",
|
|
1350
|
+
2: "lg:gap-2",
|
|
1351
|
+
3: "lg:gap-3",
|
|
1352
|
+
4: "lg:gap-4",
|
|
1353
|
+
5: "lg:gap-5",
|
|
1354
|
+
6: "lg:gap-6"
|
|
1355
|
+
},
|
|
1356
|
+
xl: {
|
|
1357
|
+
1: "xl:gap-1",
|
|
1358
|
+
2: "xl:gap-2",
|
|
1359
|
+
3: "xl:gap-3",
|
|
1360
|
+
4: "xl:gap-4",
|
|
1361
|
+
5: "xl:gap-5",
|
|
1362
|
+
6: "xl:gap-6"
|
|
1363
|
+
},
|
|
1364
|
+
"2xl": {
|
|
1365
|
+
1: "2xl:gap-1",
|
|
1366
|
+
2: "2xl:gap-2",
|
|
1367
|
+
3: "2xl:gap-3",
|
|
1368
|
+
4: "2xl:gap-4",
|
|
1369
|
+
5: "2xl:gap-5",
|
|
1370
|
+
6: "2xl:gap-6"
|
|
1371
|
+
}
|
|
1372
|
+
};
|
|
1373
|
+
function normalizeResponsiveProp$2(value) {
|
|
1374
|
+
if (typeof value === "number") {
|
|
1375
|
+
return { base: value };
|
|
1376
|
+
}
|
|
1377
|
+
return value;
|
|
1378
|
+
}
|
|
1379
|
+
function getResponsiveColsClasses$1(values) {
|
|
1380
|
+
if (!values) return [];
|
|
1381
|
+
return Object.entries(values).map(([breakpoint, value]) => {
|
|
1382
|
+
return responsiveColsClass$1[breakpoint]?.[value] ?? "";
|
|
1383
|
+
});
|
|
1384
|
+
}
|
|
1385
|
+
function getResponsiveGapClasses$1(values) {
|
|
1386
|
+
if (!values) return [];
|
|
1387
|
+
return Object.entries(values).map(([breakpoint, value]) => {
|
|
1388
|
+
return responsiveGapClass$1[breakpoint]?.[value] ?? "";
|
|
1389
|
+
});
|
|
1390
|
+
}
|
|
1391
|
+
const Grid = ({ className, cols, gap, children, style, ...props }) => {
|
|
1392
|
+
const colsClasses = getResponsiveColsClasses$1(normalizeResponsiveProp$2(cols));
|
|
1393
|
+
const gapClasses = getResponsiveGapClasses$1(normalizeResponsiveProp$2(gap));
|
|
1394
|
+
return /* @__PURE__ */ jsx(
|
|
1395
|
+
"div",
|
|
1396
|
+
{
|
|
1397
|
+
className: cn(
|
|
1398
|
+
"grid",
|
|
1399
|
+
colsClasses,
|
|
1400
|
+
gapClasses,
|
|
1401
|
+
className
|
|
1402
|
+
),
|
|
1403
|
+
...props,
|
|
1404
|
+
children
|
|
1405
|
+
}
|
|
1406
|
+
);
|
|
1407
|
+
};
|
|
1408
|
+
const responsiveColSpanClass = {
|
|
1409
|
+
base: {
|
|
1410
|
+
1: "col-span-1",
|
|
1411
|
+
2: "col-span-2",
|
|
1412
|
+
3: "col-span-3",
|
|
1413
|
+
4: "col-span-4",
|
|
1414
|
+
5: "col-span-5",
|
|
1415
|
+
6: "col-span-6",
|
|
1416
|
+
7: "col-span-7",
|
|
1417
|
+
8: "col-span-8",
|
|
1418
|
+
9: "col-span-9",
|
|
1419
|
+
10: "col-span-10",
|
|
1420
|
+
11: "col-span-11",
|
|
1421
|
+
12: "col-span-12",
|
|
1422
|
+
full: "col-span-full"
|
|
1423
|
+
},
|
|
1424
|
+
sm: {
|
|
1425
|
+
1: "sm:col-span-1",
|
|
1426
|
+
2: "sm:col-span-2",
|
|
1427
|
+
3: "sm:col-span-3",
|
|
1428
|
+
4: "sm:col-span-4",
|
|
1429
|
+
5: "sm:col-span-5",
|
|
1430
|
+
6: "sm:col-span-6",
|
|
1431
|
+
7: "sm:col-span-7",
|
|
1432
|
+
8: "sm:col-span-8",
|
|
1433
|
+
9: "sm:col-span-9",
|
|
1434
|
+
10: "sm:col-span-10",
|
|
1435
|
+
11: "sm:col-span-11",
|
|
1436
|
+
12: "sm:col-span-12",
|
|
1437
|
+
full: "sm:col-span-full"
|
|
1438
|
+
},
|
|
1439
|
+
md: {
|
|
1440
|
+
1: "md:col-span-1",
|
|
1441
|
+
2: "md:col-span-2",
|
|
1442
|
+
3: "md:col-span-3",
|
|
1443
|
+
4: "md:col-span-4",
|
|
1444
|
+
5: "md:col-span-5",
|
|
1445
|
+
6: "md:col-span-6",
|
|
1446
|
+
7: "md:col-span-7",
|
|
1447
|
+
8: "md:col-span-8",
|
|
1448
|
+
9: "md:col-span-9",
|
|
1449
|
+
10: "md:col-span-10",
|
|
1450
|
+
11: "md:col-span-11",
|
|
1451
|
+
12: "md:col-span-12",
|
|
1452
|
+
full: "md:col-span-full"
|
|
1453
|
+
},
|
|
1454
|
+
lg: {
|
|
1455
|
+
1: "lg:col-span-1",
|
|
1456
|
+
2: "lg:col-span-2",
|
|
1457
|
+
3: "lg:col-span-3",
|
|
1458
|
+
4: "lg:col-span-4",
|
|
1459
|
+
5: "lg:col-span-5",
|
|
1460
|
+
6: "lg:col-span-6",
|
|
1461
|
+
7: "lg:col-span-7",
|
|
1462
|
+
8: "lg:col-span-8",
|
|
1463
|
+
9: "lg:col-span-9",
|
|
1464
|
+
10: "lg:col-span-10",
|
|
1465
|
+
11: "lg:col-span-11",
|
|
1466
|
+
12: "lg:col-span-12",
|
|
1467
|
+
full: "lg:col-span-full"
|
|
1468
|
+
},
|
|
1469
|
+
xl: {
|
|
1470
|
+
1: "xl:col-span-1",
|
|
1471
|
+
2: "xl:col-span-2",
|
|
1472
|
+
3: "xl:col-span-3",
|
|
1473
|
+
4: "xl:col-span-4",
|
|
1474
|
+
5: "xl:col-span-5",
|
|
1475
|
+
6: "xl:col-span-6",
|
|
1476
|
+
7: "xl:col-span-7",
|
|
1477
|
+
8: "xl:col-span-8",
|
|
1478
|
+
9: "xl:col-span-9",
|
|
1479
|
+
10: "xl:col-span-10",
|
|
1480
|
+
11: "xl:col-span-11",
|
|
1481
|
+
12: "xl:col-span-12",
|
|
1482
|
+
full: "xl:col-span-full"
|
|
1483
|
+
},
|
|
1484
|
+
"2xl": {
|
|
1485
|
+
1: "2xl:col-span-1",
|
|
1486
|
+
2: "2xl:col-span-2",
|
|
1487
|
+
3: "2xl:col-span-3",
|
|
1488
|
+
4: "2xl:col-span-4",
|
|
1489
|
+
5: "2xl:col-span-5",
|
|
1490
|
+
6: "2xl:col-span-6",
|
|
1491
|
+
7: "2xl:col-span-7",
|
|
1492
|
+
8: "2xl:col-span-8",
|
|
1493
|
+
9: "2xl:col-span-9",
|
|
1494
|
+
10: "2xl:col-span-10",
|
|
1495
|
+
11: "2xl:col-span-11",
|
|
1496
|
+
12: "2xl:col-span-12",
|
|
1497
|
+
full: "2xl:col-span-full"
|
|
1498
|
+
}
|
|
1499
|
+
};
|
|
1500
|
+
function normalizeResponsiveProp$1(value) {
|
|
1501
|
+
if (typeof value === "number") {
|
|
1502
|
+
return { base: value };
|
|
1503
|
+
}
|
|
1504
|
+
return value;
|
|
1505
|
+
}
|
|
1506
|
+
function getResponsiveColSpanClasses(values) {
|
|
1507
|
+
if (!values) return [];
|
|
1508
|
+
return Object.entries(values).map(([breakpoint, value]) => {
|
|
1509
|
+
return responsiveColSpanClass[breakpoint]?.[value] ?? "";
|
|
1510
|
+
});
|
|
1511
|
+
}
|
|
1512
|
+
const GridItem = ({
|
|
1513
|
+
className,
|
|
1514
|
+
colSpan,
|
|
1515
|
+
children,
|
|
1516
|
+
...props
|
|
1517
|
+
}) => {
|
|
1518
|
+
const colSpanClasses = getResponsiveColSpanClasses(
|
|
1519
|
+
normalizeResponsiveProp$1(colSpan)
|
|
1520
|
+
);
|
|
1521
|
+
return /* @__PURE__ */ jsx("div", { className: cn(...colSpanClasses, className), ...props, children });
|
|
1522
|
+
};
|
|
1633
1523
|
const responsiveColsClass = {
|
|
1634
1524
|
base: {
|
|
1635
1525
|
1: "columns-1",
|
|
@@ -1718,52 +1608,52 @@ const responsiveColsClass = {
|
|
|
1718
1608
|
};
|
|
1719
1609
|
const responsiveGapClass = {
|
|
1720
1610
|
base: {
|
|
1721
|
-
1: "gap-1
|
|
1722
|
-
2: "gap-2
|
|
1723
|
-
3: "gap-3
|
|
1724
|
-
4: "gap-4
|
|
1725
|
-
5: "gap-5
|
|
1726
|
-
6: "gap-6
|
|
1611
|
+
1: "gap-1",
|
|
1612
|
+
2: "gap-2",
|
|
1613
|
+
3: "gap-3",
|
|
1614
|
+
4: "gap-4",
|
|
1615
|
+
5: "gap-5",
|
|
1616
|
+
6: "gap-6"
|
|
1727
1617
|
},
|
|
1728
1618
|
sm: {
|
|
1729
|
-
1: "sm:gap-1
|
|
1730
|
-
2: "sm:gap-2
|
|
1731
|
-
3: "sm:gap-3
|
|
1732
|
-
4: "sm:gap-4
|
|
1733
|
-
5: "sm:gap-5
|
|
1734
|
-
6: "sm:gap-6
|
|
1619
|
+
1: "sm:gap-1",
|
|
1620
|
+
2: "sm:gap-2",
|
|
1621
|
+
3: "sm:gap-3",
|
|
1622
|
+
4: "sm:gap-4",
|
|
1623
|
+
5: "sm:gap-5",
|
|
1624
|
+
6: "sm:gap-6"
|
|
1735
1625
|
},
|
|
1736
1626
|
md: {
|
|
1737
|
-
1: "md:gap-1
|
|
1738
|
-
2: "md:gap-2
|
|
1739
|
-
3: "md:gap-3
|
|
1740
|
-
4: "md:gap-4
|
|
1741
|
-
5: "md:gap-5
|
|
1742
|
-
6: "md:gap-6
|
|
1627
|
+
1: "md:gap-1",
|
|
1628
|
+
2: "md:gap-2",
|
|
1629
|
+
3: "md:gap-3",
|
|
1630
|
+
4: "md:gap-4",
|
|
1631
|
+
5: "md:gap-5",
|
|
1632
|
+
6: "md:gap-6"
|
|
1743
1633
|
},
|
|
1744
1634
|
lg: {
|
|
1745
|
-
1: "lg:gap-1
|
|
1746
|
-
2: "lg:gap-2
|
|
1747
|
-
3: "lg:gap-3
|
|
1748
|
-
4: "lg:gap-4
|
|
1749
|
-
5: "lg:gap-5
|
|
1750
|
-
6: "lg:gap-6
|
|
1635
|
+
1: "lg:gap-1",
|
|
1636
|
+
2: "lg:gap-2",
|
|
1637
|
+
3: "lg:gap-3",
|
|
1638
|
+
4: "lg:gap-4",
|
|
1639
|
+
5: "lg:gap-5",
|
|
1640
|
+
6: "lg:gap-6"
|
|
1751
1641
|
},
|
|
1752
1642
|
xl: {
|
|
1753
|
-
1: "xl:gap-1
|
|
1754
|
-
2: "xl:gap-2
|
|
1755
|
-
3: "xl:gap-3
|
|
1756
|
-
4: "xl:gap-4
|
|
1757
|
-
5: "xl:gap-5
|
|
1758
|
-
6: "xl:gap-6
|
|
1643
|
+
1: "xl:gap-1",
|
|
1644
|
+
2: "xl:gap-2",
|
|
1645
|
+
3: "xl:gap-3",
|
|
1646
|
+
4: "xl:gap-4",
|
|
1647
|
+
5: "xl:gap-5",
|
|
1648
|
+
6: "xl:gap-6"
|
|
1759
1649
|
},
|
|
1760
1650
|
"2xl": {
|
|
1761
|
-
1: "2xl:gap-1
|
|
1762
|
-
2: "2xl:gap-2
|
|
1763
|
-
3: "2xl:gap-3
|
|
1764
|
-
4: "2xl:gap-4
|
|
1765
|
-
5: "2xl:gap-5
|
|
1766
|
-
6: "2xl:gap-6
|
|
1651
|
+
1: "2xl:gap-1",
|
|
1652
|
+
2: "2xl:gap-2",
|
|
1653
|
+
3: "2xl:gap-3",
|
|
1654
|
+
4: "2xl:gap-4",
|
|
1655
|
+
5: "2xl:gap-5",
|
|
1656
|
+
6: "2xl:gap-6"
|
|
1767
1657
|
}
|
|
1768
1658
|
};
|
|
1769
1659
|
function normalizeResponsiveProp(value) {
|
|
@@ -1785,25 +1675,20 @@ function getResponsiveGapClasses(values) {
|
|
|
1785
1675
|
});
|
|
1786
1676
|
}
|
|
1787
1677
|
const Masonry = React.forwardRef(
|
|
1788
|
-
({ children,
|
|
1678
|
+
({ children, className, cols, gap = 4, ...props }, ref) => {
|
|
1789
1679
|
const colsClasses = getResponsiveColsClasses(normalizeResponsiveProp(cols));
|
|
1790
1680
|
const gapClasses = getResponsiveGapClasses(normalizeResponsiveProp(gap));
|
|
1791
1681
|
return /* @__PURE__ */ jsx(
|
|
1792
1682
|
"div",
|
|
1793
1683
|
{
|
|
1794
1684
|
ref,
|
|
1795
|
-
className: cn(
|
|
1796
|
-
"w-full [&>*]:break-inside-avoid",
|
|
1797
|
-
colsClasses,
|
|
1798
|
-
gapClasses
|
|
1799
|
-
),
|
|
1685
|
+
className: cn("grid-mason", colsClasses, gapClasses, className),
|
|
1800
1686
|
...props,
|
|
1801
1687
|
children
|
|
1802
1688
|
}
|
|
1803
1689
|
);
|
|
1804
1690
|
}
|
|
1805
1691
|
);
|
|
1806
|
-
Masonry.displayName = "Masonry";
|
|
1807
1692
|
const ToastVariants = {
|
|
1808
1693
|
outline: "border border-current",
|
|
1809
1694
|
solid: ""
|
|
@@ -2704,39 +2589,26 @@ const Skeleton = ({
|
|
|
2704
2589
|
if (!isLoading) {
|
|
2705
2590
|
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
2706
2591
|
}
|
|
2707
|
-
const
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
);
|
|
2592
|
+
const style = {
|
|
2593
|
+
width: width ?? "fit-content",
|
|
2594
|
+
height: height ?? (children ? "auto" : "1rem")
|
|
2595
|
+
};
|
|
2712
2596
|
if (children) {
|
|
2713
|
-
|
|
2714
|
-
width: width ?? "fit-content",
|
|
2715
|
-
height: height ?? "auto"
|
|
2716
|
-
};
|
|
2717
|
-
return /* @__PURE__ */ jsx(Fragment, { children: React.Children.map(children, (child, index) => /* @__PURE__ */ jsx(
|
|
2597
|
+
return /* @__PURE__ */ jsx(Fragment, { children: React.Children.map(children, (child, i) => /* @__PURE__ */ jsx(
|
|
2718
2598
|
"div",
|
|
2719
2599
|
{
|
|
2720
|
-
"
|
|
2721
|
-
"aria-hidden": "true",
|
|
2722
|
-
className: baseClasses,
|
|
2600
|
+
className: `${animode} ${rounded ? "rounded-full" : "rounded-sm"} mb-1`,
|
|
2723
2601
|
style,
|
|
2724
|
-
children: /* @__PURE__ */ jsx("
|
|
2602
|
+
children: /* @__PURE__ */ jsx("span", { className: "invisible", children: child })
|
|
2725
2603
|
},
|
|
2726
|
-
|
|
2604
|
+
i
|
|
2727
2605
|
)) });
|
|
2728
2606
|
}
|
|
2729
|
-
const standaloneStyle = {
|
|
2730
|
-
width: width ?? "100%",
|
|
2731
|
-
height: height ?? "1rem"
|
|
2732
|
-
};
|
|
2733
2607
|
return /* @__PURE__ */ jsx(
|
|
2734
2608
|
"div",
|
|
2735
2609
|
{
|
|
2736
|
-
"
|
|
2737
|
-
|
|
2738
|
-
className: baseClasses,
|
|
2739
|
-
style: standaloneStyle
|
|
2610
|
+
className: `${animode} ${rounded ? "rounded-full" : "rounded-sm"}`,
|
|
2611
|
+
style
|
|
2740
2612
|
}
|
|
2741
2613
|
);
|
|
2742
2614
|
};
|
|
@@ -2848,21 +2720,52 @@ const Tooltip = ({
|
|
|
2848
2720
|
}
|
|
2849
2721
|
);
|
|
2850
2722
|
};
|
|
2723
|
+
const TextInput = React.forwardRef(
|
|
2724
|
+
({
|
|
2725
|
+
label,
|
|
2726
|
+
id,
|
|
2727
|
+
name,
|
|
2728
|
+
error,
|
|
2729
|
+
...props
|
|
2730
|
+
}, ref) => {
|
|
2731
|
+
return /* @__PURE__ */ jsxs("div", { className: "w-full", children: [
|
|
2732
|
+
label && /* @__PURE__ */ jsx(
|
|
2733
|
+
"label",
|
|
2734
|
+
{
|
|
2735
|
+
htmlFor: id || name,
|
|
2736
|
+
className: "block text-sm font-medium mb-1 text-gray-900 dark:text-neutral-100",
|
|
2737
|
+
children: label
|
|
2738
|
+
}
|
|
2739
|
+
),
|
|
2740
|
+
/* @__PURE__ */ jsx(
|
|
2741
|
+
"input",
|
|
2742
|
+
{
|
|
2743
|
+
ref,
|
|
2744
|
+
id: id || name,
|
|
2745
|
+
name,
|
|
2746
|
+
className: cn(
|
|
2747
|
+
"block w-full px-3 py-2 border rounded-md shadow-sm sm:text-sm transition-colors",
|
|
2748
|
+
"bg-white border-gray-200 text-gray-900 placeholder:text-gray-400",
|
|
2749
|
+
"dark:bg-neutral-900 dark:border-neutral-800 dark:text-neutral-100 dark:placeholder:text-neutral-500",
|
|
2750
|
+
"focus:outline-none focus:ring-1 focus:ring-primary focus:border-primary dark:focus:ring-primary-dark dark:focus:border-primary-dark",
|
|
2751
|
+
error && "border-error dark:border-error-dark focus:ring-error focus:border-error dark:focus:ring-error-dark dark:focus:border-error-dark",
|
|
2752
|
+
props.disabled && "opacity-50 bg-gray-100 dark:bg-neutral-800 cursor-not-allowed"
|
|
2753
|
+
),
|
|
2754
|
+
...props
|
|
2755
|
+
}
|
|
2756
|
+
),
|
|
2757
|
+
error && /* @__PURE__ */ jsx("p", { className: "mt-1 text-sm text-error dark:text-error-dark", children: error })
|
|
2758
|
+
] });
|
|
2759
|
+
}
|
|
2760
|
+
);
|
|
2761
|
+
TextInput.displayName = "TextInput";
|
|
2851
2762
|
const SliderColor = {
|
|
2852
|
-
primary: "bg-primary-30 dark:bg-primary-dark-30 [&::-webkit-slider-thumb]:
|
|
2853
|
-
error: "bg-error-30 dark:bg-error-dark-30 [&::-webkit-slider-thumb]:
|
|
2854
|
-
warning: "bg-warning-30 dark:bg-warning-dark-30 [&::-webkit-slider-thumb]:
|
|
2855
|
-
success: "bg-success-30 dark:bg-success-dark-30 [&::-webkit-slider-thumb]:
|
|
2856
|
-
info: "bg-info-30 dark:bg-info-dark-30 [&::-webkit-slider-thumb]:
|
|
2857
|
-
secondary: "bg-
|
|
2858
|
-
};
|
|
2859
|
-
const SliderMarkColor = {
|
|
2860
|
-
primary: "bg-primary/50 dark:bg-primary-dark/60",
|
|
2861
|
-
error: "bg-error/50 dark:bg-error-dark/60",
|
|
2862
|
-
warning: "bg-warning/50 dark:bg-warning-dark/60",
|
|
2863
|
-
success: "bg-success/50 dark:bg-success-dark/60",
|
|
2864
|
-
info: "bg-info/50 dark:bg-info-dark/60",
|
|
2865
|
-
secondary: "bg-gray-400 dark:bg-neutral-600"
|
|
2763
|
+
primary: "bg-primary-30 dark:bg-primary-dark-30 hover:[&::-webkit-slider-thumb]:transition-all hover:[&::-webkit-slider-thumb]:duration-300 [&::-webkit-slider-thumb]:outline-5 hover:[&::-webkit-slider-thumb]:outline-10 [&::-webkit-slider-thumb]:outline-primary-30 [&::-webkit-slider-thumb]:bg-primary dark:[&::-webkit-slider-thumb]:bg-primary-dark [&::-webkit-slider-thumb]:outline-primary-30 dark:[&::-webkit-slider-thumb]:outline-primary-dark-30",
|
|
2764
|
+
error: "bg-error-30 dark:bg-error-dark-30 [&::-webkit-slider-thumb]:outline-5 [&::-webkit-slider-thumb]:outline-error-30 [&::-webkit-slider-thumb]:bg-error dark:[&::-webkit-slider-thumb]:bg-error-dark dark:[&::-webkit-slider-thumb]:outline-5 dark:[&::-webkit-slider-thumb]:outline-error-dark-30",
|
|
2765
|
+
warning: "bg-warning-30 dark:bg-warning-dark-30 [&::-webkit-slider-thumb]:outline-5 [&::-webkit-slider-thumb]:outline-warning-30 [&::-webkit-slider-thumb]:bg-warning dark:[&::-webkit-slider-thumb]:bg-warning-dark dark:[&::-webkit-slider-thumb]:outline-5 dark:[&::-webkit-slider-thumb]:outline-warning-dark-30",
|
|
2766
|
+
success: "bg-success-30 dark:bg-success-dark-30 [&::-webkit-slider-thumb]:outline-5 [&::-webkit-slider-thumb]:outline-success-30 [&::-webkit-slider-thumb]:bg-success dark:[&::-webkit-slider-thumb]:bg-success-dark dark:[&::-webkit-slider-thumb]:outline-5 dark:[&::-webkit-slider-thumb]:outline-success-dark-30",
|
|
2767
|
+
info: "bg-info-30 dark:bg-info-dark-30 [&::-webkit-slider-thumb]:outline-5 [&::-webkit-slider-thumb]:outline-info-30 [&::-webkit-slider-thumb]:bg-info dark:[&::-webkit-slider-thumb]:bg-info-dark dark:[&::-webkit-slider-thumb]:outline-5 dark:[&::-webkit-slider-thumb]:outline-info-dark-30",
|
|
2768
|
+
secondary: "bg-secondary dark:bg-secondary-dark [&::-webkit-slider-thumb]:outline-5 [&::-webkit-slider-thumb]:outline-secondary [&::-webkit-slider-thumb]:bg-secondary-700 dark:[&::-webkit-slider-thumb]:bg-secondary-dark-700 dark:[&::-webkit-slider-thumb]:outline-5 dark:[&::-webkit-slider-thumb]:outline-secondary-dark"
|
|
2866
2769
|
};
|
|
2867
2770
|
const SliderSize = {
|
|
2868
2771
|
sm: "h-1 [&::-webkit-slider-thumb]:w-3 [&::-webkit-slider-thumb]:h-3 [&::-moz-range-thumb]:w-3 [&::-moz-range-thumb]:h-3",
|
|
@@ -2875,44 +2778,28 @@ const Slider = ({
|
|
|
2875
2778
|
name,
|
|
2876
2779
|
label,
|
|
2877
2780
|
min = 0,
|
|
2781
|
+
disabled,
|
|
2878
2782
|
max = 100,
|
|
2879
2783
|
step = 1,
|
|
2880
|
-
value
|
|
2881
|
-
defaultValue,
|
|
2882
|
-
disabled = false,
|
|
2784
|
+
value,
|
|
2883
2785
|
showTooltip = true,
|
|
2884
2786
|
showMarks = true,
|
|
2885
|
-
showInput = true,
|
|
2886
2787
|
onChange,
|
|
2887
2788
|
color = "primary",
|
|
2888
2789
|
prefixIcon,
|
|
2889
2790
|
suffixIcon,
|
|
2890
|
-
sliderSize = "md"
|
|
2891
|
-
...props
|
|
2791
|
+
sliderSize = "md"
|
|
2892
2792
|
}) => {
|
|
2893
|
-
const [internalValue, setInternalValue] = useState(
|
|
2894
|
-
defaultValue !== void 0 ? Number(defaultValue) : Number(min)
|
|
2895
|
-
);
|
|
2896
2793
|
const [isInteracting, setIsInteracting] = useState(false);
|
|
2897
|
-
const isControlled = controlledValue !== void 0;
|
|
2898
|
-
const currentValue = isControlled ? Number(controlledValue) : internalValue;
|
|
2899
2794
|
const sliderColorClassName = SliderColor[color];
|
|
2900
2795
|
const sliderSizeClassName = SliderSize[sliderSize];
|
|
2796
|
+
const webkitClassName = "[&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:appearance-none";
|
|
2797
|
+
const mozClassName = "[&::-moz-range-thumb]:rounded-full [&::-moz-range-thumb]:appearance-none";
|
|
2901
2798
|
const thumbWidthMap = { sm: 12, md: 16, lg: 20, xl: 24 };
|
|
2902
2799
|
const thumbWidth = thumbWidthMap[sliderSize];
|
|
2903
|
-
const handleValueChange = (e) => {
|
|
2904
|
-
if (!isControlled) {
|
|
2905
|
-
const parsed = Number(e.target.value);
|
|
2906
|
-
setInternalValue(Number.isNaN(parsed) ? Number(min) : parsed);
|
|
2907
|
-
}
|
|
2908
|
-
onChange?.(e);
|
|
2909
|
-
};
|
|
2910
2800
|
const getTooltipStyle = () => {
|
|
2911
|
-
const
|
|
2912
|
-
const
|
|
2913
|
-
const range = numericMax - numericMin;
|
|
2914
|
-
const clampedValue = Math.min(numericMax, Math.max(numericMin, currentValue || 0));
|
|
2915
|
-
const percentage = range === 0 ? 0 : (clampedValue - numericMin) / range;
|
|
2801
|
+
const range = Number(max) - Number(min);
|
|
2802
|
+
const percentage = range === 0 ? 0 : (Number(value) - Number(min)) / range;
|
|
2916
2803
|
const offset = percentage * -thumbWidth + thumbWidth / 2;
|
|
2917
2804
|
return {
|
|
2918
2805
|
left: `calc(${percentage * 100}% + ${offset}px)`,
|
|
@@ -2921,101 +2808,67 @@ const Slider = ({
|
|
|
2921
2808
|
};
|
|
2922
2809
|
};
|
|
2923
2810
|
const renderMarks = () => {
|
|
2924
|
-
|
|
2925
|
-
const
|
|
2926
|
-
const
|
|
2927
|
-
const range = numericMax - numericMin;
|
|
2928
|
-
if (!showMarks || numericStep <= 1 || range <= 0) return null;
|
|
2929
|
-
const stepCount = Math.floor(range / numericStep);
|
|
2930
|
-
if (stepCount <= 0 || stepCount > 50) return null;
|
|
2811
|
+
if (!showMarks || Number(step) <= 1) return null;
|
|
2812
|
+
const range = Number(max) - Number(min);
|
|
2813
|
+
const stepCount = Math.floor(range / Number(step));
|
|
2931
2814
|
const marks = Array.from({ length: stepCount + 1 }, (_, i) => {
|
|
2932
2815
|
const left = i / stepCount * 100;
|
|
2933
2816
|
return /* @__PURE__ */ jsx(
|
|
2934
|
-
"
|
|
2817
|
+
"div",
|
|
2935
2818
|
{
|
|
2936
2819
|
className: cn(
|
|
2937
|
-
"absolute top-1/2 -translate-y-1/2
|
|
2938
|
-
|
|
2820
|
+
"absolute top-1/2 -translate-y-1/2 w-[2px] h-2 rounded-full",
|
|
2821
|
+
sliderColorClassName
|
|
2939
2822
|
),
|
|
2940
2823
|
style: { left: `${left}%` }
|
|
2941
2824
|
},
|
|
2942
2825
|
i
|
|
2943
2826
|
);
|
|
2944
2827
|
});
|
|
2945
|
-
return /* @__PURE__ */ jsx(
|
|
2946
|
-
"div",
|
|
2947
|
-
{
|
|
2948
|
-
"aria-hidden": "true",
|
|
2949
|
-
className: "absolute top-full mt-2 pointer-events-none",
|
|
2950
|
-
style: {
|
|
2951
|
-
left: `${thumbWidth / 2}px`,
|
|
2952
|
-
right: `${thumbWidth / 2}px`
|
|
2953
|
-
},
|
|
2954
|
-
children: marks
|
|
2955
|
-
}
|
|
2956
|
-
);
|
|
2828
|
+
return /* @__PURE__ */ jsx("div", { className: "absolute top-full mt-2 -left-0.5 -right-0.5 h-2 me-[11px] ms-[9px]", children: marks });
|
|
2957
2829
|
};
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
{
|
|
2963
|
-
htmlFor: inputId,
|
|
2964
|
-
className: "block text-sm font-medium mb-2 text-gray-900 dark:text-neutral-100",
|
|
2965
|
-
children: label
|
|
2966
|
-
}
|
|
2967
|
-
),
|
|
2968
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
|
|
2969
|
-
prefixIcon && /* @__PURE__ */ jsx("span", { className: "shrink-0 text-gray-500 dark:text-neutral-400", children: prefixIcon }),
|
|
2830
|
+
return /* @__PURE__ */ jsxs("div", { className: "w-full p-4 relative overflow-x-clip", children: [
|
|
2831
|
+
label && /* @__PURE__ */ jsx("label", { htmlFor: id || name, className: "block text-sm font-medium mb-1 dark:text-white", children: label }),
|
|
2832
|
+
/* @__PURE__ */ jsxs("div", { className: "flex gap-3 items-center relative", children: [
|
|
2833
|
+
prefixIcon,
|
|
2970
2834
|
/* @__PURE__ */ jsxs(
|
|
2971
2835
|
"div",
|
|
2972
2836
|
{
|
|
2973
|
-
className: "relative w-full flex items-center
|
|
2974
|
-
onMouseEnter: () =>
|
|
2837
|
+
className: "relative w-full flex items-center",
|
|
2838
|
+
onMouseEnter: () => setIsInteracting(true),
|
|
2975
2839
|
onMouseLeave: () => setIsInteracting(false),
|
|
2976
2840
|
children: [
|
|
2977
|
-
showTooltip &&
|
|
2841
|
+
showTooltip && /* @__PURE__ */ jsx(
|
|
2978
2842
|
"div",
|
|
2979
2843
|
{
|
|
2980
|
-
className: "absolute z-
|
|
2844
|
+
className: "absolute z-10 -top-7 transition-opacity duration-300",
|
|
2981
2845
|
style: getTooltipStyle(),
|
|
2982
|
-
children: /* @__PURE__ */ jsx(
|
|
2983
|
-
Tooltip,
|
|
2984
|
-
{
|
|
2985
|
-
text: String(currentValue),
|
|
2986
|
-
isOpen: isInteracting,
|
|
2987
|
-
placement: "top",
|
|
2988
|
-
color: color === "secondary" ? "neutral" : color,
|
|
2989
|
-
children: /* @__PURE__ */ jsx("span", { className: "block w-0 h-0" })
|
|
2990
|
-
}
|
|
2991
|
-
)
|
|
2846
|
+
children: /* @__PURE__ */ jsx(Tooltip, { text: String(value), isOpen: isInteracting, placement: "top", children: /* @__PURE__ */ jsx("div", {}) })
|
|
2992
2847
|
}
|
|
2993
2848
|
),
|
|
2994
2849
|
/* @__PURE__ */ jsx(
|
|
2995
2850
|
"input",
|
|
2996
2851
|
{
|
|
2997
|
-
...props,
|
|
2998
|
-
id: inputId,
|
|
2999
|
-
name,
|
|
3000
|
-
type: "range",
|
|
3001
2852
|
disabled,
|
|
2853
|
+
type: "range",
|
|
2854
|
+
id: id || "slider-range",
|
|
3002
2855
|
min,
|
|
3003
2856
|
max,
|
|
3004
2857
|
step,
|
|
3005
|
-
value
|
|
3006
|
-
onChange
|
|
3007
|
-
onMouseDown: () =>
|
|
3008
|
-
onMouseUp: () => setIsInteracting(false),
|
|
3009
|
-
onTouchStart: () => !disabled && setIsInteracting(true),
|
|
3010
|
-
onTouchEnd: () => setIsInteracting(false),
|
|
3011
|
-
onFocus: () => !disabled && setIsInteracting(true),
|
|
3012
|
-
onBlur: () => setIsInteracting(false),
|
|
2858
|
+
value,
|
|
2859
|
+
onChange,
|
|
2860
|
+
onMouseDown: () => setIsInteracting(true),
|
|
3013
2861
|
className: cn(
|
|
3014
|
-
"w-full rounded-full appearance-none
|
|
3015
|
-
"
|
|
3016
|
-
"[&::-moz-range-thumb]:rounded-full [&::-moz-range-thumb]:appearance-none [&::-moz-range-thumb]:border-0",
|
|
2862
|
+
"w-full rounded-full appearance-none cursor-pointer dark:bg-gray-700",
|
|
2863
|
+
"transition-all duration-300 ease-in-out",
|
|
3017
2864
|
sliderSizeClassName,
|
|
3018
|
-
|
|
2865
|
+
webkitClassName,
|
|
2866
|
+
mozClassName,
|
|
2867
|
+
sliderColorClassName,
|
|
2868
|
+
{
|
|
2869
|
+
[SliderColor["secondary"]]: disabled,
|
|
2870
|
+
"bg-secondary opacity-50": disabled
|
|
2871
|
+
}
|
|
3019
2872
|
)
|
|
3020
2873
|
}
|
|
3021
2874
|
),
|
|
@@ -3023,18 +2876,16 @@ const Slider = ({
|
|
|
3023
2876
|
]
|
|
3024
2877
|
}
|
|
3025
2878
|
),
|
|
3026
|
-
suffixIcon
|
|
3027
|
-
|
|
2879
|
+
suffixIcon,
|
|
2880
|
+
/* @__PURE__ */ jsx("div", { className: "w-32", children: /* @__PURE__ */ jsx(
|
|
3028
2881
|
TextInput,
|
|
3029
2882
|
{
|
|
3030
|
-
type: "number",
|
|
3031
|
-
"aria-label": label ? `${label} value` : "Slider value",
|
|
3032
2883
|
min,
|
|
3033
2884
|
max,
|
|
3034
2885
|
step,
|
|
3035
|
-
|
|
3036
|
-
value: Number
|
|
3037
|
-
onChange
|
|
2886
|
+
type: Number(value) <= 0 ? "text" : "number",
|
|
2887
|
+
value: Number(value) <= 0 ? "" : value,
|
|
2888
|
+
onChange
|
|
3038
2889
|
}
|
|
3039
2890
|
) })
|
|
3040
2891
|
] })
|
|
@@ -3453,20 +3304,20 @@ const Textarea = ({
|
|
|
3453
3304
|
] });
|
|
3454
3305
|
};
|
|
3455
3306
|
const DotColors = {
|
|
3456
|
-
default: "bg-gray-400 dark:bg-neutral-500",
|
|
3457
|
-
primary: "bg-primary dark:bg-primary-dark",
|
|
3458
3307
|
success: "bg-success dark:bg-success-dark",
|
|
3459
3308
|
info: "bg-info dark:bg-info-dark",
|
|
3460
3309
|
error: "bg-error dark:bg-error-dark",
|
|
3461
|
-
warning: "bg-warning dark:bg-warning-dark"
|
|
3310
|
+
warning: "bg-warning dark:bg-warning-dark",
|
|
3311
|
+
primary: "bg-primary dark:bg-primary-dark",
|
|
3312
|
+
default: "bg-secondary-700 dark:bg-secondary-dark"
|
|
3462
3313
|
};
|
|
3463
3314
|
const LineColors = {
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
|
|
3315
|
+
success: "border-success dark:border-success-dark md:before:border-success md:before:dark:border-success-dark",
|
|
3316
|
+
info: "border-info dark:border-info-dark md:before:border-info md:before:dark:border-info-dark",
|
|
3317
|
+
error: "border-error dark:border-error-dark md:before:border-error md:before:dark:border-error-dark",
|
|
3318
|
+
warning: "border-warning dark:border-warning-dark md:before:border-warning md:before:dark:border-warning-dark",
|
|
3319
|
+
primary: "border-primary dark:border-primary-dark md:before:border-primary md:before:dark:border-primary-dark",
|
|
3320
|
+
default: "border-secondary-700 dark:border-secondary-dark md:before:border-secondary md:before:dark:border-secondary-dark"
|
|
3470
3321
|
};
|
|
3471
3322
|
const TimelineItem = ({
|
|
3472
3323
|
title,
|
|
@@ -3474,55 +3325,42 @@ const TimelineItem = ({
|
|
|
3474
3325
|
children,
|
|
3475
3326
|
dotColor = "default",
|
|
3476
3327
|
icon,
|
|
3477
|
-
position
|
|
3328
|
+
position
|
|
3329
|
+
// prop from parent
|
|
3478
3330
|
}) => {
|
|
3479
3331
|
const dotColorClassName = DotColors[dotColor];
|
|
3480
|
-
|
|
3481
|
-
"-
|
|
3482
|
-
"-end
|
|
3483
|
-
"-
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
|
|
3487
|
-
|
|
3488
|
-
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
}
|
|
3507
|
-
) : /* @__PURE__ */ jsx(
|
|
3508
|
-
"span",
|
|
3509
|
-
{
|
|
3510
|
-
"aria-hidden": "true",
|
|
3511
|
-
className: cn(
|
|
3512
|
-
"absolute w-3 h-3 rounded-full mt-1.5 ring-4 ring-white dark:ring-neutral-900",
|
|
3513
|
-
dotColorClassName,
|
|
3514
|
-
markerPositionClass
|
|
3515
|
-
)
|
|
3516
|
-
}
|
|
3517
|
-
),
|
|
3518
|
-
/* @__PURE__ */ jsx("time", { className: "block mb-1 text-xs font-medium tracking-wide text-gray-500 dark:text-neutral-400", children: time }),
|
|
3519
|
-
/* @__PURE__ */ jsx("h3", { className: "text-base font-semibold text-gray-900 dark:text-neutral-100 leading-snug", children: title }),
|
|
3520
|
-
children && /* @__PURE__ */ jsx("div", { className: "mt-1.5 text-sm text-gray-600 dark:text-neutral-300 leading-relaxed", children })
|
|
3521
|
-
]
|
|
3522
|
-
}
|
|
3523
|
-
);
|
|
3332
|
+
return /* @__PURE__ */ jsxs("li", { className: cn("mb-5", {
|
|
3333
|
+
"ms-8": position === "left",
|
|
3334
|
+
"me-8 text-end": position === "right",
|
|
3335
|
+
"ms-4 md:w-1/2 ps-4 md:odd:pe-8 md:odd:ms-0 md:odd:text-end md:even:ps-8 md:even:ms-auto": position === "split"
|
|
3336
|
+
}), children: [
|
|
3337
|
+
icon ? /* @__PURE__ */ jsx("div", { className: cn(
|
|
3338
|
+
"flex items-center justify-center absolute w-10 h-10 rounded-full mt-1.5 outline outline-white dark:outline-secondary",
|
|
3339
|
+
dotColorClassName,
|
|
3340
|
+
{
|
|
3341
|
+
"-start-[20px]": position === "left" || position === "split" && "md:hidden",
|
|
3342
|
+
"-end-[21px]": position === "right",
|
|
3343
|
+
"-start-[21px] md:start-1/2 md:-ms-[19px]": position === "split"
|
|
3344
|
+
}
|
|
3345
|
+
), children: icon }) : /* @__PURE__ */ jsx("div", { className: cn(
|
|
3346
|
+
"absolute w-3 h-3 rounded-full mt-1.5 outline outline-white dark:outline-secondary",
|
|
3347
|
+
dotColorClassName,
|
|
3348
|
+
{
|
|
3349
|
+
"-start-[7px]": position === "left" || position === "split" && "md:hidden",
|
|
3350
|
+
"-end-[7px]": position === "right",
|
|
3351
|
+
"-start-[7.1px] md:start-1/2 md:-ms-[4.7px]": position === "split"
|
|
3352
|
+
}
|
|
3353
|
+
) }),
|
|
3354
|
+
/* @__PURE__ */ jsx("time", { className: "mb-1 text-sm font-normal leading-none text-gray-400 dark:text-secondary-dark", children: time }),
|
|
3355
|
+
/* @__PURE__ */ jsx("h3", { className: "text-lg font-semibold text-gray-900 dark:text-white", children: title }),
|
|
3356
|
+
/* @__PURE__ */ jsx("p", { className: "mb-4 text-base font-normal text-secondary-foreground dark:text-secondary-foreground-dark", children })
|
|
3357
|
+
] });
|
|
3524
3358
|
};
|
|
3525
|
-
const Timeline = ({
|
|
3359
|
+
const Timeline = ({
|
|
3360
|
+
position = "left",
|
|
3361
|
+
lineColor = "default",
|
|
3362
|
+
children
|
|
3363
|
+
}) => {
|
|
3526
3364
|
const childrenWithProps = Children.map(children, (child) => {
|
|
3527
3365
|
if (isValidElement(child)) {
|
|
3528
3366
|
return cloneElement(child, { position });
|
|
@@ -3530,21 +3368,15 @@ const Timeline = ({ position = "left", lineColor = "default", children }) => {
|
|
|
3530
3368
|
return child;
|
|
3531
3369
|
});
|
|
3532
3370
|
const lineColorClassName = LineColors[lineColor];
|
|
3533
|
-
return /* @__PURE__ */ jsx(
|
|
3534
|
-
"
|
|
3371
|
+
return /* @__PURE__ */ jsx("ol", { className: cn(
|
|
3372
|
+
"relative",
|
|
3535
3373
|
{
|
|
3536
|
-
|
|
3537
|
-
|
|
3538
|
-
|
|
3539
|
-
|
|
3540
|
-
|
|
3541
|
-
|
|
3542
|
-
},
|
|
3543
|
-
lineColorClassName
|
|
3544
|
-
),
|
|
3545
|
-
children: childrenWithProps
|
|
3546
|
-
}
|
|
3547
|
-
);
|
|
3374
|
+
"border-s-2": position === "left",
|
|
3375
|
+
"border-e-2": position === "right",
|
|
3376
|
+
"border-s-2 md:border-s-0 md:before:content-[''] md:before:absolute md:before:top-0 md:before:left-1/2 md:before:h-full md:before:border-s-2 md:before:border-secondary md:before:dark:border-secondary-dark": position === "split"
|
|
3377
|
+
},
|
|
3378
|
+
lineColorClassName
|
|
3379
|
+
), children: childrenWithProps });
|
|
3548
3380
|
};
|
|
3549
3381
|
Timeline.Item = TimelineItem;
|
|
3550
3382
|
const ToggleVariant = {
|
|
@@ -3623,9 +3455,10 @@ export {
|
|
|
3623
3455
|
CheckboxInput,
|
|
3624
3456
|
CodeInput,
|
|
3625
3457
|
Collection,
|
|
3626
|
-
DatePicker,
|
|
3627
3458
|
FAB,
|
|
3628
3459
|
FileUpload,
|
|
3460
|
+
Grid,
|
|
3461
|
+
GridItem,
|
|
3629
3462
|
ListCheckboxInput,
|
|
3630
3463
|
Masonry,
|
|
3631
3464
|
Modal,
|