@ringcentral/juno 2.3.5 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,7 +7,7 @@ var Chip_1 = require("../../Chip");
7
7
  var utils_1 = require("../../Chip/utils");
8
8
  var utils_2 = require("../utils");
9
9
  exports.ArrowDownButton = foundation_1.styled(IconButton_1.RcIconButton)(templateObject_1 || (templateObject_1 = tslib_1.__makeTemplateObject([""], [""])));
10
- exports.EndAdornment = foundation_1.styled.div(templateObject_2 || (templateObject_2 = tslib_1.__makeTemplateObject(["\n right: 0;\n position: absolute;\n"], ["\n right: 0;\n position: absolute;\n"])));
10
+ exports.EndAdornment = foundation_1.styled.div(templateObject_2 || (templateObject_2 = tslib_1.__makeTemplateObject(["\n right: 0;\n position: absolute;\n display: flex;\n"], ["\n right: 0;\n position: absolute;\n display: flex;\n"])));
11
11
  exports.DownshiftStyle = function (_a) {
12
12
  var _b = _a.toggleButton, toggleButton = _b === void 0 ? false : _b, // 24 + 12
13
13
  _c = _a.clearBtn, // 24 + 12
@@ -10,7 +10,7 @@ var Tooltip_1 = require("../../../Tooltip");
10
10
  var FakeButton = foundation_1.styled(IconButton_1.RcIconButton)(templateObject_1 || (templateObject_1 = tslib_1.__makeTemplateObject(["\n position: absolute;\n right: 0;\n pointer-events: none;\n"], ["\n position: absolute;\n right: 0;\n pointer-events: none;\n"])));
11
11
  var _ClearIconButton = react_1.forwardRef(function (_a, ref) {
12
12
  var onMouseDown = _a.onMouseDown, size = _a.size, iconSize = _a.iconSize, rest = tslib_1.__rest(_a, ["onMouseDown", "size", "iconSize"]);
13
- return (react_1.default.createElement(Box_1.RcBox, { display: "flex", alignItems: "center", position: "relative" },
13
+ return (react_1.default.createElement(Box_1.RcBox, { display: "inline-flex", alignItems: "center", position: "relative" },
14
14
  react_1.default.createElement(IconButton_1.RcIconButton, tslib_1.__assign({ type: "button", "aria-hidden": true, variant: "plain", symbol: juno_icon_1.DeleteCircle, tabIndex: -1,
15
15
  // * for prevent focus change
16
16
  onMouseDown: function (e) {
@@ -5,7 +5,7 @@ import { RcSubMenuProps } from '../SubMenu';
5
5
  export declare const StyledListItemSecondaryAction: import("styled-components").StyledComponentClass<Pick<Pick<import("@material-ui/core").ListItemSecondaryActionProps, "ref" | "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" | "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">, "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" | "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"> & import("react").RefAttributes<any>, import("../../../../foundation").RcTheme, Pick<Pick<Pick<import("@material-ui/core").ListItemSecondaryActionProps, "ref" | "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" | "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">, "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" | "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"> & import("react").RefAttributes<any>, "ref" | "key" | "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" | "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"> & {
6
6
  theme?: import("../../../../foundation").RcTheme | undefined;
7
7
  }>;
8
- export declare const StyledGrow: import("styled-components").StyledComponentClass<import("@material-ui/core/Grow").GrowProps, import("../../../../foundation").RcTheme, Pick<import("@material-ui/core/Grow").GrowProps, "ref" | "style" | "in" | "children" | "mountOnEnter" | "unmountOnExit" | "timeout" | "addEndListener" | "onEnter" | "onEntering" | "onEntered" | "onExit" | "onExiting" | "onExited" | "appear" | "enter" | "exit" | "disableStrictModeCompat"> & {
8
+ export declare const StyledGrow: import("styled-components").StyledComponentClass<Pick<import("@material-ui/core").GrowProps, "style" | "in" | "children" | "mountOnEnter" | "unmountOnExit" | "timeout" | "addEndListener" | "onEnter" | "onEntering" | "onEntered" | "onExit" | "onExiting" | "onExited" | "appear" | "enter" | "exit" | "disableStrictModeCompat"> & import("react").RefAttributes<any>, import("../../../../foundation").RcTheme, Pick<Pick<import("@material-ui/core").GrowProps, "style" | "in" | "children" | "mountOnEnter" | "unmountOnExit" | "timeout" | "addEndListener" | "onEnter" | "onEntering" | "onEntered" | "onExit" | "onExiting" | "onExited" | "appear" | "enter" | "exit" | "disableStrictModeCompat"> & import("react").RefAttributes<any>, "ref" | "key" | "style" | "in" | "children" | "mountOnEnter" | "unmountOnExit" | "timeout" | "addEndListener" | "onEnter" | "onEntering" | "onEntered" | "onExit" | "onExiting" | "onExited" | "appear" | "enter" | "exit" | "disableStrictModeCompat"> & {
9
9
  theme?: import("../../../../foundation").RcTheme | undefined;
10
10
  }>;
11
11
  export declare const SubMenuStyle: RcThemedStyled<RcSubMenuProps, any>;
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  var tslib_1 = require("tslib");
4
- var Grow_1 = tslib_1.__importDefault(require("@material-ui/core/Grow"));
5
4
  var foundation_1 = require("../../../../foundation");
6
5
  var ListItemSecondaryAction_1 = require("../../../List/ListItemSecondaryAction");
6
+ var Grow_1 = require("../../../Transitions/Grow");
7
7
  exports.StyledListItemSecondaryAction = foundation_1.styled(ListItemSecondaryAction_1.RcListItemSecondaryAction)(templateObject_1 || (templateObject_1 = tslib_1.__makeTemplateObject(["\n position: relative;\n transform: none;\n right: 0;\n top: 0;\n"], ["\n position: relative;\n transform: none;\n right: 0;\n top: 0;\n"])));
8
- exports.StyledGrow = foundation_1.styled(Grow_1.default)(templateObject_2 || (templateObject_2 = tslib_1.__makeTemplateObject(["\n transform-origin: 'center top';\n"], ["\n transform-origin: 'center top';\n"])));
8
+ exports.StyledGrow = foundation_1.styled(Grow_1.RcGrow)(templateObject_2 || (templateObject_2 = tslib_1.__makeTemplateObject(["\n transform-origin: center top;\n"], ["\n transform-origin: center top;\n"])));
9
9
  exports.SubMenuStyle = function () {
10
10
  return foundation_1.css(templateObject_3 || (templateObject_3 = tslib_1.__makeTemplateObject([""], [""])));
11
11
  };
@@ -180,13 +180,18 @@ var _RcVirtualizedMenuList = react_1.forwardRef(function (inProps, ref) {
180
180
  []);
181
181
  var combine = foundation_1.combineProps(tslib_1.__assign({ tabIndex: -1, scrollerRef: function (scrollElm) {
182
182
  scrollerRefFn(scrollElm);
183
- // resetViewPortStyle
184
- if (position && scrollElm) {
185
- var viewPortElm = scrollElm.firstChild;
186
- if (viewPortElm) {
187
- viewPortElm.style.position = position;
183
+ if (scrollElm) {
184
+ // * Mozilla/5.0 (iPhone; CPU iPhone OS 15_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/100.0.4896.77 Mobile/15E148 Safari/604.1
185
+ // * set that to make safari vl render correctly
186
+ scrollElm.style.transition = foundation_1.fixSafariTransitionStyle;
187
+ if (position) {
188
+ var viewPortElm = scrollElm.firstChild;
189
+ if (viewPortElm) {
190
+ viewPortElm.style.position = position;
191
+ }
188
192
  }
189
193
  }
194
+ // resetViewPortStyle
190
195
  // * when not have scrollerRef mean that is first render
191
196
  if (!isMountedRef.current) {
192
197
  onMounted();
@@ -5,7 +5,7 @@ import { RcChip } from '../../Chip';
5
5
  import { RcChipClasses } from '../../Chip/utils';
6
6
  import { RcDownshiftInputClasses } from '../utils';
7
7
  export var ArrowDownButton = styled(RcIconButton)(templateObject_1 || (templateObject_1 = __makeTemplateObject([""], [""])));
8
- export var EndAdornment = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n right: 0;\n position: absolute;\n"], ["\n right: 0;\n position: absolute;\n"])));
8
+ export var EndAdornment = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n right: 0;\n position: absolute;\n display: flex;\n"], ["\n right: 0;\n position: absolute;\n display: flex;\n"])));
9
9
  export var DownshiftStyle = function (_a) {
10
10
  var _b = _a.toggleButton, toggleButton = _b === void 0 ? false : _b, // 24 + 12
11
11
  _c = _a.clearBtn, // 24 + 12
@@ -8,7 +8,7 @@ import { withTooltip } from '../../../Tooltip';
8
8
  var FakeButton = styled(RcIconButton)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: absolute;\n right: 0;\n pointer-events: none;\n"], ["\n position: absolute;\n right: 0;\n pointer-events: none;\n"])));
9
9
  var _ClearIconButton = forwardRef(function (_a, ref) {
10
10
  var onMouseDown = _a.onMouseDown, size = _a.size, iconSize = _a.iconSize, rest = __rest(_a, ["onMouseDown", "size", "iconSize"]);
11
- return (React.createElement(RcBox, { display: "flex", alignItems: "center", position: "relative" },
11
+ return (React.createElement(RcBox, { display: "inline-flex", alignItems: "center", position: "relative" },
12
12
  React.createElement(RcIconButton, __assign({ type: "button", "aria-hidden": true, variant: "plain", symbol: DeleteCircle, tabIndex: -1,
13
13
  // * for prevent focus change
14
14
  onMouseDown: function (e) {
@@ -1,9 +1,9 @@
1
1
  import { __makeTemplateObject } from "tslib";
2
- import MuiGrow from '@material-ui/core/Grow';
3
2
  import { css, styled } from '../../../../foundation';
4
3
  import { RcListItemSecondaryAction } from '../../../List/ListItemSecondaryAction';
4
+ import { RcGrow } from '../../../Transitions/Grow';
5
5
  export var StyledListItemSecondaryAction = styled(RcListItemSecondaryAction)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: relative;\n transform: none;\n right: 0;\n top: 0;\n"], ["\n position: relative;\n transform: none;\n right: 0;\n top: 0;\n"])));
6
- export var StyledGrow = styled(MuiGrow)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n transform-origin: 'center top';\n"], ["\n transform-origin: 'center top';\n"])));
6
+ export var StyledGrow = styled(RcGrow)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n transform-origin: center top;\n"], ["\n transform-origin: center top;\n"])));
7
7
  export var SubMenuStyle = function () {
8
8
  return css(templateObject_3 || (templateObject_3 = __makeTemplateObject([""], [""])));
9
9
  };
@@ -1,7 +1,7 @@
1
1
  import { __assign, __makeTemplateObject, __rest } from "tslib";
2
2
  import React, { forwardRef, useImperativeHandle, useMemo, useRef, } from 'react';
3
3
  import { isFragment } from 'react-is';
4
- import { combineProps, getScrollbarSize, isRcElement, logInDev, styled, useDebounce, useEventCallback, useForkRef, useHiddenTabindex, useKeyboardMoveFocus, useMountState, useOnlyOneFocusable, useRcPortalWindowContext, useTheme, useThemeProps, } from '../../foundation';
4
+ import { combineProps, fixSafariTransitionStyle, getScrollbarSize, isRcElement, logInDev, styled, useDebounce, useEventCallback, useForkRef, useHiddenTabindex, useKeyboardMoveFocus, useMountState, useOnlyOneFocusable, useRcPortalWindowContext, useTheme, useThemeProps, } from '../../foundation';
5
5
  import { RcList } from '../List/List/List';
6
6
  import { isOutOfRange, useDynamicHeight, useHighlightScroll, Virtuoso, } from '../Virtuoso';
7
7
  import { RcVisuallyHidden } from '../VisuallyHidden';
@@ -178,13 +178,18 @@ var _RcVirtualizedMenuList = forwardRef(function (inProps, ref) {
178
178
  []);
179
179
  var combine = combineProps(__assign({ tabIndex: -1, scrollerRef: function (scrollElm) {
180
180
  scrollerRefFn(scrollElm);
181
- // resetViewPortStyle
182
- if (position && scrollElm) {
183
- var viewPortElm = scrollElm.firstChild;
184
- if (viewPortElm) {
185
- viewPortElm.style.position = position;
181
+ if (scrollElm) {
182
+ // * Mozilla/5.0 (iPhone; CPU iPhone OS 15_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/100.0.4896.77 Mobile/15E148 Safari/604.1
183
+ // * set that to make safari vl render correctly
184
+ scrollElm.style.transition = fixSafariTransitionStyle;
185
+ if (position) {
186
+ var viewPortElm = scrollElm.firstChild;
187
+ if (viewPortElm) {
188
+ viewPortElm.style.position = position;
189
+ }
186
190
  }
187
191
  }
192
+ // resetViewPortStyle
188
193
  // * when not have scrollerRef mean that is first render
189
194
  if (!isMountedRef.current) {
190
195
  onMounted();
@@ -1,16 +1,16 @@
1
1
  import { useEventCallback } from '../useEventCallback';
2
+ var defaultCheckKeys = ['Enter', ' '];
2
3
  /**
3
4
  * bind event with a11y keyboard, `space`, `enter`, only trigger when key includes in `checkKeys`
4
5
  *
5
6
  * that will auto preventDefault by default, if you don't want that, set `false` with `preventDefault`
6
7
  */
7
8
  export var useA11yKeyEvent = function (fn, _a) {
8
- var _b = _a === void 0 ? {} : _a, onlyOnFocus = _b.onlyOnFocus, _c = _b.preventDefault, preventDefault = _c === void 0 ? true : _c, _d = _b.checkKeys, checkKeys = _d === void 0 ? ['Enter', 'Space'] : _d;
9
+ var _b = _a === void 0 ? {} : _a, onlyOnFocus = _b.onlyOnFocus, _c = _b.preventDefault, preventDefault = _c === void 0 ? true : _c, _d = _b.checkKeys, checkKeys = _d === void 0 ? defaultCheckKeys : _d;
9
10
  return useEventCallback(function (event) {
10
11
  if (!fn || (onlyOnFocus && event.target !== event.currentTarget))
11
12
  return;
12
- var key = event.key;
13
- if (checkKeys.includes(key)) {
13
+ if (checkKeys.includes(event.key)) {
14
14
  if (preventDefault)
15
15
  event.preventDefault();
16
16
  fn(event);
@@ -1,5 +1,6 @@
1
1
  import styled from './styled-components';
2
2
  export * from './config';
3
+ export * from './isSafari154';
3
4
  export * from './contexts';
4
5
  export * from './hoc';
5
6
  export * from './hooks';
@@ -0,0 +1,50 @@
1
+ import { __makeTemplateObject } from "tslib";
2
+ import { createGlobalStyle } from 'styled-components';
3
+ import { RcClasses } from './utils/classes';
4
+ import { combineProps } from './utils/combineProps';
5
+ /**
6
+ * Conditionally apply a workaround for the CSS transition bug in Safari 15.4.
7
+ * Remove this workaround once the Safari bug is fixed.
8
+ */
9
+ export var isSafari154 = typeof navigator !== 'undefined' &&
10
+ /^((?!chrome|android).)*safari/i.test(navigator.userAgent) &&
11
+ /version\/15\.[4-9]/i.test(navigator.userAgent);
12
+ var FixSafari154Classes = RcClasses(['paper'], 'RcFixSafari154');
13
+ /**
14
+ * Conditionally apply a workaround for the CSS transition bug in Safari 15.4.
15
+ * Remove this workaround once the Safari bug is fixed.
16
+ */
17
+ export var getSafari154Theme = function (theme) {
18
+ if (!isSafari154)
19
+ return theme;
20
+ return combineProps({
21
+ props: {
22
+ // * set all grow related to only have one transition to make animation not shake after safari 15.4
23
+ MuiMenu: {
24
+ PopoverClasses: { paper: FixSafari154Classes.paper },
25
+ },
26
+ RcVirtualizedMenu: {
27
+ PopoverClasses: { paper: FixSafari154Classes.paper },
28
+ },
29
+ MuiPopover: {
30
+ PaperProps: { className: FixSafari154Classes.paper },
31
+ },
32
+ // mui tooltip prop will cover all existing props
33
+ RcTooltip: {
34
+ classes: {
35
+ tooltip: FixSafari154Classes.paper,
36
+ },
37
+ },
38
+ // mui grow not accept global prop
39
+ RcGrow: {
40
+ className: FixSafari154Classes.paper,
41
+ },
42
+ },
43
+ }, theme);
44
+ };
45
+ export var fixSafariTransitionStyle = 'all 159ms cubic-bezier(0.4, 0, 0.2, 1) 0ms';
46
+ /**
47
+ * A global style that can be used to apply a workaround for the CSS transition bug in Safari 15.4.
48
+ */
49
+ export var GlobalFixSafariStyle = createGlobalStyle(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n .", " {\n transition: ", " !important;\n }\n"], ["\n .", " {\n transition: ", " !important;\n }\n"])), FixSafari154Classes.paper, fixSafariTransitionStyle);
50
+ var templateObject_1;
@@ -3,6 +3,7 @@ import 'focus-visible';
3
3
  import React, { createContext, useContext, } from 'react';
4
4
  import { createGenerateClassName, MuiThemeProvider, StylesProvider, } from '@material-ui/core/styles';
5
5
  import { useResultRef } from '../hooks';
6
+ import { getSafari154Theme, GlobalFixSafariStyle, isSafari154, } from '../isSafari154';
6
7
  import { ThemeProvider as StyledThemeProvider, useTheme, } from '../styled-components';
7
8
  import createTheme from './createTheme';
8
9
  var NestedThemeContext = createContext(false);
@@ -16,10 +17,13 @@ var SubThemeProvider = function (_a) {
16
17
  var _b, _c;
17
18
  var parentTheme = useTheme();
18
19
  var isHaveParentRcTheme = (_c = (_b = parentTheme.palette) === null || _b === void 0 ? void 0 : _b.content) === null || _c === void 0 ? void 0 : _c.brand;
19
- var theme = !themeProp && isHaveParentRcTheme ? parentTheme : createTheme(themeProp);
20
+ // TODO: can be remove after safari fix that bug, maybe after v16
21
+ var theme = getSafari154Theme(!themeProp && isHaveParentRcTheme ? parentTheme : createTheme(themeProp));
20
22
  return (React.createElement(MuiThemeProvider, { theme: theme },
21
23
  React.createElement(StyledThemeProvider, { theme: theme },
22
- React.createElement(React.Fragment, null, children))));
24
+ React.createElement(React.Fragment, null,
25
+ isSafari154 && React.createElement(GlobalFixSafariStyle, null),
26
+ children))));
23
27
  };
24
28
  /**
25
29
  * theme wrapper, apply in root,
@@ -14,7 +14,7 @@ export var a11yKeyboardCode = {
14
14
  export var a11yKeyboard = {
15
15
  ArrowLeft: 'ArrowLeft',
16
16
  ArrowRight: 'ArrowRight',
17
- Space: 'Space',
17
+ Space: ' ',
18
18
  Escape: 'Escape',
19
19
  Enter: 'Enter',
20
20
  Tab: 'Tab',
@@ -11,9 +11,9 @@ export declare type useA11yKeyEventOptions = {
11
11
  */
12
12
  preventDefault?: boolean;
13
13
  /**
14
- * event check keys
14
+ * check point for `event.key`
15
15
  *
16
- * @default ['Enter', 'Space']
16
+ * @default ['Enter', ' ']
17
17
  */
18
18
  checkKeys?: string[];
19
19
  };
@@ -1,18 +1,18 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  var useEventCallback_1 = require("../useEventCallback");
4
+ var defaultCheckKeys = ['Enter', ' '];
4
5
  /**
5
6
  * bind event with a11y keyboard, `space`, `enter`, only trigger when key includes in `checkKeys`
6
7
  *
7
8
  * that will auto preventDefault by default, if you don't want that, set `false` with `preventDefault`
8
9
  */
9
10
  exports.useA11yKeyEvent = function (fn, _a) {
10
- var _b = _a === void 0 ? {} : _a, onlyOnFocus = _b.onlyOnFocus, _c = _b.preventDefault, preventDefault = _c === void 0 ? true : _c, _d = _b.checkKeys, checkKeys = _d === void 0 ? ['Enter', 'Space'] : _d;
11
+ var _b = _a === void 0 ? {} : _a, onlyOnFocus = _b.onlyOnFocus, _c = _b.preventDefault, preventDefault = _c === void 0 ? true : _c, _d = _b.checkKeys, checkKeys = _d === void 0 ? defaultCheckKeys : _d;
11
12
  return useEventCallback_1.useEventCallback(function (event) {
12
13
  if (!fn || (onlyOnFocus && event.target !== event.currentTarget))
13
14
  return;
14
- var key = event.key;
15
- if (checkKeys.includes(key)) {
15
+ if (checkKeys.includes(event.key)) {
16
16
  if (preventDefault)
17
17
  event.preventDefault();
18
18
  fn(event);
@@ -1,5 +1,6 @@
1
1
  import styled from './styled-components';
2
2
  export * from './config';
3
+ export * from './isSafari154';
3
4
  export * from './contexts';
4
5
  export * from './hoc';
5
6
  export * from './hooks';
@@ -4,6 +4,7 @@ var tslib_1 = require("tslib");
4
4
  var styled_components_1 = tslib_1.__importDefault(require("./styled-components"));
5
5
  exports.styled = styled_components_1.default;
6
6
  tslib_1.__exportStar(require("./config"), exports);
7
+ tslib_1.__exportStar(require("./isSafari154"), exports);
7
8
  tslib_1.__exportStar(require("./contexts"), exports);
8
9
  tslib_1.__exportStar(require("./hoc"), exports);
9
10
  tslib_1.__exportStar(require("./hooks"), exports);
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Conditionally apply a workaround for the CSS transition bug in Safari 15.4.
3
+ * Remove this workaround once the Safari bug is fixed.
4
+ */
5
+ export declare const isSafari154: boolean;
6
+ /**
7
+ * Conditionally apply a workaround for the CSS transition bug in Safari 15.4.
8
+ * Remove this workaround once the Safari bug is fixed.
9
+ */
10
+ export declare const getSafari154Theme: (theme: any) => any;
11
+ export declare const fixSafariTransitionStyle = "all 159ms cubic-bezier(0.4, 0, 0.2, 1) 0ms";
12
+ /**
13
+ * A global style that can be used to apply a workaround for the CSS transition bug in Safari 15.4.
14
+ */
15
+ export declare const GlobalFixSafariStyle: import("styled-components").GlobalStyleClass<{}, import("styled-components").DefaultTheme>;
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var tslib_1 = require("tslib");
4
+ var styled_components_1 = require("styled-components");
5
+ var classes_1 = require("./utils/classes");
6
+ var combineProps_1 = require("./utils/combineProps");
7
+ /**
8
+ * Conditionally apply a workaround for the CSS transition bug in Safari 15.4.
9
+ * Remove this workaround once the Safari bug is fixed.
10
+ */
11
+ exports.isSafari154 = typeof navigator !== 'undefined' &&
12
+ /^((?!chrome|android).)*safari/i.test(navigator.userAgent) &&
13
+ /version\/15\.[4-9]/i.test(navigator.userAgent);
14
+ var FixSafari154Classes = classes_1.RcClasses(['paper'], 'RcFixSafari154');
15
+ /**
16
+ * Conditionally apply a workaround for the CSS transition bug in Safari 15.4.
17
+ * Remove this workaround once the Safari bug is fixed.
18
+ */
19
+ exports.getSafari154Theme = function (theme) {
20
+ if (!exports.isSafari154)
21
+ return theme;
22
+ return combineProps_1.combineProps({
23
+ props: {
24
+ // * set all grow related to only have one transition to make animation not shake after safari 15.4
25
+ MuiMenu: {
26
+ PopoverClasses: { paper: FixSafari154Classes.paper },
27
+ },
28
+ RcVirtualizedMenu: {
29
+ PopoverClasses: { paper: FixSafari154Classes.paper },
30
+ },
31
+ MuiPopover: {
32
+ PaperProps: { className: FixSafari154Classes.paper },
33
+ },
34
+ // mui tooltip prop will cover all existing props
35
+ RcTooltip: {
36
+ classes: {
37
+ tooltip: FixSafari154Classes.paper,
38
+ },
39
+ },
40
+ // mui grow not accept global prop
41
+ RcGrow: {
42
+ className: FixSafari154Classes.paper,
43
+ },
44
+ },
45
+ }, theme);
46
+ };
47
+ exports.fixSafariTransitionStyle = 'all 159ms cubic-bezier(0.4, 0, 0.2, 1) 0ms';
48
+ /**
49
+ * A global style that can be used to apply a workaround for the CSS transition bug in Safari 15.4.
50
+ */
51
+ exports.GlobalFixSafariStyle = styled_components_1.createGlobalStyle(templateObject_1 || (templateObject_1 = tslib_1.__makeTemplateObject(["\n .", " {\n transition: ", " !important;\n }\n"], ["\n .", " {\n transition: ", " !important;\n }\n"])), FixSafari154Classes.paper, exports.fixSafariTransitionStyle);
52
+ var templateObject_1;
@@ -5,6 +5,7 @@ require("focus-visible");
5
5
  var react_1 = tslib_1.__importStar(require("react"));
6
6
  var styles_1 = require("@material-ui/core/styles");
7
7
  var hooks_1 = require("../hooks");
8
+ var isSafari154_1 = require("../isSafari154");
8
9
  var styled_components_1 = require("../styled-components");
9
10
  var createTheme_1 = tslib_1.__importDefault(require("./createTheme"));
10
11
  var NestedThemeContext = react_1.createContext(false);
@@ -18,10 +19,13 @@ var SubThemeProvider = function (_a) {
18
19
  var _b, _c;
19
20
  var parentTheme = styled_components_1.useTheme();
20
21
  var isHaveParentRcTheme = (_c = (_b = parentTheme.palette) === null || _b === void 0 ? void 0 : _b.content) === null || _c === void 0 ? void 0 : _c.brand;
21
- var theme = !themeProp && isHaveParentRcTheme ? parentTheme : createTheme_1.default(themeProp);
22
+ // TODO: can be remove after safari fix that bug, maybe after v16
23
+ var theme = isSafari154_1.getSafari154Theme(!themeProp && isHaveParentRcTheme ? parentTheme : createTheme_1.default(themeProp));
22
24
  return (react_1.default.createElement(styles_1.MuiThemeProvider, { theme: theme },
23
25
  react_1.default.createElement(styled_components_1.ThemeProvider, { theme: theme },
24
- react_1.default.createElement(react_1.default.Fragment, null, children))));
26
+ react_1.default.createElement(react_1.default.Fragment, null,
27
+ isSafari154_1.isSafari154 && react_1.default.createElement(isSafari154_1.GlobalFixSafariStyle, null),
28
+ children))));
25
29
  };
26
30
  /**
27
31
  * theme wrapper, apply in root,
@@ -203,7 +203,7 @@ export declare type RcTheme = {
203
203
  RcZoomFrom?: RcZoomFromProps;
204
204
  RcZoomInFadeOut?: RcZoomInFadeOutProps;
205
205
  RcTypography?: RcTypographyProps;
206
- RcVirtualizedDivider: RcVirtualizedDividerProps;
206
+ RcVirtualizedDivider?: RcVirtualizedDividerProps;
207
207
  RcVirtualizedMenu?: RcVirtualizedMenuProps;
208
208
  RcVirtualizedMenuList?: RcVirtualizedMenuListProps;
209
209
  };
@@ -16,7 +16,7 @@ exports.a11yKeyboardCode = {
16
16
  exports.a11yKeyboard = {
17
17
  ArrowLeft: 'ArrowLeft',
18
18
  ArrowRight: 'ArrowRight',
19
- Space: 'Space',
19
+ Space: ' ',
20
20
  Escape: 'Escape',
21
21
  Enter: 'Enter',
22
22
  Tab: 'Tab',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ringcentral/juno",
3
- "version": "2.3.5",
3
+ "version": "2.4.0",
4
4
  "author": "RingCentral",
5
5
  "license": "MIT",
6
6
  "main": "./index.js",