@superdispatch/ui 0.26.1 → 0.28.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-node/index.js +65 -23
- package/dist-node/index.js.map +1 -1
- package/dist-src/drawer/DrawerTitle.js +28 -18
- package/dist-src/number-field/NumberField.js +37 -5
- package/dist-types/index.d.ts +1 -0
- package/dist-web/index.js +65 -23
- package/dist-web/index.js.map +1 -1
- package/package.json +3 -3
package/dist-node/index.js
CHANGED
|
@@ -1467,30 +1467,40 @@ var DrawerTitle = /*#__PURE__*/React.forwardRef((_ref, appBarRef) => {
|
|
|
1467
1467
|
className: styles.toolbar,
|
|
1468
1468
|
children: /*#__PURE__*/jsxRuntime.jsxs(core.Grid, {
|
|
1469
1469
|
container: true,
|
|
1470
|
-
|
|
1471
|
-
children: [
|
|
1470
|
+
direction: "column",
|
|
1471
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(core.Grid, {
|
|
1472
1472
|
item: true,
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1473
|
+
children: /*#__PURE__*/jsxRuntime.jsxs(core.Grid, {
|
|
1474
|
+
container: true,
|
|
1475
|
+
alignItems: "center",
|
|
1476
|
+
children: [!!startAction && /*#__PURE__*/jsxRuntime.jsx(core.Grid, {
|
|
1477
|
+
item: true,
|
|
1478
|
+
className: styles.startAction,
|
|
1479
|
+
children: startAction
|
|
1480
|
+
}), /*#__PURE__*/jsxRuntime.jsx(core.Grid, {
|
|
1481
|
+
item: true,
|
|
1482
|
+
xs: true,
|
|
1483
|
+
zeroMinWidth: true,
|
|
1484
|
+
children: /*#__PURE__*/jsxRuntime.jsx(core.Typography, _objectSpread(_objectSpread({
|
|
1485
|
+
variant: "h3",
|
|
1486
|
+
noWrap: true
|
|
1487
|
+
}, titleTypographyProps), {}, {
|
|
1488
|
+
children: title
|
|
1489
|
+
}))
|
|
1490
|
+
}), !!endAction && /*#__PURE__*/jsxRuntime.jsx(core.Grid, {
|
|
1491
|
+
item: true,
|
|
1492
|
+
className: styles.endAction,
|
|
1493
|
+
children: endAction
|
|
1494
|
+
})]
|
|
1495
|
+
})
|
|
1496
|
+
}), /*#__PURE__*/jsxRuntime.jsx(core.Grid, {
|
|
1476
1497
|
item: true,
|
|
1477
|
-
|
|
1478
|
-
zeroMinWidth: true,
|
|
1479
|
-
children: [/*#__PURE__*/jsxRuntime.jsx(core.Typography, _objectSpread(_objectSpread({
|
|
1480
|
-
variant: "h3",
|
|
1481
|
-
noWrap: true
|
|
1482
|
-
}, titleTypographyProps), {}, {
|
|
1483
|
-
children: title
|
|
1484
|
-
})), !!subtitle && /*#__PURE__*/jsxRuntime.jsx(core.Typography, _objectSpread(_objectSpread({
|
|
1498
|
+
children: !!subtitle && /*#__PURE__*/jsxRuntime.jsx(core.Typography, _objectSpread(_objectSpread({
|
|
1485
1499
|
variant: "body2",
|
|
1486
1500
|
noWrap: true
|
|
1487
1501
|
}, subtitleTypographyProps), {}, {
|
|
1488
1502
|
children: subtitle
|
|
1489
|
-
}))
|
|
1490
|
-
}), !!endAction && /*#__PURE__*/jsxRuntime.jsx(core.Grid, {
|
|
1491
|
-
item: true,
|
|
1492
|
-
className: styles.endAction,
|
|
1493
|
-
children: endAction
|
|
1503
|
+
}))
|
|
1494
1504
|
})]
|
|
1495
1505
|
})
|
|
1496
1506
|
})
|
|
@@ -1710,7 +1720,8 @@ var Inline = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
|
|
|
1710
1720
|
if (process.env.NODE_ENV !== "production") Inline.displayName = "Inline";
|
|
1711
1721
|
|
|
1712
1722
|
var _excluded$i = ["value", "inputRef", "onChange", "valueIsNumericString", "thousandSeparator", "disableValueParsing"],
|
|
1713
|
-
_excluded2$3 = ["
|
|
1723
|
+
_excluded2$3 = ["value", "inputRef", "onChange", "valueIsNumericString", "thousandSeparator", "disableValueParsing"],
|
|
1724
|
+
_excluded3 = ["id", "InputProps", "isText"];
|
|
1714
1725
|
function NumberInputComponent(_ref) {
|
|
1715
1726
|
var {
|
|
1716
1727
|
value,
|
|
@@ -1741,18 +1752,49 @@ function NumberInputComponent(_ref) {
|
|
|
1741
1752
|
}
|
|
1742
1753
|
}));
|
|
1743
1754
|
}
|
|
1744
|
-
|
|
1755
|
+
function TextInputComponent(_ref2) {
|
|
1745
1756
|
var {
|
|
1746
|
-
|
|
1747
|
-
|
|
1757
|
+
value,
|
|
1758
|
+
inputRef,
|
|
1759
|
+
onChange,
|
|
1760
|
+
valueIsNumericString = true,
|
|
1761
|
+
thousandSeparator = true,
|
|
1762
|
+
disableValueParsing
|
|
1748
1763
|
} = _ref2,
|
|
1749
1764
|
props = _objectWithoutProperties(_ref2, _excluded2$3);
|
|
1765
|
+
return /*#__PURE__*/jsxRuntime.jsx(reactNumberFormat.NumericFormat, _objectSpread(_objectSpread({}, props), {}, {
|
|
1766
|
+
value: value !== null && value !== void 0 ? value : '',
|
|
1767
|
+
inputMode: "decimal",
|
|
1768
|
+
getInputRef: inputRef,
|
|
1769
|
+
valueIsNumericString: valueIsNumericString,
|
|
1770
|
+
thousandSeparator: thousandSeparator,
|
|
1771
|
+
allowedDecimalSeparators: ['.', ','],
|
|
1772
|
+
onValueChange: (values, sourceInfo) => {
|
|
1773
|
+
var {
|
|
1774
|
+
event
|
|
1775
|
+
} = sourceInfo;
|
|
1776
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
|
|
1777
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(_objectSpread(_objectSpread({}, event), {}, {
|
|
1778
|
+
target: _objectSpread(_objectSpread({}, event === null || event === void 0 ? void 0 : event.target), {}, {
|
|
1779
|
+
value: values.value
|
|
1780
|
+
})
|
|
1781
|
+
}));
|
|
1782
|
+
}
|
|
1783
|
+
}));
|
|
1784
|
+
}
|
|
1785
|
+
var NumberField = /*#__PURE__*/React.forwardRef((_ref3, ref) => {
|
|
1786
|
+
var {
|
|
1787
|
+
id,
|
|
1788
|
+
InputProps,
|
|
1789
|
+
isText = false
|
|
1790
|
+
} = _ref3,
|
|
1791
|
+
props = _objectWithoutProperties(_ref3, _excluded3);
|
|
1750
1792
|
var uid = useUID(id);
|
|
1751
1793
|
return /*#__PURE__*/jsxRuntime.jsx(core.TextField, _objectSpread(_objectSpread({}, props), {}, {
|
|
1752
1794
|
ref: ref,
|
|
1753
1795
|
id: uid,
|
|
1754
1796
|
InputProps: _objectSpread(_objectSpread({}, InputProps), {}, {
|
|
1755
|
-
inputComponent: NumberInputComponent
|
|
1797
|
+
inputComponent: isText ? TextInputComponent : NumberInputComponent
|
|
1756
1798
|
})
|
|
1757
1799
|
}));
|
|
1758
1800
|
});
|