@arkyn/components 1.2.4 → 1.2.5

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.
Files changed (31) hide show
  1. package/dist/bundle.js +1031 -760
  2. package/dist/bundle.umd.cjs +11 -11
  3. package/dist/components/Checkbox/index.d.ts +5 -0
  4. package/dist/components/Checkbox/index.d.ts.map +1 -0
  5. package/dist/components/Checkbox/index.js +20 -0
  6. package/dist/components/Input/CurrencyInput/index.js +1 -1
  7. package/dist/components/Input/MaskInput/index.d.ts.map +1 -1
  8. package/dist/components/Input/MaskInput/index.js +34 -58
  9. package/dist/components/Select/getConfig.d.ts +312 -0
  10. package/dist/components/Select/getConfig.d.ts.map +1 -0
  11. package/dist/components/Select/getConfig.js +30 -0
  12. package/dist/components/Select/index.d.ts +5 -0
  13. package/dist/components/Select/index.d.ts.map +1 -0
  14. package/dist/components/Select/index.js +71 -0
  15. package/dist/components/Select/utils/morpheme.d.ts +4 -0
  16. package/dist/components/Select/utils/morpheme.d.ts.map +1 -0
  17. package/dist/components/Select/utils/morpheme.js +10 -0
  18. package/dist/index.d.ts +2 -0
  19. package/dist/index.d.ts.map +1 -1
  20. package/dist/index.js +2 -0
  21. package/dist/style.css +1 -1
  22. package/package.json +6 -6
  23. package/src/components/Checkbox/index.tsx +52 -0
  24. package/src/components/Checkbox/styles.css +66 -0
  25. package/src/components/Input/CurrencyInput/index.tsx +1 -1
  26. package/src/components/Input/MaskInput/index.tsx +81 -68
  27. package/src/components/Select/getConfig.tsx +52 -0
  28. package/src/components/Select/index.tsx +157 -0
  29. package/src/components/Select/styles.css +305 -0
  30. package/src/components/Select/utils/morpheme.tsx +19 -0
  31. package/src/index.ts +2 -0
@@ -0,0 +1,305 @@
1
+ /* BASE */
2
+ .arkyn_select {
3
+ flex: 1;
4
+ position: relative;
5
+ display: flex;
6
+ align-items: center;
7
+
8
+ padding: 0 16px;
9
+ gap: 8px;
10
+ border-radius: 6px;
11
+
12
+ border: 1px solid transparent;
13
+ outline: 1px solid transparent;
14
+ }
15
+
16
+ .arkyn_select:hover {
17
+ cursor: text;
18
+ }
19
+
20
+ .arkyn_select input {
21
+ border: none;
22
+ outline: none;
23
+ background: transparent;
24
+ width: 100%;
25
+ }
26
+
27
+ .arkyn_select input {
28
+ color: var(--secondary-900);
29
+ }
30
+
31
+ .arkyn_select .prefix {
32
+ color: var(--secondary-600);
33
+ background: var(--secondary-200);
34
+ font-weight: 400;
35
+
36
+ display: flex;
37
+ align-items: center;
38
+ justify-content: center;
39
+
40
+ position: absolute;
41
+ }
42
+
43
+ .arkyn_select .prefix {
44
+ left: 0;
45
+ top: 0;
46
+ bottom: 0;
47
+ border-radius: 5px 0 0 5px;
48
+ border-right: 1px solid var(--secondary-300);
49
+ }
50
+
51
+ .arkyn_select.placeholder_dark_true input::placeholder {
52
+ color: var(--secondary-900);
53
+ }
54
+
55
+ .arkyn_select.placeholder_dark_false input::placeholder {
56
+ color: var(--secondary-400);
57
+ }
58
+
59
+ .arkyn_select svg {
60
+ color: var(--secondary-400);
61
+ }
62
+
63
+ .arkyn_select.errored svg {
64
+ color: var(--danger-600);
65
+ }
66
+
67
+ .arkyn_select:not(.opacity).focused svg {
68
+ color: var(--primary-500);
69
+ }
70
+
71
+ .arkyn_select.opacity {
72
+ opacity: 0.5;
73
+ }
74
+
75
+ .arkyn_select .arkyn_select_arrow {
76
+ transition: 0.15s all ease-in-out;
77
+ color: var(--secondary-400);
78
+ }
79
+
80
+ .arkyn_select:not(.opacity).focused .arkyn_select_arrow {
81
+ transform: rotate(180deg);
82
+ }
83
+
84
+ /* VARIANTS */
85
+ .arkyn_select.solid {
86
+ border-color: var(--secondary-300);
87
+ background-color: var(--secondary-50);
88
+ }
89
+
90
+ .arkyn_select.solid.errored {
91
+ border-color: var(--danger-600);
92
+ outline-color: var(--danger-600);
93
+ }
94
+
95
+ .arkyn_select:not(.opacity).solid.focused {
96
+ border-color: var(--primary-500);
97
+ outline-color: var(--primary-500);
98
+ }
99
+
100
+ .arkyn_select.outline {
101
+ border-color: var(--secondary-300);
102
+ }
103
+
104
+ .arkyn_select.outline.errored {
105
+ border-color: var(--danger-600);
106
+ outline-color: var(--danger-600);
107
+ }
108
+
109
+ .arkyn_select:not(.opacity).outline.focused {
110
+ border-color: var(--primary-500);
111
+ outline-color: var(--primary-500);
112
+ }
113
+
114
+ .arkyn_select.underline {
115
+ border-radius: 0;
116
+ border-top: none;
117
+ border-left: none;
118
+ border-right: none;
119
+ outline: none;
120
+ border-color: var(--secondary-300);
121
+ }
122
+
123
+ .arkyn_select.underline .prefix {
124
+ display: none;
125
+ }
126
+
127
+ .arkyn_select.underline::before {
128
+ content: " ";
129
+ position: absolute;
130
+ height: 1px;
131
+ left: 0;
132
+ right: 0;
133
+ bottom: -2px;
134
+ background: transparent;
135
+ }
136
+
137
+ .arkyn_select.underline.errored {
138
+ border-color: var(--danger-600);
139
+ }
140
+
141
+ .arkyn_select.underline.errored::before {
142
+ background: var(--danger-600);
143
+ }
144
+
145
+ .arkyn_select:not(.opacity).underline.focused {
146
+ border-color: var(--primary-500);
147
+ }
148
+
149
+ .arkyn_select:not(.opacity).underline.focused::before {
150
+ background: var(--primary-500);
151
+ }
152
+
153
+ /* SIZE */
154
+ .arkyn_select.md input {
155
+ min-height: 40px;
156
+ max-height: 40px;
157
+ font-size: 14px;
158
+ line-height: 14px;
159
+ font-weight: 400;
160
+ }
161
+
162
+ .arkyn_select.md input::placeholder {
163
+ font-weight: 400;
164
+ font-size: 14px;
165
+ line-height: 14px;
166
+ }
167
+
168
+ .arkyn_select.md.hasPrefix {
169
+ padding-left: 60px;
170
+ }
171
+
172
+ .arkyn_select.md .prefix {
173
+ height: 40px;
174
+ width: 44px;
175
+ font-size: 14px;
176
+ }
177
+
178
+ .arkyn_select.lg input {
179
+ min-height: 44px;
180
+ max-height: 44px;
181
+ line-height: 16px;
182
+ font-size: 16px;
183
+ font-weight: 400;
184
+ }
185
+
186
+ .arkyn_select.lg input::placeholder {
187
+ font-weight: 400;
188
+ font-size: 16px;
189
+ line-height: 16px;
190
+ }
191
+
192
+ .arkyn_select.lg .prefix {
193
+ height: 44px;
194
+ width: 48px;
195
+ font-size: 16px;
196
+ }
197
+
198
+ .arkyn_select.lg.hasPrefix {
199
+ padding-left: 64px;
200
+ }
201
+
202
+ /* CONTENT */
203
+ .arkyn_select_content {
204
+ position: absolute;
205
+ z-index: 6;
206
+
207
+ top: calc(100% + 5px);
208
+ left: -2px;
209
+ right: -2px;
210
+
211
+ border-radius: 6px;
212
+ list-style: none;
213
+
214
+ display: flex;
215
+ flex-direction: column;
216
+
217
+ flex: 1;
218
+ overflow: hidden;
219
+ height: max-content;
220
+
221
+ border: 1px solid var(--secondary-300);
222
+ background-color: var(--secondary-50);
223
+ }
224
+
225
+ .arkyn_select_content > li {
226
+ display: flex;
227
+ align-items: center;
228
+ justify-content: space-between;
229
+
230
+ font-weight: 400;
231
+ line-height: 21.79px;
232
+
233
+ color: var(--secondary-500);
234
+ }
235
+
236
+ .arkyn_select.md .arkyn_select_content > li {
237
+ font-size: 14px;
238
+ padding: 8px 16px;
239
+ }
240
+
241
+ .arkyn_select.lg .arkyn_select_content > li {
242
+ font-size: 16px;
243
+ padding: 8px 16px;
244
+ }
245
+
246
+ .arkyn_select_content > p {
247
+ font-weight: 400;
248
+ font-size: 14px;
249
+ padding: 16px;
250
+ text-align: center;
251
+ line-height: 21.79px;
252
+
253
+ color: var(--secondary-500);
254
+ }
255
+
256
+ .arkyn_select_content > li svg {
257
+ height: 20px;
258
+ width: 20px;
259
+ color: var(--primary-500);
260
+ display: none;
261
+ }
262
+
263
+ .arkyn_select_content > li:hover {
264
+ cursor: pointer;
265
+ background-color: var(--secondary-100);
266
+ }
267
+
268
+ .arkyn_select_content > li:not(:last-child) {
269
+ border-bottom: 1px solid var(--secondary-300);
270
+ }
271
+
272
+ .arkyn_select_content > li.active {
273
+ font-weight: 600;
274
+
275
+ color: var(--secondary-900);
276
+ background-color: var(--secondary-100);
277
+ }
278
+
279
+ .arkyn_select_content > li.active svg {
280
+ display: unset;
281
+ }
282
+
283
+ /* SPIN */
284
+ .arkyn_select .spinner {
285
+ animation: spin 2s linear infinite;
286
+ }
287
+
288
+ /* OVERLAY */
289
+ .arkyn_select_overlay {
290
+ position: fixed;
291
+ top: 0;
292
+ bottom: 0;
293
+ left: 0;
294
+ right: 0;
295
+ z-index: 5;
296
+ }
297
+
298
+ @keyframes spin {
299
+ from {
300
+ transform: rotate(0deg);
301
+ }
302
+ to {
303
+ transform: rotate(360deg);
304
+ }
305
+ }
@@ -0,0 +1,19 @@
1
+ import type { LucideIcon } from "lucide-react";
2
+
3
+ function morpheme(
4
+ data: LucideIcon | string | undefined,
5
+ iconSize: number,
6
+ type?: "prefix" | "sufix"
7
+ ) {
8
+ if (!data) return <></>;
9
+ if (typeof data === "string") return <p className={type}>{data}</p>;
10
+
11
+ const Data = data;
12
+ return (
13
+ <p className={type}>
14
+ <Data color="var(--secondary-600)" size={iconSize} strokeWidth={2.5} />
15
+ </p>
16
+ );
17
+ }
18
+
19
+ export { morpheme };
package/src/index.ts CHANGED
@@ -5,9 +5,11 @@ export { Skeleton } from "./components/Skeleton";
5
5
 
6
6
  // Form
7
7
  export { Button } from "./components/Button";
8
+ export { Checkbox } from "./components/Checkbox";
8
9
  export { FormController, FormError, FormLabel } from "./components/Form";
9
10
  export { IconButton } from "./components/IconButton";
10
11
  export { Input } from "./components/Input";
12
+ export { Select } from "./components/Select";
11
13
 
12
14
  // Navigation
13
15
  export { Breadcrumb, BreadcrumbLink } from "./components/Breadcrumb";