@xylabs/react-select 6.3.12 → 6.3.14

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.
@@ -1,11 +1,2 @@
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 };
11
- export type { SelectExProps };
1
+ export * from './components/index.ts';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -1,22 +1,26 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
+
1
4
  // src/components/SelectEx.tsx
2
5
  import { Select, useTheme } from "@mui/material";
3
- import { jsx } from "react/jsx-runtime";
4
- var SelectEx = ({
5
- MenuProps,
6
- mode = "light",
7
- colorize,
8
- ...props
9
- }) => {
6
+ import React from "react";
7
+ var SelectEx = /* @__PURE__ */ __name(({ MenuProps, mode = "light", colorize, ...props }) => {
10
8
  const theme = useTheme();
11
- const colorizeMenuProps = colorize ? { MenuListProps: { sx: { backgroundColor: theme.palette[colorize][mode] } } } : {};
12
- return /* @__PURE__ */ jsx(
13
- Select,
14
- {
15
- MenuProps: { ...MenuProps, ...colorizeMenuProps },
16
- ...props
9
+ const colorizeMenuProps = colorize ? {
10
+ MenuListProps: {
11
+ sx: {
12
+ backgroundColor: theme.palette[colorize][mode]
13
+ }
17
14
  }
18
- );
19
- };
15
+ } : {};
16
+ return /* @__PURE__ */ React.createElement(Select, {
17
+ MenuProps: {
18
+ ...MenuProps,
19
+ ...colorizeMenuProps
20
+ },
21
+ ...props
22
+ });
23
+ }, "SelectEx");
20
24
  export {
21
25
  SelectEx
22
26
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/SelectEx.tsx"],"sourcesContent":["import type { PaletteMode, SelectProps } from '@mui/material'\nimport { Select, useTheme } from '@mui/material'\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 = ({\n MenuProps, mode = 'light', colorize, ...props\n}) => {\n const theme = useTheme()\n const colorizeMenuProps = colorize ? { MenuListProps: { sx: { backgroundColor: theme.palette[colorize][mode] } } } : {}\n\n return (\n <Select\n MenuProps={{ ...MenuProps, ...colorizeMenuProps }}\n {...props}\n />\n )\n}\n"],"mappings":";AACA,SAAS,QAAQ,gBAAgB;AAe7B;AAPG,IAAM,WAA8D,CAAC;AAAA,EAC1E;AAAA,EAAW,OAAO;AAAA,EAAS;AAAA,EAAU,GAAG;AAC1C,MAAM;AACJ,QAAM,QAAQ,SAAS;AACvB,QAAM,oBAAoB,WAAW,EAAE,eAAe,EAAE,IAAI,EAAE,iBAAiB,MAAM,QAAQ,QAAQ,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,CAAC;AAEtH,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW,EAAE,GAAG,WAAW,GAAG,kBAAkB;AAAA,MAC/C,GAAG;AAAA;AAAA,EACN;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../../src/components/SelectEx.tsx"],"sourcesContent":["import type { PaletteMode, SelectProps } from '@mui/material'\nimport { Select, useTheme } from '@mui/material'\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 = ({\n MenuProps, mode = 'light', colorize, ...props\n}) => {\n const theme = useTheme()\n const colorizeMenuProps = colorize ? { MenuListProps: { sx: { backgroundColor: theme.palette[colorize][mode] } } } : {}\n\n return (\n <Select\n MenuProps={{ ...MenuProps, ...colorizeMenuProps }}\n {...props}\n />\n )\n}\n"],"mappings":";;;;AACA,SAASA,QAAQC,gBAAgB;AACjC,OAAOC,WAAW;AAOX,IAAMC,WAA8D,wBAAC,EAC1EC,WAAWC,OAAO,SAASC,UAAU,GAAGC,MAAAA,MACzC;AACC,QAAMC,QAAQC,SAAAA;AACd,QAAMC,oBAAoBJ,WAAW;IAAEK,eAAe;MAAEC,IAAI;QAAEC,iBAAiBL,MAAMM,QAAQR,QAAAA,EAAUD,IAAAA;MAAM;IAAE;EAAE,IAAI,CAAC;AAEtH,SACE,sBAAA,cAACU,QAAAA;IACCX,WAAW;MAAE,GAAGA;MAAW,GAAGM;IAAkB;IAC/C,GAAGH;;AAGV,GAZ2E;","names":["Select","useTheme","React","SelectEx","MenuProps","mode","colorize","props","theme","useTheme","colorizeMenuProps","MenuListProps","sx","backgroundColor","palette","Select"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xylabs/react-select",
3
- "version": "6.3.12",
3
+ "version": "6.3.14",
4
4
  "description": "Common React library for all XY Labs projects that use React",
5
5
  "keywords": [
6
6
  "utility",
@@ -39,9 +39,9 @@
39
39
  "devDependencies": {
40
40
  "@mui/material": "^7.2.0",
41
41
  "@types/react": "^19.1.8",
42
- "@xylabs/ts-scripts-yarn3": "^7.0.0-rc.24",
43
- "@xylabs/tsconfig-react": "^7.0.0-rc.24",
44
- "knip": "^5.61.3",
42
+ "@xylabs/ts-scripts-yarn3": "^7.0.0",
43
+ "@xylabs/tsconfig-react": "^7.0.0",
44
+ "knip": "^5.62.0",
45
45
  "react": "^19.1.0",
46
46
  "react-dom": "^19.1.0",
47
47
  "typescript": "^5.8.3"