@sikka/hawa 0.1.55 → 0.1.57

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sikka/hawa",
3
- "version": "0.1.55",
3
+ "version": "0.1.57",
4
4
  "description": "Modern UI Kit made with Tailwind & Radix Primitives",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -119,6 +119,7 @@ export const SignUpForm: FC<SignUpFormTypes> = (props) => {
119
119
  if (fld === "email") {
120
120
  return (
121
121
  <Controller
122
+ key={i}
122
123
  control={control}
123
124
  name="email"
124
125
  render={({ field }) => (
@@ -147,6 +148,7 @@ export const SignUpForm: FC<SignUpFormTypes> = (props) => {
147
148
  if (fld === "username") {
148
149
  return (
149
150
  <Controller
151
+ key={i}
150
152
  control={control}
151
153
  name="username"
152
154
  render={({ field }) => (
@@ -213,7 +215,7 @@ export const SignUpForm: FC<SignUpFormTypes> = (props) => {
213
215
  <HawaTextField
214
216
  width="full"
215
217
  type="text"
216
- defaultValue={field.value ?? ""}
218
+ // defaultValue={field.value ?? ""}
217
219
  label={props.texts.refCode}
218
220
  placeholder={props.texts.passwordPlaceholder}
219
221
  helpertext={errors.password?.message}
@@ -64,17 +64,15 @@ type CardContentProps = {
64
64
  headless?: boolean
65
65
  } & React.HTMLAttributes<HTMLDivElement>
66
66
 
67
- const CardContent = React.forwardRef<
68
- HTMLDivElement,
69
- CardContentProps
70
- // React.HTMLAttributes<HTMLDivElement>
71
- >(({ className, ...props }, ref) => (
72
- <div
73
- ref={ref}
74
- className={cn("p-6", props.headless ? "pt-6" : "pt-0", className)}
75
- {...props}
76
- />
77
- ))
67
+ const CardContent = React.forwardRef<HTMLDivElement, CardContentProps>(
68
+ ({ headless, className, ...props }, ref) => (
69
+ <div
70
+ ref={ref}
71
+ className={cn("p-6", headless ? "pt-6" : "pt-0", className)}
72
+ {...props}
73
+ />
74
+ )
75
+ )
78
76
  CardContent.displayName = "CardContent"
79
77
 
80
78
  const CardFooter = React.forwardRef<
@@ -25,7 +25,7 @@ const DropdownMenuSubTrigger = React.forwardRef<
25
25
  )}
26
26
  {...props}
27
27
  >
28
- {children}
28
+ <div className="flex flex-row items-center gap-1">{children}</div>{" "}
29
29
  {/* <ChevronRight className="ml-auto h-4 w-4" /> */}
30
30
  <svg
31
31
  aria-label="Chevron Right Icon"
@@ -230,11 +230,13 @@ type ExtendedDropdownMenuTriggerProps = Partial<
230
230
  type SubItem = {
231
231
  label: string
232
232
  value: string
233
+ icon?: any
233
234
  action?: () => void
234
235
  highlighted?: boolean
235
236
  }
236
237
 
237
238
  type Item = {
239
+ icon?: any
238
240
  label: string
239
241
  value: string
240
242
  action?: () => void
@@ -276,23 +278,26 @@ export const DropdownMenu = ({
276
278
  <DropdownMenuContent
277
279
  side={side}
278
280
  sideOffset={sideOffset}
279
- className={cn(className)}
281
+ className={cn(className, "flex flex-col gap-1")}
280
282
  align={align}
281
283
  alignOffset={alignOffset}
282
284
  >
283
285
  {items.map((item, index) => {
284
286
  return item.subitems ? (
285
- <DropdownMenuSub>
287
+ <DropdownMenuSub key={index}>
286
288
  <DropdownMenuSubTrigger dir={direction}>
289
+ {item.icon && item.icon}
287
290
  {item.label}
288
291
  </DropdownMenuSubTrigger>
289
292
  <DropdownMenuPortal>
290
293
  <DropdownMenuSubContent>
291
294
  {item.subitems.map((subitem, subIndex) => (
292
295
  <DropdownMenuItem
296
+ className="flex flex-row gap-1"
293
297
  onSelect={() => subitem.action()}
294
298
  key={subIndex}
295
299
  >
300
+ {subitem.icon && subitem.icon}
296
301
  {subitem.label}
297
302
  </DropdownMenuItem>
298
303
  ))}
@@ -300,7 +305,12 @@ export const DropdownMenu = ({
300
305
  </DropdownMenuPortal>
301
306
  </DropdownMenuSub>
302
307
  ) : (
303
- <DropdownMenuItem key={index} onSelect={() => item.action()}>
308
+ <DropdownMenuItem
309
+ className="flex flex-row gap-1"
310
+ key={index}
311
+ onSelect={() => item.action()}
312
+ >
313
+ {item.icon && item.icon}
304
314
  {item.label}
305
315
  </DropdownMenuItem>
306
316
  )
@@ -136,9 +136,9 @@ export const HawaItemCard: FC<ItemCardTypes> = ({
136
136
  </h5>
137
137
  )}
138
138
  {content && (
139
- <p className="w-full font-normal text-gray-700 dark:text-gray-400">
139
+ <span className="w-full font-normal text-gray-700 dark:text-gray-400">
140
140
  {content}
141
- </p>
141
+ </span>
142
142
  )}
143
143
  {actions || counts ? (
144
144
  <div
@@ -42,7 +42,6 @@ export const HawaRadio: FC<RadioTypes> = ({
42
42
  const dir = window.getComputedStyle(ref.current.parentNode).direction
43
43
  setParentDirection(dir)
44
44
  }
45
- console.log("how many times")
46
45
  })
47
46
 
48
47
  switch (design) {