@xylabs/react-select 4.0.2 → 4.0.4

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.
@@ -0,0 +1,8 @@
1
+ import type { 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
@@ -0,0 +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"}
@@ -0,0 +1,2 @@
1
+ export * from './SelectEx.tsx';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA"}
@@ -1,10 +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, type SelectExProps };
1
+ export * from './components/index.ts';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/SelectEx.tsx"],"sourcesContent":["import { PaletteMode, Select, SelectProps, 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 = ({ 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={{ ...MenuProps, ...colorizeMenuProps }} {...props} />\n}\n"],"mappings":";;;;AAAA,SAAsBA,QAAqBC,gBAAgB;AAC3D,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,WAAW;MAAE,GAAGA;MAAW,GAAGM;IAAkB;IAAI,GAAGH;;AACxE,GAL2E;","names":["Select","useTheme","React","SelectEx","MenuProps","mode","colorize","props","theme","useTheme","colorizeMenuProps","MenuListProps","sx","backgroundColor","palette","Select"]}
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,25 +1,49 @@
1
1
  {
2
2
  "name": "@xylabs/react-select",
3
+ "version": "4.0.4",
4
+ "description": "Common React library for all XY Labs projects that use React",
5
+ "keywords": [
6
+ "utility",
7
+ "typescript",
8
+ "react"
9
+ ],
10
+ "homepage": "https://xylabs.com",
11
+ "bugs": {
12
+ "url": "git+https://github.com/xylabs/sdk-react/issues",
13
+ "email": "support@xylabs.com"
14
+ },
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "git+https://github.com/xylabs/sdk-react.git"
18
+ },
19
+ "license": "LGPL-3.0-only",
3
20
  "author": {
4
- "email": "support@xylabs.com",
5
21
  "name": "XY Labs Development Team",
22
+ "email": "support@xylabs.com",
6
23
  "url": "https://xylabs.com"
7
24
  },
8
- "bugs": {
9
- "email": "support@xylabs.com",
10
- "url": "https://github.com/xylabs/sdk-react/issues"
25
+ "sideEffects": false,
26
+ "type": "module",
27
+ "exports": {
28
+ ".": {
29
+ "types": "./dist/browser/index.d.ts",
30
+ "default": "./dist/browser/index.mjs"
31
+ },
32
+ "./package.json": "./package.json"
11
33
  },
34
+ "module": "./dist/browser/index.mjs",
35
+ "types": "dist/browser/index.d.ts",
12
36
  "workspaces": [
13
37
  "packages/*"
14
38
  ],
15
- "description": "Common React library for all XY Labs projects that use React",
16
39
  "devDependencies": {
17
40
  "@mui/icons-material": "^5.16.7",
18
41
  "@mui/material": "^5.16.7",
19
- "@types/react": "^18.3.3",
20
- "@xylabs/ts-scripts-yarn3": "^4.0.0-rc.15",
21
- "@xylabs/tsconfig-react": "^4.0.0-rc.15",
42
+ "@types/react": "^18.3.4",
43
+ "@xylabs/ts-scripts-yarn3": "^4.0.7",
44
+ "@xylabs/tsconfig-react": "^4.0.7",
22
45
  "react": "^18.3.1",
46
+ "react-dom": "^18.3.1",
23
47
  "typescript": "^5.5.4"
24
48
  },
25
49
  "peerDependencies": {
@@ -27,30 +51,7 @@
27
51
  "react": "^18",
28
52
  "react-dom": "^18"
29
53
  },
30
- "exports": {
31
- ".": {
32
- "types": "./dist/browser/index.d.ts",
33
- "default": "./dist/browser/index.mjs"
34
- },
35
- "./package.json": "./package.json"
36
- },
37
- "types": "dist/browser/index.d.ts",
38
- "module": "./dist/browser/index.mjs",
39
- "homepage": "https://xylabs.com",
40
- "keywords": [
41
- "utility",
42
- "typescript",
43
- "react"
44
- ],
45
- "license": "LGPL-3.0-only",
46
54
  "publishConfig": {
47
55
  "access": "public"
48
- },
49
- "repository": {
50
- "type": "git",
51
- "url": "https://github.com/xylabs/sdk-react.git"
52
- },
53
- "sideEffects": false,
54
- "version": "4.0.2",
55
- "type": "module"
56
+ }
56
57
  }
@@ -1,4 +1,5 @@
1
- import { PaletteMode, Select, SelectProps, useTheme } from '@mui/material'
1
+ import type { PaletteMode, SelectProps } from '@mui/material'
2
+ import { Select, useTheme } from '@mui/material'
2
3
  import React from 'react'
3
4
 
4
5
  export type SelectExProps<T> = SelectProps<T> & {
@@ -6,9 +7,16 @@ export type SelectExProps<T> = SelectProps<T> & {
6
7
  mode?: PaletteMode
7
8
  }
8
9
 
9
- export const SelectEx: <T>(props: SelectExProps<T>) => React.JSX.Element = ({ MenuProps, mode = 'light', colorize, ...props }) => {
10
+ export const SelectEx: <T>(props: SelectExProps<T>) => React.JSX.Element = ({
11
+ MenuProps, mode = 'light', colorize, ...props
12
+ }) => {
10
13
  const theme = useTheme()
11
14
  const colorizeMenuProps = colorize ? { MenuListProps: { sx: { backgroundColor: theme.palette[colorize][mode] } } } : {}
12
15
 
13
- return <Select MenuProps={{ ...MenuProps, ...colorizeMenuProps }} {...props} />
16
+ return (
17
+ <Select
18
+ MenuProps={{ ...MenuProps, ...colorizeMenuProps }}
19
+ {...props}
20
+ />
21
+ )
14
22
  }
package/xy.config.ts CHANGED
@@ -1,9 +1,7 @@
1
- import { XyTsupConfig } from '@xylabs/ts-scripts-yarn3'
1
+ import type { XyTsupConfig } from '@xylabs/ts-scripts-yarn3'
2
2
  const config: XyTsupConfig = {
3
3
  compile: {
4
- browser: {
5
- src: {},
6
- },
4
+ browser: { src: {} },
7
5
  node: {},
8
6
  neutral: {},
9
7
  },