baseui 10.5.0 → 10.7.2
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/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/drawer.js +2 -1
- package/drawer/drawer.js.flow +1 -1
- 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/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/drawer.js +2 -1
- package/es/helper/helper.js +1 -0
- package/es/layer/layer.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 +5 -5
- package/es/select/styled-components.js +34 -4
- package/es/snackbar/snackbar-context.js +16 -4
- 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/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/drawer.js +2 -1
- package/esm/helper/helper.js +1 -0
- package/esm/layer/layer.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 +5 -5
- package/esm/select/styled-components.js +28 -4
- package/esm/snackbar/snackbar-context.js +16 -4
- 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/map-marker/index.d.ts +6 -5
- 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 +4 -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 +5 -5
- package/select/select-component.js.flow +5 -5
- package/select/styled-components.js +28 -4
- package/select/styled-components.js.flow +30 -2
- package/snackbar/index.d.ts +21 -16
- package/snackbar/snackbar-context.js +15 -4
- package/snackbar/snackbar-context.js.flow +15 -3
- 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/datepicker/types.js.flow
CHANGED
|
@@ -9,7 +9,7 @@ LICENSE file in the root directory of this source tree.
|
|
|
9
9
|
import * as React from 'react';
|
|
10
10
|
import type {OverrideT} from '../helpers/overrides.js';
|
|
11
11
|
import type {SizeT} from '../input/types.js';
|
|
12
|
-
import {ORIENTATION, STATE_CHANGE_TYPE} from './constants.js';
|
|
12
|
+
import {ORIENTATION, STATE_CHANGE_TYPE, DENSITY} from './constants.js';
|
|
13
13
|
import type {DateIOAdapter} from './utils/types.js';
|
|
14
14
|
import type {
|
|
15
15
|
TimePickerPropsT as TimePickerPropsTBase,
|
|
@@ -23,6 +23,8 @@ type LocaleT = any; // see https://github.com/date-fns/date-fns/blob/master/src/
|
|
|
23
23
|
|
|
24
24
|
type onChangeT<T> = ({date: ?T | Array<T>}) => mixed;
|
|
25
25
|
|
|
26
|
+
export type DensityT = $Keys<typeof DENSITY>;
|
|
27
|
+
|
|
26
28
|
export type DatepickerOverridesT = {
|
|
27
29
|
Root?: OverrideT,
|
|
28
30
|
/** Override for reused Select component. QuickSelect is **not a styled element** but a react component that can be replaced */
|
|
@@ -57,12 +59,16 @@ export type DatepickerOverridesT = {
|
|
|
57
59
|
InputWrapper?: OverrideT,
|
|
58
60
|
/** Override for reused Popover component. Popover is **not a styled element** but a react component that can be replaced */
|
|
59
61
|
Popover?: OverrideT,
|
|
62
|
+
StartDate?: OverrideT,
|
|
63
|
+
EndDate?: OverrideT,
|
|
64
|
+
InputLabel?: OverrideT,
|
|
60
65
|
};
|
|
61
66
|
|
|
62
67
|
export type DayPropsT<T = Date> = {
|
|
63
68
|
disabled: boolean,
|
|
64
69
|
date: T,
|
|
65
70
|
dateLabel: ?(day: T) => React.Node,
|
|
71
|
+
density: DensityT,
|
|
66
72
|
filterDate: ?(day: T) => boolean,
|
|
67
73
|
highlightedDate: ?T,
|
|
68
74
|
includeDates: ?Array<T>,
|
|
@@ -93,6 +99,7 @@ export type DayStateT = {
|
|
|
93
99
|
export type WeekPropsT<T = Date> = {
|
|
94
100
|
date: T,
|
|
95
101
|
dateLabel: ?(date: T) => React.Node,
|
|
102
|
+
density: DensityT,
|
|
96
103
|
excludeDates: ?Array<T>,
|
|
97
104
|
filterDate: ?(day: T) => boolean,
|
|
98
105
|
// highlighted while keyboard navigating or hovered
|
|
@@ -132,6 +139,8 @@ export type CalendarInternalState<T = Date> = {
|
|
|
132
139
|
export type CalendarPropsT<T = Date> = {
|
|
133
140
|
/** Defines if the calendar is set to be focused on an initial render. */
|
|
134
141
|
autoFocusCalendar?: boolean,
|
|
142
|
+
/** Determines the density of the calendar */
|
|
143
|
+
density?: DensityT,
|
|
135
144
|
/** A list of dates to disable. */
|
|
136
145
|
excludeDates?: ?Array<T>,
|
|
137
146
|
/** Display select for quickly choosing date ranges. `range` must be true as well. */
|
|
@@ -219,18 +228,26 @@ export type DatepickerPropsT<T = Date> = CalendarPropsT<T> & {
|
|
|
219
228
|
mountNode?: HTMLElement,
|
|
220
229
|
/** Called when calendar is closed */
|
|
221
230
|
onClose?: () => mixed,
|
|
231
|
+
/** Called when calendar is opened */
|
|
232
|
+
onOpen?: () => mixed,
|
|
222
233
|
mask?: string | null,
|
|
234
|
+
/** Determines if startDate and endDate should be separated into two input fields. Ignored if `range` is not true. */
|
|
235
|
+
separateRangeInputs?: boolean,
|
|
236
|
+
startDateLabel?: string,
|
|
237
|
+
endDateLabel?: string,
|
|
223
238
|
};
|
|
224
239
|
|
|
225
240
|
export type SharedStylePropsT = {
|
|
226
241
|
// eslint-disable-next-line flowtype/no-weak-types
|
|
227
242
|
$date: any,
|
|
228
243
|
$disabled: ?boolean,
|
|
244
|
+
$density: DensityT,
|
|
229
245
|
$endDate: ?boolean,
|
|
230
246
|
$endOfMonth: ?boolean,
|
|
231
247
|
$isHighlighted: ?boolean,
|
|
232
248
|
$isHovered: ?boolean,
|
|
233
249
|
$isFocusVisible: ?boolean,
|
|
250
|
+
$month: ?number,
|
|
234
251
|
$outsideMonth: ?boolean,
|
|
235
252
|
$outsideMonthWithinRange: ?boolean,
|
|
236
253
|
$peekNextMonth: ?boolean,
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getFilteredMonthItems = exports.filterMonthItems = void 0;
|
|
7
|
+
|
|
8
|
+
var _constants = require("../constants.js");
|
|
9
|
+
|
|
10
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
11
|
+
|
|
12
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
13
|
+
|
|
14
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
15
|
+
|
|
16
|
+
var getDefaultMonthItems = function getDefaultMonthItems(formatMonthLabel) {
|
|
17
|
+
return _constants.DEFAULT_MONTHS.map(function (month) {
|
|
18
|
+
return {
|
|
19
|
+
id: month.toString(),
|
|
20
|
+
label: formatMonthLabel(month)
|
|
21
|
+
};
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
var filterMonthItems = function filterMonthItems(monthItems, filterList) {
|
|
26
|
+
return monthItems.map(function (month) {
|
|
27
|
+
if (!filterList.includes(Number(month.id))) {
|
|
28
|
+
return _objectSpread(_objectSpread({}, month), {}, {
|
|
29
|
+
disabled: true
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
return month;
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
exports.filterMonthItems = filterMonthItems;
|
|
38
|
+
|
|
39
|
+
var getFilteredMonthItems = function getFilteredMonthItems(_ref) {
|
|
40
|
+
var filterMonthsList = _ref.filterMonthsList,
|
|
41
|
+
formatMonthLabel = _ref.formatMonthLabel;
|
|
42
|
+
var monthItems = getDefaultMonthItems(formatMonthLabel);
|
|
43
|
+
|
|
44
|
+
if (filterMonthsList) {
|
|
45
|
+
monthItems = filterMonthItems(monthItems, filterMonthsList);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
return monthItems;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
exports.getFilteredMonthItems = getFilteredMonthItems;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright (c) Uber Technologies, Inc.
|
|
3
|
+
|
|
4
|
+
This source code is licensed under the MIT license found in the
|
|
5
|
+
LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
// @flow
|
|
8
|
+
import {DEFAULT_MONTHS} from '../constants.js';
|
|
9
|
+
|
|
10
|
+
export type OptionT = {
|
|
11
|
+
id: string,
|
|
12
|
+
label: string,
|
|
13
|
+
disabled?: boolean,
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
type GetMonthItemsArgsT = {
|
|
17
|
+
filterMonthsList: number[] | null,
|
|
18
|
+
formatMonthLabel: number => string,
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
const getDefaultMonthItems = (formatMonthLabel: number => string) =>
|
|
22
|
+
DEFAULT_MONTHS.map<OptionT>(month => ({
|
|
23
|
+
id: month.toString(),
|
|
24
|
+
label: formatMonthLabel(month),
|
|
25
|
+
}));
|
|
26
|
+
|
|
27
|
+
export const filterMonthItems = (monthItems: OptionT[], filterList: number[]) =>
|
|
28
|
+
monthItems.map<OptionT>(month => {
|
|
29
|
+
if (!filterList.includes(Number(month.id))) {
|
|
30
|
+
return {
|
|
31
|
+
...month,
|
|
32
|
+
disabled: true,
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
return month;
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
export const getFilteredMonthItems = ({
|
|
39
|
+
filterMonthsList,
|
|
40
|
+
formatMonthLabel,
|
|
41
|
+
}: GetMonthItemsArgsT) => {
|
|
42
|
+
let monthItems = getDefaultMonthItems(formatMonthLabel);
|
|
43
|
+
|
|
44
|
+
if (filterMonthsList) {
|
|
45
|
+
monthItems = filterMonthItems(monthItems, filterMonthsList);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
return monthItems;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
declare var __DEV__: boolean;
|
|
52
|
+
declare var __NODE__: boolean;
|
|
53
|
+
declare var __BROWSER__: boolean;
|
package/datepicker/week.js
CHANGED
|
@@ -92,6 +92,7 @@ var Week = /*#__PURE__*/function (_React$Component) {
|
|
|
92
92
|
adapter: _this.props.adapter,
|
|
93
93
|
date: day,
|
|
94
94
|
dateLabel: _this.props.dateLabel,
|
|
95
|
+
density: _this.props.density,
|
|
95
96
|
disabled: _this.dateHelpers.isDayDisabled(day, _this.props),
|
|
96
97
|
excludeDates: _this.props.excludeDates,
|
|
97
98
|
filterDate: _this.props.filterDate,
|
package/datepicker/week.js.flow
CHANGED
|
@@ -52,6 +52,7 @@ export default class Week<T = Date> extends React.Component<WeekPropsT<T>> {
|
|
|
52
52
|
adapter={this.props.adapter}
|
|
53
53
|
date={day}
|
|
54
54
|
dateLabel={this.props.dateLabel}
|
|
55
|
+
density={this.props.density}
|
|
55
56
|
disabled={this.dateHelpers.isDayDisabled(day, this.props)}
|
|
56
57
|
excludeDates={this.props.excludeDates}
|
|
57
58
|
filterDate={this.props.filterDate}
|
package/dnd-list/index.js.flow
CHANGED
|
@@ -5,7 +5,8 @@ This source code is licensed under the MIT license found in the
|
|
|
5
5
|
LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
// @flow
|
|
8
|
-
|
|
8
|
+
import {arrayMove, arrayRemove} from 'react-movable';
|
|
9
|
+
export {arrayMove, arrayRemove};
|
|
9
10
|
export {default as StatefulList} from './stateful-list.js';
|
|
10
11
|
export {default as StatefulListContainer} from './stateful-list-container.js';
|
|
11
12
|
export {default as List} from './list.js';
|
package/dnd-list/list.js
CHANGED
|
@@ -220,8 +220,7 @@ var StatelessList = /*#__PURE__*/function (_React$Component) {
|
|
|
220
220
|
display: 'flex'
|
|
221
221
|
})
|
|
222
222
|
}), /*#__PURE__*/React.createElement(DragHandle, _extends({}, sharedProps, dragHandleProps), /*#__PURE__*/React.createElement(_grab.default, {
|
|
223
|
-
size: 24
|
|
224
|
-
color: "#CCC"
|
|
223
|
+
size: 24
|
|
225
224
|
})), /*#__PURE__*/React.createElement(Label, _extends({}, sharedProps, labelProps), value), removable && /*#__PURE__*/React.createElement(CloseHandle, _extends({}, sharedProps, {
|
|
226
225
|
onClick: function onClick(evt) {
|
|
227
226
|
evt.preventDefault();
|
package/dnd-list/list.js.flow
CHANGED
|
@@ -136,7 +136,7 @@ class StatelessList extends React.Component<
|
|
|
136
136
|
style={{...props.style, display: 'flex'}}
|
|
137
137
|
>
|
|
138
138
|
<DragHandle {...sharedProps} {...dragHandleProps}>
|
|
139
|
-
<Grab size={24}
|
|
139
|
+
<Grab size={24} />
|
|
140
140
|
</DragHandle>
|
|
141
141
|
<Label {...sharedProps} {...labelProps}>
|
|
142
142
|
{value}
|
|
@@ -94,7 +94,7 @@ var DragHandle = (0, _index.styled)('div', function (_ref4) {
|
|
|
94
94
|
|
|
95
95
|
var $theme = _ref4.$theme;
|
|
96
96
|
var marginDir = $theme.direction === 'rtl' ? 'marginLeft' : 'marginRight';
|
|
97
|
-
return _ref5 = {}, _defineProperty(_ref5, marginDir, $theme.sizing.scale600), _defineProperty(_ref5, "width", $theme.sizing.scale800), _defineProperty(_ref5, "display", 'flex'), _defineProperty(_ref5, "alignItems", 'center'), _ref5;
|
|
97
|
+
return _ref5 = {}, _defineProperty(_ref5, marginDir, $theme.sizing.scale600), _defineProperty(_ref5, "width", $theme.sizing.scale800), _defineProperty(_ref5, "color", '#CCC'), _defineProperty(_ref5, "display", 'flex'), _defineProperty(_ref5, "alignItems", 'center'), _ref5;
|
|
98
98
|
});
|
|
99
99
|
exports.DragHandle = DragHandle;
|
|
100
100
|
DragHandle.displayName = "DragHandle";
|
package/drawer/drawer.js
CHANGED
|
@@ -342,7 +342,8 @@ var Drawer = /*#__PURE__*/function (_React$Component) {
|
|
|
342
342
|
return /*#__PURE__*/React.createElement(_index.LocaleContext.Consumer, null, function (locale) {
|
|
343
343
|
return /*#__PURE__*/React.createElement(_reactFocusLock.default, {
|
|
344
344
|
returnFocus: true,
|
|
345
|
-
autoFocus: autoFocus
|
|
345
|
+
autoFocus: autoFocus,
|
|
346
|
+
noFocusGuards: true
|
|
346
347
|
}, /*#__PURE__*/React.createElement(Root, _extends({
|
|
347
348
|
"data-baseweb": "drawer",
|
|
348
349
|
ref: _this3.getRef('Root')
|
package/drawer/drawer.js.flow
CHANGED
|
@@ -253,7 +253,7 @@ class Drawer extends React.Component<DrawerPropsT, DrawerStateT> {
|
|
|
253
253
|
<LocaleContext.Consumer>
|
|
254
254
|
{locale => {
|
|
255
255
|
return (
|
|
256
|
-
<FocusLock returnFocus autoFocus={autoFocus}>
|
|
256
|
+
<FocusLock returnFocus autoFocus={autoFocus} noFocusGuards={true}>
|
|
257
257
|
<Root
|
|
258
258
|
data-baseweb="drawer"
|
|
259
259
|
ref={this.getRef('Root')}
|
|
@@ -39,7 +39,7 @@ export const BaseButton = styled('button', ({
|
|
|
39
39
|
cursor: 'pointer',
|
|
40
40
|
':disabled': {
|
|
41
41
|
cursor: 'not-allowed',
|
|
42
|
-
backgroundColor: $theme.colors.buttonDisabledFill,
|
|
42
|
+
backgroundColor: $kind === KIND.minimal || $kind === KIND.tertiary ? 'transparent' : $theme.colors.buttonDisabledFill,
|
|
43
43
|
color: $theme.colors.buttonDisabledText
|
|
44
44
|
},
|
|
45
45
|
marginLeft: 0,
|
package/es/combobox/combobox.js
CHANGED
|
@@ -235,7 +235,11 @@ function Combobox(props) {
|
|
|
235
235
|
return /*#__PURE__*/React.createElement(Root // eslint-disable-next-line flowtype/no-weak-types
|
|
236
236
|
, _extends({
|
|
237
237
|
ref: rootRef
|
|
238
|
-
}, rootProps), /*#__PURE__*/React.createElement(OverriddenPopover,
|
|
238
|
+
}, 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
|
|
239
|
+
// the ListBox, but we can just disable autoFocus (as ListBox / ListItem should not be focusable) (and input is also not autoFocused).
|
|
240
|
+
// Select Component does the same thing
|
|
241
|
+
, _extends({
|
|
242
|
+
autoFocus: false,
|
|
239
243
|
isOpen: isOpen,
|
|
240
244
|
overrides: popoverOverrides,
|
|
241
245
|
placement: PLACEMENT.bottomLeft,
|
|
@@ -29,6 +29,7 @@ import { COLUMNS, DATETIME_OPERATIONS } from './constants.js';
|
|
|
29
29
|
import FilterShell from './filter-shell.js';
|
|
30
30
|
import { LocaleContext } from '../locale/index.js';
|
|
31
31
|
const DATE_FORMAT = 'MM-dd-yyyy';
|
|
32
|
+
const MASK = '99-99-9999 - 99-99-9999';
|
|
32
33
|
const TIME_FORMAT = 'HH:mm ss:SS';
|
|
33
34
|
const FORMAT_STRING = `${DATE_FORMAT} ${TIME_FORMAT}`;
|
|
34
35
|
|
|
@@ -326,6 +327,7 @@ function DatetimeFilter(props) {
|
|
|
326
327
|
}
|
|
327
328
|
},
|
|
328
329
|
formatString: DATE_FORMAT,
|
|
330
|
+
mask: MASK,
|
|
329
331
|
placeholder: "MM-DD-YYYY - MM-DD-YYYY",
|
|
330
332
|
minDate: datesSorted[0],
|
|
331
333
|
maxDate: datesSorted[datesSorted.length - 1],
|