@ringcentral/juno 2.2.0 → 2.3.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.
- package/README.md +1 -2
- package/components/Animations/Highlight/Highlight.d.ts +2 -2
- 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/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/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/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
package/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
|
|
|
@@ -11,7 +11,7 @@ declare type RcHighlightProps = {
|
|
|
11
11
|
/** that animation easing */
|
|
12
12
|
easing?: string;
|
|
13
13
|
/** that trigger highlight action ref */
|
|
14
|
-
action
|
|
14
|
+
action?: React.Ref<() => void>;
|
|
15
15
|
/** background color when highlight */
|
|
16
16
|
backgroundColor?: RcPaletteProp;
|
|
17
17
|
} & RcBaseProps<TransitionProps, 'in' | 'timeout'>;
|
|
@@ -29,7 +29,7 @@ declare const RcHighlight: React.ForwardRefExoticComponent<{
|
|
|
29
29
|
/** that animation easing */
|
|
30
30
|
easing?: string | undefined;
|
|
31
31
|
/** that trigger highlight action ref */
|
|
32
|
-
action: React.
|
|
32
|
+
action?: ((instance: (() => void) | null) => void) | React.RefObject<() => void> | null | undefined;
|
|
33
33
|
/** background color when highlight */
|
|
34
34
|
backgroundColor?: (string & Record<never, never>) | "action.grayDark" | "action.grayLight" | "action.primary" | "avatar.ash" | "avatar.blueberry" | "avatar.brass" | "avatar.global" | "avatar.gold" | "avatar.lake" | "avatar.oasis" | "avatar.pear" | "avatar.persimmon" | "avatar.sage" | "avatar.tomato" | "content.brand" | "danger.b01" | "danger.b02" | "danger.b03" | "danger.b04" | "danger.f01" | "danger.f02" | "danger.f11" | "dialHeader.avatarBg" | "dialHeader.avatarIcon" | "dialHeader.bg" | "dialHeader.focusBorder" | "dialHeader.icon" | "dialHeader.text" | "dialHeader.textHint" | "disabled.b01" | "disabled.f01" | "disabled.f02" | "header.bgLeft" | "header.bgOverlay" | "header.bgOverlayDisabled" | "header.bgRight" | "header.border" | "header.divider" | "header.fabBg" | "header.fabIcon" | "header.focusBorder" | "header.icon" | "header.iconDisabled" | "header.text" | "header.textHint" | "highContrast" | "highlight.b01" | "highlight.b02" | "highlight.b03" | "highlight.f01" | "highlight.f02" | "informative.b01" | "informative.f01" | "informative.f02" | "interactive.b01" | "interactive.b02" | "interactive.f01" | "label.black02" | "label.blue01" | "label.blue02" | "label.green01" | "label.green02" | "label.orange01" | "label.orange02" | "label.purple01" | "label.purple02" | "label.red01" | "label.red02" | "label.teal01" | "label.teal02" | "label.yellow01" | "label.yellow02" | "nav.b01" | "nav.b02" | "nav.bookmark" | "nav.ctlDefault" | "nav.ctlSelected" | "nav.f01" | "nav.f02" | "nav.f03" | "nav.f04" | "nav.iconDefault" | "nav.iconSelected" | "nav.line" | "nav.mention" | "nav.menuBg" | "nav.menuText" | "neutral.b01" | "neutral.b02" | "neutral.b03" | "neutral.b04" | "neutral.b05" | "neutral.b06" | "neutral.elevation" | "neutral.f01" | "neutral.f02" | "neutral.f03" | "neutral.f04" | "neutral.f05" | "neutral.f06" | "neutral.f07" | "neutral.f11" | "neutral.l01" | "neutral.l02" | "neutral.l03" | "neutral.l04" | "neutral.transparent" | "presence.available" | "presence.busy" | "presence.invisible" | "subAction" | "success.b01" | "success.b02" | "success.b03" | "success.b04" | "success.b05" | "success.f01" | "success.f02" | "success.f11" | "tab.default" | "tab.selected" | "umi.bg" | "umi.mentioned" | "umi.text" | "warning.b01" | "warning.b02" | "warning.b03" | "warning.f01" | "warning.f02" | "warning.f11" | string[] | import("../../../foundation/styles/newPalette").PaletteReturnType | undefined;
|
|
35
35
|
} & Pick<import("@material-ui/core/transitions").TransitionProps, "style" | "mountOnEnter" | "unmountOnExit" | "addEndListener" | "onEnter" | "onEntering" | "onEntered" | "onExit" | "onExiting" | "onExited" | "appear" | "enter" | "exit"> & React.RefAttributes<any>>;
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
var tslib_1 = require("tslib");
|
|
4
4
|
var react_1 = require("react");
|
|
5
|
-
var utils_1 = require("@material-ui/core/utils");
|
|
6
5
|
var foundation_1 = require("../../../../foundation");
|
|
7
6
|
var DownshiftUtils_1 = require("../../utils/DownshiftUtils");
|
|
8
7
|
var useDownshiftGroup_1 = require("../../utils/useDownshiftGroup");
|
|
@@ -14,7 +13,7 @@ var componentName = 'useSuggestionList';
|
|
|
14
13
|
exports.useSuggestionList = function (_a) {
|
|
15
14
|
var id = _a.id, inputValueProp = _a.inputValue, _b = _a.getOptionLabel, getOptionLabel = _b === void 0 ? DownshiftUtils_1.DEFAULT_GET_OPTION_LABEL : _b, filterOptions = _a.filterOptions, disabledItemsHighlightable = _a.disabledItemsHighlightable, options = _a.options, onInputChangeProp = _a.onInputChange, inputRef = _a.inputRef, onKeyDownProp = _a.onKeyDown, onSelect = _a.onSelect, onClear = _a.onClear, getOptionDisabled = _a.getOptionDisabled, groupBy = _a.groupBy, onGroupExpanded = _a.onGroupExpanded, groupVariant = _a.groupVariant, groupExpanded = _a.groupExpanded, groupDefaultExpanded = _a.groupDefaultExpanded, getExpandIconProps = _a.getExpandIconProps, processFilteredResult = _a.processFilteredResult;
|
|
16
15
|
var isTitleMode = groupVariant === 'normal';
|
|
17
|
-
var _c = tslib_1.__read(
|
|
16
|
+
var _c = tslib_1.__read(foundation_1.useControlled({
|
|
18
17
|
controlled: inputValueProp,
|
|
19
18
|
default: '',
|
|
20
19
|
name: componentName,
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
var tslib_1 = require("tslib");
|
|
4
4
|
var react_1 = require("react");
|
|
5
|
-
var utils_1 = require("@material-ui/core/utils");
|
|
6
5
|
var foundation_1 = require("../../../foundation");
|
|
7
6
|
var useSuggestionList_1 = require("../SuggestionList/utils/useSuggestionList");
|
|
8
7
|
var DownshiftUtils_1 = require("./DownshiftUtils");
|
|
@@ -13,12 +12,12 @@ exports.useDownshift = function (_a) {
|
|
|
13
12
|
var multipleProp = _a.multiple, variant = _a.variant, labelProp = _a.label, inputValueProp = _a.inputValue, _b = _a.getOptionLabel, getOptionLabel = _b === void 0 ? DownshiftUtils_1.DEFAULT_GET_OPTION_LABEL : _b, _c = _a.keyToTags, keyToTags = _c === void 0 ? DownshiftUtils_1.DEFAULT_KEY_TO_CHIPS : _c, filterOptionsProp = _a.filterOptions, disabledItemsHighlightable = _a.disabledItemsHighlightable, options = _a.options, freeSolo = _a.freeSolo, onInputChangeProp = _a.onInputChange, maxFreeSolo = _a.maxFreeSolo, onMaxFreeSolo = _a.onMaxFreeSolo, openOnFocus = _a.openOnFocus, disableCloseOnSelect = _a.disableCloseOnSelect, initialIsOpen = _a.initialIsOpen, autoSelect = _a.autoSelect, inputContainerRef = _a.inputContainerRef, inputRef = _a.inputRef, wrapperRef = _a.wrapperRef, onKeyDownProp = _a.onKeyDown, onSelectChange = _a.onChange, _d = _a.value, selectedItemsProp = _d === void 0 ? [] : _d, disabled = _a.disabled, renderNoOptions = _a.renderNoOptions, onClear = _a.onClear, autoHighlight = _a.autoHighlight, getOptionDisabled = _a.getOptionDisabled, addNoOptionItem = _a.addNoOptionItem, groupBy = _a.groupBy, onGroupExpanded = _a.onGroupExpanded, groupVariant = _a.groupVariant, groupExpanded = _a.groupExpanded, groupDefaultExpanded = _a.groupDefaultExpanded, getExpandIconProps = _a.getExpandIconProps, required = _a.required, openProp = _a.open, onOpen = _a.onOpen, onClose = _a.onClose, focused = _a.focused;
|
|
14
13
|
var isAutocomplete = variant === 'autocomplete';
|
|
15
14
|
var downshiftId = foundation_1.useId('downshift', true);
|
|
16
|
-
var _e = tslib_1.__read(
|
|
15
|
+
var _e = tslib_1.__read(foundation_1.useControlled({
|
|
17
16
|
controlled: focused,
|
|
18
17
|
default: false,
|
|
19
18
|
name: DownshiftUtils_1.downshiftComponentName,
|
|
20
19
|
}), 2), inputFocused = _e[0], setInputFocused = _e[1];
|
|
21
|
-
var _f = tslib_1.__read(
|
|
20
|
+
var _f = tslib_1.__read(foundation_1.useControlled({
|
|
22
21
|
controlled: openProp,
|
|
23
22
|
default: initialIsOpen || false,
|
|
24
23
|
name: DownshiftUtils_1.downshiftComponentName,
|
|
@@ -4,7 +4,6 @@ var tslib_1 = require("tslib");
|
|
|
4
4
|
var react_1 = require("react");
|
|
5
5
|
var isString_1 = tslib_1.__importDefault(require("lodash/isString"));
|
|
6
6
|
var uniqueId_1 = tslib_1.__importDefault(require("lodash/uniqueId"));
|
|
7
|
-
var utils_1 = require("@material-ui/core/utils");
|
|
8
7
|
var foundation_1 = require("../../../foundation");
|
|
9
8
|
var DownshiftUtils_1 = require("./DownshiftUtils");
|
|
10
9
|
var DOWNSHIFT_ID_TOKEN = 'rc-chip-';
|
|
@@ -13,7 +12,7 @@ exports.useDownshiftTag = function (_a) {
|
|
|
13
12
|
var downshiftId = _a.id, _b = _a.value, selectedItemsProp = _b === void 0 ? [] : _b, onSelectChange = _a.onChange, variant = _a.variant, _c = _a.getOptionLabel, getOptionLabel = _c === void 0 ? DownshiftUtils_1.DEFAULT_GET_OPTION_LABEL : _c, onInputChangeProp = _a.onInputChange, wrapperRef = _a.wrapperRef, inputRef = _a.inputRef, freeSolo = _a.freeSolo, maxFreeSolo = _a.maxFreeSolo, keyToTags = _a.keyToTags, onMaxFreeSolo = _a.onMaxFreeSolo, multiple = _a.multiple, labelProp = _a.label, required = _a.required, disabled = _a.disabled, getStopCreateFreeSolo = _a.getStopCreateFreeSolo, onReset = _a.onReset;
|
|
14
13
|
var isAutocomplete = variant === 'autocomplete';
|
|
15
14
|
var isSelectedFromAutocompleteRef = react_1.useRef(false);
|
|
16
|
-
var _d = tslib_1.__read(
|
|
15
|
+
var _d = tslib_1.__read(foundation_1.useControlled({
|
|
17
16
|
controlled: selectedItemsProp,
|
|
18
17
|
default: [],
|
|
19
18
|
name: DownshiftUtils_1.downshiftComponentName,
|
|
@@ -4,15 +4,14 @@ var tslib_1 = require("tslib");
|
|
|
4
4
|
var react_1 = tslib_1.__importStar(require("react"));
|
|
5
5
|
var moment_1 = tslib_1.__importDefault(require("moment"));
|
|
6
6
|
var moment_2 = tslib_1.__importDefault(require("@date-io/moment"));
|
|
7
|
-
var utils_1 = require("@material-ui/core/utils");
|
|
8
7
|
var pickers_1 = require("@material-ui/pickers");
|
|
9
8
|
var date_utils_1 = require("@material-ui/pickers/_helpers/date-utils");
|
|
10
9
|
var juno_icon_1 = require("@ringcentral/juno-icon");
|
|
11
10
|
var foundation_1 = require("../../../../foundation");
|
|
12
|
-
var
|
|
11
|
+
var utils_1 = require("../utils");
|
|
13
12
|
var Calendar_1 = require("./Calendar");
|
|
14
|
-
var
|
|
15
|
-
exports.RcDatePickerClasses =
|
|
13
|
+
var utils_2 = require("./utils");
|
|
14
|
+
exports.RcDatePickerClasses = utils_2.RcDatePickerClasses;
|
|
16
15
|
var defaultMinDate = new Date('1900-01-01');
|
|
17
16
|
var defaultMaxDate = new Date('2100-01-01');
|
|
18
17
|
var DEFAULT_FORMAT = 'MM/DD/YYYY';
|
|
@@ -21,7 +20,7 @@ exports.DEFAULT_FORMAT = DEFAULT_FORMAT;
|
|
|
21
20
|
var InnerRcDatePicker = react_1.forwardRef(function (props, ref) {
|
|
22
21
|
var date = props.date, _a = props.value, value = _a === void 0 ? date : _a, onChange = props.onChange, formatString = props.formatString, locale = props.locale, todayButtonText = props.todayButtonText, minDateProp = props.minDate, maxDateProp = props.maxDate, min = props.min, max = props.max, disableFuture = props.disableFuture, disablePast = props.disablePast, loadingIndicator = props.loadingIndicator, onMonthChange = props.onMonthChange, renderDay = props.renderDay, disabled = props.disabled, shouldDisableDateProp = props.shouldDisableDate, size = props.size, onClose = props.onClose, onClear = props.onClear, classes = props.classes, PopoverPropsProp = props.PopoverProps, screenReaderProps = props.screenReaderProps, rest = tslib_1.__rest(props, ["date", "value", "onChange", "formatString", "locale", "todayButtonText", "minDate", "maxDate", "min", "max", "disableFuture", "disablePast", "loadingIndicator", "onMonthChange", "renderDay", "disabled", "shouldDisableDate", "size", "onClose", "onClear", "classes", "PopoverProps", "screenReaderProps"]);
|
|
23
22
|
var utils = pickers_1.useUtils();
|
|
24
|
-
var _b = tslib_1.__read(
|
|
23
|
+
var _b = tslib_1.__read(foundation_1.useControlled({
|
|
25
24
|
controlled: value,
|
|
26
25
|
default: null,
|
|
27
26
|
name: 'RcDatePicker',
|
|
@@ -35,7 +34,7 @@ var InnerRcDatePicker = react_1.forwardRef(function (props, ref) {
|
|
|
35
34
|
max: moment_1.default(maxDate || defaultMaxDate),
|
|
36
35
|
}); }, [minDate, maxDate]);
|
|
37
36
|
var getInvalidateDateInRange = foundation_1.useEventCallback(function (day) {
|
|
38
|
-
return
|
|
37
|
+
return utils_2.invalidateDateInRange(day, { dateRange: dateRange, now: utils.date(), disableFuture: disableFuture, disablePast: disablePast }, utils);
|
|
39
38
|
});
|
|
40
39
|
var shouldDisableDate = foundation_1.useEventCallback(function (day) {
|
|
41
40
|
return (Boolean(getInvalidateDateInRange(day)) ||
|
|
@@ -68,8 +67,8 @@ var InnerRcDatePicker = react_1.forwardRef(function (props, ref) {
|
|
|
68
67
|
var PopoverProps = react_1.useMemo(function () {
|
|
69
68
|
return foundation_1.combineProps({
|
|
70
69
|
classes: foundation_1.combineClasses({
|
|
71
|
-
root:
|
|
72
|
-
paper:
|
|
70
|
+
root: utils_2.RcDatePickerClasses.popover,
|
|
71
|
+
paper: utils_2.RcDatePickerClasses.popoverPaper,
|
|
73
72
|
}, {
|
|
74
73
|
root: classes === null || classes === void 0 ? void 0 : classes.popover,
|
|
75
74
|
paper: classes === null || classes === void 0 ? void 0 : classes.popoverPaper,
|
|
@@ -78,7 +77,7 @@ var InnerRcDatePicker = react_1.forwardRef(function (props, ref) {
|
|
|
78
77
|
}, PopoverPropsProp);
|
|
79
78
|
}, [PopoverPropsProp, classes, onClose]);
|
|
80
79
|
var calendarClasses = react_1.useMemo(function () {
|
|
81
|
-
return foundation_1.combineClasses(foundation_1.omit(
|
|
80
|
+
return foundation_1.combineClasses(foundation_1.omit(utils_2.RcDatePickerClasses, ['popover', 'popoverPaper']), foundation_1.omit(classes, ['popover', 'popoverPaper']));
|
|
82
81
|
}, [classes]);
|
|
83
82
|
var handleChange = function (toDate, fromUserSelect) {
|
|
84
83
|
var _a;
|
|
@@ -108,8 +107,8 @@ var InnerRcDatePicker = react_1.forwardRef(function (props, ref) {
|
|
|
108
107
|
}
|
|
109
108
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
110
109
|
}, [value]);
|
|
111
|
-
return (react_1.default.createElement(
|
|
112
|
-
react_1.default.createElement(
|
|
110
|
+
return (react_1.default.createElement(utils_1.PickerTextField, tslib_1.__assign({ ref: ref, action: actionRef, onClear: handleClear, PopoverProps: PopoverProps, value: textFiledValue, disabled: disabled, ActionSymbol: juno_icon_1.DateBorder }, rest),
|
|
111
|
+
react_1.default.createElement(utils_2.ScreenReaderProvider, { screenReaderProps: screenReaderProps },
|
|
113
112
|
react_1.default.createElement(Calendar_1.Calendar, { size: size, classes: calendarClasses, date: nowDate, dateRange: dateRange, handleDaySelect: handleDaySelect, disableFuture: disableFuture, disablePast: disablePast, loadingIndicator: loadingIndicator, onMonthChange: onMonthChange, renderDay: renderDay, shouldDisableDate: shouldDisableDate, getInvalidateDateInRange: getInvalidateDateInRange, todayButtonText: todayButtonText, formatString: formatString }))));
|
|
114
113
|
});
|
|
115
114
|
var _RcDatePicker = react_1.forwardRef(function (inProps, ref) {
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
var tslib_1 = require("tslib");
|
|
4
4
|
var react_1 = tslib_1.__importStar(require("react"));
|
|
5
|
-
var core_1 = require("@material-ui/core");
|
|
6
5
|
var foundation_1 = require("../../../../foundation");
|
|
7
6
|
var Buttons_1 = require("../../../Buttons");
|
|
8
7
|
var Menu_1 = require("../../../Menu");
|
|
@@ -24,7 +23,7 @@ var _RcPlainSelect = react_1.forwardRef(function (_a, ref) {
|
|
|
24
23
|
var children = _a.children, className = _a.className, classes = _a.classes, valueProp = _a.value, defaultValue = _a.defaultValue, renderValue = _a.renderValue, variant = _a.variant, ButtonProps = _a.ButtonProps, innerRef = _a.innerRef, SelectInputProps = _a.SelectInputProps, InputProps = _a.InputProps, disabled = _a.disabled, autoFocus = _a.autoFocus, size = _a.size, virtualize = _a.virtualize, fullWidth = _a.fullWidth, color = _a.color,
|
|
25
24
|
//
|
|
26
25
|
IconComponent = _a.IconComponent, onOpenProp = _a.onOpen, onCloseProp = _a.onClose, onChangeProp = _a.onChange, rest = tslib_1.__rest(_a, ["children", "className", "classes", "value", "defaultValue", "renderValue", "variant", "ButtonProps", "innerRef", "SelectInputProps", "InputProps", "disabled", "autoFocus", "size", "virtualize", "fullWidth", "color", "IconComponent", "onOpen", "onClose", "onChange"]);
|
|
27
|
-
var _b = tslib_1.__read(
|
|
26
|
+
var _b = tslib_1.__read(foundation_1.useControlled({
|
|
28
27
|
controlled: valueProp,
|
|
29
28
|
default: defaultValue,
|
|
30
29
|
name: displayName,
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import MuiTable from '@material-ui/core/Table';
|
|
2
|
+
import { RcBaseProps } from '../../foundation';
|
|
3
|
+
import React, { ComponentProps } from 'react';
|
|
4
|
+
import { RcTableSize } from './types';
|
|
5
|
+
declare type RcTableProps = {
|
|
6
|
+
/**
|
|
7
|
+
* Allows TableCells to inherit size of the Table.
|
|
8
|
+
*/
|
|
9
|
+
size?: RcTableSize;
|
|
10
|
+
} & RcBaseProps<ComponentProps<typeof MuiTable>, 'size'>;
|
|
11
|
+
declare const RcTable: import("styled-components").StyledComponentClass<Pick<RcTableProps, "key" | "className" | "color" | "id" | "lang" | "style" | "width" | "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" | "summary" | "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" | "size" | "innerRef" | "padding" | "cellPadding" | "cellSpacing" | "stickyHeader"> & React.RefAttributes<any>, import("../../foundation").RcTheme, Pick<Pick<RcTableProps, "key" | "className" | "color" | "id" | "lang" | "style" | "width" | "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" | "summary" | "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" | "size" | "innerRef" | "padding" | "cellPadding" | "cellSpacing" | "stickyHeader"> & React.RefAttributes<any>, "ref" | "key" | "className" | "color" | "id" | "lang" | "style" | "width" | "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" | "summary" | "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" | "size" | "innerRef" | "padding" | "cellPadding" | "cellSpacing" | "stickyHeader"> & {
|
|
12
|
+
theme?: import("../../foundation").RcTheme | undefined;
|
|
13
|
+
}>;
|
|
14
|
+
export { RcTable, RcTableProps };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var tslib_1 = require("tslib");
|
|
4
|
+
var Table_1 = tslib_1.__importDefault(require("@material-ui/core/Table"));
|
|
5
|
+
var foundation_1 = require("../../foundation");
|
|
6
|
+
var react_1 = tslib_1.__importStar(require("react"));
|
|
7
|
+
var context_1 = require("./context");
|
|
8
|
+
var _RcTable = react_1.forwardRef(function (props, ref) {
|
|
9
|
+
var _a = foundation_1.useThemeProps({ props: props, name: 'RcTable' }), children = _a.children, size = _a.size, rest = tslib_1.__rest(_a, ["children", "size"]);
|
|
10
|
+
var tableContextValue = react_1.useMemo(function () { return ({ size: size }); }, [size]);
|
|
11
|
+
return (react_1.default.createElement(Table_1.default, tslib_1.__assign({}, rest, { ref: ref }),
|
|
12
|
+
react_1.default.createElement(context_1.RcTableContext.Provider, { value: tableContextValue }, children)));
|
|
13
|
+
});
|
|
14
|
+
var RcTable = foundation_1.styled(_RcTable)(templateObject_1 || (templateObject_1 = tslib_1.__makeTemplateObject([""], [""])));
|
|
15
|
+
exports.RcTable = RcTable;
|
|
16
|
+
RcTable.displayName = 'RcTable';
|
|
17
|
+
var templateObject_1;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import MuiTableBody from '@material-ui/core/TableBody';
|
|
2
|
+
import React, { ComponentProps } from 'react';
|
|
3
|
+
import { RcBaseProps } from '../../../foundation';
|
|
4
|
+
declare type RcTableBodyProps = {} & RcBaseProps<ComponentProps<typeof MuiTableBody>>;
|
|
5
|
+
declare const RcTableBody: import("styled-components").StyledComponentClass<Pick<Pick<import("@material-ui/core/OverridableComponent").DefaultComponentProps<import("@material-ui/core").TableHeadTypeMap<{}, "thead">>, "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">, "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"> & React.RefAttributes<any>, import("../../../foundation").RcTheme, Pick<Pick<Pick<import("@material-ui/core/OverridableComponent").DefaultComponentProps<import("@material-ui/core").TableHeadTypeMap<{}, "thead">>, "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">, "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"> & 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
|
+
theme?: import("../../../foundation").RcTheme | undefined;
|
|
7
|
+
}>;
|
|
8
|
+
export { RcTableBody, RcTableBodyProps };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var tslib_1 = require("tslib");
|
|
4
|
+
var TableBody_1 = tslib_1.__importDefault(require("@material-ui/core/TableBody"));
|
|
5
|
+
var react_1 = tslib_1.__importStar(require("react"));
|
|
6
|
+
var foundation_1 = require("../../../foundation");
|
|
7
|
+
var _RcTableBody = react_1.forwardRef(function (props, ref) {
|
|
8
|
+
var _a = foundation_1.useThemeProps({ props: props, name: 'RcTableHead' }), children = _a.children, rest = tslib_1.__rest(_a, ["children"]);
|
|
9
|
+
return (react_1.default.createElement(TableBody_1.default, tslib_1.__assign({}, rest, { ref: ref }), children));
|
|
10
|
+
});
|
|
11
|
+
var RcTableBody = foundation_1.styled(_RcTableBody)(templateObject_1 || (templateObject_1 = tslib_1.__makeTemplateObject([""], [""])));
|
|
12
|
+
exports.RcTableBody = RcTableBody;
|
|
13
|
+
RcTableBody.displayName = 'RcTableBody';
|
|
14
|
+
var templateObject_1;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './TableBody';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React, { ComponentProps } from 'react';
|
|
2
|
+
import MuiTableCell, { TableCellClassKey } from '@material-ui/core/TableCell';
|
|
3
|
+
import { RcBaseProps } from '../../../foundation';
|
|
4
|
+
import { RcTableSize } from '../types';
|
|
5
|
+
declare type RcTableCellProps = {
|
|
6
|
+
/**
|
|
7
|
+
* Specify the size of the cell.
|
|
8
|
+
* @default medium.
|
|
9
|
+
*/
|
|
10
|
+
size?: RcTableSize;
|
|
11
|
+
/**
|
|
12
|
+
* The current sort direction.
|
|
13
|
+
*/
|
|
14
|
+
sortDirection?: 'asc' | 'desc' | false;
|
|
15
|
+
/**
|
|
16
|
+
* If `true`, the sort icon will alway show.
|
|
17
|
+
*/
|
|
18
|
+
activeSort?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Override or extend the styles applied to the component.
|
|
21
|
+
*/
|
|
22
|
+
classes?: Partial<Record<Exclude<TableCellClassKey, 'sizeSmall'> | 'activeSort' | 'sortIcon' | 'sortButton', string>>;
|
|
23
|
+
} & RcBaseProps<ComponentProps<typeof MuiTableCell>, 'size' | 'sortDirection' | 'classes'>;
|
|
24
|
+
declare const RcTableCell: import("styled-components").StyledComponentClass<Pick<{}, never> & Pick<Pick<RcTableCellProps, "className" | "color" | "height" | "id" | "lang" | "style" | "width" | "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" | "abbr" | "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" | "size" | "variant" | "innerRef" | "component" | "padding" | "align" | "colSpan" | "headers" | "rowSpan" | "scope" | "valign" | "sortDirection" | "activeSort"> & React.RefAttributes<any>, "ref" | "key" | "className" | "color" | "height" | "id" | "lang" | "style" | "width" | "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" | "abbr" | "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" | "size" | "variant" | "innerRef" | "component" | "padding" | "align" | "colSpan" | "headers" | "rowSpan" | "scope" | "valign" | "sortDirection" | "activeSort">, import("../../../foundation").RcTheme, Pick<{}, never> & Pick<Pick<Pick<RcTableCellProps, "className" | "color" | "height" | "id" | "lang" | "style" | "width" | "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" | "abbr" | "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" | "size" | "variant" | "innerRef" | "component" | "padding" | "align" | "colSpan" | "headers" | "rowSpan" | "scope" | "valign" | "sortDirection" | "activeSort"> & React.RefAttributes<any>, "ref" | "key" | "className" | "color" | "height" | "id" | "lang" | "style" | "width" | "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" | "abbr" | "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" | "size" | "variant" | "innerRef" | "component" | "padding" | "align" | "colSpan" | "headers" | "rowSpan" | "scope" | "valign" | "sortDirection" | "activeSort"> & {
|
|
25
|
+
theme?: import("../../../foundation").RcTheme | undefined;
|
|
26
|
+
}, "ref" | "key" | "className" | "color" | "height" | "id" | "lang" | "style" | "width" | "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" | "abbr" | "slot" | "title" | "theme" | "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" | "size" | "variant" | "innerRef" | "component" | "padding" | "align" | "colSpan" | "headers" | "rowSpan" | "scope" | "valign" | "sortDirection" | "activeSort">>;
|
|
27
|
+
export { RcTableCell, RcTableCellProps };
|
|
@@ -0,0 +1,39 @@
|
|
|
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 TableCell_1 = tslib_1.__importDefault(require("@material-ui/core/TableCell"));
|
|
6
|
+
var foundation_1 = require("../../../foundation");
|
|
7
|
+
var styles_1 = require("./styles");
|
|
8
|
+
var utils_1 = require("./utils");
|
|
9
|
+
var Buttons_1 = require("../../Buttons");
|
|
10
|
+
var Icon_1 = require("../../Icon");
|
|
11
|
+
var juno_icon_1 = require("@ringcentral/juno-icon");
|
|
12
|
+
var clsx_1 = tslib_1.__importDefault(require("clsx"));
|
|
13
|
+
var context_1 = require("../context");
|
|
14
|
+
var _RcTableCell = react_1.forwardRef(function (props, ref) {
|
|
15
|
+
var _a = foundation_1.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 = tslib_1.__rest(_a, ["classes", "children", "size", "sortDirection", "activeSort"]);
|
|
16
|
+
var classes = foundation_1.combineClasses(utils_1.RcTableCellClasses, classesProp);
|
|
17
|
+
var children = react_1.useMemo(function () {
|
|
18
|
+
var _a;
|
|
19
|
+
if (sortDirection) {
|
|
20
|
+
return (react_1.default.createElement(Buttons_1.RcButtonBase, { disableRipple: true, className: clsx_1.default(classes.sortButton, (_a = {},
|
|
21
|
+
_a[classes.activeSort] = activeSort,
|
|
22
|
+
_a)) },
|
|
23
|
+
childrenProp,
|
|
24
|
+
react_1.default.createElement(Icon_1.RcIcon, { size: "small", className: classes.sortIcon, symbol: sortDirection === 'asc' ? juno_icon_1.JumpToUnread : juno_icon_1.JumpToLatest })));
|
|
25
|
+
}
|
|
26
|
+
return childrenProp;
|
|
27
|
+
}, [activeSort, childrenProp, classes, sortDirection]);
|
|
28
|
+
return (react_1.default.createElement(TableCell_1.default, tslib_1.__assign({}, rest, (sortDirection ? { sortDirection: sortDirection } : {}), { ref: ref, classes: classes }), children));
|
|
29
|
+
});
|
|
30
|
+
var RcTableCell = foundation_1.styled(_RcTableCell).attrs(function (_a) {
|
|
31
|
+
var _b;
|
|
32
|
+
var sizeProp = _a.size, _c = _a.sortDirection, sortDirection = _c === void 0 ? false : _c, rest = tslib_1.__rest(_a, ["size", "sortDirection"]);
|
|
33
|
+
var contextSize = react_1.useContext(context_1.RcTableContext).size;
|
|
34
|
+
var size = (_b = sizeProp !== null && sizeProp !== void 0 ? sizeProp : contextSize) !== null && _b !== void 0 ? _b : 'medium';
|
|
35
|
+
return tslib_1.__assign(tslib_1.__assign({}, rest), { size: size, sortDirection: sortDirection });
|
|
36
|
+
})(templateObject_1 || (templateObject_1 = tslib_1.__makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), styles_1.TableCellStyle);
|
|
37
|
+
exports.RcTableCell = RcTableCell;
|
|
38
|
+
RcTableCell.displayName = 'RcTableCell';
|
|
39
|
+
var templateObject_1;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './TableCell';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var tslib_1 = require("tslib");
|
|
4
|
+
var foundation_1 = require("../../../../foundation");
|
|
5
|
+
var Icon_1 = require("../../../Icon");
|
|
6
|
+
var utils_1 = require("../utils");
|
|
7
|
+
var SizeMap = {
|
|
8
|
+
large: 56,
|
|
9
|
+
medium: 48,
|
|
10
|
+
small: 40,
|
|
11
|
+
};
|
|
12
|
+
exports.TableCellStyle = function (prop) {
|
|
13
|
+
var size = prop.size, sortDirection = prop.sortDirection;
|
|
14
|
+
return foundation_1.css(templateObject_1 || (templateObject_1 = tslib_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 "])), foundation_1.spacing(0, 2), utils_1.RcTableCellClasses.head, foundation_1.typography('caption2'), foundation_1.palette2('neutral', 'l02'), foundation_1.palette2('neutral', 'f05'), foundation_1.palette2('neutral', 'b02'), Boolean(sortDirection) && 'unset', utils_1.RcTableCellClasses.sortIcon, foundation_1.spacing(0, 2), utils_1.RcTableCellClasses.activeSort, foundation_1.palette2('interactive', 'f01'), utils_1.RcTableCellClasses.sortIcon, utils_1.RcTableCellClasses.sortButton, foundation_1.spacing(0, 2), Icon_1.RcIcon, foundation_1.palette2('neutral', 'f04'), foundation_1.palette2('neutral', 'b03'), utils_1.RcTableCellClasses.sortIcon, foundation_1.focusVisible, foundation_1.fakeBorder({ color: foundation_1.palette2('interactive', 'f01') }), foundation_1.palette2('neutral', 'b03'), utils_1.RcTableCellClasses.body, foundation_1.typography('body1'), foundation_1.palette2('neutral', 'f06'), size === 'auto' && foundation_1.spacing(3, 2), size !== 'auto' && foundation_1.px(SizeMap[size]));
|
|
15
|
+
};
|
|
16
|
+
var templateObject_1;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './TableCellStyle';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const RcTableCellClasses: Partial<import("../../../../foundation").UnitMap<"body" | "footer" | "head" | "root" | "alignLeft" | "alignCenter" | "alignRight" | "alignJustify" | "paddingCheckbox" | "paddingNone" | "stickyHeader" | "activeSort" | "sortIcon" | "sortButton", any>>;
|