myshell-react-lib 0.1.35 → 0.1.37
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.cjs +7 -28
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -46
- package/dist/index.d.ts +12 -46
- package/dist/index.js +7 -28
- package/dist/index.js.map +1 -1
- package/dist/styles/components-light.scss +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -11463,7 +11463,7 @@ var import_react14 = require("react");
|
|
|
11463
11463
|
var import_react_use7 = require("react-use");
|
|
11464
11464
|
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
11465
11465
|
function TopNavigationBar(param) {
|
|
11466
|
-
var
|
|
11466
|
+
var searchElement = param.searchElement, title = param.title, border = param.border, backUrl = param.backUrl, children = param.children, _param_hasBackground = param.hasBackground, hasBackground = _param_hasBackground === void 0 ? false : _param_hasBackground, avatar = param.avatar, onBack = param.onBack, _param_pageType = param.pageType, pageType = _param_pageType === void 0 ? 2 : _param_pageType, className = param.className;
|
|
11467
11467
|
var isMobile2 = (0, import_react_use7.useMedia)("(max-width: 768px)");
|
|
11468
11468
|
var navbarRef = (0, import_react14.useRef)(null);
|
|
11469
11469
|
var _ref = _sliced_to_array((0, import_react14.useState)(hasBackground), 2), showBackground = _ref[0], setShowBackground = _ref[1];
|
|
@@ -11487,7 +11487,7 @@ function TopNavigationBar(param) {
|
|
|
11487
11487
|
]);
|
|
11488
11488
|
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", {
|
|
11489
11489
|
ref: navbarRef,
|
|
11490
|
-
className: cn("w-full flex flex-col md:flex-row justify-center items-center px-4 md:px-6", !isMobile2 && border && "border-b border-Colors-Border-Default", showBackground
|
|
11490
|
+
className: cn("w-full flex flex-col md:flex-row justify-center items-center px-4 md:px-6", !isMobile2 && border && "border-b border-Colors-Border-Default", showBackground ? "bg-Colors-Background-Normal-Primary-Default" : "bg-cc-Button-Plain-bg-default md:bg-Colors-Background-Normal-Primary-Default", className),
|
|
11491
11491
|
children: [
|
|
11492
11492
|
/* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", {
|
|
11493
11493
|
className: "relative w-full flex justify-between items-center h-13 md:h-15 pt-5 pb-1.5 md:pt-2 md:pb-2",
|
|
@@ -11520,7 +11520,7 @@ function TopNavigationBar(param) {
|
|
|
11520
11520
|
})
|
|
11521
11521
|
]
|
|
11522
11522
|
}),
|
|
11523
|
-
title &&
|
|
11523
|
+
title && !(avatar === null || avatar === void 0 ? void 0 : avatar.logo) && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Display, {
|
|
11524
11524
|
size: isMobile2 ? "xs" : "sm",
|
|
11525
11525
|
className: "line-clamp-1",
|
|
11526
11526
|
children: title
|
|
@@ -11542,44 +11542,23 @@ function TopNavigationBar(param) {
|
|
|
11542
11542
|
children: avatar.name
|
|
11543
11543
|
})
|
|
11544
11544
|
]
|
|
11545
|
-
}) :
|
|
11546
|
-
className: "w-[76px]"
|
|
11547
|
-
})
|
|
11545
|
+
}) : null
|
|
11548
11546
|
}),
|
|
11549
11547
|
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", {
|
|
11550
11548
|
className: "flex-1 flex justify-end items-center",
|
|
11551
11549
|
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", {
|
|
11552
11550
|
className: "flex items-center space-x-3",
|
|
11553
11551
|
children: [
|
|
11554
|
-
|
|
11555
|
-
className: "relative w-full md:w-60",
|
|
11556
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(SearchBar, {
|
|
11557
|
-
color: "gray",
|
|
11558
|
-
size: "xs",
|
|
11559
|
-
searchValue: searchValue,
|
|
11560
|
-
placeholder: searchPlaceholder || "Search",
|
|
11561
|
-
onSearchChange: function(value1) {
|
|
11562
|
-
onSearchChange && onSearchChange(value1);
|
|
11563
|
-
}
|
|
11564
|
-
})
|
|
11565
|
-
}),
|
|
11552
|
+
searchElement && (!isMobile2 && pageType === 1 || pageType === 2) && searchElement,
|
|
11566
11553
|
children
|
|
11567
11554
|
]
|
|
11568
11555
|
})
|
|
11569
11556
|
})
|
|
11570
11557
|
]
|
|
11571
11558
|
}),
|
|
11572
|
-
|
|
11559
|
+
searchElement && pageType === 1 && isMobile2 && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", {
|
|
11573
11560
|
className: "relative w-full h-13 py-2",
|
|
11574
|
-
children:
|
|
11575
|
-
color: "gray",
|
|
11576
|
-
size: "xs",
|
|
11577
|
-
searchValue: searchValue,
|
|
11578
|
-
placeholder: searchPlaceholder || "Search",
|
|
11579
|
-
onSearchChange: function(value1) {
|
|
11580
|
-
onSearchChange && onSearchChange(value1);
|
|
11581
|
-
}
|
|
11582
|
-
})
|
|
11561
|
+
children: searchElement
|
|
11583
11562
|
})
|
|
11584
11563
|
]
|
|
11585
11564
|
});
|