@junyiacademy/ui-test 1.5.6 → 1.5.9

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.
@@ -4,5 +4,5 @@ export interface SelectMenuItemProps extends MenuItemProps {
4
4
  value?: any;
5
5
  disabled?: boolean;
6
6
  }
7
- declare const SelectMenuItem: React.ForwardRefExoticComponent<Pick<React.PropsWithChildren<SelectMenuItemProps>, "classes" | "value" | "onChange" | "children" | "onKeyUp" | "onKeyDown" | "onBlur" | "onFocus" | "defaultValue" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "autoFocus" | "disabled" | "sx" | "key" | "action" | "dense" | "selected" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "disableGutters" | "divider"> & React.RefAttributes<HTMLLIElement>>;
7
+ declare const SelectMenuItem: React.ForwardRefExoticComponent<Pick<React.PropsWithChildren<SelectMenuItemProps>, "classes" | "value" | "onChange" | "children" | "onKeyUp" | "onKeyDown" | "onBlur" | "onFocus" | "defaultValue" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "autoFocus" | "disabled" | "sx" | "key" | "action" | "selected" | "dense" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "disableGutters" | "divider"> & React.RefAttributes<HTMLLIElement>>;
8
8
  export default SelectMenuItem;
@@ -0,0 +1 @@
1
+ export default function capitalize(string: any): any;
@@ -6,19 +6,22 @@ const react_1 = tslib_1.__importDefault(require("react"));
6
6
  const styles_1 = require("@mui/material/styles");
7
7
  const material_1 = require("@mui/material");
8
8
  const Button_1 = require("@mui/material/Button");
9
+ //utils
10
+ const Capitalize_1 = tslib_1.__importDefault(require("../../utils/Capitalize"));
9
11
  const StyledButton = styles_1.styled(material_1.Button, {
10
12
  shouldForwardProp: (prop) => prop !== 'active',
11
- })(({ active, theme }) => ({
12
- [`&.${Button_1.buttonClasses.outlinedPrimary}`]: {
13
+ })(({ active, color = 'primary', theme }) => ({
14
+ // For variant: outlined
15
+ [`&.${Button_1.buttonClasses.outlined}${Capitalize_1.default(color)}`]: {
13
16
  backgroundColor: active
14
- ? theme.palette.primary.main
17
+ ? theme.palette[color].main
15
18
  : theme.palette.common.white,
16
- color: active ? theme.palette.common.white : theme.palette.primary.main,
17
- borderColor: theme.palette.primary.main,
19
+ color: active ? theme.palette.common.white : theme.palette[color].main,
20
+ borderColor: theme.palette[color].main,
18
21
  '&:hover': {
19
22
  backgroundColor: active
20
- ? theme.palette.primary.main
21
- : styles_1.alpha(theme.palette.primary.main, 0.1),
23
+ ? theme.palette[color].main
24
+ : styles_1.alpha(theme.palette[color].main, 0.1),
22
25
  },
23
26
  [`&.${Button_1.buttonClasses.disabled}`]: {
24
27
  backgroundColor: theme.palette.common.white,
@@ -26,31 +29,15 @@ const StyledButton = styles_1.styled(material_1.Button, {
26
29
  color: theme.palette.action.disabled,
27
30
  },
28
31
  },
29
- [`&.${Button_1.buttonClasses.outlinedSecondary}`]: {
30
- backgroundColor: active
31
- ? theme.palette.secondary.main
32
- : theme.palette.common.white,
33
- color: active ? theme.palette.common.white : theme.palette.secondary.main,
34
- borderColor: theme.palette.secondary.main,
35
- '&:hover': {
36
- backgroundColor: active
37
- ? theme.palette.secondary.main
38
- : styles_1.alpha(theme.palette.secondary.main, 0.1),
39
- },
40
- [`&.${Button_1.buttonClasses.disabled}`]: {
41
- backgroundColor: theme.palette.common.white,
42
- borderColor: theme.palette.action.disabledBackground,
43
- color: theme.palette.action.disabled,
44
- },
45
- },
46
- [`&.${Button_1.buttonClasses.textPrimary}`]: {
32
+ // For variant: text
33
+ [`&.${Button_1.buttonClasses.text}${Capitalize_1.default(color)}`]: {
47
34
  '&:hover': {
48
- backgroundColor: styles_1.alpha(theme.palette.primary.main, 0.1),
35
+ backgroundColor: styles_1.alpha(theme.palette[color].main, 0.1),
49
36
  },
50
37
  },
51
- [`&.${Button_1.buttonClasses.textSecondary}`]: {
38
+ [`&.${Button_1.buttonClasses.text}${Capitalize_1.default(color)}`]: {
52
39
  '&:hover': {
53
- backgroundColor: styles_1.alpha(theme.palette.secondary.main, 0.1),
40
+ backgroundColor: styles_1.alpha(theme.palette[color].main, 0.1),
54
41
  },
55
42
  },
56
43
  }));
@@ -6,6 +6,7 @@ const react_1 = tslib_1.__importDefault(require("react"));
6
6
  const styles_1 = require("@mui/material/styles");
7
7
  const material_1 = require("@mui/material");
8
8
  const ButtonGroup_1 = require("@mui/material/ButtonGroup");
9
+ // self-defined-components
9
10
  const StyledButtonGroup = styles_1.styled(material_1.ButtonGroup)(({ theme }) => ({
10
11
  [`& .${ButtonGroup_1.buttonGroupClasses.groupedOutlinedPrimary}.${ButtonGroup_1.buttonGroupClasses.grouped}.${ButtonGroup_1.buttonGroupClasses.disabled}`]: {
11
12
  borderColor: styles_1.alpha(theme.palette.primary.main, 0.5),
@@ -2,21 +2,19 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const react_1 = tslib_1.__importDefault(require("react"));
5
- const styles_1 = require("@mui/material/styles");
6
5
  const material_1 = require("@mui/material");
7
6
  const MenuItem_1 = require("@mui/material/MenuItem");
8
- const StyledMenuItem = styles_1.styled(material_1.MenuItem)(({ theme }) => ({
9
- whiteSpace: 'unset',
10
- color: theme.palette.text.primary,
11
- [`&.${MenuItem_1.menuItemClasses.selected}`]: {
12
- backgroundColor: theme.palette.grey[300],
13
- '&:hover': {
14
- backgroundColor: theme.palette.grey[200],
15
- },
16
- },
17
- }));
18
- const SelectMenuItem = react_1.default.forwardRef((_a, ref) => {
7
+ const SelectMenuItem = react_1.default.forwardRef((_a) => {
19
8
  var { children, value = '' } = _a, otherProps = tslib_1.__rest(_a, ["children", "value"]);
20
- return (react_1.default.createElement(StyledMenuItem, Object.assign({ value: value }, otherProps), children));
9
+ return (react_1.default.createElement(material_1.MenuItem, Object.assign({ sx: (theme) => ({
10
+ whiteSpace: 'unset',
11
+ color: theme.palette.text.primary,
12
+ [`&.${MenuItem_1.menuItemClasses.selected}`]: {
13
+ backgroundColor: theme.palette.grey[300],
14
+ '&:hover': {
15
+ backgroundColor: theme.palette.grey[200],
16
+ },
17
+ },
18
+ }), value: value }, otherProps), children));
21
19
  });
22
20
  exports.default = SelectMenuItem;
@@ -7,6 +7,7 @@ const styles_1 = require("@mui/material/styles");
7
7
  const material_1 = require("@mui/material");
8
8
  const FormControlLabel_1 = require("@mui/material/FormControlLabel");
9
9
  const Radio_1 = require("@mui/material/Radio");
10
+ // self-defined-components
10
11
  const StyledFormControlLabel = styles_1.styled(material_1.FormControlLabel)(({ theme }) => ({
11
12
  [`& .${FormControlLabel_1.formControlLabelClasses.label}`]: {
12
13
  color: theme.palette.text.secondary,
@@ -5,19 +5,10 @@ const tslib_1 = require("tslib");
5
5
  const react_1 = tslib_1.__importDefault(require("react"));
6
6
  const styles_1 = require("@mui/material/styles");
7
7
  const material_1 = require("@mui/material");
8
+ const FormHelperText_1 = require("@mui/material/FormHelperText");
8
9
  const InputLabel_1 = require("@mui/material/InputLabel");
9
10
  const OutlinedInput_1 = require("@mui/material/OutlinedInput");
10
11
  const InputBase_1 = require("@mui/material/InputBase");
11
- const StyledFormControl = styles_1.styled(material_1.FormControl, {
12
- shouldForwardProp: (prop) => prop !== 'color',
13
- })(({ color, theme }) => ({
14
- backgroundColor: 'white',
15
- '&:hover': {
16
- [`& :not(.${OutlinedInput_1.outlinedInputClasses.disabled}):not(.${OutlinedInput_1.outlinedInputClasses.error}) .${OutlinedInput_1.outlinedInputClasses.notchedOutline}`]: {
17
- borderColor: theme.palette[color].main,
18
- },
19
- },
20
- }));
21
12
  const StyledInputLabel = styles_1.styled(material_1.InputLabel, {
22
13
  shouldForwardProp: (prop) => prop !== 'color',
23
14
  })(({ color, theme }) => ({
@@ -59,7 +50,14 @@ const StyledOutlinedInput = styles_1.styled(material_1.OutlinedInput)(({ theme }
59
50
  }));
60
51
  const OutlinedSelect = ({ label, helperText, InputProps, SelectProps, className, children, color = 'primary', size = 'small', paperMaxHeight = 'auto', error = false, hasLabel = true, hasShrink = false, value = '', disabled = false, }) => {
61
52
  const hasHelperText = !!helperText;
62
- return (react_1.default.createElement(StyledFormControl, { size: size, disabled: disabled, error: error, color: color, className: className },
53
+ return (react_1.default.createElement(material_1.FormControl, { sx: (theme) => ({
54
+ backgroundColor: 'white',
55
+ '&:hover': {
56
+ [`& :not(.${OutlinedInput_1.outlinedInputClasses.disabled}):not(.${OutlinedInput_1.outlinedInputClasses.error}) .${OutlinedInput_1.outlinedInputClasses.notchedOutline}`]: {
57
+ borderColor: theme.palette[color].main,
58
+ },
59
+ },
60
+ }), size: size, disabled: disabled, error: error, color: color, className: className },
63
61
  hasLabel && (react_1.default.createElement(StyledInputLabel, { color: color, shrink: hasShrink ? true : undefined }, label)),
64
62
  react_1.default.createElement(material_1.Select, Object.assign({ value: value, label: hasLabel ? label : undefined, MenuProps: {
65
63
  PaperProps: {
@@ -77,7 +75,11 @@ const OutlinedSelect = ({ label, helperText, InputProps, SelectProps, className,
77
75
  horizontal: 'left',
78
76
  },
79
77
  }, input: react_1.default.createElement(StyledOutlinedInput, Object.assign({ color: color, label: hasLabel ? label : undefined, disabled: disabled }, InputProps)) }, SelectProps), children),
80
- hasHelperText && react_1.default.createElement(material_1.FormHelperText, null, helperText)));
78
+ hasHelperText && (react_1.default.createElement(material_1.FormHelperText, { sx: {
79
+ [`&.${FormHelperText_1.formHelperTextClasses.root}`]: {
80
+ marginLeft: 0,
81
+ },
82
+ } }, helperText))));
81
83
  };
82
84
  exports.OutlinedSelect = OutlinedSelect;
83
85
  exports.default = exports.OutlinedSelect;
@@ -9,8 +9,10 @@ const TextField_1 = require("@mui/material/TextField");
9
9
  const Input_1 = require("@mui/material/Input");
10
10
  const InputLabel_1 = require("@mui/material/InputLabel");
11
11
  const OutlinedInput_1 = require("@mui/material/OutlinedInput");
12
+ //utils
13
+ const Capitalize_1 = tslib_1.__importDefault(require("../../utils/Capitalize"));
12
14
  // self-defined-components
13
- const StyledTextField = styles_1.styled(material_1.TextField)(({ theme }) => ({
15
+ const StyledTextField = styles_1.styled(material_1.TextField)(({ color = 'primary', theme }) => ({
14
16
  [`& .${InputLabel_1.inputLabelClasses.error}`]: {
15
17
  [`&:not(.${InputLabel_1.inputLabelClasses.shrink})`]: {
16
18
  color: theme.palette.text.secondary,
@@ -24,11 +26,8 @@ const StyledTextField = styles_1.styled(material_1.TextField)(({ theme }) => ({
24
26
  },
25
27
  // For variant: standard | filled
26
28
  [`& .${Input_1.inputClasses.underline}:not(.${Input_1.inputClasses.disabled})`]: {
27
- [`&:hover:before`]: {
28
- borderColor: theme.palette.primary.main,
29
- },
30
- [`&.${Input_1.inputClasses.colorSecondary}:hover:before`]: {
31
- borderColor: theme.palette.secondary.main,
29
+ [`&.MuiInputBase-color${Capitalize_1.default(color)}:hover:before`]: {
30
+ borderColor: theme.palette[color].main,
32
31
  },
33
32
  },
34
33
  // For variant: outlined
@@ -39,11 +38,8 @@ const StyledTextField = styles_1.styled(material_1.TextField)(({ theme }) => ({
39
38
  borderColor: theme.palette.error.main,
40
39
  },
41
40
  [`&.${TextField_1.textFieldClasses.root} :not(.${Input_1.inputClasses.disabled}):not(.${Input_1.inputClasses.error})`]: {
42
- [`&:hover .${OutlinedInput_1.outlinedInputClasses.notchedOutline}`]: {
43
- borderColor: theme.palette.primary.main,
44
- },
45
- [`&.${Input_1.inputClasses.colorSecondary}:hover .${OutlinedInput_1.outlinedInputClasses.notchedOutline}`]: {
46
- borderColor: theme.palette.secondary.main,
41
+ [`&.MuiInputBase-color${Capitalize_1.default(color)}:hover .${OutlinedInput_1.outlinedInputClasses.notchedOutline}`]: {
42
+ borderColor: theme.palette[color].main,
47
43
  },
48
44
  },
49
45
  }));
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ function capitalize(string) {
4
+ return string.charAt(0).toUpperCase() + string.slice(1);
5
+ }
6
+ exports.default = capitalize;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@junyiacademy/ui-test",
3
- "version": "1.5.6",
3
+ "version": "1.5.9",
4
4
  "description": "junyiacademy ui library",
5
5
  "main": "./dist/libs/ui/src/index.js",
6
6
  "typings": "./declarations/libs/ui/src/index.d.ts",