@sikka/hawa 0.26.33 → 0.26.35
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/alert/index.js +36 -12
- package/dist/alert/index.js.map +1 -1
- package/dist/alert/index.mjs +36 -12
- package/dist/alert/index.mjs.map +1 -1
- package/dist/appLayout/index.js +36 -12
- package/dist/appLayout/index.js.map +1 -1
- package/dist/appLayout/index.mjs +36 -12
- package/dist/appLayout/index.mjs.map +1 -1
- package/dist/backToTop/index.js +36 -12
- package/dist/backToTop/index.js.map +1 -1
- package/dist/backToTop/index.mjs +36 -12
- package/dist/backToTop/index.mjs.map +1 -1
- package/dist/blocks/auth/index.js +36 -12
- package/dist/blocks/auth/index.mjs +4 -4
- package/dist/blocks/feedback/index.js +36 -12
- package/dist/blocks/feedback/index.mjs +5 -5
- package/dist/blocks/index.js +36 -12
- package/dist/blocks/index.mjs +2 -2
- package/dist/blocks/misc/index.js +36 -12
- package/dist/blocks/misc/index.mjs +4 -4
- package/dist/blocks/pricing/index.js +36 -12
- package/dist/blocks/pricing/index.mjs +4 -4
- package/dist/button/index.js +36 -12
- package/dist/button/index.js.map +1 -1
- package/dist/button/index.mjs +36 -12
- package/dist/button/index.mjs.map +1 -1
- package/dist/{chunk-OY66MBXP.mjs → chunk-3XQAC7AK.mjs} +1 -1
- package/dist/{chunk-NMS5LCSQ.mjs → chunk-7HKPCELH.mjs} +1 -1
- package/dist/{chunk-5YXZXYLH.mjs → chunk-B3LVGXYC.mjs} +1 -1
- package/dist/{chunk-GVJYACGA.mjs → chunk-CDLNP6A4.mjs} +1 -1
- package/dist/{chunk-4EGKGSGY.mjs → chunk-COVI2KU2.mjs} +1 -1
- package/dist/{chunk-D36MPDGE.mjs → chunk-FVN4XR4B.mjs} +36 -12
- package/dist/{chunk-R4HAAT6R.mjs → chunk-W3D5MI6L.mjs} +1 -1
- package/dist/{chunk-F3DQJHTG.mjs → chunk-WM7JTAPS.mjs} +1 -1
- package/dist/{chunk-MQUAGP7K.mjs → chunk-WRPZUBMJ.mjs} +36 -12
- package/dist/{chunk-FQ6WVEHW.mjs → chunk-YQNGPETF.mjs} +1 -1
- package/dist/codeBlock/index.js +37 -13
- package/dist/codeBlock/index.js.map +1 -1
- package/dist/codeBlock/index.mjs +37 -13
- package/dist/codeBlock/index.mjs.map +1 -1
- package/dist/dataTable/index.js +36 -12
- package/dist/dataTable/index.js.map +1 -1
- package/dist/dataTable/index.mjs +36 -12
- package/dist/dataTable/index.mjs.map +1 -1
- package/dist/docsLayout/index.js +36 -12
- package/dist/docsLayout/index.js.map +1 -1
- package/dist/docsLayout/index.mjs +36 -12
- package/dist/docsLayout/index.mjs.map +1 -1
- package/dist/elements/index.d.mts +6 -2
- package/dist/elements/index.d.ts +6 -2
- package/dist/elements/index.js +37 -13
- package/dist/elements/index.mjs +4 -4
- package/dist/fileDropzone/index.js +36 -12
- package/dist/fileDropzone/index.js.map +1 -1
- package/dist/fileDropzone/index.mjs +36 -12
- package/dist/fileDropzone/index.mjs.map +1 -1
- package/dist/hooks/index.js +3 -21
- package/dist/hooks/index.mjs +3 -21
- package/dist/index.css +2 -19
- package/dist/index.d.mts +6 -2
- package/dist/index.d.ts +6 -2
- package/dist/index.js +40 -34
- package/dist/index.mjs +40 -34
- package/dist/layout/index.js +36 -12
- package/dist/layout/index.mjs +2 -2
- package/dist/loading/index.d.mts +6 -2
- package/dist/loading/index.d.ts +6 -2
- package/dist/loading/index.js +36 -12
- package/dist/loading/index.js.map +1 -1
- package/dist/loading/index.mjs +36 -12
- package/dist/loading/index.mjs.map +1 -1
- package/dist/sortButton/index.js +36 -12
- package/dist/sortButton/index.js.map +1 -1
- package/dist/sortButton/index.mjs +36 -12
- package/dist/sortButton/index.mjs.map +1 -1
- package/dist/splitButton/index.js +36 -12
- package/dist/splitButton/index.js.map +1 -1
- package/dist/splitButton/index.mjs +36 -12
- package/dist/splitButton/index.mjs.map +1 -1
- package/dist/toaster/index.js.map +1 -1
- package/dist/toaster/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/blocks/index.js
CHANGED
@@ -88,6 +88,7 @@ var Loading = ({
|
|
88
88
|
design = "spinner",
|
89
89
|
size = "sm",
|
90
90
|
themeMode = "light",
|
91
|
+
classNames,
|
91
92
|
color,
|
92
93
|
...props
|
93
94
|
}) => {
|
@@ -108,7 +109,10 @@ var Loading = ({
|
|
108
109
|
return /* @__PURE__ */ import_react.default.createElement(
|
109
110
|
"div",
|
110
111
|
{
|
111
|
-
className: cn(
|
112
|
+
className: cn(
|
113
|
+
"hawa-flex hawa-flex-row hawa-gap-2",
|
114
|
+
classNames == null ? void 0 : classNames.container
|
115
|
+
)
|
112
116
|
},
|
113
117
|
/* @__PURE__ */ import_react.default.createElement(
|
114
118
|
"div",
|
@@ -148,7 +152,11 @@ var Loading = ({
|
|
148
152
|
return /* @__PURE__ */ import_react.default.createElement(
|
149
153
|
"svg",
|
150
154
|
{
|
151
|
-
className: cn(
|
155
|
+
className: cn(
|
156
|
+
"squircle-container",
|
157
|
+
sizeStyles[size],
|
158
|
+
classNames == null ? void 0 : classNames.container
|
159
|
+
),
|
152
160
|
viewBox: "0 0 35 35",
|
153
161
|
height: "35",
|
154
162
|
width: "35"
|
@@ -183,7 +191,11 @@ var Loading = ({
|
|
183
191
|
return /* @__PURE__ */ import_react.default.createElement(
|
184
192
|
"svg",
|
185
193
|
{
|
186
|
-
className: cn(
|
194
|
+
className: cn(
|
195
|
+
"squircle-container",
|
196
|
+
sizeStyles[size],
|
197
|
+
classNames == null ? void 0 : classNames.container
|
198
|
+
),
|
187
199
|
x: "0px",
|
188
200
|
y: "0px",
|
189
201
|
viewBox: "0 0 37 37",
|
@@ -220,7 +232,11 @@ var Loading = ({
|
|
220
232
|
return /* @__PURE__ */ import_react.default.createElement(
|
221
233
|
"svg",
|
222
234
|
{
|
223
|
-
className: cn(
|
235
|
+
className: cn(
|
236
|
+
"circle-container",
|
237
|
+
sizeStyles[size],
|
238
|
+
classNames == null ? void 0 : classNames.container
|
239
|
+
),
|
224
240
|
viewBox: "0 0 40 40",
|
225
241
|
height: "40",
|
226
242
|
width: "40"
|
@@ -228,10 +244,14 @@ var Loading = ({
|
|
228
244
|
/* @__PURE__ */ import_react.default.createElement(
|
229
245
|
"circle",
|
230
246
|
{
|
231
|
-
className: cn(
|
232
|
-
"
|
233
|
-
|
234
|
-
|
247
|
+
className: cn(
|
248
|
+
"circle-track",
|
249
|
+
{
|
250
|
+
"hawa-stroke-primary-foreground": themeMode === "dark",
|
251
|
+
"hawa-stroke-primary": themeMode === "light"
|
252
|
+
},
|
253
|
+
classNames == null ? void 0 : classNames.track
|
254
|
+
),
|
235
255
|
cx: "20",
|
236
256
|
cy: "20",
|
237
257
|
r: "17.5",
|
@@ -243,10 +263,14 @@ var Loading = ({
|
|
243
263
|
/* @__PURE__ */ import_react.default.createElement(
|
244
264
|
"circle",
|
245
265
|
{
|
246
|
-
className: cn(
|
247
|
-
"
|
248
|
-
|
249
|
-
|
266
|
+
className: cn(
|
267
|
+
"circle-car",
|
268
|
+
{
|
269
|
+
"hawa-stroke-primary-foreground": themeMode === "dark",
|
270
|
+
"hawa-stroke-primary": themeMode === "light"
|
271
|
+
},
|
272
|
+
classNames == null ? void 0 : classNames.car
|
273
|
+
),
|
250
274
|
cx: "20",
|
251
275
|
cy: "20",
|
252
276
|
r: "17.5",
|
package/dist/blocks/index.mjs
CHANGED
@@ -25,7 +25,7 @@ import {
|
|
25
25
|
UncheckMark,
|
26
26
|
VeryBadEmoji,
|
27
27
|
VeryGoodEmoji
|
28
|
-
} from "../chunk-
|
28
|
+
} from "../chunk-WM7JTAPS.mjs";
|
29
29
|
import {
|
30
30
|
Button,
|
31
31
|
Card,
|
@@ -41,7 +41,7 @@ import {
|
|
41
41
|
Skeleton,
|
42
42
|
Tooltip,
|
43
43
|
cn
|
44
|
-
} from "../chunk-
|
44
|
+
} from "../chunk-WRPZUBMJ.mjs";
|
45
45
|
import "../chunk-ZFXKCRJC.mjs";
|
46
46
|
|
47
47
|
// blocks/auth/LoginForm.tsx
|
@@ -278,6 +278,7 @@ var Loading = ({
|
|
278
278
|
design = "spinner",
|
279
279
|
size = "sm",
|
280
280
|
themeMode = "light",
|
281
|
+
classNames,
|
281
282
|
color,
|
282
283
|
...props
|
283
284
|
}) => {
|
@@ -298,7 +299,10 @@ var Loading = ({
|
|
298
299
|
return /* @__PURE__ */ import_react3.default.createElement(
|
299
300
|
"div",
|
300
301
|
{
|
301
|
-
className: cn(
|
302
|
+
className: cn(
|
303
|
+
"hawa-flex hawa-flex-row hawa-gap-2",
|
304
|
+
classNames == null ? void 0 : classNames.container
|
305
|
+
)
|
302
306
|
},
|
303
307
|
/* @__PURE__ */ import_react3.default.createElement(
|
304
308
|
"div",
|
@@ -338,7 +342,11 @@ var Loading = ({
|
|
338
342
|
return /* @__PURE__ */ import_react3.default.createElement(
|
339
343
|
"svg",
|
340
344
|
{
|
341
|
-
className: cn(
|
345
|
+
className: cn(
|
346
|
+
"squircle-container",
|
347
|
+
sizeStyles[size],
|
348
|
+
classNames == null ? void 0 : classNames.container
|
349
|
+
),
|
342
350
|
viewBox: "0 0 35 35",
|
343
351
|
height: "35",
|
344
352
|
width: "35"
|
@@ -373,7 +381,11 @@ var Loading = ({
|
|
373
381
|
return /* @__PURE__ */ import_react3.default.createElement(
|
374
382
|
"svg",
|
375
383
|
{
|
376
|
-
className: cn(
|
384
|
+
className: cn(
|
385
|
+
"squircle-container",
|
386
|
+
sizeStyles[size],
|
387
|
+
classNames == null ? void 0 : classNames.container
|
388
|
+
),
|
377
389
|
x: "0px",
|
378
390
|
y: "0px",
|
379
391
|
viewBox: "0 0 37 37",
|
@@ -410,7 +422,11 @@ var Loading = ({
|
|
410
422
|
return /* @__PURE__ */ import_react3.default.createElement(
|
411
423
|
"svg",
|
412
424
|
{
|
413
|
-
className: cn(
|
425
|
+
className: cn(
|
426
|
+
"circle-container",
|
427
|
+
sizeStyles[size],
|
428
|
+
classNames == null ? void 0 : classNames.container
|
429
|
+
),
|
414
430
|
viewBox: "0 0 40 40",
|
415
431
|
height: "40",
|
416
432
|
width: "40"
|
@@ -418,10 +434,14 @@ var Loading = ({
|
|
418
434
|
/* @__PURE__ */ import_react3.default.createElement(
|
419
435
|
"circle",
|
420
436
|
{
|
421
|
-
className: cn(
|
422
|
-
"
|
423
|
-
|
424
|
-
|
437
|
+
className: cn(
|
438
|
+
"circle-track",
|
439
|
+
{
|
440
|
+
"hawa-stroke-primary-foreground": themeMode === "dark",
|
441
|
+
"hawa-stroke-primary": themeMode === "light"
|
442
|
+
},
|
443
|
+
classNames == null ? void 0 : classNames.track
|
444
|
+
),
|
425
445
|
cx: "20",
|
426
446
|
cy: "20",
|
427
447
|
r: "17.5",
|
@@ -433,10 +453,14 @@ var Loading = ({
|
|
433
453
|
/* @__PURE__ */ import_react3.default.createElement(
|
434
454
|
"circle",
|
435
455
|
{
|
436
|
-
className: cn(
|
437
|
-
"
|
438
|
-
|
439
|
-
|
456
|
+
className: cn(
|
457
|
+
"circle-car",
|
458
|
+
{
|
459
|
+
"hawa-stroke-primary-foreground": themeMode === "dark",
|
460
|
+
"hawa-stroke-primary": themeMode === "light"
|
461
|
+
},
|
462
|
+
classNames == null ? void 0 : classNames.car
|
463
|
+
),
|
440
464
|
cx: "20",
|
441
465
|
cy: "20",
|
442
466
|
r: "17.5",
|
@@ -1,13 +1,13 @@
|
|
1
1
|
import {
|
2
2
|
Input
|
3
|
-
} from "../../chunk-
|
3
|
+
} from "../../chunk-W3D5MI6L.mjs";
|
4
4
|
import {
|
5
5
|
Chip,
|
6
6
|
ScrollArea
|
7
|
-
} from "../../chunk-
|
7
|
+
} from "../../chunk-COVI2KU2.mjs";
|
8
8
|
import {
|
9
9
|
Textarea
|
10
|
-
} from "../../chunk-
|
10
|
+
} from "../../chunk-B3LVGXYC.mjs";
|
11
11
|
import "../../chunk-WUHNPHD5.mjs";
|
12
12
|
import {
|
13
13
|
Button,
|
@@ -18,7 +18,7 @@ import {
|
|
18
18
|
CardHeader,
|
19
19
|
CardTitle,
|
20
20
|
cn
|
21
|
-
} from "../../chunk-
|
21
|
+
} from "../../chunk-FVN4XR4B.mjs";
|
22
22
|
|
23
23
|
// blocks/misc/LegalTexts.tsx
|
24
24
|
import React2 from "react";
|
@@ -65,6 +65,7 @@ var Loading = ({
|
|
65
65
|
design = "spinner",
|
66
66
|
size = "sm",
|
67
67
|
themeMode = "light",
|
68
|
+
classNames,
|
68
69
|
color,
|
69
70
|
...props
|
70
71
|
}) => {
|
@@ -85,7 +86,10 @@ var Loading = ({
|
|
85
86
|
return /* @__PURE__ */ import_react3.default.createElement(
|
86
87
|
"div",
|
87
88
|
{
|
88
|
-
className: cn(
|
89
|
+
className: cn(
|
90
|
+
"hawa-flex hawa-flex-row hawa-gap-2",
|
91
|
+
classNames == null ? void 0 : classNames.container
|
92
|
+
)
|
89
93
|
},
|
90
94
|
/* @__PURE__ */ import_react3.default.createElement(
|
91
95
|
"div",
|
@@ -125,7 +129,11 @@ var Loading = ({
|
|
125
129
|
return /* @__PURE__ */ import_react3.default.createElement(
|
126
130
|
"svg",
|
127
131
|
{
|
128
|
-
className: cn(
|
132
|
+
className: cn(
|
133
|
+
"squircle-container",
|
134
|
+
sizeStyles[size],
|
135
|
+
classNames == null ? void 0 : classNames.container
|
136
|
+
),
|
129
137
|
viewBox: "0 0 35 35",
|
130
138
|
height: "35",
|
131
139
|
width: "35"
|
@@ -160,7 +168,11 @@ var Loading = ({
|
|
160
168
|
return /* @__PURE__ */ import_react3.default.createElement(
|
161
169
|
"svg",
|
162
170
|
{
|
163
|
-
className: cn(
|
171
|
+
className: cn(
|
172
|
+
"squircle-container",
|
173
|
+
sizeStyles[size],
|
174
|
+
classNames == null ? void 0 : classNames.container
|
175
|
+
),
|
164
176
|
x: "0px",
|
165
177
|
y: "0px",
|
166
178
|
viewBox: "0 0 37 37",
|
@@ -197,7 +209,11 @@ var Loading = ({
|
|
197
209
|
return /* @__PURE__ */ import_react3.default.createElement(
|
198
210
|
"svg",
|
199
211
|
{
|
200
|
-
className: cn(
|
212
|
+
className: cn(
|
213
|
+
"circle-container",
|
214
|
+
sizeStyles[size],
|
215
|
+
classNames == null ? void 0 : classNames.container
|
216
|
+
),
|
201
217
|
viewBox: "0 0 40 40",
|
202
218
|
height: "40",
|
203
219
|
width: "40"
|
@@ -205,10 +221,14 @@ var Loading = ({
|
|
205
221
|
/* @__PURE__ */ import_react3.default.createElement(
|
206
222
|
"circle",
|
207
223
|
{
|
208
|
-
className: cn(
|
209
|
-
"
|
210
|
-
|
211
|
-
|
224
|
+
className: cn(
|
225
|
+
"circle-track",
|
226
|
+
{
|
227
|
+
"hawa-stroke-primary-foreground": themeMode === "dark",
|
228
|
+
"hawa-stroke-primary": themeMode === "light"
|
229
|
+
},
|
230
|
+
classNames == null ? void 0 : classNames.track
|
231
|
+
),
|
212
232
|
cx: "20",
|
213
233
|
cy: "20",
|
214
234
|
r: "17.5",
|
@@ -220,10 +240,14 @@ var Loading = ({
|
|
220
240
|
/* @__PURE__ */ import_react3.default.createElement(
|
221
241
|
"circle",
|
222
242
|
{
|
223
|
-
className: cn(
|
224
|
-
"
|
225
|
-
|
226
|
-
|
243
|
+
className: cn(
|
244
|
+
"circle-car",
|
245
|
+
{
|
246
|
+
"hawa-stroke-primary-foreground": themeMode === "dark",
|
247
|
+
"hawa-stroke-primary": themeMode === "light"
|
248
|
+
},
|
249
|
+
classNames == null ? void 0 : classNames.car
|
250
|
+
),
|
227
251
|
cx: "20",
|
228
252
|
cy: "20",
|
229
253
|
r: "17.5",
|
@@ -1,22 +1,22 @@
|
|
1
1
|
import {
|
2
2
|
Chip,
|
3
3
|
ScrollArea
|
4
|
-
} from "../../chunk-
|
4
|
+
} from "../../chunk-COVI2KU2.mjs";
|
5
5
|
import "../../chunk-ZS3FB3PO.mjs";
|
6
6
|
import {
|
7
7
|
Radio
|
8
|
-
} from "../../chunk-
|
8
|
+
} from "../../chunk-7HKPCELH.mjs";
|
9
9
|
import {
|
10
10
|
CheckMark,
|
11
11
|
UncheckMark
|
12
|
-
} from "../../chunk-
|
12
|
+
} from "../../chunk-CDLNP6A4.mjs";
|
13
13
|
import {
|
14
14
|
Button,
|
15
15
|
Card,
|
16
16
|
Skeleton,
|
17
17
|
Tooltip,
|
18
18
|
cn
|
19
|
-
} from "../../chunk-
|
19
|
+
} from "../../chunk-FVN4XR4B.mjs";
|
20
20
|
|
21
21
|
// blocks/pricing/PricingPlans.tsx
|
22
22
|
import React8 from "react";
|
package/dist/button/index.js
CHANGED
@@ -52,6 +52,7 @@ var Loading = ({
|
|
52
52
|
design = "spinner",
|
53
53
|
size = "sm",
|
54
54
|
themeMode = "light",
|
55
|
+
classNames,
|
55
56
|
color,
|
56
57
|
...props
|
57
58
|
}) => {
|
@@ -72,7 +73,10 @@ var Loading = ({
|
|
72
73
|
return /* @__PURE__ */ import_react.default.createElement(
|
73
74
|
"div",
|
74
75
|
{
|
75
|
-
className: cn(
|
76
|
+
className: cn(
|
77
|
+
"hawa-flex hawa-flex-row hawa-gap-2",
|
78
|
+
classNames == null ? void 0 : classNames.container
|
79
|
+
)
|
76
80
|
},
|
77
81
|
/* @__PURE__ */ import_react.default.createElement(
|
78
82
|
"div",
|
@@ -112,7 +116,11 @@ var Loading = ({
|
|
112
116
|
return /* @__PURE__ */ import_react.default.createElement(
|
113
117
|
"svg",
|
114
118
|
{
|
115
|
-
className: cn(
|
119
|
+
className: cn(
|
120
|
+
"squircle-container",
|
121
|
+
sizeStyles[size],
|
122
|
+
classNames == null ? void 0 : classNames.container
|
123
|
+
),
|
116
124
|
viewBox: "0 0 35 35",
|
117
125
|
height: "35",
|
118
126
|
width: "35"
|
@@ -147,7 +155,11 @@ var Loading = ({
|
|
147
155
|
return /* @__PURE__ */ import_react.default.createElement(
|
148
156
|
"svg",
|
149
157
|
{
|
150
|
-
className: cn(
|
158
|
+
className: cn(
|
159
|
+
"squircle-container",
|
160
|
+
sizeStyles[size],
|
161
|
+
classNames == null ? void 0 : classNames.container
|
162
|
+
),
|
151
163
|
x: "0px",
|
152
164
|
y: "0px",
|
153
165
|
viewBox: "0 0 37 37",
|
@@ -184,7 +196,11 @@ var Loading = ({
|
|
184
196
|
return /* @__PURE__ */ import_react.default.createElement(
|
185
197
|
"svg",
|
186
198
|
{
|
187
|
-
className: cn(
|
199
|
+
className: cn(
|
200
|
+
"circle-container",
|
201
|
+
sizeStyles[size],
|
202
|
+
classNames == null ? void 0 : classNames.container
|
203
|
+
),
|
188
204
|
viewBox: "0 0 40 40",
|
189
205
|
height: "40",
|
190
206
|
width: "40"
|
@@ -192,10 +208,14 @@ var Loading = ({
|
|
192
208
|
/* @__PURE__ */ import_react.default.createElement(
|
193
209
|
"circle",
|
194
210
|
{
|
195
|
-
className: cn(
|
196
|
-
"
|
197
|
-
|
198
|
-
|
211
|
+
className: cn(
|
212
|
+
"circle-track",
|
213
|
+
{
|
214
|
+
"hawa-stroke-primary-foreground": themeMode === "dark",
|
215
|
+
"hawa-stroke-primary": themeMode === "light"
|
216
|
+
},
|
217
|
+
classNames == null ? void 0 : classNames.track
|
218
|
+
),
|
199
219
|
cx: "20",
|
200
220
|
cy: "20",
|
201
221
|
r: "17.5",
|
@@ -207,10 +227,14 @@ var Loading = ({
|
|
207
227
|
/* @__PURE__ */ import_react.default.createElement(
|
208
228
|
"circle",
|
209
229
|
{
|
210
|
-
className: cn(
|
211
|
-
"
|
212
|
-
|
213
|
-
|
230
|
+
className: cn(
|
231
|
+
"circle-car",
|
232
|
+
{
|
233
|
+
"hawa-stroke-primary-foreground": themeMode === "dark",
|
234
|
+
"hawa-stroke-primary": themeMode === "light"
|
235
|
+
},
|
236
|
+
classNames == null ? void 0 : classNames.car
|
237
|
+
),
|
214
238
|
cx: "20",
|
215
239
|
cy: "20",
|
216
240
|
r: "17.5",
|
package/dist/button/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../elements/button/index.ts","../../elements/button/Button.tsx","../../util/index.ts","../../elements/loading/Loading.tsx"],"sourcesContent":["export * from \"./Button\";\n","import * as React from \"react\";\n\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"@util/index\";\nimport { Loading } from \"../loading/Loading\";\n\nconst buttonVariants = cva(\n \"hawa-inline-flex hawa-items-center hawa-select-none hawa-rounded-md hawa-text-sm hawa-font-medium hawa-ring-offset-background hawa-transition-colors focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-2 disabled:hawa-pointer-events-none disabled:hawa-opacity-50\",\n {\n variants: {\n variant: {\n default:\n \"hawa-bg-primary hawa-text-primary-foreground hover:hawa-bg-primary/90\",\n light: \"hawa-bg-primary/20 hawa-text-primary hover:hawa-bg-primary/40\",\n destructive:\n \"hawa-bg-destructive hawa-text-destructive-foreground hover:hawa-bg-destructive/90\",\n outline:\n \"hawa-border hawa-border-input hawa-bg-transparent hover:hawa-bg-accent hover:hawa-text-accent-foreground\",\n secondary:\n \"hawa-bg-secondary hawa-text-secondary-foreground hover:hawa-bg-secondary/80\",\n ghost: \"hover:hawa-bg-accent hover:hawa-text-accent-foreground\",\n link: \"hawa-text-primary hawa-underline-offset-4 hover:hawa-underline\",\n combobox: \"hawa-bg-background hawa-border\",\n neoBrutalism: \"neo-brutalism\"\n // \"hawa-cursor-pointer hawa-transition-all hawa-uppercase hawa-font-mono dark:hawa-bg-black hawa-font-bold hawa-py-2 hawa-px-4 hawa-rounded hawa-border-2 hawa-border-primary hawa-shadow-color-primary hawa-transition-[hawa-transform_50ms, hawa-box-shadow_50ms] active:hawa-translate-x-0.5 active:hawa-translate-y-0.5 active:hawa-shadow-color-primary-active shadow-color-primary active:shadow-color-primary-active\",\n },\n size: {\n default: \"hawa-h-10 hawa-px-4 hawa-py-2\",\n heightless: \"hawa-px-4 hawa-py-4\",\n xs: \"hawa-h-fit hawa-min-h-[25px] hawa-py-1 hawa-text-[10px] hawa-px-2 \",\n sm: \"hawa-h-9 hawa-text-[11px] hawa-rounded-md hawa-px-3\",\n lg: \"hawa-h-11 hawa-rounded-md hawa-px-8\",\n xl: \"hawa-h-14 hawa-rounded-md hawa-px-10\",\n icon: \"hawa-h-10 hawa-w-10\",\n smallIcon: \"hawa-h-7 hawa-w-7\"\n }\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\"\n }\n }\n);\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean;\n centered?: boolean;\n isLoading?: boolean;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n className,\n variant,\n size,\n asChild = false,\n centered = true,\n isLoading,\n children,\n ...props\n },\n ref\n ) => {\n const Comp = \"button\";\n\n // Determine the color for the HawaLoading component based on the variant\n const loadingColor =\n variant === \"outline\" || variant === \"ghost\" || variant === \"neoBrutalism\"\n ? \"hawa-bg-primary\"\n : \"hawa-bg-primary-foreground\";\n\n return (\n <Comp\n className={cn(\n buttonVariants({ variant, size, className }),\n centered && \"hawa-justify-center\",\n // \"hawa-bg-red-500\"\n )}\n ref={ref}\n {...props}\n >\n {isLoading ? (\n <Loading\n design={\n size === \"icon\" || size === \"smallIcon\" ? \"spinner\" : \"dots-pulse\"\n }\n themeMode={variant === \"outline\" ? \"light\" : \"dark\"}\n color={loadingColor}\n size={size === \"sm\" || size === \"xs\" ? \"xs\" : \"button\"}\n />\n ) : (\n children\n )}\n </Comp>\n );\n }\n);\n\nButton.displayName = \"Button\";\n\nexport { Button, buttonVariants };\n","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\ntype Palette = {\n name: string;\n colors: {\n [key: number]: string;\n };\n};\ntype Rgb = {\n r: number;\n g: number;\n b: number;\n};\nfunction hexToRgb(hex: string): Rgb | null {\n const sanitizedHex = hex.replaceAll(\"##\", \"#\");\n const colorParts = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(\n sanitizedHex\n );\n\n if (!colorParts) {\n return null;\n }\n\n const [, r, g, b] = colorParts;\n\n return {\n r: parseInt(r, 16),\n g: parseInt(g, 16),\n b: parseInt(b, 16)\n } as Rgb;\n}\n\nfunction rgbToHex(r: number, g: number, b: number): string {\n const toHex = (c: number) => `0${c.toString(16)}`.slice(-2);\n return `#${toHex(r)}${toHex(g)}${toHex(b)}`;\n}\n\nexport function getTextColor(color: string): \"#FFF\" | \"#333\" {\n const rgbColor = hexToRgb(color);\n\n if (!rgbColor) {\n return \"#333\";\n }\n\n const { r, g, b } = rgbColor;\n const luma = 0.2126 * r + 0.7152 * g + 0.0722 * b;\n\n return luma < 120 ? \"#FFF\" : \"#333\";\n}\n\nfunction lighten(hex: string, intensity: number): string {\n const color = hexToRgb(`#${hex}`);\n\n if (!color) {\n return \"\";\n }\n\n const r = Math.round(color.r + (255 - color.r) * intensity);\n const g = Math.round(color.g + (255 - color.g) * intensity);\n const b = Math.round(color.b + (255 - color.b) * intensity);\n\n return rgbToHex(r, g, b);\n}\n\nfunction darken(hex: string, intensity: number): string {\n const color = hexToRgb(hex);\n\n if (!color) {\n return \"\";\n }\n\n const r = Math.round(color.r * intensity);\n const g = Math.round(color.g * intensity);\n const b = Math.round(color.b * intensity);\n\n return rgbToHex(r, g, b);\n}\nconst parseColor = (color: any) => {\n if (color.startsWith(\"#\")) {\n // Convert hex to RGB\n let r = parseInt(color.slice(1, 3), 16);\n let g = parseInt(color.slice(3, 5), 16);\n let b = parseInt(color.slice(5, 7), 16);\n return [r, g, b];\n } else if (color.startsWith(\"rgb\")) {\n // Extract RGB values from rgb() format\n return color.match(/\\d+/g).map(Number);\n }\n // Default to white if format is unrecognized\n return [255, 255, 255];\n};\nexport const calculateLuminance = (color: any) => {\n const [r, g, b] = parseColor(color)?.map((c: any) => {\n c /= 255;\n return c <= 0.03928 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4;\n });\n return 0.2126 * r + 0.7152 * g + 0.0722 * b;\n};\n\nfunction getPallette(baseColor: string): Palette {\n const name = baseColor;\n\n const response: Palette = {\n name,\n colors: {\n 500: `#${baseColor}`.replace(\"##\", \"#\")\n }\n };\n\n const intensityMap: {\n [key: number]: number;\n } = {\n 50: 0.95,\n 100: 0.9,\n 200: 0.75,\n 300: 0.6,\n 400: 0.3,\n 600: 0.9,\n 700: 0.75,\n 800: 0.6,\n 900: 0.49\n };\n\n [50, 100, 200, 300, 400].forEach((level) => {\n response.colors[level] = lighten(baseColor, intensityMap[level]);\n });\n [600, 700, 800, 900].forEach((level) => {\n response.colors[level] = darken(baseColor, intensityMap[level]);\n });\n\n return response as Palette;\n}\n\nexport { getPallette };\n\n// const hexToRgb = (hex) => {\n// let d = hex?.split(\"#\")[1];\n// var aRgbHex = d?.match(/.{1,2}/g);\n// var aRgb = [\n// parseInt(aRgbHex[0], 16),\n// parseInt(aRgbHex[1], 16),\n// parseInt(aRgbHex[2], 16)\n// ];\n// return aRgb;\n// };\n// const getTextColor = (backColor) => {\n// let rgbArray = hexToRgb(backColor);\n// if (rgbArray[0] * 0.299 + rgbArray[1] * 0.587 + rgbArray[2] * 0.114 > 186) {\n// return \"#000000\";\n// } else {\n// return \"#ffffff\";\n// }\n// };\n// const replaceAt = function (string, index, replacement) {\n// // if (replacement == \"\" || replacement == \" \") {\n// // return (\n// // string.substring(0, index) +\n// // string.substring(index + replacement.length )\n// // );\n// // }\n// const replaced = string.substring(0, index) + replacement + string.substring(index + 1)\n// return replaced\n// };\n\n// export { hexToRgb, getTextColor, replaceAt };\n","import React, { FC } from \"react\";\n\nimport { cn } from \"@util/index\";\n\ntype LoadingTypes = {\n /** Specifies the size of the loading component.*/\n size?: \"button\" | \"xs\" | \"sm\" | \"normal\" | \"lg\" | \"xl\";\n /** Determines the design of the loading animation.*/\n design?:\n | \"spinner\"\n | \"dots-bounce\"\n | \"dots-pulse\"\n | \"pulse\"\n | \"spinner-dots\"\n | \"squircle\"\n | \"square\"\n | \"progress\"\n | \"orbit\";\n /** Specifies the color of the loading component. By default it will inherit the value of <span className=\"inline-code\">--primary</span> global CSS variable*/\n color?: string;\n className?: string;\n themeMode?: \"dark\" | \"light\";\n};\n\nexport const Loading: FC<LoadingTypes> = ({\n design = \"spinner\",\n size = \"sm\",\n themeMode = \"light\",\n color,\n ...props\n}) => {\n let sizeStyles = {\n button: \"hawa-h-4 hawa-w-4\",\n xs: \"hawa-h-1 hawa-w-1\",\n sm: \"hawa-h-6 hawa-w-6\",\n normal: \"hawa-h-8 hawa-w-8\",\n lg: \"hawa-h-14 hawa-w-14\",\n xl: \"hawa-h-24 hawa-w-24\"\n };\n\n let animationStyles: any = {\n pulse: \"hawa-animate-in hawa-fade-in hawa-duration-1000\",\n bounce: \"hawa-animate-bounce\"\n };\n switch (design.split(\"-\")[0]) {\n case \"dots\":\n return (\n <div\n className={cn(\"hawa-flex hawa-flex-row hawa-gap-2\", props.className)}\n >\n <div\n className={cn(\n \"hawa-animate-bounce hawa-rounded-full hawa-delay-100 hawa-repeat-infinite\",\n size === \"button\" ? \"hawa-h-2 hawa-w-2\" : sizeStyles[size],\n animationStyles[design.split(\"-\")[1]],\n color ? color : \"hawa-bg-primary\"\n )}\n ></div>\n <div\n className={cn(\n \"hawa-animate-bounce hawa-rounded-full hawa-delay-200 hawa-repeat-infinite\",\n size === \"button\" ? \"hawa-h-2 hawa-w-2\" : sizeStyles[size],\n animationStyles[design.split(\"-\")[1]],\n color ? color : \"hawa-bg-primary\"\n )}\n ></div>\n <div\n className={cn(\n \"hawa-animate-bounce hawa-rounded-full hawa-delay-300 hawa-repeat-infinite\",\n size === \"button\" ? \"hawa-h-2 hawa-w-2\" : sizeStyles[size],\n animationStyles[design.split(\"-\")[1]],\n color ? color : \"hawa-bg-primary\"\n )}\n ></div>\n </div>\n );\n case \"square\":\n return (\n <svg\n className={cn(\"squircle-container\", sizeStyles[size])}\n viewBox=\"0 0 35 35\"\n height=\"35\"\n width=\"35\"\n >\n <rect\n className=\"squircle-track\"\n x=\"2.5\"\n y=\"2.5\"\n fill=\"none\"\n strokeWidth=\"5px\"\n width=\"32.5\"\n height=\"32.5\"\n />\n <rect\n className=\"square-car\"\n x=\"2.5\"\n y=\"2.5\"\n fill=\"none\"\n strokeWidth=\"5px\"\n width=\"32.5\"\n height=\"32.5\"\n pathLength=\"100\"\n />\n </svg>\n );\n case \"squircle\":\n return (\n <svg\n className={cn(\"squircle-container\", sizeStyles[size])}\n x=\"0px\"\n y=\"0px\"\n viewBox=\"0 0 37 37\"\n height=\"37\"\n width=\"37\"\n preserveAspectRatio=\"xMidYMid meet\"\n >\n <path\n className=\"squircle-track\"\n fill=\"none\"\n strokeWidth=\"5\"\n pathLength=\"100\"\n d=\"M0.37 18.5 C0.37 5.772 5.772 0.37 18.5 0.37 S36.63 5.772 36.63 18.5 S31.228 36.63 18.5 36.63 S0.37 31.228 0.37 18.5\"\n ></path>\n <path\n className=\"squircle-car\"\n fill=\"none\"\n strokeWidth=\"5\"\n pathLength=\"100\"\n d=\"M0.37 18.5 C0.37 5.772 5.772 0.37 18.5 0.37 S36.63 5.772 36.63 18.5 S31.228 36.63 18.5 36.63 S0.37 31.228 0.37 18.5\"\n ></path>\n </svg>\n );\n case \"progress\":\n return <div className=\"progress-loading\"></div>;\n case \"orbit\":\n return <div className=\"orbit-container\"></div>;\n\n default:\n return (\n <svg\n className={cn(\"circle-container\", sizeStyles[size])}\n viewBox=\"0 0 40 40\"\n height=\"40\"\n width=\"40\"\n >\n <circle\n className={cn(\"circle-track\", {\n \"hawa-stroke-primary-foreground\": themeMode === \"dark\",\n \"hawa-stroke-primary\": themeMode === \"light\"\n })}\n cx=\"20\"\n cy=\"20\"\n r=\"17.5\"\n pathLength=\"100\"\n strokeWidth=\"5px\"\n fill=\"none\"\n />\n <circle\n className={cn(\"circle-car\", {\n \"hawa-stroke-primary-foreground\": themeMode === \"dark\",\n \"hawa-stroke-primary\": themeMode === \"light\"\n })}\n cx=\"20\"\n cy=\"20\"\n r=\"17.5\"\n pathLength=\"100\"\n strokeWidth=\"5px\"\n fill=\"none\"\n />\n </svg>\n );\n // return (\n // <div\n // className={cn(\n // \"hawa-flex hawa-flex-row hawa-gap-x-3\",\n // props.className\n // )}\n // >\n // <div aria-label=\"Loading...\" role=\"status\">\n // <svg\n // className={cn(sizeStyles[size], \"hawa-animate-spin\")}\n // viewBox=\"3 3 18 18\"\n // >\n // <path\n // className=\"hawa-fill-primary/20\"\n // d=\"M12 5C8.13401 5 5 8.13401 5 12C5 15.866 8.13401 19 12 19C15.866 19 19 15.866 19 12C19 8.13401 15.866 5 12 5ZM3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12Z\"\n // ></path>\n // <path\n // className={color ? color : \"hawa-fill-primary\"}\n // d=\"M16.9497 7.05015C14.2161 4.31648 9.78392 4.31648 7.05025 7.05015C6.65973 7.44067 6.02656 7.44067 5.63604 7.05015C5.24551 6.65962 5.24551 6.02646 5.63604 5.63593C9.15076 2.12121 14.8492 2.12121 18.364 5.63593C18.7545 6.02646 18.7545 6.65962 18.364 7.05015C17.9734 7.44067 17.3403 7.44067 16.9497 7.05015Z\"\n // ></path>\n // </svg>\n // </div>\n // </div>\n // );\n }\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,SAAuB;AAEvB,sCAAuC;;;ACFvC,kBAAsC;AACtC,4BAAwB;AAEjB,SAAS,MAAM,QAAsB;AAC1C,aAAO,mCAAQ,kBAAK,MAAM,CAAC;AAC7B;;;ACLA,mBAA0B;AAwBnB,IAAM,UAA4B,CAAC;AAAA,EACxC,SAAS;AAAA,EACT,OAAO;AAAA,EACP,YAAY;AAAA,EACZ;AAAA,EACA,GAAG;AACL,MAAM;AACJ,MAAI,aAAa;AAAA,IACf,QAAQ;AAAA,IACR,IAA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;AAEN,WACE;AAAA,MAAC;AAAA;AAAA,QACC,WAAW;AAAA,UACT,eAAe,EAAE,SAAS,MAAM,UAAU,CAAC;AAAA,UAC3C,YAAY;AAAA;AAAA,QAEd;AAAA,QACA;AAAA,QACC,GAAG;AAAA;AAAA,MAEH,YACC;AAAA,QAAC;AAAA;AAAA,UACC,QACE,SAAS,UAAU,SAAS,cAAc,YAAY;AAAA,UAExD,WAAW,YAAY,YAAY,UAAU;AAAA,UAC7C,OAAO;AAAA,UACP,MAAM,SAAS,QAAQ,SAAS,OAAO,OAAO;AAAA;AAAA,MAChD,IAEA;AAAA,IAEJ;AAAA,EAEJ;AACF;AAEA,OAAO,cAAc;","names":["React","React"]}
|
1
|
+
{"version":3,"sources":["../../elements/button/index.ts","../../elements/button/Button.tsx","../../util/index.ts","../../elements/loading/Loading.tsx"],"sourcesContent":["export * from \"./Button\";\n","import * as React from \"react\";\n\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"@util/index\";\nimport { Loading } from \"../loading/Loading\";\n\nconst buttonVariants = cva(\n \"hawa-inline-flex hawa-items-center hawa-select-none hawa-rounded-md hawa-text-sm hawa-font-medium hawa-ring-offset-background hawa-transition-colors focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-2 disabled:hawa-pointer-events-none disabled:hawa-opacity-50\",\n {\n variants: {\n variant: {\n default:\n \"hawa-bg-primary hawa-text-primary-foreground hover:hawa-bg-primary/90\",\n light: \"hawa-bg-primary/20 hawa-text-primary hover:hawa-bg-primary/40\",\n destructive:\n \"hawa-bg-destructive hawa-text-destructive-foreground hover:hawa-bg-destructive/90\",\n outline:\n \"hawa-border hawa-border-input hawa-bg-transparent hover:hawa-bg-accent hover:hawa-text-accent-foreground\",\n secondary:\n \"hawa-bg-secondary hawa-text-secondary-foreground hover:hawa-bg-secondary/80\",\n ghost: \"hover:hawa-bg-accent hover:hawa-text-accent-foreground\",\n link: \"hawa-text-primary hawa-underline-offset-4 hover:hawa-underline\",\n combobox: \"hawa-bg-background hawa-border\",\n neoBrutalism: \"neo-brutalism\"\n // \"hawa-cursor-pointer hawa-transition-all hawa-uppercase hawa-font-mono dark:hawa-bg-black hawa-font-bold hawa-py-2 hawa-px-4 hawa-rounded hawa-border-2 hawa-border-primary hawa-shadow-color-primary hawa-transition-[hawa-transform_50ms, hawa-box-shadow_50ms] active:hawa-translate-x-0.5 active:hawa-translate-y-0.5 active:hawa-shadow-color-primary-active shadow-color-primary active:shadow-color-primary-active\",\n },\n size: {\n default: \"hawa-h-10 hawa-px-4 hawa-py-2\",\n heightless: \"hawa-px-4 hawa-py-4\",\n xs: \"hawa-h-fit hawa-min-h-[25px] hawa-py-1 hawa-text-[10px] hawa-px-2 \",\n sm: \"hawa-h-9 hawa-text-[11px] hawa-rounded-md hawa-px-3\",\n lg: \"hawa-h-11 hawa-rounded-md hawa-px-8\",\n xl: \"hawa-h-14 hawa-rounded-md hawa-px-10\",\n icon: \"hawa-h-10 hawa-w-10\",\n smallIcon: \"hawa-h-7 hawa-w-7\"\n }\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\"\n }\n }\n);\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean;\n centered?: boolean;\n isLoading?: boolean;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n className,\n variant,\n size,\n asChild = false,\n centered = true,\n isLoading,\n children,\n ...props\n },\n ref\n ) => {\n const Comp = \"button\";\n\n // Determine the color for the HawaLoading component based on the variant\n const loadingColor =\n variant === \"outline\" || variant === \"ghost\" || variant === \"neoBrutalism\"\n ? \"hawa-bg-primary\"\n : \"hawa-bg-primary-foreground\";\n\n return (\n <Comp\n className={cn(\n buttonVariants({ variant, size, className }),\n centered && \"hawa-justify-center\",\n // \"hawa-bg-red-500\"\n )}\n ref={ref}\n {...props}\n >\n {isLoading ? (\n <Loading\n design={\n size === \"icon\" || size === \"smallIcon\" ? \"spinner\" : \"dots-pulse\"\n }\n themeMode={variant === \"outline\" ? \"light\" : \"dark\"}\n color={loadingColor}\n size={size === \"sm\" || size === \"xs\" ? \"xs\" : \"button\"}\n />\n ) : (\n children\n )}\n </Comp>\n );\n }\n);\n\nButton.displayName = \"Button\";\n\nexport { Button, buttonVariants };\n","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\ntype Palette = {\n name: string;\n colors: {\n [key: number]: string;\n };\n};\ntype Rgb = {\n r: number;\n g: number;\n b: number;\n};\nfunction hexToRgb(hex: string): Rgb | null {\n const sanitizedHex = hex.replaceAll(\"##\", \"#\");\n const colorParts = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(\n sanitizedHex\n );\n\n if (!colorParts) {\n return null;\n }\n\n const [, r, g, b] = colorParts;\n\n return {\n r: parseInt(r, 16),\n g: parseInt(g, 16),\n b: parseInt(b, 16)\n } as Rgb;\n}\n\nfunction rgbToHex(r: number, g: number, b: number): string {\n const toHex = (c: number) => `0${c.toString(16)}`.slice(-2);\n return `#${toHex(r)}${toHex(g)}${toHex(b)}`;\n}\n\nexport function getTextColor(color: string): \"#FFF\" | \"#333\" {\n const rgbColor = hexToRgb(color);\n\n if (!rgbColor) {\n return \"#333\";\n }\n\n const { r, g, b } = rgbColor;\n const luma = 0.2126 * r + 0.7152 * g + 0.0722 * b;\n\n return luma < 120 ? \"#FFF\" : \"#333\";\n}\n\nfunction lighten(hex: string, intensity: number): string {\n const color = hexToRgb(`#${hex}`);\n\n if (!color) {\n return \"\";\n }\n\n const r = Math.round(color.r + (255 - color.r) * intensity);\n const g = Math.round(color.g + (255 - color.g) * intensity);\n const b = Math.round(color.b + (255 - color.b) * intensity);\n\n return rgbToHex(r, g, b);\n}\n\nfunction darken(hex: string, intensity: number): string {\n const color = hexToRgb(hex);\n\n if (!color) {\n return \"\";\n }\n\n const r = Math.round(color.r * intensity);\n const g = Math.round(color.g * intensity);\n const b = Math.round(color.b * intensity);\n\n return rgbToHex(r, g, b);\n}\nconst parseColor = (color: any) => {\n if (color.startsWith(\"#\")) {\n // Convert hex to RGB\n let r = parseInt(color.slice(1, 3), 16);\n let g = parseInt(color.slice(3, 5), 16);\n let b = parseInt(color.slice(5, 7), 16);\n return [r, g, b];\n } else if (color.startsWith(\"rgb\")) {\n // Extract RGB values from rgb() format\n return color.match(/\\d+/g).map(Number);\n }\n // Default to white if format is unrecognized\n return [255, 255, 255];\n};\nexport const calculateLuminance = (color: any) => {\n const [r, g, b] = parseColor(color)?.map((c: any) => {\n c /= 255;\n return c <= 0.03928 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4;\n });\n return 0.2126 * r + 0.7152 * g + 0.0722 * b;\n};\n\nfunction getPallette(baseColor: string): Palette {\n const name = baseColor;\n\n const response: Palette = {\n name,\n colors: {\n 500: `#${baseColor}`.replace(\"##\", \"#\")\n }\n };\n\n const intensityMap: {\n [key: number]: number;\n } = {\n 50: 0.95,\n 100: 0.9,\n 200: 0.75,\n 300: 0.6,\n 400: 0.3,\n 600: 0.9,\n 700: 0.75,\n 800: 0.6,\n 900: 0.49\n };\n\n [50, 100, 200, 300, 400].forEach((level) => {\n response.colors[level] = lighten(baseColor, intensityMap[level]);\n });\n [600, 700, 800, 900].forEach((level) => {\n response.colors[level] = darken(baseColor, intensityMap[level]);\n });\n\n return response as Palette;\n}\n\nexport { getPallette };\n\n// const hexToRgb = (hex) => {\n// let d = hex?.split(\"#\")[1];\n// var aRgbHex = d?.match(/.{1,2}/g);\n// var aRgb = [\n// parseInt(aRgbHex[0], 16),\n// parseInt(aRgbHex[1], 16),\n// parseInt(aRgbHex[2], 16)\n// ];\n// return aRgb;\n// };\n// const getTextColor = (backColor) => {\n// let rgbArray = hexToRgb(backColor);\n// if (rgbArray[0] * 0.299 + rgbArray[1] * 0.587 + rgbArray[2] * 0.114 > 186) {\n// return \"#000000\";\n// } else {\n// return \"#ffffff\";\n// }\n// };\n// const replaceAt = function (string, index, replacement) {\n// // if (replacement == \"\" || replacement == \" \") {\n// // return (\n// // string.substring(0, index) +\n// // string.substring(index + replacement.length )\n// // );\n// // }\n// const replaced = string.substring(0, index) + replacement + string.substring(index + 1)\n// return replaced\n// };\n\n// export { hexToRgb, getTextColor, replaceAt };\n","import React, { FC } from \"react\";\n\nimport { cn } from \"@util/index\";\n\ntype LoadingTypes = {\n /** Specifies the size of the loading component.*/\n size?: \"button\" | \"xs\" | \"sm\" | \"normal\" | \"lg\" | \"xl\";\n /** Determines the design of the loading animation.*/\n design?:\n | \"spinner\"\n | \"dots-bounce\"\n | \"dots-pulse\"\n | \"pulse\"\n | \"spinner-dots\"\n | \"squircle\"\n | \"square\"\n | \"progress\"\n | \"orbit\";\n /** Specifies the color of the loading component. By default it will inherit the value of --primary global CSS variable*/\n color?: string;\n classNames?: {\n container: string;\n track: string;\n car: string;\n };\n\n themeMode?: \"dark\" | \"light\";\n};\n\nexport const Loading: FC<LoadingTypes> = ({\n design = \"spinner\",\n size = \"sm\",\n themeMode = \"light\",\n classNames,\n color,\n ...props\n}) => {\n let sizeStyles = {\n button: \"hawa-h-4 hawa-w-4\",\n xs: \"hawa-h-1 hawa-w-1\",\n sm: \"hawa-h-6 hawa-w-6\",\n normal: \"hawa-h-8 hawa-w-8\",\n lg: \"hawa-h-14 hawa-w-14\",\n xl: \"hawa-h-24 hawa-w-24\"\n };\n\n let animationStyles: any = {\n pulse: \"hawa-animate-in hawa-fade-in hawa-duration-1000\",\n bounce: \"hawa-animate-bounce\"\n };\n switch (design.split(\"-\")[0]) {\n case \"dots\":\n return (\n <div\n className={cn(\n \"hawa-flex hawa-flex-row hawa-gap-2\",\n classNames?.container\n )}\n >\n <div\n className={cn(\n \"hawa-animate-bounce hawa-rounded-full hawa-delay-100 hawa-repeat-infinite\",\n size === \"button\" ? \"hawa-h-2 hawa-w-2\" : sizeStyles[size],\n animationStyles[design.split(\"-\")[1]],\n color ? color : \"hawa-bg-primary\"\n )}\n ></div>\n <div\n className={cn(\n \"hawa-animate-bounce hawa-rounded-full hawa-delay-200 hawa-repeat-infinite\",\n size === \"button\" ? \"hawa-h-2 hawa-w-2\" : sizeStyles[size],\n animationStyles[design.split(\"-\")[1]],\n color ? color : \"hawa-bg-primary\"\n )}\n ></div>\n <div\n className={cn(\n \"hawa-animate-bounce hawa-rounded-full hawa-delay-300 hawa-repeat-infinite\",\n size === \"button\" ? \"hawa-h-2 hawa-w-2\" : sizeStyles[size],\n animationStyles[design.split(\"-\")[1]],\n color ? color : \"hawa-bg-primary\"\n )}\n ></div>\n </div>\n );\n case \"square\":\n return (\n <svg\n className={cn(\n \"squircle-container\",\n sizeStyles[size],\n classNames?.container\n )}\n viewBox=\"0 0 35 35\"\n height=\"35\"\n width=\"35\"\n >\n <rect\n className=\"squircle-track\"\n x=\"2.5\"\n y=\"2.5\"\n fill=\"none\"\n strokeWidth=\"5px\"\n width=\"32.5\"\n height=\"32.5\"\n />\n <rect\n className=\"square-car\"\n x=\"2.5\"\n y=\"2.5\"\n fill=\"none\"\n strokeWidth=\"5px\"\n width=\"32.5\"\n height=\"32.5\"\n pathLength=\"100\"\n />\n </svg>\n );\n case \"squircle\":\n return (\n <svg\n className={cn(\n \"squircle-container\",\n sizeStyles[size],\n classNames?.container\n )}\n x=\"0px\"\n y=\"0px\"\n viewBox=\"0 0 37 37\"\n height=\"37\"\n width=\"37\"\n preserveAspectRatio=\"xMidYMid meet\"\n >\n <path\n className=\"squircle-track\"\n fill=\"none\"\n strokeWidth=\"5\"\n pathLength=\"100\"\n d=\"M0.37 18.5 C0.37 5.772 5.772 0.37 18.5 0.37 S36.63 5.772 36.63 18.5 S31.228 36.63 18.5 36.63 S0.37 31.228 0.37 18.5\"\n ></path>\n <path\n className=\"squircle-car\"\n fill=\"none\"\n strokeWidth=\"5\"\n pathLength=\"100\"\n d=\"M0.37 18.5 C0.37 5.772 5.772 0.37 18.5 0.37 S36.63 5.772 36.63 18.5 S31.228 36.63 18.5 36.63 S0.37 31.228 0.37 18.5\"\n ></path>\n </svg>\n );\n case \"progress\":\n return <div className=\"progress-loading\"></div>;\n case \"orbit\":\n return <div className=\"orbit-container\"></div>;\n\n default:\n return (\n <svg\n className={cn(\n \"circle-container\",\n sizeStyles[size],\n classNames?.container\n )}\n viewBox=\"0 0 40 40\"\n height=\"40\"\n width=\"40\"\n >\n <circle\n className={cn(\n \"circle-track\",\n {\n \"hawa-stroke-primary-foreground\": themeMode === \"dark\",\n \"hawa-stroke-primary\": themeMode === \"light\"\n },\n classNames?.track\n )}\n cx=\"20\"\n cy=\"20\"\n r=\"17.5\"\n pathLength=\"100\"\n strokeWidth=\"5px\"\n fill=\"none\"\n />\n <circle\n className={cn(\n \"circle-car\",\n {\n \"hawa-stroke-primary-foreground\": themeMode === \"dark\",\n \"hawa-stroke-primary\": themeMode === \"light\"\n },\n classNames?.car\n )}\n cx=\"20\"\n cy=\"20\"\n r=\"17.5\"\n pathLength=\"100\"\n strokeWidth=\"5px\"\n fill=\"none\"\n />\n </svg>\n );\n // return (\n // <div\n // className={cn(\n // \"hawa-flex hawa-flex-row hawa-gap-x-3\",\n // props.className\n // )}\n // >\n // <div aria-label=\"Loading...\" role=\"status\">\n // <svg\n // className={cn(sizeStyles[size], \"hawa-animate-spin\")}\n // viewBox=\"3 3 18 18\"\n // >\n // <path\n // className=\"hawa-fill-primary/20\"\n // d=\"M12 5C8.13401 5 5 8.13401 5 12C5 15.866 8.13401 19 12 19C15.866 19 19 15.866 19 12C19 8.13401 15.866 5 12 5ZM3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12Z\"\n // ></path>\n // <path\n // className={color ? color : \"hawa-fill-primary\"}\n // d=\"M16.9497 7.05015C14.2161 4.31648 9.78392 4.31648 7.05025 7.05015C6.65973 7.44067 6.02656 7.44067 5.63604 7.05015C5.24551 6.65962 5.24551 6.02646 5.63604 5.63593C9.15076 2.12121 14.8492 2.12121 18.364 5.63593C18.7545 6.02646 18.7545 6.65962 18.364 7.05015C17.9734 7.44067 17.3403 7.44067 16.9497 7.05015Z\"\n // ></path>\n // </svg>\n // </div>\n // </div>\n // );\n }\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,SAAuB;AAEvB,sCAAuC;;;ACFvC,kBAAsC;AACtC,4BAAwB;AAEjB,SAAS,MAAM,QAAsB;AAC1C,aAAO,mCAAQ,kBAAK,MAAM,CAAC;AAC7B;;;ACLA,mBAA0B;AA6BnB,IAAM,UAA4B,CAAC;AAAA,EACxC,SAAS;AAAA,EACT,OAAO;AAAA,EACP,YAAY;AAAA,EACZ;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,MAAI,aAAa;AAAA,IACf,QAAQ;AAAA,IACR,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,QAAQ;AAAA,IACR,IAAI;AAAA,IACJ,IAAI;AAAA,EACN;AAEA,MAAI,kBAAuB;AAAA,IACzB,OAAO;AAAA,IACP,QAAQ;AAAA,EACV;AACA,UAAQ,OAAO,MAAM,GAAG,EAAE,CAAC,GAAG;AAAA,IAC5B,KAAK;AACH,aACE,6BAAAC,QAAA;AAAA,QAAC;AAAA;AAAA,UACC,WAAW;AAAA,YACT;AAAA,YACA,yCAAY;AAAA,UACd;AAAA;AAAA,QAEA,6BAAAA,QAAA;AAAA,UAAC;AAAA;AAAA,YACC,WAAW;AAAA,cACT;AAAA,cACA,SAAS,WAAW,sBAAsB,WAAW,IAAI;AAAA,cACzD,gBAAgB,OAAO,MAAM,GAAG,EAAE,CAAC,CAAC;AAAA,cACpC,QAAQ,QAAQ;AAAA,YAClB;AAAA;AAAA,QACD;AAAA,QACD,6BAAAA,QAAA;AAAA,UAAC;AAA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]}
|
package/dist/button/index.mjs
CHANGED
@@ -15,6 +15,7 @@ var Loading = ({
|
|
15
15
|
design = "spinner",
|
16
16
|
size = "sm",
|
17
17
|
themeMode = "light",
|
18
|
+
classNames,
|
18
19
|
color,
|
19
20
|
...props
|
20
21
|
}) => {
|
@@ -35,7 +36,10 @@ var Loading = ({
|
|
35
36
|
return /* @__PURE__ */ React.createElement(
|
36
37
|
"div",
|
37
38
|
{
|
38
|
-
className: cn(
|
39
|
+
className: cn(
|
40
|
+
"hawa-flex hawa-flex-row hawa-gap-2",
|
41
|
+
classNames == null ? void 0 : classNames.container
|
42
|
+
)
|
39
43
|
},
|
40
44
|
/* @__PURE__ */ React.createElement(
|
41
45
|
"div",
|
@@ -75,7 +79,11 @@ var Loading = ({
|
|
75
79
|
return /* @__PURE__ */ React.createElement(
|
76
80
|
"svg",
|
77
81
|
{
|
78
|
-
className: cn(
|
82
|
+
className: cn(
|
83
|
+
"squircle-container",
|
84
|
+
sizeStyles[size],
|
85
|
+
classNames == null ? void 0 : classNames.container
|
86
|
+
),
|
79
87
|
viewBox: "0 0 35 35",
|
80
88
|
height: "35",
|
81
89
|
width: "35"
|
@@ -110,7 +118,11 @@ var Loading = ({
|
|
110
118
|
return /* @__PURE__ */ React.createElement(
|
111
119
|
"svg",
|
112
120
|
{
|
113
|
-
className: cn(
|
121
|
+
className: cn(
|
122
|
+
"squircle-container",
|
123
|
+
sizeStyles[size],
|
124
|
+
classNames == null ? void 0 : classNames.container
|
125
|
+
),
|
114
126
|
x: "0px",
|
115
127
|
y: "0px",
|
116
128
|
viewBox: "0 0 37 37",
|
@@ -147,7 +159,11 @@ var Loading = ({
|
|
147
159
|
return /* @__PURE__ */ React.createElement(
|
148
160
|
"svg",
|
149
161
|
{
|
150
|
-
className: cn(
|
162
|
+
className: cn(
|
163
|
+
"circle-container",
|
164
|
+
sizeStyles[size],
|
165
|
+
classNames == null ? void 0 : classNames.container
|
166
|
+
),
|
151
167
|
viewBox: "0 0 40 40",
|
152
168
|
height: "40",
|
153
169
|
width: "40"
|
@@ -155,10 +171,14 @@ var Loading = ({
|
|
155
171
|
/* @__PURE__ */ React.createElement(
|
156
172
|
"circle",
|
157
173
|
{
|
158
|
-
className: cn(
|
159
|
-
"
|
160
|
-
|
161
|
-
|
174
|
+
className: cn(
|
175
|
+
"circle-track",
|
176
|
+
{
|
177
|
+
"hawa-stroke-primary-foreground": themeMode === "dark",
|
178
|
+
"hawa-stroke-primary": themeMode === "light"
|
179
|
+
},
|
180
|
+
classNames == null ? void 0 : classNames.track
|
181
|
+
),
|
162
182
|
cx: "20",
|
163
183
|
cy: "20",
|
164
184
|
r: "17.5",
|
@@ -170,10 +190,14 @@ var Loading = ({
|
|
170
190
|
/* @__PURE__ */ React.createElement(
|
171
191
|
"circle",
|
172
192
|
{
|
173
|
-
className: cn(
|
174
|
-
"
|
175
|
-
|
176
|
-
|
193
|
+
className: cn(
|
194
|
+
"circle-car",
|
195
|
+
{
|
196
|
+
"hawa-stroke-primary-foreground": themeMode === "dark",
|
197
|
+
"hawa-stroke-primary": themeMode === "light"
|
198
|
+
},
|
199
|
+
classNames == null ? void 0 : classNames.car
|
200
|
+
),
|
177
201
|
cx: "20",
|
178
202
|
cy: "20",
|
179
203
|
r: "17.5",
|