@xylabs/react-select 7.1.9 → 7.1.11

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 +1 @@
1
- {"version":3,"file":"SelectEx.d.ts","sourceRoot":"","sources":["../../../src/components/SelectEx.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAE7D,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,OAYhE,CAAA"}
1
+ {"version":3,"file":"SelectEx.d.ts","sourceRoot":"","sources":["../../../src/components/SelectEx.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAG7D,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,OAYhE,CAAA"}
@@ -1,5 +1,6 @@
1
1
  // src/components/SelectEx.tsx
2
2
  import { Select, useTheme } from "@mui/material";
3
+ import { isDefined } from "@xylabs/sdk-js";
3
4
  import { jsx } from "react/jsx-runtime";
4
5
  var SelectEx = ({
5
6
  MenuProps,
@@ -8,7 +9,7 @@ var SelectEx = ({
8
9
  ...props
9
10
  }) => {
10
11
  const theme = useTheme();
11
- const colorizeMenuProps = colorize ? { MenuListProps: { sx: { backgroundColor: theme.palette[colorize][mode] } } } : {};
12
+ const colorizeMenuProps = isDefined(colorize) ? { MenuListProps: { sx: { backgroundColor: theme.palette[colorize][mode] } } } : {};
12
13
  return /* @__PURE__ */ jsx(
13
14
  Select,
14
15
  {
@@ -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 { isDefined } from '@xylabs/sdk-js'\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 = isDefined(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;AACjC,SAAS,iBAAiB;AAetB;AAPG,IAAM,WAA8D,CAAC;AAAA,EAC1E;AAAA,EAAW,OAAO;AAAA,EAAS;AAAA,EAAU,GAAG;AAC1C,MAAM;AACJ,QAAM,QAAQ,SAAS;AACvB,QAAM,oBAAoB,UAAU,QAAQ,IAAI,EAAE,eAAe,EAAE,IAAI,EAAE,iBAAiB,MAAM,QAAQ,QAAQ,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,CAAC;AAEjI,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW,EAAE,GAAG,WAAW,GAAG,kBAAkB;AAAA,MAC/C,GAAG;AAAA;AAAA,EACN;AAEJ;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xylabs/react-select",
3
- "version": "7.1.9",
3
+ "version": "7.1.11",
4
4
  "description": "Common React library for all XY Labs projects that use React",
5
5
  "keywords": [
6
6
  "utility",
@@ -37,18 +37,18 @@
37
37
  "dist",
38
38
  "src"
39
39
  ],
40
- "workspaces": [
41
- "packages/*"
42
- ],
40
+ "dependencies": {
41
+ "@xylabs/sdk-js": "~5.0.64"
42
+ },
43
43
  "devDependencies": {
44
- "@mui/material": "~7.3.6",
45
- "@types/react": "^19.2.7",
46
- "@xylabs/ts-scripts-yarn3": "~7.2.8",
47
- "@xylabs/tsconfig": "~7.2.8",
48
- "@xylabs/tsconfig-dom": "~7.2.8",
49
- "@xylabs/tsconfig-react": "~7.2.8",
50
- "react": "^19.2.1",
51
- "react-dom": "^19.2.1",
44
+ "@mui/material": "~7.3.7",
45
+ "@types/react": "^19.2.10",
46
+ "@xylabs/ts-scripts-yarn3": "~7.3.2",
47
+ "@xylabs/tsconfig": "~7.3.2",
48
+ "@xylabs/tsconfig-dom": "~7.3.2",
49
+ "@xylabs/tsconfig-react": "~7.3.2",
50
+ "react": "^19.2.4",
51
+ "react-dom": "^19.2.4",
52
52
  "typescript": "^5.9.3"
53
53
  },
54
54
  "peerDependencies": {
@@ -59,4 +59,4 @@
59
59
  "publishConfig": {
60
60
  "access": "public"
61
61
  }
62
- }
62
+ }
@@ -1,5 +1,6 @@
1
1
  import type { PaletteMode, SelectProps } from '@mui/material'
2
2
  import { Select, useTheme } from '@mui/material'
3
+ import { isDefined } from '@xylabs/sdk-js'
3
4
  import React from 'react'
4
5
 
5
6
  export type SelectExProps<T> = SelectProps<T> & {
@@ -11,7 +12,7 @@ export const SelectEx: <T>(props: SelectExProps<T>) => React.JSX.Element = ({
11
12
  MenuProps, mode = 'light', colorize, ...props
12
13
  }) => {
13
14
  const theme = useTheme()
14
- const colorizeMenuProps = colorize ? { MenuListProps: { sx: { backgroundColor: theme.palette[colorize][mode] } } } : {}
15
+ const colorizeMenuProps = isDefined(colorize) ? { MenuListProps: { sx: { backgroundColor: theme.palette[colorize][mode] } } } : {}
15
16
 
16
17
  return (
17
18
  <Select