@xylabs/react-select 3.4.0 → 3.4.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.
Files changed (36) hide show
  1. package/dist/browser/components/index.d.cts +1 -1
  2. package/dist/browser/components/index.d.mts +1 -1
  3. package/dist/browser/components/index.d.ts +1 -1
  4. package/dist/browser/index.cjs +25 -5
  5. package/dist/browser/index.cjs.map +1 -1
  6. package/dist/browser/index.d.cts +1 -1
  7. package/dist/browser/index.d.mts +1 -1
  8. package/dist/browser/index.d.ts +1 -1
  9. package/dist/browser/index.mjs +25 -0
  10. package/dist/{node/index.js.map → browser/index.mjs.map} +1 -1
  11. package/dist/neutral/components/index.d.cts +1 -1
  12. package/dist/neutral/components/index.d.mts +1 -1
  13. package/dist/neutral/components/index.d.ts +1 -1
  14. package/dist/neutral/index.cjs +25 -5
  15. package/dist/neutral/index.cjs.map +1 -1
  16. package/dist/neutral/index.d.cts +1 -1
  17. package/dist/neutral/index.d.mts +1 -1
  18. package/dist/neutral/index.d.ts +1 -1
  19. package/dist/neutral/index.mjs +25 -0
  20. package/dist/{browser/index.js.map → neutral/index.mjs.map} +1 -1
  21. package/dist/node/components/index.d.cts +1 -1
  22. package/dist/node/components/index.d.mts +1 -1
  23. package/dist/node/components/index.d.ts +1 -1
  24. package/dist/node/index.cjs +25 -5
  25. package/dist/node/index.cjs.map +1 -1
  26. package/dist/node/index.d.cts +1 -1
  27. package/dist/node/index.d.mts +1 -1
  28. package/dist/node/index.d.ts +1 -1
  29. package/dist/node/index.mjs +25 -0
  30. package/dist/{neutral/index.js.map → node/index.mjs.map} +1 -1
  31. package/package.json +11 -10
  32. package/src/components/index.ts +1 -1
  33. package/src/index.ts +1 -1
  34. package/dist/browser/index.js +0 -13
  35. package/dist/neutral/index.js +0 -13
  36. package/dist/node/index.js +0 -13
@@ -1,2 +1,2 @@
1
- export * from './SelectEx.jsx';
1
+ export * from './SelectEx.tsx';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,2 +1,2 @@
1
- export * from './SelectEx.jsx';
1
+ export * from './SelectEx.tsx';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,2 +1,2 @@
1
- export * from './SelectEx.jsx';
1
+ export * from './SelectEx.tsx';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,8 +1,11 @@
1
1
  "use strict";
2
+ var __create = Object.create;
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
5
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
6
9
  var __export = (target, all) => {
7
10
  for (var name in all)
8
11
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -15,6 +18,14 @@ var __copyProps = (to, from, except, desc) => {
15
18
  }
16
19
  return to;
17
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
+ ));
18
29
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
30
 
20
31
  // src/index.ts
@@ -27,10 +38,19 @@ module.exports = __toCommonJS(src_exports);
27
38
  // src/components/SelectEx.tsx
28
39
  var import_material = require("@mui/material");
29
40
  var import_lodash = require("@xylabs/lodash");
30
- var import_jsx_runtime = require("react/jsx-runtime");
31
- var SelectEx = ({ MenuProps, mode = "light", colorize, ...props }) => {
41
+ var import_react = __toESM(require("react"), 1);
42
+ var SelectEx = /* @__PURE__ */ __name(({ MenuProps, mode = "light", colorize, ...props }) => {
32
43
  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
- };
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");
36
56
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.ts","../../src/components/SelectEx.tsx"],"sourcesContent":["export * from './components/index.js'\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;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
+ {"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 +1,2 @@
1
- export * from './components/index.js';
1
+ export * from './components/index.ts';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,2 +1,2 @@
1
- export * from './components/index.js';
1
+ export * from './components/index.ts';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,2 +1,2 @@
1
- export * from './components/index.js';
1
+ export * from './components/index.ts';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,25 @@
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 +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 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,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":[]}
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,2 +1,2 @@
1
- export * from './SelectEx.jsx';
1
+ export * from './SelectEx.tsx';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,2 +1,2 @@
1
- export * from './SelectEx.jsx';
1
+ export * from './SelectEx.tsx';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,2 +1,2 @@
1
- export * from './SelectEx.jsx';
1
+ export * from './SelectEx.tsx';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,8 +1,11 @@
1
1
  "use strict";
2
+ var __create = Object.create;
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
5
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
6
9
  var __export = (target, all) => {
7
10
  for (var name in all)
8
11
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -15,6 +18,14 @@ var __copyProps = (to, from, except, desc) => {
15
18
  }
16
19
  return to;
17
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
+ ));
18
29
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
30
 
20
31
  // src/index.ts
@@ -27,10 +38,19 @@ module.exports = __toCommonJS(src_exports);
27
38
  // src/components/SelectEx.tsx
28
39
  var import_material = require("@mui/material");
29
40
  var import_lodash = require("@xylabs/lodash");
30
- var import_jsx_runtime = require("react/jsx-runtime");
31
- var SelectEx = ({ MenuProps, mode = "light", colorize, ...props }) => {
41
+ var import_react = __toESM(require("react"), 1);
42
+ var SelectEx = /* @__PURE__ */ __name(({ MenuProps, mode = "light", colorize, ...props }) => {
32
43
  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
- };
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");
36
56
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.ts","../../src/components/SelectEx.tsx"],"sourcesContent":["export * from './components/index.js'\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;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
+ {"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 +1,2 @@
1
- export * from './components/index.js';
1
+ export * from './components/index.ts';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,2 +1,2 @@
1
- export * from './components/index.js';
1
+ export * from './components/index.ts';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,2 +1,2 @@
1
- export * from './components/index.js';
1
+ export * from './components/index.ts';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,25 @@
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 +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 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,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":[]}
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,2 +1,2 @@
1
- export * from './SelectEx.jsx';
1
+ export * from './SelectEx.tsx';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,2 +1,2 @@
1
- export * from './SelectEx.jsx';
1
+ export * from './SelectEx.tsx';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,2 +1,2 @@
1
- export * from './SelectEx.jsx';
1
+ export * from './SelectEx.tsx';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,8 +1,11 @@
1
1
  "use strict";
2
+ var __create = Object.create;
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
5
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
6
9
  var __export = (target, all) => {
7
10
  for (var name in all)
8
11
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -15,6 +18,14 @@ var __copyProps = (to, from, except, desc) => {
15
18
  }
16
19
  return to;
17
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
+ ));
18
29
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
30
 
20
31
  // src/index.ts
@@ -27,12 +38,21 @@ module.exports = __toCommonJS(src_exports);
27
38
  // src/components/SelectEx.tsx
28
39
  var import_material = require("@mui/material");
29
40
  var import_lodash = require("@xylabs/lodash");
30
- var import_jsx_runtime = require("react/jsx-runtime");
31
- var SelectEx = ({ MenuProps, mode = "light", colorize, ...props }) => {
41
+ var import_react = __toESM(require("react"), 1);
42
+ var SelectEx = /* @__PURE__ */ __name(({ MenuProps, mode = "light", colorize, ...props }) => {
32
43
  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
- };
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");
36
56
  // Annotate the CommonJS export names for ESM import in node:
37
57
  0 && (module.exports = {
38
58
  SelectEx
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.ts","../../src/components/SelectEx.tsx"],"sourcesContent":["export * from './components/index.js'\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;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
+ {"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 +1,2 @@
1
- export * from './components/index.js';
1
+ export * from './components/index.ts';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,2 +1,2 @@
1
- export * from './components/index.js';
1
+ export * from './components/index.ts';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1,2 +1,2 @@
1
- export * from './components/index.js';
1
+ export * from './components/index.ts';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,25 @@
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 +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 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,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":[]}
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"]}
package/package.json CHANGED
@@ -13,16 +13,17 @@
13
13
  "packages/*"
14
14
  ],
15
15
  "dependencies": {
16
- "@xylabs/lodash": "^3.5.9"
16
+ "@xylabs/lodash": "^3.6.12"
17
17
  },
18
18
  "description": "Common React library for all XY Labs projects that use React",
19
19
  "devDependencies": {
20
- "@mui/material": "^5.16.1",
20
+ "@mui/icons-material": "^5.16.6",
21
+ "@mui/material": "^5.16.6",
21
22
  "@types/react": "^18.3.3",
22
- "@xylabs/ts-scripts-yarn3": "^3.11.12",
23
- "@xylabs/tsconfig-react": "^3.11.12",
23
+ "@xylabs/ts-scripts-yarn3": "^3.15.16",
24
+ "@xylabs/tsconfig-react": "^3.15.16",
24
25
  "react": "^18.3.1",
25
- "typescript": "^5.5.3"
26
+ "typescript": "^5.5.4"
26
27
  },
27
28
  "peerDependencies": {
28
29
  "@mui/material": "^5",
@@ -34,7 +35,7 @@
34
35
  "node": {
35
36
  "import": {
36
37
  "types": "./dist/node/index.d.mts",
37
- "default": "./dist/node/index.js"
38
+ "default": "./dist/node/index.mjs"
38
39
  },
39
40
  "require": {
40
41
  "types": "./dist/node/index.d.cts",
@@ -44,20 +45,20 @@
44
45
  "browser": {
45
46
  "import": {
46
47
  "types": "./dist/browser/index.d.mts",
47
- "default": "./dist/browser/index.js"
48
+ "default": "./dist/browser/index.mjs"
48
49
  },
49
50
  "require": {
50
51
  "types": "./dist/browser/index.d.cts",
51
52
  "default": "./dist/browser/index.cjs"
52
53
  }
53
54
  },
54
- "default": "./dist/browser/index.js"
55
+ "default": "./dist/browser/index.mjs"
55
56
  },
56
57
  "./package.json": "./package.json"
57
58
  },
58
59
  "types": "dist/browser/index.d.ts",
59
60
  "main": "./dist/browser/index.cjs",
60
- "module": "./dist/browser/index.js",
61
+ "module": "./dist/browser/index.mjs",
61
62
  "homepage": "https://xylabs.com",
62
63
  "keywords": [
63
64
  "utility",
@@ -73,6 +74,6 @@
73
74
  "url": "https://github.com/xylabs/sdk-react.git"
74
75
  },
75
76
  "sideEffects": false,
76
- "version": "3.4.0",
77
+ "version": "3.4.2",
77
78
  "type": "module"
78
79
  }
@@ -1 +1 @@
1
- export * from './SelectEx.jsx'
1
+ export * from './SelectEx.tsx'
package/src/index.ts CHANGED
@@ -1 +1 @@
1
- export * from './components/index.js'
1
+ export * from './components/index.ts'
@@ -1,13 +0,0 @@
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.js.map
@@ -1,13 +0,0 @@
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.js.map
@@ -1,13 +0,0 @@
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.js.map