@procaaso/alphinity-ui-components 1.3.0 → 1.4.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 +31 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.js +31 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1038,6 +1038,7 @@ function DeviceControlPanel({
|
|
|
1038
1038
|
toastDuration = 3e3,
|
|
1039
1039
|
onModeChange,
|
|
1040
1040
|
onParameterChange,
|
|
1041
|
+
onParameterActivate,
|
|
1041
1042
|
onStart,
|
|
1042
1043
|
onStop,
|
|
1043
1044
|
startPending = false,
|
|
@@ -1750,6 +1751,36 @@ function DeviceControlPanel({
|
|
|
1750
1751
|
},
|
|
1751
1752
|
children: param.options?.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("option", { value: opt.value, children: opt.label }, opt.value))
|
|
1752
1753
|
}
|
|
1754
|
+
) : onParameterActivate && !param.readOnly ? (
|
|
1755
|
+
// Tappable value: defer editing to the consumer's editor (e.g. a
|
|
1756
|
+
// numpad dialog). Commit happens via onParameterChange.
|
|
1757
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
1758
|
+
"button",
|
|
1759
|
+
{
|
|
1760
|
+
type: "button",
|
|
1761
|
+
onClick: () => onParameterActivate(param.id, localParameterValues[param.id] ?? param.value),
|
|
1762
|
+
style: {
|
|
1763
|
+
width: "100%",
|
|
1764
|
+
height: touchSize,
|
|
1765
|
+
display: "flex",
|
|
1766
|
+
alignItems: "center",
|
|
1767
|
+
backgroundColor: "#ffffff",
|
|
1768
|
+
color: textColor,
|
|
1769
|
+
border: `1px solid ${borderColor}`,
|
|
1770
|
+
borderRadius: "6px",
|
|
1771
|
+
padding: "0 12px",
|
|
1772
|
+
fontSize: `${fontSize.input}px`,
|
|
1773
|
+
fontFamily: "Arial, sans-serif",
|
|
1774
|
+
fontWeight: 600,
|
|
1775
|
+
textAlign: "left",
|
|
1776
|
+
cursor: "pointer"
|
|
1777
|
+
},
|
|
1778
|
+
children: [
|
|
1779
|
+
localParameterValues[param.id] ?? param.value,
|
|
1780
|
+
param.unit ? ` ${param.unit}` : ""
|
|
1781
|
+
]
|
|
1782
|
+
}
|
|
1783
|
+
)
|
|
1753
1784
|
) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1754
1785
|
"input",
|
|
1755
1786
|
{
|