@sikka/hawa 0.1.101 → 0.1.103
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.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +15 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +17 -12
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +3 -0
- package/package.json +1 -1
- package/src/elements/FloatingCommentSlate.tsx +0 -2
- package/src/elements/HawaTable.tsx +10 -188
- package/src/layout/AppLayout.tsx +10 -5
- package/src/layout/Sidebar.tsx +2 -1
- package/src/styles.css +3 -0
package/dist/index.d.mts
CHANGED
|
@@ -943,6 +943,7 @@ type AppLayoutTypes = {
|
|
|
943
943
|
profileMenuItems?: MenuItemType[];
|
|
944
944
|
profileMenuWidth: "default" | "sm" | "lg" | "parent";
|
|
945
945
|
onSettingsClick?: () => void;
|
|
946
|
+
onDrawerExpand?: (e: any) => void;
|
|
946
947
|
DrawerFooterActions?: any;
|
|
947
948
|
clickedItem?: any;
|
|
948
949
|
texts?: {
|
package/dist/index.d.ts
CHANGED
|
@@ -943,6 +943,7 @@ type AppLayoutTypes = {
|
|
|
943
943
|
profileMenuItems?: MenuItemType[];
|
|
944
944
|
profileMenuWidth: "default" | "sm" | "lg" | "parent";
|
|
945
945
|
onSettingsClick?: () => void;
|
|
946
|
+
onDrawerExpand?: (e: any) => void;
|
|
946
947
|
DrawerFooterActions?: any;
|
|
947
948
|
clickedItem?: any;
|
|
948
949
|
texts?: {
|
package/dist/index.js
CHANGED
|
@@ -1401,9 +1401,12 @@ var HawaTable = function(_param) {
|
|
|
1401
1401
|
}, props.headerTools && /* @__PURE__ */ React6.default.createElement("div", {
|
|
1402
1402
|
className: "flex flex-row items-center justify-between gap-2 border bg-background px-2 py-2"
|
|
1403
1403
|
}, props.headerTools), /* @__PURE__ */ React6.default.createElement("table", {
|
|
1404
|
-
className: _clsx2.default.call(void 0, borders === "outer" || borders === "all"
|
|
1404
|
+
className: _clsx2.default.call(void 0, // borders === "outer" || borders === "all"
|
|
1405
|
+
// ? `outline outline-[${bordersWidth}px] -outline-offset-1 outline-gray-300 dark:outline-gray-700`
|
|
1406
|
+
// : "",
|
|
1407
|
+
"w-full rounded bg-muted text-left text-sm text-muted-foreground", "bg-".concat(headerColor))
|
|
1405
1408
|
}, /* @__PURE__ */ React6.default.createElement("thead", {
|
|
1406
|
-
className: _clsx2.default.call(void 0, "text-xs uppercase text-
|
|
1409
|
+
className: _clsx2.default.call(void 0, "bg-muted text-xs uppercase text-muted-foreground ", borders === "rows" || borders === "all" || borders === "inner" ? "border-b " : "")
|
|
1407
1410
|
}, /* @__PURE__ */ React6.default.createElement("tr", null, props.columns.map(function(col, i) {
|
|
1408
1411
|
if (col.hidden) {
|
|
1409
1412
|
return;
|
|
@@ -1415,7 +1418,7 @@ var HawaTable = function(_param) {
|
|
|
1415
1418
|
key: i,
|
|
1416
1419
|
scope: "col",
|
|
1417
1420
|
colSpan: 2,
|
|
1418
|
-
className: _clsx2.default.call(void 0, col.sortable ? "cursor-pointer hover:bg-
|
|
1421
|
+
className: _clsx2.default.call(void 0, col.sortable ? "cursor-pointer hover:bg-muted-foreground/10" : "", sizeStyles2[size], i !== 0 && (borders === "cols" || borders === "all" || borders === "inner") ? "border-r border-r-[".concat(bordersWidth, "px] border-l border-l-[").concat(bordersWidth, "px]") : "")
|
|
1419
1422
|
}, col.value, sortColumn === i && /* @__PURE__ */ React6.default.createElement("span", null, sortDirection === "asc" ? " ▲" : " ▼"));
|
|
1420
1423
|
}
|
|
1421
1424
|
}), props.actions ? /* @__PURE__ */ React6.default.createElement("th", {
|
|
@@ -1453,7 +1456,7 @@ var HawaTable = function(_param) {
|
|
|
1453
1456
|
]) - 1;
|
|
1454
1457
|
return /* @__PURE__ */ React6.default.createElement("tr", {
|
|
1455
1458
|
key: rowIndex,
|
|
1456
|
-
className: _clsx2.default.call(void 0, "
|
|
1459
|
+
className: _clsx2.default.call(void 0, " text-mute-foreground border bg-background", props.clickable ? "hover:bg-gray-100" : "", !lastRow && (borders === "all" || borders === "rows" || borders === "inner") ? "border-b border-b-[".concat(bordersWidth, "px]") : "")
|
|
1457
1460
|
}, _optionalChain([
|
|
1458
1461
|
singleRow,
|
|
1459
1462
|
"optionalAccess",
|
|
@@ -1503,7 +1506,7 @@ var HawaTable = function(_param) {
|
|
|
1503
1506
|
return props.handleActionClick(e, singleRow);
|
|
1504
1507
|
},
|
|
1505
1508
|
trigger: /* @__PURE__ */ React6.default.createElement("div", {
|
|
1506
|
-
className: "flex w-fit
|
|
1509
|
+
className: "flex w-fit cursor-pointer items-center justify-center rounded p-2 transition-all hover:bg-primary/20 "
|
|
1507
1510
|
}, /* @__PURE__ */ React6.default.createElement("svg", {
|
|
1508
1511
|
"aria-label": "Vertical Three Dots Menu Icon",
|
|
1509
1512
|
stroke: "currentColor",
|
|
@@ -7546,7 +7549,8 @@ var SidebarItem = function(_param) {
|
|
|
7546
7549
|
]);
|
|
7547
7550
|
}
|
|
7548
7551
|
},
|
|
7549
|
-
className: cn("flex h-full cursor-pointer flex-row items-center gap-2 rounded
|
|
7552
|
+
className: cn("flex h-full cursor-pointer flex-row items-center gap-2 rounded p-2 transition-all", // bg-foreground/10
|
|
7553
|
+
getSelectedStyle(subitem.value))
|
|
7550
7554
|
}, subitem.icon, subitem.label);
|
|
7551
7555
|
}))));
|
|
7552
7556
|
} else {
|
|
@@ -7711,7 +7715,7 @@ var AppLayout = function(_param) {
|
|
|
7711
7715
|
ref: ref
|
|
7712
7716
|
}, /* @__PURE__ */ React6.default.createElement("div", {
|
|
7713
7717
|
dir: direction,
|
|
7714
|
-
className:
|
|
7718
|
+
className: "fixed z-50 mb-2 flex h-14 w-full flex-row items-center justify-center bg-primary-foreground transition-all",
|
|
7715
7719
|
style: {
|
|
7716
7720
|
width: size > 600 ? "".concat(openSideMenu ? openDrawerWidth : 56, "px") : "".concat(openSideMenu ? openDrawerWidth : 0, "px")
|
|
7717
7721
|
}
|
|
@@ -7779,7 +7783,10 @@ var AppLayout = function(_param) {
|
|
|
7779
7783
|
}, /* @__PURE__ */ React6.default.createElement(Button, {
|
|
7780
7784
|
variant: "light",
|
|
7781
7785
|
onClick: function() {
|
|
7782
|
-
|
|
7786
|
+
setKeepOpen(!keepOpen);
|
|
7787
|
+
if (props.onDrawerExpand) {
|
|
7788
|
+
props.onDrawerExpand(keepOpen);
|
|
7789
|
+
}
|
|
7783
7790
|
},
|
|
7784
7791
|
size: "smallIcon"
|
|
7785
7792
|
}, /* @__PURE__ */ React6.default.createElement("svg", {
|