grommet 2.46.0 → 2.47.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 (230) hide show
  1. package/components/Accordion/index.d.ts +7 -1
  2. package/components/AccordionPanel/index.d.ts +4 -1
  3. package/components/Anchor/index.d.ts +7 -1
  4. package/components/Avatar/Avatar.js +4 -3
  5. package/components/Avatar/index.d.ts +9 -1
  6. package/components/Avatar/propTypes.js +2 -1
  7. package/components/Box/Box.js +41 -6
  8. package/components/Box/{ResponsiveContainer.js → ResponsiveContainerProvider.js} +29 -28
  9. package/components/Box/StyledBox.js +13 -2
  10. package/components/Box/index.d.ts +9 -2
  11. package/components/Button/index.d.ts +14 -2
  12. package/components/Calendar/Calendar.js +43 -32
  13. package/components/Calendar/StyledCalendar.js +86 -32
  14. package/components/Calendar/index.d.ts +15 -2
  15. package/components/Calendar/propTypes.js +1 -0
  16. package/components/Cards/index.d.ts +7 -1
  17. package/components/Carousel/index.d.ts +4 -1
  18. package/components/Chart/index.d.ts +7 -1
  19. package/components/CheckBox/index.d.ts +7 -1
  20. package/components/CheckBoxGroup/index.d.ts +15 -2
  21. package/components/Clock/index.d.ts +14 -2
  22. package/components/Collapsible/index.d.ts +4 -1
  23. package/components/Data/index.d.ts +4 -1
  24. package/components/DataFilter/index.d.ts +4 -1
  25. package/components/DataFilters/index.d.ts +4 -1
  26. package/components/DataTable/Body.js +13 -7
  27. package/components/DataTable/DataTable.js +6 -1
  28. package/components/DataTable/index.d.ts +11 -2
  29. package/components/DataTable/propTypes.js +5 -1
  30. package/components/DataTable/stories/rowDetails.stories.js +174 -66
  31. package/components/DataTable/stories/typescript/OnSelect.stories.tsx +3 -3
  32. package/components/DataTableGroupBy/index.d.ts +4 -1
  33. package/components/DataView/index.d.ts +4 -1
  34. package/components/DateInput/index.d.ts +4 -1
  35. package/components/Diagram/index.d.ts +4 -1
  36. package/components/Distribution/index.d.ts +4 -1
  37. package/components/Drop/StyledDrop.js +3 -1
  38. package/components/Drop/index.d.ts +6 -2
  39. package/components/DropButton/index.d.ts +8 -1
  40. package/components/FileInput/index.d.ts +8 -2
  41. package/components/Form/index.d.ts +7 -1
  42. package/components/FormField/index.d.ts +4 -1
  43. package/components/Grid/index.d.ts +4 -1
  44. package/components/Grommet/index.d.ts +18 -1
  45. package/components/Grommet/propTypes.js +11 -0
  46. package/components/Header/stories/typescript/Ref.stories.tsx +1 -1
  47. package/components/Heading/index.d.ts +7 -7
  48. package/components/Image/index.d.ts +4 -1
  49. package/components/InfiniteScroll/index.d.ts +2 -2
  50. package/components/Layer/index.d.ts +4 -1
  51. package/components/List/index.d.ts +9 -3
  52. package/components/Markdown/index.d.ts +5 -1
  53. package/components/MaskedInput/MaskedInput.js +49 -4
  54. package/components/MaskedInput/index.d.ts +7 -1
  55. package/components/MaskedInput/stories/CustomBox.stories.js +1 -0
  56. package/components/MaskedInput/stories/Date.stories.js +1 -0
  57. package/components/MaskedInput/stories/DateRange.stories.js +1 -0
  58. package/components/MaskedInput/stories/DateTimeDrop.stories.js +1 -0
  59. package/components/MaskedInput/stories/Filtered.stories.js +1 -0
  60. package/components/MaskedInput/stories/SizeUnits.stories.js +1 -0
  61. package/components/MaskedInput/stories/Time.stories.js +1 -0
  62. package/components/NameValueList/index.d.ts +8 -1
  63. package/components/Notification/index.d.ts +1 -0
  64. package/components/PageHeader/index.d.ts +5 -1
  65. package/components/Pagination/PaginationStep.js +4 -0
  66. package/components/Pagination/index.d.ts +5 -0
  67. package/components/Pagination/propTypes.js +6 -1
  68. package/components/Paragraph/index.d.ts +7 -1
  69. package/components/RadioButton/index.d.ts +7 -1
  70. package/components/RadioButtonGroup/index.d.ts +7 -1
  71. package/components/RangeInput/index.d.ts +7 -1
  72. package/components/RangeSelector/index.d.ts +15 -2
  73. package/components/RoutedAnchor/index.d.ts +3 -2
  74. package/components/RoutedButton/index.d.ts +3 -2
  75. package/components/Select/Select.js +2 -4
  76. package/components/Select/index.d.ts +7 -1
  77. package/components/Select/utils.js +12 -3
  78. package/components/SelectMultiple/SelectMultiple.js +5 -10
  79. package/components/SelectMultiple/SelectMultipleContainer.js +2 -4
  80. package/components/SelectMultiple/SelectMultipleValue.js +1 -2
  81. package/components/SelectMultiple/index.d.ts +7 -1
  82. package/components/Sidebar/index.d.ts +4 -1
  83. package/components/Stack/index.d.ts +4 -1
  84. package/components/Tab/index.d.ts +7 -1
  85. package/components/Table/index.d.ts +4 -1
  86. package/components/TableBody/index.d.ts +4 -1
  87. package/components/TableCell/index.d.ts +10 -3
  88. package/components/TableFooter/index.d.ts +4 -1
  89. package/components/TableHeader/index.d.ts +4 -1
  90. package/components/TableRow/index.d.ts +4 -1
  91. package/components/Tabs/index.d.ts +4 -1
  92. package/components/Tag/Tag.js +15 -1
  93. package/components/Tag/index.d.ts +6 -0
  94. package/components/Tag/propTypes.js +6 -0
  95. package/components/Text/Text.js +3 -2
  96. package/components/Text/index.d.ts +7 -1
  97. package/components/TextArea/index.d.ts +7 -1
  98. package/components/TextInput/TextInput.js +6 -2
  99. package/components/TextInput/index.d.ts +6 -3
  100. package/components/TextInput/stories/CustomThemed/CustomSuggestions.stories.tsx +2 -1
  101. package/components/TextInput/stories/CustomThemed/Themed.stories.js +1 -0
  102. package/components/TextInput/stories/OnSelect.stories.js +1 -0
  103. package/components/TextInput/stories/WithTags.stories.js +1 -0
  104. package/components/Tip/Tip.js +25 -3
  105. package/components/ToggleGroup/index.d.ts +7 -1
  106. package/components/Toolbar/index.d.ts +5 -2
  107. package/components/Video/index.d.ts +7 -1
  108. package/components/WorldMap/index.d.ts +7 -1
  109. package/es6/components/Accordion/index.d.ts +7 -1
  110. package/es6/components/AccordionPanel/index.d.ts +4 -1
  111. package/es6/components/Anchor/index.d.ts +7 -1
  112. package/es6/components/Avatar/Avatar.js +4 -3
  113. package/es6/components/Avatar/index.d.ts +9 -1
  114. package/es6/components/Avatar/propTypes.js +2 -1
  115. package/es6/components/Box/Box.js +42 -7
  116. package/es6/components/Box/ResponsiveContainerProvider.js +54 -0
  117. package/es6/components/Box/StyledBox.js +12 -2
  118. package/es6/components/Box/index.d.ts +9 -2
  119. package/es6/components/Button/index.d.ts +14 -2
  120. package/es6/components/Calendar/Calendar.js +44 -32
  121. package/es6/components/Calendar/StyledCalendar.js +86 -32
  122. package/es6/components/Calendar/index.d.ts +15 -2
  123. package/es6/components/Calendar/propTypes.js +1 -0
  124. package/es6/components/Cards/index.d.ts +7 -1
  125. package/es6/components/Carousel/index.d.ts +4 -1
  126. package/es6/components/Chart/index.d.ts +7 -1
  127. package/es6/components/CheckBox/index.d.ts +7 -1
  128. package/es6/components/CheckBoxGroup/index.d.ts +15 -2
  129. package/es6/components/Clock/index.d.ts +14 -2
  130. package/es6/components/Collapsible/index.d.ts +4 -1
  131. package/es6/components/Data/index.d.ts +4 -1
  132. package/es6/components/DataFilter/index.d.ts +4 -1
  133. package/es6/components/DataFilters/index.d.ts +4 -1
  134. package/es6/components/DataTable/Body.js +13 -7
  135. package/es6/components/DataTable/DataTable.js +6 -1
  136. package/es6/components/DataTable/index.d.ts +11 -2
  137. package/es6/components/DataTable/propTypes.js +5 -1
  138. package/es6/components/DataTable/stories/rowDetails.stories.js +172 -66
  139. package/es6/components/DataTable/stories/typescript/OnSelect.stories.tsx +3 -3
  140. package/es6/components/DataTableGroupBy/index.d.ts +4 -1
  141. package/es6/components/DataView/index.d.ts +4 -1
  142. package/es6/components/DateInput/index.d.ts +4 -1
  143. package/es6/components/Diagram/index.d.ts +4 -1
  144. package/es6/components/Distribution/index.d.ts +4 -1
  145. package/es6/components/Drop/StyledDrop.js +3 -1
  146. package/es6/components/Drop/index.d.ts +6 -2
  147. package/es6/components/DropButton/index.d.ts +8 -1
  148. package/es6/components/FileInput/index.d.ts +8 -2
  149. package/es6/components/Form/index.d.ts +7 -1
  150. package/es6/components/FormField/index.d.ts +4 -1
  151. package/es6/components/Grid/index.d.ts +4 -1
  152. package/es6/components/Grommet/index.d.ts +18 -1
  153. package/es6/components/Grommet/propTypes.js +11 -0
  154. package/es6/components/Header/stories/typescript/Ref.stories.tsx +1 -1
  155. package/es6/components/Heading/index.d.ts +7 -7
  156. package/es6/components/Image/index.d.ts +4 -1
  157. package/es6/components/InfiniteScroll/index.d.ts +2 -2
  158. package/es6/components/Layer/index.d.ts +4 -1
  159. package/es6/components/List/index.d.ts +9 -3
  160. package/es6/components/Markdown/index.d.ts +5 -1
  161. package/es6/components/MaskedInput/MaskedInput.js +49 -4
  162. package/es6/components/MaskedInput/index.d.ts +7 -1
  163. package/es6/components/MaskedInput/stories/CustomBox.stories.js +1 -0
  164. package/es6/components/MaskedInput/stories/Date.stories.js +1 -0
  165. package/es6/components/MaskedInput/stories/DateRange.stories.js +1 -0
  166. package/es6/components/MaskedInput/stories/DateTimeDrop.stories.js +1 -0
  167. package/es6/components/MaskedInput/stories/Filtered.stories.js +1 -0
  168. package/es6/components/MaskedInput/stories/SizeUnits.stories.js +1 -0
  169. package/es6/components/MaskedInput/stories/Time.stories.js +1 -0
  170. package/es6/components/NameValueList/index.d.ts +8 -1
  171. package/es6/components/Notification/index.d.ts +1 -0
  172. package/es6/components/PageHeader/index.d.ts +5 -1
  173. package/es6/components/Pagination/PaginationStep.js +4 -0
  174. package/es6/components/Pagination/index.d.ts +5 -0
  175. package/es6/components/Pagination/propTypes.js +6 -1
  176. package/es6/components/Paragraph/index.d.ts +7 -1
  177. package/es6/components/RadioButton/index.d.ts +7 -1
  178. package/es6/components/RadioButtonGroup/index.d.ts +7 -1
  179. package/es6/components/RangeInput/index.d.ts +7 -1
  180. package/es6/components/RangeSelector/index.d.ts +15 -2
  181. package/es6/components/RoutedAnchor/index.d.ts +3 -2
  182. package/es6/components/RoutedButton/index.d.ts +3 -2
  183. package/es6/components/Select/Select.js +3 -5
  184. package/es6/components/Select/index.d.ts +7 -1
  185. package/es6/components/Select/utils.js +9 -2
  186. package/es6/components/SelectMultiple/SelectMultiple.js +6 -11
  187. package/es6/components/SelectMultiple/SelectMultipleContainer.js +3 -5
  188. package/es6/components/SelectMultiple/SelectMultipleValue.js +2 -3
  189. package/es6/components/SelectMultiple/index.d.ts +7 -1
  190. package/es6/components/Sidebar/index.d.ts +4 -1
  191. package/es6/components/Stack/index.d.ts +4 -1
  192. package/es6/components/Tab/index.d.ts +7 -1
  193. package/es6/components/Table/index.d.ts +4 -1
  194. package/es6/components/TableBody/index.d.ts +4 -1
  195. package/es6/components/TableCell/index.d.ts +10 -3
  196. package/es6/components/TableFooter/index.d.ts +4 -1
  197. package/es6/components/TableHeader/index.d.ts +4 -1
  198. package/es6/components/TableRow/index.d.ts +4 -1
  199. package/es6/components/Tabs/index.d.ts +4 -1
  200. package/es6/components/Tag/Tag.js +16 -2
  201. package/es6/components/Tag/index.d.ts +6 -0
  202. package/es6/components/Tag/propTypes.js +6 -0
  203. package/es6/components/Text/Text.js +3 -2
  204. package/es6/components/Text/index.d.ts +7 -1
  205. package/es6/components/TextArea/index.d.ts +7 -1
  206. package/es6/components/TextInput/TextInput.js +6 -2
  207. package/es6/components/TextInput/index.d.ts +6 -3
  208. package/es6/components/TextInput/stories/CustomThemed/CustomSuggestions.stories.tsx +2 -1
  209. package/es6/components/TextInput/stories/CustomThemed/Themed.stories.js +1 -0
  210. package/es6/components/TextInput/stories/OnSelect.stories.js +1 -0
  211. package/es6/components/TextInput/stories/WithTags.stories.js +1 -0
  212. package/es6/components/Tip/Tip.js +26 -3
  213. package/es6/components/ToggleGroup/index.d.ts +7 -1
  214. package/es6/components/Toolbar/index.d.ts +5 -2
  215. package/es6/components/Video/index.d.ts +7 -1
  216. package/es6/components/WorldMap/index.d.ts +7 -1
  217. package/es6/languages/default.json +6 -0
  218. package/es6/utils/mixins.js +2 -1
  219. package/es6/utils/responsive.js +8 -7
  220. package/grommet.min.js +1 -1
  221. package/grommet.min.js.map +1 -1
  222. package/languages/default.json +6 -0
  223. package/package.json +43 -43
  224. package/utils/mixins.js +2 -1
  225. package/utils/responsive.js +8 -7
  226. package/components/Box/StyledResponsiveContainer.js +0 -11
  227. package/components/Drop/stories/TrapFocus.stories.js +0 -86
  228. package/es6/components/Box/ResponsiveContainer.js +0 -52
  229. package/es6/components/Box/StyledResponsiveContainer.js +0 -6
  230. package/es6/components/Drop/stories/TrapFocus.stories.js +0 -82
@@ -1,12 +1,20 @@
1
1
  "use strict";
2
2
 
3
3
  exports.__esModule = true;
4
- exports.StyledWeeksContainer = exports.StyledWeeks = exports.StyledWeek = exports.StyledDayContainer = exports.StyledDay = exports.StyledCalendar = void 0;
4
+ exports.StyledWeeksContainer = exports.StyledWeeks = exports.StyledWeek = exports.StyledDayContainer = exports.StyledDayButton = exports.StyledDay = exports.StyledCalendar = void 0;
5
5
  var _styledComponents = _interopRequireWildcard(require("styled-components"));
6
+ var _Button = require("../Button");
6
7
  var _utils = require("../../utils");
7
8
  var _background = require("../../utils/background");
9
+ var _mixins = require("../../utils/mixins");
8
10
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
9
11
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
12
+ var responsiveSizeStyle = function responsiveSizeStyle(props) {
13
+ var breakpoint = props.theme.global.size[props.sizeProp];
14
+ return (0, _mixins.breakpointStyle)({
15
+ value: breakpoint
16
+ }, "\n width: 100vw;\n max-width: " + breakpoint + ";\n ", true);
17
+ };
10
18
  var sizeStyle = function sizeStyle(props) {
11
19
  var data = props.theme.calendar[props.sizeProp];
12
20
  var width = props.fillContainer ? '100%' : props.theme.global.size[props.sizeProp];
@@ -17,8 +25,10 @@ var sizeStyle = function sizeStyle(props) {
17
25
  var StyledCalendar = exports.StyledCalendar = _styledComponents["default"].div.withConfig(_utils.styledComponentsConfig).withConfig({
18
26
  displayName: "StyledCalendar",
19
27
  componentId: "sc-1y4xhmp-0"
20
- })(["", " ", " ", ""], _utils.genericStyles, function (props) {
28
+ })(["", " ", " ", " ", ""], _utils.genericStyles, function (props) {
21
29
  return sizeStyle(props);
30
+ }, function (props) {
31
+ return props.responsive && responsiveSizeStyle(props);
22
32
  }, function (props) {
23
33
  return props.theme.calendar && props.theme.calendar.extend;
24
34
  });
@@ -26,11 +36,20 @@ var weeksContainerSizeStyle = function weeksContainerSizeStyle(props) {
26
36
  var height = props.fillContainer ? '100%' : (0, _utils.parseMetricToNum)(props.theme.calendar[props.sizeProp].daySize) * 6 + "px";
27
37
  return "\n height: " + height + ";\n\n ";
28
38
  };
39
+ var weeksContainerResponsiveSizeStyle = function weeksContainerResponsiveSizeStyle(props) {
40
+ var breakpoint = props.theme.global.size[props.sizeProp];
41
+ // set aspect-ratio to 7 days by 6 weeks
42
+ return (0, _mixins.breakpointStyle)({
43
+ value: breakpoint
44
+ }, "\n height: auto;\n aspect-ratio: 7/6;\n ", true);
45
+ };
29
46
  var StyledWeeksContainer = exports.StyledWeeksContainer = _styledComponents["default"].div.withConfig(_utils.styledComponentsConfig).withConfig({
30
47
  displayName: "StyledCalendar__StyledWeeksContainer",
31
48
  componentId: "sc-1y4xhmp-1"
32
- })(["overflow:hidden;", " ", ";"], function (props) {
49
+ })(["overflow:hidden;", " ", " ", ";"], function (props) {
33
50
  return weeksContainerSizeStyle(props);
51
+ }, function (props) {
52
+ return props.responsive && weeksContainerResponsiveSizeStyle(props);
34
53
  }, function (props) {
35
54
  return props.focus && !props.plain && (0, _utils.focusStyle)();
36
55
  });
@@ -81,45 +100,78 @@ var StyledWeek = exports.StyledWeek = _styledComponents["default"].div.withConfi
81
100
  })(["display:flex;justify-content:space-between;", ""], function (props) {
82
101
  return props.fillContainer && 'flex: 1;';
83
102
  });
103
+ var responsiveDayContainerStyle = function responsiveDayContainerStyle(props) {
104
+ var breakpoint = props.theme.global.size[props.sizeProp];
105
+ return (0, _mixins.breakpointStyle)({
106
+ value: breakpoint
107
+ }, "\n width: 14.3%;\n ", true);
108
+ };
84
109
 
85
110
  // The width of 14.3% is derived from dividing 100/7. We want the
86
111
  // widths of 7 days to equally fill 100% of the row.
87
112
  var StyledDayContainer = exports.StyledDayContainer = _styledComponents["default"].div.withConfig(_utils.styledComponentsConfig).withConfig({
88
113
  displayName: "StyledCalendar__StyledDayContainer",
89
114
  componentId: "sc-1y4xhmp-4"
90
- })(["flex:0 1 auto;", " ", " ", ""], function (props) {
115
+ })(["flex:0 1 auto;", " ", " ", " ", ""], function (props) {
91
116
  return props.fillContainer && 'width: 14.3%;';
92
117
  }, function (props) {
93
118
  var _props$theme$calendar7;
94
119
  return (props.inRange || props.isSelected && props.rangePosition) && ((_props$theme$calendar7 = props.theme.calendar) == null || (_props$theme$calendar7 = _props$theme$calendar7.range) == null ? void 0 : _props$theme$calendar7.background) && (0, _utils.backgroundStyle)(props.theme.calendar.range.background, props.theme);
95
120
  }, function (props) {
96
121
  return rangeRoundStyle(props);
122
+ }, function (props) {
123
+ return props.responsive && responsiveDayContainerStyle(props);
124
+ });
125
+ var responsiveDayButtonStyle = function responsiveDayButtonStyle(props) {
126
+ var breakpoint = props.theme.global.size[props.sizeProp];
127
+ return (0, _mixins.breakpointStyle)({
128
+ value: breakpoint
129
+ }, "\n width: 100%;\n ", true);
130
+ };
131
+
132
+ // when caller opts in to day hover styling, apply all state styles
133
+ // on CalendarDay instead of active state on CalendarDayButton
134
+ var StyledDayButton = exports.StyledDayButton = (0, _styledComponents["default"])(_Button.Button).withConfig({
135
+ displayName: "StyledCalendar__StyledDayButton",
136
+ componentId: "sc-1y4xhmp-5"
137
+ })(["", " ", ""], function (props) {
138
+ var _props$theme$calendar8;
139
+ return ((_props$theme$calendar8 = props.theme.calendar) == null || (_props$theme$calendar8 = _props$theme$calendar8.day) == null || (_props$theme$calendar8 = _props$theme$calendar8.hover) == null ? void 0 : _props$theme$calendar8.background) && 'background: inherit;';
140
+ }, function (props) {
141
+ return props.responsive && responsiveDayButtonStyle(props);
97
142
  });
98
143
  var daySizeStyle = function daySizeStyle(props) {
99
144
  var data = props.theme.calendar[props.sizeProp];
100
145
  return (0, _styledComponents.css)(["width:", ";height:", ";"], props.fillContainer ? '100%' : data.daySize, props.fillContainer ? '100%' : data.daySize);
101
146
  };
147
+ var responsiveDaySizeStyle = function responsiveDaySizeStyle(props) {
148
+ var breakpoint = props.theme.global.size[props.sizeProp];
149
+ var data = props.theme.calendar[props.sizeProp];
150
+ return (0, _mixins.breakpointStyle)({
151
+ value: breakpoint
152
+ }, "\n width: 100%;\n max-width: " + data.daySize + ";\n height: auto;\n aspect-ratio: 1;\n ", true);
153
+ };
102
154
  var dayStyle = function dayStyle(props) {
103
155
  var backgroundObj;
104
156
  var colorObj;
105
157
  if (props.isSelected) {
106
- var _props$theme$calendar8, _props$theme$calendar9;
107
- backgroundObj = ((_props$theme$calendar8 = props.theme.calendar.day) == null || (_props$theme$calendar8 = _props$theme$calendar8.selected) == null ? void 0 : _props$theme$calendar8.background) || 'control';
108
- colorObj = (_props$theme$calendar9 = props.theme.calendar.day) == null || (_props$theme$calendar9 = _props$theme$calendar9.selected) == null ? void 0 : _props$theme$calendar9.color;
158
+ var _props$theme$calendar9, _props$theme$calendar10;
159
+ backgroundObj = ((_props$theme$calendar9 = props.theme.calendar.day) == null || (_props$theme$calendar9 = _props$theme$calendar9.selected) == null ? void 0 : _props$theme$calendar9.background) || 'control';
160
+ colorObj = (_props$theme$calendar10 = props.theme.calendar.day) == null || (_props$theme$calendar10 = _props$theme$calendar10.selected) == null ? void 0 : _props$theme$calendar10.color;
109
161
  } else if (props.inRange) {
110
- var _props$theme$calendar10, _props$theme$calendar11, _props$theme$calendar12, _props$theme$calendar13;
162
+ var _props$theme$calendar11, _props$theme$calendar12, _props$theme$calendar13, _props$theme$calendar14;
111
163
  // for backwards compatability, only apply this if caller hasn't specified
112
164
  // range specific rounding
113
165
  // if they have, background will be applied to StyledDayContainer
114
- backgroundObj = !((_props$theme$calendar10 = props.theme.calendar) != null && (_props$theme$calendar10 = _props$theme$calendar10[props.sizeProp]) != null && (_props$theme$calendar10 = _props$theme$calendar10.range) != null && _props$theme$calendar10.round) && !((_props$theme$calendar11 = props.theme.calendar) != null && (_props$theme$calendar11 = _props$theme$calendar11.medium.range) != null && _props$theme$calendar11.round) && (((_props$theme$calendar12 = props.theme.calendar.day) == null || (_props$theme$calendar12 = _props$theme$calendar12.inRange) == null ? void 0 : _props$theme$calendar12.background) || {
166
+ backgroundObj = !((_props$theme$calendar11 = props.theme.calendar) != null && (_props$theme$calendar11 = _props$theme$calendar11[props.sizeProp]) != null && (_props$theme$calendar11 = _props$theme$calendar11.range) != null && _props$theme$calendar11.round) && !((_props$theme$calendar12 = props.theme.calendar) != null && (_props$theme$calendar12 = _props$theme$calendar12.medium.range) != null && _props$theme$calendar12.round) && (((_props$theme$calendar13 = props.theme.calendar.day) == null || (_props$theme$calendar13 = _props$theme$calendar13.inRange) == null ? void 0 : _props$theme$calendar13.background) || {
115
167
  color: 'control',
116
168
  opacity: 'weak'
117
169
  });
118
- colorObj = (_props$theme$calendar13 = props.theme.calendar.day) == null || (_props$theme$calendar13 = _props$theme$calendar13.inRange) == null ? void 0 : _props$theme$calendar13.color;
170
+ colorObj = (_props$theme$calendar14 = props.theme.calendar.day) == null || (_props$theme$calendar14 = _props$theme$calendar14.inRange) == null ? void 0 : _props$theme$calendar14.color;
119
171
  } else {
120
- var _props$theme$calendar14, _props$theme$calendar15;
121
- backgroundObj = (_props$theme$calendar14 = props.theme.calendar.day) == null ? void 0 : _props$theme$calendar14.background;
122
- colorObj = (_props$theme$calendar15 = props.theme.calendar.day) == null ? void 0 : _props$theme$calendar15.color;
172
+ var _props$theme$calendar15, _props$theme$calendar16;
173
+ backgroundObj = (_props$theme$calendar15 = props.theme.calendar.day) == null ? void 0 : _props$theme$calendar15.background;
174
+ colorObj = (_props$theme$calendar16 = props.theme.calendar.day) == null ? void 0 : _props$theme$calendar16.color;
123
175
  }
124
176
  if (colorObj && !backgroundObj) return "color: " + (0, _utils.normalizeColor)(colorObj, props.theme) + ";";
125
177
  return (0, _utils.backgroundStyle)(backgroundObj, props.theme, colorObj);
@@ -128,17 +180,17 @@ var dayHoverStyle = function dayHoverStyle(props) {
128
180
  var backgroundObj;
129
181
  var colorObj;
130
182
  if (props.isSelected) {
131
- var _props$theme$calendar16, _props$theme$calendar17;
132
- backgroundObj = (_props$theme$calendar16 = props.theme.calendar.day) == null || (_props$theme$calendar16 = _props$theme$calendar16.selected) == null || (_props$theme$calendar16 = _props$theme$calendar16.hover) == null ? void 0 : _props$theme$calendar16.background;
133
- colorObj = (_props$theme$calendar17 = props.theme.calendar.day) == null || (_props$theme$calendar17 = _props$theme$calendar17.selected) == null || (_props$theme$calendar17 = _props$theme$calendar17.hover) == null ? void 0 : _props$theme$calendar17.color;
183
+ var _props$theme$calendar17, _props$theme$calendar18;
184
+ backgroundObj = (_props$theme$calendar17 = props.theme.calendar.day) == null || (_props$theme$calendar17 = _props$theme$calendar17.selected) == null || (_props$theme$calendar17 = _props$theme$calendar17.hover) == null ? void 0 : _props$theme$calendar17.background;
185
+ colorObj = (_props$theme$calendar18 = props.theme.calendar.day) == null || (_props$theme$calendar18 = _props$theme$calendar18.selected) == null || (_props$theme$calendar18 = _props$theme$calendar18.hover) == null ? void 0 : _props$theme$calendar18.color;
134
186
  } else if (props.inRange) {
135
- var _props$theme$calendar18, _props$theme$calendar19;
136
- backgroundObj = (_props$theme$calendar18 = props.theme.calendar.day) == null || (_props$theme$calendar18 = _props$theme$calendar18.inRange) == null || (_props$theme$calendar18 = _props$theme$calendar18.hover) == null ? void 0 : _props$theme$calendar18.background;
137
- colorObj = (_props$theme$calendar19 = props.theme.calendar.day) == null || (_props$theme$calendar19 = _props$theme$calendar19.inRange) == null || (_props$theme$calendar19 = _props$theme$calendar19.hover) == null ? void 0 : _props$theme$calendar19.color;
187
+ var _props$theme$calendar19, _props$theme$calendar20;
188
+ backgroundObj = (_props$theme$calendar19 = props.theme.calendar.day) == null || (_props$theme$calendar19 = _props$theme$calendar19.inRange) == null || (_props$theme$calendar19 = _props$theme$calendar19.hover) == null ? void 0 : _props$theme$calendar19.background;
189
+ colorObj = (_props$theme$calendar20 = props.theme.calendar.day) == null || (_props$theme$calendar20 = _props$theme$calendar20.inRange) == null || (_props$theme$calendar20 = _props$theme$calendar20.hover) == null ? void 0 : _props$theme$calendar20.color;
138
190
  } else {
139
- var _props$theme$calendar20, _props$theme$calendar21;
140
- backgroundObj = (_props$theme$calendar20 = props.theme.calendar.day) == null || (_props$theme$calendar20 = _props$theme$calendar20.hover) == null ? void 0 : _props$theme$calendar20.background;
141
- colorObj = (_props$theme$calendar21 = props.theme.calendar.day) == null || (_props$theme$calendar21 = _props$theme$calendar21.hover) == null ? void 0 : _props$theme$calendar21.color;
191
+ var _props$theme$calendar21, _props$theme$calendar22;
192
+ backgroundObj = (_props$theme$calendar21 = props.theme.calendar.day) == null || (_props$theme$calendar21 = _props$theme$calendar21.hover) == null ? void 0 : _props$theme$calendar21.background;
193
+ colorObj = (_props$theme$calendar22 = props.theme.calendar.day) == null || (_props$theme$calendar22 = _props$theme$calendar22.hover) == null ? void 0 : _props$theme$calendar22.color;
142
194
  }
143
195
  if (colorObj && !backgroundObj) return "color: " + (0, _utils.normalizeColor)(colorObj, props.theme) + ";";
144
196
  return (0, _utils.backgroundStyle)(backgroundObj, props.theme, colorObj);
@@ -146,30 +198,32 @@ var dayHoverStyle = function dayHoverStyle(props) {
146
198
  var dayFontStyle = function dayFontStyle(props) {
147
199
  var fontWeight;
148
200
  if (props.isSelected) {
149
- var _props$theme$calendar22;
150
- fontWeight = (_props$theme$calendar22 = props.theme.calendar.day) == null || (_props$theme$calendar22 = _props$theme$calendar22.selected) == null || (_props$theme$calendar22 = _props$theme$calendar22.font) == null ? void 0 : _props$theme$calendar22.weight;
151
- } else if (props.inRange) {
152
201
  var _props$theme$calendar23;
153
- fontWeight = (_props$theme$calendar23 = props.theme.calendar.day) == null || (_props$theme$calendar23 = _props$theme$calendar23.inRange) == null || (_props$theme$calendar23 = _props$theme$calendar23.font) == null ? void 0 : _props$theme$calendar23.weight;
202
+ fontWeight = (_props$theme$calendar23 = props.theme.calendar.day) == null || (_props$theme$calendar23 = _props$theme$calendar23.selected) == null || (_props$theme$calendar23 = _props$theme$calendar23.font) == null ? void 0 : _props$theme$calendar23.weight;
203
+ } else if (props.inRange) {
204
+ var _props$theme$calendar24;
205
+ fontWeight = (_props$theme$calendar24 = props.theme.calendar.day) == null || (_props$theme$calendar24 = _props$theme$calendar24.inRange) == null || (_props$theme$calendar24 = _props$theme$calendar24.font) == null ? void 0 : _props$theme$calendar24.weight;
154
206
  }
155
207
  return fontWeight && "font-weight: " + fontWeight + ";";
156
208
  };
157
209
  var StyledDay = exports.StyledDay = _styledComponents["default"].div.withConfig(_utils.styledComponentsConfig).withConfig({
158
210
  displayName: "StyledCalendar__StyledDay",
159
- componentId: "sc-1y4xhmp-5"
160
- })(["display:flex;justify-content:center;align-items:center;color:", ";", " ", " ", " ", " ", " ", " ", " ", ""], function (props) {
161
- var _props$theme$calendar24;
162
- return (0, _utils.normalizeColor)(props.otherMonth ? ((_props$theme$calendar24 = props.theme.calendar) == null || (_props$theme$calendar24 = _props$theme$calendar24.day) == null || (_props$theme$calendar24 = _props$theme$calendar24.adjacent) == null ? void 0 : _props$theme$calendar24.color) || 'text-xweak' : 'text-strong', props.theme);
211
+ componentId: "sc-1y4xhmp-6"
212
+ })(["display:flex;justify-content:center;align-items:center;color:", ";", " ", " ", " ", " ", " ", " ", " ", " ", ""], function (props) {
213
+ var _props$theme$calendar25;
214
+ return (0, _utils.normalizeColor)(props.otherMonth ? ((_props$theme$calendar25 = props.theme.calendar) == null || (_props$theme$calendar25 = _props$theme$calendar25.day) == null || (_props$theme$calendar25 = _props$theme$calendar25.adjacent) == null ? void 0 : _props$theme$calendar25.color) || 'text-xweak' : 'text-strong', props.theme);
163
215
  }, function (props) {
164
216
  return daySizeStyle(props);
217
+ }, function (props) {
218
+ return props.responsive && responsiveDaySizeStyle(props);
165
219
  }, function (props) {
166
220
  return dayStyle(props);
167
221
  }, function (props) {
168
222
  return dayFontStyle(props);
169
223
  }, function (props) {
170
- var _props$theme$calendar25, _props$theme$calendar26;
224
+ var _props$theme$calendar26, _props$theme$calendar27;
171
225
  // fallback to medium if no size-specific styles
172
- var round = ((_props$theme$calendar25 = props.theme.calendar) == null || (_props$theme$calendar25 = _props$theme$calendar25[props.sizeProp]) == null || (_props$theme$calendar25 = _props$theme$calendar25.day) == null ? void 0 : _props$theme$calendar25.round) || ((_props$theme$calendar26 = props.theme.calendar) == null || (_props$theme$calendar26 = _props$theme$calendar26.medium) == null || (_props$theme$calendar26 = _props$theme$calendar26.day) == null ? void 0 : _props$theme$calendar26.round);
226
+ var round = ((_props$theme$calendar26 = props.theme.calendar) == null || (_props$theme$calendar26 = _props$theme$calendar26[props.sizeProp]) == null || (_props$theme$calendar26 = _props$theme$calendar26.day) == null ? void 0 : _props$theme$calendar26.round) || ((_props$theme$calendar27 = props.theme.calendar) == null || (_props$theme$calendar27 = _props$theme$calendar27.medium) == null || (_props$theme$calendar27 = _props$theme$calendar27.day) == null ? void 0 : _props$theme$calendar27.round);
173
227
  return round && (0, _utils.roundStyle)(round, props.responsive, props.theme);
174
228
  }, function (props) {
175
229
  return props.active && _background.activeStyle;
@@ -49,17 +49,30 @@ export interface CalendarProps {
49
49
  onSelect?: (select: string | string[]) => any;
50
50
  range?: boolean | 'array';
51
51
  reference?: string;
52
+ responsive?: boolean;
52
53
  showAdjacentDays?: boolean | 'trim';
53
54
  size?: 'small' | 'medium' | 'large' | string;
54
55
  }
55
56
 
56
57
  export interface CalendarExtendedProps
57
58
  extends CalendarProps,
58
- Omit<JSX.IntrinsicElements['div'], keyof CalendarProps> {}
59
+ Omit<
60
+ React.DetailedHTMLProps<
61
+ React.HTMLAttributes<HTMLDivElement>,
62
+ HTMLDivElement
63
+ >,
64
+ keyof CalendarProps
65
+ > {}
59
66
 
60
67
  // Keep type alias for backwards compatibility.
61
68
  export type CalendarType = CalendarProps &
62
- Omit<JSX.IntrinsicElements['div'], 'onSelect'>;
69
+ Omit<
70
+ React.DetailedHTMLProps<
71
+ React.HTMLAttributes<HTMLDivElement>,
72
+ HTMLDivElement
73
+ >,
74
+ 'onSelect'
75
+ >;
63
76
 
64
77
  declare const Calendar: React.ComponentClass<CalendarExtendedProps>;
65
78
 
@@ -30,6 +30,7 @@ if (process.env.NODE_ENV !== 'production') {
30
30
  onSelect: _propTypes["default"].func,
31
31
  range: _propTypes["default"].oneOfType([_propTypes["default"].bool, _propTypes["default"].oneOf(['array'])]),
32
32
  reference: _propTypes["default"].string,
33
+ responsive: _propTypes["default"].bool,
33
34
  showAdjacentDays: _propTypes["default"].oneOfType([_propTypes["default"].bool, _propTypes["default"].oneOf(['trim'])]),
34
35
  size: _propTypes["default"].oneOfType([_propTypes["default"].oneOf(['small', 'medium', 'large']), _propTypes["default"].string])
35
36
  });
@@ -25,7 +25,13 @@ export interface CardsProps<CardType = any> {
25
25
  step?: number;
26
26
  }
27
27
 
28
- type ulProps = Omit<JSX.IntrinsicElements['ul'], 'children'>;
28
+ type ulProps = Omit<
29
+ React.DetailedHTMLProps<
30
+ React.HTMLAttributes<HTMLUListElement>,
31
+ HTMLUListElement
32
+ >,
33
+ 'children'
34
+ >;
29
35
 
30
36
  export interface CardsExtendedProps<CardType>
31
37
  extends CardsProps<CardType>,
@@ -24,7 +24,10 @@ export interface CarouselProps {
24
24
  onChild?: (...args: any[]) => void;
25
25
  }
26
26
 
27
- type divType = JSX.IntrinsicElements['div'];
27
+ type divType = React.DetailedHTMLProps<
28
+ React.HTMLAttributes<HTMLDivElement>,
29
+ HTMLDivElement
30
+ >;
28
31
 
29
32
  export interface CarouselExtendedProps extends CarouselProps, divType {}
30
33
 
@@ -104,7 +104,13 @@ export interface ChartProps {
104
104
 
105
105
  export interface ChartExtendedProps
106
106
  extends ChartProps,
107
- Omit<JSX.IntrinsicElements['svg'], keyof ChartProps> {}
107
+ Omit<
108
+ React.DetailedHTMLProps<
109
+ React.SVGAttributes<SVGSVGElement>,
110
+ SVGSVGElement
111
+ >,
112
+ keyof ChartProps
113
+ > {}
108
114
 
109
115
  declare const Chart: React.FC<ChartExtendedProps>;
110
116
 
@@ -16,7 +16,13 @@ export interface CheckBoxProps {
16
16
  indeterminate?: boolean;
17
17
  }
18
18
 
19
- type inputType = Omit<JSX.IntrinsicElements['input'], 'children'>;
19
+ type inputType = Omit<
20
+ React.DetailedHTMLProps<
21
+ React.InputHTMLAttributes<HTMLInputElement>,
22
+ HTMLInputElement
23
+ >,
24
+ 'children'
25
+ >;
20
26
 
21
27
  export interface CheckBoxExtendedProps extends CheckBoxProps, inputType {}
22
28
 
@@ -9,7 +9,14 @@ interface OnChangeEvent {
9
9
  }
10
10
 
11
11
  export interface CheckBoxType
12
- extends Omit<CheckBoxProps & JSX.IntrinsicElements['input'], 'checked'> {
12
+ extends Omit<
13
+ CheckBoxProps &
14
+ React.DetailedHTMLProps<
15
+ React.InputHTMLAttributes<HTMLInputElement>,
16
+ HTMLInputElement
17
+ >,
18
+ 'checked'
19
+ > {
13
20
  [key: string]: any;
14
21
  }
15
22
 
@@ -27,7 +34,13 @@ export interface CheckBoxGroupProps {
27
34
  export interface CheckBoxGroupExtendedProps
28
35
  extends CheckBoxGroupProps,
29
36
  BoxProps,
30
- Omit<JSX.IntrinsicElements['div'], keyof CheckBoxGroupProps> {}
37
+ Omit<
38
+ React.DetailedHTMLProps<
39
+ React.HTMLAttributes<HTMLDivElement>,
40
+ HTMLDivElement
41
+ >,
42
+ keyof CheckBoxGroupProps
43
+ > {}
31
44
 
32
45
  declare const CheckBoxGroup: React.FC<CheckBoxGroupExtendedProps>;
33
46
 
@@ -35,8 +35,20 @@ export interface ClockProps {
35
35
  */
36
36
  export type ClockExtendedProps = ClockProps &
37
37
  (
38
- | Omit<JSX.IntrinsicElements['svg'], 'onChange' | 'type'>
39
- | Omit<JSX.IntrinsicElements['div'], 'onChange'>
38
+ | Omit<
39
+ React.DetailedHTMLProps<
40
+ React.SVGAttributes<SVGSVGElement>,
41
+ SVGSVGElement
42
+ >,
43
+ 'onChange' | 'type'
44
+ >
45
+ | Omit<
46
+ React.DetailedHTMLProps<
47
+ React.HTMLAttributes<HTMLDivElement>,
48
+ HTMLDivElement
49
+ >,
50
+ 'onChange'
51
+ >
40
52
  );
41
53
 
42
54
  declare const Clock: React.FC<ClockExtendedProps>;
@@ -5,7 +5,10 @@ export interface CollapsibleProps {
5
5
  direction?: 'horizontal' | 'vertical';
6
6
  }
7
7
 
8
- type divProps = JSX.IntrinsicElements['div'];
8
+ type divProps = React.DetailedHTMLProps<
9
+ React.HTMLAttributes<HTMLDivElement>,
10
+ HTMLDivElement
11
+ >;
9
12
 
10
13
  export interface CollapsibleExtendedProps extends CollapsibleProps, divProps {}
11
14
 
@@ -125,7 +125,10 @@ export interface DataProps {
125
125
  // onDeleteView?: (string) => void;
126
126
  }
127
127
 
128
- type divProps = Omit<JSX.IntrinsicElements['div'], 'onClick'>;
128
+ type divProps = Omit<
129
+ React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>,
130
+ 'onClick'
131
+ >;
129
132
 
130
133
  export interface DataExtendedProps extends BoxProps, DataProps, divProps {}
131
134
 
@@ -18,7 +18,10 @@ export interface DataFilterProps {
18
18
  };
19
19
  }
20
20
 
21
- type divProps = Omit<JSX.IntrinsicElements['div'], 'onClick' | 'property'>;
21
+ type divProps = Omit<
22
+ React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>,
23
+ 'onClick' | 'property'
24
+ >;
22
25
 
23
26
  export interface DataFilterExtendedProps
24
27
  extends BoxProps,
@@ -10,7 +10,10 @@ export interface DataFiltersProps {
10
10
  updateOn?: 'change' | 'submit';
11
11
  }
12
12
 
13
- type divProps = Omit<JSX.IntrinsicElements['div'], 'onClick'>;
13
+ type divProps = Omit<
14
+ React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>,
15
+ 'onClick'
16
+ >;
14
17
 
15
18
  export interface DataFiltersExtendedProps
16
19
  extends BoxProps,
@@ -41,7 +41,6 @@ var Row = /*#__PURE__*/(0, _react.memo)(function (_ref) {
41
41
  columns = _ref.columns,
42
42
  pinnedOffset = _ref.pinnedOffset,
43
43
  primaryProperty = _ref.primaryProperty,
44
- data = _ref.data,
45
44
  verticalAlign = _ref.verticalAlign;
46
45
  return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_StyledDataTable.StyledDataTableRow, {
47
46
  ref: rowRef,
@@ -104,12 +103,19 @@ var Row = /*#__PURE__*/(0, _react.memo)(function (_ref) {
104
103
  context: isRowExpanded ? 'groupHeader' : 'body',
105
104
  expanded: isRowExpanded,
106
105
  onToggle: function onToggle() {
106
+ var nextRowExpand;
107
+ var rowKey = primaryValue || index;
107
108
  if (isRowExpanded) {
108
- setRowExpand(rowExpand.filter(function (s) {
109
- return s !== index;
110
- }));
109
+ nextRowExpand = rowExpand.filter(function (s) {
110
+ return s !== rowKey;
111
+ });
112
+ } else {
113
+ nextRowExpand = [].concat(rowExpand, [rowKey]);
114
+ }
115
+ if (rowDetails.onExpand) {
116
+ rowDetails.onExpand(nextRowExpand, datum);
111
117
  } else {
112
- setRowExpand([].concat(rowExpand, [index]));
118
+ setRowExpand(nextRowExpand);
113
119
  }
114
120
  },
115
121
  pad: cellProps.pad,
@@ -133,7 +139,7 @@ var Row = /*#__PURE__*/(0, _react.memo)(function (_ref) {
133
139
  key: index.toString() + "_expand"
134
140
  }, (selected || onSelect) && /*#__PURE__*/_react["default"].createElement(_TableCell.TableCell, null), /*#__PURE__*/_react["default"].createElement(_TableCell.TableCell, {
135
141
  colSpan: columns.length + 1
136
- }, rowDetails(data[index]))));
142
+ }, rowDetails.render ? rowDetails.render(datum) : rowDetails(datum))));
137
143
  });
138
144
  var Body = exports.Body = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, ref) {
139
145
  var _ref3;
@@ -251,7 +257,7 @@ var Body = exports.Body = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, r
251
257
  var primaryValue = primaryProperty ? (0, _buildState.datumValue)(datum, primaryProperty) : undefined;
252
258
  var isSelected = selected && selected.includes(primaryValue);
253
259
  var isDisabled = disabled && disabled.includes(primaryValue);
254
- var isRowExpanded = rowExpand && rowExpand.includes(index);
260
+ var isRowExpanded = rowExpand && rowExpand.includes(primaryValue || index);
255
261
  var cellProps = (0, _buildState.normalizeRowCellProps)(rowProps, cellPropsProp, primaryValue, index);
256
262
  return /*#__PURE__*/_react["default"].createElement(Row, {
257
263
  key: primaryValue != null ? primaryValue : index,
@@ -190,9 +190,14 @@ var DataTable = exports.DataTable = function DataTable(_ref) {
190
190
  setSelectedDataContext(select.length);
191
191
  }
192
192
  }, [select, setSelectedDataContext]);
193
- var _useState8 = (0, _react.useState)([]),
193
+ var _useState8 = (0, _react.useState)((rowDetails == null ? void 0 : rowDetails.expand) || []),
194
194
  rowExpand = _useState8[0],
195
195
  setRowExpand = _useState8[1];
196
+ (0, _react.useEffect)(function () {
197
+ if (rowDetails != null && rowDetails.expand) {
198
+ setRowExpand(rowDetails.expand);
199
+ }
200
+ }, [rowDetails == null ? void 0 : rowDetails.expand]);
196
201
 
197
202
  // any customized column widths
198
203
  var _useState9 = (0, _react.useState)({}),
@@ -99,7 +99,13 @@ export interface DataTableProps<TRowType = any> {
99
99
  pad?: PadType;
100
100
  };
101
101
  };
102
- rowDetails?: (row: TRowType) => React.ReactNode;
102
+ rowDetails?:
103
+ | ((row: TRowType) => React.ReactNode)
104
+ | {
105
+ render: (row: TRowType) => React.ReactNode;
106
+ expand?: (string | number)[];
107
+ onExpand?: (expandedKeys: (string | number)[], datum: TRowType) => void;
108
+ };
103
109
  show?: number | { page?: number };
104
110
  size?: 'small' | 'medium' | 'large' | 'xlarge' | string;
105
111
 
@@ -152,7 +158,10 @@ export interface DataTableProps<TRowType = any> {
152
158
  export interface DataTableExtendedProps<TRowType = any>
153
159
  extends DataTableProps<TRowType>,
154
160
  Omit<
155
- JSX.IntrinsicElements['table'],
161
+ React.DetailedHTMLProps<
162
+ React.HTMLAttributes<HTMLTableElement>,
163
+ HTMLTableElement
164
+ >,
156
165
  'onSelect' | 'placeholder' | 'border'
157
166
  > {}
158
167
 
@@ -78,7 +78,11 @@ if (process.env.NODE_ENV !== 'production') {
78
78
  onSelect: _propTypes["default"].func
79
79
  })]),
80
80
  onClickRow: _propTypes["default"].oneOfType([_propTypes["default"].func, _propTypes["default"].oneOf(['select'])]),
81
- rowDetails: _propTypes["default"].func,
81
+ rowDetails: _propTypes["default"].oneOfType([_propTypes["default"].func, _propTypes["default"].shape({
82
+ render: _propTypes["default"].func.isRequired,
83
+ expand: _propTypes["default"].arrayOf(_propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].number])),
84
+ onExpand: _propTypes["default"].func
85
+ })]),
82
86
  onMore: _propTypes["default"].func,
83
87
  onSearch: _propTypes["default"].func,
84
88
  onSelect: _propTypes["default"].func,