@xylabs/react-select 2.19.1 → 3.1.0-rc.2

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,40 @@
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
+ // Annotate the CommonJS export names for ESM import in node:
37
+ 0 && (module.exports = {
38
+ SelectEx
39
+ });
40
+ //# 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 '@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":[]}
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 "@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
+ };
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 '@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":[]}
package/package.json CHANGED
@@ -13,14 +13,13 @@
13
13
  "packages/*"
14
14
  ],
15
15
  "dependencies": {
16
- "lodash": "^4.17.21"
16
+ "@xylabs/lodash": "^2.11.7"
17
17
  },
18
18
  "description": "Common React library for all XY Labs projects that use React",
19
19
  "devDependencies": {
20
20
  "@mui/material": "^5.14.10",
21
- "@types/lodash": "^4.14.198",
22
- "@xylabs/ts-scripts-yarn3": "^2.19.12",
23
- "@xylabs/tsconfig-react": "^2.19.12",
21
+ "@xylabs/ts-scripts-yarn3": "^3.0.28",
22
+ "@xylabs/tsconfig-react": "^3.0.28",
24
23
  "react": "^18.2.0",
25
24
  "typescript": "^5.2.2"
26
25
  },
@@ -29,27 +28,37 @@
29
28
  "react": "^18",
30
29
  "react-dom": "^18"
31
30
  },
32
- "browser": "dist/esm/index.js",
33
- "docs": "dist/docs.json",
34
31
  "exports": {
35
32
  ".": {
36
33
  "node": {
37
- "import": "./dist/esm/index.js",
38
- "require": "./dist/cjs/index.js"
34
+ "import": {
35
+ "types": "./dist/index.d.mts",
36
+ "default": "./dist/index.mjs"
37
+ },
38
+ "require": {
39
+ "types": "./dist/index.d.ts",
40
+ "default": "./dist/index.js"
41
+ }
39
42
  },
40
43
  "browser": {
41
- "import": "./dist/esm/index.js",
42
- "require": "./dist/cjs/index.js"
44
+ "import": {
45
+ "types": "./dist/index.d.mts",
46
+ "default": "./dist/index.mjs"
47
+ },
48
+ "require": {
49
+ "types": "./dist/index.d.ts",
50
+ "default": "./dist/index.js"
51
+ }
43
52
  },
44
- "default": "./dist/esm/index.js"
53
+ "default": "./dist/index.mjs"
45
54
  },
46
55
  "./dist/docs.json": {
47
56
  "default": "./dist/docs.json"
48
57
  },
49
58
  "./package.json": "./package.json"
50
59
  },
51
- "main": "dist/cjs/index.js",
52
- "module": "dist/esm/index.js",
60
+ "main": "dist/index.js",
61
+ "module": "dist/index.mjs",
53
62
  "homepage": "https://xylabs.com",
54
63
  "keywords": [
55
64
  "utility",
@@ -65,6 +74,7 @@
65
74
  "url": "https://github.com/xylabs/sdk-react.git"
66
75
  },
67
76
  "sideEffects": false,
68
- "types": "dist/types/index.d.ts",
69
- "version": "2.19.1"
77
+ "types": "dist/index.d.ts",
78
+ "version": "3.1.0-rc.2",
79
+ "stableVersion": "3.0.0"
70
80
  }
@@ -1,5 +1,5 @@
1
1
  import { PaletteMode, Select, SelectProps, useTheme } from '@mui/material'
2
- import merge from 'lodash/merge'
2
+ import { merge } from '@xylabs/lodash'
3
3
  import React from 'react'
4
4
 
5
5
  export interface SelectExProps<T> extends SelectProps<T> {
@@ -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