@xylabs/react-select 3.0.1 → 3.0.3

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.
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/components/SelectEx.tsx
21
+ var SelectEx_exports = {};
22
+ __export(SelectEx_exports, {
23
+ SelectEx: () => SelectEx
24
+ });
25
+ module.exports = __toCommonJS(SelectEx_exports);
26
+ var import_material = require("@mui/material");
27
+ var import_lodash = require("@xylabs/lodash");
28
+ var import_jsx_runtime = require("react/jsx-runtime");
29
+ var SelectEx = ({ MenuProps, mode = "light", colorize, ...props }) => {
30
+ const theme = (0, import_material.useTheme)();
31
+ const colorizeMenuProps = colorize ? { MenuListProps: { sx: { backgroundColor: theme.palette[colorize][mode] } } } : {};
32
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Select, { MenuProps: (0, import_lodash.merge)(MenuProps, colorizeMenuProps), ...props });
33
+ };
34
+ //# sourceMappingURL=SelectEx.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/SelectEx.tsx"],"sourcesContent":["import { PaletteMode, Select, SelectProps, useTheme } from '@mui/material'\nimport { merge } from '@xylabs/lodash'\nimport React from 'react'\n\nexport interface SelectExProps<T> extends SelectProps<T> {\n colorize?: 'primary' | 'secondary'\n mode?: PaletteMode\n}\n\nexport const SelectEx: <T>(props: SelectExProps<T>) => React.JSX.Element = ({ MenuProps, mode = 'light', colorize, ...props }) => {\n const theme = useTheme()\n const colorizeMenuProps = colorize ? { MenuListProps: { sx: { backgroundColor: theme.palette[colorize][mode] } } } : {}\n\n return <Select MenuProps={merge(MenuProps, colorizeMenuProps)} {...props} />\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAA2D;AAC3D,oBAAsB;AAYb;AAJF,IAAM,WAA8D,CAAC,EAAE,WAAW,OAAO,SAAS,UAAU,GAAG,MAAM,MAAM;AAChI,QAAM,YAAQ,0BAAS;AACvB,QAAM,oBAAoB,WAAW,EAAE,eAAe,EAAE,IAAI,EAAE,iBAAiB,MAAM,QAAQ,QAAQ,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,CAAC;AAEtH,SAAO,4CAAC,0BAAO,eAAW,qBAAM,WAAW,iBAAiB,GAAI,GAAG,OAAO;AAC5E;","names":[]}
@@ -1,7 +1,8 @@
1
- import { jsx } from "react/jsx-runtime";
1
+ // src/components/SelectEx.tsx
2
2
  import { Select, useTheme } from "@mui/material";
3
3
  import { merge } from "@xylabs/lodash";
4
- const SelectEx = ({ MenuProps, mode = "light", colorize, ...props }) => {
4
+ import { jsx } from "react/jsx-runtime";
5
+ var SelectEx = ({ MenuProps, mode = "light", colorize, ...props }) => {
5
6
  const theme = useTheme();
6
7
  const colorizeMenuProps = colorize ? { MenuListProps: { sx: { backgroundColor: theme.palette[colorize][mode] } } } : {};
7
8
  return /* @__PURE__ */ jsx(Select, { MenuProps: merge(MenuProps, colorizeMenuProps), ...props });
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/SelectEx.tsx"],"sourcesContent":["import { PaletteMode, Select, SelectProps, useTheme } from '@mui/material'\nimport { merge } from '@xylabs/lodash'\nimport React from 'react'\n\nexport interface SelectExProps<T> extends SelectProps<T> {\n colorize?: 'primary' | 'secondary'\n mode?: PaletteMode\n}\n\nexport const SelectEx: <T>(props: SelectExProps<T>) => React.JSX.Element = ({ MenuProps, mode = 'light', colorize, ...props }) => {\n const theme = useTheme()\n const colorizeMenuProps = colorize ? { MenuListProps: { sx: { backgroundColor: theme.palette[colorize][mode] } } } : {}\n\n return <Select MenuProps={merge(MenuProps, colorizeMenuProps)} {...props} />\n}\n"],"mappings":"AAaS;AAbT,SAAsB,QAAqB,gBAAgB;AAC3D,SAAS,aAAa;AAQf,MAAM,WAA8D,CAAC,EAAE,WAAW,OAAO,SAAS,UAAU,GAAG,MAAM,MAAM;AAChI,QAAM,QAAQ,SAAS;AACvB,QAAM,oBAAoB,WAAW,EAAE,eAAe,EAAE,IAAI,EAAE,iBAAiB,MAAM,QAAQ,QAAQ,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,CAAC;AAEtH,SAAO,oBAAC,UAAO,WAAW,MAAM,WAAW,iBAAiB,GAAI,GAAG,OAAO;AAC5E;","names":[]}
1
+ {"version":3,"sources":["../../../src/components/SelectEx.tsx"],"sourcesContent":["import { PaletteMode, Select, SelectProps, useTheme } from '@mui/material'\nimport { merge } from '@xylabs/lodash'\nimport React from 'react'\n\nexport interface SelectExProps<T> extends SelectProps<T> {\n colorize?: 'primary' | 'secondary'\n mode?: PaletteMode\n}\n\nexport const SelectEx: <T>(props: SelectExProps<T>) => React.JSX.Element = ({ MenuProps, mode = 'light', colorize, ...props }) => {\n const theme = useTheme()\n const colorizeMenuProps = colorize ? { MenuListProps: { sx: { backgroundColor: theme.palette[colorize][mode] } } } : {}\n\n return <Select MenuProps={merge(MenuProps, colorizeMenuProps)} {...props} />\n}\n"],"mappings":";AAAA,SAAsB,QAAqB,gBAAgB;AAC3D,SAAS,aAAa;AAYb;AAJF,IAAM,WAA8D,CAAC,EAAE,WAAW,OAAO,SAAS,UAAU,GAAG,MAAM,MAAM;AAChI,QAAM,QAAQ,SAAS;AACvB,QAAM,oBAAoB,WAAW,EAAE,eAAe,EAAE,IAAI,EAAE,iBAAiB,MAAM,QAAQ,QAAQ,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,CAAC;AAEtH,SAAO,oBAAC,UAAO,WAAW,MAAM,WAAW,iBAAiB,GAAI,GAAG,OAAO;AAC5E;","names":[]}
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/components/index.ts
21
+ var components_exports = {};
22
+ __export(components_exports, {
23
+ SelectEx: () => SelectEx
24
+ });
25
+ module.exports = __toCommonJS(components_exports);
26
+
27
+ // src/components/SelectEx.tsx
28
+ var import_material = require("@mui/material");
29
+ var import_lodash = require("@xylabs/lodash");
30
+ var import_jsx_runtime = require("react/jsx-runtime");
31
+ var SelectEx = ({ MenuProps, mode = "light", colorize, ...props }) => {
32
+ const theme = (0, import_material.useTheme)();
33
+ const colorizeMenuProps = colorize ? { MenuListProps: { sx: { backgroundColor: theme.palette[colorize][mode] } } } : {};
34
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Select, { MenuProps: (0, import_lodash.merge)(MenuProps, colorizeMenuProps), ...props });
35
+ };
36
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/index.ts","../../../src/components/SelectEx.tsx"],"sourcesContent":["export * from './SelectEx'\n","import { PaletteMode, Select, SelectProps, useTheme } from '@mui/material'\nimport { merge } from '@xylabs/lodash'\nimport React from 'react'\n\nexport interface SelectExProps<T> extends SelectProps<T> {\n colorize?: 'primary' | 'secondary'\n mode?: PaletteMode\n}\n\nexport const SelectEx: <T>(props: SelectExProps<T>) => React.JSX.Element = ({ MenuProps, mode = 'light', colorize, ...props }) => {\n const theme = useTheme()\n const colorizeMenuProps = colorize ? { MenuListProps: { sx: { backgroundColor: theme.palette[colorize][mode] } } } : {}\n\n return <Select MenuProps={merge(MenuProps, colorizeMenuProps)} {...props} />\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,sBAA2D;AAC3D,oBAAsB;AAYb;AAJF,IAAM,WAA8D,CAAC,EAAE,WAAW,OAAO,SAAS,UAAU,GAAG,MAAM,MAAM;AAChI,QAAM,YAAQ,0BAAS;AACvB,QAAM,oBAAoB,WAAW,EAAE,eAAe,EAAE,IAAI,EAAE,iBAAiB,MAAM,QAAQ,QAAQ,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,CAAC;AAEtH,SAAO,4CAAC,0BAAO,eAAW,qBAAM,WAAW,iBAAiB,GAAI,GAAG,OAAO;AAC5E;","names":[]}
@@ -1,2 +1,13 @@
1
- export * from "./SelectEx";
1
+ // src/components/SelectEx.tsx
2
+ import { Select, useTheme } from "@mui/material";
3
+ import { merge } from "@xylabs/lodash";
4
+ import { jsx } from "react/jsx-runtime";
5
+ var SelectEx = ({ MenuProps, mode = "light", colorize, ...props }) => {
6
+ const theme = useTheme();
7
+ const colorizeMenuProps = colorize ? { MenuListProps: { sx: { backgroundColor: theme.palette[colorize][mode] } } } : {};
8
+ return /* @__PURE__ */ jsx(Select, { MenuProps: merge(MenuProps, colorizeMenuProps), ...props });
9
+ };
10
+ export {
11
+ SelectEx
12
+ };
2
13
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/index.ts"],"sourcesContent":["export * from './SelectEx'\n"],"mappings":"AAAA,cAAc;","names":[]}
1
+ {"version":3,"sources":["../../../src/components/SelectEx.tsx"],"sourcesContent":["import { PaletteMode, Select, SelectProps, useTheme } from '@mui/material'\nimport { merge } from '@xylabs/lodash'\nimport React from 'react'\n\nexport interface SelectExProps<T> extends SelectProps<T> {\n colorize?: 'primary' | 'secondary'\n mode?: PaletteMode\n}\n\nexport const SelectEx: <T>(props: SelectExProps<T>) => React.JSX.Element = ({ MenuProps, mode = 'light', colorize, ...props }) => {\n const theme = useTheme()\n const colorizeMenuProps = colorize ? { MenuListProps: { sx: { backgroundColor: theme.palette[colorize][mode] } } } : {}\n\n return <Select MenuProps={merge(MenuProps, colorizeMenuProps)} {...props} />\n}\n"],"mappings":";AAAA,SAAsB,QAAqB,gBAAgB;AAC3D,SAAS,aAAa;AAYb;AAJF,IAAM,WAA8D,CAAC,EAAE,WAAW,OAAO,SAAS,UAAU,GAAG,MAAM,MAAM;AAChI,QAAM,QAAQ,SAAS;AACvB,QAAM,oBAAoB,WAAW,EAAE,eAAe,EAAE,IAAI,EAAE,iBAAiB,MAAM,QAAQ,QAAQ,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,CAAC;AAEtH,SAAO,oBAAC,UAAO,WAAW,MAAM,WAAW,iBAAiB,GAAI,GAAG,OAAO;AAC5E;","names":[]}
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/index.ts
21
+ var src_exports = {};
22
+ __export(src_exports, {
23
+ SelectEx: () => SelectEx
24
+ });
25
+ module.exports = __toCommonJS(src_exports);
26
+
27
+ // src/components/SelectEx.tsx
28
+ var import_material = require("@mui/material");
29
+ var import_lodash = require("@xylabs/lodash");
30
+ var import_jsx_runtime = require("react/jsx-runtime");
31
+ var SelectEx = ({ MenuProps, mode = "light", colorize, ...props }) => {
32
+ const theme = (0, import_material.useTheme)();
33
+ const colorizeMenuProps = colorize ? { MenuListProps: { sx: { backgroundColor: theme.palette[colorize][mode] } } } : {};
34
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Select, { MenuProps: (0, import_lodash.merge)(MenuProps, colorizeMenuProps), ...props });
35
+ };
36
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/index.ts","../../src/components/SelectEx.tsx"],"sourcesContent":["export * from './components'\n","import { PaletteMode, Select, SelectProps, useTheme } from '@mui/material'\nimport { merge } from '@xylabs/lodash'\nimport React from 'react'\n\nexport interface SelectExProps<T> extends SelectProps<T> {\n colorize?: 'primary' | 'secondary'\n mode?: PaletteMode\n}\n\nexport const SelectEx: <T>(props: SelectExProps<T>) => React.JSX.Element = ({ MenuProps, mode = 'light', colorize, ...props }) => {\n const theme = useTheme()\n const colorizeMenuProps = colorize ? { MenuListProps: { sx: { backgroundColor: theme.palette[colorize][mode] } } } : {}\n\n return <Select MenuProps={merge(MenuProps, colorizeMenuProps)} {...props} />\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,sBAA2D;AAC3D,oBAAsB;AAYb;AAJF,IAAM,WAA8D,CAAC,EAAE,WAAW,OAAO,SAAS,UAAU,GAAG,MAAM,MAAM;AAChI,QAAM,YAAQ,0BAAS;AACvB,QAAM,oBAAoB,WAAW,EAAE,eAAe,EAAE,IAAI,EAAE,iBAAiB,MAAM,QAAQ,QAAQ,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,CAAC;AAEtH,SAAO,4CAAC,0BAAO,eAAW,qBAAM,WAAW,iBAAiB,GAAI,GAAG,OAAO;AAC5E;","names":[]}
@@ -1,2 +1,13 @@
1
- export * from "./components";
1
+ // src/components/SelectEx.tsx
2
+ import { Select, useTheme } from "@mui/material";
3
+ import { merge } from "@xylabs/lodash";
4
+ import { jsx } from "react/jsx-runtime";
5
+ var SelectEx = ({ MenuProps, mode = "light", colorize, ...props }) => {
6
+ const theme = useTheme();
7
+ const colorizeMenuProps = colorize ? { MenuListProps: { sx: { backgroundColor: theme.palette[colorize][mode] } } } : {};
8
+ return /* @__PURE__ */ jsx(Select, { MenuProps: merge(MenuProps, colorizeMenuProps), ...props });
9
+ };
10
+ export {
11
+ SelectEx
12
+ };
2
13
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export * from './components'\n"],"mappings":"AAAA,cAAc;","names":[]}
1
+ {"version":3,"sources":["../../src/components/SelectEx.tsx"],"sourcesContent":["import { PaletteMode, Select, SelectProps, useTheme } from '@mui/material'\nimport { merge } from '@xylabs/lodash'\nimport React from 'react'\n\nexport interface SelectExProps<T> extends SelectProps<T> {\n colorize?: 'primary' | 'secondary'\n mode?: PaletteMode\n}\n\nexport const SelectEx: <T>(props: SelectExProps<T>) => React.JSX.Element = ({ MenuProps, mode = 'light', colorize, ...props }) => {\n const theme = useTheme()\n const colorizeMenuProps = colorize ? { MenuListProps: { sx: { backgroundColor: theme.palette[colorize][mode] } } } : {}\n\n return <Select MenuProps={merge(MenuProps, colorizeMenuProps)} {...props} />\n}\n"],"mappings":";AAAA,SAAsB,QAAqB,gBAAgB;AAC3D,SAAS,aAAa;AAYb;AAJF,IAAM,WAA8D,CAAC,EAAE,WAAW,OAAO,SAAS,UAAU,GAAG,MAAM,MAAM;AAChI,QAAM,QAAQ,SAAS;AACvB,QAAM,oBAAoB,WAAW,EAAE,eAAe,EAAE,IAAI,EAAE,iBAAiB,MAAM,QAAQ,QAAQ,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,CAAC;AAEtH,SAAO,oBAAC,UAAO,WAAW,MAAM,WAAW,iBAAiB,GAAI,GAAG,OAAO;AAC5E;","names":[]}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=images.d.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
package/package.json CHANGED
@@ -13,13 +13,13 @@
13
13
  "packages/*"
14
14
  ],
15
15
  "dependencies": {
16
- "@xylabs/lodash": "^2.11.11"
16
+ "@xylabs/lodash": "^2.11.21"
17
17
  },
18
18
  "description": "Common React library for all XY Labs projects that use React",
19
19
  "devDependencies": {
20
- "@mui/material": "^5.14.10",
21
- "@xylabs/ts-scripts-yarn3": "^3.0.55",
22
- "@xylabs/tsconfig-react": "^3.0.55",
20
+ "@mui/material": "^5.14.11",
21
+ "@xylabs/ts-scripts-yarn3": "^3.0.70",
22
+ "@xylabs/tsconfig-react": "^3.0.70",
23
23
  "react": "^18.2.0",
24
24
  "typescript": "^5.2.2"
25
25
  },
@@ -41,18 +41,24 @@
41
41
  }
42
42
  },
43
43
  "browser": {
44
- "types": "./dist/browser/index.d.ts",
45
- "default": "./dist/browser/index.js"
44
+ "import": {
45
+ "types": "./dist/browser/index.d.ts",
46
+ "default": "./dist/browser/index.js"
47
+ },
48
+ "require": {
49
+ "types": "./dist/browser/index.d.ts",
50
+ "default": "./dist/browser/index.cjs"
51
+ }
46
52
  },
47
53
  "default": "./dist/browser/index.js"
48
54
  },
49
- "./dist/docs.json": {
55
+ "./docs": {
50
56
  "default": "./dist/docs.json"
51
57
  },
52
58
  "./package.json": "./package.json"
53
59
  },
54
60
  "types": "dist/browser/index.d.ts",
55
- "main": "./dist/node/index.js",
61
+ "main": "./dist/browser/index.js",
56
62
  "module": "./dist/browser/index.js",
57
63
  "homepage": "https://xylabs.com",
58
64
  "keywords": [
@@ -69,5 +75,5 @@
69
75
  "url": "https://github.com/xylabs/sdk-react.git"
70
76
  },
71
77
  "sideEffects": false,
72
- "version": "3.0.1"
78
+ "version": "3.0.3"
73
79
  }