@xylabs/react-select 3.0.17 → 3.0.19
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.
- package/README.md +20 -49
- package/package.json +5 -5
- package/dist/browser/components/SelectEx.cjs +0 -34
- package/dist/browser/components/SelectEx.cjs.map +0 -1
- package/dist/browser/components/SelectEx.js +0 -13
- package/dist/browser/components/SelectEx.js.map +0 -1
- package/dist/browser/components/index.cjs +0 -36
- package/dist/browser/components/index.cjs.map +0 -1
- package/dist/browser/components/index.js +0 -13
- package/dist/browser/components/index.js.map +0 -1
- package/dist/browser/types/images.d.cjs +0 -2
- package/dist/browser/types/images.d.cjs.map +0 -1
- package/dist/browser/types/images.d.js +0 -1
- package/dist/browser/types/images.d.js.map +0 -1
- package/dist/node/components/SelectEx.cjs +0 -38
- package/dist/node/components/SelectEx.cjs.map +0 -1
- package/dist/node/components/SelectEx.js +0 -13
- package/dist/node/components/SelectEx.js.map +0 -1
- package/dist/node/components/index.cjs +0 -40
- package/dist/node/components/index.cjs.map +0 -1
- package/dist/node/components/index.js +0 -13
- package/dist/node/components/index.js.map +0 -1
- package/dist/node/types/images.d.cjs +0 -2
- package/dist/node/types/images.d.cjs.map +0 -1
- package/dist/node/types/images.d.js +0 -1
- package/dist/node/types/images.d.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
[![logo][]](https://xylabs.com)
|
|
2
2
|
|
|
3
|
-
# @xylabs/
|
|
3
|
+
# @xylabs/react-select
|
|
4
4
|
|
|
5
|
-
[![main-build][]][main-build-link]
|
|
6
|
-
[![beta-build][]][beta-build-link]
|
|
7
5
|
[![npm-badge][]][npm-link]
|
|
8
|
-
[![
|
|
9
|
-
[![
|
|
10
|
-
[![
|
|
11
|
-
[![snyk-badge][]][snyk-link]
|
|
6
|
+
[![npm-downloads-badge][]][npm-link]
|
|
7
|
+
[![jsdelivr-badge][]][jsdelivr-link]
|
|
8
|
+
[![npm-license-badge][]](LICENSE)
|
|
12
9
|
|
|
13
10
|
> XY Labs generalized React library
|
|
14
11
|
|
|
@@ -16,53 +13,39 @@
|
|
|
16
13
|
|
|
17
14
|
- [Description](#description)
|
|
18
15
|
- [Install](#install)
|
|
19
|
-
- [Scripts](#scripts)
|
|
20
16
|
- [Maintainers](#maintainers)
|
|
21
17
|
- [License](#license)
|
|
22
18
|
- [Credits](#credits)
|
|
23
19
|
|
|
24
20
|
## Description
|
|
25
21
|
|
|
26
|
-
Common React code that is used
|
|
22
|
+
Common React code that is used throughout XYO projects that use React.
|
|
27
23
|
|
|
28
24
|
## Install
|
|
29
25
|
|
|
30
26
|
Using npm:
|
|
31
27
|
|
|
32
28
|
```sh
|
|
33
|
-
npm i --save @xylabs/
|
|
29
|
+
npm i --save @xylabs/react-select
|
|
34
30
|
```
|
|
35
31
|
|
|
36
32
|
Using yarn:
|
|
37
33
|
|
|
38
34
|
```sh
|
|
39
|
-
yarn add @xylabs/
|
|
35
|
+
yarn add @xylabs/react-select
|
|
40
36
|
```
|
|
41
37
|
|
|
42
|
-
##
|
|
38
|
+
## Documentation
|
|
39
|
+
[Developer Reference](https://xylabs.github.io/sdk-react)
|
|
43
40
|
|
|
44
|
-
|
|
45
|
-
list of shared scripts. The below scripts are custom scripts for this repo.
|
|
46
|
-
|
|
47
|
-
### Build (Storybook)
|
|
48
|
-
|
|
49
|
-
Build the static Storybook site
|
|
50
|
-
|
|
51
|
-
```sh
|
|
52
|
-
yarn build-storybook
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
### Start
|
|
56
|
-
|
|
57
|
-
Starts the project in the browser for testing, with auto reload using Storybook
|
|
58
|
-
|
|
59
|
-
```sh
|
|
60
|
-
yarn start
|
|
61
|
-
```
|
|
41
|
+
[Storybook](https://xylabs.github.io/sdk-react/storybook)
|
|
62
42
|
|
|
63
43
|
## Maintainers
|
|
64
44
|
|
|
65
|
-
- [Arie Trouw](https://github.com/arietrouw) [arietrouw.com](https://arietrouw.com)
|
|
45
|
+
- [Arie Trouw](https://github.com/arietrouw) ([arietrouw.com](https://arietrouw.com))
|
|
46
|
+
- [Matt Jones](https://github.com/jonesmac)
|
|
47
|
+
- [Joel Carter](https://github.com/JoelBCarter)
|
|
48
|
+
- [Jordan Trouw](https://github.com/jordantrouw)
|
|
66
49
|
|
|
67
50
|
## License
|
|
68
51
|
|
|
@@ -74,23 +57,11 @@ See the [LICENSE](LICENSE) file for license details
|
|
|
74
57
|
|
|
75
58
|
[logo]: https://cdn.xy.company/img/brand/XYPersistentCompany_Logo_Icon_Colored.svg
|
|
76
59
|
|
|
77
|
-
[
|
|
78
|
-
[
|
|
79
|
-
|
|
80
|
-
[beta-build]: https://github.com/xylabs/sdk-react/actions/workflows/build-beta.yml/badge.svg
|
|
81
|
-
[beta-build-link]: https://github.com/xylabs/sdk-react/actions/workflows/build-beta.yml
|
|
82
|
-
|
|
83
|
-
[npm-badge]: https://img.shields.io/npm/v/@xylabs/sdk-react.svg
|
|
84
|
-
[npm-link]: https://www.npmjs.com/package/@xylabs/sdk-react
|
|
85
|
-
|
|
86
|
-
[bch-badge]: https://bettercodehub.com/edge/badge/xylabs/sdk-react?branch=main
|
|
87
|
-
[bch-link]: https://bettercodehub.com/results/xylabs/sdk-react
|
|
88
|
-
|
|
89
|
-
[codacy-badge]: https://app.codacy.com/project/badge/Grade/c2a69d4530ed4b7da6ddb070169dd339
|
|
90
|
-
[codacy-link]: https://www.codacy.com/gh/xylabs/sdk-react/dashboard?utm_source=github.com&utm_medium=referral&utm_content=xylabs/sdk-react&utm_campaign=Badge_Grade
|
|
60
|
+
[npm-badge]: https://img.shields.io/npm/v/@xylabs/react-select.svg
|
|
61
|
+
[npm-link]: https://www.npmjs.com/package/@xylabs/react-select
|
|
91
62
|
|
|
92
|
-
[
|
|
93
|
-
[
|
|
63
|
+
[npm-downloads-badge]: https://img.shields.io/npm/dw/@xylabs/react-select
|
|
64
|
+
[npm-license-badge]: https://img.shields.io/npm/l/@xylabs/react-select
|
|
94
65
|
|
|
95
|
-
[
|
|
96
|
-
[
|
|
66
|
+
[jsdelivr-badge]: https://data.jsdelivr.com/v1/package/npm/@xylabs/react-select/badge
|
|
67
|
+
[jsdelivr-link]: https://www.jsdelivr.com/package/npm/@xylabs/react-select
|
package/package.json
CHANGED
|
@@ -13,13 +13,13 @@
|
|
|
13
13
|
"packages/*"
|
|
14
14
|
],
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@xylabs/lodash": "^2.12.
|
|
16
|
+
"@xylabs/lodash": "^2.12.25"
|
|
17
17
|
},
|
|
18
18
|
"description": "Common React library for all XY Labs projects that use React",
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"@mui/material": "^5.14.
|
|
21
|
-
"@xylabs/ts-scripts-yarn3": "^3.
|
|
22
|
-
"@xylabs/tsconfig-react": "^3.
|
|
20
|
+
"@mui/material": "^5.14.13",
|
|
21
|
+
"@xylabs/ts-scripts-yarn3": "^3.1.9",
|
|
22
|
+
"@xylabs/tsconfig-react": "^3.1.9",
|
|
23
23
|
"react": "^18.2.0",
|
|
24
24
|
"typescript": "^5.2.2"
|
|
25
25
|
},
|
|
@@ -75,6 +75,6 @@
|
|
|
75
75
|
"url": "https://github.com/xylabs/sdk-react.git"
|
|
76
76
|
},
|
|
77
77
|
"sideEffects": false,
|
|
78
|
-
"version": "3.0.
|
|
78
|
+
"version": "3.0.19",
|
|
79
79
|
"type": "module"
|
|
80
80
|
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/components/SelectEx.tsx
|
|
21
|
-
var SelectEx_exports = {};
|
|
22
|
-
__export(SelectEx_exports, {
|
|
23
|
-
SelectEx: () => SelectEx
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(SelectEx_exports);
|
|
26
|
-
var import_material = require("@mui/material");
|
|
27
|
-
var import_lodash = require("@xylabs/lodash");
|
|
28
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
29
|
-
var SelectEx = ({ MenuProps, mode = "light", colorize, ...props }) => {
|
|
30
|
-
const theme = (0, import_material.useTheme)();
|
|
31
|
-
const colorizeMenuProps = colorize ? { MenuListProps: { sx: { backgroundColor: theme.palette[colorize][mode] } } } : {};
|
|
32
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Select, { MenuProps: (0, import_lodash.merge)(MenuProps, colorizeMenuProps), ...props });
|
|
33
|
-
};
|
|
34
|
-
//# sourceMappingURL=SelectEx.cjs.map
|
|
@@ -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 interface SelectExProps<T> extends SelectProps<T> {\n colorize?: 'primary' | 'secondary'\n mode?: PaletteMode\n}\n\nexport const SelectEx: <T>(props: SelectExProps<T>) => React.JSX.Element = ({ MenuProps, mode = 'light', colorize, ...props }) => {\n const theme = useTheme()\n const colorizeMenuProps = colorize ? { MenuListProps: { sx: { backgroundColor: theme.palette[colorize][mode] } } } : {}\n\n return <Select MenuProps={merge(MenuProps, colorizeMenuProps)} {...props} />\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAA2D;AAC3D,oBAAsB;AAYb;AAJF,IAAM,WAA8D,CAAC,EAAE,WAAW,OAAO,SAAS,UAAU,GAAG,MAAM,MAAM;AAChI,QAAM,YAAQ,0BAAS;AACvB,QAAM,oBAAoB,WAAW,EAAE,eAAe,EAAE,IAAI,EAAE,iBAAiB,MAAM,QAAQ,QAAQ,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,CAAC;AAEtH,SAAO,4CAAC,0BAAO,eAAW,qBAAM,WAAW,iBAAiB,GAAI,GAAG,OAAO;AAC5E;","names":[]}
|
|
@@ -1,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=SelectEx.js.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 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":[]}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/components/index.ts
|
|
21
|
-
var components_exports = {};
|
|
22
|
-
__export(components_exports, {
|
|
23
|
-
SelectEx: () => SelectEx
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(components_exports);
|
|
26
|
-
|
|
27
|
-
// src/components/SelectEx.tsx
|
|
28
|
-
var import_material = require("@mui/material");
|
|
29
|
-
var import_lodash = require("@xylabs/lodash");
|
|
30
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
31
|
-
var SelectEx = ({ MenuProps, mode = "light", colorize, ...props }) => {
|
|
32
|
-
const theme = (0, import_material.useTheme)();
|
|
33
|
-
const colorizeMenuProps = colorize ? { MenuListProps: { sx: { backgroundColor: theme.palette[colorize][mode] } } } : {};
|
|
34
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Select, { MenuProps: (0, import_lodash.merge)(MenuProps, colorizeMenuProps), ...props });
|
|
35
|
-
};
|
|
36
|
-
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/index.ts","../../../src/components/SelectEx.tsx"],"sourcesContent":["export * from './SelectEx'\n","import { PaletteMode, Select, SelectProps, useTheme } from '@mui/material'\nimport { merge } from '@xylabs/lodash'\nimport React from 'react'\n\nexport interface SelectExProps<T> extends SelectProps<T> {\n colorize?: 'primary' | 'secondary'\n mode?: PaletteMode\n}\n\nexport const SelectEx: <T>(props: SelectExProps<T>) => React.JSX.Element = ({ MenuProps, mode = 'light', colorize, ...props }) => {\n const theme = useTheme()\n const colorizeMenuProps = colorize ? { MenuListProps: { sx: { backgroundColor: theme.palette[colorize][mode] } } } : {}\n\n return <Select MenuProps={merge(MenuProps, colorizeMenuProps)} {...props} />\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,sBAA2D;AAC3D,oBAAsB;AAYb;AAJF,IAAM,WAA8D,CAAC,EAAE,WAAW,OAAO,SAAS,UAAU,GAAG,MAAM,MAAM;AAChI,QAAM,YAAQ,0BAAS;AACvB,QAAM,oBAAoB,WAAW,EAAE,eAAe,EAAE,IAAI,EAAE,iBAAiB,MAAM,QAAQ,QAAQ,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,CAAC;AAEtH,SAAO,4CAAC,0BAAO,eAAW,qBAAM,WAAW,iBAAiB,GAAI,GAAG,OAAO;AAC5E;","names":[]}
|
|
@@ -1,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 +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 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":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=images.d.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/components/SelectEx.tsx
|
|
21
|
-
var SelectEx_exports = {};
|
|
22
|
-
__export(SelectEx_exports, {
|
|
23
|
-
SelectEx: () => SelectEx
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(SelectEx_exports);
|
|
26
|
-
var import_material = require("@mui/material");
|
|
27
|
-
var import_lodash = require("@xylabs/lodash");
|
|
28
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
29
|
-
var SelectEx = ({ MenuProps, mode = "light", colorize, ...props }) => {
|
|
30
|
-
const theme = (0, import_material.useTheme)();
|
|
31
|
-
const colorizeMenuProps = colorize ? { MenuListProps: { sx: { backgroundColor: theme.palette[colorize][mode] } } } : {};
|
|
32
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Select, { MenuProps: (0, import_lodash.merge)(MenuProps, colorizeMenuProps), ...props });
|
|
33
|
-
};
|
|
34
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
35
|
-
0 && (module.exports = {
|
|
36
|
-
SelectEx
|
|
37
|
-
});
|
|
38
|
-
//# sourceMappingURL=SelectEx.cjs.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 interface SelectExProps<T> extends SelectProps<T> {\n colorize?: 'primary' | 'secondary'\n mode?: PaletteMode\n}\n\nexport const SelectEx: <T>(props: SelectExProps<T>) => React.JSX.Element = ({ MenuProps, mode = 'light', colorize, ...props }) => {\n const theme = useTheme()\n const colorizeMenuProps = colorize ? { MenuListProps: { sx: { backgroundColor: theme.palette[colorize][mode] } } } : {}\n\n return <Select MenuProps={merge(MenuProps, colorizeMenuProps)} {...props} />\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAA2D;AAC3D,oBAAsB;AAYb;AAJF,IAAM,WAA8D,CAAC,EAAE,WAAW,OAAO,SAAS,UAAU,GAAG,MAAM,MAAM;AAChI,QAAM,YAAQ,0BAAS;AACvB,QAAM,oBAAoB,WAAW,EAAE,eAAe,EAAE,IAAI,EAAE,iBAAiB,MAAM,QAAQ,QAAQ,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,CAAC;AAEtH,SAAO,4CAAC,0BAAO,eAAW,qBAAM,WAAW,iBAAiB,GAAI,GAAG,OAAO;AAC5E;","names":[]}
|
|
@@ -1,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=SelectEx.js.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 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":[]}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/components/index.ts
|
|
21
|
-
var components_exports = {};
|
|
22
|
-
__export(components_exports, {
|
|
23
|
-
SelectEx: () => SelectEx
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(components_exports);
|
|
26
|
-
|
|
27
|
-
// src/components/SelectEx.tsx
|
|
28
|
-
var import_material = require("@mui/material");
|
|
29
|
-
var import_lodash = require("@xylabs/lodash");
|
|
30
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
31
|
-
var SelectEx = ({ MenuProps, mode = "light", colorize, ...props }) => {
|
|
32
|
-
const theme = (0, import_material.useTheme)();
|
|
33
|
-
const colorizeMenuProps = colorize ? { MenuListProps: { sx: { backgroundColor: theme.palette[colorize][mode] } } } : {};
|
|
34
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Select, { MenuProps: (0, import_lodash.merge)(MenuProps, colorizeMenuProps), ...props });
|
|
35
|
-
};
|
|
36
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
37
|
-
0 && (module.exports = {
|
|
38
|
-
SelectEx
|
|
39
|
-
});
|
|
40
|
-
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/index.ts","../../../src/components/SelectEx.tsx"],"sourcesContent":["export * from './SelectEx'\n","import { PaletteMode, Select, SelectProps, useTheme } from '@mui/material'\nimport { merge } from '@xylabs/lodash'\nimport React from 'react'\n\nexport interface SelectExProps<T> extends SelectProps<T> {\n colorize?: 'primary' | 'secondary'\n mode?: PaletteMode\n}\n\nexport const SelectEx: <T>(props: SelectExProps<T>) => React.JSX.Element = ({ MenuProps, mode = 'light', colorize, ...props }) => {\n const theme = useTheme()\n const colorizeMenuProps = colorize ? { MenuListProps: { sx: { backgroundColor: theme.palette[colorize][mode] } } } : {}\n\n return <Select MenuProps={merge(MenuProps, colorizeMenuProps)} {...props} />\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,sBAA2D;AAC3D,oBAAsB;AAYb;AAJF,IAAM,WAA8D,CAAC,EAAE,WAAW,OAAO,SAAS,UAAU,GAAG,MAAM,MAAM;AAChI,QAAM,YAAQ,0BAAS;AACvB,QAAM,oBAAoB,WAAW,EAAE,eAAe,EAAE,IAAI,EAAE,iBAAiB,MAAM,QAAQ,QAAQ,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,CAAC;AAEtH,SAAO,4CAAC,0BAAO,eAAW,qBAAM,WAAW,iBAAiB,GAAI,GAAG,OAAO;AAC5E;","names":[]}
|
|
@@ -1,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 +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 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":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=images.d.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|