@sikka/hawa 0.26.31 → 0.26.33

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 (218) hide show
  1. package/dist/{Toast-pOd4uGZz.d.ts → Toast-YaClwi7z.d.ts} +9 -1
  2. package/dist/{Toast-VBd4UvlM.d.mts → Toast-ySvjL_-K.d.mts} +9 -1
  3. package/dist/accordion/index.mjs +7 -4
  4. package/dist/accordion/index.mjs.map +1 -1
  5. package/dist/alert/index.js +4 -4
  6. package/dist/alert/index.js.map +1 -1
  7. package/dist/alert/index.mjs +11 -8
  8. package/dist/alert/index.mjs.map +1 -1
  9. package/dist/appLayout/index.js +2 -1
  10. package/dist/appLayout/index.js.map +1 -1
  11. package/dist/appLayout/index.mjs +9 -5
  12. package/dist/appLayout/index.mjs.map +1 -1
  13. package/dist/appMenubar/index.mjs +9 -4
  14. package/dist/appMenubar/index.mjs.map +1 -1
  15. package/dist/appTabs/index.mjs +9 -4
  16. package/dist/appTabs/index.mjs.map +1 -1
  17. package/dist/appTopbar/index.mjs +9 -4
  18. package/dist/appTopbar/index.mjs.map +1 -1
  19. package/dist/avatar/index.js +2 -1
  20. package/dist/avatar/index.js.map +1 -1
  21. package/dist/avatar/index.mjs +9 -5
  22. package/dist/avatar/index.mjs.map +1 -1
  23. package/dist/backToTop/index.js +6 -3
  24. package/dist/backToTop/index.js.map +1 -1
  25. package/dist/backToTop/index.mjs +13 -7
  26. package/dist/backToTop/index.mjs.map +1 -1
  27. package/dist/badge/index.js +4 -3
  28. package/dist/badge/index.js.map +1 -1
  29. package/dist/badge/index.mjs +13 -7
  30. package/dist/badge/index.mjs.map +1 -1
  31. package/dist/button/index.mjs +7 -4
  32. package/dist/button/index.mjs.map +1 -1
  33. package/dist/card/index.mjs +9 -4
  34. package/dist/card/index.mjs.map +1 -1
  35. package/dist/carousel/index.js +10 -10
  36. package/dist/carousel/index.js.map +1 -1
  37. package/dist/carousel/index.mjs +19 -14
  38. package/dist/carousel/index.mjs.map +1 -1
  39. package/dist/checkbox/index.mjs +9 -4
  40. package/dist/checkbox/index.mjs.map +1 -1
  41. package/dist/chip/index.mjs +9 -4
  42. package/dist/chip/index.mjs.map +1 -1
  43. package/dist/chunk-A3ERTYS4.mjs +29 -0
  44. package/dist/codeBlock/index.js +1 -1
  45. package/dist/codeBlock/index.js.map +1 -1
  46. package/dist/codeBlock/index.mjs +84 -24
  47. package/dist/codeBlock/index.mjs.map +1 -1
  48. package/dist/collapsible/index.mjs +0 -2
  49. package/dist/collapsible/index.mjs.map +1 -1
  50. package/dist/colorPicker/index.js +2 -1
  51. package/dist/colorPicker/index.js.map +1 -1
  52. package/dist/colorPicker/index.mjs +92 -20
  53. package/dist/colorPicker/index.mjs.map +1 -1
  54. package/dist/combobox/index.js +4 -3
  55. package/dist/combobox/index.js.map +1 -1
  56. package/dist/combobox/index.mjs +445 -27
  57. package/dist/combobox/index.mjs.map +1 -1
  58. package/dist/command/index.mjs +429 -11
  59. package/dist/command/index.mjs.map +1 -1
  60. package/dist/dataTable/index.js +36 -27
  61. package/dist/dataTable/index.js.map +1 -1
  62. package/dist/dataTable/index.mjs +43 -31
  63. package/dist/dataTable/index.mjs.map +1 -1
  64. package/dist/destroyableCard/index.js +2 -2
  65. package/dist/destroyableCard/index.js.map +1 -1
  66. package/dist/destroyableCard/index.mjs +9 -6
  67. package/dist/destroyableCard/index.mjs.map +1 -1
  68. package/dist/dialog/index.mjs +9 -4
  69. package/dist/dialog/index.mjs.map +1 -1
  70. package/dist/docsLayout/index.js +2 -2
  71. package/dist/docsLayout/index.js.map +1 -1
  72. package/dist/docsLayout/index.mjs +9 -6
  73. package/dist/docsLayout/index.mjs.map +1 -1
  74. package/dist/docsSidebar/index.js +2 -2
  75. package/dist/docsSidebar/index.js.map +1 -1
  76. package/dist/docsSidebar/index.mjs +11 -6
  77. package/dist/docsSidebar/index.mjs.map +1 -1
  78. package/dist/dropdownMenu/index.mjs +9 -4
  79. package/dist/dropdownMenu/index.mjs.map +1 -1
  80. package/dist/elements/index.d.mts +4 -2
  81. package/dist/elements/index.d.ts +4 -2
  82. package/dist/elements/index.js +8 -135
  83. package/dist/elements/index.mjs +10 -14
  84. package/dist/fileDropzone/index.js +12 -11
  85. package/dist/fileDropzone/index.js.map +1 -1
  86. package/dist/fileDropzone/index.mjs +21 -17
  87. package/dist/fileDropzone/index.mjs.map +1 -1
  88. package/dist/fileUploader/index.js +2 -1
  89. package/dist/fileUploader/index.js.map +1 -1
  90. package/dist/fileUploader/index.mjs +2 -1
  91. package/dist/fileUploader/index.mjs.map +1 -1
  92. package/dist/glow/index.js +24 -17
  93. package/dist/glow/index.js.map +1 -1
  94. package/dist/glow/index.mjs +24 -17
  95. package/dist/glow/index.mjs.map +1 -1
  96. package/dist/hooks/index.d.mts +9 -18
  97. package/dist/hooks/index.d.ts +9 -18
  98. package/dist/hooks/index.mjs +146 -27
  99. package/dist/index.d.mts +18 -17
  100. package/dist/index.d.ts +18 -17
  101. package/dist/index.js +167 -172
  102. package/dist/index.mjs +589 -594
  103. package/dist/input/index.js +3 -2
  104. package/dist/input/index.js.map +1 -1
  105. package/dist/input/index.mjs +118 -19
  106. package/dist/input/index.mjs.map +1 -1
  107. package/dist/interfaceSettings/index.js +6 -4
  108. package/dist/interfaceSettings/index.js.map +1 -1
  109. package/dist/interfaceSettings/index.mjs +130 -28
  110. package/dist/interfaceSettings/index.mjs.map +1 -1
  111. package/dist/label/index.mjs +7 -4
  112. package/dist/label/index.mjs.map +1 -1
  113. package/dist/loading/index.mjs +9 -4
  114. package/dist/loading/index.mjs.map +1 -1
  115. package/dist/navbar/index.js +3 -2
  116. package/dist/navbar/index.js.map +1 -1
  117. package/dist/navbar/index.mjs +10 -6
  118. package/dist/navbar/index.mjs.map +1 -1
  119. package/dist/navigationMenu/index.mjs +9 -4
  120. package/dist/navigationMenu/index.mjs.map +1 -1
  121. package/dist/pagination/index.mjs +9 -4
  122. package/dist/pagination/index.mjs.map +1 -1
  123. package/dist/passwordInput/index.js +3 -2
  124. package/dist/passwordInput/index.js.map +1 -1
  125. package/dist/passwordInput/index.mjs +12 -6
  126. package/dist/passwordInput/index.mjs.map +1 -1
  127. package/dist/phoneInput/index.js +10 -5
  128. package/dist/phoneInput/index.js.map +1 -1
  129. package/dist/phoneInput/index.mjs +19 -11
  130. package/dist/phoneInput/index.mjs.map +1 -1
  131. package/dist/pinInput/index.js +3 -3
  132. package/dist/pinInput/index.js.map +1 -1
  133. package/dist/pinInput/index.mjs +12 -7
  134. package/dist/pinInput/index.mjs.map +1 -1
  135. package/dist/popover/index.mjs +9 -4
  136. package/dist/popover/index.mjs.map +1 -1
  137. package/dist/progress/index.mjs +9 -4
  138. package/dist/progress/index.mjs.map +1 -1
  139. package/dist/progressCircle/index.js +2 -2
  140. package/dist/progressCircle/index.js.map +1 -1
  141. package/dist/progressCircle/index.mjs +11 -6
  142. package/dist/progressCircle/index.mjs.map +1 -1
  143. package/dist/radio/index.js +6 -4
  144. package/dist/radio/index.js.map +1 -1
  145. package/dist/radio/index.mjs +13 -8
  146. package/dist/radio/index.mjs.map +1 -1
  147. package/dist/scrollArea/index.mjs +9 -4
  148. package/dist/scrollArea/index.mjs.map +1 -1
  149. package/dist/scrollIndicator/index.js +2 -1
  150. package/dist/scrollIndicator/index.js.map +1 -1
  151. package/dist/scrollIndicator/index.mjs +2 -1
  152. package/dist/scrollIndicator/index.mjs.map +1 -1
  153. package/dist/select/index.js +6 -2
  154. package/dist/select/index.js.map +1 -1
  155. package/dist/select/index.mjs +15 -8
  156. package/dist/select/index.mjs.map +1 -1
  157. package/dist/separator/index.mjs +9 -4
  158. package/dist/separator/index.mjs.map +1 -1
  159. package/dist/sheet/index.mjs +9 -4
  160. package/dist/sheet/index.mjs.map +1 -1
  161. package/dist/sidebar/index.mjs +9 -4
  162. package/dist/sidebar/index.mjs.map +1 -1
  163. package/dist/signature/index.js +31 -11
  164. package/dist/signature/index.js.map +1 -1
  165. package/dist/signature/index.mjs +40 -15
  166. package/dist/signature/index.mjs.map +1 -1
  167. package/dist/simpleTable/index.js +18 -14
  168. package/dist/simpleTable/index.js.map +1 -1
  169. package/dist/simpleTable/index.mjs +25 -18
  170. package/dist/simpleTable/index.mjs.map +1 -1
  171. package/dist/skeleton/index.mjs +9 -4
  172. package/dist/skeleton/index.mjs.map +1 -1
  173. package/dist/slider/index.mjs +9 -4
  174. package/dist/slider/index.mjs.map +1 -1
  175. package/dist/sortButton/index.mjs +268 -11
  176. package/dist/sortButton/index.mjs.map +1 -1
  177. package/dist/splitButton/index.mjs +267 -12
  178. package/dist/splitButton/index.mjs.map +1 -1
  179. package/dist/switch/index.js +2 -1
  180. package/dist/switch/index.js.map +1 -1
  181. package/dist/switch/index.mjs +11 -5
  182. package/dist/switch/index.mjs.map +1 -1
  183. package/dist/table/index.mjs +9 -4
  184. package/dist/table/index.mjs.map +1 -1
  185. package/dist/tabs/index.mjs +7 -4
  186. package/dist/tabs/index.mjs.map +1 -1
  187. package/dist/textarea/index.js +4 -4
  188. package/dist/textarea/index.js.map +1 -1
  189. package/dist/textarea/index.mjs +11 -8
  190. package/dist/textarea/index.mjs.map +1 -1
  191. package/dist/toast/index.d.mts +9 -1
  192. package/dist/toast/index.d.ts +9 -1
  193. package/dist/toast/index.js +3 -3
  194. package/dist/toast/index.js.map +1 -1
  195. package/dist/toast/index.mjs +145 -10
  196. package/dist/toast/index.mjs.map +1 -1
  197. package/dist/toaster/index.d.mts +5 -0
  198. package/dist/toaster/index.d.ts +5 -0
  199. package/dist/toaster/index.js +17 -142
  200. package/dist/toaster/index.js.map +1 -1
  201. package/dist/toaster/index.mjs +142 -135
  202. package/dist/toaster/index.mjs.map +1 -1
  203. package/package.json +1 -1
  204. package/dist/chunk-3ODWQVIA.mjs +0 -12
  205. package/dist/chunk-3ODWQVIA.mjs.map +0 -1
  206. package/dist/chunk-53OZVR57.mjs +0 -108
  207. package/dist/chunk-53OZVR57.mjs.map +0 -1
  208. package/dist/chunk-CBRGWUZG.mjs +0 -11
  209. package/dist/chunk-CBRGWUZG.mjs.map +0 -1
  210. package/dist/chunk-HYXZRCZW.mjs +0 -265
  211. package/dist/chunk-HYXZRCZW.mjs.map +0 -1
  212. package/dist/chunk-JNUGOUYJ.mjs +0 -154
  213. package/dist/chunk-JX5YLRCU.mjs +0 -443
  214. package/dist/chunk-JX5YLRCU.mjs.map +0 -1
  215. package/dist/chunk-NV3KR5Y7.mjs +0 -82
  216. package/dist/chunk-NV3KR5Y7.mjs.map +0 -1
  217. package/dist/chunk-OQ7MNEYW.mjs +0 -151
  218. package/dist/chunk-OQ7MNEYW.mjs.map +0 -1
package/dist/index.js CHANGED
@@ -7120,7 +7120,7 @@ var CodeBlock = ({
7120
7120
  {
7121
7121
  className: cn(
7122
7122
  widthStyles[width],
7123
- "hawa-w-full hawa-flex-col hawa-items-center hawa-rounded hawa-bg-background hawa-text-left hawa-text-white sm:hawa-text-base",
7123
+ "hawa-w-full hawa-flex-col hawa-items-center hawa-rounded hawa-bg-background hawa-text-left hawa-my-2 hawa-text-white sm:hawa-text-base",
7124
7124
  className
7125
7125
  )
7126
7126
  },
@@ -7408,7 +7408,7 @@ var sizeStyles = {
7408
7408
  sm: "hawa-text-xs"
7409
7409
  };
7410
7410
  var ToastProvider = ToastPrimitives.Provider;
7411
- var ToastViewport = React57.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React57.createElement("div", null, /* @__PURE__ */ React57.createElement(
7411
+ var ToastViewport = React57.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React57.createElement(
7412
7412
  ToastPrimitives.Viewport,
7413
7413
  {
7414
7414
  ref,
@@ -7418,7 +7418,7 @@ var ToastViewport = React57.forwardRef(({ className, ...props }, ref) => /* @__P
7418
7418
  ),
7419
7419
  ...props
7420
7420
  }
7421
- ), /* @__PURE__ */ React57.createElement("div", null, "inside ToastViewport")));
7421
+ ));
7422
7422
  ToastViewport.displayName = ToastPrimitives.Viewport.displayName;
7423
7423
  var Toast = React57.forwardRef(({ className, variant, severity = "none", direction, ...props }, ref) => {
7424
7424
  return /* @__PURE__ */ React57.createElement(
@@ -7518,134 +7518,10 @@ ToastDescription.displayName = ToastPrimitives.Description.displayName;
7518
7518
 
7519
7519
  // elements/toaster/Toaster.tsx
7520
7520
  var import_react33 = __toESM(require("react"));
7521
-
7522
- // hooks/useToast.ts
7523
- var React58 = __toESM(require("react"));
7524
- var TOAST_LIMIT = 5;
7525
- var TOAST_REMOVE_DELAY = 1e5;
7526
- var count = 0;
7527
- function genId() {
7528
- count = (count + 1) % Number.MAX_VALUE;
7529
- return count.toString();
7530
- }
7531
- var toastTimeouts = /* @__PURE__ */ new Map();
7532
- var addToRemoveQueue = (toastId) => {
7533
- if (toastTimeouts.has(toastId)) {
7534
- return;
7535
- }
7536
- const timeout = setTimeout(() => {
7537
- toastTimeouts.delete(toastId);
7538
- dispatch({
7539
- type: "REMOVE_TOAST",
7540
- toastId
7541
- });
7542
- }, TOAST_REMOVE_DELAY);
7543
- toastTimeouts.set(toastId, timeout);
7544
- };
7545
- var reducer = (state, action) => {
7546
- switch (action.type) {
7547
- case "ADD_TOAST":
7548
- console.log("adding toast case");
7549
- return {
7550
- ...state,
7551
- toasts: [action.toast, ...state.toasts].slice(0, TOAST_LIMIT)
7552
- };
7553
- case "UPDATE_TOAST":
7554
- return {
7555
- ...state,
7556
- toasts: state.toasts.map(
7557
- (t) => t.id === action.toast.id ? { ...t, ...action.toast } : t
7558
- )
7559
- };
7560
- case "DISMISS_TOAST": {
7561
- const { toastId } = action;
7562
- if (toastId) {
7563
- addToRemoveQueue(toastId);
7564
- } else {
7565
- state.toasts.forEach((toast2) => {
7566
- addToRemoveQueue(toast2.id);
7567
- });
7568
- }
7569
- return {
7570
- ...state,
7571
- toasts: state.toasts.map(
7572
- (t) => t.id === toastId || toastId === void 0 ? { ...t, open: false } : t
7573
- )
7574
- };
7575
- }
7576
- case "REMOVE_TOAST":
7577
- if (action.toastId === void 0) {
7578
- return { ...state, toasts: [] };
7579
- }
7580
- return {
7581
- ...state,
7582
- toasts: state.toasts.filter((t) => t.id !== action.toastId)
7583
- };
7584
- }
7585
- };
7586
- var listeners = [];
7587
- var memoryState = { toasts: [] };
7588
- function dispatch(action) {
7589
- console.log("dispatching toast");
7590
- memoryState = reducer(memoryState, action);
7591
- listeners.forEach((listener) => {
7592
- console.log("mapping through listerners in dispathc");
7593
- listener(memoryState);
7594
- });
7595
- }
7596
- function toast({ ...props }) {
7597
- const id = genId();
7598
- const update = (props2) => dispatch({
7599
- type: "UPDATE_TOAST",
7600
- toast: { ...props2, id }
7601
- });
7602
- const dismiss = () => dispatch({ type: "DISMISS_TOAST", toastId: id });
7603
- dispatch({
7604
- type: "ADD_TOAST",
7605
- toast: {
7606
- ...props,
7607
- id,
7608
- open: true,
7609
- onOpenChange: (open) => {
7610
- if (!open)
7611
- dismiss();
7612
- }
7613
- }
7614
- });
7615
- return {
7616
- id,
7617
- dismiss,
7618
- update
7619
- };
7620
- }
7621
- function useToast() {
7622
- const [state, setState] = React58.useState(memoryState);
7623
- React58.useEffect(() => {
7624
- console.log("useToast triggered in useEffect");
7625
- console.log("toast state", state);
7626
- console.log("listerners BEFORE", listeners);
7627
- console.log("TOAST: setState is ", setState);
7628
- listeners.push(setState);
7629
- return () => {
7630
- const index = listeners.indexOf(setState);
7631
- console.log("listerners AFTER", listeners);
7632
- if (index > -1) {
7633
- listeners.splice(index, 1);
7634
- }
7635
- };
7636
- }, [state]);
7637
- return {
7638
- ...state,
7639
- toast,
7640
- dismiss: (toastId) => dispatch({ type: "DISMISS_TOAST", toastId })
7641
- };
7642
- }
7643
-
7644
- // elements/toaster/Toaster.tsx
7645
7521
  function Toaster(props) {
7646
- const { toasts } = useToast();
7522
+ var _a;
7647
7523
  let isRTL = props.direction === "rtl";
7648
- return /* @__PURE__ */ import_react33.default.createElement("div", null, /* @__PURE__ */ import_react33.default.createElement("div", null, "I AM INSIDE MAIN TOASTER"), /* @__PURE__ */ import_react33.default.createElement(ToastProvider, { swipeDirection: isRTL ? "left" : "right" }, /* @__PURE__ */ import_react33.default.createElement("div", null, "I AM INSIDE TOASTPROVIDER"), toasts.map(function({
7524
+ return /* @__PURE__ */ import_react33.default.createElement(ToastProvider, { swipeDirection: isRTL ? "left" : "right" }, (_a = props.toasts) == null ? void 0 : _a.map(function({
7649
7525
  id,
7650
7526
  title,
7651
7527
  description,
@@ -7653,7 +7529,7 @@ function Toaster(props) {
7653
7529
  action,
7654
7530
  ...toastProps
7655
7531
  }) {
7656
- return /* @__PURE__ */ import_react33.default.createElement(Toast, { direction: props.direction, key: id, ...toastProps }, /* @__PURE__ */ import_react33.default.createElement("div", null, "I AM INSIDE TOAST"), /* @__PURE__ */ import_react33.default.createElement(
7532
+ return /* @__PURE__ */ import_react33.default.createElement(Toast, { direction: props.direction, key: id, ...toastProps }, /* @__PURE__ */ import_react33.default.createElement(
7657
7533
  "div",
7658
7534
  {
7659
7535
  className: cn(
@@ -7668,10 +7544,7 @@ function Toaster(props) {
7668
7544
  {
7669
7545
  className: cn(
7670
7546
  "hawa-flex hawa-w-full hawa-flex-row hawa-justify-between hawa-gap-2",
7671
- {
7672
- "hawa-p-4": size === "default",
7673
- "hawa-p-2": size === "sm"
7674
- }
7547
+ { "hawa-p-4": size === "default", "hawa-p-2": size === "sm" }
7675
7548
  )
7676
7549
  },
7677
7550
  /* @__PURE__ */ import_react33.default.createElement("div", { className: "hawa-grid hawa-gap-1 hawa-text-start" }, title && /* @__PURE__ */ import_react33.default.createElement(ToastTitle, { size }, title), description && /* @__PURE__ */ import_react33.default.createElement(ToastDescription, { size }, description)),
@@ -7683,7 +7556,7 @@ function Toaster(props) {
7683
7556
  {
7684
7557
  className: cn("hawa-gap-2", isRTL && "hawa-fixed hawa-left-0")
7685
7558
  }
7686
- )));
7559
+ ));
7687
7560
  }
7688
7561
 
7689
7562
  // elements/destroyableCard/DestroyableCard.tsx
@@ -7881,13 +7754,13 @@ var Stats = ({
7881
7754
  };
7882
7755
 
7883
7756
  // layout/sidebar/Sidebar.tsx
7884
- var React63 = __toESM(require("react"));
7757
+ var React62 = __toESM(require("react"));
7885
7758
  var AccordionPrimitive6 = __toESM(require("@radix-ui/react-accordion"));
7886
7759
  var Accordion2 = AccordionPrimitive6.Root;
7887
7760
  var triggerStyles = "hawa-flex hawa-flex-1 hawa-items-center hawa-duration-75 hawa-select-none hawa-cursor-pointer hawa-rounded hawa-justify-between hawa-p-2 hawa-px-3 hawa-font-medium hawa-transition-all [&[data-state=open]>svg]:hawa--rotate-90";
7888
- var AccordionItem2 = React63.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React63.createElement(AccordionPrimitive6.Item, { ref, className: cn(className), ...props }));
7761
+ var AccordionItem2 = React62.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React62.createElement(AccordionPrimitive6.Item, { ref, className: cn(className), ...props }));
7889
7762
  AccordionItem2.displayName = "AccordionItem";
7890
- var AccordionTrigger2 = React63.forwardRef(({ className, showArrow, children, ...props }, ref) => /* @__PURE__ */ React63.createElement(AccordionPrimitive6.Header, { className: "flex" }, /* @__PURE__ */ React63.createElement(
7763
+ var AccordionTrigger2 = React62.forwardRef(({ className, showArrow, children, ...props }, ref) => /* @__PURE__ */ React62.createElement(AccordionPrimitive6.Header, { className: "flex" }, /* @__PURE__ */ React62.createElement(
7891
7764
  AccordionPrimitive6.Trigger,
7892
7765
  {
7893
7766
  ref,
@@ -7895,7 +7768,7 @@ var AccordionTrigger2 = React63.forwardRef(({ className, showArrow, children, ..
7895
7768
  ...props
7896
7769
  },
7897
7770
  children,
7898
- showArrow && /* @__PURE__ */ React63.createElement(
7771
+ showArrow && /* @__PURE__ */ React62.createElement(
7899
7772
  "svg",
7900
7773
  {
7901
7774
  "aria-label": "Chevron Right Icon",
@@ -7906,11 +7779,11 @@ var AccordionTrigger2 = React63.forwardRef(({ className, showArrow, children, ..
7906
7779
  width: "1em",
7907
7780
  className: "hawa-icon hawa-shrink-0 hawa-rotate-90 hawa-transition-transform hawa-duration-200"
7908
7781
  },
7909
- /* @__PURE__ */ React63.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" })
7782
+ /* @__PURE__ */ React62.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" })
7910
7783
  )
7911
7784
  )));
7912
7785
  AccordionTrigger2.displayName = AccordionPrimitive6.Trigger.displayName;
7913
- var AccordionContent2 = React63.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React63.createElement(
7786
+ var AccordionContent2 = React62.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React62.createElement(
7914
7787
  AccordionPrimitive6.Content,
7915
7788
  {
7916
7789
  ref,
@@ -7920,7 +7793,7 @@ var AccordionContent2 = React63.forwardRef(({ className, children, ...props }, r
7920
7793
  ),
7921
7794
  ...props
7922
7795
  },
7923
- /* @__PURE__ */ React63.createElement("div", null, children)
7796
+ /* @__PURE__ */ React62.createElement("div", null, children)
7924
7797
  ));
7925
7798
  AccordionContent2.displayName = AccordionPrimitive6.Content.displayName;
7926
7799
  var SidebarGroup = ({
@@ -7934,7 +7807,7 @@ var SidebarGroup = ({
7934
7807
  direction,
7935
7808
  isOpen
7936
7809
  }) => {
7937
- return /* @__PURE__ */ React63.createElement("div", { className: "hawa-m-2" }, title && /* @__PURE__ */ React63.createElement("h3", { className: "hawa-mb-1 hawa-font-bold" }, title), /* @__PURE__ */ React63.createElement("ul", { className: "hawa-flex hawa-flex-col hawa-gap-2" }, /* @__PURE__ */ React63.createElement(
7810
+ return /* @__PURE__ */ React62.createElement("div", { className: "hawa-m-2" }, title && /* @__PURE__ */ React62.createElement("h3", { className: "hawa-mb-1 hawa-font-bold" }, title), /* @__PURE__ */ React62.createElement("ul", { className: "hawa-flex hawa-flex-col hawa-gap-2" }, /* @__PURE__ */ React62.createElement(
7938
7811
  Accordion2,
7939
7812
  {
7940
7813
  value: openedItem,
@@ -7945,7 +7818,7 @@ var SidebarGroup = ({
7945
7818
  collapsible: true,
7946
7819
  className: "hawa-flex hawa-flex-col hawa-gap-1"
7947
7820
  },
7948
- items.map((item, idx) => /* @__PURE__ */ React63.createElement(
7821
+ items.map((item, idx) => /* @__PURE__ */ React62.createElement(
7949
7822
  SidebarItem,
7950
7823
  {
7951
7824
  isOpen,
@@ -7971,14 +7844,14 @@ var SidebarItem = ({
7971
7844
  return props.selectedItem === value ? "hawa-bg-primary/90 hawa-text-primary-foreground hawa-cursor-default" : "hover:hawa-bg-primary/10";
7972
7845
  };
7973
7846
  if (item.subitems) {
7974
- return /* @__PURE__ */ React63.createElement(
7847
+ return /* @__PURE__ */ React62.createElement(
7975
7848
  AccordionItem2,
7976
7849
  {
7977
7850
  value: item.value,
7978
7851
  className: "hawa-overflow-x-clip ",
7979
7852
  dir: direction
7980
7853
  },
7981
- /* @__PURE__ */ React63.createElement(
7854
+ /* @__PURE__ */ React62.createElement(
7982
7855
  AccordionTrigger2,
7983
7856
  {
7984
7857
  className: cn(
@@ -7990,7 +7863,7 @@ var SidebarItem = ({
7990
7863
  ),
7991
7864
  showArrow: isOpen
7992
7865
  },
7993
- /* @__PURE__ */ React63.createElement(
7866
+ /* @__PURE__ */ React62.createElement(
7994
7867
  "div",
7995
7868
  {
7996
7869
  className: cn(
@@ -7998,7 +7871,7 @@ var SidebarItem = ({
7998
7871
  )
7999
7872
  },
8000
7873
  item.icon && item.icon,
8001
- /* @__PURE__ */ React63.createElement(
7874
+ /* @__PURE__ */ React62.createElement(
8002
7875
  "span",
8003
7876
  {
8004
7877
  className: cn(
@@ -8010,14 +7883,14 @@ var SidebarItem = ({
8010
7883
  )
8011
7884
  )
8012
7885
  ),
8013
- item.subitems && /* @__PURE__ */ React63.createElement(AccordionContent2, { className: "hawa-mt-1 hawa-h-full hawa-rounded" }, /* @__PURE__ */ React63.createElement(
7886
+ item.subitems && /* @__PURE__ */ React62.createElement(AccordionContent2, { className: "hawa-mt-1 hawa-h-full hawa-rounded" }, /* @__PURE__ */ React62.createElement(
8014
7887
  "div",
8015
7888
  {
8016
7889
  className: cn(
8017
7890
  "hawa-flex hawa-h-full hawa-flex-col hawa-gap-2 hawa-bg-foreground/5 hawa-p-1"
8018
7891
  )
8019
7892
  },
8020
- item.subitems.map((subitem, idx) => /* @__PURE__ */ React63.createElement(
7893
+ item.subitems.map((subitem, idx) => /* @__PURE__ */ React62.createElement(
8021
7894
  "a",
8022
7895
  {
8023
7896
  href: subitem.slug,
@@ -8048,7 +7921,7 @@ var SidebarItem = ({
8048
7921
  ))
8049
7922
  );
8050
7923
  } else {
8051
- return /* @__PURE__ */ React63.createElement(
7924
+ return /* @__PURE__ */ React62.createElement(
8052
7925
  "a",
8053
7926
  {
8054
7927
  href: item.slug,
@@ -8072,7 +7945,7 @@ var SidebarItem = ({
8072
7945
  "hawa-overflow-x-clip "
8073
7946
  )
8074
7947
  },
8075
- /* @__PURE__ */ React63.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2" }, item.icon && item.icon, /* @__PURE__ */ React63.createElement(
7948
+ /* @__PURE__ */ React62.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2" }, item.icon && item.icon, /* @__PURE__ */ React62.createElement(
8076
7949
  "span",
8077
7950
  {
8078
7951
  className: cn(
@@ -8082,7 +7955,7 @@ var SidebarItem = ({
8082
7955
  },
8083
7956
  item.label,
8084
7957
  " ",
8085
- item.badge && /* @__PURE__ */ React63.createElement(Chip, { label: item.badge.label, color: "hyper", size: "small" })
7958
+ item.badge && /* @__PURE__ */ React62.createElement(Chip, { label: item.badge.label, color: "hyper", size: "small" })
8086
7959
  ))
8087
7960
  );
8088
7961
  }
@@ -8675,14 +8548,14 @@ var AppTopbar = ({ ...props }) => {
8675
8548
  };
8676
8549
 
8677
8550
  // layout/appMenubar/AppMenubar.tsx
8678
- var React68 = __toESM(require("react"));
8551
+ var React67 = __toESM(require("react"));
8679
8552
  var MenubarPrimitive = __toESM(require("@radix-ui/react-menubar"));
8680
8553
  var MenubarMenu = MenubarPrimitive.Menu;
8681
8554
  var MenubarGroup = MenubarPrimitive.Group;
8682
8555
  var MenubarPortal = MenubarPrimitive.Portal;
8683
8556
  var MenubarSub = MenubarPrimitive.Sub;
8684
8557
  var MenubarRadioGroup = MenubarPrimitive.RadioGroup;
8685
- var Menubar = React68.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React68.createElement(
8558
+ var Menubar = React67.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React67.createElement(
8686
8559
  MenubarPrimitive.Root,
8687
8560
  {
8688
8561
  ref,
@@ -8694,7 +8567,7 @@ var Menubar = React68.forwardRef(({ className, ...props }, ref) => /* @__PURE__
8694
8567
  }
8695
8568
  ));
8696
8569
  Menubar.displayName = MenubarPrimitive.Root.displayName;
8697
- var MenubarTrigger = React68.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React68.createElement(
8570
+ var MenubarTrigger = React67.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React67.createElement(
8698
8571
  MenubarPrimitive.Trigger,
8699
8572
  {
8700
8573
  ref,
@@ -8706,7 +8579,7 @@ var MenubarTrigger = React68.forwardRef(({ className, ...props }, ref) => /* @__
8706
8579
  }
8707
8580
  ));
8708
8581
  MenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName;
8709
- var MenubarSubTrigger = React68.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ React68.createElement(
8582
+ var MenubarSubTrigger = React67.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ React67.createElement(
8710
8583
  MenubarPrimitive.SubTrigger,
8711
8584
  {
8712
8585
  ref,
@@ -8718,7 +8591,7 @@ var MenubarSubTrigger = React68.forwardRef(({ className, inset, children, ...pro
8718
8591
  ...props
8719
8592
  },
8720
8593
  children,
8721
- /* @__PURE__ */ React68.createElement(
8594
+ /* @__PURE__ */ React67.createElement(
8722
8595
  "svg",
8723
8596
  {
8724
8597
  "aria-label": "Chevron Right Icon",
@@ -8733,11 +8606,11 @@ var MenubarSubTrigger = React68.forwardRef(({ className, inset, children, ...pro
8733
8606
  strokeLinejoin: "round",
8734
8607
  className: "hawa-icon hawa-ml-auto"
8735
8608
  },
8736
- /* @__PURE__ */ React68.createElement("path", { d: "m9 18 6-6-6-6" })
8609
+ /* @__PURE__ */ React67.createElement("path", { d: "m9 18 6-6-6-6" })
8737
8610
  )
8738
8611
  ));
8739
8612
  MenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName;
8740
- var MenubarSubContent = React68.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React68.createElement(
8613
+ var MenubarSubContent = React67.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React67.createElement(
8741
8614
  MenubarPrimitive.SubContent,
8742
8615
  {
8743
8616
  ref,
@@ -8749,8 +8622,8 @@ var MenubarSubContent = React68.forwardRef(({ className, ...props }, ref) => /*
8749
8622
  }
8750
8623
  ));
8751
8624
  MenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName;
8752
- var MenubarContent = React68.forwardRef(
8753
- ({ className, align = "start", alignOffset = -4, sideOffset = 8, ...props }, ref) => /* @__PURE__ */ React68.createElement(MenubarPrimitive.Portal, null, /* @__PURE__ */ React68.createElement(
8625
+ var MenubarContent = React67.forwardRef(
8626
+ ({ className, align = "start", alignOffset = -4, sideOffset = 8, ...props }, ref) => /* @__PURE__ */ React67.createElement(MenubarPrimitive.Portal, null, /* @__PURE__ */ React67.createElement(
8754
8627
  MenubarPrimitive.Content,
8755
8628
  {
8756
8629
  ref,
@@ -8766,7 +8639,7 @@ var MenubarContent = React68.forwardRef(
8766
8639
  ))
8767
8640
  );
8768
8641
  MenubarContent.displayName = MenubarPrimitive.Content.displayName;
8769
- var MenubarItem = React68.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ React68.createElement(
8642
+ var MenubarItem = React67.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ React67.createElement(
8770
8643
  MenubarPrimitive.Item,
8771
8644
  {
8772
8645
  ref,
@@ -8779,7 +8652,7 @@ var MenubarItem = React68.forwardRef(({ className, inset, ...props }, ref) => /*
8779
8652
  }
8780
8653
  ));
8781
8654
  MenubarItem.displayName = MenubarPrimitive.Item.displayName;
8782
- var MenubarCheckboxItem = React68.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ React68.createElement(
8655
+ var MenubarCheckboxItem = React67.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ React67.createElement(
8783
8656
  MenubarPrimitive.CheckboxItem,
8784
8657
  {
8785
8658
  ref,
@@ -8790,7 +8663,7 @@ var MenubarCheckboxItem = React68.forwardRef(({ className, children, checked, ..
8790
8663
  checked,
8791
8664
  ...props
8792
8665
  },
8793
- /* @__PURE__ */ React68.createElement("span", { className: "hawa-absolute hawa-left-2 hawa-flex hawa-h-3.5 hawa-w-3.5 hawa-items-center hawa-justify-center" }, /* @__PURE__ */ React68.createElement(MenubarPrimitive.ItemIndicator, null, /* @__PURE__ */ React68.createElement(
8666
+ /* @__PURE__ */ React67.createElement("span", { className: "hawa-absolute hawa-left-2 hawa-flex hawa-h-3.5 hawa-w-3.5 hawa-items-center hawa-justify-center" }, /* @__PURE__ */ React67.createElement(MenubarPrimitive.ItemIndicator, null, /* @__PURE__ */ React67.createElement(
8794
8667
  "svg",
8795
8668
  {
8796
8669
  xmlns: "http://www.w3.org/2000/svg",
@@ -8804,12 +8677,12 @@ var MenubarCheckboxItem = React68.forwardRef(({ className, children, checked, ..
8804
8677
  strokeLinejoin: "round",
8805
8678
  className: "hawa-icon"
8806
8679
  },
8807
- /* @__PURE__ */ React68.createElement("path", { d: "M20 6 9 17l-5-5" })
8680
+ /* @__PURE__ */ React67.createElement("path", { d: "M20 6 9 17l-5-5" })
8808
8681
  ))),
8809
8682
  children
8810
8683
  ));
8811
8684
  MenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName;
8812
- var MenubarRadioItem = React68.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React68.createElement(
8685
+ var MenubarRadioItem = React67.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React67.createElement(
8813
8686
  MenubarPrimitive.RadioItem,
8814
8687
  {
8815
8688
  ref,
@@ -8819,7 +8692,7 @@ var MenubarRadioItem = React68.forwardRef(({ className, children, ...props }, re
8819
8692
  ),
8820
8693
  ...props
8821
8694
  },
8822
- /* @__PURE__ */ React68.createElement("span", { className: "hawa-absolute hawa-left-2 hawa-flex hawa-h-3.5 hawa-w-3.5 hawa-items-center hawa-justify-center" }, /* @__PURE__ */ React68.createElement(MenubarPrimitive.ItemIndicator, null, /* @__PURE__ */ React68.createElement(
8695
+ /* @__PURE__ */ React67.createElement("span", { className: "hawa-absolute hawa-left-2 hawa-flex hawa-h-3.5 hawa-w-3.5 hawa-items-center hawa-justify-center" }, /* @__PURE__ */ React67.createElement(MenubarPrimitive.ItemIndicator, null, /* @__PURE__ */ React67.createElement(
8823
8696
  "svg",
8824
8697
  {
8825
8698
  xmlns: "http://www.w3.org/2000/svg",
@@ -8833,12 +8706,12 @@ var MenubarRadioItem = React68.forwardRef(({ className, children, ...props }, re
8833
8706
  strokeLinejoin: "round",
8834
8707
  className: "hawa-h-2 hawa-w-2 hawa-fill-current"
8835
8708
  },
8836
- /* @__PURE__ */ React68.createElement("circle", { cx: "12", cy: "12", r: "10" })
8709
+ /* @__PURE__ */ React67.createElement("circle", { cx: "12", cy: "12", r: "10" })
8837
8710
  ))),
8838
8711
  children
8839
8712
  ));
8840
8713
  MenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName;
8841
- var MenubarLabel = React68.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ React68.createElement(
8714
+ var MenubarLabel = React67.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ React67.createElement(
8842
8715
  MenubarPrimitive.Label,
8843
8716
  {
8844
8717
  ref,
@@ -8851,7 +8724,7 @@ var MenubarLabel = React68.forwardRef(({ className, inset, ...props }, ref) => /
8851
8724
  }
8852
8725
  ));
8853
8726
  MenubarLabel.displayName = MenubarPrimitive.Label.displayName;
8854
- var MenubarSeparator = React68.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React68.createElement(
8727
+ var MenubarSeparator = React67.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React67.createElement(
8855
8728
  MenubarPrimitive.Separator,
8856
8729
  {
8857
8730
  ref,
@@ -8864,7 +8737,7 @@ var MenubarShortcut = ({
8864
8737
  className,
8865
8738
  ...props
8866
8739
  }) => {
8867
- return /* @__PURE__ */ React68.createElement(
8740
+ return /* @__PURE__ */ React67.createElement(
8868
8741
  "span",
8869
8742
  {
8870
8743
  className: cn(
@@ -11695,6 +11568,128 @@ var import_react75 = require("react");
11695
11568
  // hooks/useHover.ts
11696
11569
  var import_react76 = require("react");
11697
11570
 
11571
+ // hooks/useToast.ts
11572
+ var React103 = __toESM(require("react"));
11573
+ var TOAST_LIMIT = 5;
11574
+ var TOAST_REMOVE_DELAY = 1e5;
11575
+ var count = 0;
11576
+ function genId() {
11577
+ count = (count + 1) % Number.MAX_VALUE;
11578
+ return count.toString();
11579
+ }
11580
+ var toastTimeouts = /* @__PURE__ */ new Map();
11581
+ var addToRemoveQueue = (toastId) => {
11582
+ if (toastTimeouts.has(toastId)) {
11583
+ return;
11584
+ }
11585
+ const timeout = setTimeout(() => {
11586
+ toastTimeouts.delete(toastId);
11587
+ dispatch({
11588
+ type: "REMOVE_TOAST",
11589
+ toastId
11590
+ });
11591
+ }, TOAST_REMOVE_DELAY);
11592
+ toastTimeouts.set(toastId, timeout);
11593
+ };
11594
+ var reducer = (state, action) => {
11595
+ switch (action.type) {
11596
+ case "ADD_TOAST":
11597
+ console.log("adding toast case");
11598
+ return {
11599
+ ...state,
11600
+ toasts: [action.toast, ...state.toasts].slice(0, TOAST_LIMIT)
11601
+ };
11602
+ case "UPDATE_TOAST":
11603
+ return {
11604
+ ...state,
11605
+ toasts: state.toasts.map(
11606
+ (t) => t.id === action.toast.id ? { ...t, ...action.toast } : t
11607
+ )
11608
+ };
11609
+ case "DISMISS_TOAST": {
11610
+ const { toastId } = action;
11611
+ if (toastId) {
11612
+ addToRemoveQueue(toastId);
11613
+ } else {
11614
+ state.toasts.forEach((toast2) => {
11615
+ addToRemoveQueue(toast2.id);
11616
+ });
11617
+ }
11618
+ return {
11619
+ ...state,
11620
+ toasts: state.toasts.map(
11621
+ (t) => t.id === toastId || toastId === void 0 ? { ...t, open: false } : t
11622
+ )
11623
+ };
11624
+ }
11625
+ case "REMOVE_TOAST":
11626
+ if (action.toastId === void 0) {
11627
+ return { ...state, toasts: [] };
11628
+ }
11629
+ return {
11630
+ ...state,
11631
+ toasts: state.toasts.filter((t) => t.id !== action.toastId)
11632
+ };
11633
+ }
11634
+ };
11635
+ var listeners = [];
11636
+ var memoryState = { toasts: [] };
11637
+ function dispatch(action) {
11638
+ console.log("dispatching toast");
11639
+ memoryState = reducer(memoryState, action);
11640
+ listeners.forEach((listener) => {
11641
+ console.log("mapping through listerners in dispathc");
11642
+ listener(memoryState);
11643
+ });
11644
+ }
11645
+ function toast({ ...props }) {
11646
+ const id = genId();
11647
+ const update = (props2) => dispatch({
11648
+ type: "UPDATE_TOAST",
11649
+ toast: { ...props2, id }
11650
+ });
11651
+ const dismiss = () => dispatch({ type: "DISMISS_TOAST", toastId: id });
11652
+ dispatch({
11653
+ type: "ADD_TOAST",
11654
+ toast: {
11655
+ ...props,
11656
+ id,
11657
+ open: true,
11658
+ onOpenChange: (open) => {
11659
+ if (!open)
11660
+ dismiss();
11661
+ }
11662
+ }
11663
+ });
11664
+ return {
11665
+ id,
11666
+ dismiss,
11667
+ update
11668
+ };
11669
+ }
11670
+ function useToast() {
11671
+ const [state, setState] = React103.useState(memoryState);
11672
+ 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
+ listeners.push(setState);
11678
+ return () => {
11679
+ const index = listeners.indexOf(setState);
11680
+ console.log("listerners AFTER", listeners);
11681
+ if (index > -1) {
11682
+ listeners.splice(index, 1);
11683
+ }
11684
+ };
11685
+ }, [state]);
11686
+ return {
11687
+ ...state,
11688
+ toast,
11689
+ dismiss: (toastId) => dispatch({ type: "DISMISS_TOAST", toastId })
11690
+ };
11691
+ }
11692
+
11698
11693
  // hooks/useCarousel.ts
11699
11694
  var import_react77 = require("react");
11700
11695