quix-ui 1.2.6 → 1.2.9

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.
Files changed (2) hide show
  1. package/dist/index.js +6 -29
  2. package/package.json +5 -7
package/dist/index.js CHANGED
@@ -1,6 +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, useEffect, useState, useCallback } from 'react';
3
+ import { forwardRef, useContext } from 'react';
4
+ import { useViewportSize } from '@mantine/hooks';
4
5
 
5
6
  function _defineProperty(e, r, t) {
6
7
  return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
@@ -3935,30 +3936,6 @@ keyframes`
3935
3936
  }
3936
3937
  `;
3937
3938
 
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
- }
3961
-
3962
3939
  var _templateObject, _templateObject2, _templateObject3;
3963
3940
  function Layout(props) {
3964
3941
  var _header$height, _header$height2, _sideMenu$width$table, _sideMenu$width, _sideMenu$width$deskt, _sideMenu$width2, _sideMenu$width$deskt2, _sideMenu$width3;
@@ -4017,10 +3994,10 @@ function Layout(props) {
4017
3994
  children: bottomNode(menuItemStyle)
4018
3995
  })
4019
3996
  })]
4020
- });
3997
+ }, 'aside');
4021
3998
  }
4022
3999
  function MenuItem(_ref) {
4023
- var _menuItemsDynamicStyl, _menuItemsDynamicStyl2, _menuItemsDynamicStyl3, _menuItemsDynamicStyl4, _menuItemsDynamicStyl5, _menuItemsDynamicStyl6, _menuItemStyle$style, _menuItemStyle$style2, _menuItemStyle$width3, _menuItemStyle$width4, _menuItemStyle$width5;
4000
+ var _menuItemsDynamicStyl, _menuItemsDynamicStyl2, _menuItemsDynamicStyl3, _menuItemsDynamicStyl4, _menuItemsDynamicStyl5, _menuItemsDynamicStyl6, _menuItemStyle$style, _menuItemStyle$style2, _menuItemStyle$width3, _menuItemStyle$width4, _menuItemStyle$width5, _menuItemStyle$width6;
4024
4001
  var item = _ref.item,
4025
4002
  ElementType = _ref.ElementType,
4026
4003
  menuItemsDynamicStyle = _ref.menuItemsDynamicStyle,
@@ -4073,7 +4050,7 @@ function Layout(props) {
4073
4050
  transition: '0.2s all',
4074
4051
  justifyContent: windowWidth > 850 ? menuItemStyle === null || menuItemStyle === void 0 || (_menuItemStyle$style = menuItemStyle.style) === null || _menuItemStyle$style === void 0 ? void 0 : _menuItemStyle$style.justifyContent : 'center',
4075
4052
  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
4053
+ 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 : menuItemStyle === null || menuItemStyle === void 0 || (_menuItemStyle$width6 = menuItemStyle.width) === null || _menuItemStyle$width6 === void 0 ? void 0 : _menuItemStyle$width6.desktop
4077
4054
  }, menuItemStyle === null || menuItemStyle === void 0 ? void 0 : menuItemStyle.style),
4078
4055
  children: [item.icon && item.icon.position === 'left' && item.icon.component, windowWidth > 850 && jsx$1("p", {
4079
4056
  className: " quix_menuItem_label ",
@@ -4085,7 +4062,7 @@ function Layout(props) {
4085
4062
  }), item.icon && item.icon.position === 'right' && item.icon.component]
4086
4063
  })
4087
4064
  }, item.label)
4088
- });
4065
+ }, item.label);
4089
4066
  }
4090
4067
  // 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))
4091
4068
  return jsxs(LayoutSection, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "quix-ui",
3
- "version": "1.2.6",
3
+ "version": "1.2.9",
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,11 +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
- "@mantine/hooks": "^8.3.13",
98
- "fs": "^0.0.1-security"
95
+ "react": "^16",
96
+ "react-dom": "^16"
99
97
  }
100
98
  }