@zendeskgarden/react-breadcrumbs 8.62.1 → 8.63.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/dist/index.cjs.js +15 -21
- package/dist/index.esm.js +3 -6
- package/package.json +3 -3
package/dist/index.cjs.js
CHANGED
|
@@ -7,15 +7,13 @@
|
|
|
7
7
|
|
|
8
8
|
'use strict';
|
|
9
9
|
|
|
10
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
11
|
-
|
|
12
10
|
var React = require('react');
|
|
13
11
|
var containerBreadcrumb = require('@zendeskgarden/container-breadcrumb');
|
|
14
12
|
var reactTheming = require('@zendeskgarden/react-theming');
|
|
15
13
|
var styled = require('styled-components');
|
|
16
14
|
var polished = require('polished');
|
|
17
15
|
|
|
18
|
-
function
|
|
16
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
19
17
|
|
|
20
18
|
function _interopNamespace(e) {
|
|
21
19
|
if (e && e.__esModule) return e;
|
|
@@ -31,18 +29,17 @@ function _interopNamespace(e) {
|
|
|
31
29
|
}
|
|
32
30
|
});
|
|
33
31
|
}
|
|
34
|
-
n
|
|
32
|
+
n.default = e;
|
|
35
33
|
return Object.freeze(n);
|
|
36
34
|
}
|
|
37
35
|
|
|
38
36
|
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
39
|
-
var
|
|
40
|
-
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
37
|
+
var styled__default = /*#__PURE__*/_interopDefault(styled);
|
|
41
38
|
|
|
42
39
|
const COMPONENT_ID$1 = 'breadcrumbs.list';
|
|
43
|
-
const StyledBreadcrumb = styled__default
|
|
40
|
+
const StyledBreadcrumb = styled__default.default.ol.attrs({
|
|
44
41
|
'data-garden-id': COMPONENT_ID$1,
|
|
45
|
-
'data-garden-version': '8.
|
|
42
|
+
'data-garden-version': '8.63.0'
|
|
46
43
|
}).withConfig({
|
|
47
44
|
displayName: "StyledBreadcrumb",
|
|
48
45
|
componentId: "sc-11jrinn-0"
|
|
@@ -52,9 +49,7 @@ StyledBreadcrumb.defaultProps = {
|
|
|
52
49
|
};
|
|
53
50
|
|
|
54
51
|
var _path;
|
|
55
|
-
|
|
56
52
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
57
|
-
|
|
58
53
|
var SvgChevronRightStroke = function SvgChevronRightStroke(props) {
|
|
59
54
|
return /*#__PURE__*/React__namespace.createElement("svg", _extends({
|
|
60
55
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -62,8 +57,7 @@ var SvgChevronRightStroke = function SvgChevronRightStroke(props) {
|
|
|
62
57
|
height: 12,
|
|
63
58
|
focusable: "false",
|
|
64
59
|
viewBox: "0 0 12 12",
|
|
65
|
-
"aria-hidden": "true"
|
|
66
|
-
role: "img"
|
|
60
|
+
"aria-hidden": "true"
|
|
67
61
|
}, props), _path || (_path = /*#__PURE__*/React__namespace.createElement("path", {
|
|
68
62
|
fill: "currentColor",
|
|
69
63
|
d: "M3.646 10.354a.5.5 0 01-.057-.638l.057-.07L7.293 6 3.646 2.354a.5.5 0 01-.057-.638l.057-.07a.5.5 0 01.638-.057l.07.057 4 4a.5.5 0 01.057.638l-.057.07-4 4a.5.5 0 01-.708 0z"
|
|
@@ -75,9 +69,9 @@ const ValidChevronIcon = props => {
|
|
|
75
69
|
theme,
|
|
76
70
|
...validProps
|
|
77
71
|
} = props;
|
|
78
|
-
return
|
|
72
|
+
return React__namespace.default.createElement(SvgChevronRightStroke, validProps);
|
|
79
73
|
};
|
|
80
|
-
const StyledChevronIcon = styled__default
|
|
74
|
+
const StyledChevronIcon = styled__default.default(ValidChevronIcon).attrs({
|
|
81
75
|
role: 'presentation',
|
|
82
76
|
'aria-hidden': 'true'
|
|
83
77
|
}).withConfig({
|
|
@@ -104,9 +98,9 @@ const linkStyles = _ref => {
|
|
|
104
98
|
}
|
|
105
99
|
`);
|
|
106
100
|
};
|
|
107
|
-
const StyledBreadcrumbItem = styled__default
|
|
101
|
+
const StyledBreadcrumbItem = styled__default.default.li.attrs({
|
|
108
102
|
'data-garden-id': COMPONENT_ID,
|
|
109
|
-
'data-garden-version': '8.
|
|
103
|
+
'data-garden-version': '8.63.0'
|
|
110
104
|
}).withConfig({
|
|
111
105
|
displayName: "StyledBreadcrumbItem",
|
|
112
106
|
componentId: "sc-r0suq7-0"
|
|
@@ -115,7 +109,7 @@ StyledBreadcrumbItem.defaultProps = {
|
|
|
115
109
|
theme: reactTheming.DEFAULT_THEME
|
|
116
110
|
};
|
|
117
111
|
|
|
118
|
-
const StyledCenteredBreadcrumbItem = styled__default
|
|
112
|
+
const StyledCenteredBreadcrumbItem = styled__default.default(StyledBreadcrumbItem).attrs({
|
|
119
113
|
'aria-hidden': true
|
|
120
114
|
}).withConfig({
|
|
121
115
|
displayName: "StyledCenteredBreadcrumbItem",
|
|
@@ -134,19 +128,19 @@ const Breadcrumb = React.forwardRef((props, ref) => {
|
|
|
134
128
|
const mappedChildren = React.Children.map(props.children, (child, index) => {
|
|
135
129
|
const isLastItem = index === totalChildren - 1;
|
|
136
130
|
if (isLastItem) {
|
|
137
|
-
return
|
|
131
|
+
return React__namespace.default.createElement(StyledBreadcrumbItem, {
|
|
138
132
|
isCurrent: true
|
|
139
133
|
}, React.cloneElement(child, getCurrentPageProps()));
|
|
140
134
|
}
|
|
141
|
-
return
|
|
135
|
+
return React__namespace.default.createElement(React__namespace.default.Fragment, null, React__namespace.default.createElement(StyledBreadcrumbItem, null, child), React__namespace.default.createElement(StyledCenteredBreadcrumbItem, null, React__namespace.default.createElement(StyledChevronIcon, null)));
|
|
142
136
|
});
|
|
143
137
|
const ariaLabel = reactTheming.useText(Breadcrumb, props, 'aria-label', 'Breadcrumbs');
|
|
144
|
-
return
|
|
138
|
+
return React__namespace.default.createElement("nav", getContainerProps({
|
|
145
139
|
...props,
|
|
146
140
|
ref,
|
|
147
141
|
role: null,
|
|
148
142
|
'aria-label': ariaLabel
|
|
149
|
-
}),
|
|
143
|
+
}), React__namespace.default.createElement(StyledBreadcrumb, null, mappedChildren));
|
|
150
144
|
});
|
|
151
145
|
Breadcrumb.displayName = 'Breadcrumb';
|
|
152
146
|
|
package/dist/index.esm.js
CHANGED
|
@@ -15,7 +15,7 @@ import { em } from 'polished';
|
|
|
15
15
|
const COMPONENT_ID$1 = 'breadcrumbs.list';
|
|
16
16
|
const StyledBreadcrumb = styled.ol.attrs({
|
|
17
17
|
'data-garden-id': COMPONENT_ID$1,
|
|
18
|
-
'data-garden-version': '8.
|
|
18
|
+
'data-garden-version': '8.63.0'
|
|
19
19
|
}).withConfig({
|
|
20
20
|
displayName: "StyledBreadcrumb",
|
|
21
21
|
componentId: "sc-11jrinn-0"
|
|
@@ -25,9 +25,7 @@ StyledBreadcrumb.defaultProps = {
|
|
|
25
25
|
};
|
|
26
26
|
|
|
27
27
|
var _path;
|
|
28
|
-
|
|
29
28
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
30
|
-
|
|
31
29
|
var SvgChevronRightStroke = function SvgChevronRightStroke(props) {
|
|
32
30
|
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
33
31
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -35,8 +33,7 @@ var SvgChevronRightStroke = function SvgChevronRightStroke(props) {
|
|
|
35
33
|
height: 12,
|
|
36
34
|
focusable: "false",
|
|
37
35
|
viewBox: "0 0 12 12",
|
|
38
|
-
"aria-hidden": "true"
|
|
39
|
-
role: "img"
|
|
36
|
+
"aria-hidden": "true"
|
|
40
37
|
}, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
|
|
41
38
|
fill: "currentColor",
|
|
42
39
|
d: "M3.646 10.354a.5.5 0 01-.057-.638l.057-.07L7.293 6 3.646 2.354a.5.5 0 01-.057-.638l.057-.07a.5.5 0 01.638-.057l.07.057 4 4a.5.5 0 01.057.638l-.057.07-4 4a.5.5 0 01-.708 0z"
|
|
@@ -79,7 +76,7 @@ const linkStyles = _ref => {
|
|
|
79
76
|
};
|
|
80
77
|
const StyledBreadcrumbItem = styled.li.attrs({
|
|
81
78
|
'data-garden-id': COMPONENT_ID,
|
|
82
|
-
'data-garden-version': '8.
|
|
79
|
+
'data-garden-version': '8.63.0'
|
|
83
80
|
}).withConfig({
|
|
84
81
|
displayName: "StyledBreadcrumbItem",
|
|
85
82
|
componentId: "sc-r0suq7-0"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zendeskgarden/react-breadcrumbs",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.63.0",
|
|
4
4
|
"description": "Components relating to breadcrumbs in the Garden Design System",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Zendesk Garden <garden@zendesk.com>",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"styled-components": "^4.2.0 || ^5.0.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@zendeskgarden/react-theming": "^8.
|
|
35
|
+
"@zendeskgarden/react-theming": "^8.63.0",
|
|
36
36
|
"@zendeskgarden/svg-icons": "6.33.0"
|
|
37
37
|
},
|
|
38
38
|
"keywords": [
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"access": "public"
|
|
46
46
|
},
|
|
47
47
|
"zendeskgarden:src": "src/index.ts",
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "4b8715305a769881b143c7195c5b31e687422926"
|
|
49
49
|
}
|