baseui 10.3.0 → 10.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app-nav-bar/user-menu.js +1 -0
- package/app-nav-bar/user-menu.js.flow +1 -0
- package/button/styled-components.js +1 -1
- package/button/styled-components.js.flow +4 -1
- package/card/styled-components.js +0 -1
- package/card/styled-components.js.flow +0 -1
- package/combobox/combobox.js +5 -1
- package/combobox/combobox.js.flow +4 -0
- package/combobox/index.d.ts +6 -3
- package/data-table/column-datetime.js +2 -0
- package/data-table/column-datetime.js.flow +2 -0
- package/data-table/data-table.js +13 -3
- package/data-table/data-table.js.flow +20 -4
- package/data-table/types.js.flow +2 -1
- package/datepicker/calendar-header.js +255 -109
- package/datepicker/calendar-header.js.flow +282 -145
- package/datepicker/calendar.js +6 -1
- package/datepicker/calendar.js.flow +5 -1
- package/datepicker/constants.js +9 -2
- package/datepicker/constants.js.flow +7 -0
- package/datepicker/datepicker.js +135 -73
- package/datepicker/datepicker.js.flow +161 -62
- package/datepicker/day.js +2 -0
- package/datepicker/day.js.flow +2 -0
- package/datepicker/index.d.ts +8 -0
- package/datepicker/month.js +4 -0
- package/datepicker/month.js.flow +3 -0
- package/datepicker/styled-components.js +116 -56
- package/datepicker/styled-components.js.flow +101 -36
- package/datepicker/types.js.flow +18 -1
- package/datepicker/utils/calendar-header-helpers.js +51 -0
- package/datepicker/utils/calendar-header-helpers.js.flow +53 -0
- package/datepicker/utils/date-helpers.js +1 -1
- package/datepicker/utils/date-helpers.js.flow +1 -1
- package/datepicker/week.js +1 -0
- package/datepicker/week.js.flow +1 -0
- package/dnd-list/index.js.flow +2 -1
- package/dnd-list/list.js +1 -2
- package/dnd-list/list.js.flow +1 -1
- package/dnd-list/styled-components.js +1 -1
- package/dnd-list/styled-components.js.flow +1 -0
- package/drawer/close-icon.js +3 -2
- package/drawer/close-icon.js.flow +2 -2
- package/drawer/drawer.js +5 -2
- package/drawer/drawer.js.flow +2 -2
- package/es/app-nav-bar/user-menu.js +1 -0
- package/es/button/styled-components.js +1 -1
- package/es/card/styled-components.js +0 -1
- package/es/combobox/combobox.js +5 -1
- package/es/data-table/column-datetime.js +2 -0
- package/es/data-table/data-table.js +13 -3
- package/es/datepicker/calendar-header.js +204 -93
- package/es/datepicker/calendar.js +7 -2
- package/es/datepicker/constants.js +6 -1
- package/es/datepicker/datepicker.js +70 -42
- package/es/datepicker/day.js +2 -0
- package/es/datepicker/month.js +3 -0
- package/es/datepicker/styled-components.js +98 -37
- package/es/datepicker/types.js +1 -1
- package/es/datepicker/utils/calendar-header-helpers.js +34 -0
- package/es/datepicker/utils/date-helpers.js +1 -1
- package/es/datepicker/week.js +1 -0
- package/es/dnd-list/index.js +2 -1
- package/es/dnd-list/list.js +1 -2
- package/es/dnd-list/styled-components.js +1 -0
- package/es/drawer/close-icon.js +3 -2
- package/es/drawer/drawer.js +5 -2
- package/es/helper/helper.js +1 -0
- package/es/layer/layer.js +8 -0
- package/es/list/list-heading.js +17 -6
- package/es/map-marker/constants.js +69 -0
- package/es/map-marker/fixed-marker.js +98 -0
- package/es/map-marker/floating-marker.js +65 -0
- package/es/map-marker/index.js +9 -0
- package/es/map-marker/pin-head.js +108 -0
- package/es/map-marker/styled-components.js +156 -0
- package/es/map-marker/types.js +8 -0
- package/es/menu/maybe-child-menu.js +1 -0
- package/es/popover/popover.js +6 -5
- package/es/popover/stateful-container.js +8 -2
- package/es/rating/emoticon-rating.js +3 -1
- package/es/rating/star-rating.js +3 -1
- package/es/select/select-component.js +20 -5
- package/es/select/styled-components.js +34 -4
- package/es/snackbar/snackbar-context.js +16 -4
- package/es/spinner/styled-components.js +1 -1
- package/es/table-semantic/styled-components.js +6 -4
- package/es/table-semantic/table-builder.js +3 -0
- package/es/themes/dark-theme/color-component-tokens.js +1 -1
- package/es/themes/light-theme/color-component-tokens.js +9 -9
- package/es/themes/shared/lighting.js +5 -1
- package/es/timepicker/timepicker.js +16 -11
- package/es/tooltip/styled-components.js +8 -0
- package/es/tooltip/tooltip.js +1 -0
- package/esm/app-nav-bar/user-menu.js +1 -0
- package/esm/button/styled-components.js +1 -1
- package/esm/card/styled-components.js +0 -1
- package/esm/combobox/combobox.js +5 -1
- package/esm/data-table/column-datetime.js +2 -0
- package/esm/data-table/data-table.js +13 -3
- package/esm/datepicker/calendar-header.js +255 -110
- package/esm/datepicker/calendar.js +7 -2
- package/esm/datepicker/constants.js +6 -1
- package/esm/datepicker/datepicker.js +136 -74
- package/esm/datepicker/day.js +2 -0
- package/esm/datepicker/month.js +3 -0
- package/esm/datepicker/styled-components.js +112 -55
- package/esm/datepicker/types.js +1 -1
- package/esm/datepicker/utils/calendar-header-helpers.js +45 -0
- package/esm/datepicker/utils/date-helpers.js +1 -1
- package/esm/datepicker/week.js +1 -0
- package/esm/dnd-list/index.js +2 -1
- package/esm/dnd-list/list.js +1 -2
- package/esm/dnd-list/styled-components.js +1 -1
- package/esm/drawer/close-icon.js +3 -2
- package/esm/drawer/drawer.js +5 -2
- package/esm/helper/helper.js +1 -0
- package/esm/layer/layer.js +8 -0
- package/esm/list/list-heading.js +17 -6
- package/esm/map-marker/constants.js +62 -0
- package/esm/map-marker/fixed-marker.js +137 -0
- package/esm/map-marker/floating-marker.js +94 -0
- package/esm/map-marker/index.js +9 -0
- package/esm/map-marker/pin-head.js +144 -0
- package/esm/map-marker/styled-components.js +168 -0
- package/esm/map-marker/types.js +8 -0
- package/esm/menu/maybe-child-menu.js +1 -0
- package/esm/popover/popover.js +6 -5
- package/esm/popover/stateful-container.js +8 -2
- package/esm/rating/emoticon-rating.js +2 -2
- package/esm/rating/star-rating.js +2 -2
- package/esm/select/select-component.js +19 -5
- package/esm/select/styled-components.js +28 -4
- package/esm/snackbar/snackbar-context.js +16 -4
- package/esm/spinner/styled-components.js +1 -1
- package/esm/table-semantic/styled-components.js +6 -4
- package/esm/table-semantic/table-builder.js +3 -0
- package/esm/themes/dark-theme/color-component-tokens.js +1 -1
- package/esm/themes/light-theme/color-component-tokens.js +9 -9
- package/esm/themes/shared/lighting.js +5 -1
- package/esm/timepicker/timepicker.js +17 -11
- package/esm/tooltip/styled-components.js +8 -0
- package/esm/tooltip/tooltip.js +1 -0
- package/helper/helper.js +1 -0
- package/helper/helper.js.flow +1 -0
- package/layer/layer.js +8 -0
- package/layer/layer.js.flow +9 -0
- package/link/index.d.ts +1 -0
- package/list/index.d.ts +36 -0
- package/list/list-heading.js +24 -7
- package/list/list-heading.js.flow +17 -8
- package/map-marker/constants.js +82 -0
- package/map-marker/constants.js.flow +74 -0
- package/map-marker/fixed-marker.js +152 -0
- package/map-marker/fixed-marker.js.flow +137 -0
- package/map-marker/floating-marker.js +109 -0
- package/map-marker/floating-marker.js.flow +102 -0
- package/map-marker/index.d.ts +105 -0
- package/map-marker/index.js +55 -0
- package/map-marker/index.js.flow +23 -0
- package/map-marker/package.json +4 -0
- package/map-marker/pin-head.js +159 -0
- package/map-marker/pin-head.js.flow +155 -0
- package/map-marker/styled-components.js +184 -0
- package/map-marker/styled-components.js.flow +177 -0
- package/map-marker/types.js +11 -0
- package/map-marker/types.js.flow +114 -0
- package/menu/index.d.ts +7 -0
- package/menu/maybe-child-menu.js +1 -0
- package/menu/maybe-child-menu.js.flow +1 -0
- package/menu/types.js.flow +12 -0
- package/modal/index.d.ts +1 -1
- package/modal/types.js.flow +4 -1
- package/package.json +5 -3
- package/popover/index.d.ts +2 -1
- package/popover/popover.js +6 -5
- package/popover/popover.js.flow +11 -4
- package/popover/stateful-container.js +8 -2
- package/popover/stateful-container.js.flow +5 -0
- package/popover/types.js.flow +6 -1
- package/rating/emoticon-rating.js +2 -2
- package/rating/emoticon-rating.js.flow +4 -1
- package/rating/star-rating.js +2 -2
- package/rating/star-rating.js.flow +4 -1
- package/select/select-component.js +19 -5
- package/select/select-component.js.flow +19 -5
- package/select/styled-components.js +28 -4
- package/select/styled-components.js.flow +30 -2
- package/select/types.js.flow +9 -0
- package/snackbar/index.d.ts +21 -16
- package/snackbar/snackbar-context.js +15 -4
- package/snackbar/snackbar-context.js.flow +15 -3
- package/spinner/styled-components.js +1 -1
- package/spinner/styled-components.js.flow +1 -1
- package/table-semantic/styled-components.js +6 -4
- package/table-semantic/styled-components.js.flow +6 -4
- package/table-semantic/table-builder.js +3 -0
- package/table-semantic/table-builder.js.flow +3 -0
- package/themes/dark-theme/color-component-tokens.js +1 -1
- package/themes/dark-theme/color-component-tokens.js.flow +1 -1
- package/themes/light-theme/color-component-tokens.js +9 -9
- package/themes/light-theme/color-component-tokens.js.flow +9 -9
- package/themes/shared/lighting.js +5 -1
- package/themes/shared/lighting.js.flow +4 -0
- package/themes/types.js.flow +4 -0
- package/timepicker/index.d.ts +1 -0
- package/timepicker/timepicker.js +17 -11
- package/timepicker/timepicker.js.flow +31 -12
- package/timepicker/types.js.flow +10 -0
- package/tooltip/styled-components.js +8 -0
- package/tooltip/styled-components.js.flow +8 -0
- package/tooltip/tooltip.js +1 -0
- package/tooltip/tooltip.js.flow +6 -1
package/app-nav-bar/user-menu.js
CHANGED
|
@@ -48,7 +48,7 @@ var BaseButton = (0, _index.styled)('button', function (_ref) {
|
|
|
48
48
|
cursor: 'pointer',
|
|
49
49
|
':disabled': {
|
|
50
50
|
cursor: 'not-allowed',
|
|
51
|
-
backgroundColor: $theme.colors.buttonDisabledFill,
|
|
51
|
+
backgroundColor: $kind === _constants.KIND.minimal || $kind === _constants.KIND.tertiary ? 'transparent' : $theme.colors.buttonDisabledFill,
|
|
52
52
|
color: $theme.colors.buttonDisabledText
|
|
53
53
|
},
|
|
54
54
|
marginLeft: 0,
|
|
@@ -46,7 +46,10 @@ export const BaseButton = styled<SharedStylePropsT>(
|
|
|
46
46
|
cursor: 'pointer',
|
|
47
47
|
':disabled': {
|
|
48
48
|
cursor: 'not-allowed',
|
|
49
|
-
backgroundColor:
|
|
49
|
+
backgroundColor:
|
|
50
|
+
$kind === KIND.minimal || $kind === KIND.tertiary
|
|
51
|
+
? 'transparent'
|
|
52
|
+
: $theme.colors.buttonDisabledFill,
|
|
50
53
|
color: $theme.colors.buttonDisabledText,
|
|
51
54
|
},
|
|
52
55
|
marginLeft: 0,
|
|
@@ -98,7 +98,6 @@ var Title = (0, _index.styled)('h1', function (_ref7) {
|
|
|
98
98
|
var $theme = _ref7.$theme;
|
|
99
99
|
return _objectSpread(_objectSpread({}, $theme.typography.HeadingSmall), {}, {
|
|
100
100
|
color: $theme.colors.contentPrimary,
|
|
101
|
-
fontWeight: 500,
|
|
102
101
|
marginLeft: 0,
|
|
103
102
|
marginTop: 0,
|
|
104
103
|
marginRight: 0,
|
|
@@ -72,7 +72,6 @@ export const Thumbnail = styled<{}>('img', ({$theme}) => ({
|
|
|
72
72
|
export const Title = styled<{}>('h1', ({$theme}) => ({
|
|
73
73
|
...$theme.typography.HeadingSmall,
|
|
74
74
|
color: $theme.colors.contentPrimary,
|
|
75
|
-
fontWeight: 500,
|
|
76
75
|
marginLeft: 0,
|
|
77
76
|
marginTop: 0,
|
|
78
77
|
marginRight: 0,
|
package/combobox/combobox.js
CHANGED
|
@@ -306,7 +306,11 @@ function Combobox(props) {
|
|
|
306
306
|
return /*#__PURE__*/React.createElement(Root // eslint-disable-next-line flowtype/no-weak-types
|
|
307
307
|
, _extends({
|
|
308
308
|
ref: rootRef
|
|
309
|
-
}, rootProps), /*#__PURE__*/React.createElement(OverriddenPopover,
|
|
309
|
+
}, rootProps), /*#__PURE__*/React.createElement(OverriddenPopover // React-focus-lock used in Popover used to skip non-tabbable elements (`tabIndex=-1`) elements for focus, we had ListBox with tabIndex to disable focus on
|
|
310
|
+
// the ListBox, but we can just disable autoFocus (as ListBox / ListItem should not be focusable) (and input is also not autoFocused).
|
|
311
|
+
// Select Component does the same thing
|
|
312
|
+
, _extends({
|
|
313
|
+
autoFocus: false,
|
|
310
314
|
isOpen: isOpen,
|
|
311
315
|
overrides: popoverOverrides,
|
|
312
316
|
placement: _index2.PLACEMENT.bottomLeft,
|
|
@@ -258,6 +258,10 @@ function Combobox<OptionT>(props: PropsT<OptionT>) {
|
|
|
258
258
|
{...rootProps}
|
|
259
259
|
>
|
|
260
260
|
<OverriddenPopover
|
|
261
|
+
// React-focus-lock used in Popover used to skip non-tabbable elements (`tabIndex=-1`) elements for focus, we had ListBox with tabIndex to disable focus on
|
|
262
|
+
// the ListBox, but we can just disable autoFocus (as ListBox / ListItem should not be focusable) (and input is also not autoFocused).
|
|
263
|
+
// Select Component does the same thing
|
|
264
|
+
autoFocus={false}
|
|
261
265
|
isOpen={isOpen}
|
|
262
266
|
overrides={popoverOverrides}
|
|
263
267
|
placement={PLACEMENT.bottomLeft}
|
package/combobox/index.d.ts
CHANGED
|
@@ -17,11 +17,14 @@ export interface ComboboxOverrides {
|
|
|
17
17
|
ListItem?: Override<any>;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
export type PropsT<OptionT =
|
|
20
|
+
export type PropsT<OptionT = any> = {
|
|
21
21
|
autocomplete?: boolean;
|
|
22
22
|
disabled?: boolean;
|
|
23
|
-
mapOptionToNode?: (
|
|
24
|
-
|
|
23
|
+
mapOptionToNode?: (option: {
|
|
24
|
+
isSelected: boolean;
|
|
25
|
+
option: OptionT;
|
|
26
|
+
}) => React.ReactNode;
|
|
27
|
+
mapOptionToString: (option: OptionT) => string;
|
|
25
28
|
id?: string;
|
|
26
29
|
name?: string;
|
|
27
30
|
inputRef?: React.Ref<HTMLInputElement>;
|
|
@@ -86,6 +86,7 @@ function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(
|
|
|
86
86
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
87
87
|
|
|
88
88
|
var DATE_FORMAT = 'MM-dd-yyyy';
|
|
89
|
+
var MASK = '99-99-9999 - 99-99-9999';
|
|
89
90
|
var TIME_FORMAT = 'HH:mm ss:SS';
|
|
90
91
|
var FORMAT_STRING = "".concat(DATE_FORMAT, " ").concat(TIME_FORMAT);
|
|
91
92
|
|
|
@@ -461,6 +462,7 @@ function DatetimeFilter(props) {
|
|
|
461
462
|
}
|
|
462
463
|
},
|
|
463
464
|
formatString: DATE_FORMAT,
|
|
465
|
+
mask: MASK,
|
|
464
466
|
placeholder: "MM-DD-YYYY - MM-DD-YYYY",
|
|
465
467
|
minDate: datesSorted[0],
|
|
466
468
|
maxDate: datesSorted[datesSorted.length - 1],
|
|
@@ -68,6 +68,7 @@ type FilterParametersT = {|
|
|
|
68
68
|
type DatetimeColumnT = ColumnT<Date, FilterParametersT>;
|
|
69
69
|
|
|
70
70
|
const DATE_FORMAT = 'MM-dd-yyyy';
|
|
71
|
+
const MASK = '99-99-9999 - 99-99-9999';
|
|
71
72
|
const TIME_FORMAT = 'HH:mm ss:SS';
|
|
72
73
|
const FORMAT_STRING = `${DATE_FORMAT} ${TIME_FORMAT}`;
|
|
73
74
|
|
|
@@ -415,6 +416,7 @@ function DatetimeFilter(props) {
|
|
|
415
416
|
}
|
|
416
417
|
}}
|
|
417
418
|
formatString={DATE_FORMAT}
|
|
419
|
+
mask={MASK}
|
|
418
420
|
placeholder="MM-DD-YYYY - MM-DD-YYYY"
|
|
419
421
|
minDate={datesSorted[0]}
|
|
420
422
|
maxDate={datesSorted[datesSorted.length - 1]}
|
package/data-table/data-table.js
CHANGED
|
@@ -445,11 +445,12 @@ var InnerTableElement = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
445
445
|
viewState = EMPTY;
|
|
446
446
|
}
|
|
447
447
|
|
|
448
|
+
var highlightedRow = ctx.rows[ctx.rowHighlightIndex - 1];
|
|
448
449
|
return /*#__PURE__*/React.createElement("div", {
|
|
449
450
|
ref: ref,
|
|
450
451
|
"data-baseweb": "data-table",
|
|
451
452
|
style: props.style
|
|
452
|
-
}, /*#__PURE__*/React.createElement(Headers, null), viewState === LOADING && /*#__PURE__*/React.createElement(LoadingOrEmptyMessage, null, ctx.loadingMessage), viewState === EMPTY && /*#__PURE__*/React.createElement(LoadingOrEmptyMessage, null, ctx.emptyMessage), viewState === RENDERING && props.children, ctx.rowActions && Boolean(ctx.rowActions.length) && ctx.rowHighlightIndex > 0 && Boolean(
|
|
453
|
+
}, /*#__PURE__*/React.createElement(Headers, null), viewState === LOADING && /*#__PURE__*/React.createElement(LoadingOrEmptyMessage, null, ctx.loadingMessage), viewState === EMPTY && /*#__PURE__*/React.createElement(LoadingOrEmptyMessage, null, ctx.emptyMessage), viewState === RENDERING && props.children, ctx.rowActions && Boolean(ctx.rowActions.length) && ctx.rowHighlightIndex > 0 && Boolean(highlightedRow) && !ctx.isScrollingX && /*#__PURE__*/React.createElement("div", {
|
|
453
454
|
style: {
|
|
454
455
|
alignItems: 'center',
|
|
455
456
|
backgroundColor: theme.colors.backgroundTertiary,
|
|
@@ -463,7 +464,12 @@ var InnerTableElement = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
463
464
|
left: theme.direction === 'rtl' ? 0 : 'initial',
|
|
464
465
|
top: (ctx.rowHighlightIndex - 1) * ctx.rowHeight + HEADER_ROW_HEIGHT
|
|
465
466
|
}
|
|
466
|
-
}, ctx.rowActions.map(function (rowAction) {
|
|
467
|
+
}, (typeof ctx.rowActions === 'function' ? ctx.rowActions(highlightedRow) : ctx.rowActions).map(function (rowAction) {
|
|
468
|
+
if (rowAction.renderButton) {
|
|
469
|
+
var RowActionButton = rowAction.renderButton;
|
|
470
|
+
return /*#__PURE__*/React.createElement(RowActionButton, null);
|
|
471
|
+
}
|
|
472
|
+
|
|
467
473
|
var RowActionIcon = rowAction.renderIcon;
|
|
468
474
|
return /*#__PURE__*/React.createElement(_index.Button, {
|
|
469
475
|
alt: rowAction.label,
|
|
@@ -480,7 +486,11 @@ var InnerTableElement = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
480
486
|
overrides: {
|
|
481
487
|
BaseButton: {
|
|
482
488
|
style: {
|
|
483
|
-
marginLeft: theme.sizing.scale300
|
|
489
|
+
marginLeft: theme.sizing.scale300,
|
|
490
|
+
paddingTop: theme.sizing.scale100,
|
|
491
|
+
paddingRight: theme.sizing.scale100,
|
|
492
|
+
paddingBottom: theme.sizing.scale100,
|
|
493
|
+
paddingLeft: theme.sizing.scale100
|
|
484
494
|
}
|
|
485
495
|
}
|
|
486
496
|
}
|
|
@@ -53,7 +53,7 @@ type HeaderContextT = {|
|
|
|
53
53
|
onSelectNone: () => void,
|
|
54
54
|
onSort: number => void,
|
|
55
55
|
resizableColumnWidths: boolean,
|
|
56
|
-
rowActions: RowActionT[],
|
|
56
|
+
rowActions: RowActionT[] | (RowT => RowActionT[]),
|
|
57
57
|
rowHeight: number,
|
|
58
58
|
rowHighlightIndex: number,
|
|
59
59
|
rows: RowT[],
|
|
@@ -554,6 +554,8 @@ const InnerTableElement = React.forwardRef<
|
|
|
554
554
|
viewState = EMPTY;
|
|
555
555
|
}
|
|
556
556
|
|
|
557
|
+
const highlightedRow = ctx.rows[ctx.rowHighlightIndex - 1];
|
|
558
|
+
|
|
557
559
|
return (
|
|
558
560
|
<div ref={ref} data-baseweb="data-table" style={props.style}>
|
|
559
561
|
<Headers />
|
|
@@ -571,7 +573,7 @@ const InnerTableElement = React.forwardRef<
|
|
|
571
573
|
{ctx.rowActions &&
|
|
572
574
|
Boolean(ctx.rowActions.length) &&
|
|
573
575
|
ctx.rowHighlightIndex > 0 &&
|
|
574
|
-
Boolean(
|
|
576
|
+
Boolean(highlightedRow) &&
|
|
575
577
|
!ctx.isScrollingX && (
|
|
576
578
|
<div
|
|
577
579
|
style={{
|
|
@@ -589,7 +591,15 @@ const InnerTableElement = React.forwardRef<
|
|
|
589
591
|
(ctx.rowHighlightIndex - 1) * ctx.rowHeight + HEADER_ROW_HEIGHT,
|
|
590
592
|
}}
|
|
591
593
|
>
|
|
592
|
-
{ctx.rowActions
|
|
594
|
+
{(typeof ctx.rowActions === 'function'
|
|
595
|
+
? ctx.rowActions(highlightedRow)
|
|
596
|
+
: ctx.rowActions
|
|
597
|
+
).map(rowAction => {
|
|
598
|
+
if (rowAction.renderButton) {
|
|
599
|
+
const RowActionButton = rowAction.renderButton;
|
|
600
|
+
return <RowActionButton />;
|
|
601
|
+
}
|
|
602
|
+
|
|
593
603
|
const RowActionIcon = rowAction.renderIcon;
|
|
594
604
|
return (
|
|
595
605
|
<Button
|
|
@@ -606,7 +616,13 @@ const InnerTableElement = React.forwardRef<
|
|
|
606
616
|
shape={BUTTON_SHAPES.round}
|
|
607
617
|
overrides={{
|
|
608
618
|
BaseButton: {
|
|
609
|
-
style: {
|
|
619
|
+
style: {
|
|
620
|
+
marginLeft: theme.sizing.scale300,
|
|
621
|
+
paddingTop: theme.sizing.scale100,
|
|
622
|
+
paddingRight: theme.sizing.scale100,
|
|
623
|
+
paddingBottom: theme.sizing.scale100,
|
|
624
|
+
paddingLeft: theme.sizing.scale100,
|
|
625
|
+
},
|
|
610
626
|
},
|
|
611
627
|
}}
|
|
612
628
|
>
|
package/data-table/types.js.flow
CHANGED
|
@@ -87,6 +87,7 @@ export type RowActionT = {|
|
|
|
87
87
|
label: string,
|
|
88
88
|
onClick: ({event: SyntheticEvent<HTMLButtonElement>, row: RowT}) => mixed,
|
|
89
89
|
renderIcon: React.AbstractComponent<{|size: number|}>,
|
|
90
|
+
renderButton?: React.AbstractComponent<{||}>,
|
|
90
91
|
|};
|
|
91
92
|
|
|
92
93
|
export type StatefulDataTablePropsT = {|
|
|
@@ -107,7 +108,7 @@ export type StatefulDataTablePropsT = {|
|
|
|
107
108
|
onSelectionChange?: (RowT[]) => mixed,
|
|
108
109
|
resizableColumnWidths?: boolean,
|
|
109
110
|
rows: RowT[],
|
|
110
|
-
rowActions?: RowActionT[],
|
|
111
|
+
rowActions?: RowActionT[] | (RowT => RowActionT[]),
|
|
111
112
|
rowHeight?: number,
|
|
112
113
|
rowHighlightIndex?: number,
|
|
113
114
|
searchable?: boolean,
|