@sikka/hawa 0.24.4-next → 0.24.5-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 (151) hide show
  1. package/dist/accordion/index.d.mts +1 -2
  2. package/dist/accordion/index.d.ts +1 -2
  3. package/dist/accordion/index.mjs +219 -7
  4. package/dist/alert/index.d.mts +1 -1
  5. package/dist/alert/index.d.ts +1 -1
  6. package/dist/appLayout/index.d.mts +126 -0
  7. package/dist/appLayout/index.d.ts +126 -0
  8. package/dist/appLayout/index.js +1325 -0
  9. package/dist/appLayout/index.mjs +1285 -0
  10. package/dist/appMenubar/index.d.mts +33 -0
  11. package/dist/appMenubar/index.d.ts +33 -0
  12. package/dist/appMenubar/index.js +281 -0
  13. package/dist/appMenubar/index.mjs +224 -0
  14. package/dist/appTabs/index.d.mts +18 -0
  15. package/dist/appTabs/index.d.ts +18 -0
  16. package/dist/appTabs/index.js +92 -0
  17. package/dist/appTabs/index.mjs +50 -0
  18. package/dist/appTopbar/index.d.mts +44 -0
  19. package/dist/appTopbar/index.d.ts +44 -0
  20. package/dist/appTopbar/index.js +483 -0
  21. package/dist/appTopbar/index.mjs +441 -0
  22. package/dist/avatar/index.d.mts +5 -4
  23. package/dist/avatar/index.d.ts +5 -4
  24. package/dist/backToTop/index.mjs +353 -3
  25. package/dist/badge/index.d.mts +2 -2
  26. package/dist/badge/index.d.ts +2 -2
  27. package/dist/checkbox/index.d.mts +1 -2
  28. package/dist/checkbox/index.d.ts +1 -2
  29. package/dist/chip/index.d.mts +36 -2
  30. package/dist/chip/index.d.ts +36 -2
  31. package/dist/chip/index.mjs +83 -3
  32. package/dist/chunk-62GI5F2P.mjs +442 -0
  33. package/dist/chunk-7NCNPRCL.mjs +120 -0
  34. package/dist/{chunk-TNAHW35O.mjs → chunk-C2UYTGUD.mjs} +8 -4
  35. package/dist/{chunk-26FHSPJI.mjs → chunk-DGWAHQRX.mjs} +1 -101
  36. package/dist/chunk-LRLLDOQZ.mjs +178 -0
  37. package/dist/chunk-ND4BWUKH.mjs +34 -0
  38. package/dist/codeBlock/index.mjs +684 -310
  39. package/dist/colorPicker/index.d.mts +2 -1
  40. package/dist/colorPicker/index.d.ts +2 -1
  41. package/dist/colorPicker/index.mjs +2 -167
  42. package/dist/combobox/index.d.mts +9 -1
  43. package/dist/combobox/index.d.ts +9 -1
  44. package/dist/combobox/index.mjs +61 -393
  45. package/dist/command/index.mjs +10 -425
  46. package/dist/commonTypes-3J1E3b61.d.mts +6 -0
  47. package/dist/commonTypes-3J1E3b61.d.ts +6 -0
  48. package/dist/commonTypes-GhKAraJw.d.mts +4 -0
  49. package/dist/commonTypes-GhKAraJw.d.ts +4 -0
  50. package/dist/commonTypes-LrR8QrYP.d.mts +5 -0
  51. package/dist/commonTypes-LrR8QrYP.d.ts +5 -0
  52. package/dist/commonTypes-WPhcN3Vr.d.mts +5 -0
  53. package/dist/commonTypes-WPhcN3Vr.d.ts +5 -0
  54. package/dist/commonTypes-ko_NGEoT.d.mts +3 -0
  55. package/dist/commonTypes-ko_NGEoT.d.ts +3 -0
  56. package/dist/copyrights/index.d.mts +17 -0
  57. package/dist/copyrights/index.d.ts +17 -0
  58. package/dist/copyrights/index.js +45 -0
  59. package/dist/copyrights/index.mjs +8 -0
  60. package/dist/count/index.d.mts +11 -0
  61. package/dist/count/index.d.ts +11 -0
  62. package/dist/count/index.js +45 -0
  63. package/dist/count/index.mjs +8 -0
  64. package/dist/dataTable/index.d.mts +1 -1
  65. package/dist/dataTable/index.d.ts +1 -1
  66. package/dist/destroyableCard/index.d.mts +1 -1
  67. package/dist/destroyableCard/index.d.ts +1 -1
  68. package/dist/dialog/index.d.mts +1 -1
  69. package/dist/dialog/index.d.ts +1 -1
  70. package/dist/docsLayout/index.d.mts +37 -0
  71. package/dist/docsLayout/index.d.ts +37 -0
  72. package/dist/docsLayout/index.js +926 -0
  73. package/dist/docsLayout/index.mjs +886 -0
  74. package/dist/docsSidebar/index.d.mts +11 -0
  75. package/dist/docsSidebar/index.d.ts +11 -0
  76. package/dist/docsSidebar/index.js +111 -0
  77. package/dist/docsSidebar/index.mjs +69 -0
  78. package/dist/index.d.mts +1 -0
  79. package/dist/index.d.ts +1 -0
  80. package/dist/index.js +50 -41
  81. package/dist/index.mjs +50 -41
  82. package/dist/input/index.d.mts +2 -9
  83. package/dist/input/index.d.ts +2 -9
  84. package/dist/input/index.mjs +14 -98
  85. package/dist/interfaceSettings/index.d.mts +1 -1
  86. package/dist/interfaceSettings/index.d.ts +1 -1
  87. package/dist/interfaceSettings/index.mjs +24 -110
  88. package/dist/label/index.d.mts +1 -1
  89. package/dist/label/index.d.ts +1 -1
  90. package/dist/label/index.mjs +2 -87
  91. package/dist/layout/index.d.mts +1 -0
  92. package/dist/layout/index.d.ts +1 -0
  93. package/dist/layout/index.js +53 -44
  94. package/dist/layout/index.mjs +50 -41
  95. package/dist/navbar/index.d.mts +17 -0
  96. package/dist/navbar/index.d.ts +17 -0
  97. package/dist/navbar/index.js +166 -0
  98. package/dist/navbar/index.mjs +126 -0
  99. package/dist/pagination/index.d.mts +1 -1
  100. package/dist/pagination/index.d.ts +1 -1
  101. package/dist/passwordInput/index.mjs +27 -137
  102. package/dist/phoneInput/index.mjs +19 -129
  103. package/dist/radio/index.d.mts +1 -4
  104. package/dist/radio/index.d.ts +1 -4
  105. package/dist/scrollArea/index.d.mts +1 -1
  106. package/dist/scrollArea/index.d.ts +1 -1
  107. package/dist/select/index.d.mts +1 -1
  108. package/dist/select/index.d.ts +1 -1
  109. package/dist/separator/index.d.mts +1 -1
  110. package/dist/separator/index.d.ts +1 -1
  111. package/dist/sidebar/index.d.mts +48 -0
  112. package/dist/sidebar/index.d.ts +48 -0
  113. package/dist/sidebar/index.js +341 -0
  114. package/dist/sidebar/index.mjs +298 -0
  115. package/dist/simpleTable/index.d.mts +4 -3
  116. package/dist/simpleTable/index.d.ts +4 -3
  117. package/dist/simpleTable/index.mjs +21 -45
  118. package/dist/skeleton/index.d.mts +3 -3
  119. package/dist/skeleton/index.d.ts +3 -3
  120. package/dist/skeleton/index.mjs +3 -29
  121. package/dist/sortButton/index.mjs +9 -260
  122. package/dist/splitButton/index.d.mts +4 -3
  123. package/dist/splitButton/index.d.ts +4 -3
  124. package/dist/splitButton/index.mjs +10 -259
  125. package/dist/stats/index.d.mts +19 -0
  126. package/dist/stats/index.d.ts +19 -0
  127. package/dist/stats/index.js +191 -0
  128. package/dist/stats/index.mjs +154 -0
  129. package/dist/stopPropagationWrapper/index.d.mts +2 -2
  130. package/dist/stopPropagationWrapper/index.d.ts +2 -2
  131. package/dist/switch/index.d.mts +2 -1
  132. package/dist/switch/index.d.ts +2 -1
  133. package/dist/tabs/index.d.mts +19 -1
  134. package/dist/tabs/index.d.ts +19 -1
  135. package/dist/tabs/index.mjs +94 -14
  136. package/dist/textarea/index.d.mts +8 -1
  137. package/dist/textarea/index.d.ts +8 -1
  138. package/dist/textarea/index.mjs +92 -8
  139. package/dist/toast/index.d.mts +1 -1
  140. package/dist/toast/index.d.ts +1 -1
  141. package/package.json +1 -1
  142. package/dist/Label-fkQ4ebuH.d.mts +0 -12
  143. package/dist/Label-fkQ4ebuH.d.ts +0 -12
  144. package/dist/chunk-72HYR6WB.mjs +0 -88
  145. package/dist/chunk-JYSC6GKM.mjs +0 -229
  146. package/dist/commonTypes-3k5cNB1s.d.mts +0 -4
  147. package/dist/commonTypes-3k5cNB1s.d.ts +0 -4
  148. package/dist/commonTypes-N7XOVCit.d.mts +0 -5
  149. package/dist/commonTypes-N7XOVCit.d.ts +0 -5
  150. package/dist/index-DUZFcPRO.d.mts +0 -38
  151. package/dist/index-DUZFcPRO.d.ts +0 -38
@@ -0,0 +1,441 @@
1
+ import {
2
+ cn
3
+ } from "../chunk-TE3BKEXL.mjs";
4
+
5
+ // components/layout/appTopbar/AppTopbar.tsx
6
+ import React2 from "react";
7
+
8
+ // components/elements/dropdownMenu/DropdownMenu.tsx
9
+ import * as React from "react";
10
+ import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
11
+ var DropdownMenuRoot = DropdownMenuPrimitive.Root;
12
+ var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
13
+ var DropdownMenuPortal = DropdownMenuPrimitive.Portal;
14
+ var DropdownMenuSub = DropdownMenuPrimitive.Sub;
15
+ var DropdownMenuSubTrigger = React.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ React.createElement(
16
+ DropdownMenuPrimitive.SubTrigger,
17
+ {
18
+ ref,
19
+ className: cn(
20
+ "hawa-flex hawa-cursor-default hawa-select-none hawa-items-center hawa-justify-between hawa-rounded-sm hawa-text-sm hawa-outline-none focus:hawa-bg-accent data-[state=open]:hawa-bg-accent",
21
+ inset && "hawa-pl-8",
22
+ className
23
+ ),
24
+ ...props
25
+ },
26
+ /* @__PURE__ */ React.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2" }, children),
27
+ " ",
28
+ /* @__PURE__ */ React.createElement(
29
+ "svg",
30
+ {
31
+ "aria-label": "Chevron Right Icon",
32
+ stroke: "currentColor",
33
+ fill: "currentColor",
34
+ strokeWidth: "0",
35
+ viewBox: "0 0 16 16",
36
+ height: "1em",
37
+ width: "1em",
38
+ className: cn(props.dir === "rtl" ? "hawa-rotate-180" : "")
39
+ },
40
+ /* @__PURE__ */ React.createElement(
41
+ "path",
42
+ {
43
+ fillRule: "evenodd",
44
+ 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"
45
+ }
46
+ )
47
+ )
48
+ ));
49
+ DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
50
+ var DropdownMenuSubContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(
51
+ DropdownMenuPrimitive.SubContent,
52
+ {
53
+ ref,
54
+ className: cn(
55
+ "hawa-z-50 hawa-min-w-[8rem] hawa-gap-1 hawa-overflow-hidden hawa-rounded-md hawa-border hawa-bg-popover hawa-p-1 hawa-text-popover-foreground hawa-shadow-lg data-[state=open]:hawa-animate-in data-[state=closed]:hawa-animate-out data-[state=closed]:hawa-fade-out-0 data-[state=open]:hawa-fade-in-0 data-[state=closed]:hawa-zoom-out-95 data-[state=open]:hawa-zoom-in-95 data-[side=bottom]:hawa-slide-in-from-top-2 data-[side=left]:hawa-slide-in-from-right-2 data-[side=right]:hawa-slide-in-from-left-2 data-[side=top]:hawa-slide-in-from-bottom-2",
56
+ className
57
+ ),
58
+ ...props
59
+ }
60
+ ));
61
+ DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
62
+ var DropdownMenuContent = React.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React.createElement(DropdownMenuPrimitive.Portal, null, /* @__PURE__ */ React.createElement(
63
+ DropdownMenuPrimitive.Content,
64
+ {
65
+ ref,
66
+ sideOffset,
67
+ className: cn(
68
+ "hawa-z-50 hawa-overflow-hidden hawa-rounded-md hawa-border hawa-bg-popover hawa-p-1 hawa-text-popover-foreground hawa-shadow-md data-[state=open]:hawa-animate-in data-[state=closed]:hawa-animate-out data-[state=closed]:hawa-fade-out-0 data-[state=open]:hawa-fade-in-0 data-[state=closed]:hawa-zoom-out-95 data-[state=open]:hawa-zoom-in-95 data-[side=bottom]:hawa-slide-in-from-top-2 data-[side=left]:hawa-slide-in-from-right-2 data-[side=right]:hawa-slide-in-from-left-2 data-[side=top]:hawa-slide-in-from-bottom-2",
69
+ className
70
+ ),
71
+ ...props
72
+ }
73
+ )));
74
+ DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
75
+ var DropdownMenuItem = React.forwardRef(({ className, inset, badged, slug, ...props }, ref) => {
76
+ return /* @__PURE__ */ React.createElement("a", { href: slug }, /* @__PURE__ */ React.createElement(
77
+ DropdownMenuPrimitive.Item,
78
+ {
79
+ disabled: props.disabled,
80
+ ref,
81
+ className: cn(
82
+ "hawa-relative hawa-flex hawa-cursor-pointer hawa-select-none hawa-items-center hawa-justify-between hawa-rounded-sm hawa-text-sm hawa-outline-none hawa-transition-colors focus:hawa-text-accent-foreground data-[disabled]:hawa-pointer-events-none data-[disabled]:hawa-opacity-50",
83
+ inset && "hawa-pl-8",
84
+ props.end && Array.isArray(props.children) && props.children[1] && "hawa-gap-6",
85
+ className
86
+ ),
87
+ ...props
88
+ },
89
+ /* @__PURE__ */ React.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2 " }, props.children),
90
+ props.end && props.end,
91
+ !props.end && props.shortcut && /* @__PURE__ */ React.createElement(DropdownMenuShortcut, null, props.shortcut),
92
+ !props.end && badged && /* @__PURE__ */ React.createElement("div", { className: "hawa-h-3 hawa-w-3 hawa-rounded-full hawa-bg-red-500" })
93
+ ));
94
+ });
95
+ DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
96
+ var DropdownMenuCheckboxItem = React.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ React.createElement(
97
+ DropdownMenuPrimitive.CheckboxItem,
98
+ {
99
+ ref,
100
+ className: cn(
101
+ "hawa-relative hawa-flex hawa-cursor-default hawa-select-none hawa-items-center hawa-rounded-sm hawa-py-1.5 hawa-pl-8 hawa-pr-2 hawa-text-sm hawa-outline-none hawa-transition-colors focus:hawa-bg-accent focus:hawa-text-accent-foreground data-[disabled]:hawa-pointer-events-none data-[disabled]:hawa-opacity-50",
102
+ className
103
+ ),
104
+ checked,
105
+ ...props
106
+ },
107
+ /* @__PURE__ */ React.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__ */ React.createElement(DropdownMenuPrimitive.ItemIndicator, null, /* @__PURE__ */ React.createElement(
108
+ "svg",
109
+ {
110
+ "aria-label": "Check Mark",
111
+ stroke: "currentColor",
112
+ fill: "currentColor",
113
+ strokeWidth: "0",
114
+ viewBox: "0 0 512 512",
115
+ height: "0.60em",
116
+ width: "0.60em"
117
+ },
118
+ /* @__PURE__ */ React.createElement("path", { d: "M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z" })
119
+ ), " ")),
120
+ children
121
+ ));
122
+ DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
123
+ var DropdownMenuRadioItem = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React.createElement(
124
+ DropdownMenuPrimitive.RadioItem,
125
+ {
126
+ ref,
127
+ className: cn(
128
+ "hawa-relative hawa-flex hawa-cursor-pointer hawa-select-none hawa-items-center hawa-rounded-sm hawa-py-1.5 hawa-pl-8 hawa-pr-2 hawa-text-sm hawa-outline-none hawa-transition-colors focus:hawa-bg-accent focus:hawa-text-accent-foreground data-[disabled]:hawa-pointer-events-none data-[disabled]:hawa-opacity-50",
129
+ className
130
+ ),
131
+ ...props
132
+ },
133
+ /* @__PURE__ */ React.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__ */ React.createElement(DropdownMenuPrimitive.ItemIndicator, null, /* @__PURE__ */ React.createElement(
134
+ "svg",
135
+ {
136
+ xmlns: "http://www.w3.org/2000/svg",
137
+ width: "24",
138
+ "aria-label": "Circle",
139
+ height: "24",
140
+ viewBox: "0 0 24 24",
141
+ fill: "none",
142
+ stroke: "currentColor",
143
+ strokeWidth: "2",
144
+ strokeLinecap: "round",
145
+ strokeLinejoin: "round",
146
+ className: "hawa-h-2 hawa-w-2 hawa-fill-current"
147
+ },
148
+ /* @__PURE__ */ React.createElement("circle", { cx: "12", cy: "12", r: "10" })
149
+ ))),
150
+ children
151
+ ));
152
+ DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
153
+ var DropdownMenuLabel = React.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ React.createElement(
154
+ DropdownMenuPrimitive.Label,
155
+ {
156
+ ref,
157
+ className: cn(
158
+ "hawa-px-2 hawa-py-1.5 hawa-text-sm hawa-font-semibold",
159
+ inset && "hawa-pl-8",
160
+ className
161
+ ),
162
+ ...props
163
+ }
164
+ ));
165
+ DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
166
+ var DropdownMenuSeparator = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(
167
+ DropdownMenuPrimitive.Separator,
168
+ {
169
+ ref,
170
+ className: cn("hawa--mx-1 hawa-my-1 hawa-h-px hawa-bg-muted", className),
171
+ ...props
172
+ }
173
+ ));
174
+ DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
175
+ var DropdownMenuShortcut = ({
176
+ className,
177
+ ...props
178
+ }) => {
179
+ return /* @__PURE__ */ React.createElement(
180
+ "span",
181
+ {
182
+ className: cn(
183
+ "hawa-text-xs hawa-tracking-widest hawa-opacity-60",
184
+ className
185
+ ),
186
+ ...props
187
+ }
188
+ );
189
+ };
190
+ DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
191
+ var DropdownMenu = ({
192
+ trigger,
193
+ items,
194
+ direction,
195
+ sideOffset,
196
+ side,
197
+ className,
198
+ triggerClassname,
199
+ align,
200
+ alignOffset,
201
+ onItemSelect,
202
+ size = "default",
203
+ width = "default",
204
+ header,
205
+ onOpenChange,
206
+ open
207
+ }) => {
208
+ const widthStyles = {
209
+ default: "hawa-min-w-[8rem]",
210
+ sm: "hawa-w-fit",
211
+ lg: "hawa-w-[200px]",
212
+ parent: "ddm-w-parent"
213
+ };
214
+ const sizeStyles = {
215
+ default: "hawa-px-2 hawa-py-3 ",
216
+ sm: "hawa-text-xs hawa-px-1.5 hawa-py-1.5 "
217
+ };
218
+ return /* @__PURE__ */ React.createElement(
219
+ DropdownMenuRoot,
220
+ {
221
+ onOpenChange,
222
+ open,
223
+ modal: false,
224
+ dir: direction
225
+ },
226
+ /* @__PURE__ */ React.createElement(DropdownMenuTrigger, { asChild: true, className: triggerClassname }, trigger),
227
+ /* @__PURE__ */ React.createElement(DropdownMenuPortal, null, /* @__PURE__ */ React.createElement(
228
+ DropdownMenuContent,
229
+ {
230
+ side,
231
+ sideOffset,
232
+ className: cn(
233
+ className,
234
+ widthStyles[width],
235
+ "hawa-flex hawa-flex-col hawa-gap-1"
236
+ ),
237
+ align,
238
+ alignOffset
239
+ },
240
+ header && header,
241
+ items && items.map((item, index) => {
242
+ if (item.itemType === "separator") {
243
+ return /* @__PURE__ */ React.createElement(DropdownMenuSeparator, { key: index });
244
+ } else if (item.itemType === "label") {
245
+ return /* @__PURE__ */ React.createElement(DropdownMenuLabel, { key: index }, item.label);
246
+ } else if (item.itemType === "custom") {
247
+ return /* @__PURE__ */ React.createElement("div", { key: index }, item.content);
248
+ } else {
249
+ return item.subitems ? /* @__PURE__ */ React.createElement(DropdownMenuSub, { key: index }, /* @__PURE__ */ React.createElement(
250
+ DropdownMenuSubTrigger,
251
+ {
252
+ className: cn(sizeStyles[size]),
253
+ dir: direction
254
+ },
255
+ item.icon && item.icon,
256
+ item.label && item.label
257
+ ), /* @__PURE__ */ React.createElement(DropdownMenuPortal, null, /* @__PURE__ */ React.createElement(DropdownMenuSubContent, null, item.subitems.map((subitem, subIndex) => /* @__PURE__ */ React.createElement(
258
+ DropdownMenuItem,
259
+ {
260
+ slug: subitem.slug,
261
+ onMouseDown: (event) => {
262
+ if (event.button === 1 || event.button === 0 && event.ctrlKey) {
263
+ event.preventDefault();
264
+ if (subitem.onMiddleClick) {
265
+ subitem.onMiddleClick(item.value);
266
+ }
267
+ }
268
+ },
269
+ key: subIndex,
270
+ className: cn(
271
+ sizeStyles[size],
272
+ !item.icon && !item.label ? "hawa-px-0 hawa-py-0 focus:hawa-bg-transparent" : "focus:hawa-bg-accent"
273
+ ),
274
+ disabled: subitem.disabled,
275
+ onSelect: () => {
276
+ subitem.action && subitem.action();
277
+ if (onItemSelect) {
278
+ onItemSelect(subitem.value);
279
+ }
280
+ }
281
+ },
282
+ subitem.icon && subitem.icon,
283
+ subitem.label && subitem.label
284
+ ))))) : /* @__PURE__ */ React.createElement(
285
+ DropdownMenuItem,
286
+ {
287
+ slug: item.slug,
288
+ key: index,
289
+ disabled: item.disabled,
290
+ onMouseDown: (event) => {
291
+ if (event.button === 1 || event.button === 0 && event.ctrlKey) {
292
+ event.preventDefault();
293
+ if (item.onMiddleClick) {
294
+ item.onMiddleClick(item.value);
295
+ }
296
+ }
297
+ },
298
+ onClick: (event) => {
299
+ if (item.onClick) {
300
+ item.onClick(item.value);
301
+ }
302
+ },
303
+ onSelect: (e) => {
304
+ if (item.presist) {
305
+ e.preventDefault();
306
+ }
307
+ if (item.action) {
308
+ item.action();
309
+ if (onItemSelect) {
310
+ onItemSelect(item.value);
311
+ }
312
+ } else {
313
+ if (onItemSelect) {
314
+ onItemSelect(item.value);
315
+ }
316
+ }
317
+ },
318
+ end: item.end,
319
+ shortcut: item.shortcut,
320
+ badged: item.badged,
321
+ className: cn(
322
+ sizeStyles[size],
323
+ !item.icon && !item.label ? "hawa-px-0 hawa-py-0 focus:hawa-bg-transparent " : "focus:hawa-bg-accent ",
324
+ item.presist && "focus:hawa-bg-transparent"
325
+ )
326
+ },
327
+ item.icon && item.icon,
328
+ item.label && item.label
329
+ );
330
+ }
331
+ })
332
+ ))
333
+ );
334
+ };
335
+
336
+ // components/layout/appTopbar/AppTopbar.tsx
337
+ var AppTopbar = ({ ...props }) => {
338
+ const isRTL = props.direction === "ltr";
339
+ const size = 1200;
340
+ return /* @__PURE__ */ React2.createElement(
341
+ "div",
342
+ {
343
+ className: cn(
344
+ "hawa-fixed hawa-left-0 hawa-right-0 hawa-top-0 hawa-z-30 hawa-flex hawa-h-14 hawa-w-full hawa-items-center hawa-justify-between hawa-border-b hawa-bg-primary-foreground hawa-p-2",
345
+ isRTL ? "hawa-flex-row-reverse" : "hawa-flex-row"
346
+ )
347
+ },
348
+ size > 600 ? /* @__PURE__ */ React2.createElement(
349
+ "div",
350
+ null,
351
+ "page title"
352
+ ) : (
353
+ // Mobile Drawer Menu Button
354
+ /* @__PURE__ */ React2.createElement(
355
+ "div",
356
+ {
357
+ dir: props.direction,
358
+ className: "hawa-flex hawa-items-center hawa-justify-center hawa-gap-0.5"
359
+ },
360
+ /* @__PURE__ */ React2.createElement(
361
+ "div",
362
+ {
363
+ className: "hawa-z-40 hawa-mx-1 hawa-cursor-pointer hawa-rounded hawa-p-2 hawa-transition-all hover:hawa-bg-gray-100"
364
+ },
365
+ /* @__PURE__ */ React2.createElement(
366
+ "svg",
367
+ {
368
+ stroke: "currentColor",
369
+ fill: "currentColor",
370
+ strokeWidth: 0,
371
+ viewBox: "0 0 20 20",
372
+ "aria-hidden": "true",
373
+ height: "1.6em",
374
+ width: "1.6em"
375
+ },
376
+ /* @__PURE__ */ React2.createElement(
377
+ "path",
378
+ {
379
+ fillRule: "evenodd",
380
+ clipRule: "evenodd",
381
+ d: "M3 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 15a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z"
382
+ }
383
+ )
384
+ )
385
+ ),
386
+ "Mobile title"
387
+ )
388
+ ),
389
+ /* @__PURE__ */ React2.createElement(
390
+ "div",
391
+ {
392
+ className: cn(
393
+ "hawa-flex hawa-gap-2 dark:hawa-text-white",
394
+ isRTL ? "hawa-flex-row-reverse" : "hawa-flex-row"
395
+ )
396
+ },
397
+ size > 600 ? /* @__PURE__ */ React2.createElement(
398
+ "div",
399
+ {
400
+ className: isRTL ? "hawa-text-left hawa-text-xs" : "hawa-text-right hawa-text-xs"
401
+ },
402
+ /* @__PURE__ */ React2.createElement("div", { className: "hawa-font-bold" }, props.username),
403
+ " ",
404
+ /* @__PURE__ */ React2.createElement("div", null, props.email)
405
+ ) : null,
406
+ /* @__PURE__ */ React2.createElement(
407
+ DropdownMenu,
408
+ {
409
+ triggerClassname: "hawa-mx-2",
410
+ align: "end",
411
+ alignOffset: 8,
412
+ side: "bottom",
413
+ sideOffset: 5,
414
+ direction: isRTL ? "rtl" : "ltr",
415
+ items: props.profileMenuItems,
416
+ onItemSelect: (e) => console.log("selecting item ", e),
417
+ trigger: /* @__PURE__ */ React2.createElement("div", { className: "hawa-relative hawa-h-8 hawa-w-8 hawa-cursor-pointer hawa-overflow-clip hawa-rounded hawa-ring-1 hawa-ring-primary/30 dark:hawa-bg-gray-600" }, props.avatarImage ? /* @__PURE__ */ React2.createElement("img", { src: props.avatarImage, alt: "User Avatar" }) : /* @__PURE__ */ React2.createElement(
418
+ "svg",
419
+ {
420
+ "aria-label": "Avatar Icon",
421
+ className: "hawa-absolute hawa--left-1 hawa-h-10 hawa-w-10 hawa-text-gray-400",
422
+ fill: "currentColor",
423
+ viewBox: "0 0 20 20"
424
+ },
425
+ /* @__PURE__ */ React2.createElement(
426
+ "path",
427
+ {
428
+ fillRule: "evenodd",
429
+ d: "M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z",
430
+ clipRule: "evenodd"
431
+ }
432
+ )
433
+ ))
434
+ }
435
+ )
436
+ )
437
+ );
438
+ };
439
+ export {
440
+ AppTopbar
441
+ };
@@ -1,5 +1,6 @@
1
- import React__default from 'react';
2
- import { R as RadiusType } from '../commonTypes-PBumfOBg.mjs';
1
+ import React from 'react';
2
+
3
+ type RadiusType = "full" | "inherit" | "none";
3
4
 
4
5
  interface AvatarProps {
5
6
  isUploadable?: boolean;
@@ -8,8 +9,8 @@ interface AvatarProps {
8
9
  size?: "2xs" | "xs" | "sm" | "default" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl";
9
10
  radius?: RadiusType;
10
11
  className?: string;
11
- icon?: React__default.ReactNode;
12
+ icon?: React.ReactNode;
12
13
  }
13
- declare const Avatar: React__default.FC<AvatarProps>;
14
+ declare const Avatar: React.FC<AvatarProps>;
14
15
 
15
16
  export { Avatar };
@@ -1,5 +1,6 @@
1
- import React__default from 'react';
2
- import { R as RadiusType } from '../commonTypes-PBumfOBg.js';
1
+ import React from 'react';
2
+
3
+ type RadiusType = "full" | "inherit" | "none";
3
4
 
4
5
  interface AvatarProps {
5
6
  isUploadable?: boolean;
@@ -8,8 +9,8 @@ interface AvatarProps {
8
9
  size?: "2xs" | "xs" | "sm" | "default" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl";
9
10
  radius?: RadiusType;
10
11
  className?: string;
11
- icon?: React__default.ReactNode;
12
+ icon?: React.ReactNode;
12
13
  }
13
- declare const Avatar: React__default.FC<AvatarProps>;
14
+ declare const Avatar: React.FC<AvatarProps>;
14
15
 
15
16
  export { Avatar };