baseui 12.1.3 → 12.2.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/button-timed/button-timed.d.ts +4 -0
- package/button-timed/button-timed.js +124 -0
- package/button-timed/index.d.ts +5 -0
- package/button-timed/index.js +78 -0
- package/button-timed/index.js.flow +57 -0
- package/button-timed/package.json +4 -0
- package/button-timed/styled-components.d.ts +5 -0
- package/button-timed/styled-components.js +57 -0
- package/button-timed/types.d.ts +12 -0
- package/button-timed/types.js +5 -0
- package/button-timed/utils.d.ts +1 -0
- package/button-timed/utils.js +30 -0
- package/card/card.js.flow +1 -1
- package/card/types.d.ts +1 -1
- package/card/types.js.flow +1 -1
- package/data-table/data-table.js +10 -10
- package/data-table/data-table.js.flow +2 -2
- package/data-table/stateful-container.js +41 -35
- package/data-table/stateful-data-table.js +2 -0
- package/data-table/types.d.ts +3 -0
- package/data-table/types.js.flow +2 -0
- package/es/button-timed/button-timed.js +82 -0
- package/es/button-timed/index.js +11 -0
- package/es/button-timed/styled-components.js +47 -0
- package/es/button-timed/types.js +1 -0
- package/es/button-timed/utils.js +21 -0
- package/es/data-table/data-table.js +6 -6
- package/es/data-table/stateful-container.js +30 -18
- package/es/data-table/stateful-data-table.js +2 -0
- package/es/input/base-input.js +1 -3
- package/es/layer/tether.js +1 -1
- package/es/popover/popover.js +2 -2
- package/es/themes/dark-theme/color-component-tokens.js +1 -1
- package/esm/button-timed/button-timed.js +112 -0
- package/esm/button-timed/index.js +11 -0
- package/esm/button-timed/styled-components.js +51 -0
- package/esm/button-timed/types.js +1 -0
- package/esm/button-timed/utils.js +21 -0
- package/esm/data-table/data-table.js +10 -10
- package/esm/data-table/stateful-container.js +41 -35
- package/esm/data-table/stateful-data-table.js +2 -0
- package/esm/input/base-input.js +6 -9
- package/esm/layer/tether.js +1 -1
- package/esm/popover/popover.js +2 -2
- package/esm/themes/dark-theme/color-component-tokens.js +1 -1
- package/header-navigation/types.d.ts +3 -2
- package/header-navigation/types.js.flow +2 -0
- package/input/base-input.js +6 -9
- package/layer/tether.js +1 -1
- package/layer/tether.js.flow +1 -1
- package/layout-grid/types.d.ts +1 -1
- package/package.json +1 -1
- package/popover/popover.js +2 -2
- package/popover/popover.js.flow +3 -3
- package/popover/types.d.ts +4 -4
- package/popover/types.js.flow +4 -4
- package/skeleton/skeleton.js.flow +1 -1
- package/skeleton/types.d.ts +1 -1
- package/skeleton/types.js.flow +1 -1
- package/themes/dark-theme/color-component-tokens.js +1 -1
- package/themes/dark-theme/color-component-tokens.js.flow +1 -1
- package/themes/types.d.ts +5 -5
- package/tree-view/tree-label-interactable.d.ts +3 -3
- package/tree-view/tree-label-interactable.js.flow +2 -0
|
@@ -41,55 +41,66 @@ function useDuplicateColumnTitleWarning(columns) {
|
|
|
41
41
|
}, [columns]);
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
function
|
|
45
|
-
|
|
46
|
-
var initialSortDirection = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
44
|
+
export var StatefulContainer = function StatefulContainer(props) {
|
|
45
|
+
useDuplicateColumnTitleWarning(props.columns);
|
|
47
46
|
|
|
48
|
-
var _React$useState = React.useState(initialSortIndex),
|
|
47
|
+
var _React$useState = React.useState(typeof props.initialSortIndex === 'number' ? props.initialSortIndex : -1),
|
|
49
48
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
50
49
|
sortIndex = _React$useState2[0],
|
|
51
50
|
setSortIndex = _React$useState2[1];
|
|
52
51
|
|
|
53
|
-
var _React$useState3 = React.useState(initialSortDirection),
|
|
52
|
+
var _React$useState3 = React.useState(props.initialSortDirection),
|
|
54
53
|
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
55
54
|
sortDirection = _React$useState4[0],
|
|
56
55
|
setSortDirection = _React$useState4[1];
|
|
57
56
|
|
|
57
|
+
var _React$useState5 = React.useState(props.initialFilters || new Map()),
|
|
58
|
+
_React$useState6 = _slicedToArray(_React$useState5, 2),
|
|
59
|
+
filters = _React$useState6[0],
|
|
60
|
+
setFilters = _React$useState6[1];
|
|
61
|
+
|
|
62
|
+
var _React$useState7 = React.useState(''),
|
|
63
|
+
_React$useState8 = _slicedToArray(_React$useState7, 2),
|
|
64
|
+
textQuery = _React$useState8[0],
|
|
65
|
+
setTextQuery = _React$useState8[1];
|
|
66
|
+
|
|
67
|
+
var _React$useState9 = React.useState(props.initialSelectedRowIds || new Set()),
|
|
68
|
+
_React$useState10 = _slicedToArray(_React$useState9, 2),
|
|
69
|
+
selectedRowIds = _React$useState10[0],
|
|
70
|
+
setSelectedRowIds = _React$useState10[1];
|
|
71
|
+
|
|
58
72
|
function handleSort(columnIndex) {
|
|
73
|
+
var nextSortIndex;
|
|
74
|
+
var nextSortDirection;
|
|
75
|
+
|
|
59
76
|
if (columnIndex === sortIndex) {
|
|
60
77
|
if (sortDirection === SORT_DIRECTIONS.DESC) {
|
|
61
|
-
|
|
62
|
-
|
|
78
|
+
nextSortIndex = -1;
|
|
79
|
+
nextSortDirection = SORT_DIRECTIONS.ASC;
|
|
63
80
|
} else {
|
|
64
|
-
|
|
81
|
+
nextSortIndex = columnIndex;
|
|
82
|
+
nextSortDirection = SORT_DIRECTIONS.DESC;
|
|
65
83
|
}
|
|
66
84
|
} else {
|
|
67
|
-
|
|
68
|
-
|
|
85
|
+
nextSortIndex = columnIndex;
|
|
86
|
+
nextSortDirection = SORT_DIRECTIONS.ASC;
|
|
69
87
|
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
return [sortIndex, sortDirection, handleSort];
|
|
73
|
-
}
|
|
74
88
|
|
|
75
|
-
|
|
76
|
-
|
|
89
|
+
setSortIndex(nextSortIndex);
|
|
90
|
+
setSortDirection(nextSortDirection);
|
|
77
91
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
handleSort = _useSortParameters2[2];
|
|
92
|
+
if (props.onSort) {
|
|
93
|
+
props.onSort(nextSortIndex, nextSortDirection);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
83
96
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
filters = _React$useState6[0],
|
|
87
|
-
setFilters = _React$useState6[1];
|
|
97
|
+
function handleTextQueryChange(nextTextQuery) {
|
|
98
|
+
setTextQuery(nextTextQuery);
|
|
88
99
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
100
|
+
if (props.onTextQueryChange) {
|
|
101
|
+
props.onTextQueryChange(nextTextQuery);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
93
104
|
|
|
94
105
|
function handleFilterAdd(title, filterParams) {
|
|
95
106
|
filters.set(title, filterParams);
|
|
@@ -111,11 +122,6 @@ export var StatefulContainer = function StatefulContainer(props) {
|
|
|
111
122
|
setFilters(new Map(filters));
|
|
112
123
|
}
|
|
113
124
|
|
|
114
|
-
var _React$useState9 = React.useState(props.initialSelectedRowIds || new Set()),
|
|
115
|
-
_React$useState10 = _slicedToArray(_React$useState9, 2),
|
|
116
|
-
selectedRowIds = _React$useState10[0],
|
|
117
|
-
setSelectedRowIds = _React$useState10[1];
|
|
118
|
-
|
|
119
125
|
function handleSelectChange(next) {
|
|
120
126
|
setSelectedRowIds(next);
|
|
121
127
|
var selectionCallback = props.onSelectionChange;
|
|
@@ -168,7 +174,7 @@ export var StatefulContainer = function StatefulContainer(props) {
|
|
|
168
174
|
onSelectNone: handleSelectNone,
|
|
169
175
|
onSelectOne: handleSelectOne,
|
|
170
176
|
onSort: handleSort,
|
|
171
|
-
onTextQueryChange:
|
|
177
|
+
onTextQueryChange: handleTextQueryChange,
|
|
172
178
|
resizableColumnWidths: Boolean(props.resizableColumnWidths),
|
|
173
179
|
rowHighlightIndex: props.rowHighlightIndex,
|
|
174
180
|
selectedRowIds: selectedRowIds,
|
|
@@ -201,6 +201,8 @@ export function StatefulDataTable(props) {
|
|
|
201
201
|
onIncludedRowsChange: props.onIncludedRowsChange,
|
|
202
202
|
onRowHighlightChange: props.onRowHighlightChange,
|
|
203
203
|
onSelectionChange: props.onSelectionChange,
|
|
204
|
+
onSort: props.onSort,
|
|
205
|
+
onTextQueryChange: props.onTextQueryChange,
|
|
204
206
|
resizableColumnWidths: props.resizableColumnWidths,
|
|
205
207
|
rows: props.rows,
|
|
206
208
|
rowActions: props.rowActions,
|
package/esm/input/base-input.js
CHANGED
|
@@ -315,14 +315,11 @@ var BaseInput = /*#__PURE__*/function (_React$Component) {
|
|
|
315
315
|
}, {
|
|
316
316
|
key: "render",
|
|
317
317
|
value: function render() {
|
|
318
|
-
var _this$
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
InputOverride = _this$props3$override.Input,
|
|
324
|
-
BeforeOverride = _this$props3$override.Before,
|
|
325
|
-
AfterOverride = _this$props3$override.After; // more here https://developer.mozilla.org/en-US/docs/Web/Security/Securing_your_site/Turning_off_form_autocompletion#Preventing_autofilling_with_autocompletenew-password
|
|
318
|
+
var _this$props$overrides = this.props.overrides,
|
|
319
|
+
InputContainerOverride = _this$props$overrides.InputContainer,
|
|
320
|
+
InputOverride = _this$props$overrides.Input,
|
|
321
|
+
BeforeOverride = _this$props$overrides.Before,
|
|
322
|
+
AfterOverride = _this$props$overrides.After; // more here https://developer.mozilla.org/en-US/docs/Web/Security/Securing_your_site/Turning_off_form_autocompletion#Preventing_autofilling_with_autocompletenew-password
|
|
326
323
|
|
|
327
324
|
var autoComplete = this.state.initialType === 'password' && this.props.autoComplete === BaseInput.defaultProps.autoComplete ? 'new-password' : this.props.autoComplete;
|
|
328
325
|
var sharedProps = getSharedProps(this.props, this.state);
|
|
@@ -384,7 +381,7 @@ var BaseInput = /*#__PURE__*/function (_React$Component) {
|
|
|
384
381
|
max: this.props.max,
|
|
385
382
|
step: this.props.step,
|
|
386
383
|
rows: this.props.type === CUSTOM_INPUT_TYPE.textarea ? this.props.rows : null
|
|
387
|
-
}, sharedProps, inputProps)
|
|
384
|
+
}, sharedProps, inputProps)), this.renderClear(), this.renderMaskToggle(), /*#__PURE__*/React.createElement(After, _extends({}, sharedProps, afterProps)));
|
|
388
385
|
}
|
|
389
386
|
}]);
|
|
390
387
|
|
package/esm/layer/tether.js
CHANGED
|
@@ -129,7 +129,7 @@ var Tether = /*#__PURE__*/function (_React$Component) {
|
|
|
129
129
|
if (!this.props.anchorRef) {
|
|
130
130
|
if (process.env.NODE_ENV !== "production") {
|
|
131
131
|
// eslint-disable-next-line no-console
|
|
132
|
-
console.warn("[baseui][TetherBehavior] ref has not been passed to the Popper's anchor element.\n See how to pass the ref to an anchor element in the Popover example\n
|
|
132
|
+
console.warn("[baseui][TetherBehavior] ref has not been passed to the Popper's anchor element.\n See how to pass the ref to an anchor element in the Popover example\n https://baseweb.design/components/popover/#anchor-ref-handling-example");
|
|
133
133
|
}
|
|
134
134
|
} else {
|
|
135
135
|
this.initializePopper();
|
package/esm/popover/popover.js
CHANGED
|
@@ -173,7 +173,7 @@ var PopoverInner = /*#__PURE__*/function (_React$Component) {
|
|
|
173
173
|
return;
|
|
174
174
|
}
|
|
175
175
|
|
|
176
|
-
if (!anchor || anchor === target || target instanceof Node &&
|
|
176
|
+
if (!anchor || anchor === target || target instanceof Node && anchor.contains(target)) {
|
|
177
177
|
return;
|
|
178
178
|
}
|
|
179
179
|
|
|
@@ -206,7 +206,7 @@ var PopoverInner = /*#__PURE__*/function (_React$Component) {
|
|
|
206
206
|
if (process.env.NODE_ENV !== "production") {
|
|
207
207
|
if (!this.anchorRef.current) {
|
|
208
208
|
// eslint-disable-next-line no-console
|
|
209
|
-
console.warn("[baseui][Popover] ref has not been passed to the Popper's anchor element.\n See how to pass the ref to an anchor element in the Popover example\n
|
|
209
|
+
console.warn("[baseui][Popover] ref has not been passed to the Popper's anchor element.\n See how to pass the ref to an anchor element in the Popover example\n https://baseweb.design/components/popover/#anchor-ref-handling-example");
|
|
210
210
|
}
|
|
211
211
|
}
|
|
212
212
|
}
|
|
@@ -24,7 +24,7 @@ export default (function () {
|
|
|
24
24
|
bannerActionHighPositive: themePrimitives.positive600,
|
|
25
25
|
bannerActionHighWarning: themePrimitives.warning600,
|
|
26
26
|
// Buttons
|
|
27
|
-
buttonPrimaryFill: themePrimitives.
|
|
27
|
+
buttonPrimaryFill: themePrimitives.primaryA,
|
|
28
28
|
buttonPrimaryText: themePrimitives.black,
|
|
29
29
|
buttonPrimaryHover: themePrimitives.primary100,
|
|
30
30
|
buttonPrimaryActive: themePrimitives.primary200,
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import type { PropsWithChildren } from 'react';
|
|
1
2
|
import type { Override } from '../helpers/overrides';
|
|
2
3
|
export declare type HeaderNavigationOverrides = {
|
|
3
4
|
Root?: Override;
|
|
4
5
|
};
|
|
5
|
-
export declare type HeaderNavigationProps = {
|
|
6
|
+
export declare type HeaderNavigationProps = PropsWithChildren<{
|
|
6
7
|
overrides: HeaderNavigationOverrides;
|
|
7
|
-
}
|
|
8
|
+
}>;
|
|
@@ -5,6 +5,7 @@ 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
|
+
import * as React from 'react';
|
|
8
9
|
import type { OverrideT } from '../helpers/overrides.js';
|
|
9
10
|
|
|
10
11
|
export type OverridesT = {
|
|
@@ -13,6 +14,7 @@ export type OverridesT = {
|
|
|
13
14
|
|
|
14
15
|
export type PropsT = {
|
|
15
16
|
overrides: OverridesT,
|
|
17
|
+
children?: React.Node,
|
|
16
18
|
};
|
|
17
19
|
|
|
18
20
|
declare var __DEV__: boolean;
|
package/input/base-input.js
CHANGED
|
@@ -327,14 +327,11 @@ var BaseInput = /*#__PURE__*/function (_React$Component) {
|
|
|
327
327
|
}, {
|
|
328
328
|
key: "render",
|
|
329
329
|
value: function render() {
|
|
330
|
-
var _this$
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
InputOverride = _this$props3$override.Input,
|
|
336
|
-
BeforeOverride = _this$props3$override.Before,
|
|
337
|
-
AfterOverride = _this$props3$override.After; // more here https://developer.mozilla.org/en-US/docs/Web/Security/Securing_your_site/Turning_off_form_autocompletion#Preventing_autofilling_with_autocompletenew-password
|
|
330
|
+
var _this$props$overrides = this.props.overrides,
|
|
331
|
+
InputContainerOverride = _this$props$overrides.InputContainer,
|
|
332
|
+
InputOverride = _this$props$overrides.Input,
|
|
333
|
+
BeforeOverride = _this$props$overrides.Before,
|
|
334
|
+
AfterOverride = _this$props$overrides.After; // more here https://developer.mozilla.org/en-US/docs/Web/Security/Securing_your_site/Turning_off_form_autocompletion#Preventing_autofilling_with_autocompletenew-password
|
|
338
335
|
|
|
339
336
|
var autoComplete = this.state.initialType === 'password' && this.props.autoComplete === BaseInput.defaultProps.autoComplete ? 'new-password' : this.props.autoComplete;
|
|
340
337
|
var sharedProps = (0, _utils.getSharedProps)(this.props, this.state);
|
|
@@ -396,7 +393,7 @@ var BaseInput = /*#__PURE__*/function (_React$Component) {
|
|
|
396
393
|
max: this.props.max,
|
|
397
394
|
step: this.props.step,
|
|
398
395
|
rows: this.props.type === _constants.CUSTOM_INPUT_TYPE.textarea ? this.props.rows : null
|
|
399
|
-
}, sharedProps, inputProps)
|
|
396
|
+
}, sharedProps, inputProps)), this.renderClear(), this.renderMaskToggle(), /*#__PURE__*/React.createElement(After, _extends({}, sharedProps, afterProps)));
|
|
400
397
|
}
|
|
401
398
|
}]);
|
|
402
399
|
|
package/layer/tether.js
CHANGED
|
@@ -139,7 +139,7 @@ var Tether = /*#__PURE__*/function (_React$Component) {
|
|
|
139
139
|
if (!this.props.anchorRef) {
|
|
140
140
|
if (process.env.NODE_ENV !== "production") {
|
|
141
141
|
// eslint-disable-next-line no-console
|
|
142
|
-
console.warn("[baseui][TetherBehavior] ref has not been passed to the Popper's anchor element.\n See how to pass the ref to an anchor element in the Popover example\n
|
|
142
|
+
console.warn("[baseui][TetherBehavior] ref has not been passed to the Popper's anchor element.\n See how to pass the ref to an anchor element in the Popover example\n https://baseweb.design/components/popover/#anchor-ref-handling-example");
|
|
143
143
|
}
|
|
144
144
|
} else {
|
|
145
145
|
this.initializePopper();
|
package/layer/tether.js.flow
CHANGED
|
@@ -67,7 +67,7 @@ class Tether extends React.Component<TetherPropsT, TetherStateT> {
|
|
|
67
67
|
console.warn(
|
|
68
68
|
`[baseui][TetherBehavior] ref has not been passed to the Popper's anchor element.
|
|
69
69
|
See how to pass the ref to an anchor element in the Popover example
|
|
70
|
-
|
|
70
|
+
https://baseweb.design/components/popover/#anchor-ref-handling-example`
|
|
71
71
|
);
|
|
72
72
|
}
|
|
73
73
|
} else {
|
package/layout-grid/types.d.ts
CHANGED
|
@@ -26,7 +26,7 @@ export declare type GridProps = {
|
|
|
26
26
|
/** Grid container behavior beyond max width. Fluid will continue to expand. Fixed will limit grid container to max width and center the container horizontally within parent element. */
|
|
27
27
|
behavior?: Behavior;
|
|
28
28
|
/** Children should be Cells. */
|
|
29
|
-
children: React.
|
|
29
|
+
children: React.ReactNode;
|
|
30
30
|
/** Gap on either side of grid container at each breakpoint. */
|
|
31
31
|
gridMargins?: Responsive<number>;
|
|
32
32
|
/** Maximum width of the grid container. Does not include Margins. Only applies when `behavior` is `fluid`. */
|
package/package.json
CHANGED
package/popover/popover.js
CHANGED
|
@@ -188,7 +188,7 @@ var PopoverInner = /*#__PURE__*/function (_React$Component) {
|
|
|
188
188
|
return;
|
|
189
189
|
}
|
|
190
190
|
|
|
191
|
-
if (!anchor || anchor === target || target instanceof Node &&
|
|
191
|
+
if (!anchor || anchor === target || target instanceof Node && anchor.contains(target)) {
|
|
192
192
|
return;
|
|
193
193
|
}
|
|
194
194
|
|
|
@@ -221,7 +221,7 @@ var PopoverInner = /*#__PURE__*/function (_React$Component) {
|
|
|
221
221
|
if (process.env.NODE_ENV !== "production") {
|
|
222
222
|
if (!this.anchorRef.current) {
|
|
223
223
|
// eslint-disable-next-line no-console
|
|
224
|
-
console.warn("[baseui][Popover] ref has not been passed to the Popper's anchor element.\n See how to pass the ref to an anchor element in the Popover example\n
|
|
224
|
+
console.warn("[baseui][Popover] ref has not been passed to the Popper's anchor element.\n See how to pass the ref to an anchor element in the Popover example\n https://baseweb.design/components/popover/#anchor-ref-handling-example");
|
|
225
225
|
}
|
|
226
226
|
}
|
|
227
227
|
}
|
package/popover/popover.js.flow
CHANGED
|
@@ -79,7 +79,7 @@ class PopoverInner extends React.Component<PopoverPropsT, PopoverPrivateStateT>
|
|
|
79
79
|
console.warn(
|
|
80
80
|
`[baseui][Popover] ref has not been passed to the Popper's anchor element.
|
|
81
81
|
See how to pass the ref to an anchor element in the Popover example
|
|
82
|
-
|
|
82
|
+
https://baseweb.design/components/popover/#anchor-ref-handling-example`
|
|
83
83
|
);
|
|
84
84
|
}
|
|
85
85
|
}
|
|
@@ -115,7 +115,7 @@ class PopoverInner extends React.Component<PopoverPropsT, PopoverPrivateStateT>
|
|
|
115
115
|
isAnimating: false,
|
|
116
116
|
arrowOffset: { left: 0, top: 0 },
|
|
117
117
|
popoverOffset: { left: 0, top: 0 },
|
|
118
|
-
placement: props.placement,
|
|
118
|
+
placement: props.placement || PLACEMENT.auto,
|
|
119
119
|
isMounted: false,
|
|
120
120
|
isLayerMounted: false,
|
|
121
121
|
autoFocusAfterPositioning: false,
|
|
@@ -328,7 +328,7 @@ class PopoverInner extends React.Component<PopoverPropsT, PopoverPrivateStateT>
|
|
|
328
328
|
|
|
329
329
|
getSharedProps(): $Diff<SharedStylePropsArgT, { children?: React.Node }> {
|
|
330
330
|
const { isOpen, showArrow, popoverMargin = POPOVER_MARGIN } = this.props;
|
|
331
|
-
const { isAnimating, arrowOffset, popoverOffset, placement } = this.state;
|
|
331
|
+
const { isAnimating, arrowOffset, popoverOffset, placement = PLACEMENT.auto } = this.state;
|
|
332
332
|
return {
|
|
333
333
|
$showArrow: !!showArrow,
|
|
334
334
|
$arrowOffset: arrowOffset,
|
package/popover/types.d.ts
CHANGED
|
@@ -61,7 +61,7 @@ export declare type BasePopoverProps = {
|
|
|
61
61
|
onMouseLeaveDelay?: number;
|
|
62
62
|
overrides?: PopoverOverrides;
|
|
63
63
|
/** How to position the popover relative to the target. */
|
|
64
|
-
placement
|
|
64
|
+
placement?: TetherPlacement;
|
|
65
65
|
/** Popper options override
|
|
66
66
|
* https://github.com/popperjs/popper.js/blob/v1.x/docs/_includes/popper-documentation.md
|
|
67
67
|
*/
|
|
@@ -75,7 +75,7 @@ export declare type BasePopoverProps = {
|
|
|
75
75
|
/** Whether or not to show the arrow pointing from the popover to the trigger. */
|
|
76
76
|
showArrow?: boolean;
|
|
77
77
|
/** Whether to toggle the popover when trigger is clicked or hovered. */
|
|
78
|
-
triggerType
|
|
78
|
+
triggerType?: TriggerType;
|
|
79
79
|
/** Margin of the popover */
|
|
80
80
|
popoverMargin?: number;
|
|
81
81
|
};
|
|
@@ -101,9 +101,9 @@ export declare type StatefulPopoverProps = BasePopoverProps & {
|
|
|
101
101
|
/** Content to render within the popover when it's shown. */
|
|
102
102
|
content: React.ReactNode | StatefulContentRenderProp;
|
|
103
103
|
/** Whether to hide the popover when the user clicks anywhere outside the trigger/popover. */
|
|
104
|
-
dismissOnClickOutside
|
|
104
|
+
dismissOnClickOutside?: boolean;
|
|
105
105
|
/** Whether to hide the popover when the user presses the escape key. */
|
|
106
|
-
dismissOnEsc
|
|
106
|
+
dismissOnEsc?: boolean;
|
|
107
107
|
/** Initial state populated into the component */
|
|
108
108
|
initialState?: State;
|
|
109
109
|
/** Event handler when popover is hidden. */
|
package/popover/types.js.flow
CHANGED
|
@@ -86,7 +86,7 @@ export type BasePopoverPropsT = {
|
|
|
86
86
|
onMouseLeaveDelay?: number,
|
|
87
87
|
overrides?: OverridesT,
|
|
88
88
|
/** How to position the popover relative to the target. */
|
|
89
|
-
placement
|
|
89
|
+
placement?: TetherPlacementT,
|
|
90
90
|
/** Popper options override
|
|
91
91
|
* https://github.com/popperjs/popper.js/blob/v1.x/docs/_includes/popper-documentation.md
|
|
92
92
|
*/
|
|
@@ -101,7 +101,7 @@ export type BasePopoverPropsT = {
|
|
|
101
101
|
/** Whether or not to show the arrow pointing from the popover to the trigger. */
|
|
102
102
|
showArrow?: boolean,
|
|
103
103
|
/** Whether to toggle the popover when trigger is clicked or hovered. */
|
|
104
|
-
triggerType
|
|
104
|
+
triggerType?: TriggerTypeT,
|
|
105
105
|
/** Margin of the popover */
|
|
106
106
|
popoverMargin?: number,
|
|
107
107
|
};
|
|
@@ -131,9 +131,9 @@ export type StatefulPopoverPropsT = BasePopoverPropsT & {
|
|
|
131
131
|
/** Content to render within the popover when it's shown. */
|
|
132
132
|
content: React.Node | StatefulContentRenderPropT,
|
|
133
133
|
/** Whether to hide the popover when the user clicks anywhere outside the trigger/popover. */
|
|
134
|
-
dismissOnClickOutside
|
|
134
|
+
dismissOnClickOutside?: boolean,
|
|
135
135
|
/** Whether to hide the popover when the user presses the escape key. */
|
|
136
|
-
dismissOnEsc
|
|
136
|
+
dismissOnEsc?: boolean,
|
|
137
137
|
/** Initial state populated into the component */
|
|
138
138
|
initialState?: StateT,
|
|
139
139
|
/** Event handler when popover is hidden. */
|
|
@@ -36,7 +36,7 @@ class Skeleton extends React.Component<SkeletonPropsT> {
|
|
|
36
36
|
<Row
|
|
37
37
|
$animation={this.props.animation}
|
|
38
38
|
key={index}
|
|
39
|
-
$isLastRow={index === this.props.rows - 1}
|
|
39
|
+
$isLastRow={index === (typeof this.props.rows !== 'undefined' ? this.props.rows : 0) - 1}
|
|
40
40
|
{...rowProps}
|
|
41
41
|
></Row>
|
|
42
42
|
))}
|
package/skeleton/types.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export declare type SkeletonOverrides = {
|
|
|
6
6
|
export declare type SkeletonProps = {
|
|
7
7
|
overrides?: SkeletonOverrides;
|
|
8
8
|
/** Defines the number of row element in a skeleton */
|
|
9
|
-
rows
|
|
9
|
+
rows?: number;
|
|
10
10
|
/** Defines if the skeleton has an animation default is false*/
|
|
11
11
|
animation: boolean;
|
|
12
12
|
/** Defines the height of the skeleton container*/
|
package/skeleton/types.js.flow
CHANGED
|
@@ -16,7 +16,7 @@ export type OverridesT = {
|
|
|
16
16
|
export type SkeletonPropsT = {
|
|
17
17
|
overrides?: OverridesT,
|
|
18
18
|
/** Defines the number of row element in a skeleton */
|
|
19
|
-
rows
|
|
19
|
+
rows?: number,
|
|
20
20
|
/** Defines if the skeleton has an animation default is false*/
|
|
21
21
|
animation: boolean,
|
|
22
22
|
/** Defines the height of the skeleton container*/
|
|
@@ -34,7 +34,7 @@ var _default = function _default() {
|
|
|
34
34
|
bannerActionHighPositive: themePrimitives.positive600,
|
|
35
35
|
bannerActionHighWarning: themePrimitives.warning600,
|
|
36
36
|
// Buttons
|
|
37
|
-
buttonPrimaryFill: themePrimitives.
|
|
37
|
+
buttonPrimaryFill: themePrimitives.primaryA,
|
|
38
38
|
buttonPrimaryText: themePrimitives.black,
|
|
39
39
|
buttonPrimaryHover: themePrimitives.primary100,
|
|
40
40
|
buttonPrimaryActive: themePrimitives.primary200,
|
|
@@ -26,7 +26,7 @@ export default (themePrimitives: ColorTokensT = colorTokens): ComponentColorToke
|
|
|
26
26
|
bannerActionHighWarning: themePrimitives.warning600,
|
|
27
27
|
|
|
28
28
|
// Buttons
|
|
29
|
-
buttonPrimaryFill: themePrimitives.
|
|
29
|
+
buttonPrimaryFill: themePrimitives.primaryA,
|
|
30
30
|
buttonPrimaryText: themePrimitives.black,
|
|
31
31
|
buttonPrimaryHover: themePrimitives.primary100,
|
|
32
32
|
buttonPrimaryActive: themePrimitives.primary200,
|
package/themes/types.d.ts
CHANGED
|
@@ -78,17 +78,17 @@ export declare type CoreSemanticColorTokens = {
|
|
|
78
78
|
contentInverseSecondary: string;
|
|
79
79
|
contentInverseTertiary: string;
|
|
80
80
|
borderOpaque: string;
|
|
81
|
-
borderTransparent
|
|
81
|
+
borderTransparent?: string;
|
|
82
82
|
borderSelected: string;
|
|
83
83
|
borderInverseOpaque: string;
|
|
84
|
-
borderInverseTransparent
|
|
84
|
+
borderInverseTransparent?: string;
|
|
85
85
|
borderInverseSelected: string;
|
|
86
86
|
};
|
|
87
87
|
export declare type CoreExtensionSemanticColorTokens = {
|
|
88
88
|
backgroundStateDisabled: string;
|
|
89
|
-
backgroundOverlayDark
|
|
90
|
-
backgroundOverlayLight
|
|
91
|
-
backgroundOverlayArt
|
|
89
|
+
backgroundOverlayDark?: string;
|
|
90
|
+
backgroundOverlayLight?: string;
|
|
91
|
+
backgroundOverlayArt?: string;
|
|
92
92
|
backgroundAccent: string;
|
|
93
93
|
backgroundNegative: string;
|
|
94
94
|
backgroundWarning: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { Override } from '../helpers/overrides';
|
|
2
|
-
import type { ComponentType } from 'react';
|
|
3
|
-
declare const TreeLabelInteractable: ComponentType<{
|
|
2
|
+
import type { ComponentType, PropsWithChildren } from 'react';
|
|
3
|
+
declare const TreeLabelInteractable: PropsWithChildren<ComponentType<{
|
|
4
4
|
overrides?: {
|
|
5
5
|
LabelInteractable: Override;
|
|
6
6
|
};
|
|
7
|
-
}
|
|
7
|
+
}>>;
|
|
8
8
|
export default TreeLabelInteractable;
|
|
@@ -12,6 +12,8 @@ import type { OverrideT } from '../helpers/overrides.js';
|
|
|
12
12
|
|
|
13
13
|
const TreeLabelInteractable: React$ComponentType<{
|
|
14
14
|
overrides?: { LabelInteractable: OverrideT },
|
|
15
|
+
/** Content to be rendered in the TreeLabelInteractable. */
|
|
16
|
+
children?: React$Node,
|
|
15
17
|
}> = ({ overrides = {}, ...props }) => {
|
|
16
18
|
const LabelInteractable = getOverride(overrides.LabelInteractable) || StyledLabelInteractable;
|
|
17
19
|
return (
|