@procaaso/alphinity-ui-components 1.5.0 → 1.8.0
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 +34 -26
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +27 -11
- package/dist/index.d.ts +27 -11
- package/dist/index.js +34 -26
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1859,33 +1859,41 @@ function DeviceControlPanel({
|
|
|
1859
1859
|
}
|
|
1860
1860
|
)
|
|
1861
1861
|
] }),
|
|
1862
|
-
activeCapabilities?.customActions && activeCapabilities.customActions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: { display: "flex", flexWrap: "wrap", gap: "8px" }, children: activeCapabilities.customActions.map((action) =>
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1862
|
+
activeCapabilities?.customActions && activeCapabilities.customActions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: { display: "flex", flexWrap: "wrap", gap: "8px" }, children: activeCapabilities.customActions.map((action) => {
|
|
1863
|
+
const actionDisabled = action.disabled === true;
|
|
1864
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
1865
|
+
"button",
|
|
1866
|
+
{
|
|
1867
|
+
onClick: () => {
|
|
1868
|
+
if (!actionDisabled) onCustomAction?.(action.id);
|
|
1869
|
+
},
|
|
1870
|
+
disabled: actionDisabled,
|
|
1871
|
+
title: actionDisabled ? action.disabledReason : void 0,
|
|
1872
|
+
style: {
|
|
1873
|
+
flex: 1,
|
|
1874
|
+
minWidth: "120px",
|
|
1875
|
+
height: touchSize,
|
|
1876
|
+
backgroundColor: surfaceColor,
|
|
1877
|
+
color: textColor,
|
|
1878
|
+
border: `1px solid ${borderColor}`,
|
|
1879
|
+
borderRadius: "6px",
|
|
1880
|
+
fontSize: "11px",
|
|
1881
|
+
fontWeight: 600,
|
|
1882
|
+
fontFamily: "monospace",
|
|
1883
|
+
letterSpacing: "0.5px",
|
|
1884
|
+
textTransform: "uppercase",
|
|
1885
|
+
cursor: actionDisabled ? "not-allowed" : "pointer",
|
|
1886
|
+
opacity: actionDisabled ? 0.4 : 1,
|
|
1887
|
+
transition: "all 0.15s"
|
|
1888
|
+
},
|
|
1889
|
+
children: [
|
|
1890
|
+
action.icon && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { style: { marginRight: "6px" }, children: action.icon }),
|
|
1891
|
+
action.label
|
|
1892
|
+
]
|
|
1881
1893
|
},
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
]
|
|
1886
|
-
},
|
|
1887
|
-
action.id
|
|
1888
|
-
)) })
|
|
1894
|
+
action.id
|
|
1895
|
+
);
|
|
1896
|
+
}) })
|
|
1889
1897
|
] }),
|
|
1890
1898
|
binding.state.lastCommandResult && showToast && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1891
1899
|
"div",
|