@ringcentral/juno 2.2.0 → 2.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -2
- package/components/Animations/Highlight/Highlight.d.ts +2 -2
- package/components/Badge/Badge.js +1 -1
- package/components/Downshift/SuggestionList/utils/useSuggestionList.js +1 -2
- package/components/Downshift/utils/useDownshift.js +2 -3
- package/components/Downshift/utils/useDownshiftTag.js +1 -2
- package/components/Forms/Picker/DatePicker/DatePicker.js +10 -11
- package/components/Forms/Select/PlainSelect/PlainSelect.js +1 -2
- package/components/Forms/TextField/styles/ClearIconButton.d.ts +3 -6
- package/components/Forms/TextField/styles/ClearIconButton.js +16 -9
- package/components/PortalHost/Connectable/ThrottleScheduler.d.ts +0 -1
- package/components/PortalHost/Connectable/ThrottleScheduler.js +3 -5
- package/components/Table/Table.d.ts +14 -0
- package/components/Table/Table.js +17 -0
- package/components/Table/TableBody/TableBody.d.ts +8 -0
- package/components/Table/TableBody/TableBody.js +14 -0
- package/components/Table/TableBody/index.d.ts +1 -0
- package/components/Table/TableBody/index.js +4 -0
- package/components/Table/TableCell/TableCell.d.ts +27 -0
- package/components/Table/TableCell/TableCell.js +39 -0
- package/components/Table/TableCell/index.d.ts +1 -0
- package/components/Table/TableCell/index.js +4 -0
- package/components/Table/TableCell/styles/TableCellStyle.d.ts +3 -0
- package/components/Table/TableCell/styles/TableCellStyle.js +16 -0
- package/components/Table/TableCell/styles/index.d.ts +1 -0
- package/components/Table/TableCell/styles/index.js +4 -0
- package/components/Table/TableCell/utils/TableCellUtils.d.ts +1 -0
- package/components/Table/TableCell/utils/TableCellUtils.js +4 -0
- package/components/Table/TableCell/utils/index.d.ts +1 -0
- package/components/Table/TableCell/utils/index.js +4 -0
- package/components/Table/TableContainer/TableContainer.d.ts +19 -0
- package/components/Table/TableContainer/TableContainer.js +22 -0
- package/components/Table/TableContainer/index.d.ts +1 -0
- package/components/Table/TableContainer/index.js +4 -0
- package/components/Table/TableContainer/styles/TableContainerStyle.d.ts +3 -0
- package/components/Table/TableContainer/styles/TableContainerStyle.js +13 -0
- package/components/Table/TableContainer/styles/index.d.ts +1 -0
- package/components/Table/TableContainer/styles/index.js +4 -0
- package/components/Table/TableHead/TableHead.d.ts +8 -0
- package/components/Table/TableHead/TableHead.js +14 -0
- package/components/Table/TableHead/index.d.ts +1 -0
- package/components/Table/TableHead/index.js +4 -0
- package/components/Table/TableRow/TableRow.d.ts +15 -0
- package/components/Table/TableRow/TableRow.js +20 -0
- package/components/Table/TableRow/index.d.ts +1 -0
- package/components/Table/TableRow/index.js +4 -0
- package/components/Table/TableRow/styles/TableRowStyle.d.ts +3 -0
- package/components/Table/TableRow/styles/TableRowStyle.js +9 -0
- package/components/Table/TableRow/styles/index.d.ts +1 -0
- package/components/Table/TableRow/styles/index.js +4 -0
- package/components/Table/TableRow/utils/TableRowUtils.d.ts +1 -0
- package/components/Table/TableRow/utils/TableRowUtils.js +4 -0
- package/components/Table/TableRow/utils/index.d.ts +1 -0
- package/components/Table/TableRow/utils/index.js +4 -0
- package/components/Table/context.d.ts +10 -0
- package/components/Table/context.js +4 -0
- package/components/Table/index.d.ts +8 -0
- package/components/Table/index.js +10 -0
- package/components/Table/types.d.ts +1 -0
- package/components/Table/types.js +2 -0
- package/components/Tables/TableHead.d.ts +1 -1
- package/components/Tables/TableHead.js +1 -3
- package/components/Tables/TableHeadCell.d.ts +1 -1
- package/components/Tables/TableHeadCell.js +1 -2
- package/components/Tooltip/utils/useTooltipForceHide.js +24 -10
- package/components/index.d.ts +1 -1
- package/components/index.js +1 -1
- package/es6/README.md +1 -2
- package/es6/components/Badge/Badge.js +2 -2
- package/es6/components/Downshift/SuggestionList/utils/useSuggestionList.js +1 -2
- package/es6/components/Downshift/utils/useDownshift.js +1 -2
- package/es6/components/Downshift/utils/useDownshiftTag.js +1 -2
- package/es6/components/Forms/Picker/DatePicker/DatePicker.js +1 -2
- package/es6/components/Forms/Select/PlainSelect/PlainSelect.js +1 -2
- package/es6/components/Forms/TextField/styles/ClearIconButton.js +16 -9
- package/es6/components/PortalHost/Connectable/ThrottleScheduler.js +3 -5
- package/es6/components/Table/Table.js +15 -0
- package/es6/components/Table/TableBody/TableBody.js +12 -0
- package/es6/components/Table/TableBody/index.js +1 -0
- package/es6/components/Table/TableCell/TableCell.js +37 -0
- package/es6/components/Table/TableCell/index.js +1 -0
- package/es6/components/Table/TableCell/styles/TableCellStyle.js +14 -0
- package/es6/components/Table/TableCell/styles/index.js +1 -0
- package/es6/components/Table/TableCell/utils/TableCellUtils.js +2 -0
- package/es6/components/Table/TableCell/utils/index.js +1 -0
- package/es6/components/Table/TableContainer/TableContainer.js +20 -0
- package/es6/components/Table/TableContainer/index.js +1 -0
- package/es6/components/Table/TableContainer/styles/TableContainerStyle.js +11 -0
- package/es6/components/Table/TableContainer/styles/index.js +1 -0
- package/es6/components/Table/TableHead/TableHead.js +12 -0
- package/es6/components/Table/TableHead/index.js +1 -0
- package/es6/components/Table/TableRow/TableRow.js +18 -0
- package/es6/components/Table/TableRow/index.js +1 -0
- package/es6/components/Table/TableRow/styles/TableRowStyle.js +7 -0
- package/es6/components/Table/TableRow/styles/index.js +1 -0
- package/es6/components/Table/TableRow/utils/TableRowUtils.js +2 -0
- package/es6/components/Table/TableRow/utils/index.js +1 -0
- package/es6/components/Table/context.js +2 -0
- package/es6/components/Table/index.js +7 -0
- package/es6/components/Table/types.js +0 -0
- package/es6/components/Tables/TableHead.js +1 -3
- package/es6/components/Tables/TableHeadCell.js +2 -3
- package/es6/components/Tooltip/utils/useTooltipForceHide.js +25 -11
- package/es6/components/index.js +1 -1
- package/es6/foundation/hooks/index.js +2 -0
- package/es6/foundation/hooks/useControlled/index.js +1 -0
- package/es6/foundation/hooks/useControlled/useControlled.js +1 -0
- package/es6/foundation/hooks/useEventListener/useEventListener.js +8 -6
- package/es6/foundation/hooks/useGlobalListener/index.js +1 -0
- package/es6/foundation/hooks/useGlobalListener/useGlobalListener.js +130 -0
- package/es6/foundation/hooks/useHiddenTabindex/useHiddenTabindex.js +4 -3
- package/es6/foundation/hooks/useLongPress/useLongPress.js +2 -3
- package/es6/foundation/hooks/useOverflow/useOverflow.js +18 -15
- package/es6/foundation/hooks/useResizeObserver/useResizeObserver.js +4 -4
- package/es6/foundation/hooks/useTouchMouseEvent/useTouchMouseEvent.js +8 -5
- package/es6/foundation/utils/getRefElement.js +13 -0
- package/es6/foundation/utils/index.js +1 -0
- package/es6/foundation/utils/removeClassName.js +4 -3
- package/es6/foundation/utils/selectionHandler.js +7 -6
- package/foundation/hooks/index.d.ts +2 -0
- package/foundation/hooks/index.js +2 -0
- package/foundation/hooks/useControlled/index.d.ts +1 -0
- package/foundation/hooks/useControlled/index.js +4 -0
- package/foundation/hooks/useControlled/useControlled.d.ts +1 -0
- package/foundation/hooks/useControlled/useControlled.js +4 -0
- package/foundation/hooks/useEventListener/useEventListener.d.ts +2 -2
- package/foundation/hooks/useEventListener/useEventListener.js +8 -6
- package/foundation/hooks/useGlobalListener/index.d.ts +1 -0
- package/foundation/hooks/useGlobalListener/index.js +4 -0
- package/foundation/hooks/useGlobalListener/useGlobalListener.d.ts +108 -0
- package/foundation/hooks/useGlobalListener/useGlobalListener.js +133 -0
- package/foundation/hooks/useHiddenTabindex/useHiddenTabindex.d.ts +2 -2
- package/foundation/hooks/useHiddenTabindex/useHiddenTabindex.js +4 -3
- package/foundation/hooks/useLongPress/useLongPress.js +1 -2
- package/foundation/hooks/useOverflow/useOverflow.d.ts +2 -3
- package/foundation/hooks/useOverflow/useOverflow.js +18 -15
- package/foundation/hooks/useResizeObserver/useResizeObserver.d.ts +2 -3
- package/foundation/hooks/useResizeObserver/useResizeObserver.js +3 -3
- package/foundation/hooks/useTouchMouseEvent/useTouchMouseEvent.d.ts +5 -1
- package/foundation/hooks/useTouchMouseEvent/useTouchMouseEvent.js +8 -5
- package/foundation/theme/theme.type.d.ts +6 -3
- package/foundation/utils/getRefElement.d.ts +6 -0
- package/foundation/utils/getRefElement.js +15 -0
- package/foundation/utils/index.d.ts +1 -0
- package/foundation/utils/index.js +1 -0
- package/foundation/utils/removeClassName.d.ts +3 -3
- package/foundation/utils/removeClassName.js +4 -3
- package/foundation/utils/selectionHandler.d.ts +3 -3
- package/foundation/utils/selectionHandler.js +7 -6
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './TableHead';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React, { ComponentProps } from 'react';
|
|
2
|
+
import MuiTableRow, { TableRowClassKey } from '@material-ui/core/TableRow';
|
|
3
|
+
import { RcBaseProps } from '../../../foundation';
|
|
4
|
+
declare type RcTableRowProps = {
|
|
5
|
+
/**
|
|
6
|
+
* `hover` and `selected` styles will be useless when it is `true`
|
|
7
|
+
* @default false
|
|
8
|
+
*/
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
classes?: Partial<Record<TableRowClassKey | 'disabled', string>>;
|
|
11
|
+
} & RcBaseProps<ComponentProps<typeof MuiTableRow>, 'classes'>;
|
|
12
|
+
declare const RcTableRow: import("styled-components").StyledComponentClass<Pick<RcTableRowProps, "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" | "disabled" | "selected" | "hover"> & React.RefAttributes<any>, import("../../../foundation").RcTheme, Pick<Pick<RcTableRowProps, "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" | "disabled" | "selected" | "hover"> & 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" | "disabled" | "selected" | "hover"> & {
|
|
13
|
+
theme?: import("../../../foundation").RcTheme | undefined;
|
|
14
|
+
}>;
|
|
15
|
+
export { RcTableRow, RcTableRowProps };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var tslib_1 = require("tslib");
|
|
4
|
+
var react_1 = tslib_1.__importStar(require("react"));
|
|
5
|
+
var TableRow_1 = tslib_1.__importDefault(require("@material-ui/core/TableRow"));
|
|
6
|
+
var foundation_1 = require("../../../foundation");
|
|
7
|
+
var styles_1 = require("./styles");
|
|
8
|
+
var utils_1 = require("./utils");
|
|
9
|
+
var clsx_1 = tslib_1.__importDefault(require("clsx"));
|
|
10
|
+
var _RcTableRow = react_1.forwardRef(function (props, ref) {
|
|
11
|
+
var _a;
|
|
12
|
+
var _b = foundation_1.useThemeProps({ props: props, name: 'RcTableRow' }), className = _b.className, classesProp = _b.classes, children = _b.children, disabled = _b.disabled, rest = tslib_1.__rest(_b, ["className", "classes", "children", "disabled"]);
|
|
13
|
+
var classes = react_1.useMemo(function () { return foundation_1.combineClasses(utils_1.RcTableRowClasses, classesProp); }, [classesProp]);
|
|
14
|
+
return (react_1.default.createElement(TableRow_1.default, tslib_1.__assign({}, rest, { ref: ref, classes: classes, className: clsx_1.default(className, (_a = {}, _a[utils_1.RcTableRowClasses.disabled] = disabled, _a)) }), children));
|
|
15
|
+
});
|
|
16
|
+
var RcTableRow = foundation_1.styled(_RcTableRow)(templateObject_1 || (templateObject_1 = tslib_1.__makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), styles_1.TableRowStyle);
|
|
17
|
+
exports.RcTableRow = RcTableRow;
|
|
18
|
+
RcTableRow.defaultProps = {};
|
|
19
|
+
RcTableRow.displayName = 'RcTableRow';
|
|
20
|
+
var templateObject_1;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './TableRow';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var tslib_1 = require("tslib");
|
|
4
|
+
var foundation_1 = require("../../../../foundation");
|
|
5
|
+
var utils_1 = require("../utils");
|
|
6
|
+
exports.TableRowStyle = function () {
|
|
7
|
+
return foundation_1.css(templateObject_1 || (templateObject_1 = tslib_1.__makeTemplateObject(["\n ", " {\n &.", ", &:hover {\n background-color: ", ";\n }\n }\n\n &.", " {\n &,\n &:hover {\n background-color: ", ";\n }\n }\n\n &.", " {\n &.", ", &.", ", &:hover {\n background-color: unset;\n }\n }\n "], ["\n ", " {\n &.", ", &:hover {\n background-color: ", ";\n }\n }\n\n &.", " {\n &,\n &:hover {\n background-color: ", ";\n }\n }\n\n &.", " {\n &.", ", &.", ", &:hover {\n background-color: unset;\n }\n }\n "])), foundation_1.nonTouchHoverMedia, utils_1.RcTableRowClasses.hover, foundation_1.setOpacity(foundation_1.palette2('action', 'grayLight'), '08'), utils_1.RcTableRowClasses.selected, foundation_1.setOpacity(foundation_1.palette2('interactive', 'f01'), '08'), utils_1.RcTableRowClasses.disabled, utils_1.RcTableRowClasses.selected, utils_1.RcTableRowClasses.hover);
|
|
8
|
+
};
|
|
9
|
+
var templateObject_1;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './TableRowStyle';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const RcTableRowClasses: Partial<import("../../../../foundation").UnitMap<"footer" | "head" | "root" | "disabled" | "selected" | "hover", any>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './TableRowUtils';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
/// <reference types="styled-jsx" />
|
|
3
|
+
import { RcTableSize } from './types';
|
|
4
|
+
export declare type TableContextProps = {
|
|
5
|
+
/**
|
|
6
|
+
* Allows TableCells to inherit size of the Table.
|
|
7
|
+
*/
|
|
8
|
+
size?: RcTableSize;
|
|
9
|
+
};
|
|
10
|
+
export declare const RcTableContext: import("react").Context<TableContextProps>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./Table"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./TableBody"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./TableCell"), exports);
|
|
7
|
+
tslib_1.__exportStar(require("./TableContainer"), exports);
|
|
8
|
+
tslib_1.__exportStar(require("./TableHead"), exports);
|
|
9
|
+
tslib_1.__exportStar(require("./TableRow"), exports);
|
|
10
|
+
tslib_1.__exportStar(require("./context"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare type RcTableSize = 'large' | 'medium' | 'small' | 'auto';
|
|
@@ -2,12 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
var tslib_1 = require("tslib");
|
|
4
4
|
var react_1 = tslib_1.__importDefault(require("react"));
|
|
5
|
-
var foundation_1 = require("../../foundation");
|
|
6
5
|
var styled_1 = require("./styled");
|
|
7
6
|
var TableHeadCell_1 = require("./TableHeadCell");
|
|
8
7
|
var types_1 = require("./types");
|
|
9
|
-
var RcTableHeadView = function (
|
|
10
|
-
var props = foundation_1.useThemeProps({ props: inProps, name: 'RcTableHeadView' });
|
|
8
|
+
var RcTableHeadView = function (props) {
|
|
11
9
|
var columnData = props.columnData, sortMap = props.sortMap, sortHandler = props.sortHandler;
|
|
12
10
|
return (react_1.default.createElement("thead", null,
|
|
13
11
|
react_1.default.createElement(styled_1.StyledTableRow, null, columnData.map(function (column) {
|
|
@@ -9,8 +9,7 @@ var foundation_1 = require("../../foundation");
|
|
|
9
9
|
var Icon_1 = require("../Icon");
|
|
10
10
|
var styled_1 = require("./styled");
|
|
11
11
|
var types_1 = require("./types");
|
|
12
|
-
var RcTableHeadCell = function (
|
|
13
|
-
var props = foundation_1.useThemeProps({ props: inProps, name: 'RcTableHeadCell' });
|
|
12
|
+
var RcTableHeadCell = function (props) {
|
|
14
13
|
var automationID = props.automationID, title = props.title, width = props.width, sortDirection = props.sortDirection, sortKey = props.sortKey, textAlign = props.textAlign;
|
|
15
14
|
var onClick = function () {
|
|
16
15
|
var sortHandler = props.sortHandler, sortKey = props.sortKey, sortDirection = props.sortDirection;
|
|
@@ -1,10 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
var tslib_1 = require("tslib");
|
|
4
|
+
/* eslint-disable react-hooks/rules-of-hooks */
|
|
4
5
|
var react_1 = require("react");
|
|
5
6
|
var foundation_1 = require("../../../foundation");
|
|
6
7
|
exports.useTooltipForceHide = function (_a) {
|
|
7
8
|
var tooltipForceHide = _a.tooltipForceHide, openProp = _a.open, onClose = _a.onClose, onOpen = _a.onOpen, ref = _a.ref;
|
|
9
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
10
|
+
foundation_1.useChange(function (prev) {
|
|
11
|
+
// ignore first time
|
|
12
|
+
if (prev !== undefined) {
|
|
13
|
+
foundation_1.logInDev({
|
|
14
|
+
component: 'RcTooltip',
|
|
15
|
+
message: 'Should not change tooltipForceHide between controlled and uncontrolled, tooltipForceHide should always be boolean value',
|
|
16
|
+
level: 'error',
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
}, function () { return tooltipForceHide === undefined; });
|
|
20
|
+
}
|
|
21
|
+
// * when not set tooltipForceHide, always return undefined directly, not bind any event addition
|
|
22
|
+
if (tooltipForceHide === undefined)
|
|
23
|
+
return undefined;
|
|
8
24
|
var _b = tslib_1.__read(foundation_1.useRefState(false), 2), openRef = _b[0], setOpen = _b[1];
|
|
9
25
|
var isOverRef = react_1.useRef(false);
|
|
10
26
|
var openState = tooltipForceHide ? false : openProp !== null && openProp !== void 0 ? openProp : openRef.current;
|
|
@@ -37,14 +53,12 @@ exports.useTooltipForceHide = function (_a) {
|
|
|
37
53
|
setOpen(false);
|
|
38
54
|
onClose === null || onClose === void 0 ? void 0 : onClose(event);
|
|
39
55
|
});
|
|
40
|
-
return
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}
|
|
49
|
-
: undefined;
|
|
56
|
+
return {
|
|
57
|
+
disableFocusListener: tooltipForceHide,
|
|
58
|
+
disableHoverListener: tooltipForceHide,
|
|
59
|
+
disableTouchListener: tooltipForceHide,
|
|
60
|
+
open: openState,
|
|
61
|
+
onOpen: handleOpen,
|
|
62
|
+
onClose: handleClose,
|
|
63
|
+
};
|
|
50
64
|
};
|
package/components/index.d.ts
CHANGED
|
@@ -41,7 +41,7 @@ export * from './Responsive';
|
|
|
41
41
|
export * from './Snackbar';
|
|
42
42
|
export * from './Stepper';
|
|
43
43
|
export * from './TablePagination';
|
|
44
|
-
export * from './
|
|
44
|
+
export * from './Table';
|
|
45
45
|
export * from './Tabs';
|
|
46
46
|
export * from './Tag';
|
|
47
47
|
export * from './Text';
|
package/components/index.js
CHANGED
|
@@ -44,7 +44,7 @@ tslib_1.__exportStar(require("./Responsive"), exports);
|
|
|
44
44
|
tslib_1.__exportStar(require("./Snackbar"), exports);
|
|
45
45
|
tslib_1.__exportStar(require("./Stepper"), exports);
|
|
46
46
|
tslib_1.__exportStar(require("./TablePagination"), exports);
|
|
47
|
-
tslib_1.__exportStar(require("./
|
|
47
|
+
tslib_1.__exportStar(require("./Table"), exports);
|
|
48
48
|
tslib_1.__exportStar(require("./Tabs"), exports);
|
|
49
49
|
tslib_1.__exportStar(require("./Tag"), exports);
|
|
50
50
|
tslib_1.__exportStar(require("./Text"), exports);
|
package/es6/README.md
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
# Juno
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@ringcentral/juno)
|
|
4
|
-
[](https://www.npmjs.com/package/@ringcentral/juno?activeTab=versions)
|
|
5
4
|
|
|
6
|
-
[](https://www.npmjs.com/package/@ringcentral/juno-icon)
|
|
7
6
|
|
|
8
7
|
Ringcentral React Component library, make your app have the same user experience as Ringcentral Apps.
|
|
9
8
|
|
|
@@ -3,7 +3,7 @@ import React, { forwardRef, useMemo, useRef, } from 'react';
|
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
import MuiBadge from '@material-ui/core/Badge';
|
|
5
5
|
import { capitalize } from '@material-ui/core/utils';
|
|
6
|
-
import { combineProps, logInDev, styled, useChange, useForkRef, useThemeProps, } from '../../foundation';
|
|
6
|
+
import { combineClasses, combineProps, logInDev, styled, useChange, useForkRef, useThemeProps, } from '../../foundation';
|
|
7
7
|
import { RcBox } from '../Box';
|
|
8
8
|
import { RcPresence } from '../Presence';
|
|
9
9
|
import { BadgeStyle } from './styles';
|
|
@@ -34,7 +34,7 @@ var _RcBadge = forwardRef(function (inProps, ref) {
|
|
|
34
34
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
35
35
|
useRoundBadgeOffset(innerRef);
|
|
36
36
|
}
|
|
37
|
-
var classes = useMemo(function () { return
|
|
37
|
+
var classes = useMemo(function () { return combineClasses(RcBadgeClasses, classesProp); }, [classesProp]);
|
|
38
38
|
var CustomDotBadge = useMemo(function () {
|
|
39
39
|
return isDot
|
|
40
40
|
? forwardRef(function (_a, ref) {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { __assign, __read, __rest } from "tslib";
|
|
2
2
|
import { useCallback, useEffect, useMemo, useRef, } from 'react';
|
|
3
|
-
import { useControlled } from '
|
|
4
|
-
import { combineProps, useForceUpdate, useId, useKeyboardMoveFocus, } from '../../../../foundation';
|
|
3
|
+
import { combineProps, useForceUpdate, useControlled, useId, useKeyboardMoveFocus, } from '../../../../foundation';
|
|
5
4
|
import { DEFAULT_GET_OPTION_LABEL, isItemCanSelected, } from '../../utils/DownshiftUtils';
|
|
6
5
|
import { useDownshiftGroup } from '../../utils/useDownshiftGroup';
|
|
7
6
|
var DEFAULT_HIGHLIGHTED_INDEX = -1;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { __assign, __awaiter, __generator, __read, __spread } from "tslib";
|
|
2
2
|
import { useCallback, useLayoutEffect, useMemo, useRef, } from 'react';
|
|
3
|
-
import { useControlled } from '
|
|
4
|
-
import { combineProps, getSelectionPosition, useChange, useId, useSleep, } from '../../../foundation';
|
|
3
|
+
import { combineProps, getSelectionPosition, useChange, useControlled, useId, useSleep, } from '../../../foundation';
|
|
5
4
|
import { useSuggestionList } from '../SuggestionList/utils/useSuggestionList';
|
|
6
5
|
import { DEFAULT_GET_OPTION_LABEL, DEFAULT_KEY_TO_CHIPS, downshiftComponentName, stringArrToRegExp, } from './DownshiftUtils';
|
|
7
6
|
import { useDownshiftTag } from './useDownshiftTag';
|
|
@@ -2,8 +2,7 @@ import { __assign, __read, __rest, __spread } from "tslib";
|
|
|
2
2
|
import { useMemo, useRef, useState } from 'react';
|
|
3
3
|
import isString from 'lodash/isString';
|
|
4
4
|
import uniqueId from 'lodash/uniqueId';
|
|
5
|
-
import { useControlled } from '
|
|
6
|
-
import { combineProps, useEventCallback, useKeyboardMoveFocus, useRefState, } from '../../../foundation';
|
|
5
|
+
import { combineProps, useControlled, useEventCallback, useKeyboardMoveFocus, useRefState, } from '../../../foundation';
|
|
7
6
|
import { DEFAULT_GET_OPTION_LABEL, downshiftComponentName, stringArrToRegExp, } from './DownshiftUtils';
|
|
8
7
|
var DOWNSHIFT_ID_TOKEN = 'rc-chip-';
|
|
9
8
|
/** @inner inner hook work with useDownshift */
|
|
@@ -2,11 +2,10 @@ import { __assign, __makeTemplateObject, __read, __rest } from "tslib";
|
|
|
2
2
|
import React, { forwardRef, useCallback, useEffect, useMemo, useRef, } from 'react';
|
|
3
3
|
import moment from 'moment';
|
|
4
4
|
import MomentUtils from '@date-io/moment';
|
|
5
|
-
import { useControlled } from '@material-ui/core/utils';
|
|
6
5
|
import { MuiPickersUtilsProvider, useUtils as useMuiUtils, } from '@material-ui/pickers';
|
|
7
6
|
import { findClosestEnabledDate as MuiFindClosestEnabledDate } from '@material-ui/pickers/_helpers/date-utils';
|
|
8
7
|
import { DateBorder } from '@ringcentral/juno-icon';
|
|
9
|
-
import { combineClasses, combineProps, omit, styled, useDeprecatedCheck, useEventCallback, useThemeProps, } from '../../../../foundation';
|
|
8
|
+
import { combineClasses, combineProps, omit, styled, useControlled, useDeprecatedCheck, useEventCallback, useThemeProps, } from '../../../../foundation';
|
|
10
9
|
import { PickerTextField, } from '../utils';
|
|
11
10
|
import { Calendar } from './Calendar';
|
|
12
11
|
import { invalidateDateInRange, RcDatePickerClasses, ScreenReaderProvider, } from './utils';
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { __assign, __makeTemplateObject, __read, __rest } from "tslib";
|
|
2
2
|
import React, { forwardRef, useMemo, useState } from 'react';
|
|
3
|
-
import { useControlled } from '
|
|
4
|
-
import { combineProps, hasValue, logInDev, styled, } from '../../../../foundation';
|
|
3
|
+
import { combineProps, hasValue, logInDev, useControlled, styled, } from '../../../../foundation';
|
|
5
4
|
import { RcButton } from '../../../Buttons';
|
|
6
5
|
import { RcMenu } from '../../../Menu';
|
|
7
6
|
import { RcVirtualizedMenu } from '../../../VirtualizedMenu';
|
|
@@ -3,14 +3,21 @@ import React, { forwardRef } from 'react';
|
|
|
3
3
|
import { DeleteCircle } from '@ringcentral/juno-icon';
|
|
4
4
|
import { styled } from '../../../../foundation';
|
|
5
5
|
import { RcIconButton } from '../../../Buttons/IconButton';
|
|
6
|
+
import { RcBox } from '../../../Box';
|
|
7
|
+
import { withTooltip } from '../../../Tooltip';
|
|
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"])));
|
|
6
9
|
var _ClearIconButton = forwardRef(function (_a, ref) {
|
|
7
|
-
var onMouseDown = _a.onMouseDown, rest = __rest(_a, ["onMouseDown"]);
|
|
8
|
-
return (React.createElement(
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
e
|
|
12
|
-
|
|
13
|
-
|
|
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" },
|
|
12
|
+
React.createElement(RcIconButton, __assign({ type: "button", "aria-hidden": true, variant: "plain", symbol: DeleteCircle, tabIndex: -1,
|
|
13
|
+
// * for prevent focus change
|
|
14
|
+
onMouseDown: function (e) {
|
|
15
|
+
e.preventDefault();
|
|
16
|
+
onMouseDown === null || onMouseDown === void 0 ? void 0 : onMouseDown(e);
|
|
17
|
+
}, size: size }, rest, { useRcTooltip: false })),
|
|
18
|
+
React.createElement(FakeButton, { variant: "plain", as: "div", size: size, ref: ref })));
|
|
14
19
|
});
|
|
15
|
-
|
|
16
|
-
var
|
|
20
|
+
// TODO: fix this after upgarde ts
|
|
21
|
+
export var ClearIconButton = styled(withTooltip(_ClearIconButton))(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n position: relative;\n"], ["\n display: flex;\n align-items: center;\n position: relative;\n"])));
|
|
22
|
+
ClearIconButton.defaultProps = { useRcTooltip: true };
|
|
23
|
+
var templateObject_1, templateObject_2;
|
|
@@ -6,17 +6,15 @@ var ThrottleScheduler = /** @class */ (function () {
|
|
|
6
6
|
var _this = this;
|
|
7
7
|
if (!this._timeoutID) {
|
|
8
8
|
this._timeoutID = window.setTimeout(function () {
|
|
9
|
-
|
|
10
|
-
_this.
|
|
9
|
+
var _a;
|
|
10
|
+
_this._timeoutID = undefined;
|
|
11
|
+
(_a = _this._lastTask) === null || _a === void 0 ? void 0 : _a.call(_this);
|
|
11
12
|
});
|
|
12
13
|
}
|
|
13
14
|
this._lastTask = task;
|
|
14
15
|
};
|
|
15
16
|
ThrottleScheduler.prototype.clear = function () {
|
|
16
17
|
window.clearTimeout(this._timeoutID);
|
|
17
|
-
this._reset();
|
|
18
|
-
};
|
|
19
|
-
ThrottleScheduler.prototype._reset = function () {
|
|
20
18
|
this._lastTask = null;
|
|
21
19
|
this._timeoutID = undefined;
|
|
22
20
|
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { __assign, __makeTemplateObject, __rest } from "tslib";
|
|
2
|
+
import MuiTable from '@material-ui/core/Table';
|
|
3
|
+
import { styled, useThemeProps } from '../../foundation';
|
|
4
|
+
import React, { forwardRef, useMemo } from 'react';
|
|
5
|
+
import { RcTableContext } from './context';
|
|
6
|
+
var _RcTable = forwardRef(function (props, ref) {
|
|
7
|
+
var _a = useThemeProps({ props: props, name: 'RcTable' }), children = _a.children, size = _a.size, rest = __rest(_a, ["children", "size"]);
|
|
8
|
+
var tableContextValue = useMemo(function () { return ({ size: size }); }, [size]);
|
|
9
|
+
return (React.createElement(MuiTable, __assign({}, rest, { ref: ref }),
|
|
10
|
+
React.createElement(RcTableContext.Provider, { value: tableContextValue }, children)));
|
|
11
|
+
});
|
|
12
|
+
var RcTable = styled(_RcTable)(templateObject_1 || (templateObject_1 = __makeTemplateObject([""], [""])));
|
|
13
|
+
RcTable.displayName = 'RcTable';
|
|
14
|
+
export { RcTable };
|
|
15
|
+
var templateObject_1;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { __assign, __makeTemplateObject, __rest } from "tslib";
|
|
2
|
+
import MuiTableBody from '@material-ui/core/TableBody';
|
|
3
|
+
import React, { forwardRef } from 'react';
|
|
4
|
+
import { styled, useThemeProps } from '../../../foundation';
|
|
5
|
+
var _RcTableBody = forwardRef(function (props, ref) {
|
|
6
|
+
var _a = useThemeProps({ props: props, name: 'RcTableHead' }), children = _a.children, rest = __rest(_a, ["children"]);
|
|
7
|
+
return (React.createElement(MuiTableBody, __assign({}, rest, { ref: ref }), children));
|
|
8
|
+
});
|
|
9
|
+
var RcTableBody = styled(_RcTableBody)(templateObject_1 || (templateObject_1 = __makeTemplateObject([""], [""])));
|
|
10
|
+
RcTableBody.displayName = 'RcTableBody';
|
|
11
|
+
export { RcTableBody };
|
|
12
|
+
var templateObject_1;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './TableBody';
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { __assign, __makeTemplateObject, __rest } from "tslib";
|
|
2
|
+
import React, { forwardRef, useMemo, useContext } from 'react';
|
|
3
|
+
import MuiTableCell from '@material-ui/core/TableCell';
|
|
4
|
+
import { combineClasses, styled, useThemeProps, } from '../../../foundation';
|
|
5
|
+
import { TableCellStyle } from './styles';
|
|
6
|
+
import { RcTableCellClasses } from './utils';
|
|
7
|
+
import { RcButtonBase } from '../../Buttons';
|
|
8
|
+
import { RcIcon } from '../../Icon';
|
|
9
|
+
import { JumpToLatest as AscSortIcon, JumpToUnread as DescSortIcon, } from '@ringcentral/juno-icon';
|
|
10
|
+
import clsx from 'clsx';
|
|
11
|
+
import { RcTableContext } from '../context';
|
|
12
|
+
var _RcTableCell = forwardRef(function (props, ref) {
|
|
13
|
+
var _a = useThemeProps({ props: props, name: 'RcTableCell' }), classesProp = _a.classes, childrenProp = _a.children, size = _a.size, sortDirection = _a.sortDirection, _b = _a.activeSort, activeSort = _b === void 0 ? false : _b, rest = __rest(_a, ["classes", "children", "size", "sortDirection", "activeSort"]);
|
|
14
|
+
var classes = combineClasses(RcTableCellClasses, classesProp);
|
|
15
|
+
var children = useMemo(function () {
|
|
16
|
+
var _a;
|
|
17
|
+
if (sortDirection) {
|
|
18
|
+
return (React.createElement(RcButtonBase, { disableRipple: true, className: clsx(classes.sortButton, (_a = {},
|
|
19
|
+
_a[classes.activeSort] = activeSort,
|
|
20
|
+
_a)) },
|
|
21
|
+
childrenProp,
|
|
22
|
+
React.createElement(RcIcon, { size: "small", className: classes.sortIcon, symbol: sortDirection === 'asc' ? DescSortIcon : AscSortIcon })));
|
|
23
|
+
}
|
|
24
|
+
return childrenProp;
|
|
25
|
+
}, [activeSort, childrenProp, classes, sortDirection]);
|
|
26
|
+
return (React.createElement(MuiTableCell, __assign({}, rest, (sortDirection ? { sortDirection: sortDirection } : {}), { ref: ref, classes: classes }), children));
|
|
27
|
+
});
|
|
28
|
+
var RcTableCell = styled(_RcTableCell).attrs(function (_a) {
|
|
29
|
+
var _b;
|
|
30
|
+
var sizeProp = _a.size, _c = _a.sortDirection, sortDirection = _c === void 0 ? false : _c, rest = __rest(_a, ["size", "sortDirection"]);
|
|
31
|
+
var contextSize = useContext(RcTableContext).size;
|
|
32
|
+
var size = (_b = sizeProp !== null && sizeProp !== void 0 ? sizeProp : contextSize) !== null && _b !== void 0 ? _b : 'medium';
|
|
33
|
+
return __assign(__assign({}, rest), { size: size, sortDirection: sortDirection });
|
|
34
|
+
})(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), TableCellStyle);
|
|
35
|
+
RcTableCell.displayName = 'RcTableCell';
|
|
36
|
+
export { RcTableCell };
|
|
37
|
+
var templateObject_1;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './TableCell';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { __makeTemplateObject } from "tslib";
|
|
2
|
+
import { css, fakeBorder, focusVisible, palette2, px, spacing, typography, } from '../../../../foundation';
|
|
3
|
+
import { RcIcon } from '../../../Icon';
|
|
4
|
+
import { RcTableCellClasses } from '../utils';
|
|
5
|
+
var SizeMap = {
|
|
6
|
+
large: 56,
|
|
7
|
+
medium: 48,
|
|
8
|
+
small: 40,
|
|
9
|
+
};
|
|
10
|
+
export var TableCellStyle = function (prop) {
|
|
11
|
+
var size = prop.size, sortDirection = prop.sortDirection;
|
|
12
|
+
return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n box-sizing: border-box;\n padding: ", ";\n min-width: 96px;\n\n &.", " {\n ", "\n height: 40px;\n border-bottom: 1px solid ", ";\n color: ", ";\n background-color: ", ";\n\n padding: ", ";\n\n .", " {\n opacity: 0;\n padding: ", ";\n }\n\n .", " {\n color: ", ";\n\n .", " {\n opacity: 1;\n }\n }\n\n .", " {\n display: inline-flex;\n justify-content: flex-start;\n flex-direction: inherit;\n align-items: center;\n\n height: 100%;\n width: 100%;\n padding: ", ";\n\n ", " {\n color: ", ";\n }\n\n &:hover {\n background-color: ", ";\n\n .", " {\n opacity: 1;\n }\n }\n\n ", " {\n ", "\n background-color: ", ";\n }\n }\n }\n\n &.", " {\n ", "\n color: ", ";\n\n padding: ", ";\n height: ", ";\n }\n "], ["\n box-sizing: border-box;\n padding: ", ";\n min-width: 96px;\n\n &.", " {\n ", "\n height: 40px;\n border-bottom: 1px solid ", ";\n color: ", ";\n background-color: ", ";\n\n padding: ", ";\n\n .", " {\n opacity: 0;\n padding: ", ";\n }\n\n .", " {\n color: ", ";\n\n .", " {\n opacity: 1;\n }\n }\n\n .", " {\n display: inline-flex;\n justify-content: flex-start;\n flex-direction: inherit;\n align-items: center;\n\n height: 100%;\n width: 100%;\n padding: ", ";\n\n ", " {\n color: ", ";\n }\n\n &:hover {\n background-color: ", ";\n\n .", " {\n opacity: 1;\n }\n }\n\n ", " {\n ", "\n background-color: ", ";\n }\n }\n }\n\n &.", " {\n ", "\n color: ", ";\n\n padding: ", ";\n height: ", ";\n }\n "])), spacing(0, 2), RcTableCellClasses.head, typography('caption2'), palette2('neutral', 'l02'), palette2('neutral', 'f05'), palette2('neutral', 'b02'), Boolean(sortDirection) && 'unset', RcTableCellClasses.sortIcon, spacing(0, 2), RcTableCellClasses.activeSort, palette2('interactive', 'f01'), RcTableCellClasses.sortIcon, RcTableCellClasses.sortButton, spacing(0, 2), RcIcon, palette2('neutral', 'f04'), palette2('neutral', 'b03'), RcTableCellClasses.sortIcon, focusVisible, fakeBorder({ color: palette2('interactive', 'f01') }), palette2('neutral', 'b03'), RcTableCellClasses.body, typography('body1'), palette2('neutral', 'f06'), size === 'auto' && spacing(3, 2), size !== 'auto' && px(SizeMap[size]));
|
|
13
|
+
};
|
|
14
|
+
var templateObject_1;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './TableCellStyle';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './TableCellUtils';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { __assign, __makeTemplateObject, __rest } from "tslib";
|
|
2
|
+
import MuiTableContainer from '@material-ui/core/TableContainer';
|
|
3
|
+
import React, { forwardRef } from 'react';
|
|
4
|
+
import { styled, useThemeProps } from '../../../foundation';
|
|
5
|
+
import { TableContainerStyle } from './styles';
|
|
6
|
+
var _RcTableContainer = forwardRef(function (props, ref) {
|
|
7
|
+
var _a = useThemeProps({
|
|
8
|
+
props: props,
|
|
9
|
+
name: 'RcTableContainer',
|
|
10
|
+
}), children = _a.children, bordered = _a.bordered, rest = __rest(_a, ["children", "bordered"]);
|
|
11
|
+
return (React.createElement(MuiTableContainer, __assign({}, rest, { ref: ref }), children));
|
|
12
|
+
});
|
|
13
|
+
var RcTableContainer = styled(_RcTableContainer)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), TableContainerStyle);
|
|
14
|
+
RcTableContainer.defaultProps = {
|
|
15
|
+
bordered: false,
|
|
16
|
+
square: false,
|
|
17
|
+
};
|
|
18
|
+
RcTableContainer.displayName = 'RcTableContainer';
|
|
19
|
+
export { RcTableContainer };
|
|
20
|
+
var templateObject_1;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './TableContainer';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { __makeTemplateObject } from "tslib";
|
|
2
|
+
import { css, palette2, px } from '../../../../foundation';
|
|
3
|
+
import { RcTableBody } from '../../TableBody';
|
|
4
|
+
import { RcTableCell } from '../../TableCell';
|
|
5
|
+
import { RcTableRow } from '../../TableRow';
|
|
6
|
+
export var TableContainerStyle = function (props) {
|
|
7
|
+
var bordered = props.bordered, square = props.square;
|
|
8
|
+
return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n ", "\n "], ["\n ",
|
|
9
|
+
"\n "])), bordered && css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n border-radius: ", ";\n border: 1px solid ", ";\n\n ", " ", ":last-child ", " {\n border: none;\n }\n "], ["\n border-radius: ", ";\n border: 1px solid ", ";\n\n ", " ", ":last-child ", " {\n border: none;\n }\n "])), !square && px(4), palette2('neutral', 'l02'), RcTableBody, RcTableRow, RcTableCell));
|
|
10
|
+
};
|
|
11
|
+
var templateObject_1, templateObject_2;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './TableContainerStyle';
|