@xylabs/react-select 3.4.2 → 4.0.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.
Files changed (66) hide show
  1. package/dist/browser/index.d.ts +10 -2
  2. package/package.json +7 -27
  3. package/xy.config.ts +12 -0
  4. package/dist/browser/components/SelectEx.d.cts +0 -8
  5. package/dist/browser/components/SelectEx.d.cts.map +0 -1
  6. package/dist/browser/components/SelectEx.d.mts +0 -8
  7. package/dist/browser/components/SelectEx.d.mts.map +0 -1
  8. package/dist/browser/components/SelectEx.d.ts +0 -8
  9. package/dist/browser/components/SelectEx.d.ts.map +0 -1
  10. package/dist/browser/components/index.d.cts +0 -2
  11. package/dist/browser/components/index.d.cts.map +0 -1
  12. package/dist/browser/components/index.d.mts +0 -2
  13. package/dist/browser/components/index.d.mts.map +0 -1
  14. package/dist/browser/components/index.d.ts +0 -2
  15. package/dist/browser/components/index.d.ts.map +0 -1
  16. package/dist/browser/index.cjs +0 -56
  17. package/dist/browser/index.cjs.map +0 -1
  18. package/dist/browser/index.d.cts +0 -2
  19. package/dist/browser/index.d.cts.map +0 -1
  20. package/dist/browser/index.d.mts +0 -2
  21. package/dist/browser/index.d.mts.map +0 -1
  22. package/dist/browser/index.d.ts.map +0 -1
  23. package/dist/neutral/components/SelectEx.d.cts +0 -8
  24. package/dist/neutral/components/SelectEx.d.cts.map +0 -1
  25. package/dist/neutral/components/SelectEx.d.mts +0 -8
  26. package/dist/neutral/components/SelectEx.d.mts.map +0 -1
  27. package/dist/neutral/components/SelectEx.d.ts +0 -8
  28. package/dist/neutral/components/SelectEx.d.ts.map +0 -1
  29. package/dist/neutral/components/index.d.cts +0 -2
  30. package/dist/neutral/components/index.d.cts.map +0 -1
  31. package/dist/neutral/components/index.d.mts +0 -2
  32. package/dist/neutral/components/index.d.mts.map +0 -1
  33. package/dist/neutral/components/index.d.ts +0 -2
  34. package/dist/neutral/components/index.d.ts.map +0 -1
  35. package/dist/neutral/index.cjs +0 -56
  36. package/dist/neutral/index.cjs.map +0 -1
  37. package/dist/neutral/index.d.cts +0 -2
  38. package/dist/neutral/index.d.cts.map +0 -1
  39. package/dist/neutral/index.d.mts +0 -2
  40. package/dist/neutral/index.d.mts.map +0 -1
  41. package/dist/neutral/index.d.ts +0 -2
  42. package/dist/neutral/index.d.ts.map +0 -1
  43. package/dist/neutral/index.mjs +0 -25
  44. package/dist/neutral/index.mjs.map +0 -1
  45. package/dist/node/components/SelectEx.d.cts +0 -8
  46. package/dist/node/components/SelectEx.d.cts.map +0 -1
  47. package/dist/node/components/SelectEx.d.mts +0 -8
  48. package/dist/node/components/SelectEx.d.mts.map +0 -1
  49. package/dist/node/components/SelectEx.d.ts +0 -8
  50. package/dist/node/components/SelectEx.d.ts.map +0 -1
  51. package/dist/node/components/index.d.cts +0 -2
  52. package/dist/node/components/index.d.cts.map +0 -1
  53. package/dist/node/components/index.d.mts +0 -2
  54. package/dist/node/components/index.d.mts.map +0 -1
  55. package/dist/node/components/index.d.ts +0 -2
  56. package/dist/node/components/index.d.ts.map +0 -1
  57. package/dist/node/index.cjs +0 -60
  58. package/dist/node/index.cjs.map +0 -1
  59. package/dist/node/index.d.cts +0 -2
  60. package/dist/node/index.d.cts.map +0 -1
  61. package/dist/node/index.d.mts +0 -2
  62. package/dist/node/index.d.mts.map +0 -1
  63. package/dist/node/index.d.ts +0 -2
  64. package/dist/node/index.d.ts.map +0 -1
  65. package/dist/node/index.mjs +0 -25
  66. package/dist/node/index.mjs.map +0 -1
@@ -1,2 +1,10 @@
1
- export * from './components/index.ts';
2
- //# sourceMappingURL=index.d.ts.map
1
+ import { SelectProps, PaletteMode } from '@mui/material';
2
+ import React from 'react';
3
+
4
+ type SelectExProps<T> = SelectProps<T> & {
5
+ colorize?: 'primary' | 'secondary';
6
+ mode?: PaletteMode;
7
+ };
8
+ declare const SelectEx: <T>(props: SelectExProps<T>) => React.JSX.Element;
9
+
10
+ export { SelectEx, type SelectExProps };
package/package.json CHANGED
@@ -13,15 +13,15 @@
13
13
  "packages/*"
14
14
  ],
15
15
  "dependencies": {
16
- "@xylabs/lodash": "^3.6.12"
16
+ "@xylabs/lodash": "^4.0.0"
17
17
  },
18
18
  "description": "Common React library for all XY Labs projects that use React",
19
19
  "devDependencies": {
20
- "@mui/icons-material": "^5.16.6",
21
- "@mui/material": "^5.16.6",
20
+ "@mui/icons-material": "^5.16.7",
21
+ "@mui/material": "^5.16.7",
22
22
  "@types/react": "^18.3.3",
23
- "@xylabs/ts-scripts-yarn3": "^3.15.16",
24
- "@xylabs/tsconfig-react": "^3.15.16",
23
+ "@xylabs/ts-scripts-yarn3": "^4.0.0-rc.15",
24
+ "@xylabs/tsconfig-react": "^4.0.0-rc.15",
25
25
  "react": "^18.3.1",
26
26
  "typescript": "^5.5.4"
27
27
  },
@@ -32,32 +32,12 @@
32
32
  },
33
33
  "exports": {
34
34
  ".": {
35
- "node": {
36
- "import": {
37
- "types": "./dist/node/index.d.mts",
38
- "default": "./dist/node/index.mjs"
39
- },
40
- "require": {
41
- "types": "./dist/node/index.d.cts",
42
- "default": "./dist/node/index.cjs"
43
- }
44
- },
45
- "browser": {
46
- "import": {
47
- "types": "./dist/browser/index.d.mts",
48
- "default": "./dist/browser/index.mjs"
49
- },
50
- "require": {
51
- "types": "./dist/browser/index.d.cts",
52
- "default": "./dist/browser/index.cjs"
53
- }
54
- },
35
+ "types": "./dist/browser/index.d.ts",
55
36
  "default": "./dist/browser/index.mjs"
56
37
  },
57
38
  "./package.json": "./package.json"
58
39
  },
59
40
  "types": "dist/browser/index.d.ts",
60
- "main": "./dist/browser/index.cjs",
61
41
  "module": "./dist/browser/index.mjs",
62
42
  "homepage": "https://xylabs.com",
63
43
  "keywords": [
@@ -74,6 +54,6 @@
74
54
  "url": "https://github.com/xylabs/sdk-react.git"
75
55
  },
76
56
  "sideEffects": false,
77
- "version": "3.4.2",
57
+ "version": "4.0.0",
78
58
  "type": "module"
79
59
  }
package/xy.config.ts ADDED
@@ -0,0 +1,12 @@
1
+ import { XyTsupConfig } from '@xylabs/ts-scripts-yarn3'
2
+ const config: XyTsupConfig = {
3
+ compile: {
4
+ browser: {
5
+ src: {},
6
+ },
7
+ node: {},
8
+ neutral: {},
9
+ },
10
+ }
11
+
12
+ export default config
@@ -1,8 +0,0 @@
1
- import { PaletteMode, SelectProps } from '@mui/material';
2
- import React from 'react';
3
- export type SelectExProps<T> = SelectProps<T> & {
4
- colorize?: 'primary' | 'secondary';
5
- mode?: PaletteMode;
6
- };
7
- export declare const SelectEx: <T>(props: SelectExProps<T>) => React.JSX.Element;
8
- //# sourceMappingURL=SelectEx.d.ts.map
@@ -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,MAAM,aAAa,CAAC,CAAC,IAAI,WAAW,CAAC,CAAC,CAAC,GAAG;IAC9C,QAAQ,CAAC,EAAE,SAAS,GAAG,WAAW,CAAA;IAClC,IAAI,CAAC,EAAE,WAAW,CAAA;CACnB,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,GAAG,CAAC,OAKhE,CAAA"}
@@ -1,8 +0,0 @@
1
- import { PaletteMode, SelectProps } from '@mui/material';
2
- import React from 'react';
3
- export type SelectExProps<T> = SelectProps<T> & {
4
- colorize?: 'primary' | 'secondary';
5
- mode?: PaletteMode;
6
- };
7
- export declare const SelectEx: <T>(props: SelectExProps<T>) => React.JSX.Element;
8
- //# sourceMappingURL=SelectEx.d.ts.map
@@ -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,MAAM,aAAa,CAAC,CAAC,IAAI,WAAW,CAAC,CAAC,CAAC,GAAG;IAC9C,QAAQ,CAAC,EAAE,SAAS,GAAG,WAAW,CAAA;IAClC,IAAI,CAAC,EAAE,WAAW,CAAA;CACnB,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,GAAG,CAAC,OAKhE,CAAA"}
@@ -1,8 +0,0 @@
1
- import { PaletteMode, SelectProps } from '@mui/material';
2
- import React from 'react';
3
- export type SelectExProps<T> = SelectProps<T> & {
4
- colorize?: 'primary' | 'secondary';
5
- mode?: PaletteMode;
6
- };
7
- export declare const SelectEx: <T>(props: SelectExProps<T>) => React.JSX.Element;
8
- //# sourceMappingURL=SelectEx.d.ts.map
@@ -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,MAAM,aAAa,CAAC,CAAC,IAAI,WAAW,CAAC,CAAC,CAAC,GAAG;IAC9C,QAAQ,CAAC,EAAE,SAAS,GAAG,WAAW,CAAA;IAClC,IAAI,CAAC,EAAE,WAAW,CAAA;CACnB,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,GAAG,CAAC,OAKhE,CAAA"}
@@ -1,2 +0,0 @@
1
- export * from './SelectEx.tsx';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA"}
@@ -1,2 +0,0 @@
1
- export * from './SelectEx.tsx';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA"}
@@ -1,2 +0,0 @@
1
- export * from './SelectEx.tsx';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA"}
@@ -1,56 +0,0 @@
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 __name = (target, value) => __defProp(target, "name", { value, configurable: true });
9
- var __export = (target, all) => {
10
- for (var name in all)
11
- __defProp(target, name, { get: all[name], enumerable: true });
12
- };
13
- var __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from === "object" || typeof from === "function") {
15
- for (let key of __getOwnPropNames(from))
16
- if (!__hasOwnProp.call(to, key) && key !== except)
17
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
18
- }
19
- return to;
20
- };
21
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
22
- // If the importer is in node compatibility mode or this is not an ESM
23
- // file that has been converted to a CommonJS file using a Babel-
24
- // compatible transform (i.e. "__esModule" has not been set), then set
25
- // "default" to the CommonJS "module.exports" for node compatibility.
26
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
27
- mod
28
- ));
29
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
-
31
- // src/index.ts
32
- var src_exports = {};
33
- __export(src_exports, {
34
- SelectEx: () => SelectEx
35
- });
36
- module.exports = __toCommonJS(src_exports);
37
-
38
- // src/components/SelectEx.tsx
39
- var import_material = require("@mui/material");
40
- var import_lodash = require("@xylabs/lodash");
41
- var import_react = __toESM(require("react"), 1);
42
- var SelectEx = /* @__PURE__ */ __name(({ MenuProps, mode = "light", colorize, ...props }) => {
43
- const theme = (0, import_material.useTheme)();
44
- const colorizeMenuProps = colorize ? {
45
- MenuListProps: {
46
- sx: {
47
- backgroundColor: theme.palette[colorize][mode]
48
- }
49
- }
50
- } : {};
51
- return /* @__PURE__ */ import_react.default.createElement(import_material.Select, {
52
- MenuProps: (0, import_lodash.merge)(MenuProps, colorizeMenuProps),
53
- ...props
54
- });
55
- }, "SelectEx");
56
- //# sourceMappingURL=index.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/index.ts","../../src/components/SelectEx.tsx"],"sourcesContent":["export * from './components/index.ts'\n","import { PaletteMode, Select, SelectProps, useTheme } from '@mui/material'\nimport { merge } from '@xylabs/lodash'\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 = ({ 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;;;;;;;ACAA,sBAA2D;AAC3D,oBAAsB;AACtB,mBAAkB;AAOX,IAAMA,WAA8D,wBAAC,EAAEC,WAAWC,OAAO,SAASC,UAAU,GAAGC,MAAAA,MAAO;AAC3H,QAAMC,YAAQC,0BAAAA;AACd,QAAMC,oBAAoBJ,WAAW;IAAEK,eAAe;MAAEC,IAAI;QAAEC,iBAAiBL,MAAMM,QAAQR,QAAAA,EAAUD,IAAAA;MAAM;IAAE;EAAE,IAAI,CAAC;AAEtH,SAAO,6BAAAU,QAAA,cAACC,wBAAAA;IAAOZ,eAAWa,qBAAMb,WAAWM,iBAAAA;IAAqB,GAAGH;;AACrE,GAL2E;","names":["SelectEx","MenuProps","mode","colorize","props","theme","useTheme","colorizeMenuProps","MenuListProps","sx","backgroundColor","palette","React","Select","merge"]}
@@ -1,2 +0,0 @@
1
- export * from './components/index.ts';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA"}
@@ -1,2 +0,0 @@
1
- export * from './components/index.ts';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA"}
@@ -1,8 +0,0 @@
1
- import { PaletteMode, SelectProps } from '@mui/material';
2
- import React from 'react';
3
- export type SelectExProps<T> = SelectProps<T> & {
4
- colorize?: 'primary' | 'secondary';
5
- mode?: PaletteMode;
6
- };
7
- export declare const SelectEx: <T>(props: SelectExProps<T>) => React.JSX.Element;
8
- //# sourceMappingURL=SelectEx.d.ts.map
@@ -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,MAAM,aAAa,CAAC,CAAC,IAAI,WAAW,CAAC,CAAC,CAAC,GAAG;IAC9C,QAAQ,CAAC,EAAE,SAAS,GAAG,WAAW,CAAA;IAClC,IAAI,CAAC,EAAE,WAAW,CAAA;CACnB,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,GAAG,CAAC,OAKhE,CAAA"}
@@ -1,8 +0,0 @@
1
- import { PaletteMode, SelectProps } from '@mui/material';
2
- import React from 'react';
3
- export type SelectExProps<T> = SelectProps<T> & {
4
- colorize?: 'primary' | 'secondary';
5
- mode?: PaletteMode;
6
- };
7
- export declare const SelectEx: <T>(props: SelectExProps<T>) => React.JSX.Element;
8
- //# sourceMappingURL=SelectEx.d.ts.map
@@ -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,MAAM,aAAa,CAAC,CAAC,IAAI,WAAW,CAAC,CAAC,CAAC,GAAG;IAC9C,QAAQ,CAAC,EAAE,SAAS,GAAG,WAAW,CAAA;IAClC,IAAI,CAAC,EAAE,WAAW,CAAA;CACnB,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,GAAG,CAAC,OAKhE,CAAA"}
@@ -1,8 +0,0 @@
1
- import { PaletteMode, SelectProps } from '@mui/material';
2
- import React from 'react';
3
- export type SelectExProps<T> = SelectProps<T> & {
4
- colorize?: 'primary' | 'secondary';
5
- mode?: PaletteMode;
6
- };
7
- export declare const SelectEx: <T>(props: SelectExProps<T>) => React.JSX.Element;
8
- //# sourceMappingURL=SelectEx.d.ts.map
@@ -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,MAAM,aAAa,CAAC,CAAC,IAAI,WAAW,CAAC,CAAC,CAAC,GAAG;IAC9C,QAAQ,CAAC,EAAE,SAAS,GAAG,WAAW,CAAA;IAClC,IAAI,CAAC,EAAE,WAAW,CAAA;CACnB,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,GAAG,CAAC,OAKhE,CAAA"}
@@ -1,2 +0,0 @@
1
- export * from './SelectEx.tsx';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA"}
@@ -1,2 +0,0 @@
1
- export * from './SelectEx.tsx';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA"}
@@ -1,2 +0,0 @@
1
- export * from './SelectEx.tsx';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA"}
@@ -1,56 +0,0 @@
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 __name = (target, value) => __defProp(target, "name", { value, configurable: true });
9
- var __export = (target, all) => {
10
- for (var name in all)
11
- __defProp(target, name, { get: all[name], enumerable: true });
12
- };
13
- var __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from === "object" || typeof from === "function") {
15
- for (let key of __getOwnPropNames(from))
16
- if (!__hasOwnProp.call(to, key) && key !== except)
17
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
18
- }
19
- return to;
20
- };
21
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
22
- // If the importer is in node compatibility mode or this is not an ESM
23
- // file that has been converted to a CommonJS file using a Babel-
24
- // compatible transform (i.e. "__esModule" has not been set), then set
25
- // "default" to the CommonJS "module.exports" for node compatibility.
26
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
27
- mod
28
- ));
29
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
-
31
- // src/index.ts
32
- var src_exports = {};
33
- __export(src_exports, {
34
- SelectEx: () => SelectEx
35
- });
36
- module.exports = __toCommonJS(src_exports);
37
-
38
- // src/components/SelectEx.tsx
39
- var import_material = require("@mui/material");
40
- var import_lodash = require("@xylabs/lodash");
41
- var import_react = __toESM(require("react"), 1);
42
- var SelectEx = /* @__PURE__ */ __name(({ MenuProps, mode = "light", colorize, ...props }) => {
43
- const theme = (0, import_material.useTheme)();
44
- const colorizeMenuProps = colorize ? {
45
- MenuListProps: {
46
- sx: {
47
- backgroundColor: theme.palette[colorize][mode]
48
- }
49
- }
50
- } : {};
51
- return /* @__PURE__ */ import_react.default.createElement(import_material.Select, {
52
- MenuProps: (0, import_lodash.merge)(MenuProps, colorizeMenuProps),
53
- ...props
54
- });
55
- }, "SelectEx");
56
- //# sourceMappingURL=index.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/index.ts","../../src/components/SelectEx.tsx"],"sourcesContent":["export * from './components/index.ts'\n","import { PaletteMode, Select, SelectProps, useTheme } from '@mui/material'\nimport { merge } from '@xylabs/lodash'\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 = ({ 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;;;;;;;ACAA,sBAA2D;AAC3D,oBAAsB;AACtB,mBAAkB;AAOX,IAAMA,WAA8D,wBAAC,EAAEC,WAAWC,OAAO,SAASC,UAAU,GAAGC,MAAAA,MAAO;AAC3H,QAAMC,YAAQC,0BAAAA;AACd,QAAMC,oBAAoBJ,WAAW;IAAEK,eAAe;MAAEC,IAAI;QAAEC,iBAAiBL,MAAMM,QAAQR,QAAAA,EAAUD,IAAAA;MAAM;IAAE;EAAE,IAAI,CAAC;AAEtH,SAAO,6BAAAU,QAAA,cAACC,wBAAAA;IAAOZ,eAAWa,qBAAMb,WAAWM,iBAAAA;IAAqB,GAAGH;;AACrE,GAL2E;","names":["SelectEx","MenuProps","mode","colorize","props","theme","useTheme","colorizeMenuProps","MenuListProps","sx","backgroundColor","palette","React","Select","merge"]}
@@ -1,2 +0,0 @@
1
- export * from './components/index.ts';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA"}
@@ -1,2 +0,0 @@
1
- export * from './components/index.ts';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA"}
@@ -1,2 +0,0 @@
1
- export * from './components/index.ts';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA"}
@@ -1,25 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
-
4
- // src/components/SelectEx.tsx
5
- import { Select, useTheme } from "@mui/material";
6
- import { merge } from "@xylabs/lodash";
7
- import React from "react";
8
- var SelectEx = /* @__PURE__ */ __name(({ MenuProps, mode = "light", colorize, ...props }) => {
9
- const theme = useTheme();
10
- const colorizeMenuProps = colorize ? {
11
- MenuListProps: {
12
- sx: {
13
- backgroundColor: theme.palette[colorize][mode]
14
- }
15
- }
16
- } : {};
17
- return /* @__PURE__ */ React.createElement(Select, {
18
- MenuProps: merge(MenuProps, colorizeMenuProps),
19
- ...props
20
- });
21
- }, "SelectEx");
22
- export {
23
- SelectEx
24
- };
25
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
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 type SelectExProps<T> = 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,SAAsBA,QAAqBC,gBAAgB;AAC3D,SAASC,aAAa;AACtB,OAAOC,WAAW;AAOX,IAAMC,WAA8D,wBAAC,EAAEC,WAAWC,OAAO,SAASC,UAAU,GAAGC,MAAAA,MAAO;AAC3H,QAAMC,QAAQC,SAAAA;AACd,QAAMC,oBAAoBJ,WAAW;IAAEK,eAAe;MAAEC,IAAI;QAAEC,iBAAiBL,MAAMM,QAAQR,QAAAA,EAAUD,IAAAA;MAAM;IAAE;EAAE,IAAI,CAAC;AAEtH,SAAO,sBAAA,cAACU,QAAAA;IAAOX,WAAWY,MAAMZ,WAAWM,iBAAAA;IAAqB,GAAGH;;AACrE,GAL2E;","names":["Select","useTheme","merge","React","SelectEx","MenuProps","mode","colorize","props","theme","useTheme","colorizeMenuProps","MenuListProps","sx","backgroundColor","palette","Select","merge"]}
@@ -1,8 +0,0 @@
1
- import { PaletteMode, SelectProps } from '@mui/material';
2
- import React from 'react';
3
- export type SelectExProps<T> = SelectProps<T> & {
4
- colorize?: 'primary' | 'secondary';
5
- mode?: PaletteMode;
6
- };
7
- export declare const SelectEx: <T>(props: SelectExProps<T>) => React.JSX.Element;
8
- //# sourceMappingURL=SelectEx.d.ts.map
@@ -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,MAAM,aAAa,CAAC,CAAC,IAAI,WAAW,CAAC,CAAC,CAAC,GAAG;IAC9C,QAAQ,CAAC,EAAE,SAAS,GAAG,WAAW,CAAA;IAClC,IAAI,CAAC,EAAE,WAAW,CAAA;CACnB,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,GAAG,CAAC,OAKhE,CAAA"}
@@ -1,8 +0,0 @@
1
- import { PaletteMode, SelectProps } from '@mui/material';
2
- import React from 'react';
3
- export type SelectExProps<T> = SelectProps<T> & {
4
- colorize?: 'primary' | 'secondary';
5
- mode?: PaletteMode;
6
- };
7
- export declare const SelectEx: <T>(props: SelectExProps<T>) => React.JSX.Element;
8
- //# sourceMappingURL=SelectEx.d.ts.map
@@ -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,MAAM,aAAa,CAAC,CAAC,IAAI,WAAW,CAAC,CAAC,CAAC,GAAG;IAC9C,QAAQ,CAAC,EAAE,SAAS,GAAG,WAAW,CAAA;IAClC,IAAI,CAAC,EAAE,WAAW,CAAA;CACnB,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,GAAG,CAAC,OAKhE,CAAA"}
@@ -1,8 +0,0 @@
1
- import { PaletteMode, SelectProps } from '@mui/material';
2
- import React from 'react';
3
- export type SelectExProps<T> = SelectProps<T> & {
4
- colorize?: 'primary' | 'secondary';
5
- mode?: PaletteMode;
6
- };
7
- export declare const SelectEx: <T>(props: SelectExProps<T>) => React.JSX.Element;
8
- //# sourceMappingURL=SelectEx.d.ts.map
@@ -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,MAAM,aAAa,CAAC,CAAC,IAAI,WAAW,CAAC,CAAC,CAAC,GAAG;IAC9C,QAAQ,CAAC,EAAE,SAAS,GAAG,WAAW,CAAA;IAClC,IAAI,CAAC,EAAE,WAAW,CAAA;CACnB,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,GAAG,CAAC,OAKhE,CAAA"}
@@ -1,2 +0,0 @@
1
- export * from './SelectEx.tsx';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA"}
@@ -1,2 +0,0 @@
1
- export * from './SelectEx.tsx';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA"}
@@ -1,2 +0,0 @@
1
- export * from './SelectEx.tsx';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA"}
@@ -1,60 +0,0 @@
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 __name = (target, value) => __defProp(target, "name", { value, configurable: true });
9
- var __export = (target, all) => {
10
- for (var name in all)
11
- __defProp(target, name, { get: all[name], enumerable: true });
12
- };
13
- var __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from === "object" || typeof from === "function") {
15
- for (let key of __getOwnPropNames(from))
16
- if (!__hasOwnProp.call(to, key) && key !== except)
17
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
18
- }
19
- return to;
20
- };
21
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
22
- // If the importer is in node compatibility mode or this is not an ESM
23
- // file that has been converted to a CommonJS file using a Babel-
24
- // compatible transform (i.e. "__esModule" has not been set), then set
25
- // "default" to the CommonJS "module.exports" for node compatibility.
26
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
27
- mod
28
- ));
29
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
-
31
- // src/index.ts
32
- var src_exports = {};
33
- __export(src_exports, {
34
- SelectEx: () => SelectEx
35
- });
36
- module.exports = __toCommonJS(src_exports);
37
-
38
- // src/components/SelectEx.tsx
39
- var import_material = require("@mui/material");
40
- var import_lodash = require("@xylabs/lodash");
41
- var import_react = __toESM(require("react"), 1);
42
- var SelectEx = /* @__PURE__ */ __name(({ MenuProps, mode = "light", colorize, ...props }) => {
43
- const theme = (0, import_material.useTheme)();
44
- const colorizeMenuProps = colorize ? {
45
- MenuListProps: {
46
- sx: {
47
- backgroundColor: theme.palette[colorize][mode]
48
- }
49
- }
50
- } : {};
51
- return /* @__PURE__ */ import_react.default.createElement(import_material.Select, {
52
- MenuProps: (0, import_lodash.merge)(MenuProps, colorizeMenuProps),
53
- ...props
54
- });
55
- }, "SelectEx");
56
- // Annotate the CommonJS export names for ESM import in node:
57
- 0 && (module.exports = {
58
- SelectEx
59
- });
60
- //# sourceMappingURL=index.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/index.ts","../../src/components/SelectEx.tsx"],"sourcesContent":["export * from './components/index.ts'\n","import { PaletteMode, Select, SelectProps, useTheme } from '@mui/material'\nimport { merge } from '@xylabs/lodash'\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 = ({ 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;;;;;;;ACAA,sBAA2D;AAC3D,oBAAsB;AACtB,mBAAkB;AAOX,IAAMA,WAA8D,wBAAC,EAAEC,WAAWC,OAAO,SAASC,UAAU,GAAGC,MAAAA,MAAO;AAC3H,QAAMC,YAAQC,0BAAAA;AACd,QAAMC,oBAAoBJ,WAAW;IAAEK,eAAe;MAAEC,IAAI;QAAEC,iBAAiBL,MAAMM,QAAQR,QAAAA,EAAUD,IAAAA;MAAM;IAAE;EAAE,IAAI,CAAC;AAEtH,SAAO,6BAAAU,QAAA,cAACC,wBAAAA;IAAOZ,eAAWa,qBAAMb,WAAWM,iBAAAA;IAAqB,GAAGH;;AACrE,GAL2E;","names":["SelectEx","MenuProps","mode","colorize","props","theme","useTheme","colorizeMenuProps","MenuListProps","sx","backgroundColor","palette","React","Select","merge"]}
@@ -1,2 +0,0 @@
1
- export * from './components/index.ts';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA"}
@@ -1,2 +0,0 @@
1
- export * from './components/index.ts';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA"}
@@ -1,2 +0,0 @@
1
- export * from './components/index.ts';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA"}
@@ -1,25 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
-
4
- // src/components/SelectEx.tsx
5
- import { Select, useTheme } from "@mui/material";
6
- import { merge } from "@xylabs/lodash";
7
- import React from "react";
8
- var SelectEx = /* @__PURE__ */ __name(({ MenuProps, mode = "light", colorize, ...props }) => {
9
- const theme = useTheme();
10
- const colorizeMenuProps = colorize ? {
11
- MenuListProps: {
12
- sx: {
13
- backgroundColor: theme.palette[colorize][mode]
14
- }
15
- }
16
- } : {};
17
- return /* @__PURE__ */ React.createElement(Select, {
18
- MenuProps: merge(MenuProps, colorizeMenuProps),
19
- ...props
20
- });
21
- }, "SelectEx");
22
- export {
23
- SelectEx
24
- };
25
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
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 type SelectExProps<T> = 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,SAAsBA,QAAqBC,gBAAgB;AAC3D,SAASC,aAAa;AACtB,OAAOC,WAAW;AAOX,IAAMC,WAA8D,wBAAC,EAAEC,WAAWC,OAAO,SAASC,UAAU,GAAGC,MAAAA,MAAO;AAC3H,QAAMC,QAAQC,SAAAA;AACd,QAAMC,oBAAoBJ,WAAW;IAAEK,eAAe;MAAEC,IAAI;QAAEC,iBAAiBL,MAAMM,QAAQR,QAAAA,EAAUD,IAAAA;MAAM;IAAE;EAAE,IAAI,CAAC;AAEtH,SAAO,sBAAA,cAACU,QAAAA;IAAOX,WAAWY,MAAMZ,WAAWM,iBAAAA;IAAqB,GAAGH;;AACrE,GAL2E;","names":["Select","useTheme","merge","React","SelectEx","MenuProps","mode","colorize","props","theme","useTheme","colorizeMenuProps","MenuListProps","sx","backgroundColor","palette","Select","merge"]}