@sikka/hawa 0.31.11-next → 0.31.13-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/appLayout/index.d.mts +1 -0
- package/dist/appLayout/index.d.ts +1 -0
- package/dist/appLayout/index.js +24 -14
- package/dist/appLayout/index.js.map +1 -1
- package/dist/appLayout/index.mjs +24 -14
- package/dist/appLayout/index.mjs.map +1 -1
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +24 -14
- package/dist/index.mjs +24 -14
- package/dist/layout/index.d.mts +1 -0
- package/dist/layout/index.d.ts +1 -0
- package/dist/layout/index.js +24 -14
- package/dist/layout/index.mjs +24 -14
- package/package.json +1 -1
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;
|
@@ -9104,7 +9105,9 @@ var AppLayout = ({
|
|
9104
9105
|
const [size, setSize] = (0, import_react55.useState)(1200);
|
9105
9106
|
const [openSideMenu, setOpenSideMenu] = (0, import_react55.useState)(true);
|
9106
9107
|
const handleClickOutside = () => {
|
9107
|
-
|
9108
|
+
if (size < 600) {
|
9109
|
+
setOpenSideMenu(false);
|
9110
|
+
}
|
9108
9111
|
};
|
9109
9112
|
const ref = useOutsideClick_default(handleClickOutside);
|
9110
9113
|
const drawerSizeCondition = size > 600 ? drawerSizeStyle[keepOpen ? "opened" : "closed"][drawerSize] : 0;
|
@@ -9205,23 +9208,30 @@ var AppLayout = ({
|
|
9205
9208
|
direction: isRTL ? "rtl" : "ltr",
|
9206
9209
|
items: props.profileMenuItems || [],
|
9207
9210
|
onItemSelect: (e) => console.log("selecting item ", e),
|
9208
|
-
trigger: /* @__PURE__ */ import_react55.default.createElement(
|
9209
|
-
"
|
9211
|
+
trigger: /* @__PURE__ */ import_react55.default.createElement(
|
9212
|
+
"div",
|
9210
9213
|
{
|
9211
|
-
|
9212
|
-
className: "hawa-
|
9213
|
-
fill: "currentColor",
|
9214
|
-
viewBox: "0 0 20 20"
|
9214
|
+
onClick: onAvatarClick,
|
9215
|
+
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
9216
|
},
|
9216
|
-
/* @__PURE__ */ import_react55.default.createElement(
|
9217
|
-
"
|
9217
|
+
props.avatarImage ? /* @__PURE__ */ import_react55.default.createElement("img", { src: props.avatarImage, alt: "User Avatar" }) : /* @__PURE__ */ import_react55.default.createElement(
|
9218
|
+
"svg",
|
9218
9219
|
{
|
9219
|
-
|
9220
|
-
|
9221
|
-
|
9222
|
-
|
9220
|
+
"aria-label": "Avatar Icon",
|
9221
|
+
className: "hawa-absolute hawa--left-1 hawa-h-10 hawa-w-10 hawa-text-gray-400",
|
9222
|
+
fill: "currentColor",
|
9223
|
+
viewBox: "0 0 20 20"
|
9224
|
+
},
|
9225
|
+
/* @__PURE__ */ import_react55.default.createElement(
|
9226
|
+
"path",
|
9227
|
+
{
|
9228
|
+
fillRule: "evenodd",
|
9229
|
+
d: "M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z",
|
9230
|
+
clipRule: "evenodd"
|
9231
|
+
}
|
9232
|
+
)
|
9223
9233
|
)
|
9224
|
-
)
|
9234
|
+
)
|
9225
9235
|
}
|
9226
9236
|
)
|
9227
9237
|
)
|
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;
|
@@ -8881,7 +8882,9 @@ var AppLayout = ({
|
|
8881
8882
|
const [size, setSize] = useState36(1200);
|
8882
8883
|
const [openSideMenu, setOpenSideMenu] = useState36(true);
|
8883
8884
|
const handleClickOutside = () => {
|
8884
|
-
|
8885
|
+
if (size < 600) {
|
8886
|
+
setOpenSideMenu(false);
|
8887
|
+
}
|
8885
8888
|
};
|
8886
8889
|
const ref = useOutsideClick_default(handleClickOutside);
|
8887
8890
|
const drawerSizeCondition = size > 600 ? drawerSizeStyle[keepOpen ? "opened" : "closed"][drawerSize] : 0;
|
@@ -8982,23 +8985,30 @@ var AppLayout = ({
|
|
8982
8985
|
direction: isRTL ? "rtl" : "ltr",
|
8983
8986
|
items: props.profileMenuItems || [],
|
8984
8987
|
onItemSelect: (e) => console.log("selecting item ", e),
|
8985
|
-
trigger: /* @__PURE__ */ React76.createElement(
|
8986
|
-
"
|
8988
|
+
trigger: /* @__PURE__ */ React76.createElement(
|
8989
|
+
"div",
|
8987
8990
|
{
|
8988
|
-
|
8989
|
-
className: "hawa-
|
8990
|
-
fill: "currentColor",
|
8991
|
-
viewBox: "0 0 20 20"
|
8991
|
+
onClick: onAvatarClick,
|
8992
|
+
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
8993
|
},
|
8993
|
-
/* @__PURE__ */ React76.createElement(
|
8994
|
-
"
|
8994
|
+
props.avatarImage ? /* @__PURE__ */ React76.createElement("img", { src: props.avatarImage, alt: "User Avatar" }) : /* @__PURE__ */ React76.createElement(
|
8995
|
+
"svg",
|
8995
8996
|
{
|
8996
|
-
|
8997
|
-
|
8998
|
-
|
8999
|
-
|
8997
|
+
"aria-label": "Avatar Icon",
|
8998
|
+
className: "hawa-absolute hawa--left-1 hawa-h-10 hawa-w-10 hawa-text-gray-400",
|
8999
|
+
fill: "currentColor",
|
9000
|
+
viewBox: "0 0 20 20"
|
9001
|
+
},
|
9002
|
+
/* @__PURE__ */ React76.createElement(
|
9003
|
+
"path",
|
9004
|
+
{
|
9005
|
+
fillRule: "evenodd",
|
9006
|
+
d: "M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z",
|
9007
|
+
clipRule: "evenodd"
|
9008
|
+
}
|
9009
|
+
)
|
9000
9010
|
)
|
9001
|
-
)
|
9011
|
+
)
|
9002
9012
|
}
|
9003
9013
|
)
|
9004
9014
|
)
|
package/dist/layout/index.d.mts
CHANGED
@@ -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.
|
package/dist/layout/index.d.ts
CHANGED
@@ -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.
|
package/dist/layout/index.js
CHANGED
@@ -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;
|
@@ -1440,7 +1441,9 @@ var AppLayout = ({
|
|
1440
1441
|
const [size, setSize] = (0, import_react9.useState)(1200);
|
1441
1442
|
const [openSideMenu, setOpenSideMenu] = (0, import_react9.useState)(true);
|
1442
1443
|
const handleClickOutside = () => {
|
1443
|
-
|
1444
|
+
if (size < 600) {
|
1445
|
+
setOpenSideMenu(false);
|
1446
|
+
}
|
1444
1447
|
};
|
1445
1448
|
const ref = useOutsideClick_default(handleClickOutside);
|
1446
1449
|
const drawerSizeCondition = size > 600 ? drawerSizeStyle[keepOpen ? "opened" : "closed"][drawerSize] : 0;
|
@@ -1541,23 +1544,30 @@ var AppLayout = ({
|
|
1541
1544
|
direction: isRTL ? "rtl" : "ltr",
|
1542
1545
|
items: props.profileMenuItems || [],
|
1543
1546
|
onItemSelect: (e) => console.log("selecting item ", e),
|
1544
|
-
trigger: /* @__PURE__ */ import_react9.default.createElement(
|
1545
|
-
"
|
1547
|
+
trigger: /* @__PURE__ */ import_react9.default.createElement(
|
1548
|
+
"div",
|
1546
1549
|
{
|
1547
|
-
|
1548
|
-
className: "hawa-
|
1549
|
-
fill: "currentColor",
|
1550
|
-
viewBox: "0 0 20 20"
|
1550
|
+
onClick: onAvatarClick,
|
1551
|
+
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
1552
|
},
|
1552
|
-
/* @__PURE__ */ import_react9.default.createElement(
|
1553
|
-
"
|
1553
|
+
props.avatarImage ? /* @__PURE__ */ import_react9.default.createElement("img", { src: props.avatarImage, alt: "User Avatar" }) : /* @__PURE__ */ import_react9.default.createElement(
|
1554
|
+
"svg",
|
1554
1555
|
{
|
1555
|
-
|
1556
|
-
|
1557
|
-
|
1558
|
-
|
1556
|
+
"aria-label": "Avatar Icon",
|
1557
|
+
className: "hawa-absolute hawa--left-1 hawa-h-10 hawa-w-10 hawa-text-gray-400",
|
1558
|
+
fill: "currentColor",
|
1559
|
+
viewBox: "0 0 20 20"
|
1560
|
+
},
|
1561
|
+
/* @__PURE__ */ import_react9.default.createElement(
|
1562
|
+
"path",
|
1563
|
+
{
|
1564
|
+
fillRule: "evenodd",
|
1565
|
+
d: "M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z",
|
1566
|
+
clipRule: "evenodd"
|
1567
|
+
}
|
1568
|
+
)
|
1559
1569
|
)
|
1560
|
-
)
|
1570
|
+
)
|
1561
1571
|
}
|
1562
1572
|
)
|
1563
1573
|
)
|
package/dist/layout/index.mjs
CHANGED
@@ -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;
|
@@ -427,7 +428,9 @@ var AppLayout = ({
|
|
427
428
|
const [size, setSize] = useState2(1200);
|
428
429
|
const [openSideMenu, setOpenSideMenu] = useState2(true);
|
429
430
|
const handleClickOutside = () => {
|
430
|
-
|
431
|
+
if (size < 600) {
|
432
|
+
setOpenSideMenu(false);
|
433
|
+
}
|
431
434
|
};
|
432
435
|
const ref = useOutsideClick_default(handleClickOutside);
|
433
436
|
const drawerSizeCondition = size > 600 ? drawerSizeStyle[keepOpen ? "opened" : "closed"][drawerSize] : 0;
|
@@ -528,23 +531,30 @@ var AppLayout = ({
|
|
528
531
|
direction: isRTL ? "rtl" : "ltr",
|
529
532
|
items: props.profileMenuItems || [],
|
530
533
|
onItemSelect: (e) => console.log("selecting item ", e),
|
531
|
-
trigger: /* @__PURE__ */ React5.createElement(
|
532
|
-
"
|
534
|
+
trigger: /* @__PURE__ */ React5.createElement(
|
535
|
+
"div",
|
533
536
|
{
|
534
|
-
|
535
|
-
className: "hawa-
|
536
|
-
fill: "currentColor",
|
537
|
-
viewBox: "0 0 20 20"
|
537
|
+
onClick: onAvatarClick,
|
538
|
+
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
539
|
},
|
539
|
-
/* @__PURE__ */ React5.createElement(
|
540
|
-
"
|
540
|
+
props.avatarImage ? /* @__PURE__ */ React5.createElement("img", { src: props.avatarImage, alt: "User Avatar" }) : /* @__PURE__ */ React5.createElement(
|
541
|
+
"svg",
|
541
542
|
{
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
543
|
+
"aria-label": "Avatar Icon",
|
544
|
+
className: "hawa-absolute hawa--left-1 hawa-h-10 hawa-w-10 hawa-text-gray-400",
|
545
|
+
fill: "currentColor",
|
546
|
+
viewBox: "0 0 20 20"
|
547
|
+
},
|
548
|
+
/* @__PURE__ */ React5.createElement(
|
549
|
+
"path",
|
550
|
+
{
|
551
|
+
fillRule: "evenodd",
|
552
|
+
d: "M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z",
|
553
|
+
clipRule: "evenodd"
|
554
|
+
}
|
555
|
+
)
|
546
556
|
)
|
547
|
-
)
|
557
|
+
)
|
548
558
|
}
|
549
559
|
)
|
550
560
|
)
|