@kingsimba/nc-ui 0.1.36 → 0.1.37
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.cjs +4 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +9 -46
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -135,7 +135,7 @@ function _n({
|
|
|
135
135
|
}) {
|
|
136
136
|
const o = Math.max(0, Math.min(1, Number(e) || 0)), i = o === 0 ? "-" : String(Math.round(o * 100));
|
|
137
137
|
let a;
|
|
138
|
-
r ? o < 0.1 ? a = "var(--nc-danger)" : o < 0.2 ? a = "var(--nc-warning)" : a = "var(--nc-success)" : a = n ? "
|
|
138
|
+
r ? o < 0.1 ? a = "var(--nc-danger)" : o < 0.2 ? a = "var(--nc-warning)" : a = "var(--nc-success)" : a = n ? "rgba(255,255,255,0.35)" : "#000000";
|
|
139
139
|
const c = "var(--nc-battery-shell-bg)", l = 24, u = 14, f = 2, b = 0, d = 12, m = 0, A = 0, v = 0, w = l, y = u, h = y - m * 2, p = w - m * 2, g = Math.max(1, Math.min(4, y / 4)), x = o === 0 ? 0 : 0.05 + o * 0.95, C = l + f + d, T = 20, E = 0.65, S = Math.max(u, T * E), L = l + f + 1, k = (u - T * E) / 2;
|
|
140
140
|
return /* @__PURE__ */ N(
|
|
141
141
|
"svg",
|
|
@@ -2154,26 +2154,10 @@ class nn extends ze.Component {
|
|
|
2154
2154
|
console.error(`Error loading app ${this.props.appId}:`, t, n);
|
|
2155
2155
|
}
|
|
2156
2156
|
render() {
|
|
2157
|
-
return this.state.hasError ? /* @__PURE__ */ N(
|
|
2158
|
-
"div",
|
|
2159
|
-
{
|
|
2160
|
-
|
|
2161
|
-
display: "flex",
|
|
2162
|
-
alignItems: "center",
|
|
2163
|
-
justifyContent: "center",
|
|
2164
|
-
flex: 1,
|
|
2165
|
-
flexDirection: "column",
|
|
2166
|
-
gap: "16px",
|
|
2167
|
-
padding: "20px",
|
|
2168
|
-
textAlign: "center",
|
|
2169
|
-
color: "var(--text-secondary)"
|
|
2170
|
-
},
|
|
2171
|
-
children: [
|
|
2172
|
-
/* @__PURE__ */ s("div", { children: "Failed to load app" }),
|
|
2173
|
-
this.state.error && /* @__PURE__ */ s("div", { style: { fontSize: "12px", opacity: 0.7 }, children: this.state.error.message })
|
|
2174
|
-
]
|
|
2175
|
-
}
|
|
2176
|
-
) : this.props.children;
|
|
2157
|
+
return this.state.hasError ? /* @__PURE__ */ N("div", { className: "nc-app-error", children: [
|
|
2158
|
+
/* @__PURE__ */ s("div", { children: "Failed to load app" }),
|
|
2159
|
+
this.state.error && /* @__PURE__ */ s("div", { style: { fontSize: "12px", opacity: 0.7 }, children: this.state.error.message })
|
|
2160
|
+
] }) : this.props.children;
|
|
2177
2161
|
}
|
|
2178
2162
|
}
|
|
2179
2163
|
function rt({ appId: e, isActive: t, onClose: n }) {
|
|
@@ -2211,12 +2195,7 @@ function rt({ appId: e, isActive: t, onClose: n }) {
|
|
|
2211
2195
|
return /* @__PURE__ */ N(
|
|
2212
2196
|
"div",
|
|
2213
2197
|
{
|
|
2214
|
-
|
|
2215
|
-
display: t ? "flex" : "none",
|
|
2216
|
-
flexDirection: "column",
|
|
2217
|
-
flex: 1,
|
|
2218
|
-
minHeight: 0
|
|
2219
|
-
},
|
|
2198
|
+
className: `nc-app-container${t ? "" : " nc-hidden"}`,
|
|
2220
2199
|
children: [
|
|
2221
2200
|
E && /* @__PURE__ */ s(
|
|
2222
2201
|
tn,
|
|
@@ -2231,31 +2210,15 @@ function rt({ appId: e, isActive: t, onClose: n }) {
|
|
|
2231
2210
|
/* @__PURE__ */ s(
|
|
2232
2211
|
"div",
|
|
2233
2212
|
{
|
|
2234
|
-
className:
|
|
2213
|
+
className: "nc-app-content-wrapper",
|
|
2235
2214
|
style: {
|
|
2236
2215
|
padding: o.padding,
|
|
2237
|
-
|
|
2238
|
-
minHeight: 0,
|
|
2239
|
-
display: "flex",
|
|
2240
|
-
flexDirection: "column",
|
|
2241
|
-
backgroundColor: "var(--nc-bg-tertiary)",
|
|
2242
|
-
position: "relative"
|
|
2216
|
+
overflowY: E ? "auto" : void 0
|
|
2243
2217
|
},
|
|
2244
2218
|
children: /* @__PURE__ */ s(nt.Provider, { value: C, children: /* @__PURE__ */ s(nn, { appId: e, children: /* @__PURE__ */ s(
|
|
2245
2219
|
Mt,
|
|
2246
2220
|
{
|
|
2247
|
-
fallback: /* @__PURE__ */ s(
|
|
2248
|
-
"div",
|
|
2249
|
-
{
|
|
2250
|
-
style: {
|
|
2251
|
-
display: "flex",
|
|
2252
|
-
alignItems: "center",
|
|
2253
|
-
justifyContent: "center",
|
|
2254
|
-
flex: 1
|
|
2255
|
-
},
|
|
2256
|
-
children: /* @__PURE__ */ s(Qe, {})
|
|
2257
|
-
}
|
|
2258
|
-
),
|
|
2221
|
+
fallback: /* @__PURE__ */ s("div", { className: "nc-app-loading", children: /* @__PURE__ */ s(Qe, {}) }),
|
|
2259
2222
|
children: /* @__PURE__ */ s(T, {})
|
|
2260
2223
|
}
|
|
2261
2224
|
) }) })
|