@khanacademy/wonder-blocks-breadcrumbs 3.1.0 → 3.1.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 +23 -0
- package/dist/index.js +15 -8
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# @khanacademy/wonder-blocks-breadcrumbs
|
|
2
2
|
|
|
3
|
+
## 3.1.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [ed26d66]
|
|
8
|
+
- Updated dependencies [5655b9f]
|
|
9
|
+
- Updated dependencies [5655b9f]
|
|
10
|
+
- Updated dependencies [8f53293]
|
|
11
|
+
- Updated dependencies [051f0f8]
|
|
12
|
+
- Updated dependencies [e1b78db]
|
|
13
|
+
- Updated dependencies [051f0f8]
|
|
14
|
+
- @khanacademy/wonder-blocks-core@12.2.0
|
|
15
|
+
- @khanacademy/wonder-blocks-tokens@5.0.0
|
|
16
|
+
|
|
17
|
+
## 3.1.1
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- ee8d95a: Rollback rollup version from v4 to v2 to prevent an issue with CJS builds in unit tests
|
|
22
|
+
- Updated dependencies [ee8d95a]
|
|
23
|
+
- @khanacademy/wonder-blocks-core@12.1.1
|
|
24
|
+
- @khanacademy/wonder-blocks-tokens@4.2.1
|
|
25
|
+
|
|
3
26
|
## 3.1.0
|
|
4
27
|
|
|
5
28
|
### Minor Changes
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
3
5
|
var _extends = require('@babel/runtime/helpers/extends');
|
|
4
6
|
var _objectWithoutPropertiesLoose = require('@babel/runtime/helpers/objectWithoutPropertiesLoose');
|
|
5
7
|
var React = require('react');
|
|
@@ -7,7 +9,10 @@ var aphrodite = require('aphrodite');
|
|
|
7
9
|
var wonderBlocksCore = require('@khanacademy/wonder-blocks-core');
|
|
8
10
|
var wonderBlocksTokens = require('@khanacademy/wonder-blocks-tokens');
|
|
9
11
|
|
|
10
|
-
function
|
|
12
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
13
|
+
|
|
14
|
+
function _interopNamespace(e) {
|
|
15
|
+
if (e && e.__esModule) return e;
|
|
11
16
|
var n = Object.create(null);
|
|
12
17
|
if (e) {
|
|
13
18
|
Object.keys(e).forEach(function (k) {
|
|
@@ -20,11 +25,13 @@ function _interopNamespaceDefault(e) {
|
|
|
20
25
|
}
|
|
21
26
|
});
|
|
22
27
|
}
|
|
23
|
-
n
|
|
28
|
+
n["default"] = e;
|
|
24
29
|
return Object.freeze(n);
|
|
25
30
|
}
|
|
26
31
|
|
|
27
|
-
var
|
|
32
|
+
var _extends__default = /*#__PURE__*/_interopDefaultLegacy(_extends);
|
|
33
|
+
var _objectWithoutPropertiesLoose__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutPropertiesLoose);
|
|
34
|
+
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
28
35
|
|
|
29
36
|
const _excluded$1 = ["aria-label", "children", "testId"];
|
|
30
37
|
const StyledOl = wonderBlocksCore.addStyle("ol");
|
|
@@ -34,9 +41,9 @@ const Breadcrumbs = React__namespace.forwardRef(function Breadcrumbs(props, ref)
|
|
|
34
41
|
children,
|
|
35
42
|
testId
|
|
36
43
|
} = props,
|
|
37
|
-
otherProps =
|
|
44
|
+
otherProps = _objectWithoutPropertiesLoose__default["default"](props, _excluded$1);
|
|
38
45
|
const lastChildIndex = React__namespace.Children.count(children) - 1;
|
|
39
|
-
return React__namespace.createElement("nav",
|
|
46
|
+
return React__namespace.createElement("nav", _extends__default["default"]({}, otherProps, {
|
|
40
47
|
"aria-label": ariaLabel,
|
|
41
48
|
"data-testid": testId,
|
|
42
49
|
ref: ref
|
|
@@ -44,7 +51,7 @@ const Breadcrumbs = React__namespace.forwardRef(function Breadcrumbs(props, ref)
|
|
|
44
51
|
style: styles$1.container
|
|
45
52
|
}, React__namespace.Children.map(children, (item, index) => {
|
|
46
53
|
const isLastChild = index === lastChildIndex;
|
|
47
|
-
return React__namespace.cloneElement(item,
|
|
54
|
+
return React__namespace.cloneElement(item, _extends__default["default"]({}, item.props, {
|
|
48
55
|
showSeparator: !isLastChild,
|
|
49
56
|
["aria-current"]: isLastChild ? "page" : undefined
|
|
50
57
|
}));
|
|
@@ -69,7 +76,7 @@ const BreadcrumbsItem = React__namespace.forwardRef(function BreadcrumbsItem(pro
|
|
|
69
76
|
showSeparator,
|
|
70
77
|
testId
|
|
71
78
|
} = props,
|
|
72
|
-
otherProps =
|
|
79
|
+
otherProps = _objectWithoutPropertiesLoose__default["default"](props, _excluded);
|
|
73
80
|
const _renderSeparator = () => {
|
|
74
81
|
return React__namespace.createElement(StyledSvg, {
|
|
75
82
|
style: styles.separator,
|
|
@@ -83,7 +90,7 @@ const BreadcrumbsItem = React__namespace.forwardRef(function BreadcrumbsItem(pro
|
|
|
83
90
|
r: "1.5"
|
|
84
91
|
}));
|
|
85
92
|
};
|
|
86
|
-
return React__namespace.createElement(StyledLi,
|
|
93
|
+
return React__namespace.createElement(StyledLi, _extends__default["default"]({}, otherProps, {
|
|
87
94
|
style: styles.item,
|
|
88
95
|
"data-testid": testId,
|
|
89
96
|
ref: ref
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@khanacademy/wonder-blocks-breadcrumbs",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.2",
|
|
4
4
|
"design": "v1",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -13,15 +13,15 @@
|
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"dependencies": {
|
|
15
15
|
"@babel/runtime": "^7.24.5",
|
|
16
|
-
"@khanacademy/wonder-blocks-core": "12.
|
|
17
|
-
"@khanacademy/wonder-blocks-tokens": "
|
|
16
|
+
"@khanacademy/wonder-blocks-core": "12.2.0",
|
|
17
|
+
"@khanacademy/wonder-blocks-tokens": "5.0.0"
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
20
20
|
"aphrodite": "^1.2.5",
|
|
21
21
|
"react": "18.2.0"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@khanacademy/wb-dev-build-settings": "2.1.
|
|
24
|
+
"@khanacademy/wb-dev-build-settings": "2.1.1"
|
|
25
25
|
},
|
|
26
26
|
"scripts": {
|
|
27
27
|
"test": "echo \"Error: no test specified\" && exit 1"
|