@ringcentral/juno 2.1.1 → 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.
Files changed (162) hide show
  1. package/README.md +1 -2
  2. package/components/Animations/Highlight/Highlight.d.ts +2 -2
  3. package/components/Badge/Badge.d.ts +11 -2
  4. package/components/Badge/Badge.js +27 -3
  5. package/components/Badge/styles/BadgeStyle.js +3 -2
  6. package/components/Badge/utils/BadgeUtils.d.ts +7 -0
  7. package/components/Badge/utils/BadgeUtils.js +11 -0
  8. package/components/Badge/utils/index.d.ts +1 -0
  9. package/components/Badge/utils/index.js +1 -0
  10. package/components/Badge/utils/useRoundBadgeOffset.d.ts +7 -0
  11. package/components/Badge/utils/useRoundBadgeOffset.js +25 -0
  12. package/components/Chip/Chip.d.ts +21 -3
  13. package/components/Chip/Chip.js +1 -1
  14. package/components/Downshift/SuggestionList/utils/useSuggestionList.js +1 -2
  15. package/components/Downshift/utils/useDownshift.js +2 -3
  16. package/components/Downshift/utils/useDownshiftTag.js +1 -2
  17. package/components/Forms/Picker/DatePicker/DatePicker.js +10 -11
  18. package/components/Forms/Select/PlainSelect/PlainSelect.js +1 -2
  19. package/components/Table/Table.d.ts +14 -0
  20. package/components/Table/Table.js +17 -0
  21. package/components/Table/TableBody/TableBody.d.ts +8 -0
  22. package/components/Table/TableBody/TableBody.js +14 -0
  23. package/components/Table/TableBody/index.d.ts +1 -0
  24. package/components/Table/TableBody/index.js +4 -0
  25. package/components/Table/TableCell/TableCell.d.ts +27 -0
  26. package/components/Table/TableCell/TableCell.js +39 -0
  27. package/components/Table/TableCell/index.d.ts +1 -0
  28. package/components/Table/TableCell/index.js +4 -0
  29. package/components/Table/TableCell/styles/TableCellStyle.d.ts +3 -0
  30. package/components/Table/TableCell/styles/TableCellStyle.js +16 -0
  31. package/components/Table/TableCell/styles/index.d.ts +1 -0
  32. package/components/Table/TableCell/styles/index.js +4 -0
  33. package/components/Table/TableCell/utils/TableCellUtils.d.ts +1 -0
  34. package/components/Table/TableCell/utils/TableCellUtils.js +4 -0
  35. package/components/Table/TableCell/utils/index.d.ts +1 -0
  36. package/components/Table/TableCell/utils/index.js +4 -0
  37. package/components/Table/TableContainer/TableContainer.d.ts +19 -0
  38. package/components/Table/TableContainer/TableContainer.js +22 -0
  39. package/components/Table/TableContainer/index.d.ts +1 -0
  40. package/components/Table/TableContainer/index.js +4 -0
  41. package/components/Table/TableContainer/styles/TableContainerStyle.d.ts +3 -0
  42. package/components/Table/TableContainer/styles/TableContainerStyle.js +13 -0
  43. package/components/Table/TableContainer/styles/index.d.ts +1 -0
  44. package/components/Table/TableContainer/styles/index.js +4 -0
  45. package/components/Table/TableHead/TableHead.d.ts +8 -0
  46. package/components/Table/TableHead/TableHead.js +14 -0
  47. package/components/Table/TableHead/index.d.ts +1 -0
  48. package/components/Table/TableHead/index.js +4 -0
  49. package/components/Table/TableRow/TableRow.d.ts +15 -0
  50. package/components/Table/TableRow/TableRow.js +20 -0
  51. package/components/Table/TableRow/index.d.ts +1 -0
  52. package/components/Table/TableRow/index.js +4 -0
  53. package/components/Table/TableRow/styles/TableRowStyle.d.ts +3 -0
  54. package/components/Table/TableRow/styles/TableRowStyle.js +9 -0
  55. package/components/Table/TableRow/styles/index.d.ts +1 -0
  56. package/components/Table/TableRow/styles/index.js +4 -0
  57. package/components/Table/TableRow/utils/TableRowUtils.d.ts +1 -0
  58. package/components/Table/TableRow/utils/TableRowUtils.js +4 -0
  59. package/components/Table/TableRow/utils/index.d.ts +1 -0
  60. package/components/Table/TableRow/utils/index.js +4 -0
  61. package/components/Table/context.d.ts +10 -0
  62. package/components/Table/context.js +4 -0
  63. package/components/Table/index.d.ts +8 -0
  64. package/components/Table/index.js +10 -0
  65. package/components/Table/types.d.ts +1 -0
  66. package/components/Table/types.js +2 -0
  67. package/components/Tables/TableHead.d.ts +1 -1
  68. package/components/Tables/TableHead.js +1 -3
  69. package/components/Tables/TableHeadCell.d.ts +1 -1
  70. package/components/Tables/TableHeadCell.js +1 -2
  71. package/components/Tabs/Tabs/MoreMenuTab/MoreMenuTab.d.ts +7 -3
  72. package/components/Tabs/Tabs/MoreMenuTab/MoreMenuTab.js +4 -4
  73. package/components/Tooltip/utils/useTooltipForceHide.js +24 -10
  74. package/components/index.d.ts +1 -1
  75. package/components/index.js +1 -1
  76. package/es6/README.md +1 -2
  77. package/es6/components/Badge/Badge.js +30 -6
  78. package/es6/components/Badge/styles/BadgeStyle.js +4 -3
  79. package/es6/components/Badge/utils/BadgeUtils.js +11 -0
  80. package/es6/components/Badge/utils/index.js +1 -0
  81. package/es6/components/Badge/utils/useRoundBadgeOffset.js +23 -0
  82. package/es6/components/Chip/Chip.js +2 -2
  83. package/es6/components/Downshift/SuggestionList/utils/useSuggestionList.js +1 -2
  84. package/es6/components/Downshift/utils/useDownshift.js +1 -2
  85. package/es6/components/Downshift/utils/useDownshiftTag.js +1 -2
  86. package/es6/components/Forms/Picker/DatePicker/DatePicker.js +1 -2
  87. package/es6/components/Forms/Select/PlainSelect/PlainSelect.js +1 -2
  88. package/es6/components/Table/Table.js +15 -0
  89. package/es6/components/Table/TableBody/TableBody.js +12 -0
  90. package/es6/components/Table/TableBody/index.js +1 -0
  91. package/es6/components/Table/TableCell/TableCell.js +37 -0
  92. package/es6/components/Table/TableCell/index.js +1 -0
  93. package/es6/components/Table/TableCell/styles/TableCellStyle.js +14 -0
  94. package/es6/components/Table/TableCell/styles/index.js +1 -0
  95. package/es6/components/Table/TableCell/utils/TableCellUtils.js +2 -0
  96. package/es6/components/Table/TableCell/utils/index.js +1 -0
  97. package/es6/components/Table/TableContainer/TableContainer.js +20 -0
  98. package/es6/components/Table/TableContainer/index.js +1 -0
  99. package/es6/components/Table/TableContainer/styles/TableContainerStyle.js +11 -0
  100. package/es6/components/Table/TableContainer/styles/index.js +1 -0
  101. package/es6/components/Table/TableHead/TableHead.js +12 -0
  102. package/es6/components/Table/TableHead/index.js +1 -0
  103. package/es6/components/Table/TableRow/TableRow.js +18 -0
  104. package/es6/components/Table/TableRow/index.js +1 -0
  105. package/es6/components/Table/TableRow/styles/TableRowStyle.js +7 -0
  106. package/es6/components/Table/TableRow/styles/index.js +1 -0
  107. package/es6/components/Table/TableRow/utils/TableRowUtils.js +2 -0
  108. package/es6/components/Table/TableRow/utils/index.js +1 -0
  109. package/es6/components/Table/context.js +2 -0
  110. package/es6/components/Table/index.js +7 -0
  111. package/es6/components/Table/types.js +0 -0
  112. package/es6/components/Tables/TableHead.js +1 -3
  113. package/es6/components/Tables/TableHeadCell.js +2 -3
  114. package/es6/components/Tabs/Tabs/MoreMenuTab/MoreMenuTab.js +5 -5
  115. package/es6/components/Tooltip/utils/useTooltipForceHide.js +25 -11
  116. package/es6/components/index.js +1 -1
  117. package/es6/foundation/hooks/index.js +2 -0
  118. package/es6/foundation/hooks/useControlled/index.js +1 -0
  119. package/es6/foundation/hooks/useControlled/useControlled.js +1 -0
  120. package/es6/foundation/hooks/useEventListener/useEventListener.js +8 -6
  121. package/es6/foundation/hooks/useGlobalListener/index.js +1 -0
  122. package/es6/foundation/hooks/useGlobalListener/useGlobalListener.js +130 -0
  123. package/es6/foundation/hooks/useHiddenTabindex/useHiddenTabindex.js +4 -3
  124. package/es6/foundation/hooks/useLongPress/useLongPress.js +2 -3
  125. package/es6/foundation/hooks/useOverflow/useOverflow.js +18 -15
  126. package/es6/foundation/hooks/useResizeObserver/useResizeObserver.js +4 -4
  127. package/es6/foundation/hooks/useTouchMouseEvent/useTouchMouseEvent.js +8 -5
  128. package/es6/foundation/utils/getRefElement.js +13 -0
  129. package/es6/foundation/utils/index.js +1 -0
  130. package/es6/foundation/utils/removeClassName.js +4 -3
  131. package/es6/foundation/utils/selectionHandler.js +7 -6
  132. package/foundation/hooks/index.d.ts +2 -0
  133. package/foundation/hooks/index.js +2 -0
  134. package/foundation/hooks/useControlled/index.d.ts +1 -0
  135. package/foundation/hooks/useControlled/index.js +4 -0
  136. package/foundation/hooks/useControlled/useControlled.d.ts +1 -0
  137. package/foundation/hooks/useControlled/useControlled.js +4 -0
  138. package/foundation/hooks/useEventListener/useEventListener.d.ts +2 -2
  139. package/foundation/hooks/useEventListener/useEventListener.js +8 -6
  140. package/foundation/hooks/useGlobalListener/index.d.ts +1 -0
  141. package/foundation/hooks/useGlobalListener/index.js +4 -0
  142. package/foundation/hooks/useGlobalListener/useGlobalListener.d.ts +108 -0
  143. package/foundation/hooks/useGlobalListener/useGlobalListener.js +133 -0
  144. package/foundation/hooks/useHiddenTabindex/useHiddenTabindex.d.ts +2 -2
  145. package/foundation/hooks/useHiddenTabindex/useHiddenTabindex.js +4 -3
  146. package/foundation/hooks/useLongPress/useLongPress.js +1 -2
  147. package/foundation/hooks/useOverflow/useOverflow.d.ts +2 -3
  148. package/foundation/hooks/useOverflow/useOverflow.js +18 -15
  149. package/foundation/hooks/useResizeObserver/useResizeObserver.d.ts +2 -3
  150. package/foundation/hooks/useResizeObserver/useResizeObserver.js +3 -3
  151. package/foundation/hooks/useTouchMouseEvent/useTouchMouseEvent.d.ts +5 -1
  152. package/foundation/hooks/useTouchMouseEvent/useTouchMouseEvent.js +8 -5
  153. package/foundation/theme/theme.type.d.ts +6 -3
  154. package/foundation/utils/getRefElement.d.ts +6 -0
  155. package/foundation/utils/getRefElement.js +15 -0
  156. package/foundation/utils/index.d.ts +1 -0
  157. package/foundation/utils/index.js +1 -0
  158. package/foundation/utils/removeClassName.d.ts +3 -3
  159. package/foundation/utils/removeClassName.js +4 -3
  160. package/foundation/utils/selectionHandler.d.ts +3 -3
  161. package/foundation/utils/selectionHandler.js +7 -6
  162. package/package.json +5 -5
package/README.md CHANGED
@@ -1,9 +1,8 @@
1
1
  # Juno
2
2
 
3
3
  [![NPM version](https://img.shields.io/npm/v/@ringcentral/juno/latest.svg)](https://www.npmjs.com/package/@ringcentral/juno)
4
- [![NPM beta version](https://img.shields.io/npm/v/@ringcentral/juno/beta.svg)](https://www.npmjs.com/package/@ringcentral/juno?activeTab=versions)
5
4
 
6
- [![NPM version](https://img.shields.io/npm/v/@ringcentral/juno-icon/beta.svg)](https://www.npmjs.com/package/@ringcentral/juno-icon)
5
+ [![NPM version](https://img.shields.io/npm/v/@ringcentral/juno-icon/latest.svg)](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: React.MutableRefObject<() => void>;
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.MutableRefObject<() => void>;
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>>;
@@ -11,8 +11,17 @@ declare type RcBadgeProps = {
11
11
  borderColor?: RcPaletteKeys;
12
12
  /** The component used for the root node. Either a string to use a HTML element or a component. */
13
13
  component?: ElementType;
14
- /** Wrapped shape the badge should overlap */
15
- overlap?: UnionPick<NonNullable<ComponentProps<typeof MuiBadge>['overlap']>, 'circular' | 'rectangular'> | 'none';
14
+ /**
15
+ * Wrapped shape the badge should overlap
16
+ * - `circular`: for circular children
17
+ * - `rectangular`: for rectangular children
18
+ * - `round`: for round radius rectangular children, like
19
+ * ```jsx
20
+ * <RcButton radius="round">click</RcButton>
21
+ * ```
22
+ * - `none`: not do any overlap on that badge
23
+ */
24
+ overlap?: UnionPick<NonNullable<ComponentProps<typeof MuiBadge>['overlap']>, 'circular' | 'rectangular'> | 'none' | 'round';
16
25
  /**
17
26
  * Custom dot render Component in `dot` mode
18
27
  * if you don't want any dot, you can set `null`
@@ -13,9 +13,31 @@ var utils_2 = require("./utils");
13
13
  var _RcBadge = react_1.forwardRef(function (inProps, ref) {
14
14
  var props = foundation_1.useThemeProps({ props: inProps, name: 'RcBadge' });
15
15
  var classesProp = props.classes, children = props.children, overlap = props.overlap, color = props.color, variant = props.variant, textColor = props.textColor, anchorOrigin = props.anchorOrigin, borderColor = props.borderColor, component = props.component, dotComponent = props.dotComponent, dotProps = props.dotProps, rest = tslib_1.__rest(props, ["classes", "children", "overlap", "color", "variant", "textColor", "anchorOrigin", "borderColor", "component", "dotComponent", "dotProps"]);
16
+ // * should never change overlap
17
+ if (process.env.NODE_ENV !== 'production') {
18
+ // eslint-disable-next-line react-hooks/rules-of-hooks
19
+ foundation_1.useChange(function (prev) {
20
+ if (!prev)
21
+ return;
22
+ foundation_1.logInDev({
23
+ component: 'RcBadge',
24
+ message: 'Should not change `overlap` prop after component render',
25
+ level: 'error',
26
+ });
27
+ }, function () { return overlap; });
28
+ }
29
+ var innerRef = react_1.useRef(null);
30
+ var badgeRef = foundation_1.useForkRef(innerRef, ref);
31
+ var isRound = overlap === 'round';
32
+ var isDot = variant === 'dot';
33
+ var notPassOverlapToMui = overlap !== 'none' && !isRound;
34
+ // overlap will never change in production mode
35
+ if (isRound) {
36
+ // eslint-disable-next-line react-hooks/rules-of-hooks
37
+ utils_2.useRoundBadgeOffset(innerRef);
38
+ }
16
39
  var classes = react_1.useMemo(function () { return foundation_1.combineProps(utils_2.RcBadgeClasses, classesProp); }, [classesProp]);
17
40
  var CustomDotBadge = react_1.useMemo(function () {
18
- var isDot = variant === 'dot';
19
41
  return isDot
20
42
  ? react_1.forwardRef(function (_a, ref) {
21
43
  var OmitChildren = _a.children, rest = tslib_1.__rest(_a, ["children"]);
@@ -29,8 +51,10 @@ var _RcBadge = react_1.forwardRef(function (inProps, ref) {
29
51
  react_1.default.createElement(DotComponent, tslib_1.__assign({}, applyDotProps))))));
30
52
  })
31
53
  : undefined;
32
- }, [anchorOrigin, children, dotComponent, dotProps, overlap, variant]);
33
- return (react_1.default.createElement(Badge_1.default, tslib_1.__assign({}, rest, { variant: variant, anchorOrigin: anchorOrigin, component: (component || CustomDotBadge), overlap: overlap !== 'none' ? overlap : undefined, ref: ref, classes: classes }), children));
54
+ }, [isDot, dotProps, overlap, anchorOrigin, children, dotComponent]);
55
+ return (react_1.default.createElement(Badge_1.default, tslib_1.__assign({}, rest, { variant: variant, anchorOrigin: anchorOrigin, component: (component || CustomDotBadge),
56
+ // TODO: that as any for ts v3.8 still not support pick variable out of if check
57
+ overlap: notPassOverlapToMui ? overlap : undefined, ref: badgeRef, classes: classes }), children));
34
58
  });
35
59
  var RcBadge = foundation_1.styled(_RcBadge)(templateObject_1 || (templateObject_1 = tslib_1.__makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), styles_1.BadgeStyle);
36
60
  exports.RcBadge = RcBadge;
@@ -5,6 +5,7 @@ var foundation_1 = require("../../../foundation");
5
5
  var utils_1 = require("../utils");
6
6
  exports.BadgeStyle = function (_a) {
7
7
  var badgeContent = _a.badgeContent, overlap = _a.overlap, variant = _a.variant, textColor = _a.textColor, borderColor = _a.borderColor, max = _a.max, color = _a.color;
8
+ var overlapRound = overlap === 'round';
8
9
  var overlapNone = overlap === 'none';
9
10
  var isStandard = variant !== 'dot';
10
11
  var borderCurrColor = foundation_1.getParsePaletteColor(borderColor, null, false);
@@ -12,10 +13,10 @@ exports.BadgeStyle = function (_a) {
12
13
  var manyChar = (['number', 'string'].includes(typeof badgeContent) &&
13
14
  ("" + badgeContent).length !== 1) ||
14
15
  (max && max > 0 && +badgeContent > max);
15
- return foundation_1.css(templateObject_5 || (templateObject_5 = tslib_1.__makeTemplateObject(["\n .", " {\n color: ", ";\n background-color: ", ";\n\n ", ";\n\n ", "\n\n ", "\n }\n "], ["\n .", " {\n color: ", ";\n background-color: ", ";\n\n ",
16
+ return foundation_1.css(templateObject_5 || (templateObject_5 = tslib_1.__makeTemplateObject(["\n .", " {\n margin: ", ";\n color: ", ";\n background-color: ", ";\n\n ", ";\n\n ", "\n\n ", "\n }\n "], ["\n .", " {\n margin: ", ";\n color: ", ";\n background-color: ", ";\n\n ",
16
17
  ";\n\n ",
17
18
  "\n\n ",
18
- "\n }\n "])), utils_1.RcBadgeClasses.badge, foundation_1.getParsePaletteColor(textColor, null, false), foundation_1.getParsePaletteColor(color, null, false), borderColor && foundation_1.css(templateObject_2 || (templateObject_2 = tslib_1.__makeTemplateObject(["\n ", "\n "], ["\n ",
19
+ "\n }\n "])), utils_1.RcBadgeClasses.badge, overlapRound && "var(" + utils_1.roundBadgeMarginKey + ")", foundation_1.getParsePaletteColor(textColor, null, false), foundation_1.getParsePaletteColor(color, null, false), borderColor && foundation_1.css(templateObject_2 || (templateObject_2 = tslib_1.__makeTemplateObject(["\n ", "\n "], ["\n ",
19
20
  "\n "])), isStandard
20
21
  ? foundation_1.fakeBorder({ color: borderCurrColor, radius: 'round' })
21
22
  : foundation_1.css(templateObject_1 || (templateObject_1 = tslib_1.__makeTemplateObject(["\n border-color: ", ";\n "], ["\n border-color: ", ";\n "])), borderCurrColor)), isStandard && foundation_1.css(templateObject_3 || (templateObject_3 = tslib_1.__makeTemplateObject(["\n height: 18px;\n min-width: 18px;\n padding: ", ";\n "], ["\n height: 18px;\n min-width: 18px;\n padding: ", ";\n "])), !manyChar && 0), overlapNone && foundation_1.css(templateObject_4 || (templateObject_4 = tslib_1.__makeTemplateObject(["\n position: unset;\n transform: unset;\n\n &.", " {\n transform: scale(0);\n }\n "], ["\n position: unset;\n transform: unset;\n\n &.", " {\n transform: scale(0);\n }\n "])), utils_1.RcBadgeClasses.invisible));
@@ -1 +1,8 @@
1
1
  export declare const RcBadgeClasses: Partial<import("../../../foundation").UnitMap<import("@material-ui/core").BadgeClassKey, any>>;
2
+ export declare const roundBadgeMarginKey = "--badge-round-margin";
3
+ /**
4
+ * a circle inside square, that diagonal of a square to circle distance to be the round offset.
5
+ * @param x that circle r
6
+ * @returns the distance of that offset
7
+ */
8
+ export declare const getRoundOffset: (x: number) => number;
@@ -2,3 +2,14 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  var foundation_1 = require("../../../foundation");
4
4
  exports.RcBadgeClasses = foundation_1.RcClasses(['badge', 'invisible'], 'RcBadge');
5
+ exports.roundBadgeMarginKey = '--badge-round-margin';
6
+ var sqrt2 = Math.sqrt(2);
7
+ var powBy = sqrt2 - 1; // 0.292893218813452
8
+ /**
9
+ * a circle inside square, that diagonal of a square to circle distance to be the round offset.
10
+ * @param x that circle r
11
+ * @returns the distance of that offset
12
+ */
13
+ exports.getRoundOffset = function (x) {
14
+ return (x * powBy) / sqrt2;
15
+ };
@@ -1 +1,2 @@
1
1
  export * from './BadgeUtils';
2
+ export * from './useRoundBadgeOffset';
@@ -2,3 +2,4 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  var tslib_1 = require("tslib");
4
4
  tslib_1.__exportStar(require("./BadgeUtils"), exports);
5
+ tslib_1.__exportStar(require("./useRoundBadgeOffset"), exports);
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ /**
3
+ * modify round badge offset to correct position,
4
+ * only trigger when host element height change
5
+ * @param badgeRef badge
6
+ */
7
+ export declare const useRoundBadgeOffset: (badgeRef: React.RefObject<HTMLElement>) => void;
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var tslib_1 = require("tslib");
4
+ var react_1 = require("react");
5
+ var foundation_1 = require("../../../foundation");
6
+ var BadgeUtils_1 = require("./BadgeUtils");
7
+ /**
8
+ * modify round badge offset to correct position,
9
+ * only trigger when host element height change
10
+ * @param badgeRef badge
11
+ */
12
+ exports.useRoundBadgeOffset = function (badgeRef) {
13
+ var currHeightRef = react_1.useRef(0);
14
+ // eslint-disable-next-line react-hooks/rules-of-hooks
15
+ foundation_1.useResizeObserver(badgeRef, function (_a) {
16
+ var _b = tslib_1.__read(_a, 1), badgeObsEntry = _b[0];
17
+ var height = badgeObsEntry.contentRect.height;
18
+ var element = badgeObsEntry.target;
19
+ if (currHeightRef.current === height)
20
+ return;
21
+ currHeightRef.current = height;
22
+ var offset = BadgeUtils_1.getRoundOffset(height / 2);
23
+ element.style.setProperty(BadgeUtils_1.roundBadgeMarginKey, foundation_1.px(offset));
24
+ }, { mode: 'throttle' });
25
+ };
@@ -40,8 +40,26 @@ declare type RcChipProps = {
40
40
  /** @deprecated should use `error` */
41
41
  isError?: boolean;
42
42
  } & RcBaseProps<ComponentProps<typeof MuiChip>, 'color' | 'size' | 'icon'> & RcChipClassProp;
43
- declare const RcChip: import("styled-components").StyledComponentClass<Pick<RcChipProps, "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" | "label" | "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" | "variant" | "innerRef" | "disabled" | "focused" | "error" | "avatar" | "clickable" | "deleteIcon" | "onDelete" | "backgroundColor" | "isError" | "deleteIconProps" | "Avatar" | "deleteAutomationId" | "deleteTooltip"> & React.RefAttributes<any>, import("../../foundation").RcTheme, Pick<Pick<RcChipProps, "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" | "label" | "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" | "variant" | "innerRef" | "disabled" | "focused" | "error" | "avatar" | "clickable" | "deleteIcon" | "onDelete" | "backgroundColor" | "isError" | "deleteIconProps" | "Avatar" | "deleteAutomationId" | "deleteTooltip"> & 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" | "label" | "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" | "variant" | "innerRef" | "disabled" | "focused" | "error" | "avatar" | "clickable" | "deleteIcon" | "onDelete" | "backgroundColor" | "isError" | "deleteIconProps" | "Avatar" | "deleteAutomationId" | "deleteTooltip"> & {
44
- theme?: import("../../foundation").RcTheme | undefined;
45
- }>;
43
+ interface RcChipTypeMap<D extends React.ElementType = 'div'> {
44
+ props: RcChipProps;
45
+ defaultComponent: D;
46
+ }
47
+ declare const RcChip: (import("@material-ui/core/OverridableComponent").OverridableComponent<RcChipTypeMap<"div"> & {
48
+ classKey: "";
49
+ }> & string & React.FunctionComponent<RcChipProps>) | (import("@material-ui/core/OverridableComponent").OverridableComponent<RcChipTypeMap<"div"> & {
50
+ classKey: "";
51
+ }> & number & React.FunctionComponent<RcChipProps>) | (import("@material-ui/core/OverridableComponent").OverridableComponent<RcChipTypeMap<"div"> & {
52
+ classKey: "";
53
+ }> & false & React.FunctionComponent<RcChipProps>) | (import("@material-ui/core/OverridableComponent").OverridableComponent<RcChipTypeMap<"div"> & {
54
+ classKey: "";
55
+ }> & import("styled-components").Styles & React.FunctionComponent<RcChipProps>) | (import("@material-ui/core/OverridableComponent").OverridableComponent<RcChipTypeMap<"div"> & {
56
+ classKey: "";
57
+ }> & import("styled-components").Keyframes & React.FunctionComponent<RcChipProps>) | (import("@material-ui/core/OverridableComponent").OverridableComponent<RcChipTypeMap<"div"> & {
58
+ classKey: "";
59
+ }> & import("styled-components").StyledComponentClass<any, any, any> & React.FunctionComponent<RcChipProps>) | (import("@material-ui/core/OverridableComponent").OverridableComponent<RcChipTypeMap<"div"> & {
60
+ classKey: "";
61
+ }> & import("styled-components").InterpolationFunction<import("styled-components").ThemedStyledProps<RcChipProps, import("../../foundation").RcTheme>> & React.FunctionComponent<RcChipProps>) | (import("@material-ui/core/OverridableComponent").OverridableComponent<RcChipTypeMap<"div"> & {
62
+ classKey: "";
63
+ }> & readonly (string | number | false | import("styled-components").Styles | import("styled-components").Keyframes | import("styled-components").StyledComponentClass<any, any, any> | import("styled-components").InterpolationFunction<import("styled-components").ThemedStyledProps<RcChipProps, import("../../foundation").RcTheme>> | readonly import("styled-components").FlattenInterpolation<import("styled-components").ThemedStyledProps<RcChipProps, import("../../foundation").RcTheme>>[] | null | undefined)[] & React.FunctionComponent<RcChipProps>);
46
64
  export { RcChip };
47
65
  export type { RcChipProps };
@@ -48,7 +48,7 @@ var _RcChip = react_1.forwardRef(function (inProps, ref) {
48
48
  });
49
49
  return (react_1.default.createElement(Chip_1.default, tslib_1.__assign({ ref: chipRef, id: id, tabIndex: disabled ? -1 : tabIndex, label: label, disabled: disabled, classes: classes, className: clsx_1.default(className, focused ? combinedClasses.focused : undefined), avatar: avatar, deleteIcon: deleteIcon, "data-test-automation-class": "selected-item", "data-test-automation-value": id ? id : label, "data-is-error": error }, rest)));
50
50
  });
51
- var RcChip = foundation_1.styled(_RcChip)(templateObject_1 || (templateObject_1 = tslib_1.__makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), styles_1.ChipStyle);
51
+ var RcChip = foundation_1.overridableStyled(_RcChip)(templateObject_1 || (templateObject_1 = tslib_1.__makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), styles_1.ChipStyle);
52
52
  exports.RcChip = RcChip;
53
53
  RcChip.defaultProps = {
54
54
  tabIndex: 0,
@@ -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(utils_1.useControlled({
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(utils_1.useControlled({
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(utils_1.useControlled({
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(utils_1.useControlled({
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 utils_2 = require("../utils");
11
+ var utils_1 = require("../utils");
13
12
  var Calendar_1 = require("./Calendar");
14
- var utils_3 = require("./utils");
15
- exports.RcDatePickerClasses = utils_3.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(utils_1.useControlled({
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 utils_3.invalidateDateInRange(day, { dateRange: dateRange, now: utils.date(), disableFuture: disableFuture, disablePast: disablePast }, utils);
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: utils_3.RcDatePickerClasses.popover,
72
- paper: utils_3.RcDatePickerClasses.popoverPaper,
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(utils_3.RcDatePickerClasses, ['popover', 'popoverPaper']), foundation_1.omit(classes, ['popover', 'popoverPaper']));
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(utils_2.PickerTextField, tslib_1.__assign({ ref: ref, action: actionRef, onClear: handleClear, PopoverProps: PopoverProps, value: textFiledValue, disabled: disabled, ActionSymbol: juno_icon_1.DateBorder }, rest),
112
- react_1.default.createElement(utils_3.ScreenReaderProvider, { screenReaderProps: screenReaderProps },
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(core_1.useControlled({
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;