@sikka/hawa 0.26.34 → 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.
Files changed (78) hide show
  1. package/dist/alert/index.js +36 -12
  2. package/dist/alert/index.js.map +1 -1
  3. package/dist/alert/index.mjs +36 -12
  4. package/dist/alert/index.mjs.map +1 -1
  5. package/dist/appLayout/index.js +36 -12
  6. package/dist/appLayout/index.js.map +1 -1
  7. package/dist/appLayout/index.mjs +36 -12
  8. package/dist/appLayout/index.mjs.map +1 -1
  9. package/dist/backToTop/index.js +36 -12
  10. package/dist/backToTop/index.js.map +1 -1
  11. package/dist/backToTop/index.mjs +36 -12
  12. package/dist/backToTop/index.mjs.map +1 -1
  13. package/dist/blocks/auth/index.js +36 -12
  14. package/dist/blocks/auth/index.mjs +4 -4
  15. package/dist/blocks/feedback/index.js +36 -12
  16. package/dist/blocks/feedback/index.mjs +5 -5
  17. package/dist/blocks/index.js +36 -12
  18. package/dist/blocks/index.mjs +2 -2
  19. package/dist/blocks/misc/index.js +36 -12
  20. package/dist/blocks/misc/index.mjs +4 -4
  21. package/dist/blocks/pricing/index.js +36 -12
  22. package/dist/blocks/pricing/index.mjs +4 -4
  23. package/dist/button/index.js +36 -12
  24. package/dist/button/index.js.map +1 -1
  25. package/dist/button/index.mjs +36 -12
  26. package/dist/button/index.mjs.map +1 -1
  27. package/dist/{chunk-OY66MBXP.mjs → chunk-3XQAC7AK.mjs} +1 -1
  28. package/dist/{chunk-NMS5LCSQ.mjs → chunk-7HKPCELH.mjs} +1 -1
  29. package/dist/{chunk-5YXZXYLH.mjs → chunk-B3LVGXYC.mjs} +1 -1
  30. package/dist/{chunk-GVJYACGA.mjs → chunk-CDLNP6A4.mjs} +1 -1
  31. package/dist/{chunk-4EGKGSGY.mjs → chunk-COVI2KU2.mjs} +1 -1
  32. package/dist/{chunk-D36MPDGE.mjs → chunk-FVN4XR4B.mjs} +36 -12
  33. package/dist/{chunk-R4HAAT6R.mjs → chunk-W3D5MI6L.mjs} +1 -1
  34. package/dist/{chunk-F3DQJHTG.mjs → chunk-WM7JTAPS.mjs} +1 -1
  35. package/dist/{chunk-MQUAGP7K.mjs → chunk-WRPZUBMJ.mjs} +36 -12
  36. package/dist/{chunk-FQ6WVEHW.mjs → chunk-YQNGPETF.mjs} +1 -1
  37. package/dist/codeBlock/index.js +37 -13
  38. package/dist/codeBlock/index.js.map +1 -1
  39. package/dist/codeBlock/index.mjs +37 -13
  40. package/dist/codeBlock/index.mjs.map +1 -1
  41. package/dist/dataTable/index.js +36 -12
  42. package/dist/dataTable/index.js.map +1 -1
  43. package/dist/dataTable/index.mjs +36 -12
  44. package/dist/dataTable/index.mjs.map +1 -1
  45. package/dist/docsLayout/index.js +36 -12
  46. package/dist/docsLayout/index.js.map +1 -1
  47. package/dist/docsLayout/index.mjs +36 -12
  48. package/dist/docsLayout/index.mjs.map +1 -1
  49. package/dist/elements/index.d.mts +6 -2
  50. package/dist/elements/index.d.ts +6 -2
  51. package/dist/elements/index.js +37 -13
  52. package/dist/elements/index.mjs +4 -4
  53. package/dist/fileDropzone/index.js +36 -12
  54. package/dist/fileDropzone/index.js.map +1 -1
  55. package/dist/fileDropzone/index.mjs +36 -12
  56. package/dist/fileDropzone/index.mjs.map +1 -1
  57. package/dist/index.css +2 -19
  58. package/dist/index.d.mts +6 -2
  59. package/dist/index.d.ts +6 -2
  60. package/dist/index.js +37 -13
  61. package/dist/index.mjs +37 -13
  62. package/dist/layout/index.js +36 -12
  63. package/dist/layout/index.mjs +2 -2
  64. package/dist/loading/index.d.mts +6 -2
  65. package/dist/loading/index.d.ts +6 -2
  66. package/dist/loading/index.js +36 -12
  67. package/dist/loading/index.js.map +1 -1
  68. package/dist/loading/index.mjs +36 -12
  69. package/dist/loading/index.mjs.map +1 -1
  70. package/dist/sortButton/index.js +36 -12
  71. package/dist/sortButton/index.js.map +1 -1
  72. package/dist/sortButton/index.mjs +36 -12
  73. package/dist/sortButton/index.mjs.map +1 -1
  74. package/dist/splitButton/index.js +36 -12
  75. package/dist/splitButton/index.js.map +1 -1
  76. package/dist/splitButton/index.mjs +36 -12
  77. package/dist/splitButton/index.mjs.map +1 -1
  78. package/package.json +1 -1
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("hawa-flex hawa-flex-row hawa-gap-2", props.className)
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("squircle-container", sizeStyles2[size]),
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("squircle-container", sizeStyles2[size]),
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("circle-container", sizeStyles2[size]),
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("circle-track", {
498
- "hawa-stroke-primary-foreground": themeMode === "dark",
499
- "hawa-stroke-primary": themeMode === "light"
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("circle-car", {
513
- "hawa-stroke-primary-foreground": themeMode === "dark",
514
- "hawa-stroke-primary": themeMode === "light"
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-700 hawa-p-0 hawa-text-left hawa-text-sm sm:hawa-text-base ",
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
  },
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("hawa-flex hawa-flex-row hawa-gap-2", props.className)
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("squircle-container", sizeStyles2[size]),
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("squircle-container", sizeStyles2[size]),
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("circle-container", sizeStyles2[size]),
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("circle-track", {
265
- "hawa-stroke-primary-foreground": themeMode === "dark",
266
- "hawa-stroke-primary": themeMode === "light"
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("circle-car", {
280
- "hawa-stroke-primary-foreground": themeMode === "dark",
281
- "hawa-stroke-primary": themeMode === "light"
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-700 hawa-p-0 hawa-text-left hawa-text-sm sm:hawa-text-base ",
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
  },
@@ -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("hawa-flex hawa-flex-row hawa-gap-2", props.className)
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("squircle-container", sizeStyles[size]),
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("squircle-container", sizeStyles[size]),
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("circle-container", sizeStyles[size]),
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("circle-track", {
785
- "hawa-stroke-primary-foreground": themeMode === "dark",
786
- "hawa-stroke-primary": themeMode === "light"
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("circle-car", {
800
- "hawa-stroke-primary-foreground": themeMode === "dark",
801
- "hawa-stroke-primary": themeMode === "light"
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",
@@ -5,7 +5,7 @@ import {
5
5
  Sheet,
6
6
  SheetContent,
7
7
  SheetTrigger
8
- } from "../chunk-FQ6WVEHW.mjs";
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-MQUAGP7K.mjs";
20
+ } from "../chunk-WRPZUBMJ.mjs";
21
21
  import "../chunk-ZFXKCRJC.mjs";
22
22
 
23
23
  // layout/stats/Stats.tsx
@@ -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 <span className="inline-code">--primary</span> global CSS variable*/
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
- className?: string;
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>;
@@ -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 <span className="inline-code">--primary</span> global CSS variable*/
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
- className?: string;
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>;
@@ -49,6 +49,7 @@ var Loading = ({
49
49
  design = "spinner",
50
50
  size = "sm",
51
51
  themeMode = "light",
52
+ classNames,
52
53
  color,
53
54
  ...props
54
55
  }) => {
@@ -69,7 +70,10 @@ var Loading = ({
69
70
  return /* @__PURE__ */ import_react.default.createElement(
70
71
  "div",
71
72
  {
72
- className: cn("hawa-flex hawa-flex-row hawa-gap-2", props.className)
73
+ className: cn(
74
+ "hawa-flex hawa-flex-row hawa-gap-2",
75
+ classNames == null ? void 0 : classNames.container
76
+ )
73
77
  },
74
78
  /* @__PURE__ */ import_react.default.createElement(
75
79
  "div",
@@ -109,7 +113,11 @@ var Loading = ({
109
113
  return /* @__PURE__ */ import_react.default.createElement(
110
114
  "svg",
111
115
  {
112
- className: cn("squircle-container", sizeStyles[size]),
116
+ className: cn(
117
+ "squircle-container",
118
+ sizeStyles[size],
119
+ classNames == null ? void 0 : classNames.container
120
+ ),
113
121
  viewBox: "0 0 35 35",
114
122
  height: "35",
115
123
  width: "35"
@@ -144,7 +152,11 @@ var Loading = ({
144
152
  return /* @__PURE__ */ import_react.default.createElement(
145
153
  "svg",
146
154
  {
147
- className: cn("squircle-container", sizeStyles[size]),
155
+ className: cn(
156
+ "squircle-container",
157
+ sizeStyles[size],
158
+ classNames == null ? void 0 : classNames.container
159
+ ),
148
160
  x: "0px",
149
161
  y: "0px",
150
162
  viewBox: "0 0 37 37",
@@ -181,7 +193,11 @@ var Loading = ({
181
193
  return /* @__PURE__ */ import_react.default.createElement(
182
194
  "svg",
183
195
  {
184
- className: cn("circle-container", sizeStyles[size]),
196
+ className: cn(
197
+ "circle-container",
198
+ sizeStyles[size],
199
+ classNames == null ? void 0 : classNames.container
200
+ ),
185
201
  viewBox: "0 0 40 40",
186
202
  height: "40",
187
203
  width: "40"
@@ -189,10 +205,14 @@ var Loading = ({
189
205
  /* @__PURE__ */ import_react.default.createElement(
190
206
  "circle",
191
207
  {
192
- className: cn("circle-track", {
193
- "hawa-stroke-primary-foreground": themeMode === "dark",
194
- "hawa-stroke-primary": themeMode === "light"
195
- }),
208
+ className: cn(
209
+ "circle-track",
210
+ {
211
+ "hawa-stroke-primary-foreground": themeMode === "dark",
212
+ "hawa-stroke-primary": themeMode === "light"
213
+ },
214
+ classNames == null ? void 0 : classNames.track
215
+ ),
196
216
  cx: "20",
197
217
  cy: "20",
198
218
  r: "17.5",
@@ -204,10 +224,14 @@ var Loading = ({
204
224
  /* @__PURE__ */ import_react.default.createElement(
205
225
  "circle",
206
226
  {
207
- className: cn("circle-car", {
208
- "hawa-stroke-primary-foreground": themeMode === "dark",
209
- "hawa-stroke-primary": themeMode === "light"
210
- }),
227
+ className: cn(
228
+ "circle-car",
229
+ {
230
+ "hawa-stroke-primary-foreground": themeMode === "dark",
231
+ "hawa-stroke-primary": themeMode === "light"
232
+ },
233
+ classNames == null ? void 0 : classNames.car
234
+ ),
211
235
  cx: "20",
212
236
  cy: "20",
213
237
  r: "17.5",
@@ -1 +1 @@
1
- {"version":3,"sources":["../../elements/loading/index.ts","../../elements/loading/Loading.tsx","../../util/index.ts"],"sourcesContent":["export * from \"./Loading\";\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","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"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,mBAA0B;;;ACA1B,kBAAsC;AACtC,4BAAwB;AAEjB,SAAS,MAAM,QAAsB;AAC1C,aAAO,mCAAQ,kBAAK,MAAM,CAAC;AAC7B;;;ADmBO,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,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,QAAQ;AAAA,IACR,IAAI;AAAA,IACJ,IAAI;AAAA,EACN;AAEA,MAAI,kBAAuB;AAAA,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AAA,YACH,GAAE;AAAA,YACF,YAAW;AAAA,YACX,aAAY;AAAA,YACZ,MAAK;AAAA;AAAA,QACP;AAAA,QACA,6BAAAA,QAAA;AAAA,UAAC;AAAA;AAAA,YACC,WAAW,GAAG,cAAc;AAAA,cAC1B,kCAAkC,cAAc;AAAA,cAChD,uBAAuB,cAAc;AAAA,YACvC,CAAC;AAAA,YACD,IAAG;AAAA,YACH,IAAG;AAAA,YACH,GAAE;AAAA,YACF,YAAW;AAAA,YACX,aAAY;AAAA,YACZ,MAAK;AAAA;AAAA,QACP;AAAA,MACF;AAAA,EA0BN;AACF;","names":["React"]}
1
+ {"version":3,"sources":["../../elements/loading/index.ts","../../elements/loading/Loading.tsx","../../util/index.ts"],"sourcesContent":["export * from \"./Loading\";\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","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"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,mBAA0B;;;ACA1B,kBAAsC;AACtC,4BAAwB;AAEjB,SAAS,MAAM,QAAsB;AAC1C,aAAO,mCAAQ,kBAAK,MAAM,CAAC;AAC7B;;;ADwBO,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,6BAAAA,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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AAAA,cACA;AAAA,gBACE,kCAAkC,cAAc;AAAA,gBAChD,uBAAuB,cAAc;AAAA,cACvC;AAAA,cACA,yCAAY;AAAA,YACd;AAAA,YACA,IAAG;AAAA,YACH,IAAG;AAAA,YACH,GAAE;AAAA,YACF,YAAW;AAAA,YACX,aAAY;AAAA,YACZ,MAAK;AAAA;AAAA,QACP;AAAA,MACF;AAAA,EA0BN;AACF;","names":["React"]}
@@ -13,6 +13,7 @@ var Loading = ({
13
13
  design = "spinner",
14
14
  size = "sm",
15
15
  themeMode = "light",
16
+ classNames,
16
17
  color,
17
18
  ...props
18
19
  }) => {
@@ -33,7 +34,10 @@ var Loading = ({
33
34
  return /* @__PURE__ */ React.createElement(
34
35
  "div",
35
36
  {
36
- className: cn("hawa-flex hawa-flex-row hawa-gap-2", props.className)
37
+ className: cn(
38
+ "hawa-flex hawa-flex-row hawa-gap-2",
39
+ classNames == null ? void 0 : classNames.container
40
+ )
37
41
  },
38
42
  /* @__PURE__ */ React.createElement(
39
43
  "div",
@@ -73,7 +77,11 @@ var Loading = ({
73
77
  return /* @__PURE__ */ React.createElement(
74
78
  "svg",
75
79
  {
76
- className: cn("squircle-container", sizeStyles[size]),
80
+ className: cn(
81
+ "squircle-container",
82
+ sizeStyles[size],
83
+ classNames == null ? void 0 : classNames.container
84
+ ),
77
85
  viewBox: "0 0 35 35",
78
86
  height: "35",
79
87
  width: "35"
@@ -108,7 +116,11 @@ var Loading = ({
108
116
  return /* @__PURE__ */ React.createElement(
109
117
  "svg",
110
118
  {
111
- className: cn("squircle-container", sizeStyles[size]),
119
+ className: cn(
120
+ "squircle-container",
121
+ sizeStyles[size],
122
+ classNames == null ? void 0 : classNames.container
123
+ ),
112
124
  x: "0px",
113
125
  y: "0px",
114
126
  viewBox: "0 0 37 37",
@@ -145,7 +157,11 @@ var Loading = ({
145
157
  return /* @__PURE__ */ React.createElement(
146
158
  "svg",
147
159
  {
148
- className: cn("circle-container", sizeStyles[size]),
160
+ className: cn(
161
+ "circle-container",
162
+ sizeStyles[size],
163
+ classNames == null ? void 0 : classNames.container
164
+ ),
149
165
  viewBox: "0 0 40 40",
150
166
  height: "40",
151
167
  width: "40"
@@ -153,10 +169,14 @@ var Loading = ({
153
169
  /* @__PURE__ */ React.createElement(
154
170
  "circle",
155
171
  {
156
- className: cn("circle-track", {
157
- "hawa-stroke-primary-foreground": themeMode === "dark",
158
- "hawa-stroke-primary": themeMode === "light"
159
- }),
172
+ className: cn(
173
+ "circle-track",
174
+ {
175
+ "hawa-stroke-primary-foreground": themeMode === "dark",
176
+ "hawa-stroke-primary": themeMode === "light"
177
+ },
178
+ classNames == null ? void 0 : classNames.track
179
+ ),
160
180
  cx: "20",
161
181
  cy: "20",
162
182
  r: "17.5",
@@ -168,10 +188,14 @@ var Loading = ({
168
188
  /* @__PURE__ */ React.createElement(
169
189
  "circle",
170
190
  {
171
- className: cn("circle-car", {
172
- "hawa-stroke-primary-foreground": themeMode === "dark",
173
- "hawa-stroke-primary": themeMode === "light"
174
- }),
191
+ className: cn(
192
+ "circle-car",
193
+ {
194
+ "hawa-stroke-primary-foreground": themeMode === "dark",
195
+ "hawa-stroke-primary": themeMode === "light"
196
+ },
197
+ classNames == null ? void 0 : classNames.car
198
+ ),
175
199
  cx: "20",
176
200
  cy: "20",
177
201
  r: "17.5",