baseui 0.0.0-next-e35e89f → 0.0.0-next-efef314
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/dnd-list/index.js.flow +2 -1
- package/es/dnd-list/index.js +2 -1
- package/es/select/select-component.js +4 -4
- package/es/tooltip/styled-components.js +8 -0
- package/esm/dnd-list/index.js +2 -1
- package/esm/select/select-component.js +4 -4
- package/esm/tooltip/styled-components.js +8 -0
- package/package.json +2 -2
- package/select/select-component.js +4 -4
- package/select/select-component.js.flow +4 -4
- package/tooltip/styled-components.js +8 -0
- package/tooltip/styled-components.js.flow +8 -0
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/es/dnd-list/index.js
CHANGED
|
@@ -4,7 +4,8 @@ Copyright (c) Uber Technologies, Inc.
|
|
|
4
4
|
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
|
+
import { arrayMove, arrayRemove } from 'react-movable';
|
|
8
|
+
export { arrayMove, arrayRemove };
|
|
8
9
|
export { default as StatefulList } from './stateful-list.js';
|
|
9
10
|
export { default as StatefulListContainer } from './stateful-list-container.js';
|
|
10
11
|
export { default as List } from './list.js'; // Constants
|
|
@@ -105,7 +105,7 @@ class Select extends React.Component {
|
|
|
105
105
|
isPseudoFocused: false
|
|
106
106
|
});
|
|
107
107
|
|
|
108
|
-
_defineProperty(this, "
|
|
108
|
+
_defineProperty(this, "isItMounted", false);
|
|
109
109
|
|
|
110
110
|
_defineProperty(this, "handleTouchOutside", event => {
|
|
111
111
|
if (containsNode(this.dropdown.current, event.target)) return;
|
|
@@ -238,7 +238,7 @@ class Select extends React.Component {
|
|
|
238
238
|
this.props.onBlur(event);
|
|
239
239
|
}
|
|
240
240
|
|
|
241
|
-
if (this.
|
|
241
|
+
if (this.isItMounted) {
|
|
242
242
|
this.setState({
|
|
243
243
|
isFocused: false,
|
|
244
244
|
isOpen: false,
|
|
@@ -565,7 +565,7 @@ class Select extends React.Component {
|
|
|
565
565
|
this.focus();
|
|
566
566
|
}
|
|
567
567
|
|
|
568
|
-
this.
|
|
568
|
+
this.isItMounted = true;
|
|
569
569
|
|
|
570
570
|
if (this.props.methodsRef) {
|
|
571
571
|
const {
|
|
@@ -601,7 +601,7 @@ class Select extends React.Component {
|
|
|
601
601
|
document.removeEventListener('click', this.handleClickOutside);
|
|
602
602
|
}
|
|
603
603
|
|
|
604
|
-
this.
|
|
604
|
+
this.isItMounted = false;
|
|
605
605
|
}
|
|
606
606
|
|
|
607
607
|
focus() {
|
|
@@ -21,6 +21,10 @@ import { getEndPosition } from '../popover/utils.js';
|
|
|
21
21
|
*/
|
|
22
22
|
export const Body = styled('div', props => ({ ...getBodyStyles(props),
|
|
23
23
|
backgroundColor: props.$theme.colors.tooltipBackground,
|
|
24
|
+
borderTopLeftRadius: props.$theme.borders.radius300,
|
|
25
|
+
borderTopRightRadius: props.$theme.borders.radius300,
|
|
26
|
+
borderBottomRightRadius: props.$theme.borders.radius300,
|
|
27
|
+
borderBottomLeftRadius: props.$theme.borders.radius300,
|
|
24
28
|
boxShadow: props.$theme.lighting.shadow400,
|
|
25
29
|
color: props.$theme.colors.tooltipText,
|
|
26
30
|
// Reset transition property to opacity only, and static transform
|
|
@@ -30,6 +34,10 @@ export const Body = styled('div', props => ({ ...getBodyStyles(props),
|
|
|
30
34
|
Body.displayName = "Body";
|
|
31
35
|
export const Inner = styled('div', props => ({ ...getInnerStyles(props),
|
|
32
36
|
backgroundColor: props.$theme.colors.tooltipBackground,
|
|
37
|
+
borderTopLeftRadius: props.$theme.borders.radius300,
|
|
38
|
+
borderTopRightRadius: props.$theme.borders.radius300,
|
|
39
|
+
borderBottomRightRadius: props.$theme.borders.radius300,
|
|
40
|
+
borderBottomLeftRadius: props.$theme.borders.radius300,
|
|
33
41
|
paddingTop: props.$theme.sizing.scale300,
|
|
34
42
|
paddingBottom: props.$theme.sizing.scale300,
|
|
35
43
|
paddingLeft: props.$theme.sizing.scale600,
|
package/esm/dnd-list/index.js
CHANGED
|
@@ -4,7 +4,8 @@ Copyright (c) Uber Technologies, Inc.
|
|
|
4
4
|
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
|
+
import { arrayMove, arrayRemove } from 'react-movable';
|
|
8
|
+
export { arrayMove, arrayRemove };
|
|
8
9
|
export { default as StatefulList } from './stateful-list.js';
|
|
9
10
|
export { default as StatefulListContainer } from './stateful-list-container.js';
|
|
10
11
|
export { default as List } from './list.js'; // Constants
|
|
@@ -159,7 +159,7 @@ var Select = /*#__PURE__*/function (_React$Component) {
|
|
|
159
159
|
isPseudoFocused: false
|
|
160
160
|
});
|
|
161
161
|
|
|
162
|
-
_defineProperty(_assertThisInitialized(_this), "
|
|
162
|
+
_defineProperty(_assertThisInitialized(_this), "isItMounted", false);
|
|
163
163
|
|
|
164
164
|
_defineProperty(_assertThisInitialized(_this), "handleTouchOutside", function (event) {
|
|
165
165
|
if (containsNode(_this.dropdown.current, event.target)) return;
|
|
@@ -307,7 +307,7 @@ var Select = /*#__PURE__*/function (_React$Component) {
|
|
|
307
307
|
_this.props.onBlur(event);
|
|
308
308
|
}
|
|
309
309
|
|
|
310
|
-
if (_this.
|
|
310
|
+
if (_this.isItMounted) {
|
|
311
311
|
_this.setState({
|
|
312
312
|
isFocused: false,
|
|
313
313
|
isOpen: false,
|
|
@@ -661,7 +661,7 @@ var Select = /*#__PURE__*/function (_React$Component) {
|
|
|
661
661
|
this.focus();
|
|
662
662
|
}
|
|
663
663
|
|
|
664
|
-
this.
|
|
664
|
+
this.isItMounted = true;
|
|
665
665
|
|
|
666
666
|
if (this.props.methodsRef) {
|
|
667
667
|
var methodsRef = this.props.methodsRef;
|
|
@@ -697,7 +697,7 @@ var Select = /*#__PURE__*/function (_React$Component) {
|
|
|
697
697
|
document.removeEventListener('click', this.handleClickOutside);
|
|
698
698
|
}
|
|
699
699
|
|
|
700
|
-
this.
|
|
700
|
+
this.isItMounted = false;
|
|
701
701
|
}
|
|
702
702
|
}, {
|
|
703
703
|
key: "focus",
|
|
@@ -28,6 +28,10 @@ import { getEndPosition } from '../popover/utils.js';
|
|
|
28
28
|
export var Body = styled('div', function (props) {
|
|
29
29
|
return _objectSpread(_objectSpread({}, getBodyStyles(props)), {}, {
|
|
30
30
|
backgroundColor: props.$theme.colors.tooltipBackground,
|
|
31
|
+
borderTopLeftRadius: props.$theme.borders.radius300,
|
|
32
|
+
borderTopRightRadius: props.$theme.borders.radius300,
|
|
33
|
+
borderBottomRightRadius: props.$theme.borders.radius300,
|
|
34
|
+
borderBottomLeftRadius: props.$theme.borders.radius300,
|
|
31
35
|
boxShadow: props.$theme.lighting.shadow400,
|
|
32
36
|
color: props.$theme.colors.tooltipText,
|
|
33
37
|
// Reset transition property to opacity only, and static transform
|
|
@@ -39,6 +43,10 @@ Body.displayName = "Body";
|
|
|
39
43
|
export var Inner = styled('div', function (props) {
|
|
40
44
|
return _objectSpread(_objectSpread(_objectSpread({}, getInnerStyles(props)), {}, {
|
|
41
45
|
backgroundColor: props.$theme.colors.tooltipBackground,
|
|
46
|
+
borderTopLeftRadius: props.$theme.borders.radius300,
|
|
47
|
+
borderTopRightRadius: props.$theme.borders.radius300,
|
|
48
|
+
borderBottomRightRadius: props.$theme.borders.radius300,
|
|
49
|
+
borderBottomLeftRadius: props.$theme.borders.radius300,
|
|
42
50
|
paddingTop: props.$theme.sizing.scale300,
|
|
43
51
|
paddingBottom: props.$theme.sizing.scale300,
|
|
44
52
|
paddingLeft: props.$theme.sizing.scale600,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "baseui",
|
|
3
|
-
"version": "0.0.0-next-
|
|
3
|
+
"version": "0.0.0-next-efef314",
|
|
4
4
|
"description": "A React Component library implementing the Base design language",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"@commitlint/config-conventional": "^8.0.0",
|
|
82
82
|
"@date-io/luxon": "^2.7.0",
|
|
83
83
|
"@date-io/moment": "^2.7.0",
|
|
84
|
-
"@ladle/react": "^0.
|
|
84
|
+
"@ladle/react": "^0.3.0",
|
|
85
85
|
"@mdx-js/tag": "^0.20.0",
|
|
86
86
|
"@octokit/rest": "^16.33.1",
|
|
87
87
|
"@svgr/cli": "^4.3.2",
|
|
@@ -180,7 +180,7 @@ var Select = /*#__PURE__*/function (_React$Component) {
|
|
|
180
180
|
isPseudoFocused: false
|
|
181
181
|
});
|
|
182
182
|
|
|
183
|
-
_defineProperty(_assertThisInitialized(_this), "
|
|
183
|
+
_defineProperty(_assertThisInitialized(_this), "isItMounted", false);
|
|
184
184
|
|
|
185
185
|
_defineProperty(_assertThisInitialized(_this), "handleTouchOutside", function (event) {
|
|
186
186
|
if (containsNode(_this.dropdown.current, event.target)) return;
|
|
@@ -328,7 +328,7 @@ var Select = /*#__PURE__*/function (_React$Component) {
|
|
|
328
328
|
_this.props.onBlur(event);
|
|
329
329
|
}
|
|
330
330
|
|
|
331
|
-
if (_this.
|
|
331
|
+
if (_this.isItMounted) {
|
|
332
332
|
_this.setState({
|
|
333
333
|
isFocused: false,
|
|
334
334
|
isOpen: false,
|
|
@@ -682,7 +682,7 @@ var Select = /*#__PURE__*/function (_React$Component) {
|
|
|
682
682
|
this.focus();
|
|
683
683
|
}
|
|
684
684
|
|
|
685
|
-
this.
|
|
685
|
+
this.isItMounted = true;
|
|
686
686
|
|
|
687
687
|
if (this.props.methodsRef) {
|
|
688
688
|
var methodsRef = this.props.methodsRef;
|
|
@@ -718,7 +718,7 @@ var Select = /*#__PURE__*/function (_React$Component) {
|
|
|
718
718
|
document.removeEventListener('click', this.handleClickOutside);
|
|
719
719
|
}
|
|
720
720
|
|
|
721
|
-
this.
|
|
721
|
+
this.isItMounted = false;
|
|
722
722
|
}
|
|
723
723
|
}, {
|
|
724
724
|
key: "focus",
|
|
@@ -117,13 +117,13 @@ class Select extends React.Component<PropsT, SelectStateT> {
|
|
|
117
117
|
isPseudoFocused: false,
|
|
118
118
|
};
|
|
119
119
|
|
|
120
|
-
|
|
120
|
+
isItMounted: boolean = false;
|
|
121
121
|
|
|
122
122
|
componentDidMount() {
|
|
123
123
|
if (this.props.autoFocus) {
|
|
124
124
|
this.focus();
|
|
125
125
|
}
|
|
126
|
-
this.
|
|
126
|
+
this.isItMounted = true;
|
|
127
127
|
|
|
128
128
|
if (this.props.methodsRef) {
|
|
129
129
|
const {methodsRef} = this.props;
|
|
@@ -157,7 +157,7 @@ class Select extends React.Component<PropsT, SelectStateT> {
|
|
|
157
157
|
document.removeEventListener('touchstart', this.handleTouchOutside);
|
|
158
158
|
document.removeEventListener('click', this.handleClickOutside);
|
|
159
159
|
}
|
|
160
|
-
this.
|
|
160
|
+
this.isItMounted = false;
|
|
161
161
|
}
|
|
162
162
|
|
|
163
163
|
focus() {
|
|
@@ -319,7 +319,7 @@ class Select extends React.Component<PropsT, SelectStateT> {
|
|
|
319
319
|
this.props.onBlur(event);
|
|
320
320
|
}
|
|
321
321
|
|
|
322
|
-
if (this.
|
|
322
|
+
if (this.isItMounted) {
|
|
323
323
|
this.setState({
|
|
324
324
|
isFocused: false,
|
|
325
325
|
isOpen: false,
|
|
@@ -31,6 +31,10 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
31
31
|
var Body = (0, _index.styled)('div', function (props) {
|
|
32
32
|
return _objectSpread(_objectSpread({}, (0, _styledComponents.getBodyStyles)(props)), {}, {
|
|
33
33
|
backgroundColor: props.$theme.colors.tooltipBackground,
|
|
34
|
+
borderTopLeftRadius: props.$theme.borders.radius300,
|
|
35
|
+
borderTopRightRadius: props.$theme.borders.radius300,
|
|
36
|
+
borderBottomRightRadius: props.$theme.borders.radius300,
|
|
37
|
+
borderBottomLeftRadius: props.$theme.borders.radius300,
|
|
34
38
|
boxShadow: props.$theme.lighting.shadow400,
|
|
35
39
|
color: props.$theme.colors.tooltipText,
|
|
36
40
|
// Reset transition property to opacity only, and static transform
|
|
@@ -43,6 +47,10 @@ Body.displayName = "Body";
|
|
|
43
47
|
var Inner = (0, _index.styled)('div', function (props) {
|
|
44
48
|
return _objectSpread(_objectSpread(_objectSpread({}, (0, _styledComponents.getInnerStyles)(props)), {}, {
|
|
45
49
|
backgroundColor: props.$theme.colors.tooltipBackground,
|
|
50
|
+
borderTopLeftRadius: props.$theme.borders.radius300,
|
|
51
|
+
borderTopRightRadius: props.$theme.borders.radius300,
|
|
52
|
+
borderBottomRightRadius: props.$theme.borders.radius300,
|
|
53
|
+
borderBottomLeftRadius: props.$theme.borders.radius300,
|
|
46
54
|
paddingTop: props.$theme.sizing.scale300,
|
|
47
55
|
paddingBottom: props.$theme.sizing.scale300,
|
|
48
56
|
paddingLeft: props.$theme.sizing.scale600,
|
|
@@ -28,6 +28,10 @@ import type {SharedStylePropsArgT} from '../popover/types.js';
|
|
|
28
28
|
export const Body = styled<SharedStylePropsArgT>('div', props => ({
|
|
29
29
|
...getBodyStyles(props),
|
|
30
30
|
backgroundColor: props.$theme.colors.tooltipBackground,
|
|
31
|
+
borderTopLeftRadius: props.$theme.borders.radius300,
|
|
32
|
+
borderTopRightRadius: props.$theme.borders.radius300,
|
|
33
|
+
borderBottomRightRadius: props.$theme.borders.radius300,
|
|
34
|
+
borderBottomLeftRadius: props.$theme.borders.radius300,
|
|
31
35
|
boxShadow: props.$theme.lighting.shadow400,
|
|
32
36
|
color: props.$theme.colors.tooltipText,
|
|
33
37
|
// Reset transition property to opacity only, and static transform
|
|
@@ -38,6 +42,10 @@ export const Body = styled<SharedStylePropsArgT>('div', props => ({
|
|
|
38
42
|
export const Inner = styled<SharedStylePropsArgT>('div', props => ({
|
|
39
43
|
...getInnerStyles(props),
|
|
40
44
|
backgroundColor: props.$theme.colors.tooltipBackground,
|
|
45
|
+
borderTopLeftRadius: props.$theme.borders.radius300,
|
|
46
|
+
borderTopRightRadius: props.$theme.borders.radius300,
|
|
47
|
+
borderBottomRightRadius: props.$theme.borders.radius300,
|
|
48
|
+
borderBottomLeftRadius: props.$theme.borders.radius300,
|
|
41
49
|
paddingTop: props.$theme.sizing.scale300,
|
|
42
50
|
paddingBottom: props.$theme.sizing.scale300,
|
|
43
51
|
paddingLeft: props.$theme.sizing.scale600,
|