@snack-uikit/breadcrumbs 0.11.41-preview-02d918ac.0 → 0.11.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/dist/cjs/components/Breadcrumbs/Breadcrumbs.js +18 -17
- package/dist/cjs/components/Collapse/Collapse.js +6 -10
- package/dist/cjs/components/Crumb/Crumb.js +19 -21
- package/dist/cjs/components/CrumbsTypography/CrumbsTypography.js +3 -5
- package/dist/cjs/components/HiddenChain/HiddenChain.js +12 -11
- package/dist/cjs/components/HiddenChain/hooks.js +7 -5
- package/dist/cjs/components/Separator/Separator.js +4 -5
- package/dist/cjs/components/Wrapper/Wrapper.js +6 -8
- package/dist/cjs/hooks.js +12 -3
- package/dist/cjs/utils/buildBreadcrumbsConfigs.js +17 -11
- package/dist/cjs/utils/buildSizeMap.js +8 -1
- package/dist/cjs/utils/getTestId.js +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,15 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## 0.11.41 (2026-07-03)
|
|
7
|
+
|
|
8
|
+
### Only dependencies have been changed
|
|
9
|
+
* [@snack-uikit/list@0.33.3]($PUBLIC_PROJECT_URL/blob/master/packages/list/CHANGELOG.md)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
6
15
|
## 0.11.40 (2026-06-24)
|
|
7
16
|
|
|
8
17
|
### Only dependencies have been changed
|
|
@@ -25,21 +25,23 @@ const Wrapper_1 = require("../Wrapper");
|
|
|
25
25
|
* Компонент хлебных крошек
|
|
26
26
|
*/
|
|
27
27
|
exports.Breadcrumbs = (0, react_1.memo)(function Breadcrumbs(_a) {
|
|
28
|
-
var
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
28
|
+
var itemsProps = _a.items,
|
|
29
|
+
_a$size = _a.size,
|
|
30
|
+
size = _a$size === void 0 ? constants_1.SIZE.S : _a$size,
|
|
31
|
+
_a$separator = _a.separator,
|
|
32
|
+
separator = _a$separator === void 0 ? constants_1.SEPARATOR : _a$separator,
|
|
33
|
+
className = _a.className,
|
|
34
|
+
_a$firstItemIconOnly = _a.firstItemIconOnly,
|
|
35
|
+
firstItemIconOnly = _a$firstItemIconOnly === void 0 ? false : _a$firstItemIconOnly,
|
|
36
|
+
_a$inactiveLastItem = _a.inactiveLastItem,
|
|
37
|
+
inactiveLastItem = _a$inactiveLastItem === void 0 ? false : _a$inactiveLastItem,
|
|
38
|
+
_a$lastEmpty = _a.lastEmpty,
|
|
39
|
+
lastEmpty = _a$lastEmpty === void 0 ? false : _a$lastEmpty,
|
|
37
40
|
rest = __rest(_a, ["items", "size", "separator", "className", "firstItemIconOnly", "inactiveLastItem", "lastEmpty"]);
|
|
38
41
|
const containerRef = (0, react_1.useRef)(null);
|
|
39
|
-
const
|
|
40
|
-
setConfigs,
|
|
41
|
-
currentConfig
|
|
42
|
-
} = (0, hooks_1.useBreadcrumbsLayout)(containerRef);
|
|
42
|
+
const _ref = (0, hooks_1.useBreadcrumbsLayout)(containerRef),
|
|
43
|
+
setConfigs = _ref.setConfigs,
|
|
44
|
+
currentConfig = _ref.currentConfig;
|
|
43
45
|
const items = (0, react_1.useMemo)(() => inactiveLastItem ? itemsProps.map((item, index) => index === itemsProps.length - 1 ? Object.assign(Object.assign({}, item), {
|
|
44
46
|
onClick: undefined,
|
|
45
47
|
href: undefined
|
|
@@ -69,10 +71,9 @@ exports.Breadcrumbs = (0, react_1.memo)(function Breadcrumbs(_a) {
|
|
|
69
71
|
}, index);
|
|
70
72
|
case constants_1.ELEMENT_TYPE.Item:
|
|
71
73
|
{
|
|
72
|
-
const
|
|
73
|
-
renderMode,
|
|
74
|
-
id
|
|
75
|
-
} = block.item;
|
|
74
|
+
const _block$item = block.item,
|
|
75
|
+
renderMode = _block$item.renderMode,
|
|
76
|
+
id = _block$item.id;
|
|
76
77
|
if (renderMode !== constants_1.ITEM_RENDER_MODE.Collapsed) {
|
|
77
78
|
return (0, jsx_runtime_1.jsx)(Crumb_1.Crumb, {
|
|
78
79
|
useIconOnly: !index && firstItemIconOnly,
|
|
@@ -18,16 +18,12 @@ const utils_1 = require("../../utils");
|
|
|
18
18
|
const CrumbsTypography_1 = require("../CrumbsTypography");
|
|
19
19
|
const styles_module_scss_1 = __importDefault(require('./styles.module.css'));
|
|
20
20
|
function Collapse(_ref) {
|
|
21
|
-
let
|
|
22
|
-
|
|
23
|
-
className
|
|
24
|
-
} = _ref;
|
|
21
|
+
let currentConfig = _ref.currentConfig,
|
|
22
|
+
className = _ref.className;
|
|
25
23
|
const ctx = (0, react_1.useContext)(context_1.BreadcrumbsContext);
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
testId
|
|
30
|
-
} = ctx;
|
|
24
|
+
const hidden = ctx.hidden,
|
|
25
|
+
size = ctx.size,
|
|
26
|
+
testId = ctx.testId;
|
|
31
27
|
const buttonRef = (0, react_1.useRef)(null);
|
|
32
28
|
const collapsedItems = currentConfig.filter(node => node.element === constants_1.ELEMENT_TYPE.Item && node.item.renderMode === constants_1.ITEM_RENDER_MODE.Collapsed).map(
|
|
33
29
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -52,7 +48,7 @@ function Collapse(_ref) {
|
|
|
52
48
|
"data-element-type": constants_1.ELEMENT_TYPE.Collapse,
|
|
53
49
|
children: (0, jsx_runtime_1.jsx)(context_1.BreadcrumbsContext.Provider, {
|
|
54
50
|
value: Object.assign(Object.assign({}, ctx), {
|
|
55
|
-
testId:
|
|
51
|
+
testId: "".concat(testId, "-collapsed")
|
|
56
52
|
}),
|
|
57
53
|
children: (0, jsx_runtime_1.jsx)(list_1.Droplist, {
|
|
58
54
|
trigger: 'hoverAndFocusVisible',
|
|
@@ -28,29 +28,27 @@ const CrumbsTypography_1 = require("../CrumbsTypography");
|
|
|
28
28
|
const styles_module_scss_1 = __importDefault(require('./styles.module.css'));
|
|
29
29
|
const ELLIPSIS_LABEL_LENGTH = 8;
|
|
30
30
|
exports.Crumb = (0, react_1.memo)(function Crumb(_a) {
|
|
31
|
-
var
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
} = _a,
|
|
31
|
+
var _a$minWidth = _a.minWidth,
|
|
32
|
+
minWidthProp = _a$minWidth === void 0 ? 0 : _a$minWidth,
|
|
33
|
+
_a$current = _a.current,
|
|
34
|
+
current = _a$current === void 0 ? false : _a$current,
|
|
35
|
+
renderMode = _a.renderMode,
|
|
36
|
+
className = _a.className,
|
|
37
|
+
_a$item = _a.item,
|
|
38
|
+
labelProp = _a$item.label,
|
|
39
|
+
shortLabel = _a$item.shortLabel,
|
|
40
|
+
Icon = _a$item.icon,
|
|
41
|
+
id = _a$item.id,
|
|
42
|
+
onClick = _a$item.onClick,
|
|
43
|
+
href = _a$item.href,
|
|
44
|
+
useIconOnlyProp = _a.useIconOnly,
|
|
46
45
|
rest = __rest(_a, ["minWidth", "current", "renderMode", "className", "item", "useIconOnly"]);
|
|
47
|
-
const
|
|
48
|
-
hidden,
|
|
49
|
-
size,
|
|
50
|
-
testId
|
|
51
|
-
} = (0, react_1.useContext)(context_1.BreadcrumbsContext);
|
|
46
|
+
const _ref = (0, react_1.useContext)(context_1.BreadcrumbsContext),
|
|
47
|
+
hidden = _ref.hidden,
|
|
48
|
+
size = _ref.size,
|
|
49
|
+
testId = _ref.testId;
|
|
52
50
|
const isLabelShouldBeEllipse = hidden && labelProp.length > ELLIPSIS_LABEL_LENGTH;
|
|
53
|
-
const label = isLabelShouldBeEllipse && renderMode === constants_1.ITEM_RENDER_MODE.Ellipsis ?
|
|
51
|
+
const label = isLabelShouldBeEllipse && renderMode === constants_1.ITEM_RENDER_MODE.Ellipsis ? "".concat(labelProp.substring(0, 4), "...") : labelProp;
|
|
54
52
|
const useIconOnly = Boolean(Icon && useIconOnlyProp);
|
|
55
53
|
const minWidth = minWidthProp && renderMode === constants_1.ITEM_RENDER_MODE.Ellipsis ? minWidthProp : 'auto';
|
|
56
54
|
const dataAttributes = {
|
|
@@ -8,11 +8,9 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
8
8
|
const typography_1 = require("@snack-uikit/typography");
|
|
9
9
|
const constants_1 = require("../../constants");
|
|
10
10
|
function CrumbsTypography(_ref) {
|
|
11
|
-
let
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
className
|
|
15
|
-
} = _ref;
|
|
11
|
+
let size = _ref.size,
|
|
12
|
+
children = _ref.children,
|
|
13
|
+
className = _ref.className;
|
|
16
14
|
return (0, jsx_runtime_1.jsx)(typography_1.Typography, {
|
|
17
15
|
className: className,
|
|
18
16
|
size: size === constants_1.SIZE.S ? 'm' : 's',
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
@@ -12,14 +14,14 @@ const Separator_1 = require("../Separator");
|
|
|
12
14
|
const Wrapper_1 = require("../Wrapper");
|
|
13
15
|
const hooks_1 = require("./hooks");
|
|
14
16
|
exports.HiddenChain = (0, react_1.memo)(function HiddenChain(_ref) {
|
|
15
|
-
let
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
firstItemIconOnly = false,
|
|
21
|
-
lastEmpty =
|
|
22
|
-
|
|
17
|
+
let size = _ref.size,
|
|
18
|
+
separator = _ref.separator,
|
|
19
|
+
items = _ref.items,
|
|
20
|
+
onConfigsBuilt = _ref.onConfigsBuilt,
|
|
21
|
+
_ref$firstItemIconOnl = _ref.firstItemIconOnly,
|
|
22
|
+
firstItemIconOnly = _ref$firstItemIconOnl === void 0 ? false : _ref$firstItemIconOnl,
|
|
23
|
+
_ref$lastEmpty = _ref.lastEmpty,
|
|
24
|
+
lastEmpty = _ref$lastEmpty === void 0 ? false : _ref$lastEmpty;
|
|
23
25
|
const containerRef = (0, react_1.useRef)(null);
|
|
24
26
|
const itemsRef = (0, react_1.useRef)(items);
|
|
25
27
|
itemsRef.current = items;
|
|
@@ -27,9 +29,8 @@ exports.HiddenChain = (0, react_1.memo)(function HiddenChain(_ref) {
|
|
|
27
29
|
const container = containerRef.current;
|
|
28
30
|
if (container) {
|
|
29
31
|
const observer = new ResizeObserver(_ref2 => {
|
|
30
|
-
let
|
|
31
|
-
target
|
|
32
|
-
}] = _ref2;
|
|
32
|
+
let _ref3 = (0, _slicedToArray2.default)(_ref2, 1),
|
|
33
|
+
target = _ref3[0].target;
|
|
33
34
|
const sizeMap = (0, utils_1.buildSizeMap)(target);
|
|
34
35
|
if (sizeMap) {
|
|
35
36
|
onConfigsBuilt((0, utils_1.buildBreadcrumbsConfigs)(itemsRef.current, sizeMap, lastEmpty));
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
@@ -20,7 +22,9 @@ const getItemModesRenderer = firstItemIconOnly => (item, index) => {
|
|
|
20
22
|
const isIconOnlyMode = !index && firstItemIconOnly;
|
|
21
23
|
const modes = isIconOnlyMode ? ICON_ONLY_MODES : NORMAL_MODES;
|
|
22
24
|
return modes.map(_ref => {
|
|
23
|
-
let
|
|
25
|
+
let _ref2 = (0, _slicedToArray2.default)(_ref, 2),
|
|
26
|
+
mode = _ref2[0],
|
|
27
|
+
labelProp = _ref2[1];
|
|
24
28
|
const label = item[labelProp];
|
|
25
29
|
// full mode не может отсутствовать, даже если там нет значения
|
|
26
30
|
if (!label && mode !== constants_1.ITEM_RENDER_MODE.Full) {
|
|
@@ -33,10 +37,8 @@ const getItemModesRenderer = firstItemIconOnly => (item, index) => {
|
|
|
33
37
|
}, item.id + mode);
|
|
34
38
|
});
|
|
35
39
|
};
|
|
36
|
-
const useItemModesRender =
|
|
37
|
-
let
|
|
38
|
-
firstItemIconOnly
|
|
39
|
-
} = _ref2;
|
|
40
|
+
const useItemModesRender = _ref3 => {
|
|
41
|
+
let firstItemIconOnly = _ref3.firstItemIconOnly;
|
|
40
42
|
return (0, react_1.useMemo)(() => getItemModesRenderer(firstItemIconOnly), [firstItemIconOnly]);
|
|
41
43
|
};
|
|
42
44
|
exports.useItemModesRender = useItemModesRender;
|
|
@@ -17,11 +17,10 @@ const utils_1 = require("../../utils");
|
|
|
17
17
|
const CrumbsTypography_1 = require("../CrumbsTypography");
|
|
18
18
|
const styles_module_scss_1 = __importDefault(require('./styles.module.css'));
|
|
19
19
|
function Separator() {
|
|
20
|
-
const
|
|
21
|
-
size,
|
|
22
|
-
separator,
|
|
23
|
-
testId
|
|
24
|
-
} = (0, react_1.useContext)(context_1.BreadcrumbsContext);
|
|
20
|
+
const _ref = (0, react_1.useContext)(context_1.BreadcrumbsContext),
|
|
21
|
+
size = _ref.size,
|
|
22
|
+
separator = _ref.separator,
|
|
23
|
+
testId = _ref.testId;
|
|
25
24
|
return (0, jsx_runtime_1.jsx)("div", {
|
|
26
25
|
"aria-hidden": true,
|
|
27
26
|
"data-size": size,
|
|
@@ -24,14 +24,12 @@ const utils_1 = require("@snack-uikit/utils");
|
|
|
24
24
|
const context_1 = require("../../context");
|
|
25
25
|
const styles_module_scss_1 = __importDefault(require('./styles.module.css'));
|
|
26
26
|
exports.Wrapper = (0, react_1.forwardRef)(function HiddenWrapper(_a, ref) {
|
|
27
|
-
var
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
'data-test-id': testId
|
|
34
|
-
} = _a,
|
|
27
|
+
var children = _a.children,
|
|
28
|
+
className = _a.className,
|
|
29
|
+
size = _a.size,
|
|
30
|
+
hidden = _a.hidden,
|
|
31
|
+
separator = _a.separator,
|
|
32
|
+
testId = _a['data-test-id'],
|
|
35
33
|
rest = __rest(_a, ["children", "className", "size", "hidden", "separator", 'data-test-id']);
|
|
36
34
|
return (0, jsx_runtime_1.jsx)("nav", Object.assign({}, (0, utils_1.extractSupportProps)(rest), {
|
|
37
35
|
className: (0, classnames_1.default)(styles_module_scss_1.default.wrapper, className),
|
package/dist/cjs/hooks.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
|
3
5
|
var __importDefault = void 0 && (void 0).__importDefault || function (mod) {
|
|
4
6
|
return mod && mod.__esModule ? mod : {
|
|
5
7
|
"default": mod
|
|
@@ -16,7 +18,8 @@ const selectConfig = (containerWidth, configs) => {
|
|
|
16
18
|
if (!configs.length) {
|
|
17
19
|
return;
|
|
18
20
|
}
|
|
19
|
-
let
|
|
21
|
+
let _configs = (0, _slicedToArray2.default)(configs, 1),
|
|
22
|
+
bestConfig = _configs[0];
|
|
20
23
|
for (const config of configs) {
|
|
21
24
|
if (config.width <= containerWidth) {
|
|
22
25
|
if (bestConfig.width > containerWidth) {
|
|
@@ -53,8 +56,14 @@ const selectConfig = (containerWidth, configs) => {
|
|
|
53
56
|
* Для того чтоб отобразить breadcrumbs, нужно подобрать конфиг, максимальный по ширине, влезающий в контейнер, но с минимальным весом (наименьшим количеством сокращений).
|
|
54
57
|
*/
|
|
55
58
|
function useBreadcrumbsLayout(containerRef) {
|
|
56
|
-
const
|
|
57
|
-
|
|
59
|
+
const _ref = (0, react_1.useState)([]),
|
|
60
|
+
_ref2 = (0, _slicedToArray2.default)(_ref, 2),
|
|
61
|
+
configs = _ref2[0],
|
|
62
|
+
setConfigs = _ref2[1];
|
|
63
|
+
const _ref3 = (0, react_1.useState)(0),
|
|
64
|
+
_ref4 = (0, _slicedToArray2.default)(_ref3, 2),
|
|
65
|
+
width = _ref4[0],
|
|
66
|
+
setWidth = _ref4[1];
|
|
58
67
|
(0, react_1.useEffect)(() => {
|
|
59
68
|
var _a;
|
|
60
69
|
const visibleContainer = (_a = containerRef.current) === null || _a === void 0 ? void 0 : _a.parentElement;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _toArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/toArray"));
|
|
5
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
3
6
|
Object.defineProperty(exports, "__esModule", {
|
|
4
7
|
value: true
|
|
5
8
|
});
|
|
@@ -20,11 +23,13 @@ const startsWithShortLabel = startsWith(constants_1.ITEM_RENDER_MODE.ShortLabel)
|
|
|
20
23
|
const startsWithEllipsis = startsWith(constants_1.ITEM_RENDER_MODE.Ellipsis);
|
|
21
24
|
const startsWithCollapsed = startsWith(constants_1.ITEM_RENDER_MODE.Collapsed);
|
|
22
25
|
function buildSubChain(_ref, _ref2) {
|
|
23
|
-
let
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
let _ref3 = (0, _toArray2.default)(_ref),
|
|
27
|
+
current = _ref3[0],
|
|
28
|
+
rest = _arrayLikeToArray(_ref3).slice(1);
|
|
29
|
+
let _ref2$useCollapse = _ref2.useCollapse,
|
|
30
|
+
useCollapse = _ref2$useCollapse === void 0 ? true : _ref2$useCollapse,
|
|
31
|
+
_ref2$useEllipse = _ref2.useEllipse,
|
|
32
|
+
useEllipse = _ref2$useEllipse === void 0 ? true : _ref2$useEllipse;
|
|
28
33
|
const result = [];
|
|
29
34
|
if (!current) {
|
|
30
35
|
return result;
|
|
@@ -70,9 +75,12 @@ function buildBreadcrumbsConfigs(items, sizeMap, lastEmpty) {
|
|
|
70
75
|
return [];
|
|
71
76
|
}
|
|
72
77
|
const chains = [];
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
-
|
|
78
|
+
const _items$map = items.map(item => Object.assign(Object.assign({}, item), {
|
|
79
|
+
renderMode: constants_1.ITEM_RENDER_MODE.Full
|
|
80
|
+
})),
|
|
81
|
+
_items$map2 = (0, _toArray2.default)(_items$map),
|
|
82
|
+
first = _items$map2[0],
|
|
83
|
+
rest = _arrayLikeToArray(_items$map2).slice(1);
|
|
76
84
|
buildSubChain(rest, {
|
|
77
85
|
useCollapse: true,
|
|
78
86
|
useEllipse: true
|
|
@@ -86,9 +94,7 @@ function buildBreadcrumbsConfigs(items, sizeMap, lastEmpty) {
|
|
|
86
94
|
chains.push(startsWithCollapsed(first, collapseAllRest(constants_1.ITEM_RENDER_MODE.Full, rest)));
|
|
87
95
|
chains.push(startsWithCollapsed(first, collapseAllRest(constants_1.ITEM_RENDER_MODE.Ellipsis, rest)));
|
|
88
96
|
return chains.map(chain => chain.reduce((acc, item, index, array) => {
|
|
89
|
-
const
|
|
90
|
-
renderMode
|
|
91
|
-
} = item;
|
|
97
|
+
const renderMode = item.renderMode;
|
|
92
98
|
if (index && RENDER_MODE_WITH_WIDTH.includes(renderMode)) {
|
|
93
99
|
acc.width += sizeMap.separator;
|
|
94
100
|
acc.chain.push({
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _toArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/toArray"));
|
|
5
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
3
6
|
Object.defineProperty(exports, "__esModule", {
|
|
4
7
|
value: true
|
|
5
8
|
});
|
|
@@ -17,7 +20,11 @@ function buildSizeMap(container) {
|
|
|
17
20
|
return;
|
|
18
21
|
}
|
|
19
22
|
const children = container.children;
|
|
20
|
-
const
|
|
23
|
+
const _Array$from = Array.from(children),
|
|
24
|
+
_Array$from2 = (0, _toArray2.default)(_Array$from),
|
|
25
|
+
separator = _Array$from2[0],
|
|
26
|
+
collapse = _Array$from2[1],
|
|
27
|
+
itemElements = _arrayLikeToArray(_Array$from2).slice(2);
|
|
21
28
|
return {
|
|
22
29
|
separator: getElementWidth(separator),
|
|
23
30
|
collapse: getElementWidth(collapse),
|
|
@@ -4,5 +4,5 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.getTestId = void 0;
|
|
7
|
-
const getTestId = (prefix, testId) => testId ?
|
|
7
|
+
const getTestId = (prefix, testId) => testId ? "".concat(prefix, "-element-").concat(testId) : '';
|
|
8
8
|
exports.getTestId = getTestId;
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
6
|
"title": "Breadcrumbs",
|
|
7
|
-
"version": "0.11.41
|
|
7
|
+
"version": "0.11.41",
|
|
8
8
|
"sideEffects": [
|
|
9
9
|
"*.css",
|
|
10
10
|
"*.woff",
|
|
@@ -36,11 +36,11 @@
|
|
|
36
36
|
"license": "Apache-2.0",
|
|
37
37
|
"scripts": {},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@snack-uikit/list": "0.33.3
|
|
39
|
+
"@snack-uikit/list": "0.33.3",
|
|
40
40
|
"@snack-uikit/typography": "0.8.13",
|
|
41
41
|
"@snack-uikit/utils": "4.0.2",
|
|
42
42
|
"classnames": "2.5.1",
|
|
43
43
|
"lodash.debounce": "4.0.8"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "864821fceaa6bbb61080166d14f1682fa16e3f85"
|
|
46
46
|
}
|