oolib 2.1.2 → 2.1.6
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.
|
@@ -1,4 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
+
}) : function(o, v) {
|
|
12
|
+
o["default"] = v;
|
|
13
|
+
});
|
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
+
if (mod && mod.__esModule) return mod;
|
|
16
|
+
var result = {};
|
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
+
__setModuleDefault(result, mod);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
2
21
|
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
3
22
|
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
4
23
|
if (ar || !(i in from)) {
|
|
@@ -9,7 +28,8 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
9
28
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
10
29
|
};
|
|
11
30
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
|
|
31
|
+
exports.Breadcrumbs = void 0;
|
|
32
|
+
var react_1 = __importStar(require("react"));
|
|
13
33
|
var index_styled_1 = require("./index.styled");
|
|
14
34
|
var Typo_1 = require("../Typo");
|
|
15
35
|
var icons_1 = require("../../icons");
|
|
@@ -32,19 +52,19 @@ var Breadcrumbs = function (_a) {
|
|
|
32
52
|
setBeConcise(true);
|
|
33
53
|
}, [containerWidth]);
|
|
34
54
|
if (containerWidth < 660) { // for small devices || the breadcrumbs is next to something and will only be < 660px
|
|
35
|
-
return (
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
55
|
+
return (react_1.default.createElement(index_styled_1.StyledBreadcrumbs, { ref: measuredContainer },
|
|
56
|
+
react_1.default.createElement(index_styled_1.StyledLinkCrumb, { href: "#", invert: invert },
|
|
57
|
+
react_1.default.createElement(ArrowLeft, { size: 14, weight: "bold", color: invert ? white : greyColor100 }),
|
|
58
|
+
react_1.default.createElement(Typo_1.SANS_2, { invert: invert }, "Back"))));
|
|
39
59
|
}
|
|
40
60
|
var linksDisplayed = beConcise && links.length > 3 ? [links[0], "...", links[links.length - 2], links[links.length - 1]] : links;
|
|
41
|
-
return (
|
|
61
|
+
return (react_1.default.createElement(index_styled_1.StyledBreadcrumbs, { ref: measuredContainer }, linksDisplayed.map(function (link, ind) {
|
|
42
62
|
if (link === "...") {
|
|
43
|
-
return (
|
|
44
|
-
|
|
63
|
+
return (react_1.default.createElement(index_styled_1.StyledLinkCrumb, { invert: invert },
|
|
64
|
+
react_1.default.createElement(Typo_1.SANS_2, { invert: invert }, "...")));
|
|
45
65
|
}
|
|
46
|
-
return (
|
|
47
|
-
|
|
66
|
+
return (react_1.default.createElement(index_styled_1.StyledLinkCrumb, { href: link.to, invert: invert, key: ind, style: beConcise && ind == linksDisplayed.length - 1 ? { width: (links.length >= 3 ? '40%' : '70%') } : {} },
|
|
67
|
+
react_1.default.createElement(Typo_1.SANS_2, { invert: invert, style: { whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' } }, link.display)));
|
|
48
68
|
})));
|
|
49
69
|
};
|
|
50
|
-
exports.
|
|
70
|
+
exports.Breadcrumbs = Breadcrumbs;
|