@sikka/hawa 0.31.11-next → 0.31.12-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.
package/dist/index.js CHANGED
@@ -9085,6 +9085,7 @@ var AppLayout = ({
9085
9085
  keepOpen,
9086
9086
  DrawerLinkComponent,
9087
9087
  MenuLinkComponent,
9088
+ onAvatarClick,
9088
9089
  ...props
9089
9090
  }) => {
9090
9091
  var _a, _b;
@@ -9205,23 +9206,30 @@ var AppLayout = ({
9205
9206
  direction: isRTL ? "rtl" : "ltr",
9206
9207
  items: props.profileMenuItems || [],
9207
9208
  onItemSelect: (e) => console.log("selecting item ", e),
9208
- trigger: /* @__PURE__ */ import_react55.default.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__ */ import_react55.default.createElement("img", { src: props.avatarImage, alt: "User Avatar" }) : /* @__PURE__ */ import_react55.default.createElement(
9209
- "svg",
9209
+ trigger: /* @__PURE__ */ import_react55.default.createElement(
9210
+ "div",
9210
9211
  {
9211
- "aria-label": "Avatar Icon",
9212
- className: "hawa-absolute hawa--left-1 hawa-h-10 hawa-w-10 hawa-text-gray-400",
9213
- fill: "currentColor",
9214
- viewBox: "0 0 20 20"
9212
+ onClick: onAvatarClick,
9213
+ 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"
9215
9214
  },
9216
- /* @__PURE__ */ import_react55.default.createElement(
9217
- "path",
9215
+ props.avatarImage ? /* @__PURE__ */ import_react55.default.createElement("img", { src: props.avatarImage, alt: "User Avatar" }) : /* @__PURE__ */ import_react55.default.createElement(
9216
+ "svg",
9218
9217
  {
9219
- fillRule: "evenodd",
9220
- d: "M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z",
9221
- clipRule: "evenodd"
9222
- }
9218
+ "aria-label": "Avatar Icon",
9219
+ className: "hawa-absolute hawa--left-1 hawa-h-10 hawa-w-10 hawa-text-gray-400",
9220
+ fill: "currentColor",
9221
+ viewBox: "0 0 20 20"
9222
+ },
9223
+ /* @__PURE__ */ import_react55.default.createElement(
9224
+ "path",
9225
+ {
9226
+ fillRule: "evenodd",
9227
+ d: "M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z",
9228
+ clipRule: "evenodd"
9229
+ }
9230
+ )
9223
9231
  )
9224
- ))
9232
+ )
9225
9233
  }
9226
9234
  )
9227
9235
  )
package/dist/index.mjs CHANGED
@@ -8862,6 +8862,7 @@ var AppLayout = ({
8862
8862
  keepOpen,
8863
8863
  DrawerLinkComponent,
8864
8864
  MenuLinkComponent,
8865
+ onAvatarClick,
8865
8866
  ...props
8866
8867
  }) => {
8867
8868
  var _a, _b;
@@ -8982,23 +8983,30 @@ var AppLayout = ({
8982
8983
  direction: isRTL ? "rtl" : "ltr",
8983
8984
  items: props.profileMenuItems || [],
8984
8985
  onItemSelect: (e) => console.log("selecting item ", e),
8985
- trigger: /* @__PURE__ */ React76.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__ */ React76.createElement("img", { src: props.avatarImage, alt: "User Avatar" }) : /* @__PURE__ */ React76.createElement(
8986
- "svg",
8986
+ trigger: /* @__PURE__ */ React76.createElement(
8987
+ "div",
8987
8988
  {
8988
- "aria-label": "Avatar Icon",
8989
- className: "hawa-absolute hawa--left-1 hawa-h-10 hawa-w-10 hawa-text-gray-400",
8990
- fill: "currentColor",
8991
- viewBox: "0 0 20 20"
8989
+ onClick: onAvatarClick,
8990
+ 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"
8992
8991
  },
8993
- /* @__PURE__ */ React76.createElement(
8994
- "path",
8992
+ props.avatarImage ? /* @__PURE__ */ React76.createElement("img", { src: props.avatarImage, alt: "User Avatar" }) : /* @__PURE__ */ React76.createElement(
8993
+ "svg",
8995
8994
  {
8996
- fillRule: "evenodd",
8997
- d: "M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z",
8998
- clipRule: "evenodd"
8999
- }
8995
+ "aria-label": "Avatar Icon",
8996
+ className: "hawa-absolute hawa--left-1 hawa-h-10 hawa-w-10 hawa-text-gray-400",
8997
+ fill: "currentColor",
8998
+ viewBox: "0 0 20 20"
8999
+ },
9000
+ /* @__PURE__ */ React76.createElement(
9001
+ "path",
9002
+ {
9003
+ fillRule: "evenodd",
9004
+ d: "M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z",
9005
+ clipRule: "evenodd"
9006
+ }
9007
+ )
9000
9008
  )
9001
- ))
9009
+ )
9002
9010
  }
9003
9011
  )
9004
9012
  )
@@ -132,6 +132,7 @@ type AppLayoutTypes$1 = {
132
132
  drawerSize?: "sm" | "md" | "large";
133
133
  /** Specifies the menu items for the profile menu. */
134
134
  profileMenuItems?: MenuItemType[];
135
+ onAvatarClick?: () => void;
135
136
  /**
136
137
  * Specifies the width of the profile menu.
137
138
  * - 'default': Default width.
@@ -132,6 +132,7 @@ type AppLayoutTypes$1 = {
132
132
  drawerSize?: "sm" | "md" | "large";
133
133
  /** Specifies the menu items for the profile menu. */
134
134
  profileMenuItems?: MenuItemType[];
135
+ onAvatarClick?: () => void;
135
136
  /**
136
137
  * Specifies the width of the profile menu.
137
138
  * - 'default': Default width.
@@ -1421,6 +1421,7 @@ var AppLayout = ({
1421
1421
  keepOpen,
1422
1422
  DrawerLinkComponent,
1423
1423
  MenuLinkComponent,
1424
+ onAvatarClick,
1424
1425
  ...props
1425
1426
  }) => {
1426
1427
  var _a, _b;
@@ -1541,23 +1542,30 @@ var AppLayout = ({
1541
1542
  direction: isRTL ? "rtl" : "ltr",
1542
1543
  items: props.profileMenuItems || [],
1543
1544
  onItemSelect: (e) => console.log("selecting item ", e),
1544
- trigger: /* @__PURE__ */ import_react9.default.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__ */ import_react9.default.createElement("img", { src: props.avatarImage, alt: "User Avatar" }) : /* @__PURE__ */ import_react9.default.createElement(
1545
- "svg",
1545
+ trigger: /* @__PURE__ */ import_react9.default.createElement(
1546
+ "div",
1546
1547
  {
1547
- "aria-label": "Avatar Icon",
1548
- className: "hawa-absolute hawa--left-1 hawa-h-10 hawa-w-10 hawa-text-gray-400",
1549
- fill: "currentColor",
1550
- viewBox: "0 0 20 20"
1548
+ onClick: onAvatarClick,
1549
+ 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"
1551
1550
  },
1552
- /* @__PURE__ */ import_react9.default.createElement(
1553
- "path",
1551
+ props.avatarImage ? /* @__PURE__ */ import_react9.default.createElement("img", { src: props.avatarImage, alt: "User Avatar" }) : /* @__PURE__ */ import_react9.default.createElement(
1552
+ "svg",
1554
1553
  {
1555
- fillRule: "evenodd",
1556
- d: "M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z",
1557
- clipRule: "evenodd"
1558
- }
1554
+ "aria-label": "Avatar Icon",
1555
+ className: "hawa-absolute hawa--left-1 hawa-h-10 hawa-w-10 hawa-text-gray-400",
1556
+ fill: "currentColor",
1557
+ viewBox: "0 0 20 20"
1558
+ },
1559
+ /* @__PURE__ */ import_react9.default.createElement(
1560
+ "path",
1561
+ {
1562
+ fillRule: "evenodd",
1563
+ d: "M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z",
1564
+ clipRule: "evenodd"
1565
+ }
1566
+ )
1559
1567
  )
1560
- ))
1568
+ )
1561
1569
  }
1562
1570
  )
1563
1571
  )
@@ -408,6 +408,7 @@ var AppLayout = ({
408
408
  keepOpen,
409
409
  DrawerLinkComponent,
410
410
  MenuLinkComponent,
411
+ onAvatarClick,
411
412
  ...props
412
413
  }) => {
413
414
  var _a, _b;
@@ -528,23 +529,30 @@ var AppLayout = ({
528
529
  direction: isRTL ? "rtl" : "ltr",
529
530
  items: props.profileMenuItems || [],
530
531
  onItemSelect: (e) => console.log("selecting item ", e),
531
- trigger: /* @__PURE__ */ React5.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__ */ React5.createElement("img", { src: props.avatarImage, alt: "User Avatar" }) : /* @__PURE__ */ React5.createElement(
532
- "svg",
532
+ trigger: /* @__PURE__ */ React5.createElement(
533
+ "div",
533
534
  {
534
- "aria-label": "Avatar Icon",
535
- className: "hawa-absolute hawa--left-1 hawa-h-10 hawa-w-10 hawa-text-gray-400",
536
- fill: "currentColor",
537
- viewBox: "0 0 20 20"
535
+ onClick: onAvatarClick,
536
+ 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"
538
537
  },
539
- /* @__PURE__ */ React5.createElement(
540
- "path",
538
+ props.avatarImage ? /* @__PURE__ */ React5.createElement("img", { src: props.avatarImage, alt: "User Avatar" }) : /* @__PURE__ */ React5.createElement(
539
+ "svg",
541
540
  {
542
- fillRule: "evenodd",
543
- d: "M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z",
544
- clipRule: "evenodd"
545
- }
541
+ "aria-label": "Avatar Icon",
542
+ className: "hawa-absolute hawa--left-1 hawa-h-10 hawa-w-10 hawa-text-gray-400",
543
+ fill: "currentColor",
544
+ viewBox: "0 0 20 20"
545
+ },
546
+ /* @__PURE__ */ React5.createElement(
547
+ "path",
548
+ {
549
+ fillRule: "evenodd",
550
+ d: "M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z",
551
+ clipRule: "evenodd"
552
+ }
553
+ )
546
554
  )
547
- ))
555
+ )
548
556
  }
549
557
  )
550
558
  )
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sikka/hawa",
3
- "version": "0.31.11-next",
3
+ "version": "0.31.12-next",
4
4
  "description": "Modern UI Kit made with Tailwind",
5
5
  "author": {
6
6
  "name": "Sikka Software",