@xylabs/react-select 2.17.14 → 2.18.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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SelectEx.d.ts","sourceRoot":"","sources":["../../src/components/SelectEx.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAU,WAAW,EAAY,MAAM,eAAe,CAAA;AAE1E,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,MAAM,WAAW,aAAa,CAAC,CAAC,CAAE,SAAQ,WAAW,CAAC,CAAC,CAAC;IACtD,QAAQ,CAAC,EAAE,SAAS,GAAG,WAAW,CAAA;IAClC,IAAI,CAAC,EAAE,WAAW,CAAA;CACnB;AAED,eAAO,MAAM,QAAQ,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,GAAG,CAAC,OAKhE,CAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA"}
@@ -0,0 +1,2 @@
1
+ export * from './components';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA"}
package/dist/index.js ADDED
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/index.ts
31
+ var src_exports = {};
32
+ __export(src_exports, {
33
+ SelectEx: () => SelectEx
34
+ });
35
+ module.exports = __toCommonJS(src_exports);
36
+
37
+ // src/components/SelectEx.tsx
38
+ var import_material = require("@mui/material");
39
+ var import_merge = __toESM(require("lodash/merge"));
40
+ var import_jsx_runtime = require("react/jsx-runtime");
41
+ var SelectEx = ({ MenuProps, mode = "light", colorize, ...props }) => {
42
+ const theme = (0, import_material.useTheme)();
43
+ const colorizeMenuProps = colorize ? { MenuListProps: { sx: { backgroundColor: theme.palette[colorize][mode] } } } : {};
44
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Select, { MenuProps: (0, import_merge.default)(MenuProps, colorizeMenuProps), ...props });
45
+ };
46
+ // Annotate the CommonJS export names for ESM import in node:
47
+ 0 && (module.exports = {
48
+ SelectEx
49
+ });
50
+ //# sourceMappingURL=index.js.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 'lodash/merge'\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,mBAAkB;AAYT;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,aAAAA,SAAM,WAAW,iBAAiB,GAAI,GAAG,OAAO;AAC5E;","names":["merge"]}
package/dist/index.mjs ADDED
@@ -0,0 +1,13 @@
1
+ // src/components/SelectEx.tsx
2
+ import { Select, useTheme } from "@mui/material";
3
+ import merge from "lodash/merge";
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
+ };
13
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/SelectEx.tsx"],"sourcesContent":["import { PaletteMode, Select, SelectProps, useTheme } from '@mui/material'\nimport merge from 'lodash/merge'\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,OAAO,WAAW;AAYT;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":[]}
package/package.json CHANGED
@@ -17,39 +17,49 @@
17
17
  },
18
18
  "description": "Common React library for all XY Labs projects that use React",
19
19
  "devDependencies": {
20
- "@mui/material": "^5.14.4",
21
- "@types/lodash": "^4.14.197",
22
- "@xylabs/ts-scripts-yarn3": "^2.19.0",
23
- "@xylabs/tsconfig-react": "^2.19.0",
20
+ "@mui/material": "^5.14.10",
21
+ "@types/lodash": "^4.14.198",
22
+ "@xylabs/ts-scripts-yarn3": "^3.0.28",
23
+ "@xylabs/tsconfig-react": "^3.0.28",
24
24
  "react": "^18.2.0",
25
- "typescript": "^5.1.6"
25
+ "typescript": "^5.2.2"
26
26
  },
27
27
  "peerDependencies": {
28
28
  "@mui/material": "^5",
29
29
  "react": "^18",
30
30
  "react-dom": "^18"
31
31
  },
32
- "browser": "dist/esm/index.js",
33
- "docs": "dist/docs.json",
34
32
  "exports": {
35
33
  ".": {
36
34
  "node": {
37
- "import": "./dist/esm/index.js",
38
- "require": "./dist/cjs/index.js"
35
+ "import": {
36
+ "types": "./dist/index.d.mts",
37
+ "default": "./dist/index.mjs"
38
+ },
39
+ "require": {
40
+ "types": "./dist/index.d.ts",
41
+ "default": "./dist/index.js"
42
+ }
39
43
  },
40
44
  "browser": {
41
- "import": "./dist/esm/index.js",
42
- "require": "./dist/cjs/index.js"
45
+ "import": {
46
+ "types": "./dist/index.d.mts",
47
+ "default": "./dist/index.mjs"
48
+ },
49
+ "require": {
50
+ "types": "./dist/index.d.ts",
51
+ "default": "./dist/index.js"
52
+ }
43
53
  },
44
- "default": "./dist/esm/index.js"
54
+ "default": "./dist/index.mjs"
45
55
  },
46
56
  "./dist/docs.json": {
47
57
  "default": "./dist/docs.json"
48
58
  },
49
59
  "./package.json": "./package.json"
50
60
  },
51
- "main": "dist/cjs/index.js",
52
- "module": "dist/esm/index.js",
61
+ "main": "dist/index.js",
62
+ "module": "dist/index.mjs",
53
63
  "homepage": "https://xylabs.com",
54
64
  "keywords": [
55
65
  "utility",
@@ -65,6 +75,6 @@
65
75
  "url": "https://github.com/xylabs/sdk-react.git"
66
76
  },
67
77
  "sideEffects": false,
68
- "types": "dist/types/index.d.ts",
69
- "version": "2.17.14"
78
+ "types": "dist/index.d.ts",
79
+ "version": "2.18.0"
70
80
  }
@@ -1,15 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SelectEx = void 0;
4
- const tslib_1 = require("tslib");
5
- const jsx_runtime_1 = require("react/jsx-runtime");
6
- const material_1 = require("@mui/material");
7
- const merge_1 = tslib_1.__importDefault(require("lodash/merge"));
8
- const SelectEx = (_a) => {
9
- var { MenuProps, mode = 'light', colorize } = _a, props = tslib_1.__rest(_a, ["MenuProps", "mode", "colorize"]);
10
- const theme = (0, material_1.useTheme)();
11
- const colorizeMenuProps = colorize ? { MenuListProps: { sx: { backgroundColor: theme.palette[colorize][mode] } } } : {};
12
- return (0, jsx_runtime_1.jsx)(material_1.Select, Object.assign({ MenuProps: (0, merge_1.default)(MenuProps, colorizeMenuProps) }, props));
13
- };
14
- exports.SelectEx = SelectEx;
15
- //# sourceMappingURL=SelectEx.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SelectEx.js","sourceRoot":"","sources":["../../../src/components/SelectEx.tsx"],"names":[],"mappings":";;;;;AAAA,4CAA0E;AAC1E,iEAAgC;AAQzB,MAAM,QAAQ,GAAsD,CAAC,EAAiD,EAAE,EAAE;QAArD,EAAE,SAAS,EAAE,IAAI,GAAG,OAAO,EAAE,QAAQ,OAAY,EAAP,KAAK,sBAA/C,iCAAiD,CAAF;IACzH,MAAM,KAAK,GAAG,IAAA,mBAAQ,GAAE,CAAA;IACxB,MAAM,iBAAiB,GAAG,QAAQ,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,EAAE,EAAE,EAAE,EAAE,eAAe,EAAE,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAA;IAEvH,OAAO,uBAAC,iBAAM,kBAAC,SAAS,EAAE,IAAA,eAAK,EAAC,SAAS,EAAE,iBAAiB,CAAC,IAAM,KAAK,EAAI,CAAA;AAC9E,CAAC,CAAA;AALY,QAAA,QAAQ,YAKpB"}
@@ -1,5 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- tslib_1.__exportStar(require("./SelectEx"), exports);
5
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":";;;AAAA,qDAA0B"}
package/dist/cjs/index.js DELETED
@@ -1,5 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- tslib_1.__exportStar(require("./components"), exports);
5
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,uDAA4B"}
@@ -1,9 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { Select, useTheme } from '@mui/material';
3
- import merge from 'lodash/merge';
4
- export const SelectEx = ({ MenuProps, mode = 'light', colorize, ...props }) => {
5
- const theme = useTheme();
6
- const colorizeMenuProps = colorize ? { MenuListProps: { sx: { backgroundColor: theme.palette[colorize][mode] } } } : {};
7
- return _jsx(Select, { MenuProps: merge(MenuProps, colorizeMenuProps), ...props });
8
- };
9
- //# sourceMappingURL=SelectEx.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SelectEx.js","sourceRoot":"","sources":["../../../src/components/SelectEx.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAe,MAAM,EAAe,QAAQ,EAAE,MAAM,eAAe,CAAA;AAC1E,OAAO,KAAK,MAAM,cAAc,CAAA;AAQhC,MAAM,CAAC,MAAM,QAAQ,GAAsD,CAAC,EAAE,SAAS,EAAE,IAAI,GAAG,OAAO,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE;IAC/H,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAA;IACxB,MAAM,iBAAiB,GAAG,QAAQ,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,EAAE,EAAE,EAAE,EAAE,eAAe,EAAE,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAA;IAEvH,OAAO,KAAC,MAAM,IAAC,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE,iBAAiB,CAAC,KAAM,KAAK,GAAI,CAAA;AAC9E,CAAC,CAAA"}
@@ -1,2 +0,0 @@
1
- export * from './SelectEx';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA"}
package/dist/esm/index.js DELETED
@@ -1,2 +0,0 @@
1
- export * from './components';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"SelectEx.d.ts","sourceRoot":"","sources":["../../../src/components/SelectEx.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAU,WAAW,EAAY,MAAM,eAAe,CAAA;AAE1E,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,MAAM,WAAW,aAAa,CAAC,CAAC,CAAE,SAAQ,WAAW,CAAC,CAAC,CAAC;IACtD,QAAQ,CAAC,EAAE,SAAS,GAAG,WAAW,CAAA;IAClC,IAAI,CAAC,EAAE,WAAW,CAAA;CACnB;AAED,eAAO,MAAM,QAAQ,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,GAAG,CAAC,OAKhE,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA"}
File without changes