@junyiacademy/ui-test 0.0.14 → 1.5.0

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.
Files changed (50) hide show
  1. package/declarations/libs/ui/src/interfaces/index.d.ts +4 -3
  2. package/declarations/libs/ui/src/lib/button/Button.d.ts +1 -1
  3. package/declarations/libs/ui/src/lib/button-group/ButtonGroup.d.ts +1 -1
  4. package/declarations/libs/ui/src/lib/menu-item/SelectMenuItem.d.ts +2 -3
  5. package/declarations/libs/ui/src/lib/radio/Radio.d.ts +1 -1
  6. package/declarations/libs/ui/src/lib/select/OutlinedSelect.d.ts +1 -1
  7. package/declarations/libs/ui/src/lib/select/StandardSelect.d.ts +1 -1
  8. package/declarations/libs/ui/src/lib/text-field/TextField.d.ts +1 -1
  9. package/dist/libs/ui/src/lib/button/Button.js +15 -24
  10. package/dist/libs/ui/src/lib/button-group/ButtonGroup.js +10 -19
  11. package/dist/libs/ui/src/lib/menu-item/SelectMenuItem.js +10 -15
  12. package/dist/libs/ui/src/lib/radio/Radio.js +15 -26
  13. package/dist/libs/ui/src/lib/select/OutlinedSelect.js +44 -84
  14. package/dist/libs/ui/src/lib/select/StandardSelect.js +38 -69
  15. package/dist/libs/ui/src/lib/text-field/TextField.js +26 -38
  16. package/dist/libs/ui/src/lib/topic-filter/TopicFilter.js +25 -25
  17. package/package.json +7 -4
  18. package/.eslintrc.json +0 -24
  19. package/.storybook/main.js +0 -9
  20. package/.storybook/preview.js +0 -10
  21. package/.storybook/tsconfig.json +0 -14
  22. package/.storybook/webpack.config.js +0 -84
  23. package/declarations/libs/ui/src/lib/alert/Alert.d.ts +0 -13
  24. package/declarations/libs/ui/src/lib/selection-item/SelectionItem.d.ts +0 -10
  25. package/dist/libs/ui/src/lib/alert/Alert.js +0 -72
  26. package/dist/libs/ui/src/lib/selection-item/SelectionItem.js +0 -16
  27. package/jest.config.js +0 -9
  28. package/src/index.ts +0 -7
  29. package/src/interfaces/index.tsx +0 -33
  30. package/src/lib/button/Button.stories.tsx +0 -50
  31. package/src/lib/button/Button.tsx +0 -85
  32. package/src/lib/button-group/ButtonGroup.stories.tsx +0 -59
  33. package/src/lib/button-group/ButtonGroup.tsx +0 -37
  34. package/src/lib/menu-item/SelectMenuItem.stories.tsx +0 -44
  35. package/src/lib/menu-item/SelectMenuItem.tsx +0 -45
  36. package/src/lib/radio/Radio.stories.tsx +0 -154
  37. package/src/lib/radio/Radio.tsx +0 -93
  38. package/src/lib/select/OutlinedSelect.tsx +0 -215
  39. package/src/lib/select/Select.stories.tsx +0 -297
  40. package/src/lib/select/Select.tsx +0 -13
  41. package/src/lib/select/StandardSelect.tsx +0 -173
  42. package/src/lib/text-field/TextField.stories.tsx +0 -160
  43. package/src/lib/text-field/TextField.tsx +0 -93
  44. package/src/lib/topic-filter/TopicFilter.stories.tsx +0 -83
  45. package/src/lib/topic-filter/TopicFilter.tsx +0 -204
  46. package/src/styles/theme.ts +0 -60
  47. package/src/utils/topicTree.ts +0 -197
  48. package/tsconfig.json +0 -16
  49. package/tsconfig.lib.json +0 -22
  50. package/tsconfig.spec.json +0 -15
@@ -1,59 +0,0 @@
1
- import React, { useState } from 'react'
2
- import { Story, Meta } from '@storybook/react'
3
- import { ButtonGroupProps as MuiButtonGroupProps } from '@material-ui/core'
4
- import { ButtonGroup } from './ButtonGroup'
5
- import { Button } from '../button/Button'
6
-
7
- const ButtonGroupWithState = (props: MuiButtonGroupProps) => {
8
- const [activeId, setActiveId] = useState(null)
9
-
10
- const buttons = ['JUI', 'MUI', 'Unstyled UI']
11
-
12
- return (
13
- <ButtonGroup {...props}>
14
- {buttons.map((id) => (
15
- <Button
16
- key={id}
17
- onClick={() => setActiveId(id)}
18
- active={id === activeId}
19
- >
20
- {id}
21
- </Button>
22
- ))}
23
- </ButtonGroup>
24
- )
25
- }
26
-
27
- export default {
28
- component: ButtonGroup,
29
- title: 'ButtonGroup',
30
- argTypes: {
31
- variant: {
32
- table: {
33
- defaultValue: { summary: 'contained' },
34
- },
35
- },
36
- color: {
37
- table: {
38
- defaultValue: { summary: 'default' },
39
- },
40
- },
41
- disabled: {
42
- table: {
43
- defaultValue: { summary: false },
44
- },
45
- },
46
- },
47
- } as Meta
48
-
49
- const Template: Story<MuiButtonGroupProps> = (args) => (
50
- <ButtonGroupWithState {...args} />
51
- )
52
-
53
- export const Basic = Template.bind({})
54
-
55
- Basic.args = {
56
- variant: 'contained',
57
- color: 'default',
58
- disabled: false,
59
- }
@@ -1,37 +0,0 @@
1
- import React from 'react'
2
- import { styled, fade } from '@material-ui/core/styles'
3
- import {
4
- ButtonGroup as MuiButtonGroup,
5
- ButtonGroupProps as MuiButtonGroupProps,
6
- } from '@material-ui/core'
7
-
8
- const PREFIX = 'JuiButtonGroup'
9
-
10
- const classes = {
11
- grouped: `${PREFIX}-grouped`,
12
- groupedOutlinedPrimary: `${PREFIX}-groupedOutlinedPrimary`,
13
- groupedOutlinedSecondary: `${PREFIX}-groupedOutlinedSecondary`,
14
- disabled: `${PREFIX}-disabled`,
15
- }
16
-
17
- const StyledButtonGroup = styled(({ ...props }) => (
18
- <MuiButtonGroup classes={classes} {...props} />
19
- ))(({ theme }) => ({
20
- [`& .${classes.groupedOutlinedPrimary}.${classes.grouped}.${classes.disabled}`]: {
21
- borderColor: fade(theme.palette.primary.main, 0.5),
22
- color: fade(theme.palette.primary.main, 0.5),
23
- },
24
- [`& .${classes.groupedOutlinedSecondary}.${classes.grouped}.${classes.disabled}`]: {
25
- borderColor: fade(theme.palette.secondary.main, 0.5),
26
- color: fade(theme.palette.secondary.main, 0.5),
27
- },
28
- }))
29
-
30
- export const ButtonGroup = ({
31
- children,
32
- ...otherProps
33
- }: MuiButtonGroupProps) => (
34
- <StyledButtonGroup {...otherProps}>{children}</StyledButtonGroup>
35
- )
36
-
37
- export default ButtonGroup
@@ -1,44 +0,0 @@
1
- import React from 'react'
2
- import { Story, Meta } from '@storybook/react'
3
- import { Menu } from '@material-ui/core'
4
- import SelectMenuItem, { SelectMenuItemProps } from './SelectMenuItem'
5
-
6
- export default {
7
- component: SelectMenuItem,
8
- title: 'SelectMenuItem',
9
- argTypes: {
10
- value: {
11
- type: { name: 'any', required: false },
12
- description: `The input value. Providing an empty string will select no options. This prop is required when the native prop is false (default). Set to an empty string '' if you don't want any of the available options to be selected.
13
- If the value is an object it must have reference equality with the option in order to be selected. If the value is not an object, the string representation must match with the string representation of the option in order to be selected.`,
14
- table: {
15
- type: { summary: 'any' },
16
- defaultValue: { summary: '' },
17
- },
18
- },
19
- disabled: {
20
- type: { name: 'boolean', required: false },
21
- description: 'Control the disabled display state.',
22
- table: {
23
- type: { summary: 'boolean' },
24
- defaultValue: { summary: true },
25
- },
26
- control: { type: 'boolean' },
27
- defaultValue: true,
28
- },
29
- },
30
- } as Meta
31
-
32
- const Template: Story<SelectMenuItemProps> = (args) => (
33
- <Menu open={true}>
34
- <SelectMenuItem {...args}>Test</SelectMenuItem>
35
- <SelectMenuItem {...args}>Example</SelectMenuItem>
36
- </Menu>
37
- )
38
-
39
- export const Primary = Template.bind({})
40
-
41
- Primary.args = {
42
- value: '',
43
- disabled: false,
44
- }
@@ -1,45 +0,0 @@
1
- import React, { PropsWithChildren } from 'react'
2
- import { Theme, styled } from '@material-ui/core/styles'
3
- import { MenuItem, MenuItemProps } from '@material-ui/core'
4
-
5
- // self-defined-components
6
- const PREFIX = 'JuiSelectMenuItem'
7
-
8
- const classes = {
9
- menuItemSelected: `${PREFIX}-menuItemSelected`,
10
- }
11
-
12
- interface StyledMenuItemProps {
13
- width: number | 'auto'
14
- theme?: Theme
15
- }
16
-
17
- const StyledMenuItem = styled(({ width: _width, ...props }) => (
18
- <MenuItem classes={{ selected: classes.menuItemSelected }} {...props} />
19
- ))(({ width, theme }: StyledMenuItemProps) => ({
20
- width: width,
21
- whiteSpace: 'unset',
22
- color: theme.palette.text.primary,
23
- [`& .${classes.menuItemSelected}`]: {
24
- backgroundColor: theme.palette.grey[300],
25
- },
26
- }))
27
-
28
- export interface SelectMenuItemProps extends MenuItemProps {
29
- width: number | 'auto'
30
- value?: any
31
- disabled?: boolean
32
- }
33
-
34
- const SelectMenuItem = React.forwardRef<
35
- HTMLLIElement,
36
- PropsWithChildren<SelectMenuItemProps>
37
- >(({ width, children, value = '', ...otherProps }, ref) => {
38
- return (
39
- <StyledMenuItem width={width} innerRef={ref} value={value} {...otherProps}>
40
- {children}
41
- </StyledMenuItem>
42
- )
43
- })
44
-
45
- export default SelectMenuItem
@@ -1,154 +0,0 @@
1
- import React, { useEffect } from 'react'
2
- import { Story, Meta } from '@storybook/react'
3
- import {
4
- FormControl,
5
- FormLabel,
6
- FormHelperText,
7
- RadioGroup,
8
- } from '@material-ui/core'
9
- import { Radio, RadioProps } from './Radio'
10
-
11
- export default {
12
- component: Radio,
13
- title: 'Radio',
14
- argTypes: {
15
- disabled: {
16
- type: { name: 'boolean', required: false },
17
- description: 'If true, the radio will be disabled.',
18
- table: {
19
- type: { summary: 'boolean' },
20
- defaultValue: { summary: false },
21
- },
22
- control: { type: 'boolean' },
23
- },
24
- labelPlacement: {
25
- type: { name: 'string', required: false },
26
- description: 'The position of the label.',
27
- table: {
28
- type: { summary: 'end' },
29
- defaultValue: { summary: 'end' },
30
- category: 'not comparable with caption',
31
- },
32
- options: ['end'],
33
- control: { type: 'radio' },
34
- },
35
- color: {
36
- type: { name: 'string', required: false },
37
- description:
38
- 'The color of the component. It supports those theme colors that make sense for this component.',
39
- table: {
40
- type: { summary: 'primary | secondary | default' },
41
- defaultValue: { summary: 'secondary' },
42
- },
43
- options: ['primary', 'secondary', 'default'],
44
- control: { type: 'radio' },
45
- },
46
- size: {
47
- type: { name: 'string', required: false },
48
- description:
49
- 'The size of the radio. small is equivalent to the dense radio styling.',
50
- table: {
51
- type: { summary: 'medium | small' },
52
- defaultValue: { summary: 'medium' },
53
- },
54
- options: ['medium', 'small'],
55
- control: { type: 'radio' },
56
- },
57
- },
58
- } as Meta
59
-
60
- const WithLabelStory: Story<RadioProps> = (args) => <Radio {...args} />
61
-
62
- export const WithLabel = WithLabelStory.bind({})
63
-
64
- WithLabel.args = {
65
- disabled: false,
66
- labelPlacement: 'end',
67
- color: 'secondary',
68
- size: 'medium',
69
- value: 'JUI',
70
- label: 'JUI',
71
- }
72
-
73
- const RadioWithCaption = (props: RadioProps) => {
74
- const [value, setValue] = React.useState('')
75
-
76
- const handleRadioChange = (event) => {
77
- setValue(event.target.value)
78
- }
79
-
80
- return (
81
- <RadioGroup value={value} onChange={handleRadioChange}>
82
- <Radio caption={value && 'caption'} {...props} />
83
- </RadioGroup>
84
- )
85
- }
86
-
87
- const WithCaptionStory: Story<RadioProps> = (args) => (
88
- <RadioWithCaption {...args} />
89
- )
90
-
91
- export const WithCaption = WithCaptionStory.bind({})
92
-
93
- WithCaption.args = {
94
- disabled: false,
95
- labelPlacement: 'end',
96
- color: 'secondary',
97
- size: 'medium',
98
- value: 'JUI',
99
- label: 'JUI',
100
- }
101
-
102
- const RadioWithFormGroup = (props: RadioProps) => {
103
- const options = ['JUI', 'MUI', 'MUIX']
104
- const [value, setValue] = React.useState('')
105
- const [error, setError] = React.useState(false)
106
- const [helperText, setHelperText] = React.useState('Choose wisely')
107
-
108
- const handleRadioChange = (event) => {
109
- setValue(event.target.value)
110
- setHelperText('')
111
- setError(false)
112
- }
113
-
114
- useEffect(() => {
115
- if (!value) {
116
- return
117
- }
118
-
119
- if (value === 'JUI') {
120
- setHelperText('You got it!')
121
- setError(false)
122
- } else {
123
- setHelperText("I'm sorry to hear that.")
124
- setError(true)
125
- }
126
- }, [value])
127
-
128
- return (
129
- <FormControl component='fieldset' error={error}>
130
- <FormLabel component='legend'>
131
- Choose the UI made by Junyiacademy
132
- </FormLabel>
133
- <RadioGroup name='ui' value={value} onChange={handleRadioChange}>
134
- {options.map((option) => (
135
- <Radio key={option} label={option} value={option} {...props} />
136
- ))}
137
- </RadioGroup>
138
- <FormHelperText>{helperText}</FormHelperText>
139
- </FormControl>
140
- )
141
- }
142
-
143
- const WithFormGroupStory: Story<RadioProps> = (args) => (
144
- <RadioWithFormGroup {...args} />
145
- )
146
-
147
- export const WithFormGroup = WithFormGroupStory.bind({})
148
-
149
- WithFormGroup.args = {
150
- disabled: false,
151
- labelPlacement: 'end',
152
- color: 'secondary',
153
- size: 'medium',
154
- }
@@ -1,93 +0,0 @@
1
- import React from 'react'
2
- import { styled } from '@material-ui/core/styles'
3
- import {
4
- Radio as MuiRadio,
5
- RadioProps as MuiRadioProps,
6
- FormControlLabel,
7
- FormControlLabelProps,
8
- Typography,
9
- } from '@material-ui/core'
10
-
11
- const PREFIX = 'JuiRadio'
12
-
13
- const classes = {
14
- formControlLabel: `${PREFIX}-formControl-label`,
15
- formControlDisabled: `${PREFIX}-formControl-disabled`,
16
- radioChecked: `${PREFIX}-radio-checked`,
17
- }
18
-
19
- const StyledFormControlLabel = styled((props) => (
20
- <FormControlLabel
21
- classes={{
22
- label: classes.formControlLabel,
23
- disabled: classes.formControlDisabled,
24
- }}
25
- {...props}
26
- />
27
- ))(({ theme }) => ({
28
- [`& .${classes.formControlLabel}`]: {
29
- color: theme.palette.text.secondary,
30
- [`&.${classes.formControlDisabled}`]: {
31
- color: theme.palette.text.disabled,
32
- },
33
- },
34
- [`& .${classes.radioChecked} + .${classes.formControlLabel}`]: {
35
- color: theme.palette.text.primary,
36
- },
37
- }))
38
-
39
- const StyledRadio = styled((props) => (
40
- <MuiRadio
41
- classes={{
42
- checked: classes.radioChecked,
43
- }}
44
- {...props}
45
- />
46
- ))(({ theme }) => ({
47
- color: theme.palette.text.primary,
48
- }))
49
-
50
- const StyledTypography = styled(Typography)(({ theme }) => ({
51
- color: theme.palette.text.disabled,
52
- margin: '0 0 0 30px',
53
- }))
54
-
55
- export interface RadioProps extends FormControlLabelProps {
56
- color?: 'primary' | 'secondary' | 'default'
57
- size?: 'medium' | 'small'
58
- caption?: string
59
- formControlLabelProps?: Partial<FormControlLabelProps>
60
- radioProps?: Partial<MuiRadioProps>
61
- }
62
-
63
- export const Radio = ({
64
- checked,
65
- disabled,
66
- label,
67
- labelPlacement,
68
- value,
69
- formControlLabelProps,
70
- radioProps,
71
- color = 'secondary',
72
- size = 'medium',
73
- caption = '',
74
- }: RadioProps) => {
75
- return (
76
- <>
77
- <StyledFormControlLabel
78
- control={<StyledRadio color={color} size={size} {...radioProps} />}
79
- checked={checked}
80
- disabled={disabled}
81
- label={label}
82
- labelPlacement={labelPlacement}
83
- value={value}
84
- {...formControlLabelProps}
85
- />
86
- {caption && (
87
- <StyledTypography variant='body2'>{caption}</StyledTypography>
88
- )}
89
- </>
90
- )
91
- }
92
-
93
- export default Radio
@@ -1,215 +0,0 @@
1
- import React from 'react'
2
- import { Theme, styled } from '@material-ui/core/styles'
3
- import {
4
- InputLabel,
5
- FormControl,
6
- Select,
7
- OutlinedInput,
8
- FormHelperText,
9
- } from '@material-ui/core'
10
- import { SelectProps } from '../../interfaces'
11
-
12
- // self-defined-components
13
- const PREFIX = 'JuiOutlinedSelect'
14
-
15
- const classes = {
16
- inputLabelFocused: `${PREFIX}-inputLabelFocused`,
17
- inputLabelOutlined: `${PREFIX}-inputLabelOutlined`,
18
- inputLabelMarginDense: `${PREFIX}-inputLabelMarginDense`,
19
- inputLabelShrink: `${PREFIX}-inputLabelShrink`,
20
- inputLabelError: `${PREFIX}-inputLabelError`,
21
- inputLabelDisabled: `${PREFIX}-inputLabelDisabled`,
22
- outlineInputInput: `${PREFIX}-input`,
23
- outlineInputRoot: `${PREFIX}-inputRoot`,
24
- outlineInputInputMarginDense: `${PREFIX}-inputMarginDense`,
25
- outlineInputNotchedOutline: `${PREFIX}-notchedOutline`,
26
- outlineInputDisabled: `${PREFIX}-inputDisabled`,
27
- outlineInputError: `${PREFIX}-outlinedInputError`,
28
- outlineInputFocused: `${PREFIX}-focused`,
29
- selectPaper: `${PREFIX}-menuPaper`,
30
- }
31
-
32
- interface StyledFormControlProps {
33
- color: 'primary' | 'secondary'
34
- width: number | 'auto'
35
- theme?: Theme
36
- }
37
-
38
- const StyledFormControl = styled(
39
- ({ color: _color, width: _width, ...props }) => <FormControl {...props} />
40
- )(({ color, width, theme }: StyledFormControlProps) => ({
41
- margin: theme.spacing(1),
42
- width: width,
43
- backgroundColor: 'white',
44
- '&:hover': {
45
- [`& :not(.${classes.outlineInputDisabled}):not(.${classes.outlineInputError}) .${classes.outlineInputNotchedOutline}`]: {
46
- borderColor: theme.palette[color].main,
47
- },
48
- },
49
- }))
50
-
51
- interface StyledInputLabelProps {
52
- color: 'primary' | 'secondary'
53
- theme?: Theme
54
- }
55
-
56
- const StyledInputLabel = styled(({ color: _color, ...props }) => (
57
- <InputLabel
58
- classes={{
59
- outlined: classes.inputLabelOutlined,
60
- marginDense: classes.inputLabelMarginDense,
61
- shrink: classes.inputLabelShrink,
62
- focused: classes.inputLabelFocused,
63
- disabled: classes.inputLabelDisabled,
64
- error: classes.inputLabelError,
65
- }}
66
- {...props}
67
- />
68
- ))(({ color, theme }: StyledInputLabelProps) => ({
69
- color: theme.palette.text.secondary,
70
- [`&.${classes.inputLabelOutlined}`]: {
71
- [`&:not(.${classes.inputLabelDisabled}) .${classes.inputLabelFocused}`]: {
72
- color: theme.palette.action.active,
73
- },
74
- [`&.${classes.inputLabelMarginDense}:not(.${classes.inputLabelShrink})`]: {
75
- transform: 'translate(12px, 16px) scale(1)',
76
- },
77
- },
78
- [`&.${classes.inputLabelShrink}:not(.${classes.inputLabelError}):not(.${classes.inputLabelDisabled}).${classes.inputLabelFocused}`]: {
79
- color: theme.palette[color].main,
80
- },
81
- [`&.${classes.inputLabelShrink}`]: {
82
- backgroundColor: '#ffffff',
83
- padding: '0 2px',
84
- },
85
- }))
86
-
87
- interface StyledOutlinedInputProps {
88
- theme?: Theme
89
- }
90
-
91
- const StyledOutlinedInput = styled((props) => (
92
- <OutlinedInput
93
- classes={{
94
- root: classes.outlineInputRoot,
95
- input: classes.outlineInputInput,
96
- focused: classes.outlineInputFocused,
97
- inputMarginDense: classes.outlineInputInputMarginDense,
98
- notchedOutline: classes.outlineInputNotchedOutline,
99
- disabled: classes.outlineInputDisabled,
100
- error: classes.outlineInputError,
101
- }}
102
- {...props}
103
- />
104
- ))(({ theme }: StyledOutlinedInputProps) => ({
105
- [`&.${classes.outlineInputRoot}`]: {
106
- [`&.${classes.outlineInputError}.${classes.outlineInputFocused} .${classes.outlineInputNotchedOutline}`]: {
107
- borderColor: `${theme.palette.error.main}`,
108
- },
109
- [`& .${classes.outlineInputInputMarginDense}`]: {
110
- padding: '14.5px 15px 14.5px 12px',
111
- },
112
- },
113
- [`& .${classes.outlineInputInput}`]: {
114
- color: theme.palette.text.primary,
115
- ['&:focus']: {
116
- background: 'rgba(0,0,0,0)',
117
- },
118
- },
119
- }))
120
-
121
- interface StyledSelectProps {
122
- paperMaxHeight: number | 'auto'
123
- hasAdornment: boolean
124
- }
125
-
126
- const StyledSelect = styled(
127
- ({
128
- paperMaxHeight: _paperMaxHeight,
129
- hasAdornment: _hasAdornment,
130
- className,
131
- ...props
132
- }) => (
133
- <Select
134
- MenuProps={{
135
- disableAutoFocusItem: true,
136
- anchorOrigin: {
137
- vertical: 2,
138
- horizontal: 'left',
139
- },
140
- transformOrigin: {
141
- vertical: 'top',
142
- horizontal: 'left',
143
- },
144
- getContentAnchorEl: null,
145
- classes: {
146
- paper: className,
147
- },
148
- }}
149
- {...props}
150
- />
151
- )
152
- )(({ hasAdornment, paperMaxHeight }: StyledSelectProps) => ({
153
- '&': {
154
- maxHeight: paperMaxHeight,
155
- left: hasAdornment ? '24px !important' : '70px',
156
- },
157
- }))
158
-
159
- export const OutlinedSelect = ({
160
- placeholder,
161
- helperText,
162
- InputProps,
163
- SelectProps,
164
- children,
165
- color = 'primary',
166
- size = 'small',
167
- width = 'auto',
168
- paperMaxHeight = 'auto',
169
- error = false,
170
- hasLabel = true,
171
- hasShrink = false,
172
- value = '',
173
- disabled = false,
174
- }: SelectProps) => {
175
- const hasAdornment = !!InputProps?.startAdornment
176
- const hasHelperText = !!helperText
177
- return (
178
- <StyledFormControl
179
- size={size}
180
- width={width}
181
- disabled={disabled}
182
- error={error}
183
- color={color}
184
- >
185
- {hasLabel && (
186
- <StyledInputLabel
187
- color={color}
188
- variant='outlined'
189
- shrink={hasShrink ? true : undefined}
190
- >
191
- {placeholder}
192
- </StyledInputLabel>
193
- )}
194
- <StyledSelect
195
- value={value}
196
- paperMaxHeight={paperMaxHeight}
197
- hasAdornment={hasAdornment}
198
- input={
199
- <StyledOutlinedInput
200
- color={color}
201
- label={hasLabel ? placeholder : undefined}
202
- disabled={disabled}
203
- {...InputProps}
204
- />
205
- }
206
- {...SelectProps}
207
- >
208
- {children}
209
- </StyledSelect>
210
- {hasHelperText && <FormHelperText>{helperText}</FormHelperText>}
211
- </StyledFormControl>
212
- )
213
- }
214
-
215
- export default OutlinedSelect