pixelize-design-library 1.1.42 → 1.1.44
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/Components/Dropdown/DropDown.js +16 -5
- package/dist/Components/Dropdown/DropdownProps.d.ts +2 -0
- package/dist/Components/NavigationBar/NavigationBar.d.ts +1 -1
- package/dist/Components/NavigationBar/NavigationBar.js +3 -3
- package/dist/Pages/dropdown.d.ts +1 -1
- package/dist/Pages/dropdown.js +2 -2
- package/package.json +1 -1
|
@@ -41,9 +41,9 @@ var framer_motion_1 = require("framer-motion");
|
|
|
41
41
|
var useCustomTheme_1 = require("../../Theme/useCustomTheme");
|
|
42
42
|
var MotionBox = (0, framer_motion_1.motion)((0, react_1.forwardRef)(function (props, ref) { return (react_1.default.createElement(react_2.Box, __assign({ ref: ref }, props))); }));
|
|
43
43
|
var Dropdown = (0, react_1.forwardRef)(function (_a, ref) {
|
|
44
|
-
var dropDownButtonStyle = _a.dropDownButtonStyle, ButtonText = _a.ButtonText, options = _a.options, handleOptionSelect = _a.handleOptionSelect, _b = _a.dropdownType, dropdownType = _b === void 0 ? "button" : _b, text = _a.text, DropdownIcon = _a.DropdownIcon, _c = _a.isVisibleIconShow, isVisibleIconShow = _c === void 0 ? true : _c, buttonProps = _a.buttonProps, headStyle = _a.headStyle, ListStyle = _a.ListStyle, ItemStyle = _a.ItemStyle, LabelStyle = _a.LabelStyle, ImageStyle = _a.ImageStyle;
|
|
44
|
+
var dropDownButtonStyle = _a.dropDownButtonStyle, ButtonText = _a.ButtonText, options = _a.options, handleOptionSelect = _a.handleOptionSelect, _b = _a.dropdownType, dropdownType = _b === void 0 ? "button" : _b, text = _a.text, DropdownIcon = _a.DropdownIcon, _c = _a.isVisibleIconShow, isVisibleIconShow = _c === void 0 ? true : _c, buttonProps = _a.buttonProps, headStyle = _a.headStyle, ListStyle = _a.ListStyle, ItemStyle = _a.ItemStyle, LabelStyle = _a.LabelStyle, ImageStyle = _a.ImageStyle, _d = _a.optionsSize, optionsSize = _d === void 0 ? "lg" : _d, _e = _a.divider, divider = _e === void 0 ? false : _e;
|
|
45
45
|
var theme = (0, useCustomTheme_1.useCustomTheme)();
|
|
46
|
-
var
|
|
46
|
+
var _f = (0, react_2.useDisclosure)(), isOpen = _f.isOpen, onToggle = _f.onToggle, onClose = _f.onClose;
|
|
47
47
|
var dropdownRef = (0, react_1.useRef)(null);
|
|
48
48
|
var handleListItemClick = function (optionId, optionLabel) {
|
|
49
49
|
onClose();
|
|
@@ -74,9 +74,20 @@ var Dropdown = (0, react_1.forwardRef)(function (_a, ref) {
|
|
|
74
74
|
return dropdownType === "button" ? ButtonToggle : TextToggle;
|
|
75
75
|
};
|
|
76
76
|
var DropdownContentRender = function () {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
77
|
+
var _a, _b, _c;
|
|
78
|
+
return (react_1.default.createElement(react_2.List, { bg: (_b = (_a = theme.colors) === null || _a === void 0 ? void 0 : _a.backgroundColor) === null || _b === void 0 ? void 0 : _b.light, border: "1px solid ".concat((_c = theme.colors) === null || _c === void 0 ? void 0 : _c.gray[300]), borderRadius: theme.radii.md, shadow: theme.shadows.lg, py: 2, mt: "0.2rem", minWidth: "200px", style: ListStyle }, options.map(function (option) {
|
|
79
|
+
var _a;
|
|
80
|
+
return (react_1.default.createElement(react_2.ListItem, { key: option.id, onClick: function () { return handleListItemClick(option.id, option.label); }, p: optionsSize === "sm" ? 1 : 2, px: 2, _hover: {
|
|
81
|
+
bg: theme.colors.gray[100],
|
|
82
|
+
color: theme.colors.blue[500],
|
|
83
|
+
}, display: "flex", alignItems: "center", cursor: "pointer", style: ItemStyle, borderBottom: divider ? "1px solid ".concat((_a = theme.colors) === null || _a === void 0 ? void 0 : _a.gray[300]) : undefined, sx: {
|
|
84
|
+
"&:last-child": {
|
|
85
|
+
borderBottom: "none",
|
|
86
|
+
},
|
|
87
|
+
} },
|
|
88
|
+
(option === null || option === void 0 ? void 0 : option.image) && (react_1.default.createElement(react_2.Icon, { as: option.image, boxSize: optionsSize === "sm" ? "1.1rem" : "1.5rem", mr: 2, style: ImageStyle })),
|
|
89
|
+
react_1.default.createElement(react_2.Box, { as: "span", fontSize: optionsSize === "sm" ? "14px" : "16px", isTruncated: true, style: LabelStyle }, option.label)));
|
|
90
|
+
})));
|
|
80
91
|
};
|
|
81
92
|
return (react_1.default.createElement(react_2.Box, { ref: dropdownRef, position: "relative", display: "inline-block" },
|
|
82
93
|
dropDownToggleOption(),
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { NavbarProps } from "./NavigationBarProps";
|
|
3
|
-
export default function NavBar({ userAvathar, userName, navMenu, moreIcon, handleNavOnClick, handleLogout, logoutText, navigationBarText }: NavbarProps): React.JSX.Element;
|
|
3
|
+
export default function NavBar({ userAvathar, userName, navMenu, moreIcon, handleNavOnClick, handleLogout, logoutText, navigationBarText, }: NavbarProps): React.JSX.Element;
|
|
@@ -12,10 +12,10 @@ function NavBar(_a) {
|
|
|
12
12
|
return (react_1.default.createElement(react_2.Box, { bg: theme.colors.backgroundColor.light, px: 4, boxShadow: theme.shadows.sm },
|
|
13
13
|
react_1.default.createElement(react_2.Flex, { h: 16, alignItems: "center", justifyContent: "space-between" },
|
|
14
14
|
react_1.default.createElement(react_2.Box, null, navigationBarText),
|
|
15
|
-
react_1.default.createElement(react_2.Flex,
|
|
16
|
-
react_1.default.createElement(react_2.Stack, { direction: "row", spacing: 7 },
|
|
15
|
+
react_1.default.createElement(react_2.Flex, null,
|
|
16
|
+
react_1.default.createElement(react_2.Stack, { direction: "row", alignItems: "center", spacing: 7 },
|
|
17
17
|
react_1.default.createElement(react_2.Menu, null,
|
|
18
|
-
react_1.default.createElement(react_2.Box, {
|
|
18
|
+
react_1.default.createElement(react_2.Box, { cursor: "pointer" }, moreIcon),
|
|
19
19
|
react_1.default.createElement(react_2.MenuButton, { as: react_2.Button, rounded: "full", variant: "link", cursor: "pointer", minW: 0 },
|
|
20
20
|
react_1.default.createElement(react_2.Avatar, { size: "sm", name: userName, src: userAvathar })),
|
|
21
21
|
react_1.default.createElement(react_2.MenuList, { alignItems: "center", zIndex: 5 },
|
package/dist/Pages/dropdown.d.ts
CHANGED
package/dist/Pages/dropdown.js
CHANGED
|
@@ -15,10 +15,10 @@ var DropdownPage = function () {
|
|
|
15
15
|
{ id: 5, label: "Link(URL)", image: fi_1.FiChevronUp },
|
|
16
16
|
];
|
|
17
17
|
return (react_1.default.createElement("div", null,
|
|
18
|
-
react_1.default.createElement(DropDown_1.default, { ButtonText: "hello", options: exportOptionss,
|
|
18
|
+
react_1.default.createElement(DropDown_1.default, { ButtonText: "hello", optionsSize: "sm", options: exportOptionss,
|
|
19
19
|
// dropDownButtonStyle={{ color: "red" }}
|
|
20
20
|
DropdownIcon: react_1.default.createElement(fi_1.FiMoreHorizontal, { color: "gray.500" }), dropdownType: "button", handleOptionSelect: function (id, label) {
|
|
21
21
|
console.log("optionid", id, label);
|
|
22
|
-
}, buttonProps: { variant: "solid", colorScheme: "red" }, isVisibleIconShow: true })));
|
|
22
|
+
}, buttonProps: { variant: "solid", colorScheme: "red" }, isVisibleIconShow: true, divider: true })));
|
|
23
23
|
};
|
|
24
24
|
exports.default = DropdownPage;
|