@sikka/hawa 0.23.9-next → 0.23.11-next

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 (176) hide show
  1. package/dist/DropdownMenu-jh4puuXw.d.ts +95 -0
  2. package/dist/DropdownMenu-vm2kRAhL.d.mts +95 -0
  3. package/dist/Radio-2ZwcMDWt.d.ts +74 -0
  4. package/dist/Radio-5ZANA8Vh.d.mts +74 -0
  5. package/dist/SimpleTable-EE4ejgUR.d.mts +97 -0
  6. package/dist/SimpleTable-vY1ziD-2.d.ts +97 -0
  7. package/dist/Toast-jAb16JQg.d.mts +23 -0
  8. package/dist/Toast-xcELwcIX.d.ts +23 -0
  9. package/dist/accordion/index.d.mts +1 -1
  10. package/dist/accordion/index.d.ts +1 -1
  11. package/dist/alert/index.d.mts +1 -1
  12. package/dist/alert/index.d.ts +1 -1
  13. package/dist/avatar/index.d.mts +1 -1
  14. package/dist/avatar/index.d.ts +1 -1
  15. package/dist/avatar/index.js +1 -1
  16. package/dist/avatar/index.mjs +1 -1
  17. package/dist/backToTop/index.mjs +4 -2
  18. package/dist/blocks/index.d.mts +480 -0
  19. package/dist/blocks/index.d.ts +480 -0
  20. package/dist/blocks/index.js +8119 -0
  21. package/dist/blocks/index.mjs +2535 -0
  22. package/dist/blocks/pricing/index.js +40 -40
  23. package/dist/blocks/pricing/index.mjs +38 -38
  24. package/dist/carousel/index.d.mts +13 -0
  25. package/dist/carousel/index.d.ts +13 -0
  26. package/dist/carousel/index.js +186 -0
  27. package/dist/carousel/index.mjs +144 -0
  28. package/dist/checkbox/index.d.mts +2 -1
  29. package/dist/checkbox/index.d.ts +2 -1
  30. package/dist/chip/index.d.mts +37 -2
  31. package/dist/chip/index.d.ts +37 -2
  32. package/dist/chip/index.mjs +83 -3
  33. package/dist/chunk-343SRWR4.mjs +146 -0
  34. package/dist/{chunk-3N6JJKMN.mjs → chunk-DGWAHQRX.mjs} +3 -7
  35. package/dist/chunk-FNVYY7ND.mjs +22 -0
  36. package/dist/chunk-HSOVWPQN.mjs +138 -0
  37. package/dist/chunk-LRLLDOQZ.mjs +178 -0
  38. package/dist/chunk-ND4BWUKH.mjs +34 -0
  39. package/dist/chunk-RYORXSDA.mjs +7519 -0
  40. package/dist/codeBlock/index.d.mts +23 -0
  41. package/dist/codeBlock/index.d.ts +23 -0
  42. package/dist/codeBlock/index.js +2772 -0
  43. package/dist/codeBlock/index.mjs +2656 -0
  44. package/dist/collapsible/index.d.mts +8 -0
  45. package/dist/collapsible/index.d.ts +8 -0
  46. package/dist/collapsible/index.js +49 -0
  47. package/dist/collapsible/index.mjs +10 -0
  48. package/dist/colorPicker/index.d.mts +30 -0
  49. package/dist/colorPicker/index.d.ts +30 -0
  50. package/dist/colorPicker/index.js +208 -0
  51. package/dist/colorPicker/index.mjs +6 -0
  52. package/dist/combobox/index.mjs +19 -43
  53. package/dist/commonTypes-2IGtJ5cq.d.mts +3 -0
  54. package/dist/commonTypes-2IGtJ5cq.d.ts +3 -0
  55. package/dist/commonTypes-2k6FnHw5.d.mts +4 -0
  56. package/dist/commonTypes-2k6FnHw5.d.ts +4 -0
  57. package/dist/commonTypes-3k5cNB1s.d.mts +4 -0
  58. package/dist/commonTypes-3k5cNB1s.d.ts +4 -0
  59. package/dist/{commonTypes-N7XOVCit.d.ts → commonTypes-Abm7GBJu.d.mts} +2 -1
  60. package/dist/{commonTypes-N7XOVCit.d.mts → commonTypes-Abm7GBJu.d.ts} +2 -1
  61. package/dist/commonTypes-CKtkuNFH.d.mts +11 -0
  62. package/dist/commonTypes-CKtkuNFH.d.ts +11 -0
  63. package/dist/commonTypes-Dqxlu-9C.d.mts +4 -0
  64. package/dist/commonTypes-Dqxlu-9C.d.ts +4 -0
  65. package/dist/commonTypes-ko_NGEoT.d.mts +3 -0
  66. package/dist/commonTypes-ko_NGEoT.d.ts +3 -0
  67. package/dist/dataTable/index.d.mts +1 -2
  68. package/dist/dataTable/index.d.ts +1 -2
  69. package/dist/dataTable/index.mjs +4 -2
  70. package/dist/destroyableCard/index.d.mts +12 -0
  71. package/dist/destroyableCard/index.d.ts +12 -0
  72. package/dist/destroyableCard/index.js +205 -0
  73. package/dist/destroyableCard/index.mjs +163 -0
  74. package/dist/dropdownMenu/index.d.mts +1 -1
  75. package/dist/dropdownMenu/index.d.ts +1 -1
  76. package/dist/dropdownMenu/index.mjs +342 -19
  77. package/dist/elements/index.d.mts +715 -0
  78. package/dist/elements/index.d.ts +715 -0
  79. package/dist/elements/index.js +7719 -0
  80. package/dist/elements/index.mjs +285 -0
  81. package/dist/fileUploader/index.d.mts +5 -0
  82. package/dist/fileUploader/index.d.ts +5 -0
  83. package/dist/fileUploader/index.js +62 -0
  84. package/dist/fileUploader/index.mjs +25 -0
  85. package/dist/hooks/index.d.mts +107 -0
  86. package/dist/hooks/index.d.ts +107 -0
  87. package/dist/hooks/index.js +451 -0
  88. package/dist/hooks/index.mjs +254 -0
  89. package/dist/index.d.mts +1905 -0
  90. package/dist/index.d.ts +1905 -0
  91. package/dist/index.js +11987 -0
  92. package/dist/index.mjs +11760 -0
  93. package/dist/input/index.d.mts +1 -9
  94. package/dist/input/index.d.ts +1 -9
  95. package/dist/input/index.mjs +15 -97
  96. package/dist/interfaceSettings/index.d.mts +18 -0
  97. package/dist/interfaceSettings/index.d.ts +18 -0
  98. package/dist/interfaceSettings/index.js +419 -0
  99. package/dist/interfaceSettings/index.mjs +379 -0
  100. package/dist/label/index.d.mts +2 -1
  101. package/dist/label/index.d.ts +2 -1
  102. package/dist/label/index.mjs +3 -87
  103. package/dist/layout/index.d.mts +249 -0
  104. package/dist/layout/index.d.ts +249 -0
  105. package/dist/layout/index.js +4373 -0
  106. package/dist/layout/index.mjs +1381 -0
  107. package/dist/navigationMenu/index.d.mts +1 -2
  108. package/dist/navigationMenu/index.d.ts +1 -2
  109. package/dist/pagination/index.d.mts +12 -0
  110. package/dist/pagination/index.d.ts +12 -0
  111. package/dist/pagination/index.js +160 -0
  112. package/dist/pagination/index.mjs +118 -0
  113. package/dist/passwordInput/index.d.mts +13 -0
  114. package/dist/passwordInput/index.d.ts +13 -0
  115. package/dist/passwordInput/index.js +566 -0
  116. package/dist/passwordInput/index.mjs +523 -0
  117. package/dist/popover/index.d.mts +1 -1
  118. package/dist/popover/index.d.ts +1 -1
  119. package/dist/progressCircle/index.d.mts +16 -0
  120. package/dist/progressCircle/index.d.ts +16 -0
  121. package/dist/progressCircle/index.js +159 -0
  122. package/dist/progressCircle/index.mjs +117 -0
  123. package/dist/radio/index.d.mts +1 -4
  124. package/dist/radio/index.d.ts +1 -4
  125. package/dist/scrollIndicator/index.d.mts +9 -0
  126. package/dist/scrollIndicator/index.d.ts +9 -0
  127. package/dist/scrollIndicator/index.js +80 -0
  128. package/dist/scrollIndicator/index.mjs +43 -0
  129. package/dist/select/index.d.mts +1 -1
  130. package/dist/select/index.d.ts +1 -1
  131. package/dist/separator/index.d.mts +10 -0
  132. package/dist/separator/index.d.ts +10 -0
  133. package/dist/separator/index.js +66 -0
  134. package/dist/separator/index.mjs +24 -0
  135. package/dist/simpleTable/index.d.mts +30 -0
  136. package/dist/simpleTable/index.d.ts +30 -0
  137. package/dist/simpleTable/index.js +253 -0
  138. package/dist/simpleTable/index.mjs +217 -0
  139. package/dist/skeleton/index.d.mts +3 -3
  140. package/dist/skeleton/index.d.ts +3 -3
  141. package/dist/skeleton/index.mjs +3 -29
  142. package/dist/slider/index.d.mts +6 -0
  143. package/dist/slider/index.d.ts +6 -0
  144. package/dist/slider/index.js +66 -0
  145. package/dist/slider/index.mjs +24 -0
  146. package/dist/splitButton/index.d.mts +29 -2
  147. package/dist/splitButton/index.d.ts +29 -2
  148. package/dist/splitButton/index.mjs +355 -30
  149. package/dist/stopPropagationWrapper/index.d.mts +2 -2
  150. package/dist/stopPropagationWrapper/index.d.ts +2 -2
  151. package/dist/switch/index.d.mts +1 -1
  152. package/dist/switch/index.d.ts +1 -1
  153. package/dist/tabs/index.d.mts +21 -1
  154. package/dist/tabs/index.d.ts +21 -1
  155. package/dist/tabs/index.mjs +94 -14
  156. package/dist/toast/index.d.mts +23 -0
  157. package/dist/toast/index.d.ts +23 -0
  158. package/dist/toast/index.js +185 -0
  159. package/dist/toast/index.mjs +19 -0
  160. package/dist/toaster/index.d.mts +9 -0
  161. package/dist/toaster/index.d.ts +9 -0
  162. package/dist/toaster/index.js +302 -0
  163. package/dist/toaster/index.mjs +145 -0
  164. package/dist/tooltip/index.d.mts +3 -4
  165. package/dist/tooltip/index.d.ts +3 -4
  166. package/dist/types/index.d.mts +115 -0
  167. package/dist/types/index.d.ts +115 -0
  168. package/dist/types/index.js +18 -0
  169. package/dist/types/index.mjs +0 -0
  170. package/package.json +1 -1
  171. package/dist/chunk-72HYR6WB.mjs +0 -88
  172. package/dist/chunk-C4CBXIG5.mjs +0 -363
  173. package/dist/commonTypes-eIwARo5g.d.mts +0 -4
  174. package/dist/commonTypes-eIwARo5g.d.ts +0 -4
  175. package/dist/index-DUZFcPRO.d.mts +0 -38
  176. package/dist/index-DUZFcPRO.d.ts +0 -38
@@ -0,0 +1,144 @@
1
+ import {
2
+ cn
3
+ } from "../chunk-TE3BKEXL.mjs";
4
+
5
+ // components/elements/carousel/Carousel.tsx
6
+ import React, { useEffect, useState } from "react";
7
+ import useEmblaCarousel from "embla-carousel-react";
8
+ var Carousel = (props) => {
9
+ const {
10
+ children,
11
+ items,
12
+ showArrows,
13
+ autoplay,
14
+ autoplayInterval = 3e3,
15
+ ...options
16
+ } = props;
17
+ const [emblaRef, emblaApi] = useEmblaCarousel({
18
+ loop: autoplay ? true : options.loop || false
19
+ });
20
+ const [selectedIndex, setSelectedIndex] = useState(0);
21
+ useEffect(() => {
22
+ function selectHandler() {
23
+ const index = emblaApi == null ? void 0 : emblaApi.selectedScrollSnap();
24
+ setSelectedIndex(index || 0);
25
+ }
26
+ emblaApi == null ? void 0 : emblaApi.on("select", selectHandler);
27
+ return () => {
28
+ emblaApi == null ? void 0 : emblaApi.off("select", selectHandler);
29
+ };
30
+ }, [emblaApi]);
31
+ useEffect(() => {
32
+ let autoplayTimer;
33
+ if (autoplay && emblaApi) {
34
+ autoplayTimer = setInterval(() => {
35
+ emblaApi.scrollNext();
36
+ }, autoplayInterval);
37
+ }
38
+ return () => {
39
+ if (autoplayTimer)
40
+ clearInterval(autoplayTimer);
41
+ };
42
+ }, [emblaApi, autoplay, autoplayInterval]);
43
+ const length = React.Children.count(items);
44
+ const canScrollNext = !!(emblaApi == null ? void 0 : emblaApi.canScrollNext());
45
+ const canScrollPrev = !!(emblaApi == null ? void 0 : emblaApi.canScrollPrev());
46
+ return /* @__PURE__ */ React.createElement("div", { className: " hawa-relative hawa-h-full" }, /* @__PURE__ */ React.createElement("div", { className: "hawa-h-full hawa-overflow-hidden" }, /* @__PURE__ */ React.createElement("div", { className: "hawa-h-full", ref: emblaRef }, /* @__PURE__ */ React.createElement("div", { className: "hawa-flex hawa-h-full" }, items == null ? void 0 : items.map((item, i) => /* @__PURE__ */ React.createElement(
47
+ "div",
48
+ {
49
+ key: i,
50
+ className: "hawa-flex hawa-h-full hawa-min-w-0 hawa-flex-[0_0_100%] hawa-items-center hawa-justify-center"
51
+ },
52
+ item
53
+ ))))), /* @__PURE__ */ React.createElement(
54
+ Dots,
55
+ {
56
+ itemsLength: length,
57
+ selectedIndex,
58
+ onDotClick: (index) => emblaApi == null ? void 0 : emblaApi.scrollTo(index)
59
+ }
60
+ ), showArrows && /* @__PURE__ */ React.createElement(
61
+ CarouselControls,
62
+ {
63
+ canScrollNext,
64
+ canScrollPrev,
65
+ onNext: () => emblaApi == null ? void 0 : emblaApi.scrollNext(),
66
+ onPrev: () => emblaApi == null ? void 0 : emblaApi.scrollPrev()
67
+ }
68
+ ));
69
+ };
70
+ var Dots = ({ onDotClick, itemsLength, selectedIndex }) => {
71
+ const arr = new Array(itemsLength).fill(0);
72
+ return /* @__PURE__ */ React.createElement("div", { className: "hawa-z-50 hawa-my-2 hawa-flex hawa-justify-center hawa-gap-1" }, arr.map((_, index) => {
73
+ const selected = index === selectedIndex;
74
+ return /* @__PURE__ */ React.createElement(
75
+ "div",
76
+ {
77
+ onClick: () => onDotClick(index),
78
+ className: cn(
79
+ "hawa-h-2 hawa-rounded-full hawa-bg-primary hawa-transition-all hawa-duration-300 hover:hawa-cursor-pointer",
80
+ !selected ? "hawa-w-2 hawa-opacity-50" : "hawa-w-6 hawa-opacity-100"
81
+ ),
82
+ key: index
83
+ }
84
+ );
85
+ }));
86
+ };
87
+ var CarouselControls = (props) => {
88
+ return /* @__PURE__ */ React.createElement("div", { className: "hawa-flex hawa-justify-end hawa-gap-2 " }, /* @__PURE__ */ React.createElement(
89
+ "button",
90
+ {
91
+ onClick: () => {
92
+ if (props.canScrollPrev) {
93
+ props.onPrev();
94
+ }
95
+ },
96
+ disabled: !props.canScrollPrev,
97
+ className: cn(
98
+ "hawa-absolute hawa-start-0 hawa-top-1/2 -hawa-translate-y-2 hawa-rounded-full hawa-p-2 hawa-text-white ",
99
+ !props.canScrollPrev && "hawa-bg-primary/50",
100
+ props.canScrollPrev && "hawa-bg-primary"
101
+ )
102
+ },
103
+ /* @__PURE__ */ React.createElement(
104
+ "svg",
105
+ {
106
+ "aria-label": "Chevron Right Icon",
107
+ stroke: "currentColor",
108
+ fill: "currentColor",
109
+ viewBox: "0 0 16 16",
110
+ className: "hawa-h-2 hawa-w-2 hawa-shrink-0 hawa-rotate-180 hawa-transition-transform hawa-duration-200 "
111
+ },
112
+ /* @__PURE__ */ React.createElement("path", { d: "M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z" })
113
+ )
114
+ ), /* @__PURE__ */ React.createElement(
115
+ "button",
116
+ {
117
+ onClick: () => {
118
+ if (props.canScrollNext) {
119
+ props.onNext();
120
+ }
121
+ },
122
+ disabled: !props.canScrollNext,
123
+ className: cn(
124
+ "hawa-absolute hawa-end-0 hawa-top-1/2 -hawa-translate-y-2 hawa-rounded-full hawa-p-2 hawa-text-white ",
125
+ !props.canScrollNext && "hawa-bg-primary/50",
126
+ props.canScrollNext && "hawa-bg-primary"
127
+ )
128
+ },
129
+ /* @__PURE__ */ React.createElement(
130
+ "svg",
131
+ {
132
+ "aria-label": "Chevron Right Icon",
133
+ stroke: "currentColor",
134
+ fill: "currentColor",
135
+ viewBox: "0 0 16 16",
136
+ className: "hawa-h-2 hawa-w-2 hawa-shrink-0 hawa-transition-transform hawa-duration-200 "
137
+ },
138
+ /* @__PURE__ */ React.createElement("path", { d: "M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z" })
139
+ )
140
+ ));
141
+ };
142
+ export {
143
+ Carousel
144
+ };
@@ -1,6 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
3
- import { R as RadiusType } from '../commonTypes-PBumfOBg.mjs';
3
+
4
+ type RadiusType = "full" | "inherit" | "none";
4
5
 
5
6
  type CheckBoxTypes = {
6
7
  id: string;
@@ -1,6 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
3
- import { R as RadiusType } from '../commonTypes-PBumfOBg.js';
3
+
4
+ type RadiusType = "full" | "inherit" | "none";
4
5
 
5
6
  type CheckBoxTypes = {
6
7
  id: string;
@@ -1,2 +1,37 @@
1
- export { b as Chip, a as ChipColors, C as ChipTypes } from '../index-DUZFcPRO.mjs';
2
- import 'react';
1
+ import React__default from 'react';
2
+
3
+ type RadiusType = "full" | "inherit" | "none";
4
+
5
+ type ChipColors = "green" | "blue" | "red" | "yellow" | "orange" | "purple" | "cyan" | "hyper" | "oceanic";
6
+ type ChipTypes = React__default.HTMLAttributes<HTMLSpanElement> & {
7
+ /** The text inside the chip */
8
+ label: string;
9
+ /** The small icon before the chip label */
10
+ icon?: JSX.Element;
11
+ /** The color of the chip, must be a tailwind color */
12
+ color?: ChipColors;
13
+ /** The size of the chip */
14
+ size?: "small" | "normal" | "large";
15
+ /** Enable/Disable the dot before the label of the chip */
16
+ dot?: boolean;
17
+ /** Red/Green dot next to the label of the chip indicating online/offline or available/unavailable */
18
+ dotType?: "available" | "unavailable";
19
+ radius?: RadiusType;
20
+ };
21
+ declare const Chip: React__default.ForwardRefExoticComponent<React__default.HTMLAttributes<HTMLSpanElement> & {
22
+ /** The text inside the chip */
23
+ label: string;
24
+ /** The small icon before the chip label */
25
+ icon?: JSX.Element | undefined;
26
+ /** The color of the chip, must be a tailwind color */
27
+ color?: ChipColors | undefined;
28
+ /** The size of the chip */
29
+ size?: "small" | "normal" | "large" | undefined;
30
+ /** Enable/Disable the dot before the label of the chip */
31
+ dot?: boolean | undefined;
32
+ /** Red/Green dot next to the label of the chip indicating online/offline or available/unavailable */
33
+ dotType?: "available" | "unavailable" | undefined;
34
+ radius?: RadiusType | undefined;
35
+ } & React__default.RefAttributes<HTMLSpanElement>>;
36
+
37
+ export { Chip, type ChipColors, type ChipTypes };
@@ -1,2 +1,37 @@
1
- export { b as Chip, a as ChipColors, C as ChipTypes } from '../index-DUZFcPRO.js';
2
- import 'react';
1
+ import React__default from 'react';
2
+
3
+ type RadiusType = "full" | "inherit" | "none";
4
+
5
+ type ChipColors = "green" | "blue" | "red" | "yellow" | "orange" | "purple" | "cyan" | "hyper" | "oceanic";
6
+ type ChipTypes = React__default.HTMLAttributes<HTMLSpanElement> & {
7
+ /** The text inside the chip */
8
+ label: string;
9
+ /** The small icon before the chip label */
10
+ icon?: JSX.Element;
11
+ /** The color of the chip, must be a tailwind color */
12
+ color?: ChipColors;
13
+ /** The size of the chip */
14
+ size?: "small" | "normal" | "large";
15
+ /** Enable/Disable the dot before the label of the chip */
16
+ dot?: boolean;
17
+ /** Red/Green dot next to the label of the chip indicating online/offline or available/unavailable */
18
+ dotType?: "available" | "unavailable";
19
+ radius?: RadiusType;
20
+ };
21
+ declare const Chip: React__default.ForwardRefExoticComponent<React__default.HTMLAttributes<HTMLSpanElement> & {
22
+ /** The text inside the chip */
23
+ label: string;
24
+ /** The small icon before the chip label */
25
+ icon?: JSX.Element | undefined;
26
+ /** The color of the chip, must be a tailwind color */
27
+ color?: ChipColors | undefined;
28
+ /** The size of the chip */
29
+ size?: "small" | "normal" | "large" | undefined;
30
+ /** Enable/Disable the dot before the label of the chip */
31
+ dot?: boolean | undefined;
32
+ /** Red/Green dot next to the label of the chip indicating online/offline or available/unavailable */
33
+ dotType?: "available" | "unavailable" | undefined;
34
+ radius?: RadiusType | undefined;
35
+ } & React__default.RefAttributes<HTMLSpanElement>>;
36
+
37
+ export { Chip, type ChipColors, type ChipTypes };
@@ -1,7 +1,87 @@
1
1
  import {
2
- Chip
3
- } from "../chunk-72HYR6WB.mjs";
4
- import "../chunk-TE3BKEXL.mjs";
2
+ cn
3
+ } from "../chunk-TE3BKEXL.mjs";
4
+
5
+ // components/elements/chip/Chip.tsx
6
+ import React from "react";
7
+ var Chip = React.forwardRef(
8
+ ({
9
+ label,
10
+ size = "normal",
11
+ icon,
12
+ color,
13
+ radius = "inherit",
14
+ dotType,
15
+ ...rest
16
+ }, ref) => {
17
+ let defaultStyles = "hawa-flex hawa-flex-row hawa-w-fit hawa-gap-1 hawa-items-center hawa-px-2.5 hawa-py-1 hawa-font-bold ";
18
+ let radiusStyles = {
19
+ inherit: " hawa-rounded",
20
+ full: "hawa-rounded-full",
21
+ none: "hawa-rounded-none"
22
+ };
23
+ let sizeStyles = {
24
+ small: "hawa-h-[15px] hawa-leading-4 hawa-px-0 hawa-py-0 hawa-text-[9px] hawa-gap-0.5 ",
25
+ normal: "hawa-h-fit hawa-text-xs",
26
+ large: "hawa-text-base"
27
+ };
28
+ let dotStyles = {
29
+ small: "hawa-flex hawa-h-1 hawa-w-1 hawa-rounded-full",
30
+ normal: "hawa-flex hawa-h-2 hawa-w-2 hawa-rounded-full",
31
+ large: "hawa-flex hawa-h-3 hawa-w-3 hawa-rounded-full"
32
+ };
33
+ let dotTypeStyles = {
34
+ available: "hawa-bg-green-500",
35
+ unavailable: "hawa-bg-red-500"
36
+ };
37
+ let colorStyles = {
38
+ green: "hawa-bg-green-100 hawa-text-green-500 dark:hawa-bg-green-400 dark:hawa-text-green-800",
39
+ blue: "hawa-bg-blue-100 hawa-text-blue-500 dark:hawa-bg-blue-400 dark:hawa-text-blue-100",
40
+ red: "hawa-bg-red-100 hawa-text-red-500 dark:hawa-bg-red-400 dark:hawa-text-red-100",
41
+ yellow: "hawa-bg-yellow-100 hawa-text-yellow-600 dark:hawa-bg-yellow-400 dark:hawa-text-yellow-800",
42
+ orange: "hawa-bg-orange-100 hawa-text-orange-500 dark:hawa-bg-orange-400 dark:hawa-text-orange-100",
43
+ purple: "hawa-bg-purple-100 hawa-text-purple-500 dark:hawa-bg-purple-400 dark:hawa-text-purple-100",
44
+ cyan: "hawa-bg-cyan-100 hawa-text-cyan-800 dark:hawa-bg-cyan-400 dark:hawa-text-cyan-800",
45
+ hyper: "hawa-text-white hawa-bg-gradient-to-tl hawa-from-pink-500 hawa-via-red-500 hawa-to-yellow-500 ",
46
+ oceanic: "hawa-text-white hawa-bg-gradient-to-bl hawa-from-green-300 hawa-via-blue-500 hawa-to-purple-600"
47
+ };
48
+ if (label) {
49
+ return /* @__PURE__ */ React.createElement(
50
+ "span",
51
+ {
52
+ ...rest,
53
+ ref,
54
+ className: cn(
55
+ defaultStyles,
56
+ sizeStyles[size],
57
+ radiusStyles[radius],
58
+ color ? colorStyles[color] : "hawa-border hawa-bg-none"
59
+ )
60
+ },
61
+ dotType && /* @__PURE__ */ React.createElement(
62
+ "span",
63
+ {
64
+ className: cn(dotStyles[size], dotTypeStyles[dotType])
65
+ }
66
+ ),
67
+ icon && icon,
68
+ label
69
+ );
70
+ } else {
71
+ return /* @__PURE__ */ React.createElement(
72
+ "span",
73
+ {
74
+ ...rest,
75
+ ref,
76
+ className: cn(
77
+ "hawa-h-2 hawa-w-2 hawa-rounded-full",
78
+ color ? colorStyles[color] : "hawa-border hawa-bg-none"
79
+ )
80
+ }
81
+ );
82
+ }
83
+ }
84
+ );
5
85
  export {
6
86
  Chip
7
87
  };
@@ -0,0 +1,146 @@
1
+ // components/hooks/useToast.ts
2
+ import * as React from "react";
3
+ var TOAST_LIMIT = 5;
4
+ var TOAST_REMOVE_DELAY = 1e5;
5
+ var count = 0;
6
+ function genId() {
7
+ count = (count + 1) % Number.MAX_VALUE;
8
+ return count.toString();
9
+ }
10
+ var toastTimeouts = /* @__PURE__ */ new Map();
11
+ var addToRemoveQueue = (toastId) => {
12
+ if (toastTimeouts.has(toastId)) {
13
+ return;
14
+ }
15
+ const timeout = setTimeout(() => {
16
+ toastTimeouts.delete(toastId);
17
+ dispatch({
18
+ type: "REMOVE_TOAST",
19
+ toastId
20
+ });
21
+ }, TOAST_REMOVE_DELAY);
22
+ toastTimeouts.set(toastId, timeout);
23
+ };
24
+ var reducer = (state, action) => {
25
+ switch (action.type) {
26
+ case "ADD_TOAST":
27
+ return {
28
+ ...state,
29
+ toasts: [action.toast, ...state.toasts].slice(0, TOAST_LIMIT)
30
+ };
31
+ case "UPDATE_TOAST":
32
+ return {
33
+ ...state,
34
+ toasts: state.toasts.map(
35
+ (t) => t.id === action.toast.id ? { ...t, ...action.toast } : t
36
+ )
37
+ };
38
+ case "DISMISS_TOAST": {
39
+ const { toastId } = action;
40
+ if (toastId) {
41
+ addToRemoveQueue(toastId);
42
+ } else {
43
+ state.toasts.forEach((toast2) => {
44
+ addToRemoveQueue(toast2.id);
45
+ });
46
+ }
47
+ return {
48
+ ...state,
49
+ toasts: state.toasts.map(
50
+ (t) => t.id === toastId || toastId === void 0 ? { ...t, open: false } : t
51
+ )
52
+ };
53
+ }
54
+ case "REMOVE_TOAST":
55
+ if (action.toastId === void 0) {
56
+ return { ...state, toasts: [] };
57
+ }
58
+ return {
59
+ ...state,
60
+ toasts: state.toasts.filter((t) => t.id !== action.toastId)
61
+ };
62
+ }
63
+ };
64
+ var listeners = [];
65
+ var memoryState = { toasts: [] };
66
+ function dispatch(action) {
67
+ memoryState = reducer(memoryState, action);
68
+ listeners.forEach((listener) => {
69
+ listener(memoryState);
70
+ });
71
+ }
72
+ function toast({ ...props }) {
73
+ const id = genId();
74
+ const update = (props2) => dispatch({
75
+ type: "UPDATE_TOAST",
76
+ toast: { ...props2, id }
77
+ });
78
+ const dismiss = () => dispatch({ type: "DISMISS_TOAST", toastId: id });
79
+ dispatch({
80
+ type: "ADD_TOAST",
81
+ toast: {
82
+ ...props,
83
+ id,
84
+ open: true,
85
+ onOpenChange: (open) => {
86
+ if (!open)
87
+ dismiss();
88
+ }
89
+ }
90
+ });
91
+ return {
92
+ id,
93
+ dismiss,
94
+ update
95
+ };
96
+ }
97
+ function useToast() {
98
+ const [state, setState] = React.useState(memoryState);
99
+ React.useEffect(() => {
100
+ listeners.push(setState);
101
+ return () => {
102
+ const index = listeners.indexOf(setState);
103
+ if (index > -1) {
104
+ listeners.splice(index, 1);
105
+ }
106
+ };
107
+ }, [state]);
108
+ return {
109
+ ...state,
110
+ toast,
111
+ dismiss: (toastId) => dispatch({ type: "DISMISS_TOAST", toastId })
112
+ };
113
+ }
114
+
115
+ // components/hooks/useClipboard.ts
116
+ import { useState as useState2 } from "react";
117
+ function useClipboard({ timeout = 2e3 } = {}) {
118
+ const [error, setError] = useState2(null);
119
+ const [copied, setCopied] = useState2(false);
120
+ const [copyTimeout, setCopyTimeout] = useState2(null);
121
+ const handleCopyResult = (value) => {
122
+ clearTimeout(copyTimeout);
123
+ setCopyTimeout(setTimeout(() => setCopied(false), timeout));
124
+ setCopied(value);
125
+ };
126
+ const copy = (valueToCopy) => {
127
+ if ("clipboard" in navigator) {
128
+ navigator.clipboard.writeText(valueToCopy).then(() => handleCopyResult(true)).catch((err) => setError(err));
129
+ } else {
130
+ setError(new Error("useClipboard: navigator.clipboard is not supported"));
131
+ }
132
+ };
133
+ const reset = () => {
134
+ setCopied(false);
135
+ setError(null);
136
+ clearTimeout(copyTimeout);
137
+ };
138
+ return { copy, reset, error, copied };
139
+ }
140
+
141
+ export {
142
+ reducer,
143
+ toast,
144
+ useToast,
145
+ useClipboard
146
+ };
@@ -1,9 +1,6 @@
1
- // components/util.ts
2
- import { clsx } from "clsx";
3
- import { twMerge } from "tailwind-merge";
4
- function cn(...inputs) {
5
- return twMerge(clsx(inputs));
6
- }
1
+ import {
2
+ cn
3
+ } from "./chunk-TE3BKEXL.mjs";
7
4
 
8
5
  // components/elements/button/Button.tsx
9
6
  import * as React2 from "react";
@@ -258,6 +255,5 @@ var Button = React2.forwardRef(
258
255
  Button.displayName = "Button";
259
256
 
260
257
  export {
261
- cn,
262
258
  Button
263
259
  };
@@ -0,0 +1,22 @@
1
+ // components/hooks/useBreakpoint.ts
2
+ import { useState, useEffect } from "react";
3
+ var useBreakpoint = () => {
4
+ const [breakpoint, setBreakpoint] = useState(null);
5
+ useEffect(() => {
6
+ if (typeof window !== "undefined") {
7
+ const resize = () => {
8
+ setBreakpoint(window.innerWidth);
9
+ };
10
+ resize();
11
+ window.addEventListener("resize", resize);
12
+ return () => {
13
+ window.removeEventListener("resize", resize);
14
+ };
15
+ }
16
+ }, []);
17
+ return breakpoint;
18
+ };
19
+
20
+ export {
21
+ useBreakpoint
22
+ };
@@ -0,0 +1,138 @@
1
+ import {
2
+ cn
3
+ } from "./chunk-TE3BKEXL.mjs";
4
+
5
+ // components/elements/toast/Toast.tsx
6
+ import * as React from "react";
7
+ import * as ToastPrimitives from "@radix-ui/react-toast";
8
+ import { cva } from "class-variance-authority";
9
+ var toastVariants = cva(
10
+ "hawa-group hawa-z-[900] hawa-pointer-events-auto hawa-relative hawa-flex hawa-w-full hawa-items-center hawa-justify-between hawa-space-x-4 hawa-overflow-hidden hawa-rounded-md hawa-border hawa-shadow-lg hawa-transition-all data-[swipe=cancel]:hawa-translate-x-0 data-[swipe=end]:hawa-translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:hawa-translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:hawa-transition-none data-[state=open]:hawa-animate-in data-[state=closed]:hawa-animate-out data-[swipe=end]:hawa-animate-out data-[state=closed]:hawa-fade-out-80 data-[state=open]:hawa-slide-in-from-top-full data-[state=open]:sm:hawa-slide-in-from-bottom-full",
11
+ {
12
+ variants: {
13
+ variant: {
14
+ default: "hawa-border hawa-bg-background hawa-text-foreground",
15
+ destructive: "hawa-destructive hawa-group hawa-border-destructive hawa-bg-destructive hawa-text-destructive-foreground"
16
+ },
17
+ severity: {
18
+ info: "hawa-info hawa-group hawa-text-info-foreground hawa-bg-info",
19
+ warning: "hawa-warning hawa-group hawa-text-warning-foreground hawa-bg-warning",
20
+ error: "hawa-error hawa-group hawa-border-error hawa-bg-error hawa-text-white",
21
+ success: "hawa-success hawa-group hawa-text-success-foreground hawa-bg-success",
22
+ none: ""
23
+ }
24
+ },
25
+ defaultVariants: {
26
+ variant: "default"
27
+ }
28
+ }
29
+ );
30
+ var ToastProvider = ToastPrimitives.Provider;
31
+ var ToastViewport = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(
32
+ ToastPrimitives.Viewport,
33
+ {
34
+ ref,
35
+ className: cn(
36
+ "hawa-fixed hawa-top-0 hawa-z-[100] hawa-flex hawa-max-h-screen hawa-w-full hawa-flex-col-reverse hawa-p-4 sm:hawa-bottom-0 sm:hawa-right-0 sm:hawa-top-auto sm:hawa-flex-col md:hawa-max-w-[420px]",
37
+ className
38
+ ),
39
+ ...props
40
+ }
41
+ ));
42
+ ToastViewport.displayName = ToastPrimitives.Viewport.displayName;
43
+ var Toast = React.forwardRef(({ className, variant, severity = "none", direction, ...props }, ref) => {
44
+ return /* @__PURE__ */ React.createElement(
45
+ ToastPrimitives.Root,
46
+ {
47
+ ref,
48
+ className: cn(
49
+ toastVariants({ variant, severity }),
50
+ className,
51
+ direction === "rtl" ? "hawa-p-6 hawa-pl-0 hawa-pr-10 data-[state=closed]:hawa-slide-out-to-left-full" : "hawa-p-6 hawa-pr-8 data-[state=closed]:hawa-slide-out-to-right-full"
52
+ ),
53
+ dir: direction,
54
+ ...props
55
+ }
56
+ );
57
+ });
58
+ Toast.displayName = ToastPrimitives.Root.displayName;
59
+ var ToastAction = React.forwardRef(({ className, ...props }, ref) => {
60
+ return /* @__PURE__ */ React.createElement(
61
+ ToastPrimitives.Action,
62
+ {
63
+ ref,
64
+ className: cn(
65
+ "hawa-inline-flex hawa-h-8 hawa-shrink-0 hawa-items-center hawa-justify-center hawa-rounded-md hawa-border hawa-bg-transparent hawa-px-3 hawa-text-sm hawa-font-medium hawa-ring-offset-background hawa-transition-colors hover:hawa-bg-secondary hover:hawa-text-secondary-foreground focus:hawa-outline-none focus:hawa-ring-2 focus:hawa-ring-ring focus:hawa-ring-offset-2 disabled:hawa-pointer-events-none disabled:hawa-opacity-50",
66
+ "group-[.info]:hawa-border-muted/40 group-[.info]:hover:hawa-border-info/30 group-[.info]:hover:hawa-bg-info group-[.info]:hover:hawa-text-info-foreground group-[.info]:focus:hawa-ring-info",
67
+ "group-[.error]:hawa-border-muted/40 group-[.error]:hover:hawa-border-error/30 group-[.error]:hover:hawa-bg-error group-[.error]:hover:hawa-text-error-foreground group-[.error]:focus:hawa-ring-error",
68
+ "group-[.success]:hawa-border-muted/40 group-[.success]:hover:hawa-border-success/30 group-[.success]:hover:hawa-bg-success group-[.success]:hover:hawa-text-success-foreground group-[.success]:focus:hawa-ring-success",
69
+ "group-[.warning]:hawa-border-muted/40 group-[.warning]:hover:hawa-border-warning/30 group-[.warning]:hover:hawa-bg-warning group-[.warning]:hover:hawa-text-warning-foreground group-[.warning]:focus:hawa-ring-warning",
70
+ className
71
+ ),
72
+ ...props
73
+ }
74
+ );
75
+ });
76
+ ToastAction.displayName = ToastPrimitives.Action.displayName;
77
+ var ToastClose = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(
78
+ ToastPrimitives.Close,
79
+ {
80
+ ref,
81
+ className: cn(
82
+ "hawa-absolute hawa-right-2 hawa-top-2 hawa-rounded-md hawa-p-1 hawa-text-foreground/50 hawa-opacity-0 hawa-transition-opacity hover:hawa-text-foreground focus:hawa-opacity-100 focus:hawa-outline-none focus:hawa-ring-2 group-hover:hawa-opacity-100 group-[.destructive]:hawa-text-red-300 group-[.destructive]:hover:hawa-text-red-50 group-[.destructive]:focus:hawa-ring-red-400 group-[.destructive]:focus:hawa-ring-offset-red-600",
83
+ className
84
+ ),
85
+ "toast-close": "",
86
+ ...props
87
+ },
88
+ /* @__PURE__ */ React.createElement(
89
+ "svg",
90
+ {
91
+ "aria-label": "Close Icon",
92
+ "aria-hidden": "true",
93
+ className: "hawa-icon",
94
+ fill: "currentColor",
95
+ viewBox: "0 0 20 20"
96
+ },
97
+ /* @__PURE__ */ React.createElement(
98
+ "path",
99
+ {
100
+ fillRule: "evenodd",
101
+ d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",
102
+ clipRule: "evenodd"
103
+ }
104
+ )
105
+ )
106
+ ));
107
+ ToastClose.displayName = ToastPrimitives.Close.displayName;
108
+ var ToastTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(
109
+ ToastPrimitives.Title,
110
+ {
111
+ ref,
112
+ className: cn(
113
+ "hawa-select-text hawa-text-sm hawa-font-semibold",
114
+ className
115
+ ),
116
+ ...props
117
+ }
118
+ ));
119
+ ToastTitle.displayName = ToastPrimitives.Title.displayName;
120
+ var ToastDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(
121
+ ToastPrimitives.Description,
122
+ {
123
+ ref,
124
+ className: cn("hawa-select-text hawa-text-sm hawa-opacity-90", className),
125
+ ...props
126
+ }
127
+ ));
128
+ ToastDescription.displayName = ToastPrimitives.Description.displayName;
129
+
130
+ export {
131
+ ToastProvider,
132
+ ToastViewport,
133
+ Toast,
134
+ ToastAction,
135
+ ToastClose,
136
+ ToastTitle,
137
+ ToastDescription
138
+ };