@xylabs/react-select 6.2.18 → 6.3.0
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/browser/index.mjs +15 -19
- package/dist/browser/index.mjs.map +1 -1
- package/package.json +6 -6
package/dist/browser/index.mjs
CHANGED
|
@@ -1,26 +1,22 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
-
|
|
4
1
|
// src/components/SelectEx.tsx
|
|
5
2
|
import { Select, useTheme } from "@mui/material";
|
|
6
|
-
import
|
|
7
|
-
var SelectEx =
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
var SelectEx = ({
|
|
5
|
+
MenuProps,
|
|
6
|
+
mode = "light",
|
|
7
|
+
colorize,
|
|
8
|
+
...props
|
|
9
|
+
}) => {
|
|
8
10
|
const theme = useTheme();
|
|
9
|
-
const colorizeMenuProps = colorize ? {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
11
|
+
const colorizeMenuProps = colorize ? { MenuListProps: { sx: { backgroundColor: theme.palette[colorize][mode] } } } : {};
|
|
12
|
+
return /* @__PURE__ */ jsx(
|
|
13
|
+
Select,
|
|
14
|
+
{
|
|
15
|
+
MenuProps: { ...MenuProps, ...colorizeMenuProps },
|
|
16
|
+
...props
|
|
14
17
|
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
MenuProps: {
|
|
18
|
-
...MenuProps,
|
|
19
|
-
...colorizeMenuProps
|
|
20
|
-
},
|
|
21
|
-
...props
|
|
22
|
-
});
|
|
23
|
-
}, "SelectEx");
|
|
18
|
+
);
|
|
19
|
+
};
|
|
24
20
|
export {
|
|
25
21
|
SelectEx
|
|
26
22
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/SelectEx.tsx"],"sourcesContent":["import type { PaletteMode, SelectProps } from '@mui/material'\nimport { Select, useTheme } from '@mui/material'\nimport React from 'react'\n\nexport type SelectExProps<T> = SelectProps<T> & {\n colorize?: 'primary' | 'secondary'\n mode?: PaletteMode\n}\n\nexport const SelectEx: <T>(props: SelectExProps<T>) => React.JSX.Element = ({\n MenuProps, mode = 'light', colorize, ...props\n}) => {\n const theme = useTheme()\n const colorizeMenuProps = colorize ? { MenuListProps: { sx: { backgroundColor: theme.palette[colorize][mode] } } } : {}\n\n return (\n <Select\n MenuProps={{ ...MenuProps, ...colorizeMenuProps }}\n {...props}\n />\n )\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/components/SelectEx.tsx"],"sourcesContent":["import type { PaletteMode, SelectProps } from '@mui/material'\nimport { Select, useTheme } from '@mui/material'\nimport React from 'react'\n\nexport type SelectExProps<T> = SelectProps<T> & {\n colorize?: 'primary' | 'secondary'\n mode?: PaletteMode\n}\n\nexport const SelectEx: <T>(props: SelectExProps<T>) => React.JSX.Element = ({\n MenuProps, mode = 'light', colorize, ...props\n}) => {\n const theme = useTheme()\n const colorizeMenuProps = colorize ? { MenuListProps: { sx: { backgroundColor: theme.palette[colorize][mode] } } } : {}\n\n return (\n <Select\n MenuProps={{ ...MenuProps, ...colorizeMenuProps }}\n {...props}\n />\n )\n}\n"],"mappings":";AACA,SAAS,QAAQ,gBAAgB;AAe7B;AAPG,IAAM,WAA8D,CAAC;AAAA,EAC1E;AAAA,EAAW,OAAO;AAAA,EAAS;AAAA,EAAU,GAAG;AAC1C,MAAM;AACJ,QAAM,QAAQ,SAAS;AACvB,QAAM,oBAAoB,WAAW,EAAE,eAAe,EAAE,IAAI,EAAE,iBAAiB,MAAM,QAAQ,QAAQ,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,CAAC;AAEtH,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW,EAAE,GAAG,WAAW,GAAG,kBAAkB;AAAA,MAC/C,GAAG;AAAA;AAAA,EACN;AAEJ;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xylabs/react-select",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.3.0",
|
|
4
4
|
"description": "Common React library for all XY Labs projects that use React",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"utility",
|
|
@@ -37,11 +37,11 @@
|
|
|
37
37
|
"packages/*"
|
|
38
38
|
],
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@mui/material": "^7.0
|
|
41
|
-
"@types/react": "^19.1.
|
|
42
|
-
"@xylabs/ts-scripts-yarn3": "^6.
|
|
43
|
-
"@xylabs/tsconfig-react": "^6.
|
|
44
|
-
"knip": "^5.
|
|
40
|
+
"@mui/material": "^7.1.0",
|
|
41
|
+
"@types/react": "^19.1.4",
|
|
42
|
+
"@xylabs/ts-scripts-yarn3": "^6.5.5",
|
|
43
|
+
"@xylabs/tsconfig-react": "^6.5.5",
|
|
44
|
+
"knip": "^5.55.1",
|
|
45
45
|
"react": "^19.1.0",
|
|
46
46
|
"react-dom": "^19.1.0",
|
|
47
47
|
"typescript": "^5.8.3"
|