quix-ui 1.2.5 → 1.2.7

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.
@@ -1,23 +1,3 @@
1
- import { LayoutProps, menuItemsDynamicStyleProps, menuItemsProps, sideMenuProps } from "./types";
1
+ import { LayoutProps } from "./types";
2
2
  import './layout.style.css';
3
3
  export default function Layout(props: LayoutProps): import("react/jsx-runtime").JSX.Element;
4
- export declare function SideMenu(props: {
5
- sideMenu: sideMenuProps;
6
- top: number;
7
- }): import("react/jsx-runtime").JSX.Element;
8
- export declare function MenuItem({ item, ElementType, menuItemsDynamicStyle, menuItemStyle }: {
9
- item: menuItemsProps;
10
- ElementType?: "NavLink" | "Link" | "a" | "div";
11
- menuItemsDynamicStyle?: menuItemsDynamicStyleProps;
12
- menuItemStyle?: {
13
- style?: React.CSSProperties;
14
- width?: {
15
- desktop: number | string;
16
- tablet: number | string;
17
- mobile: number | string;
18
- };
19
- };
20
- }): import("react/jsx-runtime").JSX.Element;
21
- export declare function Header(): import("react/jsx-runtime").JSX.Element;
22
- export declare function Content(): import("react/jsx-runtime").JSX.Element;
23
- export declare function Footer(): import("react/jsx-runtime").JSX.Element;
package/dist/index.js CHANGED
@@ -1,21 +1,7 @@
1
1
  import { jsx as jsx$1, jsxs } from 'react/jsx-runtime';
2
2
  import * as React3 from 'react';
3
- import { forwardRef, useContext } from 'react';
3
+ import { forwardRef, useContext, useEffect, useState, useCallback } from 'react';
4
4
 
5
- function _classCallCheck(a, n) {
6
- if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
7
- }
8
- function _defineProperties(e, r) {
9
- for (var t = 0; t < r.length; t++) {
10
- var o = r[t];
11
- o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, _toPropertyKey(o.key), o);
12
- }
13
- }
14
- function _createClass(e, r, t) {
15
- return r && _defineProperties(e.prototype, r), Object.defineProperty(e, "prototype", {
16
- writable: false
17
- }), e;
18
- }
19
5
  function _defineProperty(e, r, t) {
20
6
  return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
21
7
  value: t,
@@ -60,7 +46,7 @@ function _toPrimitive(t, r) {
60
46
  if ("object" != typeof i) return i;
61
47
  throw new TypeError("@@toPrimitive must return a primitive value.");
62
48
  }
63
- return (String )(t);
49
+ return ("string" === r ? String : Number)(t);
64
50
  }
65
51
  function _toPropertyKey(t) {
66
52
  var i = _toPrimitive(t, "string");
@@ -3949,59 +3935,158 @@ keyframes`
3949
3935
  }
3950
3936
  `;
3951
3937
 
3952
- // interface SizeMapProps {
3953
- // width:number,
3954
- // height:number
3955
- // }
3956
- var WindowSize = /*#__PURE__*/function () {
3957
- function WindowSize() {
3958
- _classCallCheck(this, WindowSize);
3959
- _defineProperty(this, "size", {
3960
- width: 0,
3961
- height: 0
3962
- });
3963
- if (typeof window === "undefined") return;
3964
- this.resizeWindow = this.resizeWindow.bind(this);
3965
- this.resizeWindow();
3966
- window.addEventListener("resize", this.resizeWindow);
3967
- this.update = this.update.bind(this);
3968
- }
3969
- return _createClass(WindowSize, [{
3970
- key: "resizeWindow",
3971
- value: function resizeWindow() {
3972
- this.size = {
3973
- width: window.innerWidth,
3974
- height: window.innerHeight
3975
- };
3976
- // this.update();
3977
- }
3978
- }, {
3979
- key: "update",
3980
- value: function update() {
3981
- return [this.size];
3982
- }
3983
- }, {
3984
- key: "destroy",
3985
- value: function destroy() {
3986
- window.removeEventListener("resize", this.resizeWindow);
3987
- }
3988
- }]);
3989
- }();
3990
- var useWindowSize = new WindowSize();
3938
+ function useWindowEvent(type, listener, options) {
3939
+ useEffect(() => {
3940
+ window.addEventListener(type, listener, options);
3941
+ return () => window.removeEventListener(type, listener, options);
3942
+ }, [type, listener]);
3943
+ }
3944
+
3945
+ const eventListerOptions = {
3946
+ passive: true
3947
+ };
3948
+ function useViewportSize() {
3949
+ const [windowSize, setWindowSize] = useState({
3950
+ width: 0,
3951
+ height: 0
3952
+ });
3953
+ const setSize = useCallback(() => {
3954
+ setWindowSize({ width: window.innerWidth || 0, height: window.innerHeight || 0 });
3955
+ }, []);
3956
+ useWindowEvent("resize", setSize, eventListerOptions);
3957
+ useWindowEvent("orientationchange", setSize, eventListerOptions);
3958
+ useEffect(setSize, []);
3959
+ return windowSize;
3960
+ }
3991
3961
 
3992
3962
  var _templateObject, _templateObject2, _templateObject3;
3993
3963
  function Layout(props) {
3994
3964
  var _header$height, _header$height2, _sideMenu$width$table, _sideMenu$width, _sideMenu$width$deskt, _sideMenu$width2, _sideMenu$width$deskt2, _sideMenu$width3;
3995
- var update = useWindowSize.update;
3996
3965
  var backgroundColor = props.backgroundColor,
3997
3966
  layoutStyle = props.layoutStyle,
3998
3967
  className = props.className,
3999
3968
  sideMenu = props.sideMenu,
4000
3969
  content = props.content,
4001
3970
  header = props.header;
4002
- var size = update()[0];
3971
+ var size = useViewportSize();
4003
3972
  var LayoutSection = styled.section(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width:", "\n "])), layoutStyle === null || layoutStyle === void 0 ? void 0 : layoutStyle.width);
4004
3973
  var Content = styled.section(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n\n "])));
3974
+ function SideMenu(props) {
3975
+ var _sideMenuStyle$left, _menuItemStyle$width$, _menuItemStyle$width, _sideMenuStyle$bottom, _props$top, _menuItemStyle$width2;
3976
+ var _props$sideMenu = props.sideMenu,
3977
+ width = _props$sideMenu.width,
3978
+ sideMenuStyle = _props$sideMenu.sideMenuStyle,
3979
+ menuItems = _props$sideMenu.menuItems,
3980
+ ElementType = _props$sideMenu.ElementType,
3981
+ bottomSection = _props$sideMenu.bottomSection,
3982
+ menuItemStyle = _props$sideMenu.menuItemStyle,
3983
+ menuItemsDynamicStyle = _props$sideMenu.menuItemsDynamicStyle;
3984
+ var bottomNode = function bottomNode(menuItemStyle) {
3985
+ if (bottomSection) {
3986
+ return bottomSection.map(function (item) {
3987
+ return MenuItem({
3988
+ item: item,
3989
+ menuItemStyle: menuItemStyle
3990
+ });
3991
+ });
3992
+ }
3993
+ };
3994
+ return jsxs("aside", {
3995
+ className: " quix_side_menu ",
3996
+ style: _objectSpread2({
3997
+ position: 'absolute',
3998
+ left: size.width < 450 ? 8 : (_sideMenuStyle$left = sideMenuStyle === null || sideMenuStyle === void 0 ? void 0 : sideMenuStyle.left) !== null && _sideMenuStyle$left !== void 0 ? _sideMenuStyle$left : 0,
3999
+ bottom: size.width < 450 ? Number((_menuItemStyle$width$ = menuItemStyle === null || menuItemStyle === void 0 || (_menuItemStyle$width = menuItemStyle.width) === null || _menuItemStyle$width === void 0 ? void 0 : _menuItemStyle$width.mobile) !== null && _menuItemStyle$width$ !== void 0 ? _menuItemStyle$width$ : 48) / 2 : (_sideMenuStyle$bottom = sideMenuStyle === null || sideMenuStyle === void 0 ? void 0 : sideMenuStyle.bottom) !== null && _sideMenuStyle$bottom !== void 0 ? _sideMenuStyle$bottom : 0,
4000
+ width: size.width < 450 ? '100%' : size.width > 450 && size.width < 850 ? width.tablet : size.width >= 850 ? width.desktop : 300,
4001
+ top: size.width < 450 ? 'none' : (_props$top = props === null || props === void 0 ? void 0 : props.top) !== null && _props$top !== void 0 ? _props$top : 80,
4002
+ height: size.width < 450 ? menuItemStyle === null || menuItemStyle === void 0 || (_menuItemStyle$width2 = menuItemStyle.width) === null || _menuItemStyle$width2 === void 0 ? void 0 : _menuItemStyle$width2.mobile : '90%',
4003
+ // height: 48,
4004
+ zIndex: 99
4005
+ }, sideMenuStyle),
4006
+ children: [menuItems && menuItems.map(function (item) {
4007
+ return MenuItem({
4008
+ item: item,
4009
+ ElementType: ElementType,
4010
+ menuItemsDynamicStyle: menuItemsDynamicStyle,
4011
+ menuItemStyle: menuItemStyle
4012
+ });
4013
+ }), size.width > 450 && jsx$1("div", {
4014
+ className: " sidemenu_bottom_section ",
4015
+ children: jsx$1("div", {
4016
+ className: " items ",
4017
+ children: bottomNode(menuItemStyle)
4018
+ })
4019
+ })]
4020
+ });
4021
+ }
4022
+ function MenuItem(_ref) {
4023
+ var _menuItemsDynamicStyl, _menuItemsDynamicStyl2, _menuItemsDynamicStyl3, _menuItemsDynamicStyl4, _menuItemsDynamicStyl5, _menuItemsDynamicStyl6, _menuItemStyle$style, _menuItemStyle$style2, _menuItemStyle$width3, _menuItemStyle$width4, _menuItemStyle$width5;
4024
+ var item = _ref.item,
4025
+ ElementType = _ref.ElementType,
4026
+ menuItemsDynamicStyle = _ref.menuItemsDynamicStyle,
4027
+ menuItemStyle = _ref.menuItemStyle;
4028
+ var windowWidth = size.width;
4029
+ var MenuItemElement = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n background-color:", ";\n color:", ";\n\n &:hover{\n background-color:", ";\n color:", "\n }\n "])), (_menuItemsDynamicStyl = menuItemsDynamicStyle === null || menuItemsDynamicStyle === void 0 ? void 0 : menuItemsDynamicStyle.backgroundColor) !== null && _menuItemsDynamicStyl !== void 0 ? _menuItemsDynamicStyl : '#d4d4d480', (_menuItemsDynamicStyl2 = menuItemsDynamicStyle === null || menuItemsDynamicStyle === void 0 ? void 0 : menuItemsDynamicStyle.textColor) !== null && _menuItemsDynamicStyl2 !== void 0 ? _menuItemsDynamicStyl2 : "#121212", (_menuItemsDynamicStyl3 = menuItemsDynamicStyle === null || menuItemsDynamicStyle === void 0 || (_menuItemsDynamicStyl4 = menuItemsDynamicStyle.activeColor) === null || _menuItemsDynamicStyl4 === void 0 ? void 0 : _menuItemsDynamicStyl4.background) !== null && _menuItemsDynamicStyl3 !== void 0 ? _menuItemsDynamicStyl3 : '#d4d4d4', (_menuItemsDynamicStyl5 = menuItemsDynamicStyle === null || menuItemsDynamicStyle === void 0 || (_menuItemsDynamicStyl6 = menuItemsDynamicStyle.activeColor) === null || _menuItemsDynamicStyl6 === void 0 ? void 0 : _menuItemsDynamicStyl6.text) !== null && _menuItemsDynamicStyl5 !== void 0 ? _menuItemsDynamicStyl5 : "#121212");
4030
+ var navigate = function navigate(route) {
4031
+ window.location.replace(route);
4032
+ };
4033
+ var Element = function Element(_ref2) {
4034
+ var children = _ref2.children;
4035
+ return ElementType === 'NavLink' ? jsx$1(NavLink, {
4036
+ style: {
4037
+ width: "100%"
4038
+ },
4039
+ to: item.route,
4040
+ children: children
4041
+ }, item.label) : ElementType === 'Link' ? jsx$1(Link, {
4042
+ style: {
4043
+ width: "100%"
4044
+ },
4045
+ to: item.route,
4046
+ children: children
4047
+ }, item.label) : ElementType === 'a' ? jsx$1("a", {
4048
+ style: {
4049
+ width: "100%",
4050
+ textDecoration: 'none'
4051
+ },
4052
+ href: item.route,
4053
+ children: children
4054
+ }, item.label) : jsx$1("div", {
4055
+ style: {
4056
+ width: "100%"
4057
+ },
4058
+ onClick: function onClick() {
4059
+ navigate(item.route);
4060
+ },
4061
+ children: children
4062
+ }, item.label);
4063
+ };
4064
+ return jsx$1(Element, {
4065
+ children: jsx$1("div", {
4066
+ style: {
4067
+ padding: windowWidth > 850 ? 10 : 6,
4068
+ width: '100%'
4069
+ },
4070
+ children: jsxs(MenuItemElement, {
4071
+ className: ' ',
4072
+ style: _objectSpread2({
4073
+ transition: '0.2s all',
4074
+ justifyContent: windowWidth > 850 ? menuItemStyle === null || menuItemStyle === void 0 || (_menuItemStyle$style = menuItemStyle.style) === null || _menuItemStyle$style === void 0 ? void 0 : _menuItemStyle$style.justifyContent : 'center',
4075
+ borderRadius: windowWidth > 850 ? menuItemStyle === null || menuItemStyle === void 0 || (_menuItemStyle$style2 = menuItemStyle.style) === null || _menuItemStyle$style2 === void 0 ? void 0 : _menuItemStyle$style2.borderRadius : 2,
4076
+ width: windowWidth <= 450 ? menuItemStyle === null || menuItemStyle === void 0 || (_menuItemStyle$width3 = menuItemStyle.width) === null || _menuItemStyle$width3 === void 0 ? void 0 : _menuItemStyle$width3.mobile : windowWidth > 450 && windowWidth < 850 ? menuItemStyle === null || menuItemStyle === void 0 || (_menuItemStyle$width4 = menuItemStyle.width) === null || _menuItemStyle$width4 === void 0 ? void 0 : _menuItemStyle$width4.tablet : windowWidth >= 850 ? menuItemStyle === null || menuItemStyle === void 0 || (_menuItemStyle$width5 = menuItemStyle.width) === null || _menuItemStyle$width5 === void 0 ? void 0 : _menuItemStyle$width5.desktop : 300
4077
+ }, menuItemStyle === null || menuItemStyle === void 0 ? void 0 : menuItemStyle.style),
4078
+ children: [item.icon && item.icon.position === 'left' && item.icon.component, windowWidth > 850 && jsx$1("p", {
4079
+ className: " quix_menuItem_label ",
4080
+ style: {
4081
+ paddingInline: 10,
4082
+ paddingBlock: 8
4083
+ },
4084
+ children: item === null || item === void 0 ? void 0 : item.label
4085
+ }), item.icon && item.icon.position === 'right' && item.icon.component]
4086
+ })
4087
+ }, item.label)
4088
+ });
4089
+ }
4005
4090
  // console.log( (size.width) - ((size.width < 450 ? Number(sideMenu?.width.mobile) : size.width < 850 ? Number(sideMenu?.width.tablet) : size.width > 850 ? Number(sideMenu?.width.desktop) : Number(sideMenu?.width.desktop)) + 30))
4006
4091
  return jsxs(LayoutSection, {
4007
4092
  className: "".concat(className),
@@ -4031,125 +4116,5 @@ function Layout(props) {
4031
4116
  })]
4032
4117
  });
4033
4118
  }
4034
- function SideMenu(props) {
4035
- var _sideMenuStyle$left, _menuItemStyle$width$, _menuItemStyle$width, _sideMenuStyle$bottom, _props$top, _menuItemStyle$width2;
4036
- var _props$sideMenu = props.sideMenu,
4037
- width = _props$sideMenu.width,
4038
- sideMenuStyle = _props$sideMenu.sideMenuStyle,
4039
- menuItems = _props$sideMenu.menuItems,
4040
- ElementType = _props$sideMenu.ElementType,
4041
- bottomSection = _props$sideMenu.bottomSection,
4042
- menuItemStyle = _props$sideMenu.menuItemStyle,
4043
- menuItemsDynamicStyle = _props$sideMenu.menuItemsDynamicStyle;
4044
- var update = useWindowSize.update;
4045
- var size = update()[0];
4046
- var bottomNode = function bottomNode(menuItemStyle) {
4047
- if (bottomSection) {
4048
- return bottomSection.map(function (item) {
4049
- return MenuItem({
4050
- item: item,
4051
- menuItemStyle: menuItemStyle
4052
- });
4053
- });
4054
- }
4055
- };
4056
- return jsxs("aside", {
4057
- className: " quix_side_menu ",
4058
- style: _objectSpread2({
4059
- position: 'absolute',
4060
- left: size.width < 450 ? 8 : (_sideMenuStyle$left = sideMenuStyle === null || sideMenuStyle === void 0 ? void 0 : sideMenuStyle.left) !== null && _sideMenuStyle$left !== void 0 ? _sideMenuStyle$left : 0,
4061
- bottom: size.width < 450 ? Number((_menuItemStyle$width$ = menuItemStyle === null || menuItemStyle === void 0 || (_menuItemStyle$width = menuItemStyle.width) === null || _menuItemStyle$width === void 0 ? void 0 : _menuItemStyle$width.mobile) !== null && _menuItemStyle$width$ !== void 0 ? _menuItemStyle$width$ : 48) / 2 : (_sideMenuStyle$bottom = sideMenuStyle === null || sideMenuStyle === void 0 ? void 0 : sideMenuStyle.bottom) !== null && _sideMenuStyle$bottom !== void 0 ? _sideMenuStyle$bottom : 0,
4062
- width: size.width < 450 ? '100%' : size.width > 450 && size.width < 850 ? width.tablet : size.width >= 850 ? width.desktop : 300,
4063
- top: size.width < 450 ? 'none' : (_props$top = props === null || props === void 0 ? void 0 : props.top) !== null && _props$top !== void 0 ? _props$top : 80,
4064
- height: size.width < 450 ? menuItemStyle === null || menuItemStyle === void 0 || (_menuItemStyle$width2 = menuItemStyle.width) === null || _menuItemStyle$width2 === void 0 ? void 0 : _menuItemStyle$width2.mobile : '90%',
4065
- // height: 48,
4066
- zIndex: 99
4067
- }, sideMenuStyle),
4068
- children: [menuItems && menuItems.map(function (item) {
4069
- return MenuItem({
4070
- item: item,
4071
- ElementType: ElementType,
4072
- menuItemsDynamicStyle: menuItemsDynamicStyle,
4073
- menuItemStyle: menuItemStyle
4074
- });
4075
- }), size.width > 450 && jsx$1("div", {
4076
- className: " sidemenu_bottom_section ",
4077
- children: jsx$1("div", {
4078
- className: " items ",
4079
- children: bottomNode(menuItemStyle)
4080
- })
4081
- })]
4082
- });
4083
- }
4084
- function MenuItem(_ref) {
4085
- var _menuItemsDynamicStyl, _menuItemsDynamicStyl2, _menuItemsDynamicStyl3, _menuItemsDynamicStyl4, _menuItemsDynamicStyl5, _menuItemsDynamicStyl6, _menuItemStyle$style, _menuItemStyle$style2, _menuItemStyle$width3, _menuItemStyle$width4, _menuItemStyle$width5;
4086
- var item = _ref.item,
4087
- ElementType = _ref.ElementType,
4088
- menuItemsDynamicStyle = _ref.menuItemsDynamicStyle,
4089
- menuItemStyle = _ref.menuItemStyle;
4090
- var update = useWindowSize.update;
4091
- var size = update()[0];
4092
- var windowWidth = size.width;
4093
- var MenuItemElement = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n background-color:", ";\n color:", ";\n\n &:hover{\n background-color:", ";\n color:", "\n }\n "])), (_menuItemsDynamicStyl = menuItemsDynamicStyle === null || menuItemsDynamicStyle === void 0 ? void 0 : menuItemsDynamicStyle.backgroundColor) !== null && _menuItemsDynamicStyl !== void 0 ? _menuItemsDynamicStyl : '#d4d4d480', (_menuItemsDynamicStyl2 = menuItemsDynamicStyle === null || menuItemsDynamicStyle === void 0 ? void 0 : menuItemsDynamicStyle.textColor) !== null && _menuItemsDynamicStyl2 !== void 0 ? _menuItemsDynamicStyl2 : "#121212", (_menuItemsDynamicStyl3 = menuItemsDynamicStyle === null || menuItemsDynamicStyle === void 0 || (_menuItemsDynamicStyl4 = menuItemsDynamicStyle.activeColor) === null || _menuItemsDynamicStyl4 === void 0 ? void 0 : _menuItemsDynamicStyl4.background) !== null && _menuItemsDynamicStyl3 !== void 0 ? _menuItemsDynamicStyl3 : '#d4d4d4', (_menuItemsDynamicStyl5 = menuItemsDynamicStyle === null || menuItemsDynamicStyle === void 0 || (_menuItemsDynamicStyl6 = menuItemsDynamicStyle.activeColor) === null || _menuItemsDynamicStyl6 === void 0 ? void 0 : _menuItemsDynamicStyl6.text) !== null && _menuItemsDynamicStyl5 !== void 0 ? _menuItemsDynamicStyl5 : "#121212");
4094
- var navigate = function navigate(route) {
4095
- window.location.replace(route);
4096
- };
4097
- var Element = function Element(_ref2) {
4098
- var children = _ref2.children;
4099
- return ElementType === 'NavLink' ? jsx$1(NavLink, {
4100
- style: {
4101
- width: "100%"
4102
- },
4103
- to: item.route,
4104
- children: children
4105
- }, item.label) : ElementType === 'Link' ? jsx$1(Link, {
4106
- style: {
4107
- width: "100%"
4108
- },
4109
- to: item.route,
4110
- children: children
4111
- }, item.label) : ElementType === 'a' ? jsx$1("a", {
4112
- style: {
4113
- width: "100%",
4114
- textDecoration: 'none'
4115
- },
4116
- href: item.route,
4117
- children: children
4118
- }, item.label) : jsx$1("div", {
4119
- style: {
4120
- width: "100%"
4121
- },
4122
- onClick: function onClick() {
4123
- navigate(item.route);
4124
- },
4125
- children: children
4126
- }, item.label);
4127
- };
4128
- return jsx$1(Element, {
4129
- children: jsx$1("div", {
4130
- style: {
4131
- padding: windowWidth > 850 ? 10 : 6,
4132
- width: '100%'
4133
- },
4134
- children: jsxs(MenuItemElement, {
4135
- className: ' ',
4136
- style: _objectSpread2({
4137
- transition: '0.2s all',
4138
- justifyContent: windowWidth > 850 ? menuItemStyle === null || menuItemStyle === void 0 || (_menuItemStyle$style = menuItemStyle.style) === null || _menuItemStyle$style === void 0 ? void 0 : _menuItemStyle$style.justifyContent : 'center',
4139
- borderRadius: windowWidth > 850 ? menuItemStyle === null || menuItemStyle === void 0 || (_menuItemStyle$style2 = menuItemStyle.style) === null || _menuItemStyle$style2 === void 0 ? void 0 : _menuItemStyle$style2.borderRadius : 2,
4140
- width: windowWidth <= 450 ? menuItemStyle === null || menuItemStyle === void 0 || (_menuItemStyle$width3 = menuItemStyle.width) === null || _menuItemStyle$width3 === void 0 ? void 0 : _menuItemStyle$width3.mobile : windowWidth > 450 ? menuItemStyle === null || menuItemStyle === void 0 || (_menuItemStyle$width4 = menuItemStyle.width) === null || _menuItemStyle$width4 === void 0 ? void 0 : _menuItemStyle$width4.tablet : windowWidth >= 850 ? menuItemStyle === null || menuItemStyle === void 0 || (_menuItemStyle$width5 = menuItemStyle.width) === null || _menuItemStyle$width5 === void 0 ? void 0 : _menuItemStyle$width5.desktop : 300
4141
- }, menuItemStyle === null || menuItemStyle === void 0 ? void 0 : menuItemStyle.style),
4142
- children: [item.icon && item.icon.position === 'left' && item.icon.component, windowWidth > 850 && jsx$1("p", {
4143
- className: " quix_menuItem_label ",
4144
- style: {
4145
- paddingInline: 10,
4146
- paddingBlock: 8
4147
- },
4148
- children: item === null || item === void 0 ? void 0 : item.label
4149
- }), item.icon && item.icon.position === 'right' && item.icon.component]
4150
- })
4151
- }, item.label)
4152
- });
4153
- }
4154
4119
 
4155
4120
  export { Buttons, FlexView, Layout };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "quix-ui",
3
- "version": "1.2.5",
3
+ "version": "1.2.7",
4
4
  "description": "This is a react component library.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -55,6 +55,7 @@
55
55
  "@eslint/js": "^9.39.2",
56
56
  "@figma/eslint-plugin-figma-plugins": "^1.0.0",
57
57
  "@figma/plugin-typings": "^1.122.0",
58
+ "@mantine/hooks": "^8.3.13",
58
59
  "@rollup/plugin-babel": "^6.1.0",
59
60
  "@rollup/plugin-commonjs": "^29.0.0",
60
61
  "@rollup/plugin-node-resolve": "^16.0.3",
@@ -70,6 +71,7 @@
70
71
  "axios": "^1.13.2",
71
72
  "babel-loader": "^10.0.0",
72
73
  "eslint": "^9.39.2",
74
+ "fs": "^0.0.1-security",
73
75
  "globals": "^17.0.0",
74
76
  "husky": "^9.1.7",
75
77
  "jest": "^30.2.0",
@@ -90,10 +92,7 @@
90
92
  "typescript-eslint": "^8.53.0"
91
93
  },
92
94
  "peerDependencies": {
93
- "react": "^18",
94
- "react-dom": "^18"
95
- },
96
- "dependencies": {
97
- "fs": "^0.0.1-security"
95
+ "react": "^16",
96
+ "react-dom": "^16"
98
97
  }
99
98
  }