@ringcentral/juno 2.22.1 → 2.23.1
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.
- package/components/Forms/Picker/DatePicker/Calendar.d.ts +4 -4
- package/components/Forms/Picker/DatePicker/Calendar.js +2 -2
- package/components/Forms/Picker/DatePicker/DatePicker.d.ts +9 -9
- package/components/Forms/Picker/DatePicker/DatePicker.js +12 -12
- package/components/Forms/Picker/DatePicker/Years.d.ts +2 -2
- package/components/Forms/Picker/DatePicker/utils/DatePickerUtils.d.ts +1 -1
- package/components/Forms/Switch/Switch.js +13 -2
- package/components/Forms/Switch/styles/SwitchStyle.js +1 -1
- package/components/Forms/Switch/utils/SwitchUtils.js +1 -9
- package/es6/components/Forms/Picker/DatePicker/Calendar.js +2 -2
- package/es6/components/Forms/Picker/DatePicker/DatePicker.js +12 -12
- package/es6/components/Forms/Switch/Switch.js +15 -4
- package/es6/components/Forms/Switch/styles/SwitchStyle.js +1 -1
- package/es6/components/Forms/Switch/utils/SwitchUtils.js +1 -9
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import dayjs from 'dayjs';
|
|
3
3
|
import { MaterialUiPickersDate as MuiPickersDate } from '@material-ui/pickers/typings/date';
|
|
4
4
|
import { RcClassesProps } from '../../../../foundation';
|
|
5
5
|
import { DatePickerHeaderProps } from './DatePickerHeader';
|
|
@@ -44,9 +44,9 @@ declare const Calendar: React.ForwardRefExoticComponent<{
|
|
|
44
44
|
/** DateRange for setting */
|
|
45
45
|
dateRange: {
|
|
46
46
|
/** Min date @DateIOType */
|
|
47
|
-
min?:
|
|
47
|
+
min?: dayjs.Dayjs | null | undefined;
|
|
48
48
|
/** Max date @DateIOType */
|
|
49
|
-
max?:
|
|
49
|
+
max?: dayjs.Dayjs | null | undefined;
|
|
50
50
|
};
|
|
51
51
|
/** Disable past dates */
|
|
52
52
|
disablePast?: boolean | undefined;
|
|
@@ -66,7 +66,7 @@ declare const Calendar: React.ForwardRefExoticComponent<{
|
|
|
66
66
|
loadingIndicator?: JSX.Element | undefined;
|
|
67
67
|
date: MuiPickersDate;
|
|
68
68
|
handleDaySelect: (day: MuiPickersDate, fromUserSelect?: boolean | undefined) => void;
|
|
69
|
-
getInvalidateDateInRange: (day: MuiPickersDate) => false |
|
|
69
|
+
getInvalidateDateInRange: (day: MuiPickersDate) => false | dayjs.Dayjs | null;
|
|
70
70
|
} & Pick<DayProps, "size"> & RcClassesProps<"footer" | "progress" | "calendarSlider"> & Pick<DatePickerHeaderProps, "classes"> & React.RefAttributes<any>>;
|
|
71
71
|
export { Calendar };
|
|
72
72
|
export type { CalendarProps };
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
var tslib_1 = require("tslib");
|
|
4
4
|
var react_1 = tslib_1.__importStar(require("react"));
|
|
5
|
-
var
|
|
5
|
+
var dayjs_1 = tslib_1.__importDefault(require("dayjs"));
|
|
6
6
|
var CircularProgress_1 = tslib_1.__importDefault(require("@material-ui/core/CircularProgress"));
|
|
7
7
|
var pickers_1 = require("@material-ui/pickers");
|
|
8
8
|
var useKeyDown_1 = require("@material-ui/pickers/_shared/hooks/useKeyDown");
|
|
@@ -22,7 +22,7 @@ var Calendar = react_1.forwardRef(function (_a, ref) {
|
|
|
22
22
|
var previousView = foundation_1.usePrevious(function () { return view; });
|
|
23
23
|
var weeks = react_1.useRef([]);
|
|
24
24
|
// * `getWeekdays` not set locale, need set locale before get
|
|
25
|
-
|
|
25
|
+
dayjs_1.default.locale(utils.locale);
|
|
26
26
|
var weekdays = foundation_1.useResultRef(function () { return utils.getWeekdays(); }).current;
|
|
27
27
|
var _b = react_1.useMemo(function () {
|
|
28
28
|
var nowDate = utils.date();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import dayjs from 'dayjs';
|
|
3
3
|
import { MaterialUiPickersDate as MuiPickersDate } from '@material-ui/pickers/typings/date';
|
|
4
4
|
import { RcBaseProps, RcBaseSize, RcClassesProps } from '../../../../foundation';
|
|
5
5
|
import { RcPopoverProps } from '../../../Popover';
|
|
@@ -62,15 +62,15 @@ declare const RcDatePicker: import("styled-components").StyledComponentClass<{
|
|
|
62
62
|
/** when hover on the textField, if show the clearBtn. With default is true. */
|
|
63
63
|
clearBtn?: boolean | undefined;
|
|
64
64
|
/** Min date */
|
|
65
|
-
min?: Date |
|
|
65
|
+
min?: Date | dayjs.Dayjs | null | undefined;
|
|
66
66
|
/** Max date */
|
|
67
|
-
max?: Date |
|
|
67
|
+
max?: Date | dayjs.Dayjs | null | undefined;
|
|
68
68
|
/** Text label for Today button */
|
|
69
69
|
todayButtonText?: string | undefined;
|
|
70
70
|
/** @deprecated Min date @DateIOType, using min instead */
|
|
71
|
-
minDate?:
|
|
71
|
+
minDate?: dayjs.Dayjs | null | undefined;
|
|
72
72
|
/** @deprecated Max date @DateIOType, using max instead */
|
|
73
|
-
maxDate?:
|
|
73
|
+
maxDate?: dayjs.Dayjs | null | undefined;
|
|
74
74
|
/** @deprecated please use value to replace that */
|
|
75
75
|
date?: Date | null | undefined;
|
|
76
76
|
} & Pick<Partial<CalendarProps>, "classes" | "size" | "disablePast" | "disableFuture" | "todayButtonText" | "formatString" | "renderDay" | "shouldDisableDate" | "onMonthChange" | "loadingIndicator"> & Pick<PickerTextFieldProps, "className" | "id" | "radius" | "onFocus" | "onBlur" | "onKeyDown" | "onClick" | "label" | "placeholder" | "size" | "variant" | "disabled" | "action" | "autoFocus" | "fullWidth" | "error" | "inputProps" | "inputRef" | "required" | "InputProps" | "helperText" | "gutterBottom" | "onClear" | "clearBtn" | "clearButtonProps" | "validate" | "PopoverProps" | "ActionSymbol"> & Pick<Pick<import("@material-ui/core").PopoverProps, "ref" | "className" | "color" | "id" | "lang" | "style" | "role" | "tabIndex" | "elevation" | "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" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "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" | "slot" | "title" | "classes" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "innerRef" | "TransitionComponent" | "TransitionProps" | "action" | "disablePortal" | "onClose" | "onEnter" | "onEntering" | "onEntered" | "onExit" | "onExiting" | "onExited" | "open" | "transitionDuration" | "anchorOrigin" | "BackdropComponent" | "BackdropProps" | "closeAfterTransition" | "container" | "disableAutoFocus" | "disableBackdropClick" | "disableEnforceFocus" | "disableEscapeKeyDown" | "disableRestoreFocus" | "disableScrollLock" | "hideBackdrop" | "keepMounted" | "manager" | "onBackdropClick" | "onEscapeKeyDown" | "onRendered" | "anchorEl" | "anchorPosition" | "anchorReference" | "getContentAnchorEl" | "marginThreshold" | "PaperProps" | "transformOrigin">, "onClose"> & RcClassesProps<"popover" | "popoverPaper"> & React.RefAttributes<any>, import("../../../../foundation").RcTheme, Pick<{
|
|
@@ -94,15 +94,15 @@ declare const RcDatePicker: import("styled-components").StyledComponentClass<{
|
|
|
94
94
|
/** when hover on the textField, if show the clearBtn. With default is true. */
|
|
95
95
|
clearBtn?: boolean | undefined;
|
|
96
96
|
/** Min date */
|
|
97
|
-
min?: Date |
|
|
97
|
+
min?: Date | dayjs.Dayjs | null | undefined;
|
|
98
98
|
/** Max date */
|
|
99
|
-
max?: Date |
|
|
99
|
+
max?: Date | dayjs.Dayjs | null | undefined;
|
|
100
100
|
/** Text label for Today button */
|
|
101
101
|
todayButtonText?: string | undefined;
|
|
102
102
|
/** @deprecated Min date @DateIOType, using min instead */
|
|
103
|
-
minDate?:
|
|
103
|
+
minDate?: dayjs.Dayjs | null | undefined;
|
|
104
104
|
/** @deprecated Max date @DateIOType, using max instead */
|
|
105
|
-
maxDate?:
|
|
105
|
+
maxDate?: dayjs.Dayjs | null | undefined;
|
|
106
106
|
/** @deprecated please use value to replace that */
|
|
107
107
|
date?: Date | null | undefined;
|
|
108
108
|
} & Pick<Partial<CalendarProps>, "classes" | "size" | "disablePast" | "disableFuture" | "todayButtonText" | "formatString" | "renderDay" | "shouldDisableDate" | "onMonthChange" | "loadingIndicator"> & Pick<PickerTextFieldProps, "className" | "id" | "radius" | "onFocus" | "onBlur" | "onKeyDown" | "onClick" | "label" | "placeholder" | "size" | "variant" | "disabled" | "action" | "autoFocus" | "fullWidth" | "error" | "inputProps" | "inputRef" | "required" | "InputProps" | "helperText" | "gutterBottom" | "onClear" | "clearBtn" | "clearButtonProps" | "validate" | "PopoverProps" | "ActionSymbol"> & Pick<Pick<import("@material-ui/core").PopoverProps, "ref" | "className" | "color" | "id" | "lang" | "style" | "role" | "tabIndex" | "elevation" | "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" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "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" | "slot" | "title" | "classes" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "innerRef" | "TransitionComponent" | "TransitionProps" | "action" | "disablePortal" | "onClose" | "onEnter" | "onEntering" | "onEntered" | "onExit" | "onExiting" | "onExited" | "open" | "transitionDuration" | "anchorOrigin" | "BackdropComponent" | "BackdropProps" | "closeAfterTransition" | "container" | "disableAutoFocus" | "disableBackdropClick" | "disableEnforceFocus" | "disableEscapeKeyDown" | "disableRestoreFocus" | "disableScrollLock" | "hideBackdrop" | "keepMounted" | "manager" | "onBackdropClick" | "onEscapeKeyDown" | "onRendered" | "anchorEl" | "anchorPosition" | "anchorReference" | "getContentAnchorEl" | "marginThreshold" | "PaperProps" | "transformOrigin">, "onClose"> & RcClassesProps<"popover" | "popoverPaper"> & React.RefAttributes<any>, "ref" | "key" | "className" | "id" | "max" | "min" | "radius" | "onFocus" | "onBlur" | "onChange" | "onKeyDown" | "onClick" | "date" | "label" | "classes" | "placeholder" | "size" | "value" | "variant" | "disabled" | "action" | "autoFocus" | "onClose" | "fullWidth" | "error" | "inputProps" | "inputRef" | "required" | "InputProps" | "helperText" | "gutterBottom" | "onClear" | "clearBtn" | "clearButtonProps" | "validate" | "disablePast" | "disableFuture" | "todayButtonText" | "formatString" | "renderDay" | "shouldDisableDate" | "onMonthChange" | "loadingIndicator" | "PopoverProps" | "ActionSymbol" | "locale" | "screenReaderProps" | "minDate" | "maxDate"> & {
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
var tslib_1 = require("tslib");
|
|
4
4
|
var react_1 = tslib_1.__importStar(require("react"));
|
|
5
|
-
var
|
|
6
|
-
var
|
|
5
|
+
var dayjs_1 = tslib_1.__importDefault(require("dayjs"));
|
|
6
|
+
var dayjs_2 = tslib_1.__importDefault(require("@date-io/dayjs"));
|
|
7
7
|
var pickers_1 = require("@material-ui/pickers");
|
|
8
8
|
var date_utils_1 = require("@material-ui/pickers/_helpers/date-utils");
|
|
9
9
|
var juno_icon_1 = require("@ringcentral/juno-icon");
|
|
@@ -30,8 +30,8 @@ var InnerRcDatePicker = react_1.forwardRef(function (props, ref) {
|
|
|
30
30
|
var minDate = maxDateProp || min;
|
|
31
31
|
var actionRef = react_1.useRef(null);
|
|
32
32
|
var dateRange = react_1.useMemo(function () { return ({
|
|
33
|
-
min:
|
|
34
|
-
max:
|
|
33
|
+
min: dayjs_1.default(minDate || defaultMinDate),
|
|
34
|
+
max: dayjs_1.default(maxDate || defaultMaxDate),
|
|
35
35
|
}); }, [minDate, maxDate]);
|
|
36
36
|
var getInvalidateDateInRange = foundation_1.useEventCallback(function (day) {
|
|
37
37
|
return utils_2.invalidateDateInRange(day, { dateRange: dateRange, now: utils.date(), disableFuture: disableFuture, disablePast: disablePast }, utils);
|
|
@@ -59,11 +59,11 @@ var InnerRcDatePicker = react_1.forwardRef(function (props, ref) {
|
|
|
59
59
|
utils,
|
|
60
60
|
]);
|
|
61
61
|
var initDate = react_1.useMemo(function () {
|
|
62
|
-
return getClosestEnableDate(
|
|
62
|
+
return getClosestEnableDate(dayjs_1.default(utils.date()));
|
|
63
63
|
}, [getClosestEnableDate, utils]);
|
|
64
|
-
var
|
|
65
|
-
var nowDate =
|
|
66
|
-
var textFiledValue = react_1.useMemo(function () { return (
|
|
64
|
+
var dayjsValue = react_1.useMemo(function () { return (controlledValue ? dayjs_1.default(controlledValue) : null); }, [controlledValue]);
|
|
65
|
+
var nowDate = dayjsValue || initDate;
|
|
66
|
+
var textFiledValue = react_1.useMemo(function () { return (dayjsValue ? utils.format(dayjsValue, formatString) : ''); }, [dayjsValue, utils, formatString]);
|
|
67
67
|
var PopoverProps = react_1.useMemo(function () {
|
|
68
68
|
return foundation_1.combineProps({
|
|
69
69
|
classes: foundation_1.combineClasses({
|
|
@@ -99,10 +99,10 @@ var InnerRcDatePicker = react_1.forwardRef(function (props, ref) {
|
|
|
99
99
|
react_1.useEffect(function () {
|
|
100
100
|
if (
|
|
101
101
|
// only when inner value change need check again is that value is valid
|
|
102
|
-
|
|
102
|
+
dayjsValue &&
|
|
103
103
|
value !== emitValueRef.current &&
|
|
104
|
-
shouldDisableDate(
|
|
105
|
-
var closestEnabledDate = getClosestEnableDate(
|
|
104
|
+
shouldDisableDate(dayjsValue)) {
|
|
105
|
+
var closestEnabledDate = getClosestEnableDate(dayjsValue);
|
|
106
106
|
handleDaySelect(closestEnabledDate, false);
|
|
107
107
|
}
|
|
108
108
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
@@ -133,7 +133,7 @@ var _RcDatePicker = react_1.forwardRef(function (inProps, ref) {
|
|
|
133
133
|
},
|
|
134
134
|
]);
|
|
135
135
|
}
|
|
136
|
-
return (react_1.default.createElement(pickers_1.MuiPickersUtilsProvider, { utils:
|
|
136
|
+
return (react_1.default.createElement(pickers_1.MuiPickersUtilsProvider, { utils: dayjs_2.default, locale: props.locale, libInstance: dayjs_1.default },
|
|
137
137
|
react_1.default.createElement(InnerRcDatePicker, tslib_1.__assign({ ref: ref }, props))));
|
|
138
138
|
});
|
|
139
139
|
var RcDatePicker = foundation_1.styled(_RcDatePicker)(templateObject_1 || (templateObject_1 = tslib_1.__makeTemplateObject([""], [""])));
|
|
@@ -22,9 +22,9 @@ declare const Years: React.ForwardRefExoticComponent<{
|
|
|
22
22
|
/** the selected date. */
|
|
23
23
|
date: MuiPickersDate;
|
|
24
24
|
/** min Date of the displayed years range. */
|
|
25
|
-
minDate: import("
|
|
25
|
+
minDate: import("dayjs").Dayjs;
|
|
26
26
|
/** max Date of the displayed years range. */
|
|
27
|
-
maxDate: import("
|
|
27
|
+
maxDate: import("dayjs").Dayjs;
|
|
28
28
|
/** is disable the past years. */
|
|
29
29
|
disablePast?: boolean | undefined;
|
|
30
30
|
/** is disable the future years. */
|
|
@@ -22,5 +22,5 @@ export declare const onTransitionEnd: (event: any) => void;
|
|
|
22
22
|
declare type ValidateDateInRange = {
|
|
23
23
|
now: MuiPickersDate;
|
|
24
24
|
} & Pick<CalendarProps, 'dateRange' | 'disableFuture' | 'disablePast'>;
|
|
25
|
-
export declare const invalidateDateInRange: (day: MuiPickersDate, { dateRange: { min, max }, disableFuture, disablePast, now, }: ValidateDateInRange, utils: import("@date-io/core/IUtils").IUtils<MuiPickersDate>) => false | import("
|
|
25
|
+
export declare const invalidateDateInRange: (day: MuiPickersDate, { dateRange: { min, max }, disableFuture, disablePast, now, }: ValidateDateInRange, utils: import("@date-io/core/IUtils").IUtils<MuiPickersDate>) => false | import("dayjs").Dayjs | null;
|
|
26
26
|
export {};
|
|
@@ -11,10 +11,21 @@ var styles_1 = require("./styles");
|
|
|
11
11
|
var utils_1 = require("./utils");
|
|
12
12
|
var _RcSwitch = react_1.forwardRef(function (inProps, ref) {
|
|
13
13
|
var props = foundation_1.useThemeProps({ props: inProps, name: 'RcSwitch' });
|
|
14
|
-
var label = props.label, _a = props.formControlLabelProps, formControlLabelProps = _a === void 0 ? {} : _a, focusVisibleClassNameProp = props.focusVisibleClassName, classesProp = props.classes, color = props.color, trackColor = props.trackColor, rest = tslib_1.__rest(props, ["label", "formControlLabelProps", "focusVisibleClassName", "classes", "color", "trackColor"]);
|
|
14
|
+
var label = props.label, _a = props.formControlLabelProps, formControlLabelProps = _a === void 0 ? {} : _a, focusVisibleClassNameProp = props.focusVisibleClassName, classesProp = props.classes, color = props.color, trackColor = props.trackColor, _b = props.inputRef, inputRefProp = _b === void 0 ? null : _b, onFocus = props.onFocus, onBlur = props.onBlur, rest = tslib_1.__rest(props, ["label", "formControlLabelProps", "focusVisibleClassName", "classes", "color", "trackColor", "inputRef", "onFocus", "onBlur"]);
|
|
15
15
|
var classes = react_1.useMemo(function () { return foundation_1.combineClasses(foundation_1.omit(utils_1.RcSwitchClasses, ['focusVisible']), classesProp); }, [classesProp]);
|
|
16
16
|
var focusVisibleClassName = react_1.useMemo(function () { return clsx_1.default(utils_1.RcSwitchClasses.focusVisible, focusVisibleClassNameProp); }, [focusVisibleClassNameProp]);
|
|
17
|
-
var
|
|
17
|
+
var inputRef = react_1.useRef(null);
|
|
18
|
+
var handleInputRef = foundation_1.useForkRef(inputRef, inputRefProp);
|
|
19
|
+
var Switch = (react_1.default.createElement(Switch_1.default, tslib_1.__assign({ ref: ref, inputRef: handleInputRef, focusVisibleClassName: focusVisibleClassName, classes: classes }, rest, { color: "default", size: "medium", disableRipple: true, disableTouchRipple: true, onFocus: function (e) {
|
|
20
|
+
var _a;
|
|
21
|
+
if ((_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.matches('[data-focus-visible-added]')) {
|
|
22
|
+
e.currentTarget.parentElement.setAttribute('data-focus-visible-within', '');
|
|
23
|
+
}
|
|
24
|
+
onFocus === null || onFocus === void 0 ? void 0 : onFocus(e);
|
|
25
|
+
}, onBlur: function (e) {
|
|
26
|
+
e.currentTarget.parentElement.removeAttribute('data-focus-visible-within');
|
|
27
|
+
onBlur === null || onBlur === void 0 ? void 0 : onBlur(e);
|
|
28
|
+
} })));
|
|
18
29
|
if (label) {
|
|
19
30
|
return (react_1.default.createElement(FormControlLabel_1.RcFormControlLabel, tslib_1.__assign({}, formControlLabelProps, { label: label, control: Switch })));
|
|
20
31
|
}
|
|
@@ -14,6 +14,6 @@ exports.SwitchStyle = function (_a) {
|
|
|
14
14
|
var colorProp = _a.color, trackColorProp = _a.trackColor;
|
|
15
15
|
var checkedColor = foundation_1.getParsePaletteColor(colorProp);
|
|
16
16
|
var trackColor = foundation_1.getParsePaletteColor(trackColorProp, defaultTrackColorArray);
|
|
17
|
-
return foundation_1.css(templateObject_5 || (templateObject_5 = tslib_1.__makeTemplateObject(["\n &.", " {\n
|
|
17
|
+
return foundation_1.css(templateObject_5 || (templateObject_5 = tslib_1.__makeTemplateObject(["\n &.", " {\n padding: 0px;\n ", ";\n ", ";\n\n &[data-focus-visible-within] {\n border-radius: 100vw;\n ", "\n }\n\n .", " {\n ", ";\n ", ";\n padding: 0;\n background-color: transparent;\n transform: translateX(", ");\n\n &.", " {\n transform: translateX(", ");\n }\n }\n\n .", " {\n ", ";\n background-color: ", ";\n box-shadow: none;\n }\n\n .", " {\n ", ";\n opacity: 1;\n margin: 0;\n border-radius: ", ";\n background-color: ", ";\n }\n\n .", " + .", " {\n background-color: ", ";\n }\n\n .", " + .", " {\n background-color: ", ";\n }\n\n ", " {\n &:hover {\n ", ";\n }\n }\n\n &:active {\n ", ";\n }\n }\n "], ["\n &.", " {\n padding: 0px;\n ", ";\n ", ";\n\n &[data-focus-visible-within] {\n border-radius: 100vw;\n ", "\n }\n\n .", " {\n ", ";\n ", ";\n padding: 0;\n background-color: transparent;\n transform: translateX(", ");\n\n &.", " {\n transform: translateX(", ");\n }\n }\n\n .", " {\n ", ";\n background-color: ", ";\n box-shadow: none;\n }\n\n .", " {\n ", ";\n opacity: 1;\n margin: 0;\n border-radius: ", ";\n background-color: ", ";\n }\n\n .", " + .", " {\n background-color: ", ";\n }\n\n .", " + .", " {\n background-color: ", ";\n }\n\n ", " {\n &:hover {\n ", ";\n }\n }\n\n &:active {\n ", ";\n }\n }\n "])), utils_1.RcSwitchClasses.root, widthCss, heightCss, foundation_1.focusRing('normal'), utils_1.RcSwitchClasses.switchBase, widthCss, heightCss, foundation_1.spacing(-2), utils_1.RcSwitchClasses.checked, foundation_1.spacing(2), utils_1.RcSwitchClasses.thumb, thumbSize, thumbColor, utils_1.RcSwitchClasses.track, heightCss, foundation_1.radius('round'), trackColor, utils_1.RcSwitchClasses.checked, utils_1.RcSwitchClasses.track, checkedColor, utils_1.RcSwitchClasses.disabled, utils_1.RcSwitchClasses.track, disabledColor, foundation_1.nonTouchHoverMedia, notDisabledSwitchBase('08', checkedColor, trackColor), notDisabledSwitchBase('24', checkedColor, trackColor));
|
|
18
18
|
};
|
|
19
19
|
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
|
|
@@ -1,12 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
var foundation_1 = require("../../../../foundation");
|
|
4
|
-
exports.RcSwitchClasses = foundation_1.RcClasses([
|
|
5
|
-
'root',
|
|
6
|
-
'switchBase',
|
|
7
|
-
'thumb',
|
|
8
|
-
'track',
|
|
9
|
-
'checked',
|
|
10
|
-
'disabled',
|
|
11
|
-
'focusVisible',
|
|
12
|
-
], 'RcSwitch');
|
|
4
|
+
exports.RcSwitchClasses = foundation_1.RcClasses(['root', 'switchBase', 'thumb', 'track', 'checked', 'disabled'], 'RcSwitch');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __read } from "tslib";
|
|
2
2
|
import React, { forwardRef, useLayoutEffect, useMemo, useRef, useState, } from 'react';
|
|
3
|
-
import
|
|
3
|
+
import dayjs from 'dayjs';
|
|
4
4
|
import MuiCircularProgress from '@material-ui/core/CircularProgress';
|
|
5
5
|
import { useUtils as useMuiUtils } from '@material-ui/pickers';
|
|
6
6
|
import { runKeyHandler } from '@material-ui/pickers/_shared/hooks/useKeyDown';
|
|
@@ -20,7 +20,7 @@ var Calendar = forwardRef(function (_a, ref) {
|
|
|
20
20
|
var previousView = usePrevious(function () { return view; });
|
|
21
21
|
var weeks = useRef([]);
|
|
22
22
|
// * `getWeekdays` not set locale, need set locale before get
|
|
23
|
-
|
|
23
|
+
dayjs.locale(utils.locale);
|
|
24
24
|
var weekdays = useResultRef(function () { return utils.getWeekdays(); }).current;
|
|
25
25
|
var _b = useMemo(function () {
|
|
26
26
|
var nowDate = utils.date();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __assign, __makeTemplateObject, __read, __rest } from "tslib";
|
|
2
2
|
import React, { forwardRef, useCallback, useEffect, useMemo, useRef, } from 'react';
|
|
3
|
-
import
|
|
4
|
-
import
|
|
3
|
+
import dayjs from 'dayjs';
|
|
4
|
+
import DayjsUtils from '@date-io/dayjs';
|
|
5
5
|
import { MuiPickersUtilsProvider, useUtils as useMuiUtils, } from '@material-ui/pickers';
|
|
6
6
|
import { findClosestEnabledDate as MuiFindClosestEnabledDate } from '@material-ui/pickers/_helpers/date-utils';
|
|
7
7
|
import { DateBorder } from '@ringcentral/juno-icon';
|
|
@@ -26,8 +26,8 @@ var InnerRcDatePicker = forwardRef(function (props, ref) {
|
|
|
26
26
|
var minDate = maxDateProp || min;
|
|
27
27
|
var actionRef = useRef(null);
|
|
28
28
|
var dateRange = useMemo(function () { return ({
|
|
29
|
-
min:
|
|
30
|
-
max:
|
|
29
|
+
min: dayjs(minDate || defaultMinDate),
|
|
30
|
+
max: dayjs(maxDate || defaultMaxDate),
|
|
31
31
|
}); }, [minDate, maxDate]);
|
|
32
32
|
var getInvalidateDateInRange = useEventCallback(function (day) {
|
|
33
33
|
return invalidateDateInRange(day, { dateRange: dateRange, now: utils.date(), disableFuture: disableFuture, disablePast: disablePast }, utils);
|
|
@@ -55,11 +55,11 @@ var InnerRcDatePicker = forwardRef(function (props, ref) {
|
|
|
55
55
|
utils,
|
|
56
56
|
]);
|
|
57
57
|
var initDate = useMemo(function () {
|
|
58
|
-
return getClosestEnableDate(
|
|
58
|
+
return getClosestEnableDate(dayjs(utils.date()));
|
|
59
59
|
}, [getClosestEnableDate, utils]);
|
|
60
|
-
var
|
|
61
|
-
var nowDate =
|
|
62
|
-
var textFiledValue = useMemo(function () { return (
|
|
60
|
+
var dayjsValue = useMemo(function () { return (controlledValue ? dayjs(controlledValue) : null); }, [controlledValue]);
|
|
61
|
+
var nowDate = dayjsValue || initDate;
|
|
62
|
+
var textFiledValue = useMemo(function () { return (dayjsValue ? utils.format(dayjsValue, formatString) : ''); }, [dayjsValue, utils, formatString]);
|
|
63
63
|
var PopoverProps = useMemo(function () {
|
|
64
64
|
return combineProps({
|
|
65
65
|
classes: combineClasses({
|
|
@@ -95,10 +95,10 @@ var InnerRcDatePicker = forwardRef(function (props, ref) {
|
|
|
95
95
|
useEffect(function () {
|
|
96
96
|
if (
|
|
97
97
|
// only when inner value change need check again is that value is valid
|
|
98
|
-
|
|
98
|
+
dayjsValue &&
|
|
99
99
|
value !== emitValueRef.current &&
|
|
100
|
-
shouldDisableDate(
|
|
101
|
-
var closestEnabledDate = getClosestEnableDate(
|
|
100
|
+
shouldDisableDate(dayjsValue)) {
|
|
101
|
+
var closestEnabledDate = getClosestEnableDate(dayjsValue);
|
|
102
102
|
handleDaySelect(closestEnabledDate, false);
|
|
103
103
|
}
|
|
104
104
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
@@ -129,7 +129,7 @@ var _RcDatePicker = forwardRef(function (inProps, ref) {
|
|
|
129
129
|
},
|
|
130
130
|
]);
|
|
131
131
|
}
|
|
132
|
-
return (React.createElement(MuiPickersUtilsProvider, { utils:
|
|
132
|
+
return (React.createElement(MuiPickersUtilsProvider, { utils: DayjsUtils, locale: props.locale, libInstance: dayjs },
|
|
133
133
|
React.createElement(InnerRcDatePicker, __assign({ ref: ref }, props))));
|
|
134
134
|
});
|
|
135
135
|
var RcDatePicker = styled(_RcDatePicker)(templateObject_1 || (templateObject_1 = __makeTemplateObject([""], [""])));
|
|
@@ -1,18 +1,29 @@
|
|
|
1
1
|
import { __assign, __makeTemplateObject, __rest } from "tslib";
|
|
2
|
-
import React, { forwardRef, useMemo } from 'react';
|
|
2
|
+
import React, { forwardRef, useMemo, useRef } from 'react';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
import MuiSwitch from '@material-ui/core/Switch';
|
|
5
|
-
import { combineClasses, omit, useThemeProps, } from '../../../foundation';
|
|
5
|
+
import { combineClasses, omit, useThemeProps, useForkRef, } from '../../../foundation';
|
|
6
6
|
import styled from '../../../foundation/styled-components';
|
|
7
7
|
import { RcFormControlLabel } from '../FormControlLabel';
|
|
8
8
|
import { SwitchStyle } from './styles';
|
|
9
9
|
import { RcSwitchClasses } from './utils';
|
|
10
10
|
var _RcSwitch = forwardRef(function (inProps, ref) {
|
|
11
11
|
var props = useThemeProps({ props: inProps, name: 'RcSwitch' });
|
|
12
|
-
var label = props.label, _a = props.formControlLabelProps, formControlLabelProps = _a === void 0 ? {} : _a, focusVisibleClassNameProp = props.focusVisibleClassName, classesProp = props.classes, color = props.color, trackColor = props.trackColor, rest = __rest(props, ["label", "formControlLabelProps", "focusVisibleClassName", "classes", "color", "trackColor"]);
|
|
12
|
+
var label = props.label, _a = props.formControlLabelProps, formControlLabelProps = _a === void 0 ? {} : _a, focusVisibleClassNameProp = props.focusVisibleClassName, classesProp = props.classes, color = props.color, trackColor = props.trackColor, _b = props.inputRef, inputRefProp = _b === void 0 ? null : _b, onFocus = props.onFocus, onBlur = props.onBlur, rest = __rest(props, ["label", "formControlLabelProps", "focusVisibleClassName", "classes", "color", "trackColor", "inputRef", "onFocus", "onBlur"]);
|
|
13
13
|
var classes = useMemo(function () { return combineClasses(omit(RcSwitchClasses, ['focusVisible']), classesProp); }, [classesProp]);
|
|
14
14
|
var focusVisibleClassName = useMemo(function () { return clsx(RcSwitchClasses.focusVisible, focusVisibleClassNameProp); }, [focusVisibleClassNameProp]);
|
|
15
|
-
var
|
|
15
|
+
var inputRef = useRef(null);
|
|
16
|
+
var handleInputRef = useForkRef(inputRef, inputRefProp);
|
|
17
|
+
var Switch = (React.createElement(MuiSwitch, __assign({ ref: ref, inputRef: handleInputRef, focusVisibleClassName: focusVisibleClassName, classes: classes }, rest, { color: "default", size: "medium", disableRipple: true, disableTouchRipple: true, onFocus: function (e) {
|
|
18
|
+
var _a;
|
|
19
|
+
if ((_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.matches('[data-focus-visible-added]')) {
|
|
20
|
+
e.currentTarget.parentElement.setAttribute('data-focus-visible-within', '');
|
|
21
|
+
}
|
|
22
|
+
onFocus === null || onFocus === void 0 ? void 0 : onFocus(e);
|
|
23
|
+
}, onBlur: function (e) {
|
|
24
|
+
e.currentTarget.parentElement.removeAttribute('data-focus-visible-within');
|
|
25
|
+
onBlur === null || onBlur === void 0 ? void 0 : onBlur(e);
|
|
26
|
+
} })));
|
|
16
27
|
if (label) {
|
|
17
28
|
return (React.createElement(RcFormControlLabel, __assign({}, formControlLabelProps, { label: label, control: Switch })));
|
|
18
29
|
}
|
|
@@ -12,6 +12,6 @@ export var SwitchStyle = function (_a) {
|
|
|
12
12
|
var colorProp = _a.color, trackColorProp = _a.trackColor;
|
|
13
13
|
var checkedColor = getParsePaletteColor(colorProp);
|
|
14
14
|
var trackColor = getParsePaletteColor(trackColorProp, defaultTrackColorArray);
|
|
15
|
-
return css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n &.", " {\n
|
|
15
|
+
return css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n &.", " {\n padding: 0px;\n ", ";\n ", ";\n\n &[data-focus-visible-within] {\n border-radius: 100vw;\n ", "\n }\n\n .", " {\n ", ";\n ", ";\n padding: 0;\n background-color: transparent;\n transform: translateX(", ");\n\n &.", " {\n transform: translateX(", ");\n }\n }\n\n .", " {\n ", ";\n background-color: ", ";\n box-shadow: none;\n }\n\n .", " {\n ", ";\n opacity: 1;\n margin: 0;\n border-radius: ", ";\n background-color: ", ";\n }\n\n .", " + .", " {\n background-color: ", ";\n }\n\n .", " + .", " {\n background-color: ", ";\n }\n\n ", " {\n &:hover {\n ", ";\n }\n }\n\n &:active {\n ", ";\n }\n }\n "], ["\n &.", " {\n padding: 0px;\n ", ";\n ", ";\n\n &[data-focus-visible-within] {\n border-radius: 100vw;\n ", "\n }\n\n .", " {\n ", ";\n ", ";\n padding: 0;\n background-color: transparent;\n transform: translateX(", ");\n\n &.", " {\n transform: translateX(", ");\n }\n }\n\n .", " {\n ", ";\n background-color: ", ";\n box-shadow: none;\n }\n\n .", " {\n ", ";\n opacity: 1;\n margin: 0;\n border-radius: ", ";\n background-color: ", ";\n }\n\n .", " + .", " {\n background-color: ", ";\n }\n\n .", " + .", " {\n background-color: ", ";\n }\n\n ", " {\n &:hover {\n ", ";\n }\n }\n\n &:active {\n ", ";\n }\n }\n "])), RcSwitchClasses.root, widthCss, heightCss, focusRing('normal'), RcSwitchClasses.switchBase, widthCss, heightCss, spacing(-2), RcSwitchClasses.checked, spacing(2), RcSwitchClasses.thumb, thumbSize, thumbColor, RcSwitchClasses.track, heightCss, radius('round'), trackColor, RcSwitchClasses.checked, RcSwitchClasses.track, checkedColor, RcSwitchClasses.disabled, RcSwitchClasses.track, disabledColor, nonTouchHoverMedia, notDisabledSwitchBase('08', checkedColor, trackColor), notDisabledSwitchBase('24', checkedColor, trackColor));
|
|
16
16
|
};
|
|
17
17
|
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
|
|
@@ -1,10 +1,2 @@
|
|
|
1
1
|
import { RcClasses } from '../../../../foundation';
|
|
2
|
-
export var RcSwitchClasses = RcClasses([
|
|
3
|
-
'root',
|
|
4
|
-
'switchBase',
|
|
5
|
-
'thumb',
|
|
6
|
-
'track',
|
|
7
|
-
'checked',
|
|
8
|
-
'disabled',
|
|
9
|
-
'focusVisible',
|
|
10
|
-
], 'RcSwitch');
|
|
2
|
+
export var RcSwitchClasses = RcClasses(['root', 'switchBase', 'thumb', 'track', 'checked', 'disabled'], 'RcSwitch');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ringcentral/juno",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.23.1",
|
|
4
4
|
"author": "RingCentral",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"url": "https://github.com/ringcentral/juno.git"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@date-io/
|
|
18
|
+
"@date-io/dayjs": "^1.3.13",
|
|
19
19
|
"@material-ui/core": "^4.12.3",
|
|
20
20
|
"@material-ui/lab": "^4.0.0-alpha.60",
|
|
21
21
|
"@material-ui/pickers": "^3.3.10",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"@ringcentral/juno-icon": ">=1.0.0 <2.0.0",
|
|
38
|
-
"
|
|
38
|
+
"dayjs": "^1.11.6",
|
|
39
39
|
"react": "^17.0.2",
|
|
40
40
|
"react-dom": "^17.0.2",
|
|
41
41
|
"styled-components": "^5.3.3"
|