@ayseaistudio/ui-components 1.0.2 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Activity/Activity.d.ts +15 -0
- package/dist/Activity/Activity.js +10 -0
- package/dist/Activity/index.d.ts +1 -0
- package/dist/Activity/index.js +1 -0
- package/dist/Activity/style.css +84 -0
- package/dist/Avatar/Avatar.d.ts +21 -0
- package/dist/Avatar/Avatar.js +23 -0
- package/dist/Avatar/index.d.ts +1 -0
- package/dist/Avatar/index.js +1 -0
- package/dist/Avatar/style.css +324 -0
- package/dist/Dot/Dot.d.ts +15 -0
- package/dist/Dot/Dot.js +10 -0
- package/dist/Dot/index.d.ts +1 -0
- package/dist/Dot/index.js +1 -0
- package/dist/Dot/style.css +24 -0
- package/dist/InputField/InputField.d.ts +56 -0
- package/dist/InputField/InputField.js +81 -0
- package/dist/InputField/index.d.ts +1 -0
- package/dist/InputField/index.js +1 -0
- package/dist/InputField/style.css +239 -0
- package/dist/Label/style.css +2 -0
- package/dist/Loader/Loader.d.ts +8 -0
- package/dist/Loader/Loader.js +8 -0
- package/dist/Loader/index.d.ts +1 -0
- package/dist/Loader/index.js +1 -0
- package/dist/Loader/style.css +21 -0
- package/dist/LoginInput/LoginInput.d.ts +33 -0
- package/dist/LoginInput/LoginInput.js +97 -0
- package/dist/LoginInput/index.d.ts +1 -0
- package/dist/LoginInput/index.js +1 -0
- package/dist/LoginInput/style.css +109 -0
- package/dist/Page/Page.d.ts +20 -0
- package/dist/Page/Page.js +16 -0
- package/dist/Page/index.d.ts +1 -0
- package/dist/Page/index.js +1 -0
- package/dist/Page/style.css +65 -0
- package/dist/PlatformSelector/PlatformSelector.d.ts +16 -0
- package/dist/PlatformSelector/PlatformSelector.js +11 -0
- package/dist/PlatformSelector/index.d.ts +1 -0
- package/dist/PlatformSelector/index.js +1 -0
- package/dist/PlatformSelector/style.css +61 -0
- package/dist/PlatformsButton/PlatformsButton.d.ts +20 -0
- package/dist/PlatformsButton/PlatformsButton.js +35 -0
- package/dist/PlatformsButton/index.d.ts +1 -0
- package/dist/PlatformsButton/index.js +1 -0
- package/dist/PlatformsButton/style.css +88 -0
- package/dist/SingleSlider/SingleSlider.d.ts +23 -0
- package/dist/SingleSlider/SingleSlider.js +17 -0
- package/dist/SingleSlider/index.d.ts +1 -0
- package/dist/SingleSlider/index.js +1 -0
- package/dist/SingleSlider/style.css +54 -0
- package/dist/Tags/Tags.d.ts +25 -0
- package/dist/Tags/Tags.js +47 -0
- package/dist/Tags/index.d.ts +1 -0
- package/dist/Tags/index.js +1 -0
- package/dist/Tags/style.css +173 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +11 -0
- package/package.json +2 -1
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import PropTypes from "prop-types";
|
|
2
|
+
import "./style.css";
|
|
3
|
+
interface Props {
|
|
4
|
+
size?: "large" | "x-small" | "medium" | "small";
|
|
5
|
+
color?: "black" | "red" | "green" | "galliano";
|
|
6
|
+
className?: any;
|
|
7
|
+
}
|
|
8
|
+
export declare const Activity: {
|
|
9
|
+
({ size, color, className }: Props): React.JSX.Element;
|
|
10
|
+
propTypes: {
|
|
11
|
+
size: PropTypes.Requireable<string>;
|
|
12
|
+
color: PropTypes.Requireable<string>;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
|
+
import "./style.css";
|
|
4
|
+
export const Activity = ({ size, color, className }) => {
|
|
5
|
+
return (_jsx("div", { className: `activity ${color} ${size} ${className}`, children: _jsx("div", { className: "ellipse" }) }));
|
|
6
|
+
};
|
|
7
|
+
Activity.propTypes = {
|
|
8
|
+
size: PropTypes.oneOf(["large", "x-small", "medium", "small"]),
|
|
9
|
+
color: PropTypes.oneOf(["black", "red", "green", "galliano"]),
|
|
10
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Activity } from "./Activity";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Activity } from "./Activity";
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
.activity {
|
|
2
|
+
align-items: center;
|
|
3
|
+
border-radius: 37.5px;
|
|
4
|
+
display: inline-flex;
|
|
5
|
+
justify-content: center;
|
|
6
|
+
position: relative;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.activity .ellipse {
|
|
10
|
+
box-shadow: inset 0px 0px 10px #ffffff40;
|
|
11
|
+
position: relative;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.activity.galliano {
|
|
15
|
+
background-color: #b9891533;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.activity.large {
|
|
19
|
+
padding: 8px;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.activity.small {
|
|
23
|
+
padding: 4px;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.activity.black {
|
|
27
|
+
background-color: #24242433;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.activity.medium {
|
|
31
|
+
padding: 6px;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.activity.red {
|
|
35
|
+
background-color: #ed151533;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.activity.x-small {
|
|
39
|
+
padding: 4px;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.activity.green {
|
|
43
|
+
background-color: #28914033;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.activity.galliano .ellipse {
|
|
47
|
+
background-color: #d7af1b;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.activity.large .ellipse {
|
|
51
|
+
border-radius: 14px;
|
|
52
|
+
height: 28px;
|
|
53
|
+
width: 28px;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.activity.small .ellipse {
|
|
57
|
+
border-radius: 8px;
|
|
58
|
+
height: 16px;
|
|
59
|
+
width: 16px;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.activity.black .ellipse {
|
|
63
|
+
background-color: #454545;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.activity.medium .ellipse {
|
|
67
|
+
border-radius: 10px;
|
|
68
|
+
height: 20px;
|
|
69
|
+
width: 20px;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.activity.red .ellipse {
|
|
73
|
+
background-color: #ff3737;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.activity.x-small .ellipse {
|
|
77
|
+
border-radius: 3px;
|
|
78
|
+
height: 6px;
|
|
79
|
+
width: 6px;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.activity.green .ellipse {
|
|
83
|
+
background-color: #36b151;
|
|
84
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import PropTypes from "prop-types";
|
|
2
|
+
import "./style.css";
|
|
3
|
+
interface Props {
|
|
4
|
+
letter?: string;
|
|
5
|
+
size?: "large" | "x-small" | "medium" | "small";
|
|
6
|
+
color?: "mauve" | "lime" | "zest" | "grey" | "blue" | "green" | "galliano" | "orange" | "red";
|
|
7
|
+
status?: "active" | "default";
|
|
8
|
+
version?: "half" | "default";
|
|
9
|
+
className?: any;
|
|
10
|
+
}
|
|
11
|
+
export declare const Avatar: {
|
|
12
|
+
({ letter, size, color, status, version, className, }: Props): React.JSX.Element;
|
|
13
|
+
propTypes: {
|
|
14
|
+
letter: PropTypes.Requireable<string>;
|
|
15
|
+
size: PropTypes.Requireable<string>;
|
|
16
|
+
color: PropTypes.Requireable<string>;
|
|
17
|
+
status: PropTypes.Requireable<string>;
|
|
18
|
+
version: PropTypes.Requireable<string>;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
|
+
import "./style.css";
|
|
4
|
+
export const Avatar = ({ letter = "AB", size, color, status, version, className, }) => {
|
|
5
|
+
return (_jsxs("div", { className: `avatar ${size} ${status} ${version} ${color} ${className}`, children: [version === "half" && _jsx("div", { className: "rectangle" }), _jsx("div", { className: "AB", children: letter })] }));
|
|
6
|
+
};
|
|
7
|
+
Avatar.propTypes = {
|
|
8
|
+
letter: PropTypes.string,
|
|
9
|
+
size: PropTypes.oneOf(["large", "x-small", "medium", "small"]),
|
|
10
|
+
color: PropTypes.oneOf([
|
|
11
|
+
"mauve",
|
|
12
|
+
"lime",
|
|
13
|
+
"zest",
|
|
14
|
+
"grey",
|
|
15
|
+
"blue",
|
|
16
|
+
"green",
|
|
17
|
+
"galliano",
|
|
18
|
+
"orange",
|
|
19
|
+
"red",
|
|
20
|
+
]),
|
|
21
|
+
status: PropTypes.oneOf(["active", "default"]),
|
|
22
|
+
version: PropTypes.oneOf(["half", "default"]),
|
|
23
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Avatar } from "./Avatar";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Avatar } from "./Avatar";
|
|
@@ -0,0 +1,324 @@
|
|
|
1
|
+
.avatar {
|
|
2
|
+
align-items: center;
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
justify-content: center;
|
|
6
|
+
position: relative;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.avatar .rectangle {
|
|
10
|
+
position: absolute;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.avatar .AB {
|
|
14
|
+
align-items: center;
|
|
15
|
+
color: #242424b2;
|
|
16
|
+
display: flex;
|
|
17
|
+
justify-content: center;
|
|
18
|
+
position: relative;
|
|
19
|
+
text-align: center;
|
|
20
|
+
white-space: nowrap;
|
|
21
|
+
width: fit-content;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.avatar.large {
|
|
25
|
+
border-radius: 12px;
|
|
26
|
+
height: 56px;
|
|
27
|
+
width: 56px;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.avatar.small {
|
|
31
|
+
border-radius: 8px;
|
|
32
|
+
height: 28px;
|
|
33
|
+
width: 28px;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.avatar.medium {
|
|
37
|
+
border-radius: 8px;
|
|
38
|
+
height: 36px;
|
|
39
|
+
width: 36px;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.avatar.active {
|
|
43
|
+
border: 1px solid;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.avatar.half {
|
|
47
|
+
-webkit-backdrop-filter: blur(5px) brightness(100%);
|
|
48
|
+
backdrop-filter: blur(5px) brightness(100%);
|
|
49
|
+
background-color: #f8f8f84c;
|
|
50
|
+
overflow: hidden;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.avatar.x-small {
|
|
54
|
+
border-radius: 6px;
|
|
55
|
+
height: 24px;
|
|
56
|
+
width: 24px;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.avatar.default {
|
|
60
|
+
box-shadow: inset 0px 0px 10px #ffffff40;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.avatar.blue.default {
|
|
64
|
+
background-color: #dbd7fd;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.avatar.blue.active {
|
|
68
|
+
border-color: #7240e74c;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.avatar.green.default {
|
|
72
|
+
background-color: #c3efcc;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.avatar.lime.default {
|
|
76
|
+
background-color: #caf264;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.avatar.galliano.default {
|
|
80
|
+
background-color: #f4eb94;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.avatar.galliano.active {
|
|
84
|
+
border-color: #b989154c;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.avatar.mauve.default {
|
|
88
|
+
background-color: #eed4ff;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.avatar.grey.default {
|
|
92
|
+
background-color: #d1d1d1;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.avatar.red.default {
|
|
96
|
+
background-color: #ffc5c5;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.avatar.active.green {
|
|
100
|
+
border-color: #2891404c;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.avatar.zest.active {
|
|
104
|
+
border-color: #cd65124c;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.avatar.lime.active {
|
|
108
|
+
border-color: #71a30d4c;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.avatar.zest.default {
|
|
112
|
+
background-color: #f6d991;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.avatar.orange.default {
|
|
116
|
+
background-color: #fccdac;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.avatar.active.orange {
|
|
120
|
+
border-color: #e440124c;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.avatar.grey.active {
|
|
124
|
+
border-color: #24242433;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.avatar.red.active {
|
|
128
|
+
border-color: #ed15154c;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.avatar.mauve.active {
|
|
132
|
+
border-color: #a931ec4c;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.avatar.galliano .rectangle {
|
|
136
|
+
background-color: #f4eb94;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.avatar.large .rectangle {
|
|
140
|
+
left: 0;
|
|
141
|
+
width: 28px;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.avatar.small .rectangle {
|
|
145
|
+
width: 14px;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.avatar.blue .rectangle {
|
|
149
|
+
background-color: #dbd7fd;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.avatar.lime .rectangle {
|
|
153
|
+
background-color: #caf264;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.avatar.zest .rectangle {
|
|
157
|
+
background-color: #f6d991;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.avatar.orange .rectangle {
|
|
161
|
+
background-color: #fccdac;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.avatar.medium .rectangle {
|
|
165
|
+
height: 100%;
|
|
166
|
+
left: 0;
|
|
167
|
+
top: 0;
|
|
168
|
+
width: 18px;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.avatar.grey .rectangle {
|
|
172
|
+
background-color: #d1d1d1;
|
|
173
|
+
left: 0;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.avatar.red .rectangle {
|
|
177
|
+
background-color: #ffc5c5;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.avatar.x-small .rectangle {
|
|
181
|
+
height: 24px;
|
|
182
|
+
left: 0;
|
|
183
|
+
top: calc(50.00% - 12px);
|
|
184
|
+
width: 12px;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.avatar.green .rectangle {
|
|
188
|
+
background-color: #c3efcc;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.avatar.mauve .rectangle {
|
|
192
|
+
background-color: #eed4ff;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.avatar.galliano.small .rectangle {
|
|
196
|
+
height: 100%;
|
|
197
|
+
left: 1px;
|
|
198
|
+
top: 0;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.avatar.mauve.large .rectangle {
|
|
202
|
+
height: 100%;
|
|
203
|
+
top: 0;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.avatar.small.blue .rectangle {
|
|
207
|
+
height: 100%;
|
|
208
|
+
left: 1px;
|
|
209
|
+
top: 0;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.avatar.red.large .rectangle {
|
|
213
|
+
height: 100%;
|
|
214
|
+
top: 0;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.avatar.galliano.large .rectangle {
|
|
218
|
+
height: 100%;
|
|
219
|
+
top: 0;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.avatar.blue.large .rectangle {
|
|
223
|
+
height: 100%;
|
|
224
|
+
top: 0;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.avatar.grey.small .rectangle {
|
|
228
|
+
height: 28px;
|
|
229
|
+
top: calc(50.00% - 14px);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.avatar.lime.small .rectangle {
|
|
233
|
+
height: 100%;
|
|
234
|
+
left: 1px;
|
|
235
|
+
top: 0;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.avatar.zest.large .rectangle {
|
|
239
|
+
height: 100%;
|
|
240
|
+
top: 0;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
.avatar.small.green .rectangle {
|
|
244
|
+
height: 100%;
|
|
245
|
+
left: 1px;
|
|
246
|
+
top: 0;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
.avatar.small.orange .rectangle {
|
|
250
|
+
height: 100%;
|
|
251
|
+
left: 1px;
|
|
252
|
+
top: 0;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
.avatar.small.mauve .rectangle {
|
|
256
|
+
height: 100%;
|
|
257
|
+
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
.avatar.red.small .rectangle {
|
|
261
|
+
height: 100%;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
.avatar.lime.large .rectangle {
|
|
265
|
+
height: 100%;
|
|
266
|
+
top: 0;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
.avatar.zest.small .rectangle {
|
|
270
|
+
height: 100%;
|
|
271
|
+
left: 1px;
|
|
272
|
+
top: 0;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
.avatar.large.green .rectangle {
|
|
276
|
+
height: 100%;
|
|
277
|
+
top: 0;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
.avatar.large.orange .rectangle {
|
|
281
|
+
height: 100%;
|
|
282
|
+
top: 0;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
.avatar.grey.large .rectangle {
|
|
286
|
+
height: 56px;
|
|
287
|
+
top: calc(50.00% - 28px);
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
.avatar.x-small .AB {
|
|
291
|
+
font-family: var(--b3-bold-font-family);
|
|
292
|
+
font-size: var(--b3-bold-font-size);
|
|
293
|
+
font-style: var(--b3-bold-font-style);
|
|
294
|
+
font-weight: var(--b3-bold-font-weight);
|
|
295
|
+
letter-spacing: var(--b3-bold-letter-spacing);
|
|
296
|
+
line-height: var(--b3-bold-line-height);
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
.avatar.large .AB {
|
|
300
|
+
font-family: var(--h4-black-font-family);
|
|
301
|
+
font-size: var(--h4-black-font-size);
|
|
302
|
+
font-style: var(--h4-black-font-style);
|
|
303
|
+
font-weight: var(--h4-black-font-weight);
|
|
304
|
+
letter-spacing: var(--h4-black-letter-spacing);
|
|
305
|
+
line-height: var(--h4-black-line-height);
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
.avatar.medium .AB {
|
|
309
|
+
font-family: var(--b1-black-font-family);
|
|
310
|
+
font-size: var(--b1-black-font-size);
|
|
311
|
+
font-style: var(--b1-black-font-style);
|
|
312
|
+
font-weight: var(--b1-black-font-weight);
|
|
313
|
+
letter-spacing: var(--b1-black-letter-spacing);
|
|
314
|
+
line-height: var(--b1-black-line-height);
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
.avatar.small .AB {
|
|
318
|
+
font-family: var(--b2-black-font-family);
|
|
319
|
+
font-size: var(--b2-black-font-size);
|
|
320
|
+
font-style: var(--b2-black-font-style);
|
|
321
|
+
font-weight: var(--b2-black-font-weight);
|
|
322
|
+
letter-spacing: var(--b2-black-letter-spacing);
|
|
323
|
+
line-height: var(--b2-black-line-height);
|
|
324
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import PropTypes from "prop-types";
|
|
2
|
+
import "./style.css";
|
|
3
|
+
interface Props {
|
|
4
|
+
size?: "large" | "small";
|
|
5
|
+
stroke?: "ON" | "OFF";
|
|
6
|
+
className?: any;
|
|
7
|
+
}
|
|
8
|
+
export declare const Dot: {
|
|
9
|
+
({ size, stroke, className }: Props): React.JSX.Element;
|
|
10
|
+
propTypes: {
|
|
11
|
+
size: PropTypes.Requireable<string>;
|
|
12
|
+
stroke: PropTypes.Requireable<string>;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export {};
|
package/dist/Dot/Dot.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
|
+
import "./style.css";
|
|
4
|
+
export const Dot = ({ size, stroke, className }) => {
|
|
5
|
+
return _jsx("div", { className: `dot ${stroke} ${size} ${className}` });
|
|
6
|
+
};
|
|
7
|
+
Dot.propTypes = {
|
|
8
|
+
size: PropTypes.oneOf(["large", "small"]),
|
|
9
|
+
stroke: PropTypes.oneOf(["ON", "OFF"]),
|
|
10
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Dot } from "./Dot";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Dot } from "./Dot";
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
.dot {
|
|
2
|
+
position: relative;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.dot.OFF {
|
|
6
|
+
background-color: #d1d1d1;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.dot.large {
|
|
10
|
+
border-radius: 3px;
|
|
11
|
+
height: 6px;
|
|
12
|
+
width: 6px;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.dot.ON {
|
|
16
|
+
border: 1px solid;
|
|
17
|
+
border-color: #24242433;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.dot.small {
|
|
21
|
+
border-radius: 2px;
|
|
22
|
+
height: 4px;
|
|
23
|
+
width: 4px;
|
|
24
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import PropTypes from "prop-types";
|
|
2
|
+
import React, { ChangeEvent } from "react";
|
|
3
|
+
import "./style.css";
|
|
4
|
+
interface Props {
|
|
5
|
+
withAlertIcon?: boolean;
|
|
6
|
+
withAlertMessage?: boolean;
|
|
7
|
+
defaultValue?: string;
|
|
8
|
+
alertText?: string;
|
|
9
|
+
rightIcon?: React.JSX.Element;
|
|
10
|
+
leftIcon?: React.JSX.Element;
|
|
11
|
+
clearable?: boolean;
|
|
12
|
+
text?: string;
|
|
13
|
+
headerText?: string;
|
|
14
|
+
withHeader?: boolean;
|
|
15
|
+
size?: "large" | "with-password-eye" | "medium" | "small" | "with-button";
|
|
16
|
+
status?: "active" | "default" | "hover" | "alert" | "disabled";
|
|
17
|
+
radius?: "small" | "ninety-six-px" | "eight-px";
|
|
18
|
+
className?: string;
|
|
19
|
+
frameClassName?: string;
|
|
20
|
+
isPassword?: boolean;
|
|
21
|
+
value?: string;
|
|
22
|
+
onChange?: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
23
|
+
onClear?: () => void;
|
|
24
|
+
onFocus?: (e: React.FocusEvent<HTMLInputElement>) => void;
|
|
25
|
+
onBlur?: (e: React.FocusEvent<HTMLInputElement>) => void;
|
|
26
|
+
onKeyDown?: (e: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
27
|
+
}
|
|
28
|
+
export declare const InputField: {
|
|
29
|
+
({ withAlertIcon, withAlertMessage, leftIcon, rightIcon, defaultValue, alertText, clearable, text, headerText, withHeader, size, status, radius, className, frameClassName, isPassword, value, onChange, onClear, onFocus, onBlur, onKeyDown, }: Props): React.JSX.Element;
|
|
30
|
+
propTypes: {
|
|
31
|
+
withAlertIcon: PropTypes.Requireable<boolean>;
|
|
32
|
+
withAlertMessage: PropTypes.Requireable<boolean>;
|
|
33
|
+
defaultValue: PropTypes.Requireable<string>;
|
|
34
|
+
withLeftIcon: PropTypes.Requireable<boolean>;
|
|
35
|
+
alertText: PropTypes.Requireable<string>;
|
|
36
|
+
withRightIcon: PropTypes.Requireable<boolean>;
|
|
37
|
+
text: PropTypes.Requireable<string>;
|
|
38
|
+
headerText: PropTypes.Requireable<string>;
|
|
39
|
+
withHeader: PropTypes.Requireable<boolean>;
|
|
40
|
+
size: PropTypes.Requireable<string>;
|
|
41
|
+
status: PropTypes.Requireable<string>;
|
|
42
|
+
radius: PropTypes.Requireable<string>;
|
|
43
|
+
className: PropTypes.Requireable<string>;
|
|
44
|
+
frameClassName: PropTypes.Requireable<string>;
|
|
45
|
+
isPassword: PropTypes.Requireable<boolean>;
|
|
46
|
+
value: PropTypes.Requireable<string>;
|
|
47
|
+
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
48
|
+
icon: PropTypes.Requireable<PropTypes.ReactElementLike>;
|
|
49
|
+
onFocus: PropTypes.Requireable<(...args: any[]) => any>;
|
|
50
|
+
onBlur: PropTypes.Requireable<(...args: any[]) => any>;
|
|
51
|
+
onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
|
|
52
|
+
clearable: PropTypes.Requireable<boolean>;
|
|
53
|
+
onClear: PropTypes.Requireable<(...args: any[]) => any>;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
export {};
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import PropTypes from "prop-types";
|
|
3
|
+
import React, { useReducer, useState } from "react";
|
|
4
|
+
import "./style.css";
|
|
5
|
+
import { IconEyeOff, IconEye, IconX, IconAlertSquareRounded } from "@tabler/icons-react";
|
|
6
|
+
const initialState = (size, status, radius) => ({
|
|
7
|
+
size,
|
|
8
|
+
status,
|
|
9
|
+
radius,
|
|
10
|
+
});
|
|
11
|
+
const reducer = (state, action) => {
|
|
12
|
+
const { size, radius } = state;
|
|
13
|
+
switch (action) {
|
|
14
|
+
case "mouse_enter":
|
|
15
|
+
return { size, radius, status: "hover" };
|
|
16
|
+
case "click":
|
|
17
|
+
return { size, radius, status: "active" };
|
|
18
|
+
case "mouse_leave":
|
|
19
|
+
return { ...state, status: "default" };
|
|
20
|
+
default:
|
|
21
|
+
return state;
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
export const InputField = ({ withAlertIcon = true, withAlertMessage = true, leftIcon, rightIcon, defaultValue = "", alertText = "Doldurulması zorunlu alan.", clearable = false, text = "Placeholder", headerText = "Label", withHeader = true, size = "large", status = "default", radius = "small", className, frameClassName, isPassword = false, value, onChange, onClear, onFocus, onBlur, onKeyDown, }) => {
|
|
25
|
+
const [state, dispatch] = useReducer(reducer, initialState(size, status, radius));
|
|
26
|
+
const [inputValue, setInputValue] = useState(defaultValue);
|
|
27
|
+
const [isPasswordVisible, setIsPasswordVisible] = useState(false);
|
|
28
|
+
const isControlled = value !== undefined;
|
|
29
|
+
const handleInputChange = (event) => {
|
|
30
|
+
const newValue = event.target.value;
|
|
31
|
+
if (isControlled) {
|
|
32
|
+
onChange?.(event);
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
setInputValue(newValue);
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
const currentValue = isControlled ? value : inputValue;
|
|
39
|
+
const handleClear = () => {
|
|
40
|
+
if (isControlled) {
|
|
41
|
+
onClear?.();
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
setInputValue("");
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
return (_jsxs("div", { className: `input-field size-2-${state.size} ${className}`, onMouseLeave: () => dispatch("mouse_leave"), onMouseEnter: () => dispatch("mouse_enter"), onClick: () => dispatch("click"), children: [withHeader && (_jsx("div", { className: `frame ${["active", "default", "disabled", "hover"].includes(state.status) ? frameClassName : ""}`, children: _jsx("div", { className: `label-2 ${state.status}`, children: headerText }) })), _jsxs("div", { className: `input-fields size-4-${state.size} status-0-${state.status}`, children: [leftIcon && React.cloneElement(leftIcon, { color: state.status === "alert" ? "#FF6983" : "#888888" }), _jsx("input", { type: isPassword ? (isPasswordVisible ? "text" : "password") : "text", placeholder: text, value: currentValue, onChange: handleInputChange, onFocus: onFocus, onBlur: onBlur, onKeyDown: onKeyDown, className: `input-field-placeholder ${state.status === "alert" ? "alert" : ""}`, style: {
|
|
48
|
+
backgroundColor: "transparent",
|
|
49
|
+
border: "none",
|
|
50
|
+
color: state.status === "alert" ? "#FF6983" : "#888888",
|
|
51
|
+
flex: 1,
|
|
52
|
+
minWidth: 0,
|
|
53
|
+
outline: "none",
|
|
54
|
+
padding: "0",
|
|
55
|
+
} }), clearable && !!currentValue && currentValue.length > 0 && (_jsx(IconX, { stroke: 1.5, className: "button-clear", color: state.status === "alert" ? "#FF6983" : "#888888", onClick: handleClear })), rightIcon && isPassword && (isPasswordVisible ? (_jsx(IconEyeOff, { stroke: 1.5, className: "button-password-eye", color: state.status === "alert" ? "#FF6983" : "#888888", onClick: () => setIsPasswordVisible(!isPasswordVisible) })) : (_jsx(IconEye, { stroke: 1.5, className: "button-password-eye", color: state.status === "alert" ? "#FF6983" : "#888888", onClick: () => setIsPasswordVisible(!isPasswordVisible) }))), rightIcon && React.cloneElement(rightIcon, { color: state.status === "alert" ? "#FF6983" : "#888888" })] }), state.status === "alert" && withAlertMessage && (_jsxs("div", { className: "frame-2", children: [withAlertIcon && _jsx(IconAlertSquareRounded, { size: 20, stroke: 1.5 }), _jsx("div", { className: "doldurulmas-zorunlu", children: alertText })] }))] }));
|
|
56
|
+
};
|
|
57
|
+
InputField.propTypes = {
|
|
58
|
+
withAlertIcon: PropTypes.bool,
|
|
59
|
+
withAlertMessage: PropTypes.bool,
|
|
60
|
+
defaultValue: PropTypes.string,
|
|
61
|
+
withLeftIcon: PropTypes.bool,
|
|
62
|
+
alertText: PropTypes.string,
|
|
63
|
+
withRightIcon: PropTypes.bool,
|
|
64
|
+
text: PropTypes.string,
|
|
65
|
+
headerText: PropTypes.string,
|
|
66
|
+
withHeader: PropTypes.bool,
|
|
67
|
+
size: PropTypes.oneOf(["large", "with-password-eye", "medium", "small", "with-button"]),
|
|
68
|
+
status: PropTypes.oneOf(["active", "default", "hover", "alert", "disabled"]),
|
|
69
|
+
radius: PropTypes.oneOf(["small", "ninety-six-px", "eight-px"]),
|
|
70
|
+
className: PropTypes.string,
|
|
71
|
+
frameClassName: PropTypes.string,
|
|
72
|
+
isPassword: PropTypes.bool,
|
|
73
|
+
value: PropTypes.string,
|
|
74
|
+
onChange: PropTypes.func,
|
|
75
|
+
icon: PropTypes.element,
|
|
76
|
+
onFocus: PropTypes.func,
|
|
77
|
+
onBlur: PropTypes.func,
|
|
78
|
+
onKeyDown: PropTypes.func,
|
|
79
|
+
clearable: PropTypes.bool,
|
|
80
|
+
onClear: PropTypes.func,
|
|
81
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { InputField } from "./InputField";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { InputField } from "./InputField";
|