@ringcentral/juno 1.12.3-beta.5828-dc41552f → 1.12.4-beta.5847-6a74475d

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,5 +1,5 @@
1
- import React from 'react';
2
- import { RcBaseProps, RcBaseSize, RcClassesProps } from '../../../../foundation';
1
+ /// <reference types="react" />
2
+ import { CustomStyledComponentResult, RcBaseProps, RcBaseSize, RcClassesProps } from '../../../../foundation';
3
3
  import { PickerTextFieldProps } from '../utils';
4
4
  import { NumberPickerProps } from './NumberPicker';
5
5
  import { ToggleTextProps } from './ToggleText';
@@ -13,17 +13,17 @@ declare type RcClickFiledStyleProps = {
13
13
  disabled?: boolean;
14
14
  };
15
15
  declare type PickNumberPickerProps = RcBaseProps<Partial<NumberPickerProps>, 'size' | 'onUpdateValue' | 'onClose' | 'onClick' | 'onKeyDown' | 'value' | 'min' | 'max' | 'isTwelveHourSystem' | 'source' | 'step'>;
16
- declare type RcTimePickerProps = {
16
+ declare type RcTimePickerProps<T = false> = {
17
17
  /** with two size: 'small' | 'medium', default with medium. */
18
18
  size?: RcTimePickerSize;
19
19
  /** Is 12 hours system */
20
20
  isTwelveHourSystem?: boolean;
21
21
  /** Date or timestamp */
22
- value?: number | Date;
22
+ value?: (T extends true ? Date : number) | null;
23
23
  /** When all using date, this props will be remove, */
24
- dateMode?: boolean;
24
+ dateMode?: T;
25
25
  /** when user change time */
26
- onChange?: (time?: RcTimePickerProps['value']) => void;
26
+ onChange?: (time: NonNullable<RcTimePickerProps<T>['value']> | null) => void;
27
27
  /** min time */
28
28
  min?: number | Date;
29
29
  /** max time */
@@ -35,57 +35,12 @@ declare type RcTimePickerProps = {
35
35
  /** props for periodToggle component */
36
36
  PeriodToggleProps?: RcBaseProps<Partial<ToggleTextProps>, 'disabled' | 'isTwelveHourSystem' | 'size' | 'value' | 'onUpdateValue' | 'children'>;
37
37
  /** @deprecated this props will be removed, using value to replace that */
38
- times?: RcTimePickerProps['value'];
38
+ times?: RcTimePickerProps<T>['value'];
39
39
  } & RcBaseProps<PickerTextFieldProps, 'onClick' | 'value' | 'children'> & RcClassesProps<'popover' | 'popoverPaper'>;
40
- /** @release */
41
- declare const RcTimePicker: import("styled-components").StyledComponentClass<{
42
- /** with two size: 'small' | 'medium', default with medium. */
43
- size?: "small" | "medium" | undefined;
44
- /** Is 12 hours system */
45
- isTwelveHourSystem?: boolean | undefined;
46
- /** Date or timestamp */
47
- value?: number | Date | undefined;
48
- /** When all using date, this props will be remove, */
49
- dateMode?: boolean | undefined;
50
- /** when user change time */
51
- onChange?: ((time?: number | Date | undefined) => void) | undefined;
52
- /** min time */
53
- min?: number | Date | undefined;
54
- /** max time */
55
- max?: number | Date | undefined;
56
- /** props for hourPicker component */
57
- HourPickerProps?: Pick<Partial<NumberPickerProps>, "className" | "color" | "id" | "lang" | "style" | "role" | "tabIndex" | "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" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "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" | "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" | "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" | "disabled" | "onInnerChange" | "automationId" | "getScreenReaderLabel" | "renderValue"> | undefined;
58
- /** props for minutePicker component */
59
- MinutePickerProps?: Pick<Partial<NumberPickerProps>, "className" | "color" | "id" | "lang" | "style" | "role" | "tabIndex" | "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" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "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" | "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" | "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" | "disabled" | "onInnerChange" | "automationId" | "getScreenReaderLabel" | "renderValue"> | undefined;
60
- /** props for periodToggle component */
61
- PeriodToggleProps?: Pick<Partial<ToggleTextProps>, "form" | "className" | "color" | "id" | "lang" | "name" | "style" | "type" | "role" | "tabIndex" | "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" | "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" | "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" | "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" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "onClose" | "onInnerChange" | "getScreenReaderLabel"> | undefined;
62
- /** @deprecated this props will be removed, using value to replace that */
63
- times?: number | Date | undefined;
64
- } & Pick<PickerTextFieldProps, "className" | "id" | "radius" | "onFocus" | "onBlur" | "onKeyDown" | "label" | "placeholder" | "size" | "variant" | "disabled" | "action" | "autoFocus" | "fullWidth" | "error" | "inputProps" | "inputRef" | "required" | "InputProps" | "helperText" | "gutterBottom" | "onClear" | "clearBtn" | "clearButtonProps" | "validate" | "PopoverProps" | "ActionSymbol"> & RcClassesProps<"popover" | "popoverPaper"> & React.RefAttributes<any>, import("../../../../foundation").RcTheme, Pick<{
65
- /** with two size: 'small' | 'medium', default with medium. */
66
- size?: "small" | "medium" | undefined;
67
- /** Is 12 hours system */
68
- isTwelveHourSystem?: boolean | undefined;
69
- /** Date or timestamp */
70
- value?: number | Date | undefined;
71
- /** When all using date, this props will be remove, */
72
- dateMode?: boolean | undefined;
73
- /** when user change time */
74
- onChange?: ((time?: number | Date | undefined) => void) | undefined;
75
- /** min time */
76
- min?: number | Date | undefined;
77
- /** max time */
78
- max?: number | Date | undefined;
79
- /** props for hourPicker component */
80
- HourPickerProps?: Pick<Partial<NumberPickerProps>, "className" | "color" | "id" | "lang" | "style" | "role" | "tabIndex" | "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" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "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" | "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" | "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" | "disabled" | "onInnerChange" | "automationId" | "getScreenReaderLabel" | "renderValue"> | undefined;
81
- /** props for minutePicker component */
82
- MinutePickerProps?: Pick<Partial<NumberPickerProps>, "className" | "color" | "id" | "lang" | "style" | "role" | "tabIndex" | "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" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "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" | "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" | "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" | "disabled" | "onInnerChange" | "automationId" | "getScreenReaderLabel" | "renderValue"> | undefined;
83
- /** props for periodToggle component */
84
- PeriodToggleProps?: Pick<Partial<ToggleTextProps>, "form" | "className" | "color" | "id" | "lang" | "name" | "style" | "type" | "role" | "tabIndex" | "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" | "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" | "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" | "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" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "onClose" | "onInnerChange" | "getScreenReaderLabel"> | undefined;
85
- /** @deprecated this props will be removed, using value to replace that */
86
- times?: number | Date | undefined;
87
- } & Pick<PickerTextFieldProps, "className" | "id" | "radius" | "onFocus" | "onBlur" | "onKeyDown" | "label" | "placeholder" | "size" | "variant" | "disabled" | "action" | "autoFocus" | "fullWidth" | "error" | "inputProps" | "inputRef" | "required" | "InputProps" | "helperText" | "gutterBottom" | "onClear" | "clearBtn" | "clearButtonProps" | "validate" | "PopoverProps" | "ActionSymbol"> & RcClassesProps<"popover" | "popoverPaper"> & React.RefAttributes<any>, "ref" | "key" | "className" | "id" | "max" | "min" | "radius" | "onFocus" | "onBlur" | "onChange" | "onKeyDown" | "label" | "classes" | "placeholder" | "size" | "value" | "variant" | "disabled" | "action" | "autoFocus" | "fullWidth" | "error" | "inputProps" | "inputRef" | "required" | "InputProps" | "helperText" | "gutterBottom" | "onClear" | "clearBtn" | "clearButtonProps" | "validate" | "PopoverProps" | "ActionSymbol" | "isTwelveHourSystem" | "dateMode" | "HourPickerProps" | "MinutePickerProps" | "PeriodToggleProps" | "times"> & {
88
- theme?: import("../../../../foundation").RcTheme | undefined;
89
- }>;
90
- export { RcTimePicker };
40
+ /**
41
+ * when `dateMode={true}` that onChange will return `Date` object,
42
+ * otherwise return timestamp `number`
43
+ */
44
+ declare const ExportType: <T extends boolean = false>(props: RcTimePickerProps<T>) => JSX.Element & CustomStyledComponentResult<RcTimePickerProps<T>>;
45
+ export { ExportType as RcTimePicker };
91
46
  export type { RcClickFiledStyleProps, RcTimePickerProps, RcTimePickerSize };
@@ -14,6 +14,7 @@ var styles_1 = require("./styles");
14
14
  var ToggleText_1 = require("./ToggleText");
15
15
  var utils_2 = require("./utils");
16
16
  var _RcTimePicker = react_1.forwardRef(function (inProps, ref) {
17
+ var _a;
17
18
  var props = foundation_1.useThemeProps({ props: inProps, name: 'RcTimePicker' });
18
19
  var isTwelveHourSystem = props.isTwelveHourSystem, value = props.value, times = props.times, onChange = props.onChange, disabled = props.disabled, dateMode = props.dateMode, min = props.min, max = props.max, size = props.size, onKeyDown = props.onKeyDown, onClear = props.onClear, HourPickerProps = props.HourPickerProps, MinutePickerProps = props.MinutePickerProps, PeriodToggleProps = props.PeriodToggleProps, PopoverPropsProp = props.PopoverProps, InputPropsProp = props.InputProps, classes = props.classes, rest = tslib_1.__rest(props, ["isTwelveHourSystem", "value", "times", "onChange", "disabled", "dateMode", "min", "max", "size", "onKeyDown", "onClear", "HourPickerProps", "MinutePickerProps", "PeriodToggleProps", "PopoverProps", "InputProps", "classes"]);
19
20
  // TODO: when props remove clear that code, not use forwardRef for Jupiter test issue
@@ -30,8 +31,8 @@ var _RcTimePicker = react_1.forwardRef(function (inProps, ref) {
30
31
  var minuteRef = react_1.useRef(null);
31
32
  var periodRef = react_1.useRef(null);
32
33
  var textFiledValueRef = react_1.useRef('');
33
- var _a = tslib_1.__read(react_1.useState('none'), 2), selectionShowType = _a[0], setSelectionType = _a[1];
34
- var nowTime = value || times;
34
+ var _b = tslib_1.__read(react_1.useState('none'), 2), selectionShowType = _b[0], setSelectionType = _b[1];
35
+ var nowTime = (_a = value) !== null && _a !== void 0 ? _a : times;
35
36
  var isHaveValue = nowTime !== undefined;
36
37
  var isDateMode = nowTime instanceof Date || dateMode;
37
38
  var currentTimestamp = utils_2.getTimestamp(nowTime);
@@ -65,8 +66,8 @@ var _RcTimePicker = react_1.forwardRef(function (inProps, ref) {
65
66
  onChange(toValue);
66
67
  }
67
68
  else {
68
- // * when time is zero emit undefined
69
- onChange(toValue ? utils_2.getTimestampFromDate(toValue) : undefined);
69
+ // * when time is zero emit null
70
+ onChange(toValue ? utils_2.getTimestampFromDate(toValue) : null);
70
71
  }
71
72
  }
72
73
  }, [isDateMode, onChange]);
@@ -112,22 +113,8 @@ var _RcTimePicker = react_1.forwardRef(function (inProps, ref) {
112
113
  return updateTime({ period: period });
113
114
  });
114
115
  var handleClear = foundation_1.useEventCallback(function (e) {
115
- var time;
116
- // if that is date format, we couldn't reset to undefined, that will miss that date information.
117
- if (isDateMode) {
118
- if (range.min.date) {
119
- time = getEmitInitDate();
120
- time.setHours(range.min.hour);
121
- time.setMinutes(range.min.minute);
122
- }
123
- else {
124
- time = new Date(nowTime);
125
- time.setHours(0);
126
- time.setMinutes(0);
127
- }
128
- }
129
116
  onClear === null || onClear === void 0 ? void 0 : onClear(e);
130
- handleChange(time);
117
+ handleChange(null);
131
118
  });
132
119
  var handleSelectionViewClick = foundation_1.useEventCallback(function (toValue) {
133
120
  updateTime(isHourView ? { hour: toValue } : { minute: toValue });
@@ -137,7 +124,9 @@ var _RcTimePicker = react_1.forwardRef(function (inProps, ref) {
137
124
  var _a;
138
125
  (_a = actionRef.current) === null || _a === void 0 ? void 0 : _a.close();
139
126
  });
140
- var setHourSelectionShow = foundation_1.useEventCallback(function () { return setSelectionType('hour'); });
127
+ var setHourSelectionShow = foundation_1.useEventCallback(function () {
128
+ return setSelectionType('hour');
129
+ });
141
130
  var setMinuteSelectionShow = foundation_1.useEventCallback(function () {
142
131
  return setSelectionType('minute');
143
132
  });
@@ -299,7 +288,6 @@ var RcTimePicker = foundation_1.styled(foundation_1.withDeprecatedCheck(_RcTimeP
299
288
  comment: "@deprecated this props will be removed, using value to replace that",
300
289
  },
301
290
  ], 'RcTimePicker'))(templateObject_1 || (templateObject_1 = tslib_1.__makeTemplateObject([""], [""])));
302
- exports.RcTimePicker = RcTimePicker;
303
291
  RcTimePicker.defaultProps = {
304
292
  clearBtn: true,
305
293
  dateMode: false,
@@ -321,4 +309,10 @@ RcTimePicker.defaultProps = {
321
309
  },
322
310
  };
323
311
  RcTimePicker.displayName = 'RcTimePicker';
312
+ /**
313
+ * when `dateMode={true}` that onChange will return `Date` object,
314
+ * otherwise return timestamp `number`
315
+ */
316
+ var ExportType = RcTimePicker;
317
+ exports.RcTimePicker = ExportType;
324
318
  var templateObject_1;
@@ -2,3 +2,4 @@ export * from './NumberPicker';
2
2
  export * from './ToggleText';
3
3
  export * from './SelectionView';
4
4
  export * from './TimePicker';
5
+ export * from './utils';
@@ -5,3 +5,4 @@ tslib_1.__exportStar(require("./NumberPicker"), exports);
5
5
  tslib_1.__exportStar(require("./ToggleText"), exports);
6
6
  tslib_1.__exportStar(require("./SelectionView"), exports);
7
7
  tslib_1.__exportStar(require("./TimePicker"), exports);
8
+ tslib_1.__exportStar(require("./utils"), exports);
@@ -3,25 +3,25 @@
3
3
  export declare const StyledPickerPopperWrap: import("styled-components").StyledComponentClass<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
4
4
  size?: "small" | "medium" | undefined;
5
5
  isTwelveHourSystem?: boolean | undefined;
6
- value?: number | Date | undefined;
7
- dateMode?: boolean | undefined;
8
- onChange?: ((time?: number | Date | undefined) => void) | undefined;
6
+ value?: number | null | undefined;
7
+ dateMode?: false | undefined;
8
+ onChange?: ((time: number | null) => void) | undefined;
9
9
  min?: number | Date | undefined;
10
10
  max?: number | Date | undefined;
11
11
  HourPickerProps?: Pick<Partial<import("../NumberPicker").NumberPickerProps>, "className" | "color" | "id" | "lang" | "style" | "role" | "tabIndex" | "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" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "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" | "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" | "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" | "disabled" | "onInnerChange" | "automationId" | "getScreenReaderLabel" | "renderValue"> | undefined;
12
12
  MinutePickerProps?: Pick<Partial<import("../NumberPicker").NumberPickerProps>, "className" | "color" | "id" | "lang" | "style" | "role" | "tabIndex" | "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" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "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" | "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" | "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" | "disabled" | "onInnerChange" | "automationId" | "getScreenReaderLabel" | "renderValue"> | undefined;
13
13
  PeriodToggleProps?: Pick<Partial<import("../ToggleText").ToggleTextProps>, "form" | "className" | "color" | "id" | "lang" | "name" | "style" | "type" | "role" | "tabIndex" | "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" | "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" | "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" | "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" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "onClose" | "onInnerChange" | "getScreenReaderLabel"> | undefined;
14
- times?: number | Date | undefined;
14
+ times?: number | null | undefined;
15
15
  } & Pick<import("../../utils/PickerTextField/PickerTextField").PickerTextFieldProps, "className" | "id" | "radius" | "onFocus" | "onBlur" | "onKeyDown" | "label" | "placeholder" | "size" | "variant" | "disabled" | "action" | "autoFocus" | "fullWidth" | "error" | "inputProps" | "inputRef" | "required" | "InputProps" | "helperText" | "gutterBottom" | "onClear" | "clearBtn" | "clearButtonProps" | "validate" | "PopoverProps" | "ActionSymbol"> & import("../../../../../foundation").RcClassesProps<"popover" | "popoverPaper">, import("../../../../../foundation").RcTheme, import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
16
16
  size?: "small" | "medium" | undefined;
17
17
  isTwelveHourSystem?: boolean | undefined;
18
- value?: number | Date | undefined;
19
- dateMode?: boolean | undefined;
20
- onChange?: ((time?: number | Date | undefined) => void) | undefined;
18
+ value?: number | null | undefined;
19
+ dateMode?: false | undefined;
20
+ onChange?: ((time: number | null) => void) | undefined;
21
21
  min?: number | Date | undefined;
22
22
  max?: number | Date | undefined;
23
23
  HourPickerProps?: Pick<Partial<import("../NumberPicker").NumberPickerProps>, "className" | "color" | "id" | "lang" | "style" | "role" | "tabIndex" | "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" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "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" | "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" | "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" | "disabled" | "onInnerChange" | "automationId" | "getScreenReaderLabel" | "renderValue"> | undefined;
24
24
  MinutePickerProps?: Pick<Partial<import("../NumberPicker").NumberPickerProps>, "className" | "color" | "id" | "lang" | "style" | "role" | "tabIndex" | "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" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "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" | "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" | "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" | "disabled" | "onInnerChange" | "automationId" | "getScreenReaderLabel" | "renderValue"> | undefined;
25
25
  PeriodToggleProps?: Pick<Partial<import("../ToggleText").ToggleTextProps>, "form" | "className" | "color" | "id" | "lang" | "name" | "style" | "type" | "role" | "tabIndex" | "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" | "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" | "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" | "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" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "onClose" | "onInnerChange" | "getScreenReaderLabel"> | undefined;
26
- times?: number | Date | undefined;
26
+ times?: number | null | undefined;
27
27
  } & Pick<import("../../utils/PickerTextField/PickerTextField").PickerTextFieldProps, "className" | "id" | "radius" | "onFocus" | "onBlur" | "onKeyDown" | "label" | "placeholder" | "size" | "variant" | "disabled" | "action" | "autoFocus" | "fullWidth" | "error" | "inputProps" | "inputRef" | "required" | "InputProps" | "helperText" | "gutterBottom" | "onClear" | "clearBtn" | "clearButtonProps" | "validate" | "PopoverProps" | "ActionSymbol"> & import("../../../../../foundation").RcClassesProps<"popover" | "popoverPaper">>;
@@ -8,6 +8,12 @@ declare type GetFormattedTimeOption = {
8
8
  minute: number;
9
9
  period: TIME_SYSTEM_TEXT;
10
10
  };
11
+ /**
12
+ * get formatted time hh:mm
13
+ * @param option `{hour, min, period}`
14
+ * @param isTwelveHourSystem boolean
15
+ * @returns `hh:mm AM` or `hh:mm PM` or `hh:mm`
16
+ */
11
17
  declare const getFormattedTime: ({ hour, minute, period }: GetFormattedTimeOption, isTwelveHourSystem?: boolean | undefined) => string;
12
18
  declare const HALF_DAY_HOURS = 12;
13
19
  declare const HOUR_MINUTES = 60;
@@ -17,16 +23,34 @@ declare const twelveHourSystemSource: number[];
17
23
  declare const twentyFourHourSystemSource: number[];
18
24
  declare const minuteSource: number[];
19
25
  declare const lastMinute = 45;
26
+ /**
27
+ * hour and minute timestamp
28
+ */
20
29
  declare const getTimestampFromDate: (date: Date) => number;
30
+ /**
31
+ * hour and minute number
32
+ */
21
33
  declare const getHourAndMinute: (times?: number | undefined) => {
22
34
  hour: number;
23
35
  minute: number;
24
36
  };
37
+ /**
38
+ * timestamp to date
39
+ */
25
40
  declare const timestampToDate: (times?: number | undefined) => Date;
41
+ /**
42
+ * get timestamp from date or timestamp
43
+ */
26
44
  declare function getTimestamp(nowTime: number | Date): number;
45
+ /**
46
+ * hour and min object to timestamp
47
+ */
27
48
  declare const getTimestampFromHourAndMin: (option: {
28
49
  hour: number;
29
50
  minute: number;
30
51
  }) => number;
52
+ /**
53
+ * get period, `PM` or `AM`
54
+ */
31
55
  declare function getPeriod(currHour: number): TIME_SYSTEM_TEXT;
32
56
  export { getFormattedTime, getHourAndMinute, getPeriod, getTimestamp, getTimestampFromDate, getTimestampFromHourAndMin, HALF_DAY_HOURS, HOUR_MINUTES, lastMinute, minuteSource, ONE_HOUR, pad, parseNumber, parseNumberToString, TIME_GAP, timestampToDate, twelveHourSystemSource, twentyFourHourSystemSource, };
@@ -23,6 +23,12 @@ var pad = function (num, size) {
23
23
  return s;
24
24
  };
25
25
  exports.pad = pad;
26
+ /**
27
+ * get formatted time hh:mm
28
+ * @param option `{hour, min, period}`
29
+ * @param isTwelveHourSystem boolean
30
+ * @returns `hh:mm AM` or `hh:mm PM` or `hh:mm`
31
+ */
26
32
  var getFormattedTime = function (_a, isTwelveHourSystem) {
27
33
  var hour = _a.hour, minute = _a.minute, period = _a.period;
28
34
  var formattedHour = parseNumberToString(hour, isTwelveHourSystem);
@@ -59,10 +65,16 @@ var minuteSource = [0, 15, 30, 45];
59
65
  exports.minuteSource = minuteSource;
60
66
  var lastMinute = 45;
61
67
  exports.lastMinute = lastMinute;
68
+ /**
69
+ * hour and minute timestamp
70
+ */
62
71
  var getTimestampFromDate = function (date) {
63
72
  return date.getHours() * ONE_HOUR + date.getMinutes() * ONE_MINUTE;
64
73
  };
65
74
  exports.getTimestampFromDate = getTimestampFromDate;
75
+ /**
76
+ * hour and minute number
77
+ */
66
78
  var getHourAndMinute = function (times) {
67
79
  if (!times) {
68
80
  return {
@@ -78,6 +90,9 @@ var getHourAndMinute = function (times) {
78
90
  };
79
91
  };
80
92
  exports.getHourAndMinute = getHourAndMinute;
93
+ /**
94
+ * timestamp to date
95
+ */
81
96
  var timestampToDate = function (times) {
82
97
  var _a = getHourAndMinute(times), hour = _a.hour, minute = _a.minute;
83
98
  var date = new Date();
@@ -85,14 +100,23 @@ var timestampToDate = function (times) {
85
100
  return date;
86
101
  };
87
102
  exports.timestampToDate = timestampToDate;
103
+ /**
104
+ * get timestamp from date or timestamp
105
+ */
88
106
  function getTimestamp(nowTime) {
89
107
  return nowTime instanceof Date ? getTimestampFromDate(nowTime) : nowTime;
90
108
  }
91
109
  exports.getTimestamp = getTimestamp;
110
+ /**
111
+ * hour and min object to timestamp
112
+ */
92
113
  var getTimestampFromHourAndMin = function (option) {
93
114
  return option.hour * ONE_HOUR + option.minute * ONE_MINUTE;
94
115
  };
95
116
  exports.getTimestampFromHourAndMin = getTimestampFromHourAndMin;
117
+ /**
118
+ * get period, `PM` or `AM`
119
+ */
96
120
  function getPeriod(currHour) {
97
121
  return currHour >= HALF_DAY_HOURS ? constant_1.TIME_SYSTEM_TEXT.PM : constant_1.TIME_SYSTEM_TEXT.AM;
98
122
  }
@@ -12,6 +12,7 @@ import { StyledPickerPopperWrap } from './styles';
12
12
  import { ToggleText } from './ToggleText';
13
13
  import { getFormattedTime, getHourAndMinute, getNumberPickerBoundary, getPeriod, getRangeBoundary, getTimestamp, getTimestampFromDate, HALF_DAY_HOURS, minuteSource, parseNumberToString, RcTimePickerClasses, TIME_GAP, timestampToDate, twelveHourSystemSource, twentyFourHourSystemSource, } from './utils';
14
14
  var _RcTimePicker = forwardRef(function (inProps, ref) {
15
+ var _a;
15
16
  var props = useThemeProps({ props: inProps, name: 'RcTimePicker' });
16
17
  var isTwelveHourSystem = props.isTwelveHourSystem, value = props.value, times = props.times, onChange = props.onChange, disabled = props.disabled, dateMode = props.dateMode, min = props.min, max = props.max, size = props.size, onKeyDown = props.onKeyDown, onClear = props.onClear, HourPickerProps = props.HourPickerProps, MinutePickerProps = props.MinutePickerProps, PeriodToggleProps = props.PeriodToggleProps, PopoverPropsProp = props.PopoverProps, InputPropsProp = props.InputProps, classes = props.classes, rest = __rest(props, ["isTwelveHourSystem", "value", "times", "onChange", "disabled", "dateMode", "min", "max", "size", "onKeyDown", "onClear", "HourPickerProps", "MinutePickerProps", "PeriodToggleProps", "PopoverProps", "InputProps", "classes"]);
17
18
  // TODO: when props remove clear that code, not use forwardRef for Jupiter test issue
@@ -28,8 +29,8 @@ var _RcTimePicker = forwardRef(function (inProps, ref) {
28
29
  var minuteRef = useRef(null);
29
30
  var periodRef = useRef(null);
30
31
  var textFiledValueRef = useRef('');
31
- var _a = __read(useState('none'), 2), selectionShowType = _a[0], setSelectionType = _a[1];
32
- var nowTime = value || times;
32
+ var _b = __read(useState('none'), 2), selectionShowType = _b[0], setSelectionType = _b[1];
33
+ var nowTime = (_a = value) !== null && _a !== void 0 ? _a : times;
33
34
  var isHaveValue = nowTime !== undefined;
34
35
  var isDateMode = nowTime instanceof Date || dateMode;
35
36
  var currentTimestamp = getTimestamp(nowTime);
@@ -63,8 +64,8 @@ var _RcTimePicker = forwardRef(function (inProps, ref) {
63
64
  onChange(toValue);
64
65
  }
65
66
  else {
66
- // * when time is zero emit undefined
67
- onChange(toValue ? getTimestampFromDate(toValue) : undefined);
67
+ // * when time is zero emit null
68
+ onChange(toValue ? getTimestampFromDate(toValue) : null);
68
69
  }
69
70
  }
70
71
  }, [isDateMode, onChange]);
@@ -110,22 +111,8 @@ var _RcTimePicker = forwardRef(function (inProps, ref) {
110
111
  return updateTime({ period: period });
111
112
  });
112
113
  var handleClear = useEventCallback(function (e) {
113
- var time;
114
- // if that is date format, we couldn't reset to undefined, that will miss that date information.
115
- if (isDateMode) {
116
- if (range.min.date) {
117
- time = getEmitInitDate();
118
- time.setHours(range.min.hour);
119
- time.setMinutes(range.min.minute);
120
- }
121
- else {
122
- time = new Date(nowTime);
123
- time.setHours(0);
124
- time.setMinutes(0);
125
- }
126
- }
127
114
  onClear === null || onClear === void 0 ? void 0 : onClear(e);
128
- handleChange(time);
115
+ handleChange(null);
129
116
  });
130
117
  var handleSelectionViewClick = useEventCallback(function (toValue) {
131
118
  updateTime(isHourView ? { hour: toValue } : { minute: toValue });
@@ -135,7 +122,9 @@ var _RcTimePicker = forwardRef(function (inProps, ref) {
135
122
  var _a;
136
123
  (_a = actionRef.current) === null || _a === void 0 ? void 0 : _a.close();
137
124
  });
138
- var setHourSelectionShow = useEventCallback(function () { return setSelectionType('hour'); });
125
+ var setHourSelectionShow = useEventCallback(function () {
126
+ return setSelectionType('hour');
127
+ });
139
128
  var setMinuteSelectionShow = useEventCallback(function () {
140
129
  return setSelectionType('minute');
141
130
  });
@@ -318,5 +307,10 @@ RcTimePicker.defaultProps = {
318
307
  },
319
308
  };
320
309
  RcTimePicker.displayName = 'RcTimePicker';
321
- export { RcTimePicker };
310
+ /**
311
+ * when `dateMode={true}` that onChange will return `Date` object,
312
+ * otherwise return timestamp `number`
313
+ */
314
+ var ExportType = RcTimePicker;
315
+ export { ExportType as RcTimePicker };
322
316
  var templateObject_1;
@@ -2,3 +2,4 @@ export * from './NumberPicker';
2
2
  export * from './ToggleText';
3
3
  export * from './SelectionView';
4
4
  export * from './TimePicker';
5
+ export * from './utils';
@@ -18,6 +18,12 @@ var pad = function (num, size) {
18
18
  }
19
19
  return s;
20
20
  };
21
+ /**
22
+ * get formatted time hh:mm
23
+ * @param option `{hour, min, period}`
24
+ * @param isTwelveHourSystem boolean
25
+ * @returns `hh:mm AM` or `hh:mm PM` or `hh:mm`
26
+ */
21
27
  var getFormattedTime = function (_a, isTwelveHourSystem) {
22
28
  var hour = _a.hour, minute = _a.minute, period = _a.period;
23
29
  var formattedHour = parseNumberToString(hour, isTwelveHourSystem);
@@ -45,9 +51,15 @@ var twelveHourSystemSource = buildConsecutiveNumberToArray(0, 11);
45
51
  var twentyFourHourSystemSource = buildConsecutiveNumberToArray(0, 23);
46
52
  var minuteSource = [0, 15, 30, 45];
47
53
  var lastMinute = 45;
54
+ /**
55
+ * hour and minute timestamp
56
+ */
48
57
  var getTimestampFromDate = function (date) {
49
58
  return date.getHours() * ONE_HOUR + date.getMinutes() * ONE_MINUTE;
50
59
  };
60
+ /**
61
+ * hour and minute number
62
+ */
51
63
  var getHourAndMinute = function (times) {
52
64
  if (!times) {
53
65
  return {
@@ -62,18 +74,30 @@ var getHourAndMinute = function (times) {
62
74
  minute: Math.floor(minute / ONE_MINUTE),
63
75
  };
64
76
  };
77
+ /**
78
+ * timestamp to date
79
+ */
65
80
  var timestampToDate = function (times) {
66
81
  var _a = getHourAndMinute(times), hour = _a.hour, minute = _a.minute;
67
82
  var date = new Date();
68
83
  date.setHours(hour, minute, 0, 0);
69
84
  return date;
70
85
  };
86
+ /**
87
+ * get timestamp from date or timestamp
88
+ */
71
89
  function getTimestamp(nowTime) {
72
90
  return nowTime instanceof Date ? getTimestampFromDate(nowTime) : nowTime;
73
91
  }
92
+ /**
93
+ * hour and min object to timestamp
94
+ */
74
95
  var getTimestampFromHourAndMin = function (option) {
75
96
  return option.hour * ONE_HOUR + option.minute * ONE_MINUTE;
76
97
  };
98
+ /**
99
+ * get period, `PM` or `AM`
100
+ */
77
101
  function getPeriod(currHour) {
78
102
  return currHour >= HALF_DAY_HOURS ? TIME_SYSTEM_TEXT.PM : TIME_SYSTEM_TEXT.AM;
79
103
  }
@@ -7,11 +7,14 @@ var RcConfig = /** @class */ (function () {
7
7
  this._WARNING_FUNCTION = function (message, options) {
8
8
  console[(options === null || options === void 0 ? void 0 : options.level) || 'warn'](message);
9
9
  };
10
- // * get value once when init
11
- this._WARNING_IGNORE =
12
- ((_a = window === null || window === void 0 ? void 0 : window.localStorage) === null || _a === void 0 ? void 0 : _a.getItem(JUNO_WARNING_IGNORE_KEY)) === 'true';
13
- // * also provide user to set variable from window
14
- window.__JUNO__ = this;
10
+ if (typeof window !== 'undefined') {
11
+ // SSR support
12
+ // * get value once when init
13
+ this._WARNING_IGNORE =
14
+ ((_a = window === null || window === void 0 ? void 0 : window.localStorage) === null || _a === void 0 ? void 0 : _a.getItem(JUNO_WARNING_IGNORE_KEY)) === 'true';
15
+ // * also provide user to set variable from window
16
+ window.__JUNO__ = this;
17
+ }
15
18
  }
16
19
  Object.defineProperty(RcConfig.prototype, "WARNING_IGNORE", {
17
20
  get: function () {
@@ -1,6 +1,8 @@
1
1
  import { createContext, useContext } from 'react';
2
2
  var RcPortalWindowContext = createContext({
3
- document: document,
3
+ document:
4
+ // directly access `document` will cause error in next.js
5
+ typeof globalThis !== 'undefined' ? globalThis.document : window.document,
4
6
  });
5
7
  var useRcPortalWindowContext = function () { return useContext(RcPortalWindowContext); };
6
8
  export { RcPortalWindowContext, useRcPortalWindowContext };
@@ -1,9 +1,10 @@
1
- import { __assign } from "tslib";
1
+ import { __assign, __rest } from "tslib";
2
2
  import 'focus-visible';
3
3
  import React from 'react';
4
- import { MuiThemeProvider, StylesProvider } from '@material-ui/core/styles';
4
+ import { MuiThemeProvider, StylesProvider, createGenerateClassName, } from '@material-ui/core/styles';
5
5
  import { ThemeProvider as StyledThemeProvider, useTheme, } from '../styled-components';
6
6
  import createTheme from './createTheme';
7
+ import { useResultRef } from '../hooks';
7
8
  /**
8
9
  * sub theme provider,
9
10
  * that will use when you want use multiple theme in one app
@@ -24,6 +25,18 @@ export var RcSubThemeProvider = function (_a) {
24
25
  * each app should always have one `RcThemeProvider` at root,
25
26
  * if you need multiple, use `RcSubThemeProvider` inside that `RcThemeProvider` */
26
27
  export var RcThemeProvider = function (props) {
27
- return (React.createElement(StylesProvider, { injectFirst: true },
28
- React.createElement(RcSubThemeProvider, __assign({}, props))));
28
+ var prefixGlobalClass = props.prefixGlobalClass, rest = __rest(props, ["prefixGlobalClass"]);
29
+ // cannot pass `generateClassName: undefine`
30
+ // otherwise global class will be random
31
+ var stylesProviderProps = useResultRef(function () {
32
+ return prefixGlobalClass
33
+ ? {
34
+ generateClassName: createGenerateClassName({
35
+ seed: prefixGlobalClass,
36
+ }),
37
+ }
38
+ : {};
39
+ });
40
+ return (React.createElement(StylesProvider, __assign({ injectFirst: true }, stylesProviderProps.current),
41
+ React.createElement(RcSubThemeProvider, __assign({}, rest))));
29
42
  };
@@ -9,11 +9,14 @@ var RcConfig = /** @class */ (function () {
9
9
  this._WARNING_FUNCTION = function (message, options) {
10
10
  console[(options === null || options === void 0 ? void 0 : options.level) || 'warn'](message);
11
11
  };
12
- // * get value once when init
13
- this._WARNING_IGNORE =
14
- ((_a = window === null || window === void 0 ? void 0 : window.localStorage) === null || _a === void 0 ? void 0 : _a.getItem(JUNO_WARNING_IGNORE_KEY)) === 'true';
15
- // * also provide user to set variable from window
16
- window.__JUNO__ = this;
12
+ if (typeof window !== 'undefined') {
13
+ // SSR support
14
+ // * get value once when init
15
+ this._WARNING_IGNORE =
16
+ ((_a = window === null || window === void 0 ? void 0 : window.localStorage) === null || _a === void 0 ? void 0 : _a.getItem(JUNO_WARNING_IGNORE_KEY)) === 'true';
17
+ // * also provide user to set variable from window
18
+ window.__JUNO__ = this;
19
+ }
17
20
  }
18
21
  Object.defineProperty(RcConfig.prototype, "WARNING_IGNORE", {
19
22
  get: function () {
@@ -2,7 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  var react_1 = require("react");
4
4
  var RcPortalWindowContext = react_1.createContext({
5
- document: document,
5
+ document:
6
+ // directly access `document` will cause error in next.js
7
+ typeof globalThis !== 'undefined' ? globalThis.document : window.document,
6
8
  });
7
9
  exports.RcPortalWindowContext = RcPortalWindowContext;
8
10
  var useRcPortalWindowContext = function () { return react_1.useContext(RcPortalWindowContext); };
@@ -5,6 +5,8 @@ export declare type RcThemeProviderProps = {
5
5
  /** custom theme */
6
6
  theme?: RcThemeInput;
7
7
  children?: ReactNode;
8
+ /** prefix the mui global class */
9
+ prefixGlobalClass?: string;
8
10
  };
9
11
  /**
10
12
  * sub theme provider,
@@ -6,6 +6,7 @@ var react_1 = tslib_1.__importDefault(require("react"));
6
6
  var styles_1 = require("@material-ui/core/styles");
7
7
  var styled_components_1 = require("../styled-components");
8
8
  var createTheme_1 = tslib_1.__importDefault(require("./createTheme"));
9
+ var hooks_1 = require("../hooks");
9
10
  /**
10
11
  * sub theme provider,
11
12
  * that will use when you want use multiple theme in one app
@@ -26,6 +27,18 @@ exports.RcSubThemeProvider = function (_a) {
26
27
  * each app should always have one `RcThemeProvider` at root,
27
28
  * if you need multiple, use `RcSubThemeProvider` inside that `RcThemeProvider` */
28
29
  exports.RcThemeProvider = function (props) {
29
- return (react_1.default.createElement(styles_1.StylesProvider, { injectFirst: true },
30
- react_1.default.createElement(exports.RcSubThemeProvider, tslib_1.__assign({}, props))));
30
+ var prefixGlobalClass = props.prefixGlobalClass, rest = tslib_1.__rest(props, ["prefixGlobalClass"]);
31
+ // cannot pass `generateClassName: undefine`
32
+ // otherwise global class will be random
33
+ var stylesProviderProps = hooks_1.useResultRef(function () {
34
+ return prefixGlobalClass
35
+ ? {
36
+ generateClassName: styles_1.createGenerateClassName({
37
+ seed: prefixGlobalClass,
38
+ }),
39
+ }
40
+ : {};
41
+ });
42
+ return (react_1.default.createElement(styles_1.StylesProvider, tslib_1.__assign({ injectFirst: true }, stylesProviderProps.current),
43
+ react_1.default.createElement(exports.RcSubThemeProvider, tslib_1.__assign({}, rest))));
31
44
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ringcentral/juno",
3
- "version": "1.12.3-beta.5828-dc41552f",
3
+ "version": "1.12.4-beta.5847-6a74475d",
4
4
  "main": "./index.js",
5
5
  "module": "./es6/index.js",
6
6
  "author": "RingCentral",