@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/hooks/index.mjs
CHANGED
@@ -32,17 +32,13 @@ var addToRemoveQueue = (toastId) => {
|
|
32
32
|
}
|
33
33
|
const timeout = setTimeout(() => {
|
34
34
|
toastTimeouts.delete(toastId);
|
35
|
-
dispatch({
|
36
|
-
type: "REMOVE_TOAST",
|
37
|
-
toastId
|
38
|
-
});
|
35
|
+
dispatch({ type: "REMOVE_TOAST", toastId });
|
39
36
|
}, TOAST_REMOVE_DELAY);
|
40
37
|
toastTimeouts.set(toastId, timeout);
|
41
38
|
};
|
42
39
|
var reducer = (state, action) => {
|
43
40
|
switch (action.type) {
|
44
41
|
case "ADD_TOAST":
|
45
|
-
console.log("adding toast case");
|
46
42
|
return {
|
47
43
|
...state,
|
48
44
|
toasts: [action.toast, ...state.toasts].slice(0, TOAST_LIMIT)
|
@@ -83,19 +79,14 @@ var reducer = (state, action) => {
|
|
83
79
|
var listeners = [];
|
84
80
|
var memoryState = { toasts: [] };
|
85
81
|
function dispatch(action) {
|
86
|
-
console.log("dispatching toast");
|
87
82
|
memoryState = reducer(memoryState, action);
|
88
83
|
listeners.forEach((listener) => {
|
89
|
-
console.log("mapping through listerners in dispathc");
|
90
84
|
listener(memoryState);
|
91
85
|
});
|
92
86
|
}
|
93
87
|
function toast({ ...props }) {
|
94
88
|
const id = genId();
|
95
|
-
const update = (props2) => dispatch({
|
96
|
-
type: "UPDATE_TOAST",
|
97
|
-
toast: { ...props2, id }
|
98
|
-
});
|
89
|
+
const update = (props2) => dispatch({ type: "UPDATE_TOAST", toast: { ...props2, id } });
|
99
90
|
const dismiss = () => dispatch({ type: "DISMISS_TOAST", toastId: id });
|
100
91
|
dispatch({
|
101
92
|
type: "ADD_TOAST",
|
@@ -109,23 +100,14 @@ function toast({ ...props }) {
|
|
109
100
|
}
|
110
101
|
}
|
111
102
|
});
|
112
|
-
return {
|
113
|
-
id,
|
114
|
-
dismiss,
|
115
|
-
update
|
116
|
-
};
|
103
|
+
return { id, dismiss, update };
|
117
104
|
}
|
118
105
|
function useToast() {
|
119
106
|
const [state, setState] = React3.useState(memoryState);
|
120
107
|
React3.useEffect(() => {
|
121
|
-
console.log("useToast triggered in useEffect");
|
122
|
-
console.log("toast state", state);
|
123
|
-
console.log("listerners BEFORE", listeners);
|
124
|
-
console.log("TOAST: setState is ", setState);
|
125
108
|
listeners.push(setState);
|
126
109
|
return () => {
|
127
110
|
const index = listeners.indexOf(setState);
|
128
|
-
console.log("listerners AFTER", listeners);
|
129
111
|
if (index > -1) {
|
130
112
|
listeners.splice(index, 1);
|
131
113
|
}
|
package/dist/index.css
CHANGED
@@ -586,23 +586,6 @@ video {
|
|
586
586
|
text-decoration: underline;
|
587
587
|
color: var(--button-primary-700);
|
588
588
|
}
|
589
|
-
.inline-code {
|
590
|
-
font-size: 0.75rem !important;
|
591
|
-
width: -moz-fit-content;
|
592
|
-
width: fit-content;
|
593
|
-
border-radius: var(--radius);
|
594
|
-
padding: 0.25rem 0.375rem;
|
595
|
-
border: #d1d5db 1px solid;
|
596
|
-
font-family:
|
597
|
-
ui-monospace,
|
598
|
-
SFMono-Regular,
|
599
|
-
Menlo,
|
600
|
-
Monaco,
|
601
|
-
Consolas,
|
602
|
-
Liberation Mono,
|
603
|
-
Courier New,
|
604
|
-
monospace !important;
|
605
|
-
}
|
606
589
|
input[type="number"]::-webkit-inner-spin-button,
|
607
590
|
input[type="number"]::-webkit-outer-spin-button {
|
608
591
|
-webkit-appearance: none;
|
@@ -2194,9 +2177,9 @@ input[type="number"]::-webkit-inner-spin-button,
|
|
2194
2177
|
--tw-bg-opacity: 1;
|
2195
2178
|
background-color: rgb(107 114 128 / var(--tw-bg-opacity));
|
2196
2179
|
}
|
2197
|
-
.hawa-bg-gray-
|
2180
|
+
.hawa-bg-gray-800 {
|
2198
2181
|
--tw-bg-opacity: 1;
|
2199
|
-
background-color: rgb(
|
2182
|
+
background-color: rgb(31 41 55 / var(--tw-bg-opacity));
|
2200
2183
|
}
|
2201
2184
|
.hawa-bg-gray-900 {
|
2202
2185
|
--tw-bg-opacity: 1;
|
package/dist/index.d.mts
CHANGED
@@ -41,9 +41,13 @@ type LoadingTypes = {
|
|
41
41
|
size?: "button" | "xs" | "sm" | "normal" | "lg" | "xl";
|
42
42
|
/** Determines the design of the loading animation.*/
|
43
43
|
design?: "spinner" | "dots-bounce" | "dots-pulse" | "pulse" | "spinner-dots" | "squircle" | "square" | "progress" | "orbit";
|
44
|
-
/** Specifies the color of the loading component. By default it will inherit the value of
|
44
|
+
/** Specifies the color of the loading component. By default it will inherit the value of --primary global CSS variable*/
|
45
45
|
color?: string;
|
46
|
-
|
46
|
+
classNames?: {
|
47
|
+
container: string;
|
48
|
+
track: string;
|
49
|
+
car: string;
|
50
|
+
};
|
47
51
|
themeMode?: "dark" | "light";
|
48
52
|
};
|
49
53
|
declare const Loading: FC<LoadingTypes>;
|
package/dist/index.d.ts
CHANGED
@@ -41,9 +41,13 @@ type LoadingTypes = {
|
|
41
41
|
size?: "button" | "xs" | "sm" | "normal" | "lg" | "xl";
|
42
42
|
/** Determines the design of the loading animation.*/
|
43
43
|
design?: "spinner" | "dots-bounce" | "dots-pulse" | "pulse" | "spinner-dots" | "squircle" | "square" | "progress" | "orbit";
|
44
|
-
/** Specifies the color of the loading component. By default it will inherit the value of
|
44
|
+
/** Specifies the color of the loading component. By default it will inherit the value of --primary global CSS variable*/
|
45
45
|
color?: string;
|
46
|
-
|
46
|
+
classNames?: {
|
47
|
+
container: string;
|
48
|
+
track: string;
|
49
|
+
car: string;
|
50
|
+
};
|
47
51
|
themeMode?: "dark" | "light";
|
48
52
|
};
|
49
53
|
declare const Loading: FC<LoadingTypes>;
|
package/dist/index.js
CHANGED
@@ -354,6 +354,7 @@ var Loading = ({
|
|
354
354
|
design = "spinner",
|
355
355
|
size = "sm",
|
356
356
|
themeMode = "light",
|
357
|
+
classNames,
|
357
358
|
color,
|
358
359
|
...props
|
359
360
|
}) => {
|
@@ -374,7 +375,10 @@ var Loading = ({
|
|
374
375
|
return /* @__PURE__ */ import_react.default.createElement(
|
375
376
|
"div",
|
376
377
|
{
|
377
|
-
className: cn(
|
378
|
+
className: cn(
|
379
|
+
"hawa-flex hawa-flex-row hawa-gap-2",
|
380
|
+
classNames == null ? void 0 : classNames.container
|
381
|
+
)
|
378
382
|
},
|
379
383
|
/* @__PURE__ */ import_react.default.createElement(
|
380
384
|
"div",
|
@@ -414,7 +418,11 @@ var Loading = ({
|
|
414
418
|
return /* @__PURE__ */ import_react.default.createElement(
|
415
419
|
"svg",
|
416
420
|
{
|
417
|
-
className: cn(
|
421
|
+
className: cn(
|
422
|
+
"squircle-container",
|
423
|
+
sizeStyles2[size],
|
424
|
+
classNames == null ? void 0 : classNames.container
|
425
|
+
),
|
418
426
|
viewBox: "0 0 35 35",
|
419
427
|
height: "35",
|
420
428
|
width: "35"
|
@@ -449,7 +457,11 @@ var Loading = ({
|
|
449
457
|
return /* @__PURE__ */ import_react.default.createElement(
|
450
458
|
"svg",
|
451
459
|
{
|
452
|
-
className: cn(
|
460
|
+
className: cn(
|
461
|
+
"squircle-container",
|
462
|
+
sizeStyles2[size],
|
463
|
+
classNames == null ? void 0 : classNames.container
|
464
|
+
),
|
453
465
|
x: "0px",
|
454
466
|
y: "0px",
|
455
467
|
viewBox: "0 0 37 37",
|
@@ -486,7 +498,11 @@ var Loading = ({
|
|
486
498
|
return /* @__PURE__ */ import_react.default.createElement(
|
487
499
|
"svg",
|
488
500
|
{
|
489
|
-
className: cn(
|
501
|
+
className: cn(
|
502
|
+
"circle-container",
|
503
|
+
sizeStyles2[size],
|
504
|
+
classNames == null ? void 0 : classNames.container
|
505
|
+
),
|
490
506
|
viewBox: "0 0 40 40",
|
491
507
|
height: "40",
|
492
508
|
width: "40"
|
@@ -494,10 +510,14 @@ var Loading = ({
|
|
494
510
|
/* @__PURE__ */ import_react.default.createElement(
|
495
511
|
"circle",
|
496
512
|
{
|
497
|
-
className: cn(
|
498
|
-
"
|
499
|
-
|
500
|
-
|
513
|
+
className: cn(
|
514
|
+
"circle-track",
|
515
|
+
{
|
516
|
+
"hawa-stroke-primary-foreground": themeMode === "dark",
|
517
|
+
"hawa-stroke-primary": themeMode === "light"
|
518
|
+
},
|
519
|
+
classNames == null ? void 0 : classNames.track
|
520
|
+
),
|
501
521
|
cx: "20",
|
502
522
|
cy: "20",
|
503
523
|
r: "17.5",
|
@@ -509,10 +529,14 @@ var Loading = ({
|
|
509
529
|
/* @__PURE__ */ import_react.default.createElement(
|
510
530
|
"circle",
|
511
531
|
{
|
512
|
-
className: cn(
|
513
|
-
"
|
514
|
-
|
515
|
-
|
532
|
+
className: cn(
|
533
|
+
"circle-car",
|
534
|
+
{
|
535
|
+
"hawa-stroke-primary-foreground": themeMode === "dark",
|
536
|
+
"hawa-stroke-primary": themeMode === "light"
|
537
|
+
},
|
538
|
+
classNames == null ? void 0 : classNames.car
|
539
|
+
),
|
516
540
|
cx: "20",
|
517
541
|
cy: "20",
|
518
542
|
r: "17.5",
|
@@ -7175,7 +7199,7 @@ var CodeBlock = ({
|
|
7175
7199
|
"div",
|
7176
7200
|
{
|
7177
7201
|
className: cn(
|
7178
|
-
"hawa-flex hawa-w-full hawa-flex-row hawa-items-start hawa-justify-between hawa-border hawa-bg-gray-
|
7202
|
+
"hawa-flex hawa-w-full hawa-flex-row hawa-items-start hawa-justify-between hawa-border hawa-bg-gray-800 hawa-p-0 hawa-text-left hawa-text-sm sm:hawa-text-base ",
|
7179
7203
|
tabs || fileName ? "hawa-rounded-b hawa-rounded-t-none" : "hawa-rounded"
|
7180
7204
|
)
|
7181
7205
|
},
|
@@ -11584,17 +11608,13 @@ var addToRemoveQueue = (toastId) => {
|
|
11584
11608
|
}
|
11585
11609
|
const timeout = setTimeout(() => {
|
11586
11610
|
toastTimeouts.delete(toastId);
|
11587
|
-
dispatch({
|
11588
|
-
type: "REMOVE_TOAST",
|
11589
|
-
toastId
|
11590
|
-
});
|
11611
|
+
dispatch({ type: "REMOVE_TOAST", toastId });
|
11591
11612
|
}, TOAST_REMOVE_DELAY);
|
11592
11613
|
toastTimeouts.set(toastId, timeout);
|
11593
11614
|
};
|
11594
11615
|
var reducer = (state, action) => {
|
11595
11616
|
switch (action.type) {
|
11596
11617
|
case "ADD_TOAST":
|
11597
|
-
console.log("adding toast case");
|
11598
11618
|
return {
|
11599
11619
|
...state,
|
11600
11620
|
toasts: [action.toast, ...state.toasts].slice(0, TOAST_LIMIT)
|
@@ -11635,19 +11655,14 @@ var reducer = (state, action) => {
|
|
11635
11655
|
var listeners = [];
|
11636
11656
|
var memoryState = { toasts: [] };
|
11637
11657
|
function dispatch(action) {
|
11638
|
-
console.log("dispatching toast");
|
11639
11658
|
memoryState = reducer(memoryState, action);
|
11640
11659
|
listeners.forEach((listener) => {
|
11641
|
-
console.log("mapping through listerners in dispathc");
|
11642
11660
|
listener(memoryState);
|
11643
11661
|
});
|
11644
11662
|
}
|
11645
11663
|
function toast({ ...props }) {
|
11646
11664
|
const id = genId();
|
11647
|
-
const update = (props2) => dispatch({
|
11648
|
-
type: "UPDATE_TOAST",
|
11649
|
-
toast: { ...props2, id }
|
11650
|
-
});
|
11665
|
+
const update = (props2) => dispatch({ type: "UPDATE_TOAST", toast: { ...props2, id } });
|
11651
11666
|
const dismiss = () => dispatch({ type: "DISMISS_TOAST", toastId: id });
|
11652
11667
|
dispatch({
|
11653
11668
|
type: "ADD_TOAST",
|
@@ -11661,23 +11676,14 @@ function toast({ ...props }) {
|
|
11661
11676
|
}
|
11662
11677
|
}
|
11663
11678
|
});
|
11664
|
-
return {
|
11665
|
-
id,
|
11666
|
-
dismiss,
|
11667
|
-
update
|
11668
|
-
};
|
11679
|
+
return { id, dismiss, update };
|
11669
11680
|
}
|
11670
11681
|
function useToast() {
|
11671
11682
|
const [state, setState] = React103.useState(memoryState);
|
11672
11683
|
React103.useEffect(() => {
|
11673
|
-
console.log("useToast triggered in useEffect");
|
11674
|
-
console.log("toast state", state);
|
11675
|
-
console.log("listerners BEFORE", listeners);
|
11676
|
-
console.log("TOAST: setState is ", setState);
|
11677
11684
|
listeners.push(setState);
|
11678
11685
|
return () => {
|
11679
11686
|
const index = listeners.indexOf(setState);
|
11680
|
-
console.log("listerners AFTER", listeners);
|
11681
11687
|
if (index > -1) {
|
11682
11688
|
listeners.splice(index, 1);
|
11683
11689
|
}
|
package/dist/index.mjs
CHANGED
@@ -121,6 +121,7 @@ var Loading = ({
|
|
121
121
|
design = "spinner",
|
122
122
|
size = "sm",
|
123
123
|
themeMode = "light",
|
124
|
+
classNames,
|
124
125
|
color,
|
125
126
|
...props
|
126
127
|
}) => {
|
@@ -141,7 +142,10 @@ var Loading = ({
|
|
141
142
|
return /* @__PURE__ */ React2.createElement(
|
142
143
|
"div",
|
143
144
|
{
|
144
|
-
className: cn(
|
145
|
+
className: cn(
|
146
|
+
"hawa-flex hawa-flex-row hawa-gap-2",
|
147
|
+
classNames == null ? void 0 : classNames.container
|
148
|
+
)
|
145
149
|
},
|
146
150
|
/* @__PURE__ */ React2.createElement(
|
147
151
|
"div",
|
@@ -181,7 +185,11 @@ var Loading = ({
|
|
181
185
|
return /* @__PURE__ */ React2.createElement(
|
182
186
|
"svg",
|
183
187
|
{
|
184
|
-
className: cn(
|
188
|
+
className: cn(
|
189
|
+
"squircle-container",
|
190
|
+
sizeStyles2[size],
|
191
|
+
classNames == null ? void 0 : classNames.container
|
192
|
+
),
|
185
193
|
viewBox: "0 0 35 35",
|
186
194
|
height: "35",
|
187
195
|
width: "35"
|
@@ -216,7 +224,11 @@ var Loading = ({
|
|
216
224
|
return /* @__PURE__ */ React2.createElement(
|
217
225
|
"svg",
|
218
226
|
{
|
219
|
-
className: cn(
|
227
|
+
className: cn(
|
228
|
+
"squircle-container",
|
229
|
+
sizeStyles2[size],
|
230
|
+
classNames == null ? void 0 : classNames.container
|
231
|
+
),
|
220
232
|
x: "0px",
|
221
233
|
y: "0px",
|
222
234
|
viewBox: "0 0 37 37",
|
@@ -253,7 +265,11 @@ var Loading = ({
|
|
253
265
|
return /* @__PURE__ */ React2.createElement(
|
254
266
|
"svg",
|
255
267
|
{
|
256
|
-
className: cn(
|
268
|
+
className: cn(
|
269
|
+
"circle-container",
|
270
|
+
sizeStyles2[size],
|
271
|
+
classNames == null ? void 0 : classNames.container
|
272
|
+
),
|
257
273
|
viewBox: "0 0 40 40",
|
258
274
|
height: "40",
|
259
275
|
width: "40"
|
@@ -261,10 +277,14 @@ var Loading = ({
|
|
261
277
|
/* @__PURE__ */ React2.createElement(
|
262
278
|
"circle",
|
263
279
|
{
|
264
|
-
className: cn(
|
265
|
-
"
|
266
|
-
|
267
|
-
|
280
|
+
className: cn(
|
281
|
+
"circle-track",
|
282
|
+
{
|
283
|
+
"hawa-stroke-primary-foreground": themeMode === "dark",
|
284
|
+
"hawa-stroke-primary": themeMode === "light"
|
285
|
+
},
|
286
|
+
classNames == null ? void 0 : classNames.track
|
287
|
+
),
|
268
288
|
cx: "20",
|
269
289
|
cy: "20",
|
270
290
|
r: "17.5",
|
@@ -276,10 +296,14 @@ var Loading = ({
|
|
276
296
|
/* @__PURE__ */ React2.createElement(
|
277
297
|
"circle",
|
278
298
|
{
|
279
|
-
className: cn(
|
280
|
-
"
|
281
|
-
|
282
|
-
|
299
|
+
className: cn(
|
300
|
+
"circle-car",
|
301
|
+
{
|
302
|
+
"hawa-stroke-primary-foreground": themeMode === "dark",
|
303
|
+
"hawa-stroke-primary": themeMode === "light"
|
304
|
+
},
|
305
|
+
classNames == null ? void 0 : classNames.car
|
306
|
+
),
|
283
307
|
cx: "20",
|
284
308
|
cy: "20",
|
285
309
|
r: "17.5",
|
@@ -6961,7 +6985,7 @@ var CodeBlock = ({
|
|
6961
6985
|
"div",
|
6962
6986
|
{
|
6963
6987
|
className: cn(
|
6964
|
-
"hawa-flex hawa-w-full hawa-flex-row hawa-items-start hawa-justify-between hawa-border hawa-bg-gray-
|
6988
|
+
"hawa-flex hawa-w-full hawa-flex-row hawa-items-start hawa-justify-between hawa-border hawa-bg-gray-800 hawa-p-0 hawa-text-left hawa-text-sm sm:hawa-text-base ",
|
6965
6989
|
tabs || fileName ? "hawa-rounded-b hawa-rounded-t-none" : "hawa-rounded"
|
6966
6990
|
)
|
6967
6991
|
},
|
@@ -11370,17 +11394,13 @@ var addToRemoveQueue = (toastId) => {
|
|
11370
11394
|
}
|
11371
11395
|
const timeout = setTimeout(() => {
|
11372
11396
|
toastTimeouts.delete(toastId);
|
11373
|
-
dispatch({
|
11374
|
-
type: "REMOVE_TOAST",
|
11375
|
-
toastId
|
11376
|
-
});
|
11397
|
+
dispatch({ type: "REMOVE_TOAST", toastId });
|
11377
11398
|
}, TOAST_REMOVE_DELAY);
|
11378
11399
|
toastTimeouts.set(toastId, timeout);
|
11379
11400
|
};
|
11380
11401
|
var reducer = (state, action) => {
|
11381
11402
|
switch (action.type) {
|
11382
11403
|
case "ADD_TOAST":
|
11383
|
-
console.log("adding toast case");
|
11384
11404
|
return {
|
11385
11405
|
...state,
|
11386
11406
|
toasts: [action.toast, ...state.toasts].slice(0, TOAST_LIMIT)
|
@@ -11421,19 +11441,14 @@ var reducer = (state, action) => {
|
|
11421
11441
|
var listeners = [];
|
11422
11442
|
var memoryState = { toasts: [] };
|
11423
11443
|
function dispatch(action) {
|
11424
|
-
console.log("dispatching toast");
|
11425
11444
|
memoryState = reducer(memoryState, action);
|
11426
11445
|
listeners.forEach((listener) => {
|
11427
|
-
console.log("mapping through listerners in dispathc");
|
11428
11446
|
listener(memoryState);
|
11429
11447
|
});
|
11430
11448
|
}
|
11431
11449
|
function toast({ ...props }) {
|
11432
11450
|
const id = genId();
|
11433
|
-
const update = (props2) => dispatch({
|
11434
|
-
type: "UPDATE_TOAST",
|
11435
|
-
toast: { ...props2, id }
|
11436
|
-
});
|
11451
|
+
const update = (props2) => dispatch({ type: "UPDATE_TOAST", toast: { ...props2, id } });
|
11437
11452
|
const dismiss = () => dispatch({ type: "DISMISS_TOAST", toastId: id });
|
11438
11453
|
dispatch({
|
11439
11454
|
type: "ADD_TOAST",
|
@@ -11447,23 +11462,14 @@ function toast({ ...props }) {
|
|
11447
11462
|
}
|
11448
11463
|
}
|
11449
11464
|
});
|
11450
|
-
return {
|
11451
|
-
id,
|
11452
|
-
dismiss,
|
11453
|
-
update
|
11454
|
-
};
|
11465
|
+
return { id, dismiss, update };
|
11455
11466
|
}
|
11456
11467
|
function useToast() {
|
11457
11468
|
const [state, setState] = React103.useState(memoryState);
|
11458
11469
|
React103.useEffect(() => {
|
11459
|
-
console.log("useToast triggered in useEffect");
|
11460
|
-
console.log("toast state", state);
|
11461
|
-
console.log("listerners BEFORE", listeners);
|
11462
|
-
console.log("TOAST: setState is ", setState);
|
11463
11470
|
listeners.push(setState);
|
11464
11471
|
return () => {
|
11465
11472
|
const index = listeners.indexOf(setState);
|
11466
|
-
console.log("listerners AFTER", listeners);
|
11467
11473
|
if (index > -1) {
|
11468
11474
|
listeners.splice(index, 1);
|
11469
11475
|
}
|
package/dist/layout/index.js
CHANGED
@@ -641,6 +641,7 @@ var Loading = ({
|
|
641
641
|
design = "spinner",
|
642
642
|
size = "sm",
|
643
643
|
themeMode = "light",
|
644
|
+
classNames,
|
644
645
|
color,
|
645
646
|
...props
|
646
647
|
}) => {
|
@@ -661,7 +662,10 @@ var Loading = ({
|
|
661
662
|
return /* @__PURE__ */ import_react6.default.createElement(
|
662
663
|
"div",
|
663
664
|
{
|
664
|
-
className: cn(
|
665
|
+
className: cn(
|
666
|
+
"hawa-flex hawa-flex-row hawa-gap-2",
|
667
|
+
classNames == null ? void 0 : classNames.container
|
668
|
+
)
|
665
669
|
},
|
666
670
|
/* @__PURE__ */ import_react6.default.createElement(
|
667
671
|
"div",
|
@@ -701,7 +705,11 @@ var Loading = ({
|
|
701
705
|
return /* @__PURE__ */ import_react6.default.createElement(
|
702
706
|
"svg",
|
703
707
|
{
|
704
|
-
className: cn(
|
708
|
+
className: cn(
|
709
|
+
"squircle-container",
|
710
|
+
sizeStyles[size],
|
711
|
+
classNames == null ? void 0 : classNames.container
|
712
|
+
),
|
705
713
|
viewBox: "0 0 35 35",
|
706
714
|
height: "35",
|
707
715
|
width: "35"
|
@@ -736,7 +744,11 @@ var Loading = ({
|
|
736
744
|
return /* @__PURE__ */ import_react6.default.createElement(
|
737
745
|
"svg",
|
738
746
|
{
|
739
|
-
className: cn(
|
747
|
+
className: cn(
|
748
|
+
"squircle-container",
|
749
|
+
sizeStyles[size],
|
750
|
+
classNames == null ? void 0 : classNames.container
|
751
|
+
),
|
740
752
|
x: "0px",
|
741
753
|
y: "0px",
|
742
754
|
viewBox: "0 0 37 37",
|
@@ -773,7 +785,11 @@ var Loading = ({
|
|
773
785
|
return /* @__PURE__ */ import_react6.default.createElement(
|
774
786
|
"svg",
|
775
787
|
{
|
776
|
-
className: cn(
|
788
|
+
className: cn(
|
789
|
+
"circle-container",
|
790
|
+
sizeStyles[size],
|
791
|
+
classNames == null ? void 0 : classNames.container
|
792
|
+
),
|
777
793
|
viewBox: "0 0 40 40",
|
778
794
|
height: "40",
|
779
795
|
width: "40"
|
@@ -781,10 +797,14 @@ var Loading = ({
|
|
781
797
|
/* @__PURE__ */ import_react6.default.createElement(
|
782
798
|
"circle",
|
783
799
|
{
|
784
|
-
className: cn(
|
785
|
-
"
|
786
|
-
|
787
|
-
|
800
|
+
className: cn(
|
801
|
+
"circle-track",
|
802
|
+
{
|
803
|
+
"hawa-stroke-primary-foreground": themeMode === "dark",
|
804
|
+
"hawa-stroke-primary": themeMode === "light"
|
805
|
+
},
|
806
|
+
classNames == null ? void 0 : classNames.track
|
807
|
+
),
|
788
808
|
cx: "20",
|
789
809
|
cy: "20",
|
790
810
|
r: "17.5",
|
@@ -796,10 +816,14 @@ var Loading = ({
|
|
796
816
|
/* @__PURE__ */ import_react6.default.createElement(
|
797
817
|
"circle",
|
798
818
|
{
|
799
|
-
className: cn(
|
800
|
-
"
|
801
|
-
|
802
|
-
|
819
|
+
className: cn(
|
820
|
+
"circle-car",
|
821
|
+
{
|
822
|
+
"hawa-stroke-primary-foreground": themeMode === "dark",
|
823
|
+
"hawa-stroke-primary": themeMode === "light"
|
824
|
+
},
|
825
|
+
classNames == null ? void 0 : classNames.car
|
826
|
+
),
|
803
827
|
cx: "20",
|
804
828
|
cy: "20",
|
805
829
|
r: "17.5",
|
package/dist/layout/index.mjs
CHANGED
@@ -5,7 +5,7 @@ import {
|
|
5
5
|
Sheet,
|
6
6
|
SheetContent,
|
7
7
|
SheetTrigger
|
8
|
-
} from "../chunk-
|
8
|
+
} from "../chunk-YQNGPETF.mjs";
|
9
9
|
import {
|
10
10
|
Button,
|
11
11
|
Card,
|
@@ -17,7 +17,7 @@ import {
|
|
17
17
|
Skeleton,
|
18
18
|
Tooltip,
|
19
19
|
cn
|
20
|
-
} from "../chunk-
|
20
|
+
} from "../chunk-WRPZUBMJ.mjs";
|
21
21
|
import "../chunk-ZFXKCRJC.mjs";
|
22
22
|
|
23
23
|
// layout/stats/Stats.tsx
|
package/dist/loading/index.d.mts
CHANGED
@@ -5,9 +5,13 @@ type LoadingTypes = {
|
|
5
5
|
size?: "button" | "xs" | "sm" | "normal" | "lg" | "xl";
|
6
6
|
/** Determines the design of the loading animation.*/
|
7
7
|
design?: "spinner" | "dots-bounce" | "dots-pulse" | "pulse" | "spinner-dots" | "squircle" | "square" | "progress" | "orbit";
|
8
|
-
/** Specifies the color of the loading component. By default it will inherit the value of
|
8
|
+
/** Specifies the color of the loading component. By default it will inherit the value of --primary global CSS variable*/
|
9
9
|
color?: string;
|
10
|
-
|
10
|
+
classNames?: {
|
11
|
+
container: string;
|
12
|
+
track: string;
|
13
|
+
car: string;
|
14
|
+
};
|
11
15
|
themeMode?: "dark" | "light";
|
12
16
|
};
|
13
17
|
declare const Loading: FC<LoadingTypes>;
|
package/dist/loading/index.d.ts
CHANGED
@@ -5,9 +5,13 @@ type LoadingTypes = {
|
|
5
5
|
size?: "button" | "xs" | "sm" | "normal" | "lg" | "xl";
|
6
6
|
/** Determines the design of the loading animation.*/
|
7
7
|
design?: "spinner" | "dots-bounce" | "dots-pulse" | "pulse" | "spinner-dots" | "squircle" | "square" | "progress" | "orbit";
|
8
|
-
/** Specifies the color of the loading component. By default it will inherit the value of
|
8
|
+
/** Specifies the color of the loading component. By default it will inherit the value of --primary global CSS variable*/
|
9
9
|
color?: string;
|
10
|
-
|
10
|
+
classNames?: {
|
11
|
+
container: string;
|
12
|
+
track: string;
|
13
|
+
car: string;
|
14
|
+
};
|
11
15
|
themeMode?: "dark" | "light";
|
12
16
|
};
|
13
17
|
declare const Loading: FC<LoadingTypes>;
|