@willphan1712000/frontend 1.0.2 → 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 +36 -13
- package/dist/index.d.ts +36 -13
- package/dist/index.js +333 -1
- package/dist/index.mjs +330 -2
- package/package.json +3 -6
- package/.babelrc +0 -20
- package/index.ts +0 -16
- 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/README.md
CHANGED
|
@@ -26,6 +26,25 @@ npm i @willphan1712000/frontend
|
|
|
26
26
|
|
|
27
27
|
If you found an issue or would like to submit an improvement to this project, please submit an issue using the issues tab above. If you would like to submit a Pull Request with a fix, reference the issue you created
|
|
28
28
|
|
|
29
|
-
## Happy with this project
|
|
29
|
+
## Happy with this project and want to make a contribution
|
|
30
30
|
|
|
31
31
|
You can connect to me at [Facebook](https://www.facebook.com/phanthanhnha123200/) [Instagram](https://www.instagram.com/phanthanhnha_0117/)
|
|
32
|
+
|
|
33
|
+
You can make contributions to this project by adding new UI ideas that stand out so we can compete ones generated by AI.
|
|
34
|
+
|
|
35
|
+
To test a package, run
|
|
36
|
+
```npm
|
|
37
|
+
npm link
|
|
38
|
+
```
|
|
39
|
+
On the other frontend environment, run
|
|
40
|
+
```npm
|
|
41
|
+
npm link @willphan1712000/frontend
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
> [!NOTE]
|
|
45
|
+
> if you encounter the problem "3. You might have more than one copy of React in the same app?"
|
|
46
|
+
> it means your application has loaded two different React instances. This breaks React Hooks, which rely on a single, shared state.
|
|
47
|
+
> Run this to connect to react in your testing project
|
|
48
|
+
```npm
|
|
49
|
+
npm link <path_to_your_testing_project>/node_modules/react
|
|
50
|
+
```
|
package/dist/index.d.mts
CHANGED
|
@@ -5,7 +5,7 @@ type Options$2 = {
|
|
|
5
5
|
label: string;
|
|
6
6
|
value: string;
|
|
7
7
|
}[];
|
|
8
|
-
interface Props$
|
|
8
|
+
interface Props$5 {
|
|
9
9
|
options: Options$2;
|
|
10
10
|
value: string;
|
|
11
11
|
onChange: (value: string) => void;
|
|
@@ -19,9 +19,9 @@ interface Props$4 {
|
|
|
19
19
|
* @param width - specify the width of the component
|
|
20
20
|
* @returns
|
|
21
21
|
*/
|
|
22
|
-
declare const DropdownSelect: ({ options, value, onChange, width }: Props$
|
|
22
|
+
declare const DropdownSelect: ({ options, value, onChange, width }: Props$5) => react_jsx_runtime.JSX.Element;
|
|
23
23
|
|
|
24
|
-
interface Props$
|
|
24
|
+
interface Props$4 {
|
|
25
25
|
value: string;
|
|
26
26
|
onChange: (value: string) => void;
|
|
27
27
|
min?: string;
|
|
@@ -39,13 +39,13 @@ interface Props$3 {
|
|
|
39
39
|
* @param onChange - to set a value
|
|
40
40
|
* @returns
|
|
41
41
|
*/
|
|
42
|
-
declare const RangeSlider: ({ min, max, color, width, value, onChange }: Props$
|
|
42
|
+
declare const RangeSlider: ({ min, max, color, width, value, onChange }: Props$4) => react_jsx_runtime.JSX.Element;
|
|
43
43
|
|
|
44
44
|
type Options$1 = {
|
|
45
45
|
label: ReactNode;
|
|
46
46
|
value: string;
|
|
47
47
|
}[];
|
|
48
|
-
interface Props$
|
|
48
|
+
interface Props$3 {
|
|
49
49
|
value: string;
|
|
50
50
|
onChange: (value: string) => void;
|
|
51
51
|
width?: string;
|
|
@@ -59,9 +59,9 @@ interface Props$2 {
|
|
|
59
59
|
* @options - list of options, format [{ label: React Node Syntax, value: string }]
|
|
60
60
|
* @returns
|
|
61
61
|
*/
|
|
62
|
-
declare const OptionSlider: ({ value, onChange, width, options, color }: Props$
|
|
62
|
+
declare const OptionSlider: ({ value, onChange, width, options, color }: Props$3) => react_jsx_runtime.JSX.Element;
|
|
63
63
|
|
|
64
|
-
interface Props$
|
|
64
|
+
interface Props$2 {
|
|
65
65
|
value: string;
|
|
66
66
|
onChange: (value: string) => void;
|
|
67
67
|
width?: string;
|
|
@@ -73,13 +73,13 @@ interface Props$1 {
|
|
|
73
73
|
* @param width
|
|
74
74
|
* @returns
|
|
75
75
|
*/
|
|
76
|
-
declare const ColorPickerSlider: ({ value, onChange, width }: Props$
|
|
76
|
+
declare const ColorPickerSlider: ({ value, onChange, width }: Props$2) => react_jsx_runtime.JSX.Element;
|
|
77
77
|
|
|
78
78
|
type Options = {
|
|
79
79
|
label: string;
|
|
80
80
|
value: string;
|
|
81
81
|
}[];
|
|
82
|
-
interface Props {
|
|
82
|
+
interface Props$1 {
|
|
83
83
|
options: Options;
|
|
84
84
|
value: string[];
|
|
85
85
|
onChange: React.Dispatch<React.SetStateAction<string[]>>;
|
|
@@ -88,11 +88,34 @@ interface Props {
|
|
|
88
88
|
/**
|
|
89
89
|
* MultiSelect component, allowing users to select multiple options from dropdown menu with search
|
|
90
90
|
* @param options - list of options, which is an array of object [{ label: string, value: string }]
|
|
91
|
-
* @param value -
|
|
92
|
-
* @param onChange - a function to set
|
|
91
|
+
* @param value - an array of chosen values
|
|
92
|
+
* @param onChange - a function to set an array of values
|
|
93
93
|
* @param width - specify the width of the component
|
|
94
94
|
* @returns
|
|
95
95
|
*/
|
|
96
|
-
declare const MultiSelect: ({ options, value, onChange, width }: Props) => react_jsx_runtime.JSX.Element;
|
|
96
|
+
declare const MultiSelect: ({ options, value, onChange, width }: Props$1) => react_jsx_runtime.JSX.Element;
|
|
97
|
+
|
|
98
|
+
interface Props {
|
|
99
|
+
buttonType: "gradient" | "solid" | "normal";
|
|
100
|
+
}
|
|
101
|
+
interface Data {
|
|
102
|
+
content: string;
|
|
103
|
+
main?: string;
|
|
104
|
+
text?: string;
|
|
105
|
+
first?: string;
|
|
106
|
+
second?: string;
|
|
107
|
+
isLoading?: boolean;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
*
|
|
111
|
+
* @param buttonType type of button, default is normal button
|
|
112
|
+
* @param content string content inside the button
|
|
113
|
+
* @param main main color of the button
|
|
114
|
+
* @param text text color
|
|
115
|
+
* @param first first color when using gradient button or solid button, default is #3e8fbc
|
|
116
|
+
* @param second second color when using gradient button, default is #aa6392
|
|
117
|
+
* @returns button UI component
|
|
118
|
+
*/
|
|
119
|
+
declare const Button: ({ buttonType, content, main, first, second, text, isLoading, ...props }: Props & Data & React.ComponentProps<"button">) => react_jsx_runtime.JSX.Element;
|
|
97
120
|
|
|
98
|
-
export { ColorPickerSlider, DropdownSelect, MultiSelect, OptionSlider, type Options$2 as Options, RangeSlider, type Options$1 as SliderOptions };
|
|
121
|
+
export { Button, ColorPickerSlider, DropdownSelect, MultiSelect, OptionSlider, type Options$2 as Options, RangeSlider, type Options$1 as SliderOptions };
|
package/dist/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ type Options$2 = {
|
|
|
5
5
|
label: string;
|
|
6
6
|
value: string;
|
|
7
7
|
}[];
|
|
8
|
-
interface Props$
|
|
8
|
+
interface Props$5 {
|
|
9
9
|
options: Options$2;
|
|
10
10
|
value: string;
|
|
11
11
|
onChange: (value: string) => void;
|
|
@@ -19,9 +19,9 @@ interface Props$4 {
|
|
|
19
19
|
* @param width - specify the width of the component
|
|
20
20
|
* @returns
|
|
21
21
|
*/
|
|
22
|
-
declare const DropdownSelect: ({ options, value, onChange, width }: Props$
|
|
22
|
+
declare const DropdownSelect: ({ options, value, onChange, width }: Props$5) => react_jsx_runtime.JSX.Element;
|
|
23
23
|
|
|
24
|
-
interface Props$
|
|
24
|
+
interface Props$4 {
|
|
25
25
|
value: string;
|
|
26
26
|
onChange: (value: string) => void;
|
|
27
27
|
min?: string;
|
|
@@ -39,13 +39,13 @@ interface Props$3 {
|
|
|
39
39
|
* @param onChange - to set a value
|
|
40
40
|
* @returns
|
|
41
41
|
*/
|
|
42
|
-
declare const RangeSlider: ({ min, max, color, width, value, onChange }: Props$
|
|
42
|
+
declare const RangeSlider: ({ min, max, color, width, value, onChange }: Props$4) => react_jsx_runtime.JSX.Element;
|
|
43
43
|
|
|
44
44
|
type Options$1 = {
|
|
45
45
|
label: ReactNode;
|
|
46
46
|
value: string;
|
|
47
47
|
}[];
|
|
48
|
-
interface Props$
|
|
48
|
+
interface Props$3 {
|
|
49
49
|
value: string;
|
|
50
50
|
onChange: (value: string) => void;
|
|
51
51
|
width?: string;
|
|
@@ -59,9 +59,9 @@ interface Props$2 {
|
|
|
59
59
|
* @options - list of options, format [{ label: React Node Syntax, value: string }]
|
|
60
60
|
* @returns
|
|
61
61
|
*/
|
|
62
|
-
declare const OptionSlider: ({ value, onChange, width, options, color }: Props$
|
|
62
|
+
declare const OptionSlider: ({ value, onChange, width, options, color }: Props$3) => react_jsx_runtime.JSX.Element;
|
|
63
63
|
|
|
64
|
-
interface Props$
|
|
64
|
+
interface Props$2 {
|
|
65
65
|
value: string;
|
|
66
66
|
onChange: (value: string) => void;
|
|
67
67
|
width?: string;
|
|
@@ -73,13 +73,13 @@ interface Props$1 {
|
|
|
73
73
|
* @param width
|
|
74
74
|
* @returns
|
|
75
75
|
*/
|
|
76
|
-
declare const ColorPickerSlider: ({ value, onChange, width }: Props$
|
|
76
|
+
declare const ColorPickerSlider: ({ value, onChange, width }: Props$2) => react_jsx_runtime.JSX.Element;
|
|
77
77
|
|
|
78
78
|
type Options = {
|
|
79
79
|
label: string;
|
|
80
80
|
value: string;
|
|
81
81
|
}[];
|
|
82
|
-
interface Props {
|
|
82
|
+
interface Props$1 {
|
|
83
83
|
options: Options;
|
|
84
84
|
value: string[];
|
|
85
85
|
onChange: React.Dispatch<React.SetStateAction<string[]>>;
|
|
@@ -88,11 +88,34 @@ interface Props {
|
|
|
88
88
|
/**
|
|
89
89
|
* MultiSelect component, allowing users to select multiple options from dropdown menu with search
|
|
90
90
|
* @param options - list of options, which is an array of object [{ label: string, value: string }]
|
|
91
|
-
* @param value -
|
|
92
|
-
* @param onChange - a function to set
|
|
91
|
+
* @param value - an array of chosen values
|
|
92
|
+
* @param onChange - a function to set an array of values
|
|
93
93
|
* @param width - specify the width of the component
|
|
94
94
|
* @returns
|
|
95
95
|
*/
|
|
96
|
-
declare const MultiSelect: ({ options, value, onChange, width }: Props) => react_jsx_runtime.JSX.Element;
|
|
96
|
+
declare const MultiSelect: ({ options, value, onChange, width }: Props$1) => react_jsx_runtime.JSX.Element;
|
|
97
|
+
|
|
98
|
+
interface Props {
|
|
99
|
+
buttonType: "gradient" | "solid" | "normal";
|
|
100
|
+
}
|
|
101
|
+
interface Data {
|
|
102
|
+
content: string;
|
|
103
|
+
main?: string;
|
|
104
|
+
text?: string;
|
|
105
|
+
first?: string;
|
|
106
|
+
second?: string;
|
|
107
|
+
isLoading?: boolean;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
*
|
|
111
|
+
* @param buttonType type of button, default is normal button
|
|
112
|
+
* @param content string content inside the button
|
|
113
|
+
* @param main main color of the button
|
|
114
|
+
* @param text text color
|
|
115
|
+
* @param first first color when using gradient button or solid button, default is #3e8fbc
|
|
116
|
+
* @param second second color when using gradient button, default is #aa6392
|
|
117
|
+
* @returns button UI component
|
|
118
|
+
*/
|
|
119
|
+
declare const Button: ({ buttonType, content, main, first, second, text, isLoading, ...props }: Props & Data & React.ComponentProps<"button">) => react_jsx_runtime.JSX.Element;
|
|
97
120
|
|
|
98
|
-
export { ColorPickerSlider, DropdownSelect, MultiSelect, OptionSlider, type Options$2 as Options, RangeSlider, type Options$1 as SliderOptions };
|
|
121
|
+
export { Button, ColorPickerSlider, DropdownSelect, MultiSelect, OptionSlider, type Options$2 as Options, RangeSlider, type Options$1 as SliderOptions };
|
package/dist/index.js
CHANGED
|
@@ -95,6 +95,33 @@ function _object_spread_props(target, source) {
|
|
|
95
95
|
}
|
|
96
96
|
return target;
|
|
97
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
|
+
}
|
|
98
125
|
function _sliced_to_array(arr, i) {
|
|
99
126
|
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
|
100
127
|
}
|
|
@@ -162,6 +189,9 @@ var __toCommonJS = function(mod) {
|
|
|
162
189
|
// index.ts
|
|
163
190
|
var index_exports = {};
|
|
164
191
|
__export(index_exports, {
|
|
192
|
+
Button: function() {
|
|
193
|
+
return Button_default;
|
|
194
|
+
},
|
|
165
195
|
ColorPickerSlider: function() {
|
|
166
196
|
return ColorPickerSlider_default;
|
|
167
197
|
},
|
|
@@ -1021,7 +1051,7 @@ var Search2 = function(param) {
|
|
|
1021
1051
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", {
|
|
1022
1052
|
style: styles_default5.search_border,
|
|
1023
1053
|
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("input", {
|
|
1024
|
-
placeholder: "Search",
|
|
1054
|
+
placeholder: "Search...",
|
|
1025
1055
|
style: styles_default5.search,
|
|
1026
1056
|
id: "search",
|
|
1027
1057
|
name: "search",
|
|
@@ -1206,8 +1236,310 @@ var MultiSelect = function(param) {
|
|
|
1206
1236
|
});
|
|
1207
1237
|
};
|
|
1208
1238
|
var MultiSelect_default = MultiSelect;
|
|
1239
|
+
// src/components/Buttons/Button.tsx
|
|
1240
|
+
var import_react9 = require("react");
|
|
1241
|
+
// src/components/Buttons/gradient/Gradient.tsx
|
|
1242
|
+
var import_framer_motion = require("framer-motion");
|
|
1243
|
+
// src/components/Buttons/gradient/styles.ts
|
|
1244
|
+
var borderRadius = "20px";
|
|
1245
|
+
var styles6 = function(first, second) {
|
|
1246
|
+
var styles8 = {
|
|
1247
|
+
container: {
|
|
1248
|
+
position: "relative",
|
|
1249
|
+
borderRadius: borderRadius,
|
|
1250
|
+
padding: "3px"
|
|
1251
|
+
},
|
|
1252
|
+
btn: {
|
|
1253
|
+
position: "relative",
|
|
1254
|
+
zIndex: 1,
|
|
1255
|
+
display: "flex",
|
|
1256
|
+
justifyContent: "center",
|
|
1257
|
+
alignItems: "center",
|
|
1258
|
+
padding: "2px",
|
|
1259
|
+
borderRadius: borderRadius,
|
|
1260
|
+
backgroundColor: "".concat(first),
|
|
1261
|
+
backgroundImage: "linear-gradient(43deg, ".concat(first, " 0%, ").concat(second, " 100%)"),
|
|
1262
|
+
border: "none",
|
|
1263
|
+
cursor: "pointer"
|
|
1264
|
+
},
|
|
1265
|
+
btnAfter: {
|
|
1266
|
+
position: "absolute",
|
|
1267
|
+
top: 0,
|
|
1268
|
+
left: 0,
|
|
1269
|
+
width: "100%",
|
|
1270
|
+
height: "100%",
|
|
1271
|
+
content: '""',
|
|
1272
|
+
zIndex: 0,
|
|
1273
|
+
backgroundColor: "".concat(first),
|
|
1274
|
+
backgroundImage: "linear-gradient(43deg, ".concat(first, " 0%, ").concat(second, " 100%)"),
|
|
1275
|
+
filter: "blur(10px)"
|
|
1276
|
+
},
|
|
1277
|
+
label: {
|
|
1278
|
+
backgroundColor: "#111723",
|
|
1279
|
+
borderRadius: borderRadius,
|
|
1280
|
+
padding: "0.5rem 2rem",
|
|
1281
|
+
color: "white"
|
|
1282
|
+
},
|
|
1283
|
+
labelBefore: {
|
|
1284
|
+
position: "absolute",
|
|
1285
|
+
top: "20%",
|
|
1286
|
+
right: "50%",
|
|
1287
|
+
width: "50%",
|
|
1288
|
+
height: "50%",
|
|
1289
|
+
content: '""',
|
|
1290
|
+
zIndex: 0,
|
|
1291
|
+
backgroundColor: "".concat(first),
|
|
1292
|
+
filter: "blur(15px)"
|
|
1293
|
+
},
|
|
1294
|
+
labelAfter: {
|
|
1295
|
+
position: "absolute",
|
|
1296
|
+
top: "20%",
|
|
1297
|
+
left: "50%",
|
|
1298
|
+
width: "50%",
|
|
1299
|
+
height: "50%",
|
|
1300
|
+
content: '""',
|
|
1301
|
+
zIndex: 0,
|
|
1302
|
+
backgroundColor: "".concat(second),
|
|
1303
|
+
filter: "blur(20px)"
|
|
1304
|
+
},
|
|
1305
|
+
p: {
|
|
1306
|
+
position: "relative",
|
|
1307
|
+
zIndex: 1,
|
|
1308
|
+
margin: 0
|
|
1309
|
+
},
|
|
1310
|
+
neon: {
|
|
1311
|
+
content: '""',
|
|
1312
|
+
background: "conic-gradient(transparent 270deg, green, transparent)",
|
|
1313
|
+
position: "absolute",
|
|
1314
|
+
top: "50%",
|
|
1315
|
+
left: "50%",
|
|
1316
|
+
transform: "translate(-50%, -50%)",
|
|
1317
|
+
aspectRatio: 1,
|
|
1318
|
+
width: "100%"
|
|
1319
|
+
}
|
|
1320
|
+
};
|
|
1321
|
+
return styles8;
|
|
1322
|
+
};
|
|
1323
|
+
var styles_default6 = styles6;
|
|
1324
|
+
// src/components/Buttons/gradient/Gradient.tsx
|
|
1325
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
1326
|
+
var Gradient = function() {
|
|
1327
|
+
var data = useButtonContext();
|
|
1328
|
+
var styles8 = styles_default6(data.first, data.second);
|
|
1329
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", {
|
|
1330
|
+
style: _object_spread_props(_object_spread({}, styles8.container), {
|
|
1331
|
+
overflow: data.isLoading ? "hidden" : ""
|
|
1332
|
+
}),
|
|
1333
|
+
children: [
|
|
1334
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("button", _object_spread_props(_object_spread({
|
|
1335
|
+
style: styles8.btn
|
|
1336
|
+
}, data.props), {
|
|
1337
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", {
|
|
1338
|
+
style: {
|
|
1339
|
+
position: "relative"
|
|
1340
|
+
},
|
|
1341
|
+
children: [
|
|
1342
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", {
|
|
1343
|
+
style: styles8.labelBefore
|
|
1344
|
+
}),
|
|
1345
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", {
|
|
1346
|
+
style: _object_spread_props(_object_spread({}, styles8.label), {
|
|
1347
|
+
backgroundColor: data.main
|
|
1348
|
+
}),
|
|
1349
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", {
|
|
1350
|
+
style: _object_spread_props(_object_spread({}, styles8.p), {
|
|
1351
|
+
color: "".concat(data.text)
|
|
1352
|
+
}),
|
|
1353
|
+
children: data.content
|
|
1354
|
+
})
|
|
1355
|
+
}),
|
|
1356
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", {
|
|
1357
|
+
style: styles8.labelAfter
|
|
1358
|
+
})
|
|
1359
|
+
]
|
|
1360
|
+
})
|
|
1361
|
+
})),
|
|
1362
|
+
!data.isLoading && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", {
|
|
1363
|
+
style: styles8.btnAfter
|
|
1364
|
+
}),
|
|
1365
|
+
data.isLoading && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_framer_motion.motion.div, {
|
|
1366
|
+
style: styles8.btnAfter,
|
|
1367
|
+
animate: {
|
|
1368
|
+
rotate: 360
|
|
1369
|
+
},
|
|
1370
|
+
transition: {
|
|
1371
|
+
ease: "linear",
|
|
1372
|
+
repeat: Infinity,
|
|
1373
|
+
duration: 3
|
|
1374
|
+
}
|
|
1375
|
+
})
|
|
1376
|
+
]
|
|
1377
|
+
});
|
|
1378
|
+
};
|
|
1379
|
+
var Gradient_default = Gradient;
|
|
1380
|
+
// src/components/Buttons/solid/styles.ts
|
|
1381
|
+
var styles7 = function(first) {
|
|
1382
|
+
var styles8 = {
|
|
1383
|
+
"btn": {
|
|
1384
|
+
cursor: "pointer",
|
|
1385
|
+
position: "relative",
|
|
1386
|
+
zIndex: 0,
|
|
1387
|
+
display: "flex",
|
|
1388
|
+
justifyContent: "center",
|
|
1389
|
+
alignItems: "center",
|
|
1390
|
+
padding: "2px",
|
|
1391
|
+
borderRadius: "0.75rem",
|
|
1392
|
+
backgroundColor: first,
|
|
1393
|
+
border: "none"
|
|
1394
|
+
},
|
|
1395
|
+
"btnAfter": {
|
|
1396
|
+
position: "absolute",
|
|
1397
|
+
top: 0,
|
|
1398
|
+
left: 0,
|
|
1399
|
+
width: "100%",
|
|
1400
|
+
height: "100%",
|
|
1401
|
+
zIndex: -1,
|
|
1402
|
+
backgroundColor: first,
|
|
1403
|
+
filter: "blur(10px)"
|
|
1404
|
+
},
|
|
1405
|
+
"label": {
|
|
1406
|
+
borderRadius: "0.75rem",
|
|
1407
|
+
padding: "0.5rem 2rem",
|
|
1408
|
+
color: "white"
|
|
1409
|
+
},
|
|
1410
|
+
"labelBefore": {
|
|
1411
|
+
position: "absolute",
|
|
1412
|
+
top: "20%",
|
|
1413
|
+
right: "50%",
|
|
1414
|
+
width: "50%",
|
|
1415
|
+
height: "50%",
|
|
1416
|
+
content: '""',
|
|
1417
|
+
// See note below
|
|
1418
|
+
zIndex: 0,
|
|
1419
|
+
backgroundColor: first,
|
|
1420
|
+
filter: "blur(15px)"
|
|
1421
|
+
},
|
|
1422
|
+
"labelAfter": {
|
|
1423
|
+
position: "absolute",
|
|
1424
|
+
top: "20%",
|
|
1425
|
+
left: "50%",
|
|
1426
|
+
width: "50%",
|
|
1427
|
+
height: "50%",
|
|
1428
|
+
content: '""',
|
|
1429
|
+
// See note below
|
|
1430
|
+
zIndex: 0,
|
|
1431
|
+
filter: "blur(20px)"
|
|
1432
|
+
},
|
|
1433
|
+
"p": {
|
|
1434
|
+
zIndex: 1,
|
|
1435
|
+
position: "relative",
|
|
1436
|
+
margin: 0
|
|
1437
|
+
}
|
|
1438
|
+
};
|
|
1439
|
+
return styles8;
|
|
1440
|
+
};
|
|
1441
|
+
var styles_default7 = styles7;
|
|
1442
|
+
// src/components/Buttons/solid/Solid.tsx
|
|
1443
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
1444
|
+
var Solid = function() {
|
|
1445
|
+
var data = useButtonContext();
|
|
1446
|
+
var styles8 = styles_default7(data.first);
|
|
1447
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", {
|
|
1448
|
+
style: {
|
|
1449
|
+
position: "relative"
|
|
1450
|
+
},
|
|
1451
|
+
children: [
|
|
1452
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("button", _object_spread_props(_object_spread({
|
|
1453
|
+
style: styles8.btn
|
|
1454
|
+
}, data.props), {
|
|
1455
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", {
|
|
1456
|
+
style: {
|
|
1457
|
+
position: "relative"
|
|
1458
|
+
},
|
|
1459
|
+
children: [
|
|
1460
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", {
|
|
1461
|
+
style: styles8.labelBefore
|
|
1462
|
+
}),
|
|
1463
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", {
|
|
1464
|
+
style: _object_spread_props(_object_spread({}, styles8.label), {
|
|
1465
|
+
backgroundColor: data.main
|
|
1466
|
+
}),
|
|
1467
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", {
|
|
1468
|
+
style: _object_spread_props(_object_spread({}, styles8.p), {
|
|
1469
|
+
color: "".concat(data.text)
|
|
1470
|
+
}),
|
|
1471
|
+
children: data.content
|
|
1472
|
+
})
|
|
1473
|
+
}),
|
|
1474
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", {
|
|
1475
|
+
style: styles8.labelAfter
|
|
1476
|
+
})
|
|
1477
|
+
]
|
|
1478
|
+
})
|
|
1479
|
+
})),
|
|
1480
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", {
|
|
1481
|
+
style: styles8.btnAfter
|
|
1482
|
+
})
|
|
1483
|
+
]
|
|
1484
|
+
});
|
|
1485
|
+
};
|
|
1486
|
+
var Solid_default = Solid;
|
|
1487
|
+
// src/components/Buttons/Button.tsx
|
|
1488
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
1489
|
+
var ButtonContext = (0, import_react9.createContext)(void 0);
|
|
1490
|
+
function useButtonContext() {
|
|
1491
|
+
var data = (0, import_react9.useContext)(ButtonContext);
|
|
1492
|
+
if (data === void 0) {
|
|
1493
|
+
throw new Error("Select Context is undefined");
|
|
1494
|
+
}
|
|
1495
|
+
return data;
|
|
1496
|
+
}
|
|
1497
|
+
var Button = function(_param) {
|
|
1498
|
+
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, [
|
|
1499
|
+
"buttonType",
|
|
1500
|
+
"content",
|
|
1501
|
+
"main",
|
|
1502
|
+
"first",
|
|
1503
|
+
"second",
|
|
1504
|
+
"text",
|
|
1505
|
+
"isLoading"
|
|
1506
|
+
]);
|
|
1507
|
+
switch(buttonType){
|
|
1508
|
+
case "gradient":
|
|
1509
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ButtonContext.Provider, {
|
|
1510
|
+
value: {
|
|
1511
|
+
content: content,
|
|
1512
|
+
main: main,
|
|
1513
|
+
first: first,
|
|
1514
|
+
second: second,
|
|
1515
|
+
text: text,
|
|
1516
|
+
props: props,
|
|
1517
|
+
isLoading: isLoading
|
|
1518
|
+
},
|
|
1519
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Gradient_default, {})
|
|
1520
|
+
});
|
|
1521
|
+
case "solid":
|
|
1522
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ButtonContext.Provider, {
|
|
1523
|
+
value: {
|
|
1524
|
+
content: content,
|
|
1525
|
+
main: main,
|
|
1526
|
+
first: first,
|
|
1527
|
+
text: text,
|
|
1528
|
+
props: props,
|
|
1529
|
+
isLoading: isLoading
|
|
1530
|
+
},
|
|
1531
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Solid_default, {})
|
|
1532
|
+
});
|
|
1533
|
+
default:
|
|
1534
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("button", _object_spread_props(_object_spread({}, props), {
|
|
1535
|
+
children: content
|
|
1536
|
+
}));
|
|
1537
|
+
}
|
|
1538
|
+
};
|
|
1539
|
+
var Button_default = Button;
|
|
1209
1540
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1210
1541
|
0 && (module.exports = {
|
|
1542
|
+
Button: Button,
|
|
1211
1543
|
ColorPickerSlider: ColorPickerSlider,
|
|
1212
1544
|
DropdownSelect: DropdownSelect,
|
|
1213
1545
|
MultiSelect: MultiSelect,
|
package/dist/index.mjs
CHANGED
|
@@ -95,6 +95,33 @@ function _object_spread_props(target, source) {
|
|
|
95
95
|
}
|
|
96
96
|
return target;
|
|
97
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
|
+
}
|
|
98
125
|
function _sliced_to_array(arr, i) {
|
|
99
126
|
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
|
100
127
|
}
|
|
@@ -950,7 +977,7 @@ var Search2 = function(param) {
|
|
|
950
977
|
return /* @__PURE__ */ jsx7("div", {
|
|
951
978
|
style: styles_default5.search_border,
|
|
952
979
|
children: /* @__PURE__ */ jsx7("input", {
|
|
953
|
-
placeholder: "Search",
|
|
980
|
+
placeholder: "Search...",
|
|
954
981
|
style: styles_default5.search,
|
|
955
982
|
id: "search",
|
|
956
983
|
name: "search",
|
|
@@ -1135,4 +1162,305 @@ var MultiSelect = function(param) {
|
|
|
1135
1162
|
});
|
|
1136
1163
|
};
|
|
1137
1164
|
var MultiSelect_default = MultiSelect;
|
|
1138
|
-
|
|
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 };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@willphan1712000/frontend",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "Frontend Library",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -9,10 +9,8 @@
|
|
|
9
9
|
"dev": "tsup --watch",
|
|
10
10
|
"build": "tsup"
|
|
11
11
|
},
|
|
12
|
-
"peerDependencies": {
|
|
13
|
-
"react": ">=18.0.0"
|
|
14
|
-
},
|
|
15
12
|
"devDependencies": {
|
|
13
|
+
"@babel/preset-typescript": "^7.28.5",
|
|
16
14
|
"@swc/core": "^1.13.5",
|
|
17
15
|
"@testing-library/jest-dom": "^6.9.0",
|
|
18
16
|
"@testing-library/react": "^16.3.0",
|
|
@@ -22,14 +20,13 @@
|
|
|
22
20
|
"@types/react-dom": "^19.1.9",
|
|
23
21
|
"esbuild-plugin-css-module": "^0.1.0",
|
|
24
22
|
"esbuild-plugin-react18-css": "^0.0.4",
|
|
25
|
-
"react": "^19.1.1",
|
|
26
|
-
"react-dom": "^19.1.1",
|
|
27
23
|
"ts-loader": "^9.5.4",
|
|
28
24
|
"tsup": "^8.5.0",
|
|
29
25
|
"typescript": "^5.9.3",
|
|
30
26
|
"web-vitals": "^5.1.0"
|
|
31
27
|
},
|
|
32
28
|
"dependencies": {
|
|
29
|
+
"framer-motion": "^12.23.24",
|
|
33
30
|
"react-icons": "^5.5.0"
|
|
34
31
|
}
|
|
35
32
|
}
|
package/.babelrc
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"presets": [
|
|
3
|
-
"@babel/preset-env",
|
|
4
|
-
[
|
|
5
|
-
"@babel/preset-react",
|
|
6
|
-
{
|
|
7
|
-
"runtime": "automatic"
|
|
8
|
-
}
|
|
9
|
-
],
|
|
10
|
-
"@babel/preset-typescript"
|
|
11
|
-
],
|
|
12
|
-
"plugins": [
|
|
13
|
-
[
|
|
14
|
-
"@babel/plugin-transform-runtime",
|
|
15
|
-
{
|
|
16
|
-
"regenerator": true
|
|
17
|
-
}
|
|
18
|
-
]
|
|
19
|
-
]
|
|
20
|
-
}
|
package/index.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
// DropSelect component
|
|
2
|
-
export { default as DropdownSelect } from './src/components/DropdownSelect/DropdownSelect';
|
|
3
|
-
export type { Options } from './src/components/DropdownSelect/DropdownSelect';
|
|
4
|
-
|
|
5
|
-
// RangeSlider component
|
|
6
|
-
export { default as RangeSlider } from './src/components/RangeSlider/RangeSlider';
|
|
7
|
-
|
|
8
|
-
// OptionSlider component
|
|
9
|
-
export { default as OptionSlider } from './src/components/OptionSlider/OptionSlider';
|
|
10
|
-
export type { Options as SliderOptions } from './src/components/OptionSlider/OptionSlider';
|
|
11
|
-
|
|
12
|
-
// ColorPickerSlider
|
|
13
|
-
export { default as ColorPickerSlider } from './src/components/ColorPickerSlider/ColorPickerSlider';
|
|
14
|
-
|
|
15
|
-
// MultiSelect
|
|
16
|
-
export { default as MultiSelect } from './src/components/MultiSelect/MultiSelect';
|
package/public/favicon.ico
DELETED
|
Binary file
|
package/public/index.html
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8" />
|
|
5
|
-
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
|
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
7
|
-
<meta name="theme-color" content="#000000" />
|
|
8
|
-
<meta
|
|
9
|
-
name="description"
|
|
10
|
-
content="Web site created using create-react-app"
|
|
11
|
-
/>
|
|
12
|
-
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
|
|
13
|
-
<!--
|
|
14
|
-
manifest.json provides metadata used when your web app is installed on a
|
|
15
|
-
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
|
|
16
|
-
-->
|
|
17
|
-
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
|
|
18
|
-
<!--
|
|
19
|
-
Notice the use of %PUBLIC_URL% in the tags above.
|
|
20
|
-
It will be replaced with the URL of the `public` folder during the build.
|
|
21
|
-
Only files inside the `public` folder can be referenced from the HTML.
|
|
22
|
-
|
|
23
|
-
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
|
|
24
|
-
work correctly both with client-side routing and a non-root public URL.
|
|
25
|
-
Learn how to configure a non-root public URL by running `npm run build`.
|
|
26
|
-
-->
|
|
27
|
-
<title>React App</title>
|
|
28
|
-
</head>
|
|
29
|
-
<body>
|
|
30
|
-
<noscript>You need to enable JavaScript to run this app.</noscript>
|
|
31
|
-
<div id="root"></div>
|
|
32
|
-
<!--
|
|
33
|
-
This HTML file is a template.
|
|
34
|
-
If you open it directly in the browser, you will see an empty page.
|
|
35
|
-
|
|
36
|
-
You can add webfonts, meta tags, or analytics to this file.
|
|
37
|
-
The build step will place the bundled scripts into the <body> tag.
|
|
38
|
-
|
|
39
|
-
To begin the development, run `npm start` or `yarn start`.
|
|
40
|
-
To create a production bundle, use `npm run build` or `yarn build`.
|
|
41
|
-
-->
|
|
42
|
-
</body>
|
|
43
|
-
</html>
|
package/public/logo192.png
DELETED
|
Binary file
|
package/public/logo512.png
DELETED
|
Binary file
|
package/public/manifest.json
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"short_name": "React App",
|
|
3
|
-
"name": "Create React App Sample",
|
|
4
|
-
"icons": [
|
|
5
|
-
{
|
|
6
|
-
"src": "favicon.ico",
|
|
7
|
-
"sizes": "64x64 32x32 24x24 16x16",
|
|
8
|
-
"type": "image/x-icon"
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
"src": "logo192.png",
|
|
12
|
-
"type": "image/png",
|
|
13
|
-
"sizes": "192x192"
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
"src": "logo512.png",
|
|
17
|
-
"type": "image/png",
|
|
18
|
-
"sizes": "512x512"
|
|
19
|
-
}
|
|
20
|
-
],
|
|
21
|
-
"start_url": ".",
|
|
22
|
-
"display": "standalone",
|
|
23
|
-
"theme_color": "#000000",
|
|
24
|
-
"background_color": "#ffffff"
|
|
25
|
-
}
|
package/public/robots.txt
DELETED