@sikka/hawa 0.34.1-next → 0.34.3-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.js +53 -82
- package/dist/appLayout/index.js.map +1 -1
- package/dist/appLayout/index.mjs +53 -82
- package/dist/appLayout/index.mjs.map +1 -1
- package/dist/index.css +15 -6
- package/dist/index.js +53 -82
- package/dist/index.mjs +53 -82
- package/dist/layout/index.js +53 -82
- package/dist/layout/index.mjs +53 -82
- package/package.json +2 -4
package/dist/appLayout/index.mjs
CHANGED
@@ -1176,12 +1176,12 @@ var AppLayout = ({
|
|
1176
1176
|
setOpenSideMenu(false);
|
1177
1177
|
}
|
1178
1178
|
}, [size]);
|
1179
|
-
return /* @__PURE__ */ React9.createElement("div", { className: "hawa-fixed hawa-
|
1179
|
+
return /* @__PURE__ */ React9.createElement("div", { className: "hawa-fixed hawa-start-0" }, props.topBar && /* @__PURE__ */ React9.createElement(
|
1180
1180
|
"div",
|
1181
1181
|
{
|
1182
|
+
dir: direction,
|
1182
1183
|
className: cn(
|
1183
|
-
"hawa-fixed hawa-
|
1184
|
-
isRTL ? "hawa-flex-row-reverse" : "hawa-flex-row",
|
1184
|
+
"hawa-fixed hawa-end-0 hawa-start-0 hawa-top-0 hawa-z-0 hawa-flex hawa-h-14 hawa-w-full hawa-items-center hawa-justify-between hawa-bg-primary-foreground hawa-p-2",
|
1185
1185
|
bordered && "hawa-border-b-[1px]"
|
1186
1186
|
)
|
1187
1187
|
},
|
@@ -1190,18 +1190,10 @@ var AppLayout = ({
|
|
1190
1190
|
{
|
1191
1191
|
className: cn(
|
1192
1192
|
"dark:hawa-text-white",
|
1193
|
-
|
1194
|
-
size > 600 ? "hawa-mr-14" : "hawa-mr-2",
|
1195
|
-
keepDrawerOpen ? "hawa-mr-40" : ""
|
1196
|
-
] : [
|
1197
|
-
size > 600 ? "hawa-ml-14" : "hawa-ml-2",
|
1198
|
-
keepDrawerOpen ? "hawa-ml-40" : ""
|
1199
|
-
]
|
1193
|
+
size > 600 ? "hawa-ms-14" : "hawa-ms-2"
|
1200
1194
|
),
|
1201
|
-
style:
|
1202
|
-
|
1203
|
-
} : {
|
1204
|
-
marginLeft: `${drawerSizeStyle[keepDrawerOpen ? "opened" : "closed"][drawerSize]}px`
|
1195
|
+
style: {
|
1196
|
+
marginInlineStart: `${drawerSizeStyle[keepDrawerOpen ? "opened" : "closed"][drawerSize] + 10}px`
|
1205
1197
|
}
|
1206
1198
|
},
|
1207
1199
|
props.pageTitle
|
@@ -1224,71 +1216,51 @@ var AppLayout = ({
|
|
1224
1216
|
props.pageTitle ? /* @__PURE__ */ React9.createElement("div", { className: "hawa-text-sm" }, props.pageTitle) : /* @__PURE__ */ React9.createElement("div", null)
|
1225
1217
|
)
|
1226
1218
|
),
|
1227
|
-
/* @__PURE__ */ React9.createElement(
|
1228
|
-
|
1219
|
+
/* @__PURE__ */ React9.createElement("div", { className: cn("hawa-flex hawa-gap-2 dark:hawa-text-white") }, size > 600 ? /* @__PURE__ */ React9.createElement("div", { className: "hawa-text-end hawa-text-xs" }, /* @__PURE__ */ React9.createElement("div", { className: "hawa-font-bold" }, props.username), " ", /* @__PURE__ */ React9.createElement("div", null, props.email)) : null, /* @__PURE__ */ React9.createElement(
|
1220
|
+
DropdownMenu,
|
1229
1221
|
{
|
1230
|
-
|
1231
|
-
|
1232
|
-
|
1233
|
-
|
1234
|
-
|
1235
|
-
|
1236
|
-
|
1237
|
-
|
1238
|
-
|
1239
|
-
|
1240
|
-
/* @__PURE__ */ React9.createElement(
|
1241
|
-
|
1242
|
-
|
1243
|
-
|
1244
|
-
|
1245
|
-
|
1246
|
-
|
1247
|
-
|
1248
|
-
triggerClassname: "hawa-mx-2",
|
1249
|
-
align: "end",
|
1250
|
-
alignOffset: 8,
|
1251
|
-
side: "bottom",
|
1252
|
-
sideOffset: 5,
|
1253
|
-
width: profileMenuWidth,
|
1254
|
-
direction: isRTL ? "rtl" : "ltr",
|
1255
|
-
items: props.profileMenuItems || [],
|
1256
|
-
onItemSelect: (e) => console.log("selecting item ", e),
|
1257
|
-
trigger: /* @__PURE__ */ React9.createElement(
|
1258
|
-
"div",
|
1222
|
+
LinkComponent: MenuLinkComponent,
|
1223
|
+
triggerClassname: "hawa-mx-2",
|
1224
|
+
align: "end",
|
1225
|
+
alignOffset: 8,
|
1226
|
+
side: "bottom",
|
1227
|
+
sideOffset: 5,
|
1228
|
+
width: profileMenuWidth,
|
1229
|
+
direction,
|
1230
|
+
items: props.profileMenuItems || [],
|
1231
|
+
onItemSelect: (e) => console.log("selecting item ", e),
|
1232
|
+
trigger: /* @__PURE__ */ React9.createElement(
|
1233
|
+
"div",
|
1234
|
+
{
|
1235
|
+
onClick: onAvatarClick,
|
1236
|
+
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"
|
1237
|
+
},
|
1238
|
+
props.avatarImage ? /* @__PURE__ */ React9.createElement("img", { src: props.avatarImage, alt: "User Avatar" }) : /* @__PURE__ */ React9.createElement(
|
1239
|
+
"svg",
|
1259
1240
|
{
|
1260
|
-
|
1261
|
-
className: "hawa-
|
1241
|
+
"aria-label": "Avatar Icon",
|
1242
|
+
className: "hawa-absolute hawa--start-1 hawa-h-10 hawa-w-10 hawa-text-gray-400",
|
1243
|
+
fill: "currentColor",
|
1244
|
+
viewBox: "0 0 20 20"
|
1262
1245
|
},
|
1263
|
-
|
1264
|
-
"
|
1246
|
+
/* @__PURE__ */ React9.createElement(
|
1247
|
+
"path",
|
1265
1248
|
{
|
1266
|
-
|
1267
|
-
|
1268
|
-
|
1269
|
-
|
1270
|
-
},
|
1271
|
-
/* @__PURE__ */ React9.createElement(
|
1272
|
-
"path",
|
1273
|
-
{
|
1274
|
-
fillRule: "evenodd",
|
1275
|
-
d: "M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z",
|
1276
|
-
clipRule: "evenodd"
|
1277
|
-
}
|
1278
|
-
)
|
1249
|
+
fillRule: "evenodd",
|
1250
|
+
d: "M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z",
|
1251
|
+
clipRule: "evenodd"
|
1252
|
+
}
|
1279
1253
|
)
|
1280
1254
|
)
|
1281
|
-
|
1282
|
-
|
1283
|
-
)
|
1255
|
+
)
|
1256
|
+
}
|
1257
|
+
))
|
1284
1258
|
), /* @__PURE__ */ React9.createElement(
|
1285
1259
|
"div",
|
1286
1260
|
{
|
1287
1261
|
className: cn(
|
1288
|
-
"hawa-fixed hawa-z-0 hawa-flex hawa-flex-col hawa-justify-between hawa-overflow-x-clip hawa-transition-all hawa-bg-
|
1289
|
-
isRTL ? "hawa-right-0
|
1290
|
-
"hawa-h-[calc(100dvh)]",
|
1291
|
-
"hawa-bg-primary-foreground",
|
1262
|
+
"hawa-fixed hawa-z-0 hawa-flex hawa-flex-col hawa-justify-between hawa-overflow-x-clip hawa-transition-all hawa-top-0 hawa-h-[calc(100dvh)] hawa-bg-primary-foreground",
|
1263
|
+
isRTL ? "hawa-right-0" : "hawa-left-0",
|
1292
1264
|
bordered ? direction === "rtl" ? "hawa-border-s-[1px]" : "hawa-border-e-[1px]" : ""
|
1293
1265
|
),
|
1294
1266
|
style: {
|
@@ -1330,7 +1302,7 @@ var AppLayout = ({
|
|
1330
1302
|
"img",
|
1331
1303
|
{
|
1332
1304
|
className: cn(
|
1333
|
-
"hawa-h-9
|
1305
|
+
"hawa-h-9 hawa-opacity-0 hawa-transition-all",
|
1334
1306
|
!openSideMenu ? "hawa-invisible hawa-opacity-0" : "hawa-visible hawa-opacity-100",
|
1335
1307
|
classNames == null ? void 0 : classNames.fullLogoImg
|
1336
1308
|
),
|
@@ -1341,8 +1313,7 @@ var AppLayout = ({
|
|
1341
1313
|
"img",
|
1342
1314
|
{
|
1343
1315
|
className: cn(
|
1344
|
-
"hawa-fixed
|
1345
|
-
isRTL ? "hawa-right-2.5 hawa-top-2.5" : "hawa-left-2.5 hawa-top-2.5",
|
1316
|
+
"hawa-fixed hawa-h-9 hawa-transition-all hawa-start-2.5 hawa-top-2.5",
|
1346
1317
|
openSideMenu ? "hawa-invisible hawa-opacity-0" : "hawa-visible hawa-opacity-100",
|
1347
1318
|
classNames == null ? void 0 : classNames.symbolLogoImg
|
1348
1319
|
),
|
@@ -1401,21 +1372,21 @@ var AppLayout = ({
|
|
1401
1372
|
{
|
1402
1373
|
side: "left",
|
1403
1374
|
delayDuration: 500,
|
1404
|
-
|
1405
|
-
|
1375
|
+
triggerProps: { asChild: true },
|
1376
|
+
content: keepDrawerOpen ? ((_a = props.texts) == null ? void 0 : _a.collapseSidebar) || "Collapse Sidebar" : ((_b = props.texts) == null ? void 0 : _b.expandSidebar) || "Expand Sidebar"
|
1406
1377
|
},
|
1407
1378
|
/* @__PURE__ */ React9.createElement(
|
1408
1379
|
Button,
|
1409
1380
|
{
|
1410
1381
|
variant: "outline",
|
1382
|
+
size: "smallIcon",
|
1411
1383
|
onClick: () => {
|
1412
1384
|
const newKeepOpenState = !keepDrawerOpen;
|
1413
1385
|
if (props.onDrawerExpand) {
|
1414
1386
|
props.onDrawerExpand(newKeepOpenState);
|
1415
1387
|
}
|
1416
1388
|
setKeepDrawerOpen(newKeepOpenState);
|
1417
|
-
}
|
1418
|
-
size: "smallIcon"
|
1389
|
+
}
|
1419
1390
|
},
|
1420
1391
|
/* @__PURE__ */ React9.createElement(
|
1421
1392
|
"svg",
|
@@ -1444,15 +1415,15 @@ var AppLayout = ({
|
|
1444
1415
|
{
|
1445
1416
|
className: "hawa-fixed -hawa-z-10 hawa-overflow-y-auto hawa-transition-all",
|
1446
1417
|
style: isRTL ? {
|
1447
|
-
height: `calc(100% - ${props.topBar ? "56" : "0"}px)`,
|
1448
|
-
width: `calc(100% - ${drawerSizeCondition}px)`,
|
1449
1418
|
left: "0px",
|
1450
|
-
top: props.topBar ? "56px" : "0px"
|
1451
|
-
} : {
|
1452
|
-
height: `calc(100% - ${props.topBar ? "56" : "0"}px)`,
|
1419
|
+
top: props.topBar ? "56px" : "0px",
|
1453
1420
|
width: `calc(100% - ${drawerSizeCondition}px)`,
|
1421
|
+
height: `calc(100% - ${props.topBar ? "56" : "0"}px)`
|
1422
|
+
} : {
|
1454
1423
|
left: `${drawerSizeCondition}px`,
|
1455
|
-
top: props.topBar ? "56px" : "0px"
|
1424
|
+
top: props.topBar ? "56px" : "0px",
|
1425
|
+
width: `calc(100% - ${drawerSizeCondition}px)`,
|
1426
|
+
height: `calc(100% - ${props.topBar ? "56" : "0"}px)`
|
1456
1427
|
}
|
1457
1428
|
},
|
1458
1429
|
props.children
|