@etsoo/materialui 1.1.77 → 1.1.79

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,13 +1,17 @@
1
1
  /// <reference types="react" />
2
- import { ButtonProps } from '@mui/material';
2
+ import { ButtonProps } from "@mui/material";
3
3
  /**
4
4
  * ButtonLink props
5
5
  */
6
- export type ButtonLinkProps = Omit<ButtonProps, 'href' | 'onClick'> & {
6
+ export type ButtonLinkProps = Omit<ButtonProps, "href" | "onClick"> & {
7
7
  /**
8
8
  * To href
9
9
  */
10
10
  href: string;
11
+ /**
12
+ * Link state
13
+ */
14
+ state?: any;
11
15
  };
12
16
  /**
13
17
  * ButtonLink
package/lib/ButtonLink.js CHANGED
@@ -1,6 +1,6 @@
1
- import { Button } from '@mui/material';
2
- import React from 'react';
3
- import { useNavigate } from 'react-router-dom';
1
+ import { Button } from "@mui/material";
2
+ import React from "react";
3
+ import { useNavigate } from "react-router-dom";
4
4
  /**
5
5
  * ButtonLink
6
6
  * @param props Props
@@ -8,12 +8,12 @@ import { useNavigate } from 'react-router-dom';
8
8
  */
9
9
  export function ButtonLink(props) {
10
10
  // Destruct
11
- const { href, ...rest } = props;
11
+ const { href, state, ...rest } = props;
12
12
  // Navigate
13
13
  const navigate = useNavigate();
14
- const onClick = href.includes('://')
15
- ? () => window.open(href, '_blank')
16
- : () => navigate(href);
14
+ const onClick = href.includes("://")
15
+ ? () => window.open(href, "_blank")
16
+ : () => navigate(href, { state });
17
17
  // Layout
18
18
  return React.createElement(Button, { ...rest, onClick: onClick });
19
19
  }
package/lib/SearchBar.js CHANGED
@@ -224,12 +224,7 @@ export function SearchBar(props) {
224
224
  if (form)
225
225
  state.form = form;
226
226
  } },
227
- React.createElement(Stack, { ref: dimensions[0][0], className: "SearchBarContainer", justifyContent: "center", alignItems: "center", direction: "row", spacing: 1, width: "100%", sx: {
228
- scrollbarWidth: 0,
229
- "-ms-overflow-style": "none",
230
- "&::-webkit-scrollbar": {
231
- display: "none"
232
- },
227
+ React.createElement(Stack, { ref: dimensions[0][0], className: "SearchBarContainer", justifyContent: "center", alignItems: "center", direction: "row", spacing: 1, width: "100%", overflow: "hidden", paddingTop: "6px", sx: {
233
228
  "& > :not(style)": {
234
229
  flexBasis: "auto",
235
230
  flexGrow: 0,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/materialui",
3
- "version": "1.1.77",
3
+ "version": "1.1.79",
4
4
  "description": "TypeScript Material-UI Implementation",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -55,11 +55,11 @@
55
55
  "@etsoo/react": "^1.6.56",
56
56
  "@etsoo/shared": "^1.1.93",
57
57
  "@mui/icons-material": "^5.11.11",
58
- "@mui/material": "^5.11.14",
58
+ "@mui/material": "^5.11.15",
59
59
  "@mui/x-data-grid": "^6.0.3",
60
60
  "@types/pica": "^9.0.1",
61
61
  "@types/pulltorefreshjs": "^0.1.5",
62
- "@types/react": "^18.0.29",
62
+ "@types/react": "^18.0.31",
63
63
  "@types/react-avatar-editor": "^13.0.0",
64
64
  "@types/react-dom": "^18.0.11",
65
65
  "@types/react-input-mask": "^3.0.2",
@@ -85,8 +85,8 @@
85
85
  "@testing-library/jest-dom": "^5.16.5",
86
86
  "@testing-library/react": "^14.0.0",
87
87
  "@types/jest": "^29.5.0",
88
- "@typescript-eslint/eslint-plugin": "^5.56.0",
89
- "@typescript-eslint/parser": "^5.56.0",
88
+ "@typescript-eslint/eslint-plugin": "^5.57.0",
89
+ "@typescript-eslint/parser": "^5.57.0",
90
90
  "jest": "^29.5.0",
91
91
  "jest-environment-jsdom": "^29.5.0",
92
92
  "typescript": "^5.0.2"
@@ -1,14 +1,19 @@
1
- import { Button, ButtonProps } from '@mui/material';
2
- import React from 'react';
3
- import { useNavigate } from 'react-router-dom';
1
+ import { Button, ButtonProps } from "@mui/material";
2
+ import React from "react";
3
+ import { useNavigate } from "react-router-dom";
4
4
  /**
5
5
  * ButtonLink props
6
6
  */
7
- export type ButtonLinkProps = Omit<ButtonProps, 'href' | 'onClick'> & {
8
- /**
9
- * To href
10
- */
11
- href: string;
7
+ export type ButtonLinkProps = Omit<ButtonProps, "href" | "onClick"> & {
8
+ /**
9
+ * To href
10
+ */
11
+ href: string;
12
+
13
+ /**
14
+ * Link state
15
+ */
16
+ state?: any;
12
17
  };
13
18
 
14
19
  /**
@@ -17,16 +22,16 @@ export type ButtonLinkProps = Omit<ButtonProps, 'href' | 'onClick'> & {
17
22
  * @returns Component
18
23
  */
19
24
  export function ButtonLink(props: ButtonLinkProps) {
20
- // Destruct
21
- const { href, ...rest } = props;
25
+ // Destruct
26
+ const { href, state, ...rest } = props;
22
27
 
23
- // Navigate
24
- const navigate = useNavigate();
28
+ // Navigate
29
+ const navigate = useNavigate();
25
30
 
26
- const onClick = href.includes('://')
27
- ? () => window.open(href, '_blank')
28
- : () => navigate(href);
31
+ const onClick = href.includes("://")
32
+ ? () => window.open(href, "_blank")
33
+ : () => navigate(href, { state });
29
34
 
30
- // Layout
31
- return <Button {...rest} onClick={onClick} />;
35
+ // Layout
36
+ return <Button {...rest} onClick={onClick} />;
32
37
  }
package/src/SearchBar.tsx CHANGED
@@ -313,12 +313,9 @@ export function SearchBar(props: SearchBarProps) {
313
313
  direction="row"
314
314
  spacing={1}
315
315
  width="100%"
316
+ overflow="hidden"
317
+ paddingTop="6px"
316
318
  sx={{
317
- scrollbarWidth: 0,
318
- "-ms-overflow-style": "none",
319
- "&::-webkit-scrollbar": {
320
- display: "none"
321
- },
322
319
  "& > :not(style)": {
323
320
  flexBasis: "auto",
324
321
  flexGrow: 0,