@instructure/ui-breadcrumb 8.33.2-snapshot-0 → 8.33.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/CHANGELOG.md +3 -5
- package/es/Breadcrumb/BreadcrumbLink/BreadcrumbLinkLocator.js +2 -1
- package/es/Breadcrumb/BreadcrumbLink/index.js +6 -10
- package/es/Breadcrumb/BreadcrumbLink/props.js +1 -0
- package/es/Breadcrumb/BreadcrumbLocator.js +2 -1
- package/es/Breadcrumb/index.js +2 -12
- package/es/Breadcrumb/props.js +1 -0
- package/es/Breadcrumb/styles.js +0 -1
- package/es/Breadcrumb/theme.js +3 -3
- package/lib/Breadcrumb/BreadcrumbLink/BreadcrumbLinkLocator.js +1 -3
- package/lib/Breadcrumb/BreadcrumbLink/index.js +5 -17
- package/lib/Breadcrumb/BreadcrumbLink/locator.js +0 -2
- package/lib/Breadcrumb/BreadcrumbLink/props.js +1 -3
- package/lib/Breadcrumb/BreadcrumbLocator.js +1 -4
- package/lib/Breadcrumb/index.js +2 -25
- package/lib/Breadcrumb/locator.js +0 -2
- package/lib/Breadcrumb/props.js +1 -6
- package/lib/Breadcrumb/styles.js +0 -2
- package/lib/Breadcrumb/theme.js +3 -4
- package/lib/index.js +0 -1
- package/package.json +15 -15
- package/src/Breadcrumb/BreadcrumbLink/props.ts +14 -5
- package/tsconfig.build.tsbuildinfo +1 -1
- package/types/Breadcrumb/BreadcrumbLink/index.d.ts +0 -14
- package/types/Breadcrumb/BreadcrumbLink/index.d.ts.map +1 -1
- package/types/Breadcrumb/BreadcrumbLink/props.d.ts +3 -4
- package/types/Breadcrumb/BreadcrumbLink/props.d.ts.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,13 +3,11 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
-
## [8.33.2
|
|
7
|
-
|
|
8
|
-
**Note:** Version bump only for package @instructure/ui-breadcrumb
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
## [8.33.2](https://github.com/instructure/instructure-ui/compare/v8.33.1...v8.33.2) (2023-01-25)
|
|
11
7
|
|
|
8
|
+
### Bug Fixes
|
|
12
9
|
|
|
10
|
+
- **ui-breadcrumb:** fix prop typing for `Breadcrumb.Link` ([9093c3e](https://github.com/instructure/instructure-ui/commit/9093c3e216144519e63a4d4ea189312ac9422111))
|
|
13
11
|
|
|
14
12
|
## [8.33.1](https://github.com/instructure/instructure-ui/compare/v8.33.0...v8.33.1) (2023-01-06)
|
|
15
13
|
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
24
|
import { locator } from '@instructure/ui-test-locator';
|
|
25
|
-
import { BreadcrumbLink } from './index';
|
|
25
|
+
import { BreadcrumbLink } from './index';
|
|
26
26
|
|
|
27
|
+
// @ts-expect-error ts-migrate(2339) FIXME: Property 'selector' does not exist on type 'typeof... Remove this comment to see the full error message
|
|
27
28
|
export const BreadcrumbLinkLocator = locator(BreadcrumbLink.selector);
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
var _dec, _class, _class2;
|
|
2
|
-
|
|
3
2
|
/*
|
|
4
3
|
* The MIT License (MIT)
|
|
5
4
|
*
|
|
@@ -23,13 +22,13 @@ var _dec, _class, _class2;
|
|
|
23
22
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
24
23
|
* SOFTWARE.
|
|
25
24
|
*/
|
|
25
|
+
|
|
26
26
|
import React, { Component } from 'react';
|
|
27
27
|
import { TruncateText } from '@instructure/ui-truncate-text';
|
|
28
28
|
import { Link } from '@instructure/ui-link';
|
|
29
29
|
import { omitProps } from '@instructure/ui-react-utils';
|
|
30
30
|
import { testable } from '@instructure/ui-testable';
|
|
31
31
|
import { propTypes, allowedProps } from './props';
|
|
32
|
-
|
|
33
32
|
/**
|
|
34
33
|
---
|
|
35
34
|
parent: Breadcrumb
|
|
@@ -41,19 +40,17 @@ let BreadcrumbLink = (_dec = testable(), _dec(_class = (_class2 = class Breadcru
|
|
|
41
40
|
constructor() {
|
|
42
41
|
super(...arguments);
|
|
43
42
|
this.ref = null;
|
|
44
|
-
|
|
45
43
|
this.handleRef = el => {
|
|
46
44
|
this.ref = el;
|
|
47
45
|
};
|
|
48
46
|
}
|
|
49
|
-
|
|
50
47
|
render() {
|
|
51
48
|
const _this$props = this.props,
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
49
|
+
children = _this$props.children,
|
|
50
|
+
href = _this$props.href,
|
|
51
|
+
renderIcon = _this$props.renderIcon,
|
|
52
|
+
iconPlacement = _this$props.iconPlacement,
|
|
53
|
+
onClick = _this$props.onClick;
|
|
57
54
|
const props = omitProps(this.props, BreadcrumbLink.allowedProps);
|
|
58
55
|
return /*#__PURE__*/React.createElement(Link, Object.assign({}, props, {
|
|
59
56
|
href: href,
|
|
@@ -64,7 +61,6 @@ let BreadcrumbLink = (_dec = testable(), _dec(_class = (_class2 = class Breadcru
|
|
|
64
61
|
elementRef: this.handleRef
|
|
65
62
|
}), /*#__PURE__*/React.createElement(TruncateText, null, children));
|
|
66
63
|
}
|
|
67
|
-
|
|
68
64
|
}, _class2.displayName = "BreadcrumbLink", _class2.componentId = 'Breadcrumb.Link', _class2.propTypes = propTypes, _class2.allowedProps = allowedProps, _class2.defaultProps = {}, _class2)) || _class);
|
|
69
65
|
export default BreadcrumbLink;
|
|
70
66
|
export { BreadcrumbLink };
|
|
@@ -24,8 +24,9 @@
|
|
|
24
24
|
import { locator } from '@instructure/ui-test-locator';
|
|
25
25
|
import { Breadcrumb } from './index';
|
|
26
26
|
import { BreadcrumbLinkLocator } from './BreadcrumbLink/BreadcrumbLinkLocator';
|
|
27
|
-
export { BreadcrumbLinkLocator };
|
|
27
|
+
export { BreadcrumbLinkLocator };
|
|
28
28
|
|
|
29
|
+
// @ts-expect-error ts-migrate(2339) FIXME: Property 'selector' does not exist on type 'typeof... Remove this comment to see the full error message
|
|
29
30
|
export const BreadcrumbLocator = locator(Breadcrumb.selector, {
|
|
30
31
|
findAllLinks: function () {
|
|
31
32
|
return BreadcrumbLinkLocator.findAll(...arguments);
|
package/es/Breadcrumb/index.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
var _dec, _dec2, _class, _class2;
|
|
2
|
-
|
|
3
2
|
/*
|
|
4
3
|
* The MIT License (MIT)
|
|
5
4
|
*
|
|
@@ -34,7 +33,6 @@ import { BreadcrumbLink } from './BreadcrumbLink';
|
|
|
34
33
|
import generateStyle from './styles';
|
|
35
34
|
import generateComponentTheme from './theme';
|
|
36
35
|
import { propTypes, allowedProps } from './props';
|
|
37
|
-
|
|
38
36
|
/**
|
|
39
37
|
---
|
|
40
38
|
category: components
|
|
@@ -45,28 +43,22 @@ let Breadcrumb = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2
|
|
|
45
43
|
constructor() {
|
|
46
44
|
super(...arguments);
|
|
47
45
|
this.ref = null;
|
|
48
|
-
|
|
49
46
|
this.handleRef = el => {
|
|
50
47
|
this.ref = el;
|
|
51
48
|
};
|
|
52
49
|
}
|
|
53
|
-
|
|
54
50
|
componentDidMount() {
|
|
55
51
|
var _this$props$makeStyle, _this$props;
|
|
56
|
-
|
|
57
52
|
(_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props);
|
|
58
53
|
}
|
|
59
|
-
|
|
60
54
|
componentDidUpdate() {
|
|
61
55
|
var _this$props$makeStyle2, _this$props2;
|
|
62
|
-
|
|
63
56
|
(_this$props$makeStyle2 = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props2);
|
|
64
57
|
}
|
|
65
|
-
|
|
66
58
|
renderChildren() {
|
|
67
59
|
const _this$props3 = this.props,
|
|
68
|
-
|
|
69
|
-
|
|
60
|
+
styles = _this$props3.styles,
|
|
61
|
+
children = _this$props3.children;
|
|
70
62
|
const numChildren = React.Children.count(children);
|
|
71
63
|
const inlineStyle = {
|
|
72
64
|
maxWidth: `${Math.floor(100 / numChildren)}%`
|
|
@@ -81,7 +73,6 @@ let Breadcrumb = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2
|
|
|
81
73
|
}));
|
|
82
74
|
});
|
|
83
75
|
}
|
|
84
|
-
|
|
85
76
|
render() {
|
|
86
77
|
const styles = this.props.styles;
|
|
87
78
|
return jsx(View, {
|
|
@@ -94,7 +85,6 @@ let Breadcrumb = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2
|
|
|
94
85
|
css: styles === null || styles === void 0 ? void 0 : styles.breadcrumb
|
|
95
86
|
}, this.renderChildren()));
|
|
96
87
|
}
|
|
97
|
-
|
|
98
88
|
}, _class2.displayName = "Breadcrumb", _class2.componentId = 'Breadcrumb', _class2.propTypes = propTypes, _class2.allowedProps = allowedProps, _class2.defaultProps = {
|
|
99
89
|
size: 'medium',
|
|
100
90
|
children: null
|
package/es/Breadcrumb/props.js
CHANGED
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
|
+
|
|
24
25
|
import PropTypes from 'prop-types';
|
|
25
26
|
import { Children } from '@instructure/ui-prop-types';
|
|
26
27
|
import { ThemeablePropTypes } from '@instructure/emotion';
|
package/es/Breadcrumb/styles.js
CHANGED
package/es/Breadcrumb/theme.js
CHANGED
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
*/
|
|
30
30
|
const generateComponentTheme = theme => {
|
|
31
31
|
const colors = theme.colors,
|
|
32
|
-
|
|
32
|
+
typography = theme.typography;
|
|
33
33
|
const componentVariables = {
|
|
34
34
|
fontFamily: typography === null || typography === void 0 ? void 0 : typography.fontFamily,
|
|
35
35
|
separatorColor: colors === null || colors === void 0 ? void 0 : colors.borderDark,
|
|
@@ -40,8 +40,8 @@ const generateComponentTheme = theme => {
|
|
|
40
40
|
largeSeparatorFontSize: '1rem',
|
|
41
41
|
largeFontSize: typography === null || typography === void 0 ? void 0 : typography.fontSizeLarge
|
|
42
42
|
};
|
|
43
|
-
return {
|
|
43
|
+
return {
|
|
44
|
+
...componentVariables
|
|
44
45
|
};
|
|
45
46
|
};
|
|
46
|
-
|
|
47
47
|
export default generateComponentTheme;
|
|
@@ -4,11 +4,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.BreadcrumbLinkLocator = void 0;
|
|
7
|
-
|
|
8
7
|
var _locator = require("@instructure/ui-test-locator/lib/utils/locator.js");
|
|
9
|
-
|
|
10
8
|
var _index = require("./index");
|
|
11
|
-
|
|
12
9
|
/*
|
|
13
10
|
* The MIT License (MIT)
|
|
14
11
|
*
|
|
@@ -32,6 +29,7 @@ var _index = require("./index");
|
|
|
32
29
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
33
30
|
* SOFTWARE.
|
|
34
31
|
*/
|
|
32
|
+
|
|
35
33
|
// @ts-expect-error ts-migrate(2339) FIXME: Property 'selector' does not exist on type 'typeof... Remove this comment to see the full error message
|
|
36
34
|
const BreadcrumbLinkLocator = (0, _locator.locator)(_index.BreadcrumbLink.selector);
|
|
37
35
|
exports.BreadcrumbLinkLocator = BreadcrumbLinkLocator;
|
|
@@ -1,26 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = exports.BreadcrumbLink = void 0;
|
|
9
|
-
|
|
10
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
|
|
12
9
|
var _TruncateText = require("@instructure/ui-truncate-text/lib/TruncateText");
|
|
13
|
-
|
|
14
10
|
var _Link = require("@instructure/ui-link/lib/Link");
|
|
15
|
-
|
|
16
11
|
var _omitProps = require("@instructure/ui-react-utils/lib/omitProps.js");
|
|
17
|
-
|
|
18
12
|
var _testable = require("@instructure/ui-testable/lib/testable.js");
|
|
19
|
-
|
|
20
13
|
var _props = require("./props");
|
|
21
|
-
|
|
22
14
|
var _dec, _class, _class2;
|
|
23
|
-
|
|
24
15
|
/**
|
|
25
16
|
---
|
|
26
17
|
parent: Breadcrumb
|
|
@@ -32,19 +23,17 @@ let BreadcrumbLink = (_dec = (0, _testable.testable)(), _dec(_class = (_class2 =
|
|
|
32
23
|
constructor() {
|
|
33
24
|
super(...arguments);
|
|
34
25
|
this.ref = null;
|
|
35
|
-
|
|
36
26
|
this.handleRef = el => {
|
|
37
27
|
this.ref = el;
|
|
38
28
|
};
|
|
39
29
|
}
|
|
40
|
-
|
|
41
30
|
render() {
|
|
42
31
|
const _this$props = this.props,
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
32
|
+
children = _this$props.children,
|
|
33
|
+
href = _this$props.href,
|
|
34
|
+
renderIcon = _this$props.renderIcon,
|
|
35
|
+
iconPlacement = _this$props.iconPlacement,
|
|
36
|
+
onClick = _this$props.onClick;
|
|
48
37
|
const props = (0, _omitProps.omitProps)(this.props, BreadcrumbLink.allowedProps);
|
|
49
38
|
return /*#__PURE__*/_react.default.createElement(_Link.Link, Object.assign({}, props, {
|
|
50
39
|
href: href,
|
|
@@ -55,7 +44,6 @@ let BreadcrumbLink = (_dec = (0, _testable.testable)(), _dec(_class = (_class2 =
|
|
|
55
44
|
elementRef: this.handleRef
|
|
56
45
|
}), /*#__PURE__*/_react.default.createElement(_TruncateText.TruncateText, null, children));
|
|
57
46
|
}
|
|
58
|
-
|
|
59
47
|
}, _class2.displayName = "BreadcrumbLink", _class2.componentId = 'Breadcrumb.Link', _class2.propTypes = _props.propTypes, _class2.allowedProps = _props.allowedProps, _class2.defaultProps = {}, _class2)) || _class);
|
|
60
48
|
exports.BreadcrumbLink = BreadcrumbLink;
|
|
61
49
|
var _default = BreadcrumbLink;
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.propTypes = exports.allowedProps = void 0;
|
|
9
|
-
|
|
10
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
|
|
12
9
|
/*
|
|
13
10
|
* The MIT License (MIT)
|
|
14
11
|
*
|
|
@@ -32,6 +29,7 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
32
29
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
33
30
|
* SOFTWARE.
|
|
34
31
|
*/
|
|
32
|
+
|
|
35
33
|
const propTypes = {
|
|
36
34
|
children: _propTypes.default.node.isRequired,
|
|
37
35
|
href: _propTypes.default.string,
|
|
@@ -10,13 +10,9 @@ Object.defineProperty(exports, "BreadcrumbLinkLocator", {
|
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
12
|
exports.BreadcrumbLocator = void 0;
|
|
13
|
-
|
|
14
13
|
var _locator = require("@instructure/ui-test-locator/lib/utils/locator.js");
|
|
15
|
-
|
|
16
14
|
var _index = require("./index");
|
|
17
|
-
|
|
18
15
|
var _BreadcrumbLinkLocator = require("./BreadcrumbLink/BreadcrumbLinkLocator");
|
|
19
|
-
|
|
20
16
|
/*
|
|
21
17
|
* The MIT License (MIT)
|
|
22
18
|
*
|
|
@@ -40,6 +36,7 @@ var _BreadcrumbLinkLocator = require("./BreadcrumbLink/BreadcrumbLinkLocator");
|
|
|
40
36
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
41
37
|
* SOFTWARE.
|
|
42
38
|
*/
|
|
39
|
+
|
|
43
40
|
// @ts-expect-error ts-migrate(2339) FIXME: Property 'selector' does not exist on type 'typeof... Remove this comment to see the full error message
|
|
44
41
|
const BreadcrumbLocator = (0, _locator.locator)(_index.Breadcrumb.selector, {
|
|
45
42
|
findAllLinks: function () {
|
package/lib/Breadcrumb/index.js
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
-
|
|
5
4
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
6
|
-
|
|
7
5
|
Object.defineProperty(exports, "__esModule", {
|
|
8
6
|
value: true
|
|
9
7
|
});
|
|
@@ -15,27 +13,16 @@ Object.defineProperty(exports, "BreadcrumbLink", {
|
|
|
15
13
|
}
|
|
16
14
|
});
|
|
17
15
|
exports.default = void 0;
|
|
18
|
-
|
|
19
16
|
var _react = _interopRequireWildcard(require("react"));
|
|
20
|
-
|
|
21
17
|
var _View = require("@instructure/ui-view/lib/View");
|
|
22
|
-
|
|
23
18
|
var _testable = require("@instructure/ui-testable/lib/testable.js");
|
|
24
|
-
|
|
25
19
|
var _emotion = require("@instructure/emotion");
|
|
26
|
-
|
|
27
20
|
var _IconArrowOpenEndSolid = require("@instructure/ui-icons/lib/IconArrowOpenEndSolid.js");
|
|
28
|
-
|
|
29
21
|
var _BreadcrumbLink = require("./BreadcrumbLink");
|
|
30
|
-
|
|
31
22
|
var _styles = _interopRequireDefault(require("./styles"));
|
|
32
|
-
|
|
33
23
|
var _theme = _interopRequireDefault(require("./theme"));
|
|
34
|
-
|
|
35
24
|
var _props = require("./props");
|
|
36
|
-
|
|
37
25
|
var _dec, _dec2, _class, _class2;
|
|
38
|
-
|
|
39
26
|
/**
|
|
40
27
|
---
|
|
41
28
|
category: components
|
|
@@ -46,31 +33,23 @@ let Breadcrumb = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default
|
|
|
46
33
|
constructor() {
|
|
47
34
|
super(...arguments);
|
|
48
35
|
this.ref = null;
|
|
49
|
-
|
|
50
36
|
this.handleRef = el => {
|
|
51
37
|
this.ref = el;
|
|
52
38
|
};
|
|
53
39
|
}
|
|
54
|
-
|
|
55
40
|
componentDidMount() {
|
|
56
41
|
var _this$props$makeStyle, _this$props;
|
|
57
|
-
|
|
58
42
|
(_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props);
|
|
59
43
|
}
|
|
60
|
-
|
|
61
44
|
componentDidUpdate() {
|
|
62
45
|
var _this$props$makeStyle2, _this$props2;
|
|
63
|
-
|
|
64
46
|
(_this$props$makeStyle2 = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props2);
|
|
65
47
|
}
|
|
66
|
-
|
|
67
48
|
renderChildren() {
|
|
68
49
|
const _this$props3 = this.props,
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
50
|
+
styles = _this$props3.styles,
|
|
51
|
+
children = _this$props3.children;
|
|
72
52
|
const numChildren = _react.default.Children.count(children);
|
|
73
|
-
|
|
74
53
|
const inlineStyle = {
|
|
75
54
|
maxWidth: `${Math.floor(100 / numChildren)}%`
|
|
76
55
|
};
|
|
@@ -84,7 +63,6 @@ let Breadcrumb = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default
|
|
|
84
63
|
}));
|
|
85
64
|
});
|
|
86
65
|
}
|
|
87
|
-
|
|
88
66
|
render() {
|
|
89
67
|
const styles = this.props.styles;
|
|
90
68
|
return (0, _emotion.jsx)(_View.View, {
|
|
@@ -97,7 +75,6 @@ let Breadcrumb = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default
|
|
|
97
75
|
css: styles === null || styles === void 0 ? void 0 : styles.breadcrumb
|
|
98
76
|
}, this.renderChildren()));
|
|
99
77
|
}
|
|
100
|
-
|
|
101
78
|
}, _class2.displayName = "Breadcrumb", _class2.componentId = 'Breadcrumb', _class2.propTypes = _props.propTypes, _class2.allowedProps = _props.allowedProps, _class2.defaultProps = {
|
|
102
79
|
size: 'medium',
|
|
103
80
|
children: null
|
package/lib/Breadcrumb/props.js
CHANGED
|
@@ -1,20 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.propTypes = exports.allowedProps = void 0;
|
|
9
|
-
|
|
10
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
|
|
12
9
|
var _Children = require("@instructure/ui-prop-types/lib/Children.js");
|
|
13
|
-
|
|
14
10
|
var _emotion = require("@instructure/emotion");
|
|
15
|
-
|
|
16
11
|
var _BreadcrumbLink = require("./BreadcrumbLink");
|
|
17
|
-
|
|
18
12
|
/*
|
|
19
13
|
* The MIT License (MIT)
|
|
20
14
|
*
|
|
@@ -38,6 +32,7 @@ var _BreadcrumbLink = require("./BreadcrumbLink");
|
|
|
38
32
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
39
33
|
* SOFTWARE.
|
|
40
34
|
*/
|
|
35
|
+
|
|
41
36
|
const propTypes = {
|
|
42
37
|
children: _Children.Children.oneOf([_BreadcrumbLink.BreadcrumbLink]),
|
|
43
38
|
label: _propTypes.default.string.isRequired,
|
package/lib/Breadcrumb/styles.js
CHANGED
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
/*
|
|
9
8
|
* The MIT License (MIT)
|
|
10
9
|
*
|
|
@@ -108,6 +107,5 @@ const generateStyle = (componentTheme, props) => {
|
|
|
108
107
|
}
|
|
109
108
|
};
|
|
110
109
|
};
|
|
111
|
-
|
|
112
110
|
var _default = generateStyle;
|
|
113
111
|
exports.default = _default;
|
package/lib/Breadcrumb/theme.js
CHANGED
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
/*
|
|
9
8
|
* The MIT License (MIT)
|
|
10
9
|
*
|
|
@@ -36,7 +35,7 @@ exports.default = void 0;
|
|
|
36
35
|
*/
|
|
37
36
|
const generateComponentTheme = theme => {
|
|
38
37
|
const colors = theme.colors,
|
|
39
|
-
|
|
38
|
+
typography = theme.typography;
|
|
40
39
|
const componentVariables = {
|
|
41
40
|
fontFamily: typography === null || typography === void 0 ? void 0 : typography.fontFamily,
|
|
42
41
|
separatorColor: colors === null || colors === void 0 ? void 0 : colors.borderDark,
|
|
@@ -47,9 +46,9 @@ const generateComponentTheme = theme => {
|
|
|
47
46
|
largeSeparatorFontSize: '1rem',
|
|
48
47
|
largeFontSize: typography === null || typography === void 0 ? void 0 : typography.fontSizeLarge
|
|
49
48
|
};
|
|
50
|
-
return {
|
|
49
|
+
return {
|
|
50
|
+
...componentVariables
|
|
51
51
|
};
|
|
52
52
|
};
|
|
53
|
-
|
|
54
53
|
var _default = generateComponentTheme;
|
|
55
54
|
exports.default = _default;
|
package/lib/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-breadcrumb",
|
|
3
|
-
"version": "8.33.2
|
|
3
|
+
"version": "8.33.2",
|
|
4
4
|
"description": "A breadcrumb component",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"module": "./es/index.js",
|
|
@@ -23,23 +23,23 @@
|
|
|
23
23
|
},
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@instructure/ui-babel-preset": "8.33.2
|
|
27
|
-
"@instructure/ui-test-locator": "8.33.2
|
|
28
|
-
"@instructure/ui-test-utils": "8.33.2
|
|
29
|
-
"@instructure/ui-themes": "8.33.2
|
|
26
|
+
"@instructure/ui-babel-preset": "8.33.2",
|
|
27
|
+
"@instructure/ui-test-locator": "8.33.2",
|
|
28
|
+
"@instructure/ui-test-utils": "8.33.2",
|
|
29
|
+
"@instructure/ui-themes": "8.33.2"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@babel/runtime": "^7.13.10",
|
|
33
|
-
"@instructure/emotion": "8.33.2
|
|
34
|
-
"@instructure/shared-types": "8.33.2
|
|
35
|
-
"@instructure/ui-icons": "8.33.2
|
|
36
|
-
"@instructure/ui-link": "8.33.2
|
|
37
|
-
"@instructure/ui-prop-types": "8.33.2
|
|
38
|
-
"@instructure/ui-react-utils": "8.33.2
|
|
39
|
-
"@instructure/ui-testable": "8.33.2
|
|
40
|
-
"@instructure/ui-truncate-text": "8.33.2
|
|
41
|
-
"@instructure/ui-utils": "8.33.2
|
|
42
|
-
"@instructure/ui-view": "8.33.2
|
|
33
|
+
"@instructure/emotion": "8.33.2",
|
|
34
|
+
"@instructure/shared-types": "8.33.2",
|
|
35
|
+
"@instructure/ui-icons": "8.33.2",
|
|
36
|
+
"@instructure/ui-link": "8.33.2",
|
|
37
|
+
"@instructure/ui-prop-types": "8.33.2",
|
|
38
|
+
"@instructure/ui-react-utils": "8.33.2",
|
|
39
|
+
"@instructure/ui-testable": "8.33.2",
|
|
40
|
+
"@instructure/ui-truncate-text": "8.33.2",
|
|
41
|
+
"@instructure/ui-utils": "8.33.2",
|
|
42
|
+
"@instructure/ui-view": "8.33.2",
|
|
43
43
|
"prop-types": "^15"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
@@ -26,11 +26,13 @@ import React from 'react'
|
|
|
26
26
|
import PropTypes from 'prop-types'
|
|
27
27
|
|
|
28
28
|
import type {
|
|
29
|
+
PickPropsWithExceptions,
|
|
29
30
|
OtherHTMLAttributes,
|
|
30
31
|
PropValidators,
|
|
31
32
|
Renderable
|
|
32
33
|
} from '@instructure/shared-types'
|
|
33
34
|
import type { ViewOwnProps } from '@instructure/ui-view'
|
|
35
|
+
import type { LinkProps } from '@instructure/ui-link'
|
|
34
36
|
|
|
35
37
|
type BreadcrumbLinkOwnProps = {
|
|
36
38
|
/**
|
|
@@ -63,11 +65,18 @@ type PropKeys = keyof BreadcrumbLinkOwnProps
|
|
|
63
65
|
|
|
64
66
|
type AllowedPropKeys = Readonly<Array<PropKeys>>
|
|
65
67
|
|
|
66
|
-
type BreadcrumbLinkProps =
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
68
|
+
type BreadcrumbLinkProps = PickPropsWithExceptions<
|
|
69
|
+
LinkProps,
|
|
70
|
+
| 'children'
|
|
71
|
+
| 'href'
|
|
72
|
+
| 'onClick'
|
|
73
|
+
| 'renderIcon'
|
|
74
|
+
| 'iconPlacement'
|
|
75
|
+
| 'isWithinText'
|
|
76
|
+
| 'elementRef'
|
|
77
|
+
> &
|
|
78
|
+
BreadcrumbLinkOwnProps &
|
|
79
|
+
OtherHTMLAttributes<BreadcrumbLinkOwnProps & LinkProps>
|
|
71
80
|
|
|
72
81
|
const propTypes: PropValidators<PropKeys> = {
|
|
73
82
|
children: PropTypes.node.isRequired,
|