@equinor/echo-components 0.6.0 → 0.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +45 -33
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -37,31 +37,6 @@ function styleInject(css, ref) {
|
|
|
37
37
|
var css_248z$F = ":root{--xSmall:0.25rem;--small:0.5rem;--medium:1rem;--large:1.5rem;--xLarge:2rem;--black:#000;--white:#fff;--equiBlue1:#233746;--equiBlue2:#d7e1ed;--equiBlue3:#d5eaf4;--equiGray1:#87929a;--equiGray2:#b4bbc0;--equiGray3:#d1d5d8;--equiGray4:#e3e6e8;--equiGray5:#f7f7f7;--equiRed1:#ff1243;--darkEquiRed:#ce183e;--equiGreen1:#006f79;--equiGreen2:#deedee;--equiGreen3:#e6faec;--equiGreen4:#c3f3d2;--echoText:#3d3d3d;--disabledBackgroundColor:#eaeaea;--disabledColor:#6f6f6f;--pm01:#0f0;--pm02:#ff1493;--pm03:#0ff;--pm04:#9400d3;--pm05:#1e90ff;--pm06:#ffdead;--pm010:#ff4500;--pm015:#228b22;--pm020:#00008b;--onGoing:#fbca36;--done:#4bb748;--asBuilt:#007079;--planned:#4bb748;--future:#52c0ff;--historic:#ff7d98;--outOfService:#ff9200;--reserved:#243746;--voided:#eb0000;--default:#dcdcdc;--ok:#23ef2a;--os:#adaead;--pa:#f94693;--pb:#fd0;--unknown:#525252;--rfccSent:#bcf316;--rfccPartly:#c7f316;--rfcc:#60f316;--rfocSent:#0dccf2;--rfocPartly:#1accf2;--rfoc:#0d59f2;--rfccRejected:#ff1243;--rfocRejected:#ff1243;--handoverError:#eb0000;--priorityHigh:#ff1243;--priorityMedium:#fbca36;--systems:#d5eaf4;--locations:#3eb54a;--ofpDark:#f4d6a2;--ofpLight:#faebce;--warningText:#ad6200;--warningIcon:#ff9200;--warningBackground:#ffe7d6;--dropDownButtonBackground:#f0f0f0;--dropDownTextColor:grey;--searchBarBackground:#f7f7f7;--highSeverity:#ffc1c1;--mediumSeverity:#ffe7d6;--lowSeverity:#dce6ee;--defaultSeverity:#d5eaf4;--highSeverityText:#eb0000;--mediumSeverityText:#52c0ff;--lowSeverityText:#4bb748;--defaultSeverityText:#3d3d3d;--toggleActive:#4bb748;--toggleInactive:#b30d2f;--hoverIcon:#004f55;--hoverIconWithNotification:#b30d2f;--tertiaryText:#6f6f6f}#root,body,html{height:100%;overflow:hidden;width:100%}html[data-theme=dark]{--equiGreen1:#006f79}body,h1,h2,h3,h4,h5,h6,label,p{color:var(--echoText)}body,html,span{font-family:Equinor!important}::-webkit-scrollbar{width:10px}::-webkit-scrollbar-track{background:#f7f7f7;border-radius:5px}::-webkit-scrollbar-thumb{background:#007079;border-radius:5px}::-webkit-scrollbar-thumb:hover{background:#004f55}button,input{appearance:none;background:transparent;border:inherit;color:inherit;font:inherit;outline:0}input,input:after,input:before{-webkit-user-select:initial;-khtml-user-select:initial;-moz-user-select:initial;-ms-user-select:initial;user-select:auto}";
|
|
38
38
|
styleInject(css_248z$F);
|
|
39
39
|
|
|
40
|
-
var css_248z$E = ".BlackLink-module_linkElement__WGkkg{align-items:center;color:var(--echoText);display:flex;gap:.5rem;text-decoration:none}.BlackLink-module_linkElement__WGkkg>label{cursor:pointer}.BlackLink-module_linkElement__WGkkg>span{line-height:0}.BlackLink-module_linkElement__WGkkg:hover{text-decoration:underline}.BlackLink-module_linkElement__WGkkg:focus{outline:1px dashed #007079;text-decoration:underline}.BlackLink-module_linkIcon__GW-93{min-height:24px;min-width:24px}";
|
|
41
|
-
var styles$r = {"linkElement":"BlackLink-module_linkElement__WGkkg","linkIcon":"BlackLink-module_linkIcon__GW-93"};
|
|
42
|
-
styleInject(css_248z$E);
|
|
43
|
-
|
|
44
|
-
var BlackLink = function BlackLink(_ref) {
|
|
45
|
-
var href = _ref.href,
|
|
46
|
-
linkText = _ref.linkText,
|
|
47
|
-
preserveTab = _ref.preserveTab;
|
|
48
|
-
return /*#__PURE__*/React__default.createElement("a", {
|
|
49
|
-
className: styles$r.linkElement,
|
|
50
|
-
id: linkText,
|
|
51
|
-
href: href,
|
|
52
|
-
tabIndex: 0,
|
|
53
|
-
target: !preserveTab ? '_blank' : undefined,
|
|
54
|
-
rel: "noreferrer"
|
|
55
|
-
}, /*#__PURE__*/React__default.createElement("label", {
|
|
56
|
-
htmlFor: linkText
|
|
57
|
-
}, linkText), /*#__PURE__*/React__default.createElement(Icon, {
|
|
58
|
-
className: styles$r.linkIcon,
|
|
59
|
-
color: 'var(--echoText)',
|
|
60
|
-
name: "external_link",
|
|
61
|
-
size: 24
|
|
62
|
-
}));
|
|
63
|
-
};
|
|
64
|
-
|
|
65
40
|
/**
|
|
66
41
|
* Component that work's as a eds icon wrapper, it imports all eds possible icons
|
|
67
42
|
*
|
|
@@ -89,6 +64,31 @@ var Icon = function Icon(_ref) {
|
|
|
89
64
|
});
|
|
90
65
|
};
|
|
91
66
|
|
|
67
|
+
var css_248z$E = ".BlackLink-module_linkElement__WGkkg{align-items:center;color:var(--echoText);display:flex;gap:.5rem;text-decoration:none}.BlackLink-module_linkElement__WGkkg>label{cursor:pointer}.BlackLink-module_linkElement__WGkkg>span{line-height:0}.BlackLink-module_linkElement__WGkkg:hover{text-decoration:underline}.BlackLink-module_linkElement__WGkkg:focus{outline:1px dashed #007079;text-decoration:underline}.BlackLink-module_linkIcon__GW-93{min-height:24px;min-width:24px}";
|
|
68
|
+
var styles$r = {"linkElement":"BlackLink-module_linkElement__WGkkg","linkIcon":"BlackLink-module_linkIcon__GW-93"};
|
|
69
|
+
styleInject(css_248z$E);
|
|
70
|
+
|
|
71
|
+
var BlackLink = function BlackLink(_ref) {
|
|
72
|
+
var href = _ref.href,
|
|
73
|
+
linkText = _ref.linkText,
|
|
74
|
+
preserveTab = _ref.preserveTab;
|
|
75
|
+
return /*#__PURE__*/React__default.createElement("a", {
|
|
76
|
+
className: styles$r.linkElement,
|
|
77
|
+
id: linkText,
|
|
78
|
+
href: href,
|
|
79
|
+
tabIndex: 0,
|
|
80
|
+
target: !preserveTab ? '_blank' : undefined,
|
|
81
|
+
rel: "noreferrer"
|
|
82
|
+
}, /*#__PURE__*/React__default.createElement("label", {
|
|
83
|
+
htmlFor: linkText
|
|
84
|
+
}, linkText), /*#__PURE__*/React__default.createElement(Icon, {
|
|
85
|
+
className: styles$r.linkIcon,
|
|
86
|
+
color: 'var(--echoText)',
|
|
87
|
+
name: "external_link",
|
|
88
|
+
size: 24
|
|
89
|
+
}));
|
|
90
|
+
};
|
|
91
|
+
|
|
92
92
|
var themeConst = {
|
|
93
93
|
/* Echo - Digital Twin Colors*/
|
|
94
94
|
black: '#000000',
|
|
@@ -18411,7 +18411,7 @@ var InlineTagIconLink = function InlineTagIconLink(_ref) {
|
|
|
18411
18411
|
}, description)));
|
|
18412
18412
|
};
|
|
18413
18413
|
|
|
18414
|
-
var css_248z$k = ".MainLegend-module_accordion__xjveF{align-items:center;align-self:flex-start;background:rgba(0,0,0,.65);border-radius:4px;color:var(--white);cursor:pointer;display:flex;font-size:.875rem;font-weight:500;height:2.25rem;justify-content:space-between;padding:
|
|
18414
|
+
var css_248z$k = ".MainLegend-module_accordion__xjveF{align-items:center;align-self:flex-start;background:rgba(0,0,0,.65);border-radius:4px;color:var(--white);cursor:pointer;display:flex;font-size:.875rem;font-weight:500;height:2.25rem;justify-content:space-between;padding:8px 14px;user-select:none;width:100%}.MainLegend-module_accordion__xjveF:hover{background:rgba(0,0,0,.9);color:var(--white)}.MainLegend-module_left__NKMwB,.MainLegend-module_right__0BIFF{align-items:center;display:flex}.MainLegend-module_icon__neT4f{margin-right:8px}.MainLegend-module_content__nzDkL{align-self:stretch;display:flex;flex-direction:column}button{padding:0}.MainLegend-module_layerIcon__xI2Mf{margin-right:10px}.MainLegend-module_layerIcon__xI2Mf:last-of-type{margin-right:0}";
|
|
18415
18415
|
var styles$i = {"accordion":"MainLegend-module_accordion__xjveF","left":"MainLegend-module_left__NKMwB","right":"MainLegend-module_right__0BIFF","icon":"MainLegend-module_icon__neT4f","content":"MainLegend-module_content__nzDkL","layerIcon":"MainLegend-module_layerIcon__xI2Mf"};
|
|
18416
18416
|
styleInject(css_248z$k);
|
|
18417
18417
|
|
|
@@ -18471,6 +18471,12 @@ function MainLegend(_ref) {
|
|
|
18471
18471
|
setUniqueLayers(iconLayers);
|
|
18472
18472
|
setDefaultLayers(nonIconLayers);
|
|
18473
18473
|
}, [layers]);
|
|
18474
|
+
var displayDefaultLayerNames = function displayDefaultLayerNames() {
|
|
18475
|
+
if (defaultLayers.length > 0) return defaultLayers.map(function (layer) {
|
|
18476
|
+
return layer.title;
|
|
18477
|
+
}).join(' ');
|
|
18478
|
+
return undefined;
|
|
18479
|
+
};
|
|
18474
18480
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, isOpen && /*#__PURE__*/React__default.createElement("div", {
|
|
18475
18481
|
className: styles$i.content
|
|
18476
18482
|
}, legends), /*#__PURE__*/React__default.createElement("button", {
|
|
@@ -18479,19 +18485,23 @@ function MainLegend(_ref) {
|
|
|
18479
18485
|
role: "widget"
|
|
18480
18486
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
18481
18487
|
className: styles$i.left
|
|
18482
|
-
},
|
|
18488
|
+
}, /*#__PURE__*/React__default.createElement(Icon$1, {
|
|
18483
18489
|
className: styles$i.icon,
|
|
18484
18490
|
size: 24,
|
|
18485
|
-
name: "
|
|
18486
|
-
}), /*#__PURE__*/React__default.createElement(
|
|
18491
|
+
name: "map_legend_info"
|
|
18492
|
+
}), isOpen ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", null, "Minimize map legend"), /*#__PURE__*/React__default.createElement(Icon$1, {
|
|
18487
18493
|
className: styles$i.icon,
|
|
18488
18494
|
size: 24,
|
|
18489
|
-
name: "
|
|
18490
|
-
}), /*#__PURE__*/React__default.createElement("div", null, "Expand legend")
|
|
18495
|
+
name: "chevron_down"
|
|
18496
|
+
})) : /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", null, "Expand map legend"), /*#__PURE__*/React__default.createElement(Icon$1, {
|
|
18497
|
+
className: styles$i.icon,
|
|
18498
|
+
size: 24,
|
|
18499
|
+
name: "chevron_up"
|
|
18500
|
+
}))), !isMobile && /*#__PURE__*/React__default.createElement("div", {
|
|
18491
18501
|
className: styles$i.right
|
|
18492
18502
|
}, uniqueLayers.map(function (layer, index) {
|
|
18493
18503
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
18494
|
-
key: index,
|
|
18504
|
+
key: layer.title + index,
|
|
18495
18505
|
className: styles$i.layerIcon
|
|
18496
18506
|
}, /*#__PURE__*/React__default.createElement(Tooltip$1, {
|
|
18497
18507
|
title: layer.title
|
|
@@ -18499,7 +18509,9 @@ function MainLegend(_ref) {
|
|
|
18499
18509
|
size: 18,
|
|
18500
18510
|
name: layer.iconName
|
|
18501
18511
|
})));
|
|
18502
|
-
}), defaultLayers.length > 0 && /*#__PURE__*/React__default.createElement(
|
|
18512
|
+
}), defaultLayers.length > 0 && /*#__PURE__*/React__default.createElement(Tooltip$1, {
|
|
18513
|
+
title: displayDefaultLayerNames()
|
|
18514
|
+
}, /*#__PURE__*/React__default.createElement("div", null, "+", defaultLayers.length)))));
|
|
18503
18515
|
}
|
|
18504
18516
|
|
|
18505
18517
|
var css_248z$j = ".LayerLegend-module_layerLegendContainer__DLfLy{background:rgba(0,0,0,.65);border-radius:4px;color:var(--white);cursor:pointer;font-weight:500;margin-bottom:2px;user-select:none}.LayerLegend-module_header__8NHIX{align-items:center;display:flex;height:2.5rem;justify-content:space-between;padding:12px;width:100%}.LayerLegend-module_activeHeader__EBvGl:hover{background:rgba(0,0,0,.9);border-radius:4px;color:var(--white)}.LayerLegend-module_leftInactive__1Lq18{align-items:center;display:flex;font-size:.875rem}.LayerLegend-module_leftActive__KrRDh{font-weight:700}.LayerLegend-module_right__-IwVs{align-items:center;display:flex;font-size:.625rem}.LayerLegend-module_icon__8VwWd{margin-right:8px}.LayerLegend-module_content__ElkbY{height:auto;padding-bottom:14px;padding-top:8px;width:100%}.LayerLegend-module_items__BC1cp{margin-right:4px}";
|