orcs-design-system 3.3.14 → 3.3.16
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.
|
@@ -4,28 +4,33 @@ const panelWidth = "300px";
|
|
|
4
4
|
export const ComponentContainer = styled.div.withConfig({
|
|
5
5
|
displayName: "FloatingPanelsstyles__ComponentContainer",
|
|
6
6
|
componentId: "sc-1by914f-0"
|
|
7
|
-
})(["z-index:
|
|
7
|
+
})(["z-index:", ";position:absolute;display:flex;flex-direction:column;align-items:flex-end;gap:8px;max-height:", ";", " ", ""], _ref => {
|
|
8
8
|
let {
|
|
9
|
-
|
|
9
|
+
zIndex
|
|
10
10
|
} = _ref;
|
|
11
|
-
return
|
|
11
|
+
return zIndex;
|
|
12
12
|
}, _ref2 => {
|
|
13
13
|
let {
|
|
14
|
-
|
|
14
|
+
containerHeight
|
|
15
15
|
} = _ref2;
|
|
16
|
-
return
|
|
17
|
-
|
|
16
|
+
return containerHeight ? `${containerHeight}px` : "100%";
|
|
17
|
+
}, _ref3 => {
|
|
18
|
+
let {
|
|
19
|
+
position
|
|
20
|
+
} = _ref3;
|
|
21
|
+
return Object.entries(position).filter(_ref4 => {
|
|
22
|
+
let [, value] = _ref4;
|
|
18
23
|
return value !== undefined;
|
|
19
|
-
}).map(
|
|
20
|
-
let [key, value] =
|
|
24
|
+
}).map(_ref5 => {
|
|
25
|
+
let [key, value] = _ref5;
|
|
21
26
|
return `${key}: ${typeof value === "number" ? `${value}px` : value};`;
|
|
22
27
|
}).join("\n");
|
|
23
|
-
},
|
|
28
|
+
}, _ref6 => {
|
|
24
29
|
let {
|
|
25
30
|
centered
|
|
26
|
-
} =
|
|
31
|
+
} = _ref6;
|
|
27
32
|
return centered ? `
|
|
28
|
-
left: 50%;
|
|
33
|
+
margin-left: 50%;
|
|
29
34
|
transform: translateX(-50%);
|
|
30
35
|
right: auto;
|
|
31
36
|
` : "";
|
|
@@ -33,19 +38,19 @@ export const ComponentContainer = styled.div.withConfig({
|
|
|
33
38
|
export const PanelContainer = styled.div.withConfig({
|
|
34
39
|
displayName: "FloatingPanelsstyles__PanelContainer",
|
|
35
40
|
componentId: "sc-1by914f-1"
|
|
36
|
-
})(["display:flex;flex-direction:column;align-items:flex-end;box-shadow:0 1px 3px rgba(0,0,0,0.1);gap:8px;border-radius:calc(", " + 1px);overflow:hidden;background:transparent;width:", ";max-height:", ";"], themeGet("radii.2"), panelWidth,
|
|
41
|
+
})(["display:flex;flex-direction:column;align-items:flex-end;box-shadow:0 1px 3px rgba(0,0,0,0.1);gap:8px;border-radius:calc(", " + 1px);overflow:hidden;background:transparent;width:", ";max-height:", ";"], themeGet("radii.2"), panelWidth, _ref7 => {
|
|
37
42
|
let {
|
|
38
43
|
containerHeight
|
|
39
|
-
} =
|
|
44
|
+
} = _ref7;
|
|
40
45
|
return containerHeight ? `${containerHeight}px` : "100%";
|
|
41
46
|
});
|
|
42
47
|
export const PanelWrapper = styled.div.withConfig({
|
|
43
48
|
displayName: "FloatingPanelsstyles__PanelWrapper",
|
|
44
49
|
componentId: "sc-1by914f-2"
|
|
45
|
-
})(["display:", ";background:white;width:", ";border:1px solid ", ";border-radius:8px;border-radius:0 0 8px 8px;overflow-y:auto;padding:\"0 12px 12px 12px\";margin-top:37px;transition:max-height 0.3s ease-in-out;"],
|
|
50
|
+
})(["display:", ";background:white;width:", ";border:1px solid ", ";border-radius:8px;border-radius:0 0 8px 8px;overflow-y:auto;padding:\"0 12px 12px 12px\";margin-top:37px;transition:max-height 0.3s ease-in-out;"], _ref8 => {
|
|
46
51
|
let {
|
|
47
52
|
isExpanded
|
|
48
|
-
} =
|
|
53
|
+
} = _ref8;
|
|
49
54
|
return isExpanded ? "block" : "none";
|
|
50
55
|
}, panelWidth, themeGet("colors.greyLighter"));
|
|
51
56
|
export const PanelHeader = styled.button.withConfig({
|
|
@@ -67,28 +72,28 @@ export const PanelBar = styled.div.withConfig({
|
|
|
67
72
|
export const IconButton = styled.button.withConfig({
|
|
68
73
|
displayName: "FloatingPanelsstyles__IconButton",
|
|
69
74
|
componentId: "sc-1by914f-7"
|
|
70
|
-
})(["font-family:", ";appearance:none;background-color:", ";border:none;width:36px;cursor:pointer;height:36px;display:flex;border-radius:", ";align-items:center;justify-content:center;transition:", ";&:hover{background-color:", ";}"], themeGet("fonts.main"),
|
|
75
|
+
})(["font-family:", ";appearance:none;background-color:", ";border:none;width:36px;cursor:pointer;height:36px;display:flex;border-radius:", ";align-items:center;justify-content:center;transition:", ";&:hover{background-color:", ";}"], themeGet("fonts.main"), _ref9 => {
|
|
71
76
|
let {
|
|
72
77
|
isExpanded
|
|
73
|
-
} =
|
|
78
|
+
} = _ref9;
|
|
74
79
|
return isExpanded ? themeGet("colors.primaryLightest") : themeGet("colors.white");
|
|
75
80
|
}, themeGet("radii.2"), themeGet("transition.transitionDefault"), themeGet("colors.primaryLightest"));
|
|
76
81
|
export const PanelContent = styled.div.withConfig({
|
|
77
82
|
displayName: "FloatingPanelsstyles__PanelContent",
|
|
78
83
|
componentId: "sc-1by914f-8"
|
|
79
|
-
})(["padding:8px;width:inerhit;display:", ";height:", ";opacity:", ";"],
|
|
84
|
+
})(["padding:8px;width:inerhit;display:", ";height:", ";opacity:", ";"], _ref10 => {
|
|
80
85
|
let {
|
|
81
86
|
isExpanded
|
|
82
|
-
} =
|
|
87
|
+
} = _ref10;
|
|
83
88
|
return isExpanded ? "block" : "none";
|
|
84
|
-
},
|
|
89
|
+
}, _ref11 => {
|
|
85
90
|
let {
|
|
86
91
|
isExpanded
|
|
87
|
-
} =
|
|
92
|
+
} = _ref11;
|
|
88
93
|
return isExpanded ? "100%" : "0";
|
|
89
|
-
},
|
|
94
|
+
}, _ref12 => {
|
|
90
95
|
let {
|
|
91
96
|
isExpanded
|
|
92
|
-
} =
|
|
97
|
+
} = _ref12;
|
|
93
98
|
return isExpanded ? "1" : "0";
|
|
94
99
|
});
|
|
@@ -12,6 +12,7 @@ const FloatingPanels = _ref => {
|
|
|
12
12
|
top: 20
|
|
13
13
|
},
|
|
14
14
|
centered = false,
|
|
15
|
+
zIndex = 2,
|
|
15
16
|
onClick = () => {}
|
|
16
17
|
} = _ref;
|
|
17
18
|
const [expandedPanelId, setExpandedPanelId] = useState(null);
|
|
@@ -37,6 +38,7 @@ const FloatingPanels = _ref => {
|
|
|
37
38
|
centered: centered,
|
|
38
39
|
containerHeight: containerHeight,
|
|
39
40
|
position: position,
|
|
41
|
+
zIndex: zIndex,
|
|
40
42
|
children: [/*#__PURE__*/_jsx(PanelBar, {
|
|
41
43
|
children: panels.map(panel => /*#__PURE__*/_jsx(PanelBarIcon, {
|
|
42
44
|
iconName: panel.iconName,
|
|
@@ -71,7 +73,8 @@ FloatingPanels.propTypes = {
|
|
|
71
73
|
left: PropTypes.oneOfType([PropTypes.number, PropTypes.string])
|
|
72
74
|
}),
|
|
73
75
|
onClick: PropTypes.func,
|
|
74
|
-
centered: PropTypes.bool
|
|
76
|
+
centered: PropTypes.bool,
|
|
77
|
+
zIndex: PropTypes.number
|
|
75
78
|
};
|
|
76
79
|
FloatingPanels.defaultProps = {
|
|
77
80
|
position: {
|
|
@@ -144,6 +147,17 @@ FloatingPanels.__docgenInfo = {
|
|
|
144
147
|
},
|
|
145
148
|
"required": false
|
|
146
149
|
},
|
|
150
|
+
"zIndex": {
|
|
151
|
+
"defaultValue": {
|
|
152
|
+
"value": "2",
|
|
153
|
+
"computed": false
|
|
154
|
+
},
|
|
155
|
+
"description": "",
|
|
156
|
+
"type": {
|
|
157
|
+
"name": "number"
|
|
158
|
+
},
|
|
159
|
+
"required": false
|
|
160
|
+
},
|
|
147
161
|
"onClick": {
|
|
148
162
|
"defaultValue": {
|
|
149
163
|
"value": "() => {}",
|