@react-spectrum/breadcrumbs 3.8.2 → 3.9.1
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/import.mjs +79 -56
- package/dist/main.css +1 -1
- package/dist/main.js +78 -55
- package/dist/main.js.map +1 -1
- package/dist/module.js +79 -56
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +14 -14
- package/src/BreadcrumbItem.tsx +35 -29
- package/src/Breadcrumbs.tsx +7 -2
package/dist/import.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./main.css";
|
|
2
2
|
import {Item as $37781313afe0968e$re_export$Item} from "@react-stately/collections";
|
|
3
3
|
import {ActionButton as $koRP3$ActionButton} from "@react-spectrum/button";
|
|
4
|
-
import {useDOMRef as $koRP3$useDOMRef, useStyleProps as $koRP3$useStyleProps, classNames as $koRP3$classNames
|
|
4
|
+
import {useDOMRef as $koRP3$useDOMRef, useStyleProps as $koRP3$useStyleProps, classNames as $koRP3$classNames} from "@react-spectrum/utils";
|
|
5
5
|
import $koRP3$spectrumiconsuiFolderBreadcrumb from "@spectrum-icons/ui/FolderBreadcrumb";
|
|
6
6
|
import {MenuTrigger as $koRP3$MenuTrigger, Menu as $koRP3$Menu} from "@react-spectrum/menu";
|
|
7
7
|
import $koRP3$react, {useRef as $koRP3$useRef, useCallback as $koRP3$useCallback, Fragment as $koRP3$Fragment} from "react";
|
|
@@ -58,79 +58,94 @@ function $parcel$export(e, n, v, s) {
|
|
|
58
58
|
|
|
59
59
|
var $48e85557f3729e3d$exports = {};
|
|
60
60
|
|
|
61
|
-
$parcel$export($48e85557f3729e3d$exports, "spectrum-Breadcrumbs", () => $48e85557f3729e3d$export$8c6320d2db82081f, (v) => $48e85557f3729e3d$export$8c6320d2db82081f = v);
|
|
62
|
-
$parcel$export($48e85557f3729e3d$exports, "spectrum-Breadcrumbs-itemSeparator", () => $48e85557f3729e3d$export$f72910e36cd91d1e, (v) => $48e85557f3729e3d$export$f72910e36cd91d1e = v);
|
|
63
|
-
$parcel$export($48e85557f3729e3d$exports, "is-reversed", () => $48e85557f3729e3d$export$a4561bd665abb5db, (v) => $48e85557f3729e3d$export$a4561bd665abb5db = v);
|
|
64
|
-
$parcel$export($48e85557f3729e3d$exports, "spectrum-Breadcrumbs-item", () => $48e85557f3729e3d$export$492a5983c5fbf603, (v) => $48e85557f3729e3d$export$492a5983c5fbf603 = v);
|
|
65
|
-
$parcel$export($48e85557f3729e3d$exports, "spectrum-ActionButton", () => $48e85557f3729e3d$export$53da69f51b770d3, (v) => $48e85557f3729e3d$export$53da69f51b770d3 = v);
|
|
66
|
-
$parcel$export($48e85557f3729e3d$exports, "spectrum-Breadcrumbs-itemLink", () => $48e85557f3729e3d$export$5af6a1bcd207d9f6, (v) => $48e85557f3729e3d$export$5af6a1bcd207d9f6 = v);
|
|
67
|
-
$parcel$export($48e85557f3729e3d$exports, "is-hovered", () => $48e85557f3729e3d$export$b8813cd5d7824ce7, (v) => $48e85557f3729e3d$export$b8813cd5d7824ce7 = v);
|
|
68
61
|
$parcel$export($48e85557f3729e3d$exports, "focus-ring", () => $48e85557f3729e3d$export$f39a09f249340e2a, (v) => $48e85557f3729e3d$export$f39a09f249340e2a = v);
|
|
62
|
+
$parcel$export($48e85557f3729e3d$exports, "i18nFontFamily", () => $48e85557f3729e3d$export$8c4ee2c50c22c514, (v) => $48e85557f3729e3d$export$8c4ee2c50c22c514 = v);
|
|
63
|
+
$parcel$export($48e85557f3729e3d$exports, "is-disabled", () => $48e85557f3729e3d$export$d35bc1e505d1ebbf, (v) => $48e85557f3729e3d$export$d35bc1e505d1ebbf = v);
|
|
69
64
|
$parcel$export($48e85557f3729e3d$exports, "is-dragged", () => $48e85557f3729e3d$export$8778c911bed6c759, (v) => $48e85557f3729e3d$export$8778c911bed6c759 = v);
|
|
70
|
-
$parcel$export($48e85557f3729e3d$exports, "
|
|
65
|
+
$parcel$export($48e85557f3729e3d$exports, "is-hovered", () => $48e85557f3729e3d$export$b8813cd5d7824ce7, (v) => $48e85557f3729e3d$export$b8813cd5d7824ce7 = v);
|
|
66
|
+
$parcel$export($48e85557f3729e3d$exports, "is-reversed", () => $48e85557f3729e3d$export$a4561bd665abb5db, (v) => $48e85557f3729e3d$export$a4561bd665abb5db = v);
|
|
67
|
+
$parcel$export($48e85557f3729e3d$exports, "is-selected", () => $48e85557f3729e3d$export$1e0fb04f31d3c22a, (v) => $48e85557f3729e3d$export$1e0fb04f31d3c22a = v);
|
|
68
|
+
$parcel$export($48e85557f3729e3d$exports, "spectrum-Breadcrumb", () => $48e85557f3729e3d$export$45a5316056cfac3c, (v) => $48e85557f3729e3d$export$45a5316056cfac3c = v);
|
|
69
|
+
$parcel$export($48e85557f3729e3d$exports, "spectrum-Breadcrumbs", () => $48e85557f3729e3d$export$8c6320d2db82081f, (v) => $48e85557f3729e3d$export$8c6320d2db82081f = v);
|
|
71
70
|
$parcel$export($48e85557f3729e3d$exports, "spectrum-Breadcrumbs--medium", () => $48e85557f3729e3d$export$19f957201d941895, (v) => $48e85557f3729e3d$export$19f957201d941895 = v);
|
|
72
71
|
$parcel$export($48e85557f3729e3d$exports, "spectrum-Breadcrumbs--multiline", () => $48e85557f3729e3d$export$713961e8e432825b, (v) => $48e85557f3729e3d$export$713961e8e432825b = v);
|
|
72
|
+
$parcel$export($48e85557f3729e3d$exports, "spectrum-Breadcrumbs--small", () => $48e85557f3729e3d$export$e01337e7944312f6, (v) => $48e85557f3729e3d$export$e01337e7944312f6 = v);
|
|
73
|
+
$parcel$export($48e85557f3729e3d$exports, "spectrum-Breadcrumbs-actionButton", () => $48e85557f3729e3d$export$9753a085493f5648, (v) => $48e85557f3729e3d$export$9753a085493f5648 = v);
|
|
74
|
+
$parcel$export($48e85557f3729e3d$exports, "spectrum-Breadcrumbs-item", () => $48e85557f3729e3d$export$492a5983c5fbf603, (v) => $48e85557f3729e3d$export$492a5983c5fbf603 = v);
|
|
75
|
+
$parcel$export($48e85557f3729e3d$exports, "spectrum-Breadcrumbs-itemLink", () => $48e85557f3729e3d$export$5af6a1bcd207d9f6, (v) => $48e85557f3729e3d$export$5af6a1bcd207d9f6 = v);
|
|
76
|
+
$parcel$export($48e85557f3729e3d$exports, "spectrum-Breadcrumbs-itemSeparator", () => $48e85557f3729e3d$export$f72910e36cd91d1e, (v) => $48e85557f3729e3d$export$f72910e36cd91d1e = v);
|
|
77
|
+
$parcel$export($48e85557f3729e3d$exports, "spectrum-FocusRing-ring", () => $48e85557f3729e3d$export$4109102f950813a6, (v) => $48e85557f3729e3d$export$4109102f950813a6 = v);
|
|
78
|
+
$parcel$export($48e85557f3729e3d$exports, "spectrum-FocusRing", () => $48e85557f3729e3d$export$24c7f46a6e3605dd, (v) => $48e85557f3729e3d$export$24c7f46a6e3605dd = v);
|
|
79
|
+
$parcel$export($48e85557f3729e3d$exports, "spectrum-FocusRing--quiet", () => $48e85557f3729e3d$export$2927016961429360, (v) => $48e85557f3729e3d$export$2927016961429360 = v);
|
|
73
80
|
$parcel$export($48e85557f3729e3d$exports, "spectrum-Heading--pageTitle", () => $48e85557f3729e3d$export$63e9e087a73f808b, (v) => $48e85557f3729e3d$export$63e9e087a73f808b = v);
|
|
74
|
-
$parcel$export($48e85557f3729e3d$exports, "is-disabled", () => $48e85557f3729e3d$export$d35bc1e505d1ebbf, (v) => $48e85557f3729e3d$export$d35bc1e505d1ebbf = v);
|
|
75
|
-
$parcel$export($48e85557f3729e3d$exports, "is-selected", () => $48e85557f3729e3d$export$1e0fb04f31d3c22a, (v) => $48e85557f3729e3d$export$1e0fb04f31d3c22a = v);
|
|
76
|
-
$parcel$export($48e85557f3729e3d$exports, "spectrum-Breadcrumb", () => $48e85557f3729e3d$export$45a5316056cfac3c, (v) => $48e85557f3729e3d$export$45a5316056cfac3c = v);
|
|
77
|
-
var $48e85557f3729e3d$export$8c6320d2db82081f;
|
|
78
|
-
var $48e85557f3729e3d$export$f72910e36cd91d1e;
|
|
79
|
-
var $48e85557f3729e3d$export$a4561bd665abb5db;
|
|
80
|
-
var $48e85557f3729e3d$export$492a5983c5fbf603;
|
|
81
|
-
var $48e85557f3729e3d$export$53da69f51b770d3;
|
|
82
|
-
var $48e85557f3729e3d$export$5af6a1bcd207d9f6;
|
|
83
|
-
var $48e85557f3729e3d$export$b8813cd5d7824ce7;
|
|
84
81
|
var $48e85557f3729e3d$export$f39a09f249340e2a;
|
|
82
|
+
var $48e85557f3729e3d$export$8c4ee2c50c22c514;
|
|
83
|
+
var $48e85557f3729e3d$export$d35bc1e505d1ebbf;
|
|
85
84
|
var $48e85557f3729e3d$export$8778c911bed6c759;
|
|
86
|
-
var $48e85557f3729e3d$export$
|
|
85
|
+
var $48e85557f3729e3d$export$b8813cd5d7824ce7;
|
|
86
|
+
var $48e85557f3729e3d$export$a4561bd665abb5db;
|
|
87
|
+
var $48e85557f3729e3d$export$1e0fb04f31d3c22a;
|
|
88
|
+
var $48e85557f3729e3d$export$45a5316056cfac3c;
|
|
89
|
+
var $48e85557f3729e3d$export$8c6320d2db82081f;
|
|
87
90
|
var $48e85557f3729e3d$export$19f957201d941895;
|
|
88
91
|
var $48e85557f3729e3d$export$713961e8e432825b;
|
|
92
|
+
var $48e85557f3729e3d$export$e01337e7944312f6;
|
|
93
|
+
var $48e85557f3729e3d$export$9753a085493f5648;
|
|
94
|
+
var $48e85557f3729e3d$export$492a5983c5fbf603;
|
|
95
|
+
var $48e85557f3729e3d$export$5af6a1bcd207d9f6;
|
|
96
|
+
var $48e85557f3729e3d$export$f72910e36cd91d1e;
|
|
97
|
+
var $48e85557f3729e3d$export$4109102f950813a6;
|
|
98
|
+
var $48e85557f3729e3d$export$24c7f46a6e3605dd;
|
|
99
|
+
var $48e85557f3729e3d$export$2927016961429360;
|
|
89
100
|
var $48e85557f3729e3d$export$63e9e087a73f808b;
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
$48e85557f3729e3d$export$
|
|
94
|
-
$48e85557f3729e3d$export$
|
|
95
|
-
$48e85557f3729e3d$export$a4561bd665abb5db =
|
|
96
|
-
$48e85557f3729e3d$export$
|
|
97
|
-
$48e85557f3729e3d$export$
|
|
98
|
-
$48e85557f3729e3d$export$
|
|
99
|
-
$48e85557f3729e3d$export$
|
|
100
|
-
$48e85557f3729e3d$export$
|
|
101
|
-
$48e85557f3729e3d$export$
|
|
102
|
-
$48e85557f3729e3d$export$
|
|
103
|
-
$48e85557f3729e3d$export$
|
|
104
|
-
$48e85557f3729e3d$export$
|
|
105
|
-
$48e85557f3729e3d$export$
|
|
106
|
-
$48e85557f3729e3d$export$
|
|
107
|
-
$48e85557f3729e3d$export$
|
|
108
|
-
$48e85557f3729e3d$export$
|
|
101
|
+
$48e85557f3729e3d$export$f39a09f249340e2a = `_1gDPVa_focus-ring`;
|
|
102
|
+
$48e85557f3729e3d$export$8c4ee2c50c22c514 = `_1gDPVa_i18nFontFamily`;
|
|
103
|
+
$48e85557f3729e3d$export$d35bc1e505d1ebbf = `_1gDPVa_is-disabled`;
|
|
104
|
+
$48e85557f3729e3d$export$8778c911bed6c759 = `_1gDPVa_is-dragged`;
|
|
105
|
+
$48e85557f3729e3d$export$b8813cd5d7824ce7 = `_1gDPVa_is-hovered`;
|
|
106
|
+
$48e85557f3729e3d$export$a4561bd665abb5db = `_1gDPVa_is-reversed`;
|
|
107
|
+
$48e85557f3729e3d$export$1e0fb04f31d3c22a = `_1gDPVa_is-selected`;
|
|
108
|
+
$48e85557f3729e3d$export$45a5316056cfac3c = `_1gDPVa_spectrum-Breadcrumb`;
|
|
109
|
+
$48e85557f3729e3d$export$8c6320d2db82081f = `_1gDPVa_spectrum-Breadcrumbs`;
|
|
110
|
+
$48e85557f3729e3d$export$19f957201d941895 = `_1gDPVa_spectrum-Breadcrumbs--medium`;
|
|
111
|
+
$48e85557f3729e3d$export$713961e8e432825b = `_1gDPVa_spectrum-Breadcrumbs--multiline`;
|
|
112
|
+
$48e85557f3729e3d$export$e01337e7944312f6 = `_1gDPVa_spectrum-Breadcrumbs--small`;
|
|
113
|
+
$48e85557f3729e3d$export$9753a085493f5648 = `_1gDPVa_spectrum-Breadcrumbs-actionButton`;
|
|
114
|
+
$48e85557f3729e3d$export$492a5983c5fbf603 = `_1gDPVa_spectrum-Breadcrumbs-item`;
|
|
115
|
+
$48e85557f3729e3d$export$5af6a1bcd207d9f6 = `_1gDPVa_spectrum-Breadcrumbs-itemLink`;
|
|
116
|
+
$48e85557f3729e3d$export$f72910e36cd91d1e = `_1gDPVa_spectrum-Breadcrumbs-itemSeparator`;
|
|
117
|
+
$48e85557f3729e3d$export$4109102f950813a6 = `_1gDPVa_spectrum-FocusRing-ring`;
|
|
118
|
+
$48e85557f3729e3d$export$24c7f46a6e3605dd = `_1gDPVa_spectrum-FocusRing ${$48e85557f3729e3d$export$4109102f950813a6}`;
|
|
119
|
+
$48e85557f3729e3d$export$2927016961429360 = `_1gDPVa_spectrum-FocusRing--quiet`;
|
|
120
|
+
$48e85557f3729e3d$export$63e9e087a73f808b = `_1gDPVa_spectrum-Heading--pageTitle`;
|
|
109
121
|
|
|
110
122
|
|
|
111
123
|
|
|
112
124
|
|
|
113
125
|
|
|
114
126
|
function $2bfa2c84c665c457$export$c13f210c706eb549(props) {
|
|
115
|
-
let { children: children
|
|
116
|
-
let { direction: direction
|
|
127
|
+
let { children: children, isCurrent: isCurrent, isDisabled: isDisabled, isMenu: isMenu } = props;
|
|
128
|
+
let { direction: direction } = (0, $koRP3$useLocale)();
|
|
117
129
|
let ref = (0, $koRP3$useRef)(null);
|
|
118
|
-
let
|
|
130
|
+
let ElementType = props.href ? "a" : "span";
|
|
131
|
+
let { itemProps: itemProps } = (0, $koRP3$useBreadcrumbItem)({
|
|
119
132
|
...props,
|
|
120
|
-
elementType:
|
|
133
|
+
elementType: ElementType
|
|
121
134
|
}, ref);
|
|
122
|
-
let { hoverProps: hoverProps
|
|
123
|
-
|
|
135
|
+
let { hoverProps: hoverProps, isHovered: isHovered } = (0, $koRP3$useHover)(props);
|
|
136
|
+
// If this item contains a menu button, then it shouldn't be a link.
|
|
137
|
+
if (isMenu) itemProps = {};
|
|
138
|
+
return /*#__PURE__*/ (0, $koRP3$react).createElement((0, $koRP3$Fragment), null, /*#__PURE__*/ (0, $koRP3$react).createElement((0, $koRP3$FocusRing), {
|
|
139
|
+
focusRingClass: (0, $koRP3$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($48e85557f3729e3d$exports))), "focus-ring")
|
|
140
|
+
}, /*#__PURE__*/ (0, $koRP3$react).createElement(ElementType, {
|
|
124
141
|
...(0, $koRP3$mergeProps)(itemProps, hoverProps),
|
|
125
142
|
ref: ref,
|
|
126
|
-
className: (0, $koRP3$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($48e85557f3729e3d$exports))),
|
|
143
|
+
className: (0, $koRP3$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($48e85557f3729e3d$exports))), {
|
|
144
|
+
"spectrum-Breadcrumbs-itemLink": !isMenu,
|
|
127
145
|
"is-disabled": !isCurrent && isDisabled,
|
|
128
146
|
"is-hovered": isHovered
|
|
129
147
|
})
|
|
130
|
-
})
|
|
131
|
-
return /*#__PURE__*/ (0, $koRP3$react).createElement((0, $koRP3$Fragment), null, /*#__PURE__*/ (0, $koRP3$react).createElement((0, $koRP3$FocusRing), {
|
|
132
|
-
focusRingClass: (0, $koRP3$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($48e85557f3729e3d$exports))), "focus-ring")
|
|
133
|
-
}, element), isCurrent === false && /*#__PURE__*/ (0, $koRP3$react).createElement((0, $koRP3$spectrumiconsuiChevronRightSmall), {
|
|
148
|
+
}, children)), /*#__PURE__*/ (0, $koRP3$react).createElement((0, $koRP3$spectrumiconsuiChevronRightSmall), {
|
|
134
149
|
UNSAFE_className: (0, $koRP3$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($48e85557f3729e3d$exports))), "spectrum-Breadcrumbs-itemSeparator", {
|
|
135
150
|
"is-reversed": direction === "rtl"
|
|
136
151
|
})
|
|
@@ -150,17 +165,22 @@ const $2adaf67aabd3300b$var$MIN_VISIBLE_ITEMS = 1;
|
|
|
150
165
|
const $2adaf67aabd3300b$var$MAX_VISIBLE_ITEMS = 4;
|
|
151
166
|
function $2adaf67aabd3300b$var$Breadcrumbs(props, ref) {
|
|
152
167
|
props = (0, $koRP3$useProviderProps)(props);
|
|
153
|
-
let { size: size = "L"
|
|
168
|
+
let { size: size = "L", isMultiline: isMultiline, children: children, showRoot: showRoot, isDisabled: isDisabled, onAction: onAction, autoFocusCurrent: autoFocusCurrent, ...otherProps } = props;
|
|
154
169
|
// Not using React.Children.toArray because it mutates the key prop.
|
|
155
170
|
let childArray = [];
|
|
156
|
-
(0, $koRP3$react).Children.forEach(children, (child)=>{
|
|
157
|
-
if (/*#__PURE__*/ (0, $koRP3$react).isValidElement(child))
|
|
171
|
+
(0, $koRP3$react).Children.forEach(children, (child, index)=>{
|
|
172
|
+
if (/*#__PURE__*/ (0, $koRP3$react).isValidElement(child)) {
|
|
173
|
+
if (child.key == null) child = /*#__PURE__*/ (0, $koRP3$react).cloneElement(child, {
|
|
174
|
+
key: index
|
|
175
|
+
});
|
|
176
|
+
childArray.push(child);
|
|
177
|
+
}
|
|
158
178
|
});
|
|
159
179
|
let domRef = (0, $koRP3$useDOMRef)(ref);
|
|
160
180
|
let listRef = (0, $koRP3$useRef)(null);
|
|
161
181
|
let [visibleItems, setVisibleItems] = (0, $koRP3$useValueEffect)(childArray.length);
|
|
162
|
-
let { navProps: navProps
|
|
163
|
-
let { styleProps: styleProps
|
|
182
|
+
let { navProps: navProps } = (0, $koRP3$useBreadcrumbs)(props);
|
|
183
|
+
let { styleProps: styleProps } = (0, $koRP3$useStyleProps)(otherProps);
|
|
164
184
|
let updateOverflow = (0, $koRP3$useCallback)(()=>{
|
|
165
185
|
let computeVisibleItems = (visibleItems)=>{
|
|
166
186
|
// Refs can be null at runtime.
|
|
@@ -237,8 +257,10 @@ function $2adaf67aabd3300b$var$Breadcrumbs(props, ref) {
|
|
|
237
257
|
if (key !== selectedKey && onAction) onAction(key);
|
|
238
258
|
};
|
|
239
259
|
let menuItem = /*#__PURE__*/ (0, $koRP3$react).createElement((0, $2bfa2c84c665c457$export$c13f210c706eb549), {
|
|
240
|
-
key: "menu"
|
|
260
|
+
key: "menu",
|
|
261
|
+
isMenu: true
|
|
241
262
|
}, /*#__PURE__*/ (0, $koRP3$react).createElement((0, $koRP3$MenuTrigger), null, /*#__PURE__*/ (0, $koRP3$react).createElement((0, $koRP3$ActionButton), {
|
|
263
|
+
UNSAFE_className: (0, $koRP3$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($48e85557f3729e3d$exports))), "spectrum-Breadcrumbs-actionButton"),
|
|
242
264
|
"aria-label": "…",
|
|
243
265
|
isQuiet: true,
|
|
244
266
|
isDisabled: isDisabled
|
|
@@ -275,6 +297,7 @@ function $2adaf67aabd3300b$var$Breadcrumbs(props, ref) {
|
|
|
275
297
|
key: index,
|
|
276
298
|
className: (0, $koRP3$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($48e85557f3729e3d$exports))), "spectrum-Breadcrumbs-item")
|
|
277
299
|
}, /*#__PURE__*/ (0, $koRP3$react).createElement((0, $2bfa2c84c665c457$export$c13f210c706eb549), {
|
|
300
|
+
...child.props,
|
|
278
301
|
key: key,
|
|
279
302
|
isCurrent: isCurrent,
|
|
280
303
|
isDisabled: isDisabled,
|
package/dist/main.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root{font-synthesis:weight}.spectrum-Breadcrumbs_3fe6e8{flex-wrap:nowrap;flex:1 0;justify-content:flex-start;margin:0;padding:0;list-style-type:none;display:flex}.spectrum-Breadcrumbs-itemSeparator_3fe6e8{top:var(--spectrum-global-dimension-size-10);width:var(--spectrum-breadcrumb-ui-icon-width,var(--spectrum-global-dimension-size-75));height:var(--spectrum-breadcrumb-ui-icon-height,var(--spectrum-global-dimension-size-100));opacity:1;position:relative;transform:scale(1)}.spectrum-Breadcrumbs-itemSeparator_3fe6e8.is-reversed_3fe6e8{transform:scale(-1)}.spectrum-Breadcrumbs-item_3fe6e8{box-sizing:border-box;height:var(--spectrum-breadcrumb-list-height,var(--spectrum-global-dimension-size-400));white-space:nowrap;font-size:var(--spectrum-breadcrumb-item-text-size,var(--spectrum-global-dimension-font-size-200));font-weight:var(--spectrum-breadcrumb-item-text-font-weight,var(--spectrum-alias-body-text-font-weight));line-height:var(--spectrum-breadcrumb-item-text-line-height,var(--spectrum-alias-body-text-line-height));justify-content:flex-start;align-items:center;display:inline-flex;position:relative}.spectrum-Breadcrumbs-item_3fe6e8:last-of-type{font-weight:var(--spectrum-breadcrumb-title-text-font-weight,var(--spectrum-alias-body-text-font-weight-strong))}.spectrum-Breadcrumbs-item_3fe6e8:last-of-type .spectrum-Breadcrumbs-itemSeparator_3fe6e8{display:none}[dir=ltr] .spectrum-Breadcrumbs-item_3fe6e8>.spectrum-ActionButton_3fe6e8{margin-right:var(--spectrum-breadcrumb-button-gap,var(--spectrum-global-dimension-static-size-10))}[dir=rtl] .spectrum-Breadcrumbs-item_3fe6e8>.spectrum-ActionButton_3fe6e8{margin-left:var(--spectrum-breadcrumb-button-gap,var(--spectrum-global-dimension-static-size-10))}.spectrum-Breadcrumbs-item_3fe6e8:last-child{overflow:hidden}.spectrum-Breadcrumbs-item_3fe6e8:last-child .spectrum-Breadcrumbs-itemLink_3fe6e8{text-overflow:ellipsis;overflow:hidden}[dir=ltr] .spectrum-Breadcrumbs-itemLink_3fe6e8{margin-right:var(--spectrum-breadcrumb-item-margin-right,var(--spectrum-global-dimension-static-size-10))}[dir=rtl] .spectrum-Breadcrumbs-itemLink_3fe6e8{margin-left:var(--spectrum-breadcrumb-item-margin-right,var(--spectrum-global-dimension-static-size-10))}.spectrum-Breadcrumbs-itemLink_3fe6e8{cursor:default;line-height:var(--spectrum-breadcrumb-list-height,var(--spectrum-global-dimension-size-400));vertical-align:middle;padding:0 var(--spectrum-breadcrumb-item-padding-x,var(--spectrum-global-dimension-size-100));height:var(--spectrum-breadcrumb-list-height,var(--spectrum-global-dimension-size-400));border-radius:var(--spectrum-breadcrumb-item-border-radius,var(--spectrum-alias-border-radius-regular));font-size:inherit;outline:none;margin-top:0;margin-bottom:0;text-decoration:none;position:relative}.spectrum-Breadcrumbs-itemLink_3fe6e8[href],.spectrum-Breadcrumbs-itemLink_3fe6e8[tabindex="0"]{cursor:pointer}.spectrum-Breadcrumbs-itemLink_3fe6e8[href].is-hovered_3fe6e8,.spectrum-Breadcrumbs-itemLink_3fe6e8[href].focus-ring_3fe6e8,.spectrum-Breadcrumbs-itemLink_3fe6e8[tabindex="0"].is-hovered_3fe6e8,.spectrum-Breadcrumbs-itemLink_3fe6e8[tabindex="0"].focus-ring_3fe6e8{text-decoration:underline}[dir=ltr] .spectrum-Breadcrumbs-item_3fe6e8.is-dragged_3fe6e8 .spectrum-Breadcrumbs-itemLink_3fe6e8:before,[dir=ltr] .spectrum-Breadcrumbs-itemLink_3fe6e8.focus-ring_3fe6e8:before{left:0}[dir=rtl] .spectrum-Breadcrumbs-item_3fe6e8.is-dragged_3fe6e8 .spectrum-Breadcrumbs-itemLink_3fe6e8:before,[dir=rtl] .spectrum-Breadcrumbs-itemLink_3fe6e8.focus-ring_3fe6e8:before{right:0}.spectrum-Breadcrumbs-item_3fe6e8.is-dragged_3fe6e8 .spectrum-Breadcrumbs-itemLink_3fe6e8:before,.spectrum-Breadcrumbs-itemLink_3fe6e8.focus-ring_3fe6e8:before{box-sizing:border-box;width:100%;height:100%;border-width:var(--spectrum-breadcrumb-item-border-size-key-focus,var(--spectrum-alias-border-size-thick));border-radius:var(--spectrum-breadcrumb-item-border-radius,var(--spectrum-alias-border-radius-regular));content:"";pointer-events:none;border-style:solid;display:block;position:absolute;top:0}.spectrum-Breadcrumbs--small_3fe6e8 .spectrum-Breadcrumbs-item_3fe6e8{font-size:var(--spectrum-breadcrumb-multiline-item-text-size,var(--spectrum-global-dimension-font-size-75))}.spectrum-Breadcrumbs--medium_3fe6e8 .spectrum-Breadcrumbs-item_3fe6e8{font-size:var(--spectrum-breadcrumb-compact-item-text-size,var(--spectrum-global-dimension-font-size-100))}.spectrum-Breadcrumbs--multiline_3fe6e8{flex-wrap:wrap}.spectrum-Breadcrumbs--multiline_3fe6e8 .spectrum-Breadcrumbs-item_3fe6e8:last-of-type{height:auto;margin-top:var(--spectrum-breadcrumb-multiline-title-margin-top,var(--spectrum-global-dimension-static-size-0));font-size:var(--spectrum-breadcrumb-multiline-title-text-size,var(--spectrum-global-dimension-font-size-300));font-weight:var(--spectrum-breadcrumb-multiline-title-text-font-weight,var(--spectrum-alias-body-text-font-weight-strong));line-height:var(--spectrum-breadcrumb-multiline-title-text-line-height,var(--spectrum-alias-heading-text-line-height));flex:0 100%}.spectrum-Breadcrumbs--multiline_3fe6e8 .spectrum-Breadcrumbs-item_3fe6e8:last-of-type .spectrum-Breadcrumbs-itemLink_3fe6e8{height:auto;text-decoration:none}.spectrum-Breadcrumbs--multiline_3fe6e8 .spectrum-Breadcrumbs-item_3fe6e8 .spectrum-Heading--pageTitle_3fe6e8{font-size:inherit;font-weight:inherit;margin:0}.spectrum-Breadcrumbs-item_3fe6e8{color:var(--spectrum-breadcrumb-text-color,var(--spectrum-alias-label-text-color))}.spectrum-Breadcrumbs-item_3fe6e8.is-dragged_3fe6e8 .spectrum-Breadcrumbs-itemLink_3fe6e8{color:var(--spectrum-breadcrumb-item-text-color-drop,var(--spectrum-alias-text-color-hover));background-color:var(--spectrum-breadcrumb-item-background-color-drop,var(--spectrum-alias-highlight-selected))}.spectrum-Breadcrumbs-item_3fe6e8.is-dragged_3fe6e8 .spectrum-Breadcrumbs-itemLink_3fe6e8:before{border-color:var(--spectrum-breadcrumb-item-border-color-drop,var(--spectrum-global-color-blue-500))}.spectrum-Breadcrumbs-item_3fe6e8 .spectrum-Breadcrumbs-itemSeparator_3fe6e8{color:var(--spectrum-breadcrumb-ui-icon-color,var(--spectrum-global-color-gray-500))}.spectrum-Breadcrumbs-item_3fe6e8 .spectrum-Breadcrumbs-itemLink_3fe6e8{color:inherit}.spectrum-Breadcrumbs-item_3fe6e8 .spectrum-Breadcrumbs-itemLink_3fe6e8.is-hovered_3fe6e8{color:var(--spectrum-breadcrumb-text-color-hover,var(--spectrum-alias-text-color-hover))}.spectrum-Breadcrumbs-item_3fe6e8 .spectrum-Breadcrumbs-itemLink_3fe6e8.focus-ring_3fe6e8{color:var(--spectrum-breadcrumb-text-color-key-focus,var(--spectrum-alias-text-color-hover))}.spectrum-Breadcrumbs-item_3fe6e8 .spectrum-Breadcrumbs-itemLink_3fe6e8.focus-ring_3fe6e8:before{border-color:var(--spectrum-breadcrumb-item-border-color-key-focus,var(--spectrum-alias-border-color-focus))}.spectrum-Breadcrumbs-item_3fe6e8 .spectrum-Breadcrumbs-itemLink_3fe6e8:active{color:var(--spectrum-breadcrumb-text-color-down,var(--spectrum-alias-text-color-down));border-bottom:0}.spectrum-Breadcrumbs-item_3fe6e8 .spectrum-Breadcrumbs-itemLink_3fe6e8.is-disabled_3fe6e8{color:var(--spectrum-label-text-color-disabled,var(--spectrum-alias-text-color-disabled))}.spectrum-Breadcrumbs-item_3fe6e8.is-selected_3fe6e8,.spectrum-Breadcrumbs-item_3fe6e8:last-of-type{color:var(--spectrum-breadcrumb-text-color-down,var(--spectrum-alias-text-color-down))}.spectrum-Breadcrumbs-item_3fe6e8.is-selected_3fe6e8~.spectrum-Breadcrumb_3fe6e8:last-of-type{color:var(--spectrum-breadcrumb-text-color,var(--spectrum-alias-label-text-color))}.spectrum-Breadcrumbs-item_3fe6e8.is-selected_3fe6e8 .spectrum-Breadcrumbs-itemLink_3fe6e8.focus-ring_3fe6e8{color:var(--spectrum-breadcrumb-text-color-down,var(--spectrum-alias-text-color-down));border-bottom:0}@media (forced-colors:active){.spectrum-Breadcrumbs-item_3fe6e8{--spectrum-breadcrumb-item-border-color-drop:LinkText;--spectrum-breadcrumb-item-border-color-key-focus:CanvasText;--spectrum-breadcrumb-item-text-color-drop:LinkText;--spectrum-breadcrumb-text-color:LinkText;--spectrum-breadcrumb-text-color-down:CanvasText;--spectrum-breadcrumb-text-color-hover:LinkText;--spectrum-breadcrumb-text-color-key-focus:LinkText;--spectrum-breadcrumb-ui-icon-color:CanvasText;--spectrum-label-text-color-disabled:GrayText}.spectrum-Breadcrumbs-item_3fe6e8.is-selected_3fe6e8,.spectrum-Breadcrumbs-item_3fe6e8:last-of-type,.spectrum-Breadcrumbs-item_3fe6e8.is-selected_3fe6e8 .spectrum-Breadcrumbs-itemLink_3fe6e8.is-hovered_3fe6e8,.spectrum-Breadcrumbs-item_3fe6e8:last-of-type .spectrum-Breadcrumbs-itemLink_3fe6e8.is-hovered_3fe6e8{color:var(--spectrum-breadcrumb-text-color-down,var(--spectrum-alias-text-color-down))}.spectrum-Breadcrumbs-item_3fe6e8 .spectrum-Breadcrumbs-itemLink_3fe6e8:active{color:var(--spectrum-breadcrumb-text-color,var(--spectrum-alias-label-text-color))}.spectrum-Breadcrumbs-item_3fe6e8 .spectrum-Breadcrumbs-itemLink_3fe6e8.is-disabled_3fe6e8:active{color:var(--spectrum-label-text-color-disabled,var(--spectrum-alias-text-color-disabled))}}
|
|
1
|
+
._1gDPVa_i18nFontFamily{font-synthesis:weight;font-family:adobe-clean,Source Sans Pro,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Ubuntu,Trebuchet MS,Lucida Grande,sans-serif}._1gDPVa_i18nFontFamily:lang(ar){font-family:myriad-arabic,adobe-clean,Source Sans Pro,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Ubuntu,Trebuchet MS,Lucida Grande,sans-serif}._1gDPVa_i18nFontFamily:lang(he){font-family:myriad-hebrew,adobe-clean,Source Sans Pro,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Ubuntu,Trebuchet MS,Lucida Grande,sans-serif}._1gDPVa_i18nFontFamily:lang(zh){font-family:adobe-clean-han-traditional,source-han-traditional,MingLiu,Heiti TC Light,sans-serif}._1gDPVa_i18nFontFamily:lang(zh-Hans){font-family:adobe-clean-han-simplified-c,source-han-simplified-c,SimSun,Heiti SC Light,sans-serif}._1gDPVa_i18nFontFamily:lang(zh-Hant){font-family:adobe-clean-han-traditional,source-han-traditional,MingLiu,Microsoft JhengHei UI,Microsoft JhengHei,Heiti TC Light,sans-serif}._1gDPVa_i18nFontFamily:lang(zh-SG),._1gDPVa_i18nFontFamily:lang(zh-CN){font-family:adobe-clean-han-simplified-c,source-han-simplified-c,SimSun,Heiti SC Light,sans-serif}._1gDPVa_i18nFontFamily:lang(ko){font-family:adobe-clean-han-korean,source-han-korean,Malgun Gothic,Apple Gothic,sans-serif}._1gDPVa_i18nFontFamily:lang(ja){font-family:adobe-clean-han-japanese,Hiragino Kaku Gothic ProN,ヒラギノ角ゴ ProN W3,Osaka,YuGothic,Yu Gothic,メイリオ,Meiryo,MS Pゴシック,MS PGothic,sans-serif}._1gDPVa_spectrum-FocusRing-ring{--spectrum-focus-ring-border-radius:var(--spectrum-textfield-border-radius,var(--spectrum-alias-border-radius-regular));--spectrum-focus-ring-gap:var(--spectrum-alias-input-focusring-gap);--spectrum-focus-ring-size:var(--spectrum-alias-input-focusring-size);--spectrum-focus-ring-border-size:0px;--spectrum-focus-ring-color:var(--spectrum-high-contrast-focus-ring-color,var(--spectrum-alias-focus-ring-color,var(--spectrum-alias-focus-color)))}._1gDPVa_spectrum-FocusRing-ring:after{border-radius:calc(var(--spectrum-focus-ring-border-radius) + var(--spectrum-focus-ring-gap));content:"";margin:calc(-1*var(--spectrum-focus-ring-border-size));pointer-events:none;transition:box-shadow var(--spectrum-global-animation-duration-100,.13s)ease-out,margin var(--spectrum-global-animation-duration-100,.13s)ease-out;display:block;position:absolute;top:0;bottom:0;left:0;right:0}._1gDPVa_spectrum-FocusRing._1gDPVa_focus-ring:after{margin:calc(var(--spectrum-focus-ring-gap)*-1 - var(--spectrum-focus-ring-border-size));box-shadow:0 0 0 var(--spectrum-focus-ring-size)var(--spectrum-focus-ring-color)}._1gDPVa_spectrum-FocusRing--quiet:after{border-radius:0}._1gDPVa_spectrum-FocusRing--quiet._1gDPVa_focus-ring:after{margin:0 0 calc(var(--spectrum-focus-ring-gap)*-1 - var(--spectrum-focus-ring-border-size))0;box-shadow:0 var(--spectrum-focus-ring-size)0 var(--spectrum-focus-ring-color)}._1gDPVa_spectrum-Breadcrumbs{flex-wrap:nowrap;flex:1 0;justify-content:flex-start;margin:0;padding:0;list-style-type:none;display:flex}._1gDPVa_spectrum-Breadcrumbs-itemSeparator{top:var(--spectrum-global-dimension-size-10);width:var(--spectrum-breadcrumb-ui-icon-width,var(--spectrum-global-dimension-size-75));height:var(--spectrum-breadcrumb-ui-icon-height,var(--spectrum-global-dimension-size-100));opacity:1;position:relative;transform:scale(1)}._1gDPVa_spectrum-Breadcrumbs-itemSeparator._1gDPVa_is-reversed{transform:scale(-1)}._1gDPVa_spectrum-Breadcrumbs-item{box-sizing:border-box;height:var(--spectrum-breadcrumb-list-height,var(--spectrum-global-dimension-size-400));white-space:nowrap;font-size:var(--spectrum-breadcrumb-item-text-size,var(--spectrum-global-dimension-font-size-200));font-weight:var(--spectrum-breadcrumb-item-text-font-weight,var(--spectrum-alias-body-text-font-weight));line-height:var(--spectrum-breadcrumb-item-text-line-height,var(--spectrum-alias-body-text-line-height));justify-content:flex-start;align-items:center;display:inline-flex;position:relative}._1gDPVa_spectrum-Breadcrumbs-item:last-of-type{font-weight:var(--spectrum-breadcrumb-title-text-font-weight,var(--spectrum-alias-body-text-font-weight-strong))}._1gDPVa_spectrum-Breadcrumbs-item:last-of-type ._1gDPVa_spectrum-Breadcrumbs-itemSeparator{display:none}._1gDPVa_spectrum-Breadcrumbs-item:not(:first-child)>._1gDPVa_spectrum-Breadcrumbs-actionButton:not(:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){margin-left:var(--spectrum-breadcrumb-button-gap,var(--spectrum-global-dimension-static-size-10))}._1gDPVa_spectrum-Breadcrumbs-item:not(:first-child)>._1gDPVa_spectrum-Breadcrumbs-actionButton:not(:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){margin-left:var(--spectrum-breadcrumb-button-gap,var(--spectrum-global-dimension-static-size-10))}._1gDPVa_spectrum-Breadcrumbs-item:not(:first-child)>._1gDPVa_spectrum-Breadcrumbs-actionButton:not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){margin-left:var(--spectrum-breadcrumb-button-gap,var(--spectrum-global-dimension-static-size-10))}._1gDPVa_spectrum-Breadcrumbs-item:not(:first-child)>._1gDPVa_spectrum-Breadcrumbs-actionButton:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){margin-right:var(--spectrum-breadcrumb-button-gap,var(--spectrum-global-dimension-static-size-10))}._1gDPVa_spectrum-Breadcrumbs-item:not(:first-child)>._1gDPVa_spectrum-Breadcrumbs-actionButton:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){margin-right:var(--spectrum-breadcrumb-button-gap,var(--spectrum-global-dimension-static-size-10))}._1gDPVa_spectrum-Breadcrumbs-item:not(:first-child)>._1gDPVa_spectrum-Breadcrumbs-actionButton:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){margin-right:var(--spectrum-breadcrumb-button-gap,var(--spectrum-global-dimension-static-size-10))}._1gDPVa_spectrum-Breadcrumbs-item>._1gDPVa_spectrum-Breadcrumbs-actionButton:not(:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){margin-right:var(--spectrum-breadcrumb-button-gap,var(--spectrum-global-dimension-static-size-10))}._1gDPVa_spectrum-Breadcrumbs-item>._1gDPVa_spectrum-Breadcrumbs-actionButton:not(:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){margin-right:var(--spectrum-breadcrumb-button-gap,var(--spectrum-global-dimension-static-size-10))}._1gDPVa_spectrum-Breadcrumbs-item>._1gDPVa_spectrum-Breadcrumbs-actionButton:not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){margin-right:var(--spectrum-breadcrumb-button-gap,var(--spectrum-global-dimension-static-size-10))}._1gDPVa_spectrum-Breadcrumbs-item>._1gDPVa_spectrum-Breadcrumbs-actionButton:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){margin-left:var(--spectrum-breadcrumb-button-gap,var(--spectrum-global-dimension-static-size-10))}._1gDPVa_spectrum-Breadcrumbs-item>._1gDPVa_spectrum-Breadcrumbs-actionButton:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){margin-left:var(--spectrum-breadcrumb-button-gap,var(--spectrum-global-dimension-static-size-10))}._1gDPVa_spectrum-Breadcrumbs-item:last-child{overflow:hidden}._1gDPVa_spectrum-Breadcrumbs-item:last-child ._1gDPVa_spectrum-Breadcrumbs-itemLink{text-overflow:ellipsis;overflow:hidden}._1gDPVa_spectrum-Breadcrumbs-itemLink{cursor:default;line-height:var(--spectrum-breadcrumb-list-height,var(--spectrum-global-dimension-size-400));vertical-align:middle;padding:0 var(--spectrum-breadcrumb-item-padding-x,var(--spectrum-global-dimension-size-100));height:var(--spectrum-breadcrumb-list-height,var(--spectrum-global-dimension-size-400));border-radius:var(--spectrum-breadcrumb-item-border-radius,var(--spectrum-alias-border-radius-regular));font-size:inherit;outline:none;margin-top:0;margin-bottom:0;text-decoration:none;position:relative}._1gDPVa_spectrum-Breadcrumbs-itemLink:not(:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){margin-right:var(--spectrum-breadcrumb-item-margin-right,var(--spectrum-global-dimension-static-size-10))}._1gDPVa_spectrum-Breadcrumbs-itemLink:not(:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){margin-right:var(--spectrum-breadcrumb-item-margin-right,var(--spectrum-global-dimension-static-size-10))}._1gDPVa_spectrum-Breadcrumbs-itemLink:not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){margin-right:var(--spectrum-breadcrumb-item-margin-right,var(--spectrum-global-dimension-static-size-10))}._1gDPVa_spectrum-Breadcrumbs-itemLink:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){margin-left:var(--spectrum-breadcrumb-item-margin-right,var(--spectrum-global-dimension-static-size-10))}._1gDPVa_spectrum-Breadcrumbs-itemLink:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){margin-left:var(--spectrum-breadcrumb-item-margin-right,var(--spectrum-global-dimension-static-size-10))}._1gDPVa_spectrum-Breadcrumbs-itemLink:not([aria-disabled]){cursor:pointer}._1gDPVa_spectrum-Breadcrumbs-itemLink:not([aria-disabled])._1gDPVa_is-hovered,._1gDPVa_spectrum-Breadcrumbs-itemLink:not([aria-disabled])._1gDPVa_focus-ring{text-decoration:underline}._1gDPVa_spectrum-Breadcrumbs-item._1gDPVa_is-dragged ._1gDPVa_spectrum-Breadcrumbs-itemLink:before{box-sizing:border-box;border-width:var(--spectrum-breadcrumb-item-border-size-key-focus,var(--spectrum-alias-border-size-thick));border-radius:var(--spectrum-breadcrumb-item-border-radius,var(--spectrum-alias-border-radius-regular));content:"";pointer-events:none;border-style:solid;width:100%;height:100%;display:block;position:absolute;top:0}._1gDPVa_spectrum-Breadcrumbs-item._1gDPVa_is-dragged ._1gDPVa_spectrum-Breadcrumbs-itemLink:not(:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))):before{left:0}._1gDPVa_spectrum-Breadcrumbs-item._1gDPVa_is-dragged ._1gDPVa_spectrum-Breadcrumbs-itemLink:not(:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))):before{left:0}._1gDPVa_spectrum-Breadcrumbs-item._1gDPVa_is-dragged ._1gDPVa_spectrum-Breadcrumbs-itemLink:not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))):before{left:0}._1gDPVa_spectrum-Breadcrumbs-item._1gDPVa_is-dragged ._1gDPVa_spectrum-Breadcrumbs-itemLink:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)):before{right:0}._1gDPVa_spectrum-Breadcrumbs-item._1gDPVa_is-dragged ._1gDPVa_spectrum-Breadcrumbs-itemLink:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)):before{right:0}._1gDPVa_spectrum-Breadcrumbs-itemLink._1gDPVa_focus-ring:before{box-sizing:border-box;border-width:var(--spectrum-breadcrumb-item-border-size-key-focus,var(--spectrum-alias-border-size-thick));border-radius:var(--spectrum-breadcrumb-item-border-radius,var(--spectrum-alias-border-radius-regular));content:"";pointer-events:none;border-style:solid;width:100%;height:100%;display:block;position:absolute;top:0}._1gDPVa_spectrum-Breadcrumbs-itemLink._1gDPVa_focus-ring:not(:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))):before{left:0}._1gDPVa_spectrum-Breadcrumbs-itemLink._1gDPVa_focus-ring:not(:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))):before{left:0}._1gDPVa_spectrum-Breadcrumbs-itemLink._1gDPVa_focus-ring:not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))):before{left:0}._1gDPVa_spectrum-Breadcrumbs-itemLink._1gDPVa_focus-ring:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)):before{right:0}._1gDPVa_spectrum-Breadcrumbs-itemLink._1gDPVa_focus-ring:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)):before{right:0}._1gDPVa_spectrum-Breadcrumbs--small ._1gDPVa_spectrum-Breadcrumbs-item{font-size:var(--spectrum-breadcrumb-multiline-item-text-size,var(--spectrum-global-dimension-font-size-75))}._1gDPVa_spectrum-Breadcrumbs--medium ._1gDPVa_spectrum-Breadcrumbs-item{font-size:var(--spectrum-breadcrumb-compact-item-text-size,var(--spectrum-global-dimension-font-size-100))}._1gDPVa_spectrum-Breadcrumbs--multiline{flex-wrap:wrap}._1gDPVa_spectrum-Breadcrumbs--multiline ._1gDPVa_spectrum-Breadcrumbs-item:last-of-type{margin-top:var(--spectrum-breadcrumb-multiline-title-margin-top,var(--spectrum-global-dimension-static-size-0));font-size:var(--spectrum-breadcrumb-multiline-title-text-size,var(--spectrum-global-dimension-font-size-300));font-weight:var(--spectrum-breadcrumb-multiline-title-text-font-weight,var(--spectrum-alias-body-text-font-weight-strong));line-height:var(--spectrum-breadcrumb-multiline-title-text-line-height,var(--spectrum-alias-heading-text-line-height));flex:0 100%;height:auto}._1gDPVa_spectrum-Breadcrumbs--multiline ._1gDPVa_spectrum-Breadcrumbs-item:last-of-type ._1gDPVa_spectrum-Breadcrumbs-itemLink{height:auto;text-decoration:none}._1gDPVa_spectrum-Breadcrumbs--multiline ._1gDPVa_spectrum-Breadcrumbs-item ._1gDPVa_spectrum-Heading--pageTitle{font-size:inherit;font-weight:inherit;margin:0}._1gDPVa_spectrum-Breadcrumbs-item{color:var(--spectrum-breadcrumb-text-color,var(--spectrum-alias-label-text-color))}._1gDPVa_spectrum-Breadcrumbs-item._1gDPVa_is-dragged ._1gDPVa_spectrum-Breadcrumbs-itemLink{color:var(--spectrum-breadcrumb-item-text-color-drop,var(--spectrum-alias-text-color-hover));background-color:var(--spectrum-breadcrumb-item-background-color-drop,var(--spectrum-alias-highlight-selected))}._1gDPVa_spectrum-Breadcrumbs-item._1gDPVa_is-dragged ._1gDPVa_spectrum-Breadcrumbs-itemLink:before{border-color:var(--spectrum-breadcrumb-item-border-color-drop,var(--spectrum-global-color-blue-500))}._1gDPVa_spectrum-Breadcrumbs-item ._1gDPVa_spectrum-Breadcrumbs-itemSeparator{color:var(--spectrum-breadcrumb-ui-icon-color,var(--spectrum-global-color-gray-500))}._1gDPVa_spectrum-Breadcrumbs-item ._1gDPVa_spectrum-Breadcrumbs-itemLink{color:inherit}._1gDPVa_spectrum-Breadcrumbs-item ._1gDPVa_spectrum-Breadcrumbs-itemLink._1gDPVa_is-hovered{color:var(--spectrum-breadcrumb-text-color-hover,var(--spectrum-alias-text-color-hover))}._1gDPVa_spectrum-Breadcrumbs-item ._1gDPVa_spectrum-Breadcrumbs-itemLink._1gDPVa_focus-ring{color:var(--spectrum-breadcrumb-text-color-key-focus,var(--spectrum-alias-text-color-hover))}._1gDPVa_spectrum-Breadcrumbs-item ._1gDPVa_spectrum-Breadcrumbs-itemLink._1gDPVa_focus-ring:before{border-color:var(--spectrum-breadcrumb-item-border-color-key-focus,var(--spectrum-alias-border-color-focus))}._1gDPVa_spectrum-Breadcrumbs-item ._1gDPVa_spectrum-Breadcrumbs-itemLink:active{color:var(--spectrum-breadcrumb-text-color-down,var(--spectrum-alias-text-color-down));border-bottom:0}._1gDPVa_spectrum-Breadcrumbs-item ._1gDPVa_spectrum-Breadcrumbs-itemLink._1gDPVa_is-disabled{color:var(--spectrum-label-text-color-disabled,var(--spectrum-alias-text-color-disabled))}._1gDPVa_spectrum-Breadcrumbs-item._1gDPVa_is-selected,._1gDPVa_spectrum-Breadcrumbs-item:last-of-type{color:var(--spectrum-breadcrumb-text-color-down,var(--spectrum-alias-text-color-down))}._1gDPVa_spectrum-Breadcrumbs-item._1gDPVa_is-selected~._1gDPVa_spectrum-Breadcrumb:last-of-type{color:var(--spectrum-breadcrumb-text-color,var(--spectrum-alias-label-text-color))}._1gDPVa_spectrum-Breadcrumbs-item._1gDPVa_is-selected ._1gDPVa_spectrum-Breadcrumbs-itemLink._1gDPVa_focus-ring{color:var(--spectrum-breadcrumb-text-color-down,var(--spectrum-alias-text-color-down));border-bottom:0}@media (forced-colors:active){._1gDPVa_spectrum-Breadcrumbs-item{--spectrum-breadcrumb-item-border-color-drop:LinkText;--spectrum-breadcrumb-item-border-color-key-focus:CanvasText;--spectrum-breadcrumb-item-text-color-drop:LinkText;--spectrum-breadcrumb-text-color:LinkText;--spectrum-breadcrumb-text-color-down:CanvasText;--spectrum-breadcrumb-text-color-hover:LinkText;--spectrum-breadcrumb-text-color-key-focus:LinkText;--spectrum-breadcrumb-ui-icon-color:CanvasText;--spectrum-label-text-color-disabled:GrayText}._1gDPVa_spectrum-Breadcrumbs-item._1gDPVa_is-selected,._1gDPVa_spectrum-Breadcrumbs-item._1gDPVa_is-selected ._1gDPVa_spectrum-Breadcrumbs-itemLink._1gDPVa_is-hovered,._1gDPVa_spectrum-Breadcrumbs-item:last-of-type,._1gDPVa_spectrum-Breadcrumbs-item:last-of-type ._1gDPVa_spectrum-Breadcrumbs-itemLink._1gDPVa_is-hovered{color:var(--spectrum-breadcrumb-text-color-down,var(--spectrum-alias-text-color-down))}:-webkit-any() ._1gDPVa_spectrum-Breadcrumbs-itemLink._1gDPVa_is-hovered{color:var(--spectrum-breadcrumb-text-color-down,var(--spectrum-alias-text-color-down))}:is() ._1gDPVa_spectrum-Breadcrumbs-itemLink._1gDPVa_is-hovered{color:var(--spectrum-breadcrumb-text-color-down,var(--spectrum-alias-text-color-down))}._1gDPVa_spectrum-Breadcrumbs-item ._1gDPVa_spectrum-Breadcrumbs-itemLink:active{color:var(--spectrum-breadcrumb-text-color,var(--spectrum-alias-label-text-color))}._1gDPVa_spectrum-Breadcrumbs-item ._1gDPVa_spectrum-Breadcrumbs-itemLink._1gDPVa_is-disabled:active{color:var(--spectrum-label-text-color-disabled,var(--spectrum-alias-text-color-disabled))}}
|
package/dist/main.js
CHANGED
|
@@ -61,79 +61,94 @@ $parcel$export(module.exports, "Item", () => $8bWUw$reactstatelycollections.Item
|
|
|
61
61
|
|
|
62
62
|
var $3292ef9f328419fc$exports = {};
|
|
63
63
|
|
|
64
|
-
$parcel$export($3292ef9f328419fc$exports, "spectrum-Breadcrumbs", () => $3292ef9f328419fc$export$8c6320d2db82081f, (v) => $3292ef9f328419fc$export$8c6320d2db82081f = v);
|
|
65
|
-
$parcel$export($3292ef9f328419fc$exports, "spectrum-Breadcrumbs-itemSeparator", () => $3292ef9f328419fc$export$f72910e36cd91d1e, (v) => $3292ef9f328419fc$export$f72910e36cd91d1e = v);
|
|
66
|
-
$parcel$export($3292ef9f328419fc$exports, "is-reversed", () => $3292ef9f328419fc$export$a4561bd665abb5db, (v) => $3292ef9f328419fc$export$a4561bd665abb5db = v);
|
|
67
|
-
$parcel$export($3292ef9f328419fc$exports, "spectrum-Breadcrumbs-item", () => $3292ef9f328419fc$export$492a5983c5fbf603, (v) => $3292ef9f328419fc$export$492a5983c5fbf603 = v);
|
|
68
|
-
$parcel$export($3292ef9f328419fc$exports, "spectrum-ActionButton", () => $3292ef9f328419fc$export$53da69f51b770d3, (v) => $3292ef9f328419fc$export$53da69f51b770d3 = v);
|
|
69
|
-
$parcel$export($3292ef9f328419fc$exports, "spectrum-Breadcrumbs-itemLink", () => $3292ef9f328419fc$export$5af6a1bcd207d9f6, (v) => $3292ef9f328419fc$export$5af6a1bcd207d9f6 = v);
|
|
70
|
-
$parcel$export($3292ef9f328419fc$exports, "is-hovered", () => $3292ef9f328419fc$export$b8813cd5d7824ce7, (v) => $3292ef9f328419fc$export$b8813cd5d7824ce7 = v);
|
|
71
64
|
$parcel$export($3292ef9f328419fc$exports, "focus-ring", () => $3292ef9f328419fc$export$f39a09f249340e2a, (v) => $3292ef9f328419fc$export$f39a09f249340e2a = v);
|
|
65
|
+
$parcel$export($3292ef9f328419fc$exports, "i18nFontFamily", () => $3292ef9f328419fc$export$8c4ee2c50c22c514, (v) => $3292ef9f328419fc$export$8c4ee2c50c22c514 = v);
|
|
66
|
+
$parcel$export($3292ef9f328419fc$exports, "is-disabled", () => $3292ef9f328419fc$export$d35bc1e505d1ebbf, (v) => $3292ef9f328419fc$export$d35bc1e505d1ebbf = v);
|
|
72
67
|
$parcel$export($3292ef9f328419fc$exports, "is-dragged", () => $3292ef9f328419fc$export$8778c911bed6c759, (v) => $3292ef9f328419fc$export$8778c911bed6c759 = v);
|
|
73
|
-
$parcel$export($3292ef9f328419fc$exports, "
|
|
68
|
+
$parcel$export($3292ef9f328419fc$exports, "is-hovered", () => $3292ef9f328419fc$export$b8813cd5d7824ce7, (v) => $3292ef9f328419fc$export$b8813cd5d7824ce7 = v);
|
|
69
|
+
$parcel$export($3292ef9f328419fc$exports, "is-reversed", () => $3292ef9f328419fc$export$a4561bd665abb5db, (v) => $3292ef9f328419fc$export$a4561bd665abb5db = v);
|
|
70
|
+
$parcel$export($3292ef9f328419fc$exports, "is-selected", () => $3292ef9f328419fc$export$1e0fb04f31d3c22a, (v) => $3292ef9f328419fc$export$1e0fb04f31d3c22a = v);
|
|
71
|
+
$parcel$export($3292ef9f328419fc$exports, "spectrum-Breadcrumb", () => $3292ef9f328419fc$export$45a5316056cfac3c, (v) => $3292ef9f328419fc$export$45a5316056cfac3c = v);
|
|
72
|
+
$parcel$export($3292ef9f328419fc$exports, "spectrum-Breadcrumbs", () => $3292ef9f328419fc$export$8c6320d2db82081f, (v) => $3292ef9f328419fc$export$8c6320d2db82081f = v);
|
|
74
73
|
$parcel$export($3292ef9f328419fc$exports, "spectrum-Breadcrumbs--medium", () => $3292ef9f328419fc$export$19f957201d941895, (v) => $3292ef9f328419fc$export$19f957201d941895 = v);
|
|
75
74
|
$parcel$export($3292ef9f328419fc$exports, "spectrum-Breadcrumbs--multiline", () => $3292ef9f328419fc$export$713961e8e432825b, (v) => $3292ef9f328419fc$export$713961e8e432825b = v);
|
|
75
|
+
$parcel$export($3292ef9f328419fc$exports, "spectrum-Breadcrumbs--small", () => $3292ef9f328419fc$export$e01337e7944312f6, (v) => $3292ef9f328419fc$export$e01337e7944312f6 = v);
|
|
76
|
+
$parcel$export($3292ef9f328419fc$exports, "spectrum-Breadcrumbs-actionButton", () => $3292ef9f328419fc$export$9753a085493f5648, (v) => $3292ef9f328419fc$export$9753a085493f5648 = v);
|
|
77
|
+
$parcel$export($3292ef9f328419fc$exports, "spectrum-Breadcrumbs-item", () => $3292ef9f328419fc$export$492a5983c5fbf603, (v) => $3292ef9f328419fc$export$492a5983c5fbf603 = v);
|
|
78
|
+
$parcel$export($3292ef9f328419fc$exports, "spectrum-Breadcrumbs-itemLink", () => $3292ef9f328419fc$export$5af6a1bcd207d9f6, (v) => $3292ef9f328419fc$export$5af6a1bcd207d9f6 = v);
|
|
79
|
+
$parcel$export($3292ef9f328419fc$exports, "spectrum-Breadcrumbs-itemSeparator", () => $3292ef9f328419fc$export$f72910e36cd91d1e, (v) => $3292ef9f328419fc$export$f72910e36cd91d1e = v);
|
|
80
|
+
$parcel$export($3292ef9f328419fc$exports, "spectrum-FocusRing-ring", () => $3292ef9f328419fc$export$4109102f950813a6, (v) => $3292ef9f328419fc$export$4109102f950813a6 = v);
|
|
81
|
+
$parcel$export($3292ef9f328419fc$exports, "spectrum-FocusRing", () => $3292ef9f328419fc$export$24c7f46a6e3605dd, (v) => $3292ef9f328419fc$export$24c7f46a6e3605dd = v);
|
|
82
|
+
$parcel$export($3292ef9f328419fc$exports, "spectrum-FocusRing--quiet", () => $3292ef9f328419fc$export$2927016961429360, (v) => $3292ef9f328419fc$export$2927016961429360 = v);
|
|
76
83
|
$parcel$export($3292ef9f328419fc$exports, "spectrum-Heading--pageTitle", () => $3292ef9f328419fc$export$63e9e087a73f808b, (v) => $3292ef9f328419fc$export$63e9e087a73f808b = v);
|
|
77
|
-
$parcel$export($3292ef9f328419fc$exports, "is-disabled", () => $3292ef9f328419fc$export$d35bc1e505d1ebbf, (v) => $3292ef9f328419fc$export$d35bc1e505d1ebbf = v);
|
|
78
|
-
$parcel$export($3292ef9f328419fc$exports, "is-selected", () => $3292ef9f328419fc$export$1e0fb04f31d3c22a, (v) => $3292ef9f328419fc$export$1e0fb04f31d3c22a = v);
|
|
79
|
-
$parcel$export($3292ef9f328419fc$exports, "spectrum-Breadcrumb", () => $3292ef9f328419fc$export$45a5316056cfac3c, (v) => $3292ef9f328419fc$export$45a5316056cfac3c = v);
|
|
80
|
-
var $3292ef9f328419fc$export$8c6320d2db82081f;
|
|
81
|
-
var $3292ef9f328419fc$export$f72910e36cd91d1e;
|
|
82
|
-
var $3292ef9f328419fc$export$a4561bd665abb5db;
|
|
83
|
-
var $3292ef9f328419fc$export$492a5983c5fbf603;
|
|
84
|
-
var $3292ef9f328419fc$export$53da69f51b770d3;
|
|
85
|
-
var $3292ef9f328419fc$export$5af6a1bcd207d9f6;
|
|
86
|
-
var $3292ef9f328419fc$export$b8813cd5d7824ce7;
|
|
87
84
|
var $3292ef9f328419fc$export$f39a09f249340e2a;
|
|
85
|
+
var $3292ef9f328419fc$export$8c4ee2c50c22c514;
|
|
86
|
+
var $3292ef9f328419fc$export$d35bc1e505d1ebbf;
|
|
88
87
|
var $3292ef9f328419fc$export$8778c911bed6c759;
|
|
89
|
-
var $3292ef9f328419fc$export$
|
|
88
|
+
var $3292ef9f328419fc$export$b8813cd5d7824ce7;
|
|
89
|
+
var $3292ef9f328419fc$export$a4561bd665abb5db;
|
|
90
|
+
var $3292ef9f328419fc$export$1e0fb04f31d3c22a;
|
|
91
|
+
var $3292ef9f328419fc$export$45a5316056cfac3c;
|
|
92
|
+
var $3292ef9f328419fc$export$8c6320d2db82081f;
|
|
90
93
|
var $3292ef9f328419fc$export$19f957201d941895;
|
|
91
94
|
var $3292ef9f328419fc$export$713961e8e432825b;
|
|
95
|
+
var $3292ef9f328419fc$export$e01337e7944312f6;
|
|
96
|
+
var $3292ef9f328419fc$export$9753a085493f5648;
|
|
97
|
+
var $3292ef9f328419fc$export$492a5983c5fbf603;
|
|
98
|
+
var $3292ef9f328419fc$export$5af6a1bcd207d9f6;
|
|
99
|
+
var $3292ef9f328419fc$export$f72910e36cd91d1e;
|
|
100
|
+
var $3292ef9f328419fc$export$4109102f950813a6;
|
|
101
|
+
var $3292ef9f328419fc$export$24c7f46a6e3605dd;
|
|
102
|
+
var $3292ef9f328419fc$export$2927016961429360;
|
|
92
103
|
var $3292ef9f328419fc$export$63e9e087a73f808b;
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
$3292ef9f328419fc$export$
|
|
97
|
-
$3292ef9f328419fc$export$
|
|
98
|
-
$3292ef9f328419fc$export$a4561bd665abb5db =
|
|
99
|
-
$3292ef9f328419fc$export$
|
|
100
|
-
$3292ef9f328419fc$export$
|
|
101
|
-
$3292ef9f328419fc$export$
|
|
102
|
-
$3292ef9f328419fc$export$
|
|
103
|
-
$3292ef9f328419fc$export$
|
|
104
|
-
$3292ef9f328419fc$export$
|
|
105
|
-
$3292ef9f328419fc$export$
|
|
106
|
-
$3292ef9f328419fc$export$
|
|
107
|
-
$3292ef9f328419fc$export$
|
|
108
|
-
$3292ef9f328419fc$export$
|
|
109
|
-
$3292ef9f328419fc$export$
|
|
110
|
-
$3292ef9f328419fc$export$
|
|
111
|
-
$3292ef9f328419fc$export$
|
|
104
|
+
$3292ef9f328419fc$export$f39a09f249340e2a = `_1gDPVa_focus-ring`;
|
|
105
|
+
$3292ef9f328419fc$export$8c4ee2c50c22c514 = `_1gDPVa_i18nFontFamily`;
|
|
106
|
+
$3292ef9f328419fc$export$d35bc1e505d1ebbf = `_1gDPVa_is-disabled`;
|
|
107
|
+
$3292ef9f328419fc$export$8778c911bed6c759 = `_1gDPVa_is-dragged`;
|
|
108
|
+
$3292ef9f328419fc$export$b8813cd5d7824ce7 = `_1gDPVa_is-hovered`;
|
|
109
|
+
$3292ef9f328419fc$export$a4561bd665abb5db = `_1gDPVa_is-reversed`;
|
|
110
|
+
$3292ef9f328419fc$export$1e0fb04f31d3c22a = `_1gDPVa_is-selected`;
|
|
111
|
+
$3292ef9f328419fc$export$45a5316056cfac3c = `_1gDPVa_spectrum-Breadcrumb`;
|
|
112
|
+
$3292ef9f328419fc$export$8c6320d2db82081f = `_1gDPVa_spectrum-Breadcrumbs`;
|
|
113
|
+
$3292ef9f328419fc$export$19f957201d941895 = `_1gDPVa_spectrum-Breadcrumbs--medium`;
|
|
114
|
+
$3292ef9f328419fc$export$713961e8e432825b = `_1gDPVa_spectrum-Breadcrumbs--multiline`;
|
|
115
|
+
$3292ef9f328419fc$export$e01337e7944312f6 = `_1gDPVa_spectrum-Breadcrumbs--small`;
|
|
116
|
+
$3292ef9f328419fc$export$9753a085493f5648 = `_1gDPVa_spectrum-Breadcrumbs-actionButton`;
|
|
117
|
+
$3292ef9f328419fc$export$492a5983c5fbf603 = `_1gDPVa_spectrum-Breadcrumbs-item`;
|
|
118
|
+
$3292ef9f328419fc$export$5af6a1bcd207d9f6 = `_1gDPVa_spectrum-Breadcrumbs-itemLink`;
|
|
119
|
+
$3292ef9f328419fc$export$f72910e36cd91d1e = `_1gDPVa_spectrum-Breadcrumbs-itemSeparator`;
|
|
120
|
+
$3292ef9f328419fc$export$4109102f950813a6 = `_1gDPVa_spectrum-FocusRing-ring`;
|
|
121
|
+
$3292ef9f328419fc$export$24c7f46a6e3605dd = `_1gDPVa_spectrum-FocusRing ${$3292ef9f328419fc$export$4109102f950813a6}`;
|
|
122
|
+
$3292ef9f328419fc$export$2927016961429360 = `_1gDPVa_spectrum-FocusRing--quiet`;
|
|
123
|
+
$3292ef9f328419fc$export$63e9e087a73f808b = `_1gDPVa_spectrum-Heading--pageTitle`;
|
|
112
124
|
|
|
113
125
|
|
|
114
126
|
|
|
115
127
|
|
|
116
128
|
|
|
117
129
|
function $d90ab02c74e9be0c$export$c13f210c706eb549(props) {
|
|
118
|
-
let { children: children
|
|
119
|
-
let { direction: direction
|
|
130
|
+
let { children: children, isCurrent: isCurrent, isDisabled: isDisabled, isMenu: isMenu } = props;
|
|
131
|
+
let { direction: direction } = (0, $8bWUw$reactariai18n.useLocale)();
|
|
120
132
|
let ref = (0, $8bWUw$react.useRef)(null);
|
|
121
|
-
let
|
|
133
|
+
let ElementType = props.href ? "a" : "span";
|
|
134
|
+
let { itemProps: itemProps } = (0, $8bWUw$reactariabreadcrumbs.useBreadcrumbItem)({
|
|
122
135
|
...props,
|
|
123
|
-
elementType:
|
|
136
|
+
elementType: ElementType
|
|
124
137
|
}, ref);
|
|
125
|
-
let { hoverProps: hoverProps
|
|
126
|
-
|
|
138
|
+
let { hoverProps: hoverProps, isHovered: isHovered } = (0, $8bWUw$reactariainteractions.useHover)(props);
|
|
139
|
+
// If this item contains a menu button, then it shouldn't be a link.
|
|
140
|
+
if (isMenu) itemProps = {};
|
|
141
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($8bWUw$react))).createElement((0, $8bWUw$react.Fragment), null, /*#__PURE__*/ (0, ($parcel$interopDefault($8bWUw$react))).createElement((0, $8bWUw$reactariafocus.FocusRing), {
|
|
142
|
+
focusRingClass: (0, $8bWUw$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($3292ef9f328419fc$exports))), "focus-ring")
|
|
143
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($8bWUw$react))).createElement(ElementType, {
|
|
127
144
|
...(0, $8bWUw$reactariautils.mergeProps)(itemProps, hoverProps),
|
|
128
145
|
ref: ref,
|
|
129
|
-
className: (0, $8bWUw$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($3292ef9f328419fc$exports))),
|
|
146
|
+
className: (0, $8bWUw$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($3292ef9f328419fc$exports))), {
|
|
147
|
+
"spectrum-Breadcrumbs-itemLink": !isMenu,
|
|
130
148
|
"is-disabled": !isCurrent && isDisabled,
|
|
131
149
|
"is-hovered": isHovered
|
|
132
150
|
})
|
|
133
|
-
})
|
|
134
|
-
return /*#__PURE__*/ (0, ($parcel$interopDefault($8bWUw$react))).createElement((0, $8bWUw$react.Fragment), null, /*#__PURE__*/ (0, ($parcel$interopDefault($8bWUw$react))).createElement((0, $8bWUw$reactariafocus.FocusRing), {
|
|
135
|
-
focusRingClass: (0, $8bWUw$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($3292ef9f328419fc$exports))), "focus-ring")
|
|
136
|
-
}, element), isCurrent === false && /*#__PURE__*/ (0, ($parcel$interopDefault($8bWUw$react))).createElement((0, ($parcel$interopDefault($8bWUw$spectrumiconsuiChevronRightSmall))), {
|
|
151
|
+
}, children)), /*#__PURE__*/ (0, ($parcel$interopDefault($8bWUw$react))).createElement((0, ($parcel$interopDefault($8bWUw$spectrumiconsuiChevronRightSmall))), {
|
|
137
152
|
UNSAFE_className: (0, $8bWUw$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($3292ef9f328419fc$exports))), "spectrum-Breadcrumbs-itemSeparator", {
|
|
138
153
|
"is-reversed": direction === "rtl"
|
|
139
154
|
})
|
|
@@ -153,17 +168,22 @@ const $299bf776d9162a05$var$MIN_VISIBLE_ITEMS = 1;
|
|
|
153
168
|
const $299bf776d9162a05$var$MAX_VISIBLE_ITEMS = 4;
|
|
154
169
|
function $299bf776d9162a05$var$Breadcrumbs(props, ref) {
|
|
155
170
|
props = (0, $8bWUw$reactspectrumprovider.useProviderProps)(props);
|
|
156
|
-
let { size: size = "L"
|
|
171
|
+
let { size: size = "L", isMultiline: isMultiline, children: children, showRoot: showRoot, isDisabled: isDisabled, onAction: onAction, autoFocusCurrent: autoFocusCurrent, ...otherProps } = props;
|
|
157
172
|
// Not using React.Children.toArray because it mutates the key prop.
|
|
158
173
|
let childArray = [];
|
|
159
|
-
(0, ($parcel$interopDefault($8bWUw$react))).Children.forEach(children, (child)=>{
|
|
160
|
-
if (/*#__PURE__*/ (0, ($parcel$interopDefault($8bWUw$react))).isValidElement(child))
|
|
174
|
+
(0, ($parcel$interopDefault($8bWUw$react))).Children.forEach(children, (child, index)=>{
|
|
175
|
+
if (/*#__PURE__*/ (0, ($parcel$interopDefault($8bWUw$react))).isValidElement(child)) {
|
|
176
|
+
if (child.key == null) child = /*#__PURE__*/ (0, ($parcel$interopDefault($8bWUw$react))).cloneElement(child, {
|
|
177
|
+
key: index
|
|
178
|
+
});
|
|
179
|
+
childArray.push(child);
|
|
180
|
+
}
|
|
161
181
|
});
|
|
162
182
|
let domRef = (0, $8bWUw$reactspectrumutils.useDOMRef)(ref);
|
|
163
183
|
let listRef = (0, $8bWUw$react.useRef)(null);
|
|
164
184
|
let [visibleItems, setVisibleItems] = (0, $8bWUw$reactariautils.useValueEffect)(childArray.length);
|
|
165
|
-
let { navProps: navProps
|
|
166
|
-
let { styleProps: styleProps
|
|
185
|
+
let { navProps: navProps } = (0, $8bWUw$reactariabreadcrumbs.useBreadcrumbs)(props);
|
|
186
|
+
let { styleProps: styleProps } = (0, $8bWUw$reactspectrumutils.useStyleProps)(otherProps);
|
|
167
187
|
let updateOverflow = (0, $8bWUw$react.useCallback)(()=>{
|
|
168
188
|
let computeVisibleItems = (visibleItems)=>{
|
|
169
189
|
// Refs can be null at runtime.
|
|
@@ -240,8 +260,10 @@ function $299bf776d9162a05$var$Breadcrumbs(props, ref) {
|
|
|
240
260
|
if (key !== selectedKey && onAction) onAction(key);
|
|
241
261
|
};
|
|
242
262
|
let menuItem = /*#__PURE__*/ (0, ($parcel$interopDefault($8bWUw$react))).createElement((0, $d90ab02c74e9be0c$export$c13f210c706eb549), {
|
|
243
|
-
key: "menu"
|
|
263
|
+
key: "menu",
|
|
264
|
+
isMenu: true
|
|
244
265
|
}, /*#__PURE__*/ (0, ($parcel$interopDefault($8bWUw$react))).createElement((0, $8bWUw$reactspectrummenu.MenuTrigger), null, /*#__PURE__*/ (0, ($parcel$interopDefault($8bWUw$react))).createElement((0, $8bWUw$reactspectrumbutton.ActionButton), {
|
|
266
|
+
UNSAFE_className: (0, $8bWUw$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($3292ef9f328419fc$exports))), "spectrum-Breadcrumbs-actionButton"),
|
|
245
267
|
"aria-label": "…",
|
|
246
268
|
isQuiet: true,
|
|
247
269
|
isDisabled: isDisabled
|
|
@@ -278,6 +300,7 @@ function $299bf776d9162a05$var$Breadcrumbs(props, ref) {
|
|
|
278
300
|
key: index,
|
|
279
301
|
className: (0, $8bWUw$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($3292ef9f328419fc$exports))), "spectrum-Breadcrumbs-item")
|
|
280
302
|
}, /*#__PURE__*/ (0, ($parcel$interopDefault($8bWUw$react))).createElement((0, $d90ab02c74e9be0c$export$c13f210c706eb549), {
|
|
303
|
+
...child.props,
|
|
281
304
|
key: key,
|
|
282
305
|
isCurrent: isCurrent,
|
|
283
306
|
isDisabled: isDisabled,
|
package/dist/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC,GACD,0CAA0C;ACX1C;;;;;;;;;;CAUC;ACVD;;;;;;;;;;CAUC;;;;;;;;;;;;;;;;;;;;;;;ACVD,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AAC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,cAAW;YACX,SAAA;YACA,YAAY;yBACZ,0DAAC,CAAA,GAAA,gEAAe,yBAElB,0DAAC,CAAA,GAAA,6BAAG;YAAE,eAAc;YAAS,cAAc;gBAAC;aAAY;YAAE,UAAU;WACjE;QAMT,WAAW;YAAC;SAAS;QACrB,IAAI,cAAc;eAAI;SAAW;QACjC,IAAI,WAAW;QACf,IAAI,YAAY,eAAe,GAAG;YAChC,IAAI,WAAW,YAAY;YAC3B,IAAI,UACF,SAAS,QAAQ;YAEnB;QACF;QACA,SAAS,QAAQ,YAAY,MAAM,CAAC;IACtC;IAEA,IAAI,YAAY,SAAS,SAAS;IAClC,IAAI,kBAAkB,SAAS,IAAI,CAAC,OAAO;QACzC,IAAI,YAAY,UAAU;YAChB;QAAV,IAAI,MAAM,CAAA,aAAA,MAAM,iBAAN,wBAAA,aAAa;QACvB,IAAI,UAAU;YACZ,IAAI,UACF,SAAS;QAEb;QAEA,qBACE,0DAAC;YACC,KAAK;YACL,WACE,CAAA,GAAA,oCAAS,EACP,CAAA,GAAA,gEAAK,GACL;yBAGJ,0DAAC,CAAA,GAAA,yCAAa;YACZ,KAAK;YACL,WAAW;YACX,YAAY;YACZ,SAAS;YACT,WAAW,aAAa;WACvB,MAAM,MAAM;IAIrB;IAEA,qBACE,0DAAC;QACE,GAAG,UAAU;QACb,GAAG,QAAQ;QACZ,KAAK;qBACL,0DAAC;QACC,KAAK;QACL,WACE,CAAA,GAAA,oCAAS,EACP,CAAA,GAAA,gEAAK,GACL,wBACA;YACE,+BAA+B,SAAS;YACxC,gCAAgC,SAAS;YACzC,mCAAmC;YACnC,kCAAkC;YAClC,eAAe;QACjB,GACA,WAAW;OAGd;AAIT;AAEA;;CAEC,GACD,IAAI,yDAAe,CAAA,GAAA,sCAAI,EAAE,WAAW;","sources":["packages/@react-spectrum/breadcrumbs/src/index.ts","packages/@react-spectrum/breadcrumbs/src/Breadcrumbs.tsx","packages/@react-spectrum/breadcrumbs/src/BreadcrumbItem.tsx","packages/@adobe/spectrum-css-temp/components/breadcrumb/vars.css"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n/// <reference types=\"css-module-types\" />\nexport {Breadcrumbs} from './Breadcrumbs';\nexport {Item} from '@react-stately/collections';\nexport type {SpectrumBreadcrumbsProps} from '@react-types/breadcrumbs';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\nimport {ActionButton} from '@react-spectrum/button';\nimport {BreadcrumbItem} from './BreadcrumbItem';\nimport {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport FolderBreadcrumb from '@spectrum-icons/ui/FolderBreadcrumb';\nimport {Menu, MenuTrigger} from '@react-spectrum/menu';\nimport React, {Key, ReactElement, useCallback, useRef} from 'react';\nimport {SpectrumBreadcrumbsProps} from '@react-types/breadcrumbs';\nimport styles from '@adobe/spectrum-css-temp/components/breadcrumb/vars.css';\nimport {useBreadcrumbs} from '@react-aria/breadcrumbs';\nimport {useLayoutEffect, useResizeObserver, useValueEffect} from '@react-aria/utils';\nimport {useProviderProps} from '@react-spectrum/provider';\n\nconst MIN_VISIBLE_ITEMS = 1;\nconst MAX_VISIBLE_ITEMS = 4;\n\nfunction Breadcrumbs<T>(props: SpectrumBreadcrumbsProps<T>, ref: DOMRef) {\n props = useProviderProps(props);\n let {\n size = 'L',\n isMultiline,\n children,\n showRoot,\n isDisabled,\n onAction,\n autoFocusCurrent,\n ...otherProps\n } = props;\n\n // Not using React.Children.toArray because it mutates the key prop.\n let childArray: ReactElement[] = [];\n React.Children.forEach(children, child => {\n if (React.isValidElement(child)) {\n childArray.push(child);\n }\n });\n\n let domRef = useDOMRef(ref);\n let listRef = useRef<HTMLUListElement>(null);\n\n let [visibleItems, setVisibleItems] = useValueEffect(childArray.length);\n\n let {navProps} = useBreadcrumbs(props);\n let {styleProps} = useStyleProps(otherProps);\n\n let updateOverflow = useCallback(() => {\n let computeVisibleItems = (visibleItems: number): number => {\n // Refs can be null at runtime.\n let currListRef: HTMLUListElement | null = listRef.current;\n if (!currListRef) {\n return visibleItems;\n }\n\n let listItems = Array.from(currListRef.children) as HTMLLIElement[];\n if (listItems.length <= 0) {\n return visibleItems;\n }\n let containerWidth = currListRef.offsetWidth;\n let isShowingMenu = childArray.length > visibleItems;\n let calculatedWidth = 0;\n let newVisibleItems = 0;\n let maxVisibleItems = MAX_VISIBLE_ITEMS;\n\n if (showRoot) {\n calculatedWidth += (listItems.shift() as HTMLLIElement).offsetWidth;\n newVisibleItems++;\n }\n\n if (isShowingMenu) {\n calculatedWidth += (listItems.shift() as HTMLLIElement).offsetWidth;\n maxVisibleItems--;\n }\n\n if (showRoot && calculatedWidth >= containerWidth) {\n newVisibleItems--;\n }\n\n // TODO: what if multiline and only one breadcrumb??\n if (isMultiline) {\n listItems.pop();\n newVisibleItems++;\n } else {\n if (listItems.length > 0) {\n // Ensure the last breadcrumb isn't truncated when we measure it.\n let last = (listItems.pop() as HTMLLIElement);\n last.style.overflow = 'visible';\n\n calculatedWidth += last.offsetWidth;\n if (calculatedWidth < containerWidth) {\n newVisibleItems++;\n }\n\n last.style.overflow = '';\n }\n }\n\n for (let breadcrumb of listItems.reverse()) {\n calculatedWidth += breadcrumb.offsetWidth;\n if (calculatedWidth < containerWidth) {\n newVisibleItems++;\n }\n }\n\n return Math.max(MIN_VISIBLE_ITEMS, Math.min(maxVisibleItems, newVisibleItems));\n };\n\n setVisibleItems(function *() {\n // Update to show all items.\n yield childArray.length;\n\n // Measure, and update to show the items that fit.\n let newVisibleItems = computeVisibleItems(childArray.length);\n yield newVisibleItems;\n\n // If the number of items is less than the number of children,\n // then update again to ensure that the menu fits.\n if (newVisibleItems < childArray.length && newVisibleItems > 1) {\n yield computeVisibleItems(newVisibleItems);\n }\n });\n }, [childArray.length, setVisibleItems, showRoot, isMultiline]);\n\n useResizeObserver({ref: domRef, onResize: updateOverflow});\n\n let lastChildren = useRef<typeof children | null>(null);\n useLayoutEffect(() => {\n if (children !== lastChildren.current) {\n lastChildren.current = children;\n updateOverflow();\n }\n });\n\n let contents = childArray;\n if (childArray.length > visibleItems) {\n let selectedItem = childArray[childArray.length - 1];\n let selectedKey = selectedItem.key ?? childArray.length - 1;\n let onMenuAction = (key: Key) => {\n // Don't fire onAction when clicking on the last item\n if (key !== selectedKey && onAction) {\n onAction(key);\n }\n };\n\n let menuItem = (\n <BreadcrumbItem key=\"menu\">\n <MenuTrigger>\n <ActionButton\n aria-label=\"…\"\n isQuiet\n isDisabled={isDisabled}>\n <FolderBreadcrumb />\n </ActionButton>\n <Menu selectionMode=\"single\" selectedKeys={[selectedKey]} onAction={onMenuAction}>\n {childArray}\n </Menu>\n </MenuTrigger>\n </BreadcrumbItem>\n );\n\n contents = [menuItem];\n let breadcrumbs = [...childArray];\n let endItems = visibleItems;\n if (showRoot && visibleItems > 1) {\n let rootItem = breadcrumbs.shift();\n if (rootItem) {\n contents.unshift(rootItem);\n }\n endItems--;\n }\n contents.push(...breadcrumbs.slice(-endItems));\n }\n\n let lastIndex = contents.length - 1;\n let breadcrumbItems = contents.map((child, index) => {\n let isCurrent = index === lastIndex;\n let key = child.key ?? index;\n let onPress = () => {\n if (onAction) {\n onAction(key);\n }\n };\n\n return (\n <li\n key={index}\n className={\n classNames(\n styles,\n 'spectrum-Breadcrumbs-item'\n )\n }>\n <BreadcrumbItem\n key={key}\n isCurrent={isCurrent}\n isDisabled={isDisabled}\n onPress={onPress}\n autoFocus={isCurrent && autoFocusCurrent}>\n {child.props.children}\n </BreadcrumbItem>\n </li>\n );\n });\n\n return (\n <nav\n {...styleProps}\n {...navProps}\n ref={domRef}>\n <ul\n ref={listRef}\n className={\n classNames(\n styles,\n 'spectrum-Breadcrumbs',\n {\n 'spectrum-Breadcrumbs--small': size === 'S',\n 'spectrum-Breadcrumbs--medium': size === 'M',\n 'spectrum-Breadcrumbs--multiline': isMultiline,\n 'spectrum-Breadcrumbs--showRoot': showRoot,\n 'is-disabled': isDisabled\n },\n styleProps.className\n )\n }>\n {breadcrumbItems}\n </ul>\n </nav>\n );\n}\n\n/**\n * Breadcrumbs show hierarchy and navigational context for a user’s location within an application.\n */\nlet _Breadcrumbs = React.forwardRef(Breadcrumbs);\nexport {_Breadcrumbs as Breadcrumbs};\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {BreadcrumbItemProps} from '@react-types/breadcrumbs';\nimport ChevronRightSmall from '@spectrum-icons/ui/ChevronRightSmall';\nimport {classNames, getWrappedElement} from '@react-spectrum/utils';\nimport {FocusRing} from '@react-aria/focus';\nimport {mergeProps} from '@react-aria/utils';\nimport React, {Fragment, useRef} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/breadcrumb/vars.css';\nimport {useBreadcrumbItem} from '@react-aria/breadcrumbs';\nimport {useHover} from '@react-aria/interactions';\nimport {useLocale} from '@react-aria/i18n';\n\nexport function BreadcrumbItem(props: BreadcrumbItemProps) {\n let {\n children,\n isCurrent,\n isDisabled\n } = props;\n\n let {direction} = useLocale();\n let ref = useRef(null);\n let {itemProps} = useBreadcrumbItem({\n ...props,\n elementType: typeof children === 'string' ? 'span' : 'a'\n }, ref);\n let {hoverProps, isHovered} = useHover(props);\n\n let element = React.cloneElement(\n getWrappedElement(children),\n {\n ...mergeProps(itemProps, hoverProps),\n ref,\n className:\n classNames(\n styles,\n 'spectrum-Breadcrumbs-itemLink',\n {\n 'is-disabled': !isCurrent && isDisabled,\n 'is-hovered': isHovered\n }\n )\n }\n );\n\n return (\n <Fragment>\n <FocusRing focusRingClass={classNames(styles, 'focus-ring')}>\n {element}\n </FocusRing>\n {isCurrent === false &&\n <ChevronRightSmall\n UNSAFE_className={\n classNames(\n styles,\n 'spectrum-Breadcrumbs-itemSeparator',\n {\n 'is-reversed': direction === 'rtl'\n }\n )\n } />\n }\n </Fragment>\n );\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"main.js.map"}
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC,GACD,0CAA0C;ACX1C;;;;;;;;;;CAUC;ACVD;;;;;;;;;;CAUC;;;;;;;;;;;;;;;;;;;;;;;;;;;ACVD,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,I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AAa;QACvB,IAAI,UAAU;YACZ,IAAI,UACF,SAAS;QAEb;QAEA,qBACE,0DAAC;YACC,KAAK;YACL,WACE,CAAA,GAAA,oCAAS,EACP,CAAA,GAAA,gEAAK,GACL;yBAGJ,0DAAC,CAAA,GAAA,yCAAa;YACX,GAAG,MAAM,KAAK;YACf,KAAK;YACL,WAAW;YACX,YAAY;YACZ,SAAS;YACT,WAAW,aAAa;WACvB,MAAM,MAAM;IAIrB;IAEA,qBACE,0DAAC;QACE,GAAG,UAAU;QACb,GAAG,QAAQ;QACZ,KAAK;qBACL,0DAAC;QACC,KAAK;QACL,WACE,CAAA,GAAA,oCAAS,EACP,CAAA,GAAA,gEAAK,GACL,wBACA;YACE,+BAA+B,SAAS;YACxC,gCAAgC,SAAS;YACzC,mCAAmC;YACnC,kCAAkC;YAClC,eAAe;QACjB,GACA,WAAW;OAGd;AAIT;AAEA;;CAEC,GACD,IAAI,yDAAe,CAAA,GAAA,sCAAI,EAAE,WAAW;","sources":["packages/@react-spectrum/breadcrumbs/src/index.ts","packages/@react-spectrum/breadcrumbs/src/Breadcrumbs.tsx","packages/@react-spectrum/breadcrumbs/src/BreadcrumbItem.tsx","packages/@adobe/spectrum-css-temp/components/breadcrumb/vars.css"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n/// <reference types=\"css-module-types\" />\nexport {Breadcrumbs} from './Breadcrumbs';\nexport {Item} from '@react-stately/collections';\nexport type {SpectrumBreadcrumbsProps} from '@react-types/breadcrumbs';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\nimport {ActionButton} from '@react-spectrum/button';\nimport {BreadcrumbItem} from './BreadcrumbItem';\nimport {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport FolderBreadcrumb from '@spectrum-icons/ui/FolderBreadcrumb';\nimport {Menu, MenuTrigger} from '@react-spectrum/menu';\nimport React, {Key, ReactElement, useCallback, useRef} from 'react';\nimport {SpectrumBreadcrumbsProps} from '@react-types/breadcrumbs';\nimport styles from '@adobe/spectrum-css-temp/components/breadcrumb/vars.css';\nimport {useBreadcrumbs} from '@react-aria/breadcrumbs';\nimport {useLayoutEffect, useResizeObserver, useValueEffect} from '@react-aria/utils';\nimport {useProviderProps} from '@react-spectrum/provider';\n\nconst MIN_VISIBLE_ITEMS = 1;\nconst MAX_VISIBLE_ITEMS = 4;\n\nfunction Breadcrumbs<T>(props: SpectrumBreadcrumbsProps<T>, ref: DOMRef) {\n props = useProviderProps(props);\n let {\n size = 'L',\n isMultiline,\n children,\n showRoot,\n isDisabled,\n onAction,\n autoFocusCurrent,\n ...otherProps\n } = props;\n\n // Not using React.Children.toArray because it mutates the key prop.\n let childArray: ReactElement[] = [];\n React.Children.forEach(children, (child, index) => {\n if (React.isValidElement(child)) {\n if (child.key == null) {\n child = React.cloneElement(child, {key: index});\n }\n childArray.push(child);\n }\n });\n\n let domRef = useDOMRef(ref);\n let listRef = useRef<HTMLUListElement>(null);\n\n let [visibleItems, setVisibleItems] = useValueEffect(childArray.length);\n\n let {navProps} = useBreadcrumbs(props);\n let {styleProps} = useStyleProps(otherProps);\n\n let updateOverflow = useCallback(() => {\n let computeVisibleItems = (visibleItems: number): number => {\n // Refs can be null at runtime.\n let currListRef: HTMLUListElement | null = listRef.current;\n if (!currListRef) {\n return visibleItems;\n }\n\n let listItems = Array.from(currListRef.children) as HTMLLIElement[];\n if (listItems.length <= 0) {\n return visibleItems;\n }\n let containerWidth = currListRef.offsetWidth;\n let isShowingMenu = childArray.length > visibleItems;\n let calculatedWidth = 0;\n let newVisibleItems = 0;\n let maxVisibleItems = MAX_VISIBLE_ITEMS;\n\n if (showRoot) {\n calculatedWidth += (listItems.shift() as HTMLLIElement).offsetWidth;\n newVisibleItems++;\n }\n\n if (isShowingMenu) {\n calculatedWidth += (listItems.shift() as HTMLLIElement).offsetWidth;\n maxVisibleItems--;\n }\n\n if (showRoot && calculatedWidth >= containerWidth) {\n newVisibleItems--;\n }\n\n // TODO: what if multiline and only one breadcrumb??\n if (isMultiline) {\n listItems.pop();\n newVisibleItems++;\n } else {\n if (listItems.length > 0) {\n // Ensure the last breadcrumb isn't truncated when we measure it.\n let last = (listItems.pop() as HTMLLIElement);\n last.style.overflow = 'visible';\n\n calculatedWidth += last.offsetWidth;\n if (calculatedWidth < containerWidth) {\n newVisibleItems++;\n }\n\n last.style.overflow = '';\n }\n }\n\n for (let breadcrumb of listItems.reverse()) {\n calculatedWidth += breadcrumb.offsetWidth;\n if (calculatedWidth < containerWidth) {\n newVisibleItems++;\n }\n }\n\n return Math.max(MIN_VISIBLE_ITEMS, Math.min(maxVisibleItems, newVisibleItems));\n };\n\n setVisibleItems(function *() {\n // Update to show all items.\n yield childArray.length;\n\n // Measure, and update to show the items that fit.\n let newVisibleItems = computeVisibleItems(childArray.length);\n yield newVisibleItems;\n\n // If the number of items is less than the number of children,\n // then update again to ensure that the menu fits.\n if (newVisibleItems < childArray.length && newVisibleItems > 1) {\n yield computeVisibleItems(newVisibleItems);\n }\n });\n }, [childArray.length, setVisibleItems, showRoot, isMultiline]);\n\n useResizeObserver({ref: domRef, onResize: updateOverflow});\n\n let lastChildren = useRef<typeof children | null>(null);\n useLayoutEffect(() => {\n if (children !== lastChildren.current) {\n lastChildren.current = children;\n updateOverflow();\n }\n });\n\n let contents = childArray;\n if (childArray.length > visibleItems) {\n let selectedItem = childArray[childArray.length - 1];\n let selectedKey = selectedItem.key ?? childArray.length - 1;\n let onMenuAction = (key: Key) => {\n // Don't fire onAction when clicking on the last item\n if (key !== selectedKey && onAction) {\n onAction(key);\n }\n };\n\n let menuItem = (\n <BreadcrumbItem key=\"menu\" isMenu>\n <MenuTrigger>\n <ActionButton\n UNSAFE_className={classNames(styles, 'spectrum-Breadcrumbs-actionButton')}\n aria-label=\"…\"\n isQuiet\n isDisabled={isDisabled}>\n <FolderBreadcrumb />\n </ActionButton>\n <Menu selectionMode=\"single\" selectedKeys={[selectedKey]} onAction={onMenuAction}>\n {childArray}\n </Menu>\n </MenuTrigger>\n </BreadcrumbItem>\n );\n\n contents = [menuItem];\n let breadcrumbs = [...childArray];\n let endItems = visibleItems;\n if (showRoot && visibleItems > 1) {\n let rootItem = breadcrumbs.shift();\n if (rootItem) {\n contents.unshift(rootItem);\n }\n endItems--;\n }\n contents.push(...breadcrumbs.slice(-endItems));\n }\n\n let lastIndex = contents.length - 1;\n let breadcrumbItems = contents.map((child, index) => {\n let isCurrent = index === lastIndex;\n let key = child.key ?? index;\n let onPress = () => {\n if (onAction) {\n onAction(key);\n }\n };\n\n return (\n <li\n key={index}\n className={\n classNames(\n styles,\n 'spectrum-Breadcrumbs-item'\n )\n }>\n <BreadcrumbItem\n {...child.props}\n key={key}\n isCurrent={isCurrent}\n isDisabled={isDisabled}\n onPress={onPress}\n autoFocus={isCurrent && autoFocusCurrent}>\n {child.props.children}\n </BreadcrumbItem>\n </li>\n );\n });\n\n return (\n <nav\n {...styleProps}\n {...navProps}\n ref={domRef}>\n <ul\n ref={listRef}\n className={\n classNames(\n styles,\n 'spectrum-Breadcrumbs',\n {\n 'spectrum-Breadcrumbs--small': size === 'S',\n 'spectrum-Breadcrumbs--medium': size === 'M',\n 'spectrum-Breadcrumbs--multiline': isMultiline,\n 'spectrum-Breadcrumbs--showRoot': showRoot,\n 'is-disabled': isDisabled\n },\n styleProps.className\n )\n }>\n {breadcrumbItems}\n </ul>\n </nav>\n );\n}\n\n/**\n * Breadcrumbs show hierarchy and navigational context for a user’s location within an application.\n */\nlet _Breadcrumbs = React.forwardRef(Breadcrumbs);\nexport {_Breadcrumbs as Breadcrumbs};\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {BreadcrumbItemProps} from '@react-types/breadcrumbs';\nimport ChevronRightSmall from '@spectrum-icons/ui/ChevronRightSmall';\nimport {classNames} from '@react-spectrum/utils';\nimport {FocusRing} from '@react-aria/focus';\nimport {mergeProps} from '@react-aria/utils';\nimport React, {Fragment, useRef} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/breadcrumb/vars.css';\nimport {useBreadcrumbItem} from '@react-aria/breadcrumbs';\nimport {useHover} from '@react-aria/interactions';\nimport {useLocale} from '@react-aria/i18n';\n\ninterface SpectrumBreadcrumbItemProps extends BreadcrumbItemProps {\n isMenu?: boolean\n}\n\nexport function BreadcrumbItem(props: SpectrumBreadcrumbItemProps) {\n let {\n children,\n isCurrent,\n isDisabled,\n isMenu\n } = props;\n\n let {direction} = useLocale();\n let ref = useRef(null);\n let ElementType: React.ElementType = props.href ? 'a' : 'span';\n let {itemProps} = useBreadcrumbItem({\n ...props,\n elementType: ElementType\n }, ref);\n let {hoverProps, isHovered} = useHover(props);\n\n // If this item contains a menu button, then it shouldn't be a link.\n if (isMenu) {\n itemProps = {};\n }\n\n return (\n <Fragment>\n <FocusRing focusRingClass={classNames(styles, 'focus-ring')}>\n <ElementType\n {...mergeProps(itemProps, hoverProps)}\n ref={ref}\n className={\n classNames(\n styles,\n {\n 'spectrum-Breadcrumbs-itemLink': !isMenu,\n 'is-disabled': !isCurrent && isDisabled,\n 'is-hovered': isHovered\n }\n )\n }>\n {children}\n </ElementType>\n </FocusRing>\n <ChevronRightSmall\n UNSAFE_className={\n classNames(\n styles,\n 'spectrum-Breadcrumbs-itemSeparator',\n {\n 'is-reversed': direction === 'rtl'\n }\n )\n } />\n </Fragment>\n );\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"main.js.map"}
|
package/dist/module.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./main.css";
|
|
2
2
|
import {Item as $37781313afe0968e$re_export$Item} from "@react-stately/collections";
|
|
3
3
|
import {ActionButton as $koRP3$ActionButton} from "@react-spectrum/button";
|
|
4
|
-
import {useDOMRef as $koRP3$useDOMRef, useStyleProps as $koRP3$useStyleProps, classNames as $koRP3$classNames
|
|
4
|
+
import {useDOMRef as $koRP3$useDOMRef, useStyleProps as $koRP3$useStyleProps, classNames as $koRP3$classNames} from "@react-spectrum/utils";
|
|
5
5
|
import $koRP3$spectrumiconsuiFolderBreadcrumb from "@spectrum-icons/ui/FolderBreadcrumb";
|
|
6
6
|
import {MenuTrigger as $koRP3$MenuTrigger, Menu as $koRP3$Menu} from "@react-spectrum/menu";
|
|
7
7
|
import $koRP3$react, {useRef as $koRP3$useRef, useCallback as $koRP3$useCallback, Fragment as $koRP3$Fragment} from "react";
|
|
@@ -58,79 +58,94 @@ function $parcel$export(e, n, v, s) {
|
|
|
58
58
|
|
|
59
59
|
var $48e85557f3729e3d$exports = {};
|
|
60
60
|
|
|
61
|
-
$parcel$export($48e85557f3729e3d$exports, "spectrum-Breadcrumbs", () => $48e85557f3729e3d$export$8c6320d2db82081f, (v) => $48e85557f3729e3d$export$8c6320d2db82081f = v);
|
|
62
|
-
$parcel$export($48e85557f3729e3d$exports, "spectrum-Breadcrumbs-itemSeparator", () => $48e85557f3729e3d$export$f72910e36cd91d1e, (v) => $48e85557f3729e3d$export$f72910e36cd91d1e = v);
|
|
63
|
-
$parcel$export($48e85557f3729e3d$exports, "is-reversed", () => $48e85557f3729e3d$export$a4561bd665abb5db, (v) => $48e85557f3729e3d$export$a4561bd665abb5db = v);
|
|
64
|
-
$parcel$export($48e85557f3729e3d$exports, "spectrum-Breadcrumbs-item", () => $48e85557f3729e3d$export$492a5983c5fbf603, (v) => $48e85557f3729e3d$export$492a5983c5fbf603 = v);
|
|
65
|
-
$parcel$export($48e85557f3729e3d$exports, "spectrum-ActionButton", () => $48e85557f3729e3d$export$53da69f51b770d3, (v) => $48e85557f3729e3d$export$53da69f51b770d3 = v);
|
|
66
|
-
$parcel$export($48e85557f3729e3d$exports, "spectrum-Breadcrumbs-itemLink", () => $48e85557f3729e3d$export$5af6a1bcd207d9f6, (v) => $48e85557f3729e3d$export$5af6a1bcd207d9f6 = v);
|
|
67
|
-
$parcel$export($48e85557f3729e3d$exports, "is-hovered", () => $48e85557f3729e3d$export$b8813cd5d7824ce7, (v) => $48e85557f3729e3d$export$b8813cd5d7824ce7 = v);
|
|
68
61
|
$parcel$export($48e85557f3729e3d$exports, "focus-ring", () => $48e85557f3729e3d$export$f39a09f249340e2a, (v) => $48e85557f3729e3d$export$f39a09f249340e2a = v);
|
|
62
|
+
$parcel$export($48e85557f3729e3d$exports, "i18nFontFamily", () => $48e85557f3729e3d$export$8c4ee2c50c22c514, (v) => $48e85557f3729e3d$export$8c4ee2c50c22c514 = v);
|
|
63
|
+
$parcel$export($48e85557f3729e3d$exports, "is-disabled", () => $48e85557f3729e3d$export$d35bc1e505d1ebbf, (v) => $48e85557f3729e3d$export$d35bc1e505d1ebbf = v);
|
|
69
64
|
$parcel$export($48e85557f3729e3d$exports, "is-dragged", () => $48e85557f3729e3d$export$8778c911bed6c759, (v) => $48e85557f3729e3d$export$8778c911bed6c759 = v);
|
|
70
|
-
$parcel$export($48e85557f3729e3d$exports, "
|
|
65
|
+
$parcel$export($48e85557f3729e3d$exports, "is-hovered", () => $48e85557f3729e3d$export$b8813cd5d7824ce7, (v) => $48e85557f3729e3d$export$b8813cd5d7824ce7 = v);
|
|
66
|
+
$parcel$export($48e85557f3729e3d$exports, "is-reversed", () => $48e85557f3729e3d$export$a4561bd665abb5db, (v) => $48e85557f3729e3d$export$a4561bd665abb5db = v);
|
|
67
|
+
$parcel$export($48e85557f3729e3d$exports, "is-selected", () => $48e85557f3729e3d$export$1e0fb04f31d3c22a, (v) => $48e85557f3729e3d$export$1e0fb04f31d3c22a = v);
|
|
68
|
+
$parcel$export($48e85557f3729e3d$exports, "spectrum-Breadcrumb", () => $48e85557f3729e3d$export$45a5316056cfac3c, (v) => $48e85557f3729e3d$export$45a5316056cfac3c = v);
|
|
69
|
+
$parcel$export($48e85557f3729e3d$exports, "spectrum-Breadcrumbs", () => $48e85557f3729e3d$export$8c6320d2db82081f, (v) => $48e85557f3729e3d$export$8c6320d2db82081f = v);
|
|
71
70
|
$parcel$export($48e85557f3729e3d$exports, "spectrum-Breadcrumbs--medium", () => $48e85557f3729e3d$export$19f957201d941895, (v) => $48e85557f3729e3d$export$19f957201d941895 = v);
|
|
72
71
|
$parcel$export($48e85557f3729e3d$exports, "spectrum-Breadcrumbs--multiline", () => $48e85557f3729e3d$export$713961e8e432825b, (v) => $48e85557f3729e3d$export$713961e8e432825b = v);
|
|
72
|
+
$parcel$export($48e85557f3729e3d$exports, "spectrum-Breadcrumbs--small", () => $48e85557f3729e3d$export$e01337e7944312f6, (v) => $48e85557f3729e3d$export$e01337e7944312f6 = v);
|
|
73
|
+
$parcel$export($48e85557f3729e3d$exports, "spectrum-Breadcrumbs-actionButton", () => $48e85557f3729e3d$export$9753a085493f5648, (v) => $48e85557f3729e3d$export$9753a085493f5648 = v);
|
|
74
|
+
$parcel$export($48e85557f3729e3d$exports, "spectrum-Breadcrumbs-item", () => $48e85557f3729e3d$export$492a5983c5fbf603, (v) => $48e85557f3729e3d$export$492a5983c5fbf603 = v);
|
|
75
|
+
$parcel$export($48e85557f3729e3d$exports, "spectrum-Breadcrumbs-itemLink", () => $48e85557f3729e3d$export$5af6a1bcd207d9f6, (v) => $48e85557f3729e3d$export$5af6a1bcd207d9f6 = v);
|
|
76
|
+
$parcel$export($48e85557f3729e3d$exports, "spectrum-Breadcrumbs-itemSeparator", () => $48e85557f3729e3d$export$f72910e36cd91d1e, (v) => $48e85557f3729e3d$export$f72910e36cd91d1e = v);
|
|
77
|
+
$parcel$export($48e85557f3729e3d$exports, "spectrum-FocusRing-ring", () => $48e85557f3729e3d$export$4109102f950813a6, (v) => $48e85557f3729e3d$export$4109102f950813a6 = v);
|
|
78
|
+
$parcel$export($48e85557f3729e3d$exports, "spectrum-FocusRing", () => $48e85557f3729e3d$export$24c7f46a6e3605dd, (v) => $48e85557f3729e3d$export$24c7f46a6e3605dd = v);
|
|
79
|
+
$parcel$export($48e85557f3729e3d$exports, "spectrum-FocusRing--quiet", () => $48e85557f3729e3d$export$2927016961429360, (v) => $48e85557f3729e3d$export$2927016961429360 = v);
|
|
73
80
|
$parcel$export($48e85557f3729e3d$exports, "spectrum-Heading--pageTitle", () => $48e85557f3729e3d$export$63e9e087a73f808b, (v) => $48e85557f3729e3d$export$63e9e087a73f808b = v);
|
|
74
|
-
$parcel$export($48e85557f3729e3d$exports, "is-disabled", () => $48e85557f3729e3d$export$d35bc1e505d1ebbf, (v) => $48e85557f3729e3d$export$d35bc1e505d1ebbf = v);
|
|
75
|
-
$parcel$export($48e85557f3729e3d$exports, "is-selected", () => $48e85557f3729e3d$export$1e0fb04f31d3c22a, (v) => $48e85557f3729e3d$export$1e0fb04f31d3c22a = v);
|
|
76
|
-
$parcel$export($48e85557f3729e3d$exports, "spectrum-Breadcrumb", () => $48e85557f3729e3d$export$45a5316056cfac3c, (v) => $48e85557f3729e3d$export$45a5316056cfac3c = v);
|
|
77
|
-
var $48e85557f3729e3d$export$8c6320d2db82081f;
|
|
78
|
-
var $48e85557f3729e3d$export$f72910e36cd91d1e;
|
|
79
|
-
var $48e85557f3729e3d$export$a4561bd665abb5db;
|
|
80
|
-
var $48e85557f3729e3d$export$492a5983c5fbf603;
|
|
81
|
-
var $48e85557f3729e3d$export$53da69f51b770d3;
|
|
82
|
-
var $48e85557f3729e3d$export$5af6a1bcd207d9f6;
|
|
83
|
-
var $48e85557f3729e3d$export$b8813cd5d7824ce7;
|
|
84
81
|
var $48e85557f3729e3d$export$f39a09f249340e2a;
|
|
82
|
+
var $48e85557f3729e3d$export$8c4ee2c50c22c514;
|
|
83
|
+
var $48e85557f3729e3d$export$d35bc1e505d1ebbf;
|
|
85
84
|
var $48e85557f3729e3d$export$8778c911bed6c759;
|
|
86
|
-
var $48e85557f3729e3d$export$
|
|
85
|
+
var $48e85557f3729e3d$export$b8813cd5d7824ce7;
|
|
86
|
+
var $48e85557f3729e3d$export$a4561bd665abb5db;
|
|
87
|
+
var $48e85557f3729e3d$export$1e0fb04f31d3c22a;
|
|
88
|
+
var $48e85557f3729e3d$export$45a5316056cfac3c;
|
|
89
|
+
var $48e85557f3729e3d$export$8c6320d2db82081f;
|
|
87
90
|
var $48e85557f3729e3d$export$19f957201d941895;
|
|
88
91
|
var $48e85557f3729e3d$export$713961e8e432825b;
|
|
92
|
+
var $48e85557f3729e3d$export$e01337e7944312f6;
|
|
93
|
+
var $48e85557f3729e3d$export$9753a085493f5648;
|
|
94
|
+
var $48e85557f3729e3d$export$492a5983c5fbf603;
|
|
95
|
+
var $48e85557f3729e3d$export$5af6a1bcd207d9f6;
|
|
96
|
+
var $48e85557f3729e3d$export$f72910e36cd91d1e;
|
|
97
|
+
var $48e85557f3729e3d$export$4109102f950813a6;
|
|
98
|
+
var $48e85557f3729e3d$export$24c7f46a6e3605dd;
|
|
99
|
+
var $48e85557f3729e3d$export$2927016961429360;
|
|
89
100
|
var $48e85557f3729e3d$export$63e9e087a73f808b;
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
$48e85557f3729e3d$export$
|
|
94
|
-
$48e85557f3729e3d$export$
|
|
95
|
-
$48e85557f3729e3d$export$a4561bd665abb5db =
|
|
96
|
-
$48e85557f3729e3d$export$
|
|
97
|
-
$48e85557f3729e3d$export$
|
|
98
|
-
$48e85557f3729e3d$export$
|
|
99
|
-
$48e85557f3729e3d$export$
|
|
100
|
-
$48e85557f3729e3d$export$
|
|
101
|
-
$48e85557f3729e3d$export$
|
|
102
|
-
$48e85557f3729e3d$export$
|
|
103
|
-
$48e85557f3729e3d$export$
|
|
104
|
-
$48e85557f3729e3d$export$
|
|
105
|
-
$48e85557f3729e3d$export$
|
|
106
|
-
$48e85557f3729e3d$export$
|
|
107
|
-
$48e85557f3729e3d$export$
|
|
108
|
-
$48e85557f3729e3d$export$
|
|
101
|
+
$48e85557f3729e3d$export$f39a09f249340e2a = `_1gDPVa_focus-ring`;
|
|
102
|
+
$48e85557f3729e3d$export$8c4ee2c50c22c514 = `_1gDPVa_i18nFontFamily`;
|
|
103
|
+
$48e85557f3729e3d$export$d35bc1e505d1ebbf = `_1gDPVa_is-disabled`;
|
|
104
|
+
$48e85557f3729e3d$export$8778c911bed6c759 = `_1gDPVa_is-dragged`;
|
|
105
|
+
$48e85557f3729e3d$export$b8813cd5d7824ce7 = `_1gDPVa_is-hovered`;
|
|
106
|
+
$48e85557f3729e3d$export$a4561bd665abb5db = `_1gDPVa_is-reversed`;
|
|
107
|
+
$48e85557f3729e3d$export$1e0fb04f31d3c22a = `_1gDPVa_is-selected`;
|
|
108
|
+
$48e85557f3729e3d$export$45a5316056cfac3c = `_1gDPVa_spectrum-Breadcrumb`;
|
|
109
|
+
$48e85557f3729e3d$export$8c6320d2db82081f = `_1gDPVa_spectrum-Breadcrumbs`;
|
|
110
|
+
$48e85557f3729e3d$export$19f957201d941895 = `_1gDPVa_spectrum-Breadcrumbs--medium`;
|
|
111
|
+
$48e85557f3729e3d$export$713961e8e432825b = `_1gDPVa_spectrum-Breadcrumbs--multiline`;
|
|
112
|
+
$48e85557f3729e3d$export$e01337e7944312f6 = `_1gDPVa_spectrum-Breadcrumbs--small`;
|
|
113
|
+
$48e85557f3729e3d$export$9753a085493f5648 = `_1gDPVa_spectrum-Breadcrumbs-actionButton`;
|
|
114
|
+
$48e85557f3729e3d$export$492a5983c5fbf603 = `_1gDPVa_spectrum-Breadcrumbs-item`;
|
|
115
|
+
$48e85557f3729e3d$export$5af6a1bcd207d9f6 = `_1gDPVa_spectrum-Breadcrumbs-itemLink`;
|
|
116
|
+
$48e85557f3729e3d$export$f72910e36cd91d1e = `_1gDPVa_spectrum-Breadcrumbs-itemSeparator`;
|
|
117
|
+
$48e85557f3729e3d$export$4109102f950813a6 = `_1gDPVa_spectrum-FocusRing-ring`;
|
|
118
|
+
$48e85557f3729e3d$export$24c7f46a6e3605dd = `_1gDPVa_spectrum-FocusRing ${$48e85557f3729e3d$export$4109102f950813a6}`;
|
|
119
|
+
$48e85557f3729e3d$export$2927016961429360 = `_1gDPVa_spectrum-FocusRing--quiet`;
|
|
120
|
+
$48e85557f3729e3d$export$63e9e087a73f808b = `_1gDPVa_spectrum-Heading--pageTitle`;
|
|
109
121
|
|
|
110
122
|
|
|
111
123
|
|
|
112
124
|
|
|
113
125
|
|
|
114
126
|
function $2bfa2c84c665c457$export$c13f210c706eb549(props) {
|
|
115
|
-
let { children: children
|
|
116
|
-
let { direction: direction
|
|
127
|
+
let { children: children, isCurrent: isCurrent, isDisabled: isDisabled, isMenu: isMenu } = props;
|
|
128
|
+
let { direction: direction } = (0, $koRP3$useLocale)();
|
|
117
129
|
let ref = (0, $koRP3$useRef)(null);
|
|
118
|
-
let
|
|
130
|
+
let ElementType = props.href ? "a" : "span";
|
|
131
|
+
let { itemProps: itemProps } = (0, $koRP3$useBreadcrumbItem)({
|
|
119
132
|
...props,
|
|
120
|
-
elementType:
|
|
133
|
+
elementType: ElementType
|
|
121
134
|
}, ref);
|
|
122
|
-
let { hoverProps: hoverProps
|
|
123
|
-
|
|
135
|
+
let { hoverProps: hoverProps, isHovered: isHovered } = (0, $koRP3$useHover)(props);
|
|
136
|
+
// If this item contains a menu button, then it shouldn't be a link.
|
|
137
|
+
if (isMenu) itemProps = {};
|
|
138
|
+
return /*#__PURE__*/ (0, $koRP3$react).createElement((0, $koRP3$Fragment), null, /*#__PURE__*/ (0, $koRP3$react).createElement((0, $koRP3$FocusRing), {
|
|
139
|
+
focusRingClass: (0, $koRP3$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($48e85557f3729e3d$exports))), "focus-ring")
|
|
140
|
+
}, /*#__PURE__*/ (0, $koRP3$react).createElement(ElementType, {
|
|
124
141
|
...(0, $koRP3$mergeProps)(itemProps, hoverProps),
|
|
125
142
|
ref: ref,
|
|
126
|
-
className: (0, $koRP3$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($48e85557f3729e3d$exports))),
|
|
143
|
+
className: (0, $koRP3$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($48e85557f3729e3d$exports))), {
|
|
144
|
+
"spectrum-Breadcrumbs-itemLink": !isMenu,
|
|
127
145
|
"is-disabled": !isCurrent && isDisabled,
|
|
128
146
|
"is-hovered": isHovered
|
|
129
147
|
})
|
|
130
|
-
})
|
|
131
|
-
return /*#__PURE__*/ (0, $koRP3$react).createElement((0, $koRP3$Fragment), null, /*#__PURE__*/ (0, $koRP3$react).createElement((0, $koRP3$FocusRing), {
|
|
132
|
-
focusRingClass: (0, $koRP3$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($48e85557f3729e3d$exports))), "focus-ring")
|
|
133
|
-
}, element), isCurrent === false && /*#__PURE__*/ (0, $koRP3$react).createElement((0, $koRP3$spectrumiconsuiChevronRightSmall), {
|
|
148
|
+
}, children)), /*#__PURE__*/ (0, $koRP3$react).createElement((0, $koRP3$spectrumiconsuiChevronRightSmall), {
|
|
134
149
|
UNSAFE_className: (0, $koRP3$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($48e85557f3729e3d$exports))), "spectrum-Breadcrumbs-itemSeparator", {
|
|
135
150
|
"is-reversed": direction === "rtl"
|
|
136
151
|
})
|
|
@@ -150,17 +165,22 @@ const $2adaf67aabd3300b$var$MIN_VISIBLE_ITEMS = 1;
|
|
|
150
165
|
const $2adaf67aabd3300b$var$MAX_VISIBLE_ITEMS = 4;
|
|
151
166
|
function $2adaf67aabd3300b$var$Breadcrumbs(props, ref) {
|
|
152
167
|
props = (0, $koRP3$useProviderProps)(props);
|
|
153
|
-
let { size: size = "L"
|
|
168
|
+
let { size: size = "L", isMultiline: isMultiline, children: children, showRoot: showRoot, isDisabled: isDisabled, onAction: onAction, autoFocusCurrent: autoFocusCurrent, ...otherProps } = props;
|
|
154
169
|
// Not using React.Children.toArray because it mutates the key prop.
|
|
155
170
|
let childArray = [];
|
|
156
|
-
(0, $koRP3$react).Children.forEach(children, (child)=>{
|
|
157
|
-
if (/*#__PURE__*/ (0, $koRP3$react).isValidElement(child))
|
|
171
|
+
(0, $koRP3$react).Children.forEach(children, (child, index)=>{
|
|
172
|
+
if (/*#__PURE__*/ (0, $koRP3$react).isValidElement(child)) {
|
|
173
|
+
if (child.key == null) child = /*#__PURE__*/ (0, $koRP3$react).cloneElement(child, {
|
|
174
|
+
key: index
|
|
175
|
+
});
|
|
176
|
+
childArray.push(child);
|
|
177
|
+
}
|
|
158
178
|
});
|
|
159
179
|
let domRef = (0, $koRP3$useDOMRef)(ref);
|
|
160
180
|
let listRef = (0, $koRP3$useRef)(null);
|
|
161
181
|
let [visibleItems, setVisibleItems] = (0, $koRP3$useValueEffect)(childArray.length);
|
|
162
|
-
let { navProps: navProps
|
|
163
|
-
let { styleProps: styleProps
|
|
182
|
+
let { navProps: navProps } = (0, $koRP3$useBreadcrumbs)(props);
|
|
183
|
+
let { styleProps: styleProps } = (0, $koRP3$useStyleProps)(otherProps);
|
|
164
184
|
let updateOverflow = (0, $koRP3$useCallback)(()=>{
|
|
165
185
|
let computeVisibleItems = (visibleItems)=>{
|
|
166
186
|
// Refs can be null at runtime.
|
|
@@ -237,8 +257,10 @@ function $2adaf67aabd3300b$var$Breadcrumbs(props, ref) {
|
|
|
237
257
|
if (key !== selectedKey && onAction) onAction(key);
|
|
238
258
|
};
|
|
239
259
|
let menuItem = /*#__PURE__*/ (0, $koRP3$react).createElement((0, $2bfa2c84c665c457$export$c13f210c706eb549), {
|
|
240
|
-
key: "menu"
|
|
260
|
+
key: "menu",
|
|
261
|
+
isMenu: true
|
|
241
262
|
}, /*#__PURE__*/ (0, $koRP3$react).createElement((0, $koRP3$MenuTrigger), null, /*#__PURE__*/ (0, $koRP3$react).createElement((0, $koRP3$ActionButton), {
|
|
263
|
+
UNSAFE_className: (0, $koRP3$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($48e85557f3729e3d$exports))), "spectrum-Breadcrumbs-actionButton"),
|
|
242
264
|
"aria-label": "…",
|
|
243
265
|
isQuiet: true,
|
|
244
266
|
isDisabled: isDisabled
|
|
@@ -275,6 +297,7 @@ function $2adaf67aabd3300b$var$Breadcrumbs(props, ref) {
|
|
|
275
297
|
key: index,
|
|
276
298
|
className: (0, $koRP3$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($48e85557f3729e3d$exports))), "spectrum-Breadcrumbs-item")
|
|
277
299
|
}, /*#__PURE__*/ (0, $koRP3$react).createElement((0, $2bfa2c84c665c457$export$c13f210c706eb549), {
|
|
300
|
+
...child.props,
|
|
278
301
|
key: key,
|
|
279
302
|
isCurrent: isCurrent,
|
|
280
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ACE,+BAA+B,SAAS;YACxC,gCAAgC,SAAS;YACzC,mCAAmC;YACnC,kCAAkC;YAClC,eAAe;QACjB,GACA,WAAW;OAGd;AAIT;AAEA;;CAEC,GACD,IAAI,yDAAe,CAAA,GAAA,YAAI,EAAE,WAAW;","sources":["packages/@react-spectrum/breadcrumbs/src/index.ts","packages/@react-spectrum/breadcrumbs/src/Breadcrumbs.tsx","packages/@react-spectrum/breadcrumbs/src/BreadcrumbItem.tsx","packages/@adobe/spectrum-css-temp/components/breadcrumb/vars.css"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n/// <reference types=\"css-module-types\" />\nexport {Breadcrumbs} from './Breadcrumbs';\nexport {Item} from '@react-stately/collections';\nexport type {SpectrumBreadcrumbsProps} from '@react-types/breadcrumbs';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\nimport {ActionButton} from '@react-spectrum/button';\nimport {BreadcrumbItem} from './BreadcrumbItem';\nimport {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport FolderBreadcrumb from '@spectrum-icons/ui/FolderBreadcrumb';\nimport {Menu, MenuTrigger} from '@react-spectrum/menu';\nimport React, {Key, ReactElement, useCallback, useRef} from 'react';\nimport {SpectrumBreadcrumbsProps} from '@react-types/breadcrumbs';\nimport styles from '@adobe/spectrum-css-temp/components/breadcrumb/vars.css';\nimport {useBreadcrumbs} from '@react-aria/breadcrumbs';\nimport {useLayoutEffect, useResizeObserver, useValueEffect} from '@react-aria/utils';\nimport {useProviderProps} from '@react-spectrum/provider';\n\nconst MIN_VISIBLE_ITEMS = 1;\nconst MAX_VISIBLE_ITEMS = 4;\n\nfunction Breadcrumbs<T>(props: SpectrumBreadcrumbsProps<T>, ref: DOMRef) {\n props = useProviderProps(props);\n let {\n size = 'L',\n isMultiline,\n children,\n showRoot,\n isDisabled,\n onAction,\n autoFocusCurrent,\n ...otherProps\n } = props;\n\n // Not using React.Children.toArray because it mutates the key prop.\n let childArray: ReactElement[] = [];\n React.Children.forEach(children, child => {\n if (React.isValidElement(child)) {\n childArray.push(child);\n }\n });\n\n let domRef = useDOMRef(ref);\n let listRef = useRef<HTMLUListElement>(null);\n\n let [visibleItems, setVisibleItems] = useValueEffect(childArray.length);\n\n let {navProps} = useBreadcrumbs(props);\n let {styleProps} = useStyleProps(otherProps);\n\n let updateOverflow = useCallback(() => {\n let computeVisibleItems = (visibleItems: number): number => {\n // Refs can be null at runtime.\n let currListRef: HTMLUListElement | null = listRef.current;\n if (!currListRef) {\n return visibleItems;\n }\n\n let listItems = Array.from(currListRef.children) as HTMLLIElement[];\n if (listItems.length <= 0) {\n return visibleItems;\n }\n let containerWidth = currListRef.offsetWidth;\n let isShowingMenu = childArray.length > visibleItems;\n let calculatedWidth = 0;\n let newVisibleItems = 0;\n let maxVisibleItems = MAX_VISIBLE_ITEMS;\n\n if (showRoot) {\n calculatedWidth += (listItems.shift() as HTMLLIElement).offsetWidth;\n newVisibleItems++;\n }\n\n if (isShowingMenu) {\n calculatedWidth += (listItems.shift() as HTMLLIElement).offsetWidth;\n maxVisibleItems--;\n }\n\n if (showRoot && calculatedWidth >= containerWidth) {\n newVisibleItems--;\n }\n\n // TODO: what if multiline and only one breadcrumb??\n if (isMultiline) {\n listItems.pop();\n newVisibleItems++;\n } else {\n if (listItems.length > 0) {\n // Ensure the last breadcrumb isn't truncated when we measure it.\n let last = (listItems.pop() as HTMLLIElement);\n last.style.overflow = 'visible';\n\n calculatedWidth += last.offsetWidth;\n if (calculatedWidth < containerWidth) {\n newVisibleItems++;\n }\n\n last.style.overflow = '';\n }\n }\n\n for (let breadcrumb of listItems.reverse()) {\n calculatedWidth += breadcrumb.offsetWidth;\n if (calculatedWidth < containerWidth) {\n newVisibleItems++;\n }\n }\n\n return Math.max(MIN_VISIBLE_ITEMS, Math.min(maxVisibleItems, newVisibleItems));\n };\n\n setVisibleItems(function *() {\n // Update to show all items.\n yield childArray.length;\n\n // Measure, and update to show the items that fit.\n let newVisibleItems = computeVisibleItems(childArray.length);\n yield newVisibleItems;\n\n // If the number of items is less than the number of children,\n // then update again to ensure that the menu fits.\n if (newVisibleItems < childArray.length && newVisibleItems > 1) {\n yield computeVisibleItems(newVisibleItems);\n }\n });\n }, [childArray.length, setVisibleItems, showRoot, isMultiline]);\n\n useResizeObserver({ref: domRef, onResize: updateOverflow});\n\n let lastChildren = useRef<typeof children | null>(null);\n useLayoutEffect(() => {\n if (children !== lastChildren.current) {\n lastChildren.current = children;\n updateOverflow();\n }\n });\n\n let contents = childArray;\n if (childArray.length > visibleItems) {\n let selectedItem = childArray[childArray.length - 1];\n let selectedKey = selectedItem.key ?? childArray.length - 1;\n let onMenuAction = (key: Key) => {\n // Don't fire onAction when clicking on the last item\n if (key !== selectedKey && onAction) {\n onAction(key);\n }\n };\n\n let menuItem = (\n <BreadcrumbItem key=\"menu\">\n <MenuTrigger>\n <ActionButton\n aria-label=\"…\"\n isQuiet\n isDisabled={isDisabled}>\n <FolderBreadcrumb />\n </ActionButton>\n <Menu selectionMode=\"single\" selectedKeys={[selectedKey]} onAction={onMenuAction}>\n {childArray}\n </Menu>\n </MenuTrigger>\n </BreadcrumbItem>\n );\n\n contents = [menuItem];\n let breadcrumbs = [...childArray];\n let endItems = visibleItems;\n if (showRoot && visibleItems > 1) {\n let rootItem = breadcrumbs.shift();\n if (rootItem) {\n contents.unshift(rootItem);\n }\n endItems--;\n }\n contents.push(...breadcrumbs.slice(-endItems));\n }\n\n let lastIndex = contents.length - 1;\n let breadcrumbItems = contents.map((child, index) => {\n let isCurrent = index === lastIndex;\n let key = child.key ?? index;\n let onPress = () => {\n if (onAction) {\n onAction(key);\n }\n };\n\n return (\n <li\n key={index}\n className={\n classNames(\n styles,\n 'spectrum-Breadcrumbs-item'\n )\n }>\n <BreadcrumbItem\n key={key}\n isCurrent={isCurrent}\n isDisabled={isDisabled}\n onPress={onPress}\n autoFocus={isCurrent && autoFocusCurrent}>\n {child.props.children}\n </BreadcrumbItem>\n </li>\n );\n });\n\n return (\n <nav\n {...styleProps}\n {...navProps}\n ref={domRef}>\n <ul\n ref={listRef}\n className={\n classNames(\n styles,\n 'spectrum-Breadcrumbs',\n {\n 'spectrum-Breadcrumbs--small': size === 'S',\n 'spectrum-Breadcrumbs--medium': size === 'M',\n 'spectrum-Breadcrumbs--multiline': isMultiline,\n 'spectrum-Breadcrumbs--showRoot': showRoot,\n 'is-disabled': isDisabled\n },\n styleProps.className\n )\n }>\n {breadcrumbItems}\n </ul>\n </nav>\n );\n}\n\n/**\n * Breadcrumbs show hierarchy and navigational context for a user’s location within an application.\n */\nlet _Breadcrumbs = React.forwardRef(Breadcrumbs);\nexport {_Breadcrumbs as Breadcrumbs};\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {BreadcrumbItemProps} from '@react-types/breadcrumbs';\nimport ChevronRightSmall from '@spectrum-icons/ui/ChevronRightSmall';\nimport {classNames, getWrappedElement} from '@react-spectrum/utils';\nimport {FocusRing} from '@react-aria/focus';\nimport {mergeProps} from '@react-aria/utils';\nimport React, {Fragment, useRef} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/breadcrumb/vars.css';\nimport {useBreadcrumbItem} from '@react-aria/breadcrumbs';\nimport {useHover} from '@react-aria/interactions';\nimport {useLocale} from '@react-aria/i18n';\n\nexport function BreadcrumbItem(props: BreadcrumbItemProps) {\n let {\n children,\n isCurrent,\n isDisabled\n } = props;\n\n let {direction} = useLocale();\n let ref = useRef(null);\n let {itemProps} = useBreadcrumbItem({\n ...props,\n elementType: typeof children === 'string' ? 'span' : 'a'\n }, ref);\n let {hoverProps, isHovered} = useHover(props);\n\n let element = React.cloneElement(\n getWrappedElement(children),\n {\n ...mergeProps(itemProps, hoverProps),\n ref,\n className:\n classNames(\n styles,\n 'spectrum-Breadcrumbs-itemLink',\n {\n 'is-disabled': !isCurrent && isDisabled,\n 'is-hovered': isHovered\n }\n )\n }\n );\n\n return (\n <Fragment>\n <FocusRing focusRingClass={classNames(styles, 'focus-ring')}>\n {element}\n </FocusRing>\n {isCurrent === false &&\n <ChevronRightSmall\n UNSAFE_className={\n classNames(\n styles,\n 'spectrum-Breadcrumbs-itemSeparator',\n {\n 'is-reversed': direction === 'rtl'\n }\n )\n } />\n }\n </Fragment>\n );\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import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Y,eAAe,GAAG;YAChC,IAAI,WAAW,YAAY;YAC3B,IAAI,UACF,SAAS,QAAQ;YAEnB;QACF;QACA,SAAS,QAAQ,YAAY,MAAM,CAAC;IACtC;IAEA,IAAI,YAAY,SAAS,SAAS;IAClC,IAAI,kBAAkB,SAAS,IAAI,CAAC,OAAO;QACzC,IAAI,YAAY,UAAU;YAChB;QAAV,IAAI,MAAM,CAAA,aAAA,MAAM,iBAAN,wBAAA,aAAa;QACvB,IAAI,UAAU;YACZ,IAAI,UACF,SAAS;QAEb;QAEA,qBACE,gCAAC;YACC,KAAK;YACL,WACE,CAAA,GAAA,iBAAS,EACP,CAAA,GAAA,gEAAK,GACL;yBAGJ,gCAAC,CAAA,GAAA,yCAAa;YACX,GAAG,MAAM,KAAK;YACf,KAAK;YACL,WAAW;YACX,YAAY;YACZ,SAAS;YACT,WAAW,aAAa;WACvB,MAAM,MAAM;IAIrB;IAEA,qBACE,gCAAC;QACE,GAAG,UAAU;QACb,GAAG,QAAQ;QACZ,KAAK;qBACL,gCAAC;QACC,KAAK;QACL,WACE,CAAA,GAAA,iBAAS,EACP,CAAA,GAAA,gEAAK,GACL,wBACA;YACE,+BAA+B,SAAS;YACxC,gCAAgC,SAAS;YACzC,mCAAmC;YACnC,kCAAkC;YAClC,eAAe;QACjB,GACA,WAAW;OAGd;AAIT;AAEA;;CAEC,GACD,IAAI,yDAAe,CAAA,GAAA,YAAI,EAAE,WAAW;","sources":["packages/@react-spectrum/breadcrumbs/src/index.ts","packages/@react-spectrum/breadcrumbs/src/Breadcrumbs.tsx","packages/@react-spectrum/breadcrumbs/src/BreadcrumbItem.tsx","packages/@adobe/spectrum-css-temp/components/breadcrumb/vars.css"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n/// <reference types=\"css-module-types\" />\nexport {Breadcrumbs} from './Breadcrumbs';\nexport {Item} from '@react-stately/collections';\nexport type {SpectrumBreadcrumbsProps} from '@react-types/breadcrumbs';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\nimport {ActionButton} from '@react-spectrum/button';\nimport {BreadcrumbItem} from './BreadcrumbItem';\nimport {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport FolderBreadcrumb from '@spectrum-icons/ui/FolderBreadcrumb';\nimport {Menu, MenuTrigger} from '@react-spectrum/menu';\nimport React, {Key, ReactElement, useCallback, useRef} from 'react';\nimport {SpectrumBreadcrumbsProps} from '@react-types/breadcrumbs';\nimport styles from '@adobe/spectrum-css-temp/components/breadcrumb/vars.css';\nimport {useBreadcrumbs} from '@react-aria/breadcrumbs';\nimport {useLayoutEffect, useResizeObserver, useValueEffect} from '@react-aria/utils';\nimport {useProviderProps} from '@react-spectrum/provider';\n\nconst MIN_VISIBLE_ITEMS = 1;\nconst MAX_VISIBLE_ITEMS = 4;\n\nfunction Breadcrumbs<T>(props: SpectrumBreadcrumbsProps<T>, ref: DOMRef) {\n props = useProviderProps(props);\n let {\n size = 'L',\n isMultiline,\n children,\n showRoot,\n isDisabled,\n onAction,\n autoFocusCurrent,\n ...otherProps\n } = props;\n\n // Not using React.Children.toArray because it mutates the key prop.\n let childArray: ReactElement[] = [];\n React.Children.forEach(children, (child, index) => {\n if (React.isValidElement(child)) {\n if (child.key == null) {\n child = React.cloneElement(child, {key: index});\n }\n childArray.push(child);\n }\n });\n\n let domRef = useDOMRef(ref);\n let listRef = useRef<HTMLUListElement>(null);\n\n let [visibleItems, setVisibleItems] = useValueEffect(childArray.length);\n\n let {navProps} = useBreadcrumbs(props);\n let {styleProps} = useStyleProps(otherProps);\n\n let updateOverflow = useCallback(() => {\n let computeVisibleItems = (visibleItems: number): number => {\n // Refs can be null at runtime.\n let currListRef: HTMLUListElement | null = listRef.current;\n if (!currListRef) {\n return visibleItems;\n }\n\n let listItems = Array.from(currListRef.children) as HTMLLIElement[];\n if (listItems.length <= 0) {\n return visibleItems;\n }\n let containerWidth = currListRef.offsetWidth;\n let isShowingMenu = childArray.length > visibleItems;\n let calculatedWidth = 0;\n let newVisibleItems = 0;\n let maxVisibleItems = MAX_VISIBLE_ITEMS;\n\n if (showRoot) {\n calculatedWidth += (listItems.shift() as HTMLLIElement).offsetWidth;\n newVisibleItems++;\n }\n\n if (isShowingMenu) {\n calculatedWidth += (listItems.shift() as HTMLLIElement).offsetWidth;\n maxVisibleItems--;\n }\n\n if (showRoot && calculatedWidth >= containerWidth) {\n newVisibleItems--;\n }\n\n // TODO: what if multiline and only one breadcrumb??\n if (isMultiline) {\n listItems.pop();\n newVisibleItems++;\n } else {\n if (listItems.length > 0) {\n // Ensure the last breadcrumb isn't truncated when we measure it.\n let last = (listItems.pop() as HTMLLIElement);\n last.style.overflow = 'visible';\n\n calculatedWidth += last.offsetWidth;\n if (calculatedWidth < containerWidth) {\n newVisibleItems++;\n }\n\n last.style.overflow = '';\n }\n }\n\n for (let breadcrumb of listItems.reverse()) {\n calculatedWidth += breadcrumb.offsetWidth;\n if (calculatedWidth < containerWidth) {\n newVisibleItems++;\n }\n }\n\n return Math.max(MIN_VISIBLE_ITEMS, Math.min(maxVisibleItems, newVisibleItems));\n };\n\n setVisibleItems(function *() {\n // Update to show all items.\n yield childArray.length;\n\n // Measure, and update to show the items that fit.\n let newVisibleItems = computeVisibleItems(childArray.length);\n yield newVisibleItems;\n\n // If the number of items is less than the number of children,\n // then update again to ensure that the menu fits.\n if (newVisibleItems < childArray.length && newVisibleItems > 1) {\n yield computeVisibleItems(newVisibleItems);\n }\n });\n }, [childArray.length, setVisibleItems, showRoot, isMultiline]);\n\n useResizeObserver({ref: domRef, onResize: updateOverflow});\n\n let lastChildren = useRef<typeof children | null>(null);\n useLayoutEffect(() => {\n if (children !== lastChildren.current) {\n lastChildren.current = children;\n updateOverflow();\n }\n });\n\n let contents = childArray;\n if (childArray.length > visibleItems) {\n let selectedItem = childArray[childArray.length - 1];\n let selectedKey = selectedItem.key ?? childArray.length - 1;\n let onMenuAction = (key: Key) => {\n // Don't fire onAction when clicking on the last item\n if (key !== selectedKey && onAction) {\n onAction(key);\n }\n };\n\n let menuItem = (\n <BreadcrumbItem key=\"menu\" isMenu>\n <MenuTrigger>\n <ActionButton\n UNSAFE_className={classNames(styles, 'spectrum-Breadcrumbs-actionButton')}\n aria-label=\"…\"\n isQuiet\n isDisabled={isDisabled}>\n <FolderBreadcrumb />\n </ActionButton>\n <Menu selectionMode=\"single\" selectedKeys={[selectedKey]} onAction={onMenuAction}>\n {childArray}\n </Menu>\n </MenuTrigger>\n </BreadcrumbItem>\n );\n\n contents = [menuItem];\n let breadcrumbs = [...childArray];\n let endItems = visibleItems;\n if (showRoot && visibleItems > 1) {\n let rootItem = breadcrumbs.shift();\n if (rootItem) {\n contents.unshift(rootItem);\n }\n endItems--;\n }\n contents.push(...breadcrumbs.slice(-endItems));\n }\n\n let lastIndex = contents.length - 1;\n let breadcrumbItems = contents.map((child, index) => {\n let isCurrent = index === lastIndex;\n let key = child.key ?? index;\n let onPress = () => {\n if (onAction) {\n onAction(key);\n }\n };\n\n return (\n <li\n key={index}\n className={\n classNames(\n styles,\n 'spectrum-Breadcrumbs-item'\n )\n }>\n <BreadcrumbItem\n {...child.props}\n key={key}\n isCurrent={isCurrent}\n isDisabled={isDisabled}\n onPress={onPress}\n autoFocus={isCurrent && autoFocusCurrent}>\n {child.props.children}\n </BreadcrumbItem>\n </li>\n );\n });\n\n return (\n <nav\n {...styleProps}\n {...navProps}\n ref={domRef}>\n <ul\n ref={listRef}\n className={\n classNames(\n styles,\n 'spectrum-Breadcrumbs',\n {\n 'spectrum-Breadcrumbs--small': size === 'S',\n 'spectrum-Breadcrumbs--medium': size === 'M',\n 'spectrum-Breadcrumbs--multiline': isMultiline,\n 'spectrum-Breadcrumbs--showRoot': showRoot,\n 'is-disabled': isDisabled\n },\n styleProps.className\n )\n }>\n {breadcrumbItems}\n </ul>\n </nav>\n );\n}\n\n/**\n * Breadcrumbs show hierarchy and navigational context for a user’s location within an application.\n */\nlet _Breadcrumbs = React.forwardRef(Breadcrumbs);\nexport {_Breadcrumbs as Breadcrumbs};\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {BreadcrumbItemProps} from '@react-types/breadcrumbs';\nimport ChevronRightSmall from '@spectrum-icons/ui/ChevronRightSmall';\nimport {classNames} from '@react-spectrum/utils';\nimport {FocusRing} from '@react-aria/focus';\nimport {mergeProps} from '@react-aria/utils';\nimport React, {Fragment, useRef} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/breadcrumb/vars.css';\nimport {useBreadcrumbItem} from '@react-aria/breadcrumbs';\nimport {useHover} from '@react-aria/interactions';\nimport {useLocale} from '@react-aria/i18n';\n\ninterface SpectrumBreadcrumbItemProps extends BreadcrumbItemProps {\n isMenu?: boolean\n}\n\nexport function BreadcrumbItem(props: SpectrumBreadcrumbItemProps) {\n let {\n children,\n isCurrent,\n isDisabled,\n isMenu\n } = props;\n\n let {direction} = useLocale();\n let ref = useRef(null);\n let ElementType: React.ElementType = props.href ? 'a' : 'span';\n let {itemProps} = useBreadcrumbItem({\n ...props,\n elementType: ElementType\n }, ref);\n let {hoverProps, isHovered} = useHover(props);\n\n // If this item contains a menu button, then it shouldn't be a link.\n if (isMenu) {\n itemProps = {};\n }\n\n return (\n <Fragment>\n <FocusRing focusRingClass={classNames(styles, 'focus-ring')}>\n <ElementType\n {...mergeProps(itemProps, hoverProps)}\n ref={ref}\n className={\n classNames(\n styles,\n {\n 'spectrum-Breadcrumbs-itemLink': !isMenu,\n 'is-disabled': !isCurrent && isDisabled,\n 'is-hovered': isHovered\n }\n )\n }>\n {children}\n </ElementType>\n </FocusRing>\n <ChevronRightSmall\n UNSAFE_className={\n classNames(\n styles,\n 'spectrum-Breadcrumbs-itemSeparator',\n {\n 'is-reversed': direction === 'rtl'\n }\n )\n } />\n </Fragment>\n );\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"module.js.map"}
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;
|
|
1
|
+
{"mappings":";;ACsPA;;GAEG;AACH,OAAA,IAAI,6JAA4C,CAAC;AC5OjD,OAAO,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;AAChD,YAAY,EAAC,wBAAwB,EAAC,MAAM,0BAA0B,CAAC","sources":["packages/@react-spectrum/breadcrumbs/src/packages/@react-spectrum/breadcrumbs/src/BreadcrumbItem.tsx","packages/@react-spectrum/breadcrumbs/src/packages/@react-spectrum/breadcrumbs/src/Breadcrumbs.tsx","packages/@react-spectrum/breadcrumbs/src/packages/@react-spectrum/breadcrumbs/src/index.ts","packages/@react-spectrum/breadcrumbs/src/index.ts"],"sourcesContent":[null,null,null,"/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n/// <reference types=\"css-module-types\" />\nexport {Breadcrumbs} from './Breadcrumbs';\nexport {Item} from '@react-stately/collections';\nexport type {SpectrumBreadcrumbsProps} from '@react-types/breadcrumbs';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-spectrum/breadcrumbs",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.9.1",
|
|
4
4
|
"description": "Spectrum UI components in React",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/main.js",
|
|
@@ -36,18 +36,18 @@
|
|
|
36
36
|
"url": "https://github.com/adobe/react-spectrum"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@react-aria/breadcrumbs": "^3.5.
|
|
40
|
-
"@react-aria/focus": "^3.14.
|
|
41
|
-
"@react-aria/i18n": "^3.8.
|
|
42
|
-
"@react-aria/interactions": "^3.
|
|
43
|
-
"@react-aria/utils": "^3.
|
|
44
|
-
"@react-spectrum/button": "^3.
|
|
45
|
-
"@react-spectrum/menu": "^3.
|
|
46
|
-
"@react-spectrum/utils": "^3.
|
|
47
|
-
"@react-stately/collections": "^3.10.
|
|
48
|
-
"@react-types/breadcrumbs": "^3.
|
|
49
|
-
"@react-types/shared": "^3.
|
|
50
|
-
"@spectrum-icons/ui": "^3.
|
|
39
|
+
"@react-aria/breadcrumbs": "^3.5.7",
|
|
40
|
+
"@react-aria/focus": "^3.14.3",
|
|
41
|
+
"@react-aria/i18n": "^3.8.4",
|
|
42
|
+
"@react-aria/interactions": "^3.19.1",
|
|
43
|
+
"@react-aria/utils": "^3.21.1",
|
|
44
|
+
"@react-spectrum/button": "^3.14.1",
|
|
45
|
+
"@react-spectrum/menu": "^3.15.1",
|
|
46
|
+
"@react-spectrum/utils": "^3.11.1",
|
|
47
|
+
"@react-stately/collections": "^3.10.2",
|
|
48
|
+
"@react-types/breadcrumbs": "^3.7.1",
|
|
49
|
+
"@react-types/shared": "^3.21.0",
|
|
50
|
+
"@spectrum-icons/ui": "^3.6.1",
|
|
51
51
|
"@swc/helpers": "^0.5.0"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"publishConfig": {
|
|
62
62
|
"access": "public"
|
|
63
63
|
},
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "3ecf62dcceea437cb12df1851636dd491bb6591c"
|
|
65
65
|
}
|
package/src/BreadcrumbItem.tsx
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
import {BreadcrumbItemProps} from '@react-types/breadcrumbs';
|
|
14
14
|
import ChevronRightSmall from '@spectrum-icons/ui/ChevronRightSmall';
|
|
15
|
-
import {classNames
|
|
15
|
+
import {classNames} from '@react-spectrum/utils';
|
|
16
16
|
import {FocusRing} from '@react-aria/focus';
|
|
17
17
|
import {mergeProps} from '@react-aria/utils';
|
|
18
18
|
import React, {Fragment, useRef} from 'react';
|
|
@@ -21,55 +21,61 @@ import {useBreadcrumbItem} from '@react-aria/breadcrumbs';
|
|
|
21
21
|
import {useHover} from '@react-aria/interactions';
|
|
22
22
|
import {useLocale} from '@react-aria/i18n';
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
interface SpectrumBreadcrumbItemProps extends BreadcrumbItemProps {
|
|
25
|
+
isMenu?: boolean
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export function BreadcrumbItem(props: SpectrumBreadcrumbItemProps) {
|
|
25
29
|
let {
|
|
26
30
|
children,
|
|
27
31
|
isCurrent,
|
|
28
|
-
isDisabled
|
|
32
|
+
isDisabled,
|
|
33
|
+
isMenu
|
|
29
34
|
} = props;
|
|
30
35
|
|
|
31
36
|
let {direction} = useLocale();
|
|
32
37
|
let ref = useRef(null);
|
|
38
|
+
let ElementType: React.ElementType = props.href ? 'a' : 'span';
|
|
33
39
|
let {itemProps} = useBreadcrumbItem({
|
|
34
40
|
...props,
|
|
35
|
-
elementType:
|
|
41
|
+
elementType: ElementType
|
|
36
42
|
}, ref);
|
|
37
43
|
let {hoverProps, isHovered} = useHover(props);
|
|
38
44
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
{
|
|
42
|
-
|
|
43
|
-
ref,
|
|
44
|
-
className:
|
|
45
|
-
classNames(
|
|
46
|
-
styles,
|
|
47
|
-
'spectrum-Breadcrumbs-itemLink',
|
|
48
|
-
{
|
|
49
|
-
'is-disabled': !isCurrent && isDisabled,
|
|
50
|
-
'is-hovered': isHovered
|
|
51
|
-
}
|
|
52
|
-
)
|
|
53
|
-
}
|
|
54
|
-
);
|
|
45
|
+
// If this item contains a menu button, then it shouldn't be a link.
|
|
46
|
+
if (isMenu) {
|
|
47
|
+
itemProps = {};
|
|
48
|
+
}
|
|
55
49
|
|
|
56
50
|
return (
|
|
57
51
|
<Fragment>
|
|
58
52
|
<FocusRing focusRingClass={classNames(styles, 'focus-ring')}>
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
UNSAFE_className={
|
|
53
|
+
<ElementType
|
|
54
|
+
{...mergeProps(itemProps, hoverProps)}
|
|
55
|
+
ref={ref}
|
|
56
|
+
className={
|
|
64
57
|
classNames(
|
|
65
58
|
styles,
|
|
66
|
-
'spectrum-Breadcrumbs-itemSeparator',
|
|
67
59
|
{
|
|
68
|
-
'
|
|
60
|
+
'spectrum-Breadcrumbs-itemLink': !isMenu,
|
|
61
|
+
'is-disabled': !isCurrent && isDisabled,
|
|
62
|
+
'is-hovered': isHovered
|
|
69
63
|
}
|
|
70
64
|
)
|
|
71
|
-
}
|
|
72
|
-
|
|
65
|
+
}>
|
|
66
|
+
{children}
|
|
67
|
+
</ElementType>
|
|
68
|
+
</FocusRing>
|
|
69
|
+
<ChevronRightSmall
|
|
70
|
+
UNSAFE_className={
|
|
71
|
+
classNames(
|
|
72
|
+
styles,
|
|
73
|
+
'spectrum-Breadcrumbs-itemSeparator',
|
|
74
|
+
{
|
|
75
|
+
'is-reversed': direction === 'rtl'
|
|
76
|
+
}
|
|
77
|
+
)
|
|
78
|
+
} />
|
|
73
79
|
</Fragment>
|
|
74
80
|
);
|
|
75
81
|
}
|
package/src/Breadcrumbs.tsx
CHANGED
|
@@ -40,8 +40,11 @@ function Breadcrumbs<T>(props: SpectrumBreadcrumbsProps<T>, ref: DOMRef) {
|
|
|
40
40
|
|
|
41
41
|
// Not using React.Children.toArray because it mutates the key prop.
|
|
42
42
|
let childArray: ReactElement[] = [];
|
|
43
|
-
React.Children.forEach(children, child => {
|
|
43
|
+
React.Children.forEach(children, (child, index) => {
|
|
44
44
|
if (React.isValidElement(child)) {
|
|
45
|
+
if (child.key == null) {
|
|
46
|
+
child = React.cloneElement(child, {key: index});
|
|
47
|
+
}
|
|
45
48
|
childArray.push(child);
|
|
46
49
|
}
|
|
47
50
|
});
|
|
@@ -153,9 +156,10 @@ function Breadcrumbs<T>(props: SpectrumBreadcrumbsProps<T>, ref: DOMRef) {
|
|
|
153
156
|
};
|
|
154
157
|
|
|
155
158
|
let menuItem = (
|
|
156
|
-
<BreadcrumbItem key="menu">
|
|
159
|
+
<BreadcrumbItem key="menu" isMenu>
|
|
157
160
|
<MenuTrigger>
|
|
158
161
|
<ActionButton
|
|
162
|
+
UNSAFE_className={classNames(styles, 'spectrum-Breadcrumbs-actionButton')}
|
|
159
163
|
aria-label="…"
|
|
160
164
|
isQuiet
|
|
161
165
|
isDisabled={isDisabled}>
|
|
@@ -201,6 +205,7 @@ function Breadcrumbs<T>(props: SpectrumBreadcrumbsProps<T>, ref: DOMRef) {
|
|
|
201
205
|
)
|
|
202
206
|
}>
|
|
203
207
|
<BreadcrumbItem
|
|
208
|
+
{...child.props}
|
|
204
209
|
key={key}
|
|
205
210
|
isCurrent={isCurrent}
|
|
206
211
|
isDisabled={isDisabled}
|