@willphan1712000/frontend 1.0.1 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -1
- package/dist/index.d.mts +56 -13
- package/dist/index.d.ts +56 -13
- package/dist/index.js +642 -0
- package/dist/index.mjs +635 -1
- package/package.json +4 -7
- package/.babelrc +0 -20
- package/index.ts +0 -13
- package/public/favicon.ico +0 -0
- package/public/index.html +0 -43
- package/public/logo192.png +0 -0
- package/public/logo512.png +0 -0
- package/public/manifest.json +0 -25
- package/public/robots.txt +0 -3
package/dist/index.mjs
CHANGED
|
@@ -7,6 +7,9 @@ function _array_like_to_array(arr, len) {
|
|
|
7
7
|
function _array_with_holes(arr) {
|
|
8
8
|
if (Array.isArray(arr)) return arr;
|
|
9
9
|
}
|
|
10
|
+
function _array_without_holes(arr) {
|
|
11
|
+
if (Array.isArray(arr)) return _array_like_to_array(arr);
|
|
12
|
+
}
|
|
10
13
|
function _define_property(obj, key, value) {
|
|
11
14
|
if (key in obj) {
|
|
12
15
|
Object.defineProperty(obj, key, {
|
|
@@ -20,6 +23,9 @@ function _define_property(obj, key, value) {
|
|
|
20
23
|
}
|
|
21
24
|
return obj;
|
|
22
25
|
}
|
|
26
|
+
function _iterable_to_array(iter) {
|
|
27
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
28
|
+
}
|
|
23
29
|
function _iterable_to_array_limit(arr, i) {
|
|
24
30
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
25
31
|
if (_i == null) return;
|
|
@@ -47,6 +53,9 @@ function _iterable_to_array_limit(arr, i) {
|
|
|
47
53
|
function _non_iterable_rest() {
|
|
48
54
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
49
55
|
}
|
|
56
|
+
function _non_iterable_spread() {
|
|
57
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
58
|
+
}
|
|
50
59
|
function _object_spread(target) {
|
|
51
60
|
for(var i = 1; i < arguments.length; i++){
|
|
52
61
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
@@ -86,9 +95,39 @@ function _object_spread_props(target, source) {
|
|
|
86
95
|
}
|
|
87
96
|
return target;
|
|
88
97
|
}
|
|
98
|
+
function _object_without_properties(source, excluded) {
|
|
99
|
+
if (source == null) return {};
|
|
100
|
+
var target = _object_without_properties_loose(source, excluded);
|
|
101
|
+
var key, i;
|
|
102
|
+
if (Object.getOwnPropertySymbols) {
|
|
103
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
104
|
+
for(i = 0; i < sourceSymbolKeys.length; i++){
|
|
105
|
+
key = sourceSymbolKeys[i];
|
|
106
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
107
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
108
|
+
target[key] = source[key];
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
return target;
|
|
112
|
+
}
|
|
113
|
+
function _object_without_properties_loose(source, excluded) {
|
|
114
|
+
if (source == null) return {};
|
|
115
|
+
var target = {};
|
|
116
|
+
var sourceKeys = Object.keys(source);
|
|
117
|
+
var key, i;
|
|
118
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
119
|
+
key = sourceKeys[i];
|
|
120
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
121
|
+
target[key] = source[key];
|
|
122
|
+
}
|
|
123
|
+
return target;
|
|
124
|
+
}
|
|
89
125
|
function _sliced_to_array(arr, i) {
|
|
90
126
|
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
|
91
127
|
}
|
|
128
|
+
function _to_consumable_array(arr) {
|
|
129
|
+
return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
|
|
130
|
+
}
|
|
92
131
|
function _unsupported_iterable_to_array(o, minLen) {
|
|
93
132
|
if (!o) return;
|
|
94
133
|
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
@@ -829,4 +868,599 @@ var ColorPickerSlider = function(param) {
|
|
|
829
868
|
});
|
|
830
869
|
};
|
|
831
870
|
var ColorPickerSlider_default = ColorPickerSlider;
|
|
832
|
-
|
|
871
|
+
// src/components/MultiSelect/MultiSelect.tsx
|
|
872
|
+
import { useEffect as useEffect6, useRef as useRef6, useState as useState6 } from "react";
|
|
873
|
+
// src/components/MultiSelect/context.ts
|
|
874
|
+
import { createContext as createContext2, useContext as useContext2 } from "react";
|
|
875
|
+
var MyContext2 = createContext2(void 0);
|
|
876
|
+
function useMyContext2() {
|
|
877
|
+
var data = useContext2(MyContext2);
|
|
878
|
+
if (data === void 0) throw new Error("Select context is undefined");
|
|
879
|
+
return data;
|
|
880
|
+
}
|
|
881
|
+
// src/components/MultiSelect/Dropdown.tsx
|
|
882
|
+
import { useEffect as useEffect5, useRef as useRef5, useState as useState5 } from "react";
|
|
883
|
+
// src/components/MultiSelect/styles.ts
|
|
884
|
+
var styles5 = {
|
|
885
|
+
select_box: {
|
|
886
|
+
borderRadius: "10px",
|
|
887
|
+
border: "solid 1px #dadada",
|
|
888
|
+
padding: "5px 10px",
|
|
889
|
+
display: "flex",
|
|
890
|
+
justifyContent: "space-between",
|
|
891
|
+
alignItems: "center",
|
|
892
|
+
cursor: "pointer"
|
|
893
|
+
},
|
|
894
|
+
value: {
|
|
895
|
+
display: "flex",
|
|
896
|
+
flexDirection: "row",
|
|
897
|
+
gap: "15px",
|
|
898
|
+
flexWrap: "wrap"
|
|
899
|
+
},
|
|
900
|
+
eachValue: {
|
|
901
|
+
borderRadius: "5px",
|
|
902
|
+
backgroundColor: "#f0f0f7",
|
|
903
|
+
padding: "5px",
|
|
904
|
+
position: "relative"
|
|
905
|
+
},
|
|
906
|
+
closeEach: {
|
|
907
|
+
position: "absolute",
|
|
908
|
+
top: 0,
|
|
909
|
+
right: 0,
|
|
910
|
+
transform: "translate(50%, -50%)",
|
|
911
|
+
borderRadius: "50%",
|
|
912
|
+
backgroundColor: "#fc2c2cf0",
|
|
913
|
+
aspectRatio: 1,
|
|
914
|
+
width: "24px",
|
|
915
|
+
display: "flex",
|
|
916
|
+
justifyContent: "center",
|
|
917
|
+
alignItems: "center",
|
|
918
|
+
color: "white",
|
|
919
|
+
transition: "scale .2s linear",
|
|
920
|
+
transformOrigin: "top right"
|
|
921
|
+
},
|
|
922
|
+
close: {
|
|
923
|
+
borderRadius: "50%",
|
|
924
|
+
width: "20px",
|
|
925
|
+
height: "20px",
|
|
926
|
+
display: "flex",
|
|
927
|
+
justifyContent: "center",
|
|
928
|
+
alignItems: "center"
|
|
929
|
+
},
|
|
930
|
+
element: {
|
|
931
|
+
display: "flex",
|
|
932
|
+
padding: "5px",
|
|
933
|
+
borderRadius: "10px",
|
|
934
|
+
justifyContent: "flex-start",
|
|
935
|
+
alignItems: "center",
|
|
936
|
+
cursor: "pointer"
|
|
937
|
+
},
|
|
938
|
+
dropdown: {
|
|
939
|
+
position: "absolute",
|
|
940
|
+
boxSizing: "border-box",
|
|
941
|
+
width: "100%",
|
|
942
|
+
left: "0",
|
|
943
|
+
display: "flex",
|
|
944
|
+
flexDirection: "column",
|
|
945
|
+
border: "solid 1px #dadada",
|
|
946
|
+
borderRadius: "10px",
|
|
947
|
+
padding: "5px",
|
|
948
|
+
maxHeight: "300px",
|
|
949
|
+
overflowY: "auto",
|
|
950
|
+
backgroundColor: "white"
|
|
951
|
+
},
|
|
952
|
+
search_border: {
|
|
953
|
+
position: "sticky",
|
|
954
|
+
top: 0,
|
|
955
|
+
left: 0,
|
|
956
|
+
boxSizing: "border-box",
|
|
957
|
+
width: "100%",
|
|
958
|
+
backgroundColor: "white",
|
|
959
|
+
marginBottom: "5px"
|
|
960
|
+
},
|
|
961
|
+
search: {
|
|
962
|
+
width: "100%",
|
|
963
|
+
borderRadius: "5px",
|
|
964
|
+
padding: "5px",
|
|
965
|
+
border: "solid 1px #dadada",
|
|
966
|
+
display: "flex",
|
|
967
|
+
justifyContent: "flex-start",
|
|
968
|
+
alignItems: "center",
|
|
969
|
+
boxSizing: "border-box"
|
|
970
|
+
}
|
|
971
|
+
};
|
|
972
|
+
var styles_default5 = styles5;
|
|
973
|
+
// src/components/MultiSelect/Search.tsx
|
|
974
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
975
|
+
var Search2 = function(param) {
|
|
976
|
+
var options = param.options, onSearch = param.onSearch;
|
|
977
|
+
return /* @__PURE__ */ jsx7("div", {
|
|
978
|
+
style: styles_default5.search_border,
|
|
979
|
+
children: /* @__PURE__ */ jsx7("input", {
|
|
980
|
+
placeholder: "Search...",
|
|
981
|
+
style: styles_default5.search,
|
|
982
|
+
id: "search",
|
|
983
|
+
name: "search",
|
|
984
|
+
onChange: function(e) {
|
|
985
|
+
return onSearch(options.filter(function(ele) {
|
|
986
|
+
return ele.value.toLowerCase().includes(e.target.value.toLowerCase());
|
|
987
|
+
}));
|
|
988
|
+
}
|
|
989
|
+
})
|
|
990
|
+
});
|
|
991
|
+
};
|
|
992
|
+
var Search_default2 = Search2;
|
|
993
|
+
// src/components/MultiSelect/Dropdown.tsx
|
|
994
|
+
import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
995
|
+
var Dropdown2 = function() {
|
|
996
|
+
var _useMyContext2 = useMyContext2(), options = _useMyContext2.options, onChange = _useMyContext2.onChange, setOpen = _useMyContext2.setOpen;
|
|
997
|
+
var _useState5 = _sliced_to_array(useState5(true), 2), isVisible = _useState5[0], setVisible = _useState5[1];
|
|
998
|
+
var _useState51 = _sliced_to_array(useState5(-1), 2), keyOnHover = _useState51[0], setKeyOnHover = _useState51[1];
|
|
999
|
+
var _useState52 = _sliced_to_array(useState5(options), 2), optionsCopy = _useState52[0], setOption = _useState52[1];
|
|
1000
|
+
var dropdownRef = useRef5(null);
|
|
1001
|
+
var handleResize = function() {
|
|
1002
|
+
var dropdown = dropdownRef.current;
|
|
1003
|
+
var dimension = dropdown.getBoundingClientRect();
|
|
1004
|
+
var distanceToBottom = window.innerHeight - dimension.bottom;
|
|
1005
|
+
var distanceToTop = dimension.top;
|
|
1006
|
+
if (distanceToBottom < 0) {
|
|
1007
|
+
setVisible(false);
|
|
1008
|
+
}
|
|
1009
|
+
if (distanceToTop < 0) {
|
|
1010
|
+
setVisible(true);
|
|
1011
|
+
}
|
|
1012
|
+
};
|
|
1013
|
+
useEffect5(function() {
|
|
1014
|
+
handleResize();
|
|
1015
|
+
window.addEventListener("scroll", handleResize);
|
|
1016
|
+
return function() {
|
|
1017
|
+
window.removeEventListener("scroll", handleResize);
|
|
1018
|
+
};
|
|
1019
|
+
}, []);
|
|
1020
|
+
return /* @__PURE__ */ jsxs6("div", {
|
|
1021
|
+
ref: dropdownRef,
|
|
1022
|
+
style: isVisible ? _object_spread_props(_object_spread({}, styles_default5.dropdown), {
|
|
1023
|
+
top: "calc(100% + 5px)"
|
|
1024
|
+
}) : _object_spread_props(_object_spread({}, styles_default5.dropdown), {
|
|
1025
|
+
bottom: "calc(100% + 5px)"
|
|
1026
|
+
}),
|
|
1027
|
+
children: [
|
|
1028
|
+
/* @__PURE__ */ jsx8(Search_default2, {
|
|
1029
|
+
options: options,
|
|
1030
|
+
onSearch: setOption
|
|
1031
|
+
}),
|
|
1032
|
+
optionsCopy.map(function(option, key) {
|
|
1033
|
+
return /* @__PURE__ */ jsx8("div", {
|
|
1034
|
+
style: _object_spread_props(_object_spread({}, styles_default5.element), {
|
|
1035
|
+
backgroundColor: keyOnHover === key ? "#f0f0f0" : "#fff"
|
|
1036
|
+
}),
|
|
1037
|
+
onClick: function() {
|
|
1038
|
+
onChange(function(prev) {
|
|
1039
|
+
if (prev.includes(option.value)) return _to_consumable_array(prev);
|
|
1040
|
+
return _to_consumable_array(prev).concat([
|
|
1041
|
+
option.value
|
|
1042
|
+
]);
|
|
1043
|
+
});
|
|
1044
|
+
setOpen(function(prev) {
|
|
1045
|
+
return !prev;
|
|
1046
|
+
});
|
|
1047
|
+
},
|
|
1048
|
+
onMouseEnter: function() {
|
|
1049
|
+
return setKeyOnHover(key);
|
|
1050
|
+
},
|
|
1051
|
+
onMouseLeave: function() {
|
|
1052
|
+
return setKeyOnHover(-1);
|
|
1053
|
+
},
|
|
1054
|
+
children: option.label
|
|
1055
|
+
}, key);
|
|
1056
|
+
})
|
|
1057
|
+
]
|
|
1058
|
+
});
|
|
1059
|
+
};
|
|
1060
|
+
var Dropdown_default2 = Dropdown2;
|
|
1061
|
+
// src/components/MultiSelect/MultiSelect.tsx
|
|
1062
|
+
import { IoMdClose as IoMdClose2 } from "react-icons/io";
|
|
1063
|
+
import { jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1064
|
+
var MultiSelect = function(param) {
|
|
1065
|
+
var options = param.options, value = param.value, onChange = param.onChange, _param_width = param.width, width = _param_width === void 0 ? "200" : _param_width;
|
|
1066
|
+
var _useState6 = _sliced_to_array(useState6(false), 2), open = _useState6[0], setOpen = _useState6[1];
|
|
1067
|
+
var _useState61 = _sliced_to_array(useState6(false), 2), isHoverClose = _useState61[0], setHoverClose = _useState61[1];
|
|
1068
|
+
var _useState62 = _sliced_to_array(useState6(-1), 2), isHoverCloseEach = _useState62[0], setHoverCloseEach = _useState62[1];
|
|
1069
|
+
var selectRef = useRef6(null);
|
|
1070
|
+
var clickHandler = function(e) {
|
|
1071
|
+
var select = selectRef.current;
|
|
1072
|
+
if (!select.contains(e.target)) {
|
|
1073
|
+
setOpen(false);
|
|
1074
|
+
}
|
|
1075
|
+
};
|
|
1076
|
+
useEffect6(function() {
|
|
1077
|
+
window.addEventListener("click", clickHandler);
|
|
1078
|
+
return function() {
|
|
1079
|
+
return window.removeEventListener("click", clickHandler);
|
|
1080
|
+
};
|
|
1081
|
+
}, []);
|
|
1082
|
+
return /* @__PURE__ */ jsx9(MyContext2.Provider, {
|
|
1083
|
+
value: {
|
|
1084
|
+
options: options,
|
|
1085
|
+
value: value,
|
|
1086
|
+
onChange: onChange,
|
|
1087
|
+
setOpen: setOpen
|
|
1088
|
+
},
|
|
1089
|
+
children: /* @__PURE__ */ jsxs7("div", {
|
|
1090
|
+
style: {
|
|
1091
|
+
width: "".concat(width, "px"),
|
|
1092
|
+
position: "relative"
|
|
1093
|
+
},
|
|
1094
|
+
ref: selectRef,
|
|
1095
|
+
children: [
|
|
1096
|
+
/* @__PURE__ */ jsxs7("div", {
|
|
1097
|
+
style: styles_default5.select_box,
|
|
1098
|
+
onClick: function() {
|
|
1099
|
+
return setOpen(function(prev) {
|
|
1100
|
+
return !prev;
|
|
1101
|
+
});
|
|
1102
|
+
},
|
|
1103
|
+
children: [
|
|
1104
|
+
/* @__PURE__ */ jsx9("div", {
|
|
1105
|
+
style: styles_default5.value,
|
|
1106
|
+
children: value.map(function(eachValue, key) {
|
|
1107
|
+
return /* @__PURE__ */ jsxs7("div", {
|
|
1108
|
+
style: styles_default5.eachValue,
|
|
1109
|
+
children: [
|
|
1110
|
+
/* @__PURE__ */ jsx9("span", {
|
|
1111
|
+
onMouseEnter: function() {
|
|
1112
|
+
setHoverCloseEach(key);
|
|
1113
|
+
},
|
|
1114
|
+
onMouseLeave: function() {
|
|
1115
|
+
setHoverCloseEach(-1);
|
|
1116
|
+
},
|
|
1117
|
+
title: "Remove this option",
|
|
1118
|
+
style: _object_spread_props(_object_spread({}, styles_default5.closeEach), {
|
|
1119
|
+
scale: isHoverCloseEach === key ? "1.2" : "1"
|
|
1120
|
+
}),
|
|
1121
|
+
onClick: function() {
|
|
1122
|
+
onChange(function(prev) {
|
|
1123
|
+
return prev.filter(function(o) {
|
|
1124
|
+
return o !== eachValue;
|
|
1125
|
+
});
|
|
1126
|
+
});
|
|
1127
|
+
setOpen(function(prev) {
|
|
1128
|
+
return !prev;
|
|
1129
|
+
});
|
|
1130
|
+
},
|
|
1131
|
+
children: /* @__PURE__ */ jsx9(IoMdClose2, {})
|
|
1132
|
+
}),
|
|
1133
|
+
eachValue
|
|
1134
|
+
]
|
|
1135
|
+
}, key);
|
|
1136
|
+
})
|
|
1137
|
+
}),
|
|
1138
|
+
/* @__PURE__ */ jsx9("div", {
|
|
1139
|
+
style: _object_spread_props(_object_spread({}, styles_default5.close), {
|
|
1140
|
+
backgroundColor: isHoverClose ? "#f0f0f0" : "#fff"
|
|
1141
|
+
}),
|
|
1142
|
+
title: "Clear all",
|
|
1143
|
+
onClick: function() {
|
|
1144
|
+
onChange([]);
|
|
1145
|
+
setOpen(function(prev) {
|
|
1146
|
+
return !prev;
|
|
1147
|
+
});
|
|
1148
|
+
},
|
|
1149
|
+
onMouseEnter: function() {
|
|
1150
|
+
return setHoverClose(true);
|
|
1151
|
+
},
|
|
1152
|
+
onMouseLeave: function() {
|
|
1153
|
+
return setHoverClose(false);
|
|
1154
|
+
},
|
|
1155
|
+
children: /* @__PURE__ */ jsx9(IoMdClose2, {})
|
|
1156
|
+
})
|
|
1157
|
+
]
|
|
1158
|
+
}),
|
|
1159
|
+
open && /* @__PURE__ */ jsx9(Dropdown_default2, {})
|
|
1160
|
+
]
|
|
1161
|
+
})
|
|
1162
|
+
});
|
|
1163
|
+
};
|
|
1164
|
+
var MultiSelect_default = MultiSelect;
|
|
1165
|
+
// src/components/Buttons/Button.tsx
|
|
1166
|
+
import { createContext as createContext3, useContext as useContext3 } from "react";
|
|
1167
|
+
// src/components/Buttons/gradient/Gradient.tsx
|
|
1168
|
+
import { motion } from "framer-motion";
|
|
1169
|
+
// src/components/Buttons/gradient/styles.ts
|
|
1170
|
+
var borderRadius = "20px";
|
|
1171
|
+
var styles6 = function(first, second) {
|
|
1172
|
+
var styles8 = {
|
|
1173
|
+
container: {
|
|
1174
|
+
position: "relative",
|
|
1175
|
+
borderRadius: borderRadius,
|
|
1176
|
+
padding: "3px"
|
|
1177
|
+
},
|
|
1178
|
+
btn: {
|
|
1179
|
+
position: "relative",
|
|
1180
|
+
zIndex: 1,
|
|
1181
|
+
display: "flex",
|
|
1182
|
+
justifyContent: "center",
|
|
1183
|
+
alignItems: "center",
|
|
1184
|
+
padding: "2px",
|
|
1185
|
+
borderRadius: borderRadius,
|
|
1186
|
+
backgroundColor: "".concat(first),
|
|
1187
|
+
backgroundImage: "linear-gradient(43deg, ".concat(first, " 0%, ").concat(second, " 100%)"),
|
|
1188
|
+
border: "none",
|
|
1189
|
+
cursor: "pointer"
|
|
1190
|
+
},
|
|
1191
|
+
btnAfter: {
|
|
1192
|
+
position: "absolute",
|
|
1193
|
+
top: 0,
|
|
1194
|
+
left: 0,
|
|
1195
|
+
width: "100%",
|
|
1196
|
+
height: "100%",
|
|
1197
|
+
content: '""',
|
|
1198
|
+
zIndex: 0,
|
|
1199
|
+
backgroundColor: "".concat(first),
|
|
1200
|
+
backgroundImage: "linear-gradient(43deg, ".concat(first, " 0%, ").concat(second, " 100%)"),
|
|
1201
|
+
filter: "blur(10px)"
|
|
1202
|
+
},
|
|
1203
|
+
label: {
|
|
1204
|
+
backgroundColor: "#111723",
|
|
1205
|
+
borderRadius: borderRadius,
|
|
1206
|
+
padding: "0.5rem 2rem",
|
|
1207
|
+
color: "white"
|
|
1208
|
+
},
|
|
1209
|
+
labelBefore: {
|
|
1210
|
+
position: "absolute",
|
|
1211
|
+
top: "20%",
|
|
1212
|
+
right: "50%",
|
|
1213
|
+
width: "50%",
|
|
1214
|
+
height: "50%",
|
|
1215
|
+
content: '""',
|
|
1216
|
+
zIndex: 0,
|
|
1217
|
+
backgroundColor: "".concat(first),
|
|
1218
|
+
filter: "blur(15px)"
|
|
1219
|
+
},
|
|
1220
|
+
labelAfter: {
|
|
1221
|
+
position: "absolute",
|
|
1222
|
+
top: "20%",
|
|
1223
|
+
left: "50%",
|
|
1224
|
+
width: "50%",
|
|
1225
|
+
height: "50%",
|
|
1226
|
+
content: '""',
|
|
1227
|
+
zIndex: 0,
|
|
1228
|
+
backgroundColor: "".concat(second),
|
|
1229
|
+
filter: "blur(20px)"
|
|
1230
|
+
},
|
|
1231
|
+
p: {
|
|
1232
|
+
position: "relative",
|
|
1233
|
+
zIndex: 1,
|
|
1234
|
+
margin: 0
|
|
1235
|
+
},
|
|
1236
|
+
neon: {
|
|
1237
|
+
content: '""',
|
|
1238
|
+
background: "conic-gradient(transparent 270deg, green, transparent)",
|
|
1239
|
+
position: "absolute",
|
|
1240
|
+
top: "50%",
|
|
1241
|
+
left: "50%",
|
|
1242
|
+
transform: "translate(-50%, -50%)",
|
|
1243
|
+
aspectRatio: 1,
|
|
1244
|
+
width: "100%"
|
|
1245
|
+
}
|
|
1246
|
+
};
|
|
1247
|
+
return styles8;
|
|
1248
|
+
};
|
|
1249
|
+
var styles_default6 = styles6;
|
|
1250
|
+
// src/components/Buttons/gradient/Gradient.tsx
|
|
1251
|
+
import { jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1252
|
+
var Gradient = function() {
|
|
1253
|
+
var data = useButtonContext();
|
|
1254
|
+
var styles8 = styles_default6(data.first, data.second);
|
|
1255
|
+
return /* @__PURE__ */ jsxs8("div", {
|
|
1256
|
+
style: _object_spread_props(_object_spread({}, styles8.container), {
|
|
1257
|
+
overflow: data.isLoading ? "hidden" : ""
|
|
1258
|
+
}),
|
|
1259
|
+
children: [
|
|
1260
|
+
/* @__PURE__ */ jsx10("button", _object_spread_props(_object_spread({
|
|
1261
|
+
style: styles8.btn
|
|
1262
|
+
}, data.props), {
|
|
1263
|
+
children: /* @__PURE__ */ jsxs8("div", {
|
|
1264
|
+
style: {
|
|
1265
|
+
position: "relative"
|
|
1266
|
+
},
|
|
1267
|
+
children: [
|
|
1268
|
+
/* @__PURE__ */ jsx10("div", {
|
|
1269
|
+
style: styles8.labelBefore
|
|
1270
|
+
}),
|
|
1271
|
+
/* @__PURE__ */ jsx10("div", {
|
|
1272
|
+
style: _object_spread_props(_object_spread({}, styles8.label), {
|
|
1273
|
+
backgroundColor: data.main
|
|
1274
|
+
}),
|
|
1275
|
+
children: /* @__PURE__ */ jsx10("p", {
|
|
1276
|
+
style: _object_spread_props(_object_spread({}, styles8.p), {
|
|
1277
|
+
color: "".concat(data.text)
|
|
1278
|
+
}),
|
|
1279
|
+
children: data.content
|
|
1280
|
+
})
|
|
1281
|
+
}),
|
|
1282
|
+
/* @__PURE__ */ jsx10("div", {
|
|
1283
|
+
style: styles8.labelAfter
|
|
1284
|
+
})
|
|
1285
|
+
]
|
|
1286
|
+
})
|
|
1287
|
+
})),
|
|
1288
|
+
!data.isLoading && /* @__PURE__ */ jsx10("div", {
|
|
1289
|
+
style: styles8.btnAfter
|
|
1290
|
+
}),
|
|
1291
|
+
data.isLoading && /* @__PURE__ */ jsx10(motion.div, {
|
|
1292
|
+
style: styles8.btnAfter,
|
|
1293
|
+
animate: {
|
|
1294
|
+
rotate: 360
|
|
1295
|
+
},
|
|
1296
|
+
transition: {
|
|
1297
|
+
ease: "linear",
|
|
1298
|
+
repeat: Infinity,
|
|
1299
|
+
duration: 3
|
|
1300
|
+
}
|
|
1301
|
+
})
|
|
1302
|
+
]
|
|
1303
|
+
});
|
|
1304
|
+
};
|
|
1305
|
+
var Gradient_default = Gradient;
|
|
1306
|
+
// src/components/Buttons/solid/styles.ts
|
|
1307
|
+
var styles7 = function(first) {
|
|
1308
|
+
var styles8 = {
|
|
1309
|
+
"btn": {
|
|
1310
|
+
cursor: "pointer",
|
|
1311
|
+
position: "relative",
|
|
1312
|
+
zIndex: 0,
|
|
1313
|
+
display: "flex",
|
|
1314
|
+
justifyContent: "center",
|
|
1315
|
+
alignItems: "center",
|
|
1316
|
+
padding: "2px",
|
|
1317
|
+
borderRadius: "0.75rem",
|
|
1318
|
+
backgroundColor: first,
|
|
1319
|
+
border: "none"
|
|
1320
|
+
},
|
|
1321
|
+
"btnAfter": {
|
|
1322
|
+
position: "absolute",
|
|
1323
|
+
top: 0,
|
|
1324
|
+
left: 0,
|
|
1325
|
+
width: "100%",
|
|
1326
|
+
height: "100%",
|
|
1327
|
+
zIndex: -1,
|
|
1328
|
+
backgroundColor: first,
|
|
1329
|
+
filter: "blur(10px)"
|
|
1330
|
+
},
|
|
1331
|
+
"label": {
|
|
1332
|
+
borderRadius: "0.75rem",
|
|
1333
|
+
padding: "0.5rem 2rem",
|
|
1334
|
+
color: "white"
|
|
1335
|
+
},
|
|
1336
|
+
"labelBefore": {
|
|
1337
|
+
position: "absolute",
|
|
1338
|
+
top: "20%",
|
|
1339
|
+
right: "50%",
|
|
1340
|
+
width: "50%",
|
|
1341
|
+
height: "50%",
|
|
1342
|
+
content: '""',
|
|
1343
|
+
// See note below
|
|
1344
|
+
zIndex: 0,
|
|
1345
|
+
backgroundColor: first,
|
|
1346
|
+
filter: "blur(15px)"
|
|
1347
|
+
},
|
|
1348
|
+
"labelAfter": {
|
|
1349
|
+
position: "absolute",
|
|
1350
|
+
top: "20%",
|
|
1351
|
+
left: "50%",
|
|
1352
|
+
width: "50%",
|
|
1353
|
+
height: "50%",
|
|
1354
|
+
content: '""',
|
|
1355
|
+
// See note below
|
|
1356
|
+
zIndex: 0,
|
|
1357
|
+
filter: "blur(20px)"
|
|
1358
|
+
},
|
|
1359
|
+
"p": {
|
|
1360
|
+
zIndex: 1,
|
|
1361
|
+
position: "relative",
|
|
1362
|
+
margin: 0
|
|
1363
|
+
}
|
|
1364
|
+
};
|
|
1365
|
+
return styles8;
|
|
1366
|
+
};
|
|
1367
|
+
var styles_default7 = styles7;
|
|
1368
|
+
// src/components/Buttons/solid/Solid.tsx
|
|
1369
|
+
import { jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1370
|
+
var Solid = function() {
|
|
1371
|
+
var data = useButtonContext();
|
|
1372
|
+
var styles8 = styles_default7(data.first);
|
|
1373
|
+
return /* @__PURE__ */ jsxs9("div", {
|
|
1374
|
+
style: {
|
|
1375
|
+
position: "relative"
|
|
1376
|
+
},
|
|
1377
|
+
children: [
|
|
1378
|
+
/* @__PURE__ */ jsx11("button", _object_spread_props(_object_spread({
|
|
1379
|
+
style: styles8.btn
|
|
1380
|
+
}, data.props), {
|
|
1381
|
+
children: /* @__PURE__ */ jsxs9("div", {
|
|
1382
|
+
style: {
|
|
1383
|
+
position: "relative"
|
|
1384
|
+
},
|
|
1385
|
+
children: [
|
|
1386
|
+
/* @__PURE__ */ jsx11("div", {
|
|
1387
|
+
style: styles8.labelBefore
|
|
1388
|
+
}),
|
|
1389
|
+
/* @__PURE__ */ jsx11("div", {
|
|
1390
|
+
style: _object_spread_props(_object_spread({}, styles8.label), {
|
|
1391
|
+
backgroundColor: data.main
|
|
1392
|
+
}),
|
|
1393
|
+
children: /* @__PURE__ */ jsx11("p", {
|
|
1394
|
+
style: _object_spread_props(_object_spread({}, styles8.p), {
|
|
1395
|
+
color: "".concat(data.text)
|
|
1396
|
+
}),
|
|
1397
|
+
children: data.content
|
|
1398
|
+
})
|
|
1399
|
+
}),
|
|
1400
|
+
/* @__PURE__ */ jsx11("div", {
|
|
1401
|
+
style: styles8.labelAfter
|
|
1402
|
+
})
|
|
1403
|
+
]
|
|
1404
|
+
})
|
|
1405
|
+
})),
|
|
1406
|
+
/* @__PURE__ */ jsx11("div", {
|
|
1407
|
+
style: styles8.btnAfter
|
|
1408
|
+
})
|
|
1409
|
+
]
|
|
1410
|
+
});
|
|
1411
|
+
};
|
|
1412
|
+
var Solid_default = Solid;
|
|
1413
|
+
// src/components/Buttons/Button.tsx
|
|
1414
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
1415
|
+
var ButtonContext = createContext3(void 0);
|
|
1416
|
+
function useButtonContext() {
|
|
1417
|
+
var data = useContext3(ButtonContext);
|
|
1418
|
+
if (data === void 0) {
|
|
1419
|
+
throw new Error("Select Context is undefined");
|
|
1420
|
+
}
|
|
1421
|
+
return data;
|
|
1422
|
+
}
|
|
1423
|
+
var Button = function(_param) {
|
|
1424
|
+
var _param_buttonType = _param.buttonType, buttonType = _param_buttonType === void 0 ? "normal" : _param_buttonType, content = _param.content, _param_main = _param.main, main = _param_main === void 0 ? "#111723" : _param_main, _param_first = _param.first, first = _param_first === void 0 ? "#3e8fbc" : _param_first, _param_second = _param.second, second = _param_second === void 0 ? "#aa6392" : _param_second, _param_text = _param.text, text = _param_text === void 0 ? "#fff" : _param_text, _param_isLoading = _param.isLoading, isLoading = _param_isLoading === void 0 ? false : _param_isLoading, props = _object_without_properties(_param, [
|
|
1425
|
+
"buttonType",
|
|
1426
|
+
"content",
|
|
1427
|
+
"main",
|
|
1428
|
+
"first",
|
|
1429
|
+
"second",
|
|
1430
|
+
"text",
|
|
1431
|
+
"isLoading"
|
|
1432
|
+
]);
|
|
1433
|
+
switch(buttonType){
|
|
1434
|
+
case "gradient":
|
|
1435
|
+
return /* @__PURE__ */ jsx12(ButtonContext.Provider, {
|
|
1436
|
+
value: {
|
|
1437
|
+
content: content,
|
|
1438
|
+
main: main,
|
|
1439
|
+
first: first,
|
|
1440
|
+
second: second,
|
|
1441
|
+
text: text,
|
|
1442
|
+
props: props,
|
|
1443
|
+
isLoading: isLoading
|
|
1444
|
+
},
|
|
1445
|
+
children: /* @__PURE__ */ jsx12(Gradient_default, {})
|
|
1446
|
+
});
|
|
1447
|
+
case "solid":
|
|
1448
|
+
return /* @__PURE__ */ jsx12(ButtonContext.Provider, {
|
|
1449
|
+
value: {
|
|
1450
|
+
content: content,
|
|
1451
|
+
main: main,
|
|
1452
|
+
first: first,
|
|
1453
|
+
text: text,
|
|
1454
|
+
props: props,
|
|
1455
|
+
isLoading: isLoading
|
|
1456
|
+
},
|
|
1457
|
+
children: /* @__PURE__ */ jsx12(Solid_default, {})
|
|
1458
|
+
});
|
|
1459
|
+
default:
|
|
1460
|
+
return /* @__PURE__ */ jsx12("button", _object_spread_props(_object_spread({}, props), {
|
|
1461
|
+
children: content
|
|
1462
|
+
}));
|
|
1463
|
+
}
|
|
1464
|
+
};
|
|
1465
|
+
var Button_default = Button;
|
|
1466
|
+
export { Button_default as Button, ColorPickerSlider_default as ColorPickerSlider, DropdownSelect_default as DropdownSelect, MultiSelect_default as MultiSelect, OptionSlider_default as OptionSlider, RangeSlider_default as RangeSlider };
|