@xylabs/react-select 4.0.1 → 4.0.3
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,"sources":["../../src/components/SelectEx.tsx"],"sourcesContent":["import { PaletteMode, 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 = ({ 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":";;;;AACA,SAASA,QAAQC,gBAAgB;AACjC,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"]}
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
},
|
|
8
8
|
"bugs": {
|
|
9
9
|
"email": "support@xylabs.com",
|
|
10
|
-
"url": "https://github.com/xylabs/sdk-react/issues"
|
|
10
|
+
"url": "git+https://github.com/xylabs/sdk-react/issues"
|
|
11
11
|
},
|
|
12
12
|
"workspaces": [
|
|
13
13
|
"packages/*"
|
|
@@ -17,9 +17,10 @@
|
|
|
17
17
|
"@mui/icons-material": "^5.16.7",
|
|
18
18
|
"@mui/material": "^5.16.7",
|
|
19
19
|
"@types/react": "^18.3.3",
|
|
20
|
-
"@xylabs/ts-scripts-yarn3": "^4.0.0-rc.
|
|
21
|
-
"@xylabs/tsconfig-react": "^4.0.0-rc.
|
|
20
|
+
"@xylabs/ts-scripts-yarn3": "^4.0.0-rc.20",
|
|
21
|
+
"@xylabs/tsconfig-react": "^4.0.0-rc.20",
|
|
22
22
|
"react": "^18.3.1",
|
|
23
|
+
"react-dom": "^18.3.1",
|
|
23
24
|
"typescript": "^5.5.4"
|
|
24
25
|
},
|
|
25
26
|
"peerDependencies": {
|
|
@@ -48,9 +49,9 @@
|
|
|
48
49
|
},
|
|
49
50
|
"repository": {
|
|
50
51
|
"type": "git",
|
|
51
|
-
"url": "https://github.com/xylabs/sdk-react.git"
|
|
52
|
+
"url": "git+https://github.com/xylabs/sdk-react.git"
|
|
52
53
|
},
|
|
53
54
|
"sideEffects": false,
|
|
54
|
-
"version": "4.0.
|
|
55
|
+
"version": "4.0.3",
|
|
55
56
|
"type": "module"
|
|
56
57
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { PaletteMode,
|
|
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> & {
|
package/xy.config.ts
CHANGED