@superdispatch/ui 0.22.1 → 0.23.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 +90 -10
- package/dist-node/index.js.map +1 -1
- package/dist-src/index.js +1 -0
- package/dist-src/radio/RadioFieldCard.js +88 -0
- package/dist-types/index.d.ts +14 -1
- package/dist-web/index.js +94 -15
- package/dist-web/index.js.map +1 -1
- package/package.json +2 -2
package/dist-node/index.js
CHANGED
|
@@ -1839,7 +1839,86 @@ var RadioField = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
1839
1839
|
});
|
|
1840
1840
|
if (process.env.NODE_ENV !== "production") RadioField.displayName = "RadioField";
|
|
1841
1841
|
|
|
1842
|
-
var _excluded$k = ["name", "value", "
|
|
1842
|
+
var _excluded$k = ["name", "value", "label", "caption", "disabled", "icon", "checked", "onChange"];
|
|
1843
|
+
var ClickableCard = /*#__PURE__*/styled__default(core.ButtonBase).withConfig({
|
|
1844
|
+
displayName: "RadioFieldCard__ClickableCard",
|
|
1845
|
+
componentId: "SD__sc-5etge2-0"
|
|
1846
|
+
})(["display:block;text-align:initial;width:100%;"]);
|
|
1847
|
+
var Card = /*#__PURE__*/styled__default(core.Card).withConfig({
|
|
1848
|
+
displayName: "RadioFieldCard__Card",
|
|
1849
|
+
componentId: "SD__sc-5etge2-1"
|
|
1850
|
+
})(["width:100%;opacity:", ";"], props => props.disabled ? 0.5 : 1);
|
|
1851
|
+
var FormControlLabel = /*#__PURE__*/styled__default(core.FormControlLabel).withConfig({
|
|
1852
|
+
displayName: "RadioFieldCard__FormControlLabel",
|
|
1853
|
+
componentId: "SD__sc-5etge2-2"
|
|
1854
|
+
})(["width:100%;"]);
|
|
1855
|
+
var Content = /*#__PURE__*/styled__default.div.withConfig({
|
|
1856
|
+
displayName: "RadioFieldCard__Content",
|
|
1857
|
+
componentId: "SD__sc-5etge2-3"
|
|
1858
|
+
})(["padding:16px;width:100%;border-radius:4px;border:1px solid ", ";"], _ref => {
|
|
1859
|
+
var {
|
|
1860
|
+
active
|
|
1861
|
+
} = _ref;
|
|
1862
|
+
return active ? exports.Color.Blue300 : exports.Color.Silver500;
|
|
1863
|
+
});
|
|
1864
|
+
var Caption = /*#__PURE__*/styled__default.div.withConfig({
|
|
1865
|
+
displayName: "RadioFieldCard__Caption",
|
|
1866
|
+
componentId: "SD__sc-5etge2-4"
|
|
1867
|
+
})(["padding-left:32px;"]);
|
|
1868
|
+
var RadioFieldCard = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
|
|
1869
|
+
var {
|
|
1870
|
+
name,
|
|
1871
|
+
value,
|
|
1872
|
+
label,
|
|
1873
|
+
caption,
|
|
1874
|
+
disabled,
|
|
1875
|
+
icon,
|
|
1876
|
+
checked,
|
|
1877
|
+
onChange
|
|
1878
|
+
} = _ref2,
|
|
1879
|
+
props = _objectWithoutProperties(_ref2, _excluded$k);
|
|
1880
|
+
|
|
1881
|
+
return /*#__PURE__*/jsxRuntime.jsx(Card, {
|
|
1882
|
+
disabled: disabled,
|
|
1883
|
+
children: /*#__PURE__*/jsxRuntime.jsx(ClickableCard, _objectSpread(_objectSpread({
|
|
1884
|
+
name: name,
|
|
1885
|
+
disabled: disabled
|
|
1886
|
+
}, props), {}, {
|
|
1887
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Content, {
|
|
1888
|
+
active: checked,
|
|
1889
|
+
children: /*#__PURE__*/jsxRuntime.jsxs(Columns, {
|
|
1890
|
+
space: "small",
|
|
1891
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs(Column, {
|
|
1892
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(FormControlLabel, {
|
|
1893
|
+
value: value,
|
|
1894
|
+
name: name,
|
|
1895
|
+
control: /*#__PURE__*/jsxRuntime.jsx(core.Radio, {
|
|
1896
|
+
ref: ref,
|
|
1897
|
+
checked: checked
|
|
1898
|
+
}),
|
|
1899
|
+
label: /*#__PURE__*/jsxRuntime.jsx(core.Typography, {
|
|
1900
|
+
variant: "h4",
|
|
1901
|
+
children: label
|
|
1902
|
+
})
|
|
1903
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Caption, {
|
|
1904
|
+
children: /*#__PURE__*/jsxRuntime.jsx(core.Typography, {
|
|
1905
|
+
color: "textSecondary",
|
|
1906
|
+
variant: "caption",
|
|
1907
|
+
children: caption
|
|
1908
|
+
})
|
|
1909
|
+
})]
|
|
1910
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Column, {
|
|
1911
|
+
width: "content",
|
|
1912
|
+
children: icon
|
|
1913
|
+
})]
|
|
1914
|
+
})
|
|
1915
|
+
})
|
|
1916
|
+
}))
|
|
1917
|
+
}, value);
|
|
1918
|
+
});
|
|
1919
|
+
if (process.env.NODE_ENV !== "production") RadioFieldCard.displayName = "RadioFieldCard";
|
|
1920
|
+
|
|
1921
|
+
var _excluded$l = ["name", "value", "onChange", "RadioGroupProps", "label", "FormLabelProps", "helperText", "FormHelperTextProps", "children"];
|
|
1843
1922
|
var RadioGroupField = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
1844
1923
|
var {
|
|
1845
1924
|
name,
|
|
@@ -1852,7 +1931,7 @@ var RadioGroupField = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
1852
1931
|
FormHelperTextProps: formHelperTextProps,
|
|
1853
1932
|
children
|
|
1854
1933
|
} = _ref,
|
|
1855
|
-
formControlProps = _objectWithoutProperties(_ref, _excluded$
|
|
1934
|
+
formControlProps = _objectWithoutProperties(_ref, _excluded$l);
|
|
1856
1935
|
|
|
1857
1936
|
return /*#__PURE__*/jsxRuntime.jsxs(core.FormControl, _objectSpread(_objectSpread({}, formControlProps), {}, {
|
|
1858
1937
|
hiddenLabel: !label,
|
|
@@ -1902,7 +1981,7 @@ function useMinBreakpoint(minBreakpoint) {
|
|
|
1902
1981
|
return minBreakpointIDX < breakpointIDX;
|
|
1903
1982
|
}
|
|
1904
1983
|
|
|
1905
|
-
var _excluded$
|
|
1984
|
+
var _excluded$m = ["action", "children", "onClose", "className", "classes", "variant"],
|
|
1906
1985
|
_excluded2$4 = ["icon", "closeButton", "variantError", "variantSuccess"];
|
|
1907
1986
|
var useStyles$b = /*#__PURE__*/styles.makeStyles(theme => ({
|
|
1908
1987
|
root: {
|
|
@@ -1947,7 +2026,7 @@ var SnackbarContent = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
1947
2026
|
classes,
|
|
1948
2027
|
variant = 'default'
|
|
1949
2028
|
} = _ref,
|
|
1950
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2029
|
+
props = _objectWithoutProperties(_ref, _excluded$m);
|
|
1951
2030
|
|
|
1952
2031
|
var _useStyles = useStyles$b({
|
|
1953
2032
|
classes
|
|
@@ -1997,7 +2076,7 @@ var SnackbarContent = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
1997
2076
|
});
|
|
1998
2077
|
if (process.env.NODE_ENV !== "production") SnackbarContent.displayName = "SnackbarContent";
|
|
1999
2078
|
|
|
2000
|
-
var _excluded$
|
|
2079
|
+
var _excluded$n = ["open", "action", "variant", "onClose", "children", "ContentProps", "hasCloseButton", "TransitionComponent"];
|
|
2001
2080
|
|
|
2002
2081
|
function SlideTransition(props) {
|
|
2003
2082
|
return /*#__PURE__*/jsxRuntime.jsx(core.Slide, _objectSpread(_objectSpread({}, props), {}, {
|
|
@@ -2016,7 +2095,7 @@ var Snackbar = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
2016
2095
|
hasCloseButton = onClose != null,
|
|
2017
2096
|
TransitionComponent = SlideTransition
|
|
2018
2097
|
} = _ref,
|
|
2019
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2098
|
+
props = _objectWithoutProperties(_ref, _excluded$n);
|
|
2020
2099
|
|
|
2021
2100
|
function handleClose(reason) {
|
|
2022
2101
|
if (reason !== 'clickaway') {
|
|
@@ -2045,7 +2124,7 @@ var Snackbar = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
2045
2124
|
});
|
|
2046
2125
|
if (process.env.NODE_ENV !== "production") Snackbar.displayName = "Snackbar";
|
|
2047
2126
|
|
|
2048
|
-
var _excluded$
|
|
2127
|
+
var _excluded$o = ["onClose", "variant", "key", "id", "autoHideDuration"];
|
|
2049
2128
|
|
|
2050
2129
|
function warnContext() {
|
|
2051
2130
|
// eslint-disable-next-line no-console
|
|
@@ -2091,7 +2170,7 @@ function SnackbarStackProvider(_ref2) {
|
|
|
2091
2170
|
id = String(key),
|
|
2092
2171
|
autoHideDuration = 5000
|
|
2093
2172
|
} = _ref3,
|
|
2094
|
-
props = _objectWithoutProperties(_ref3, _excluded$
|
|
2173
|
+
props = _objectWithoutProperties(_ref3, _excluded$o);
|
|
2095
2174
|
|
|
2096
2175
|
function removeSnackbar() {
|
|
2097
2176
|
setStack(prev => {
|
|
@@ -2188,7 +2267,7 @@ var Stack = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
|
|
|
2188
2267
|
});
|
|
2189
2268
|
if (process.env.NODE_ENV !== "production") Stack.displayName = "Stack";
|
|
2190
2269
|
|
|
2191
|
-
var _excluded$
|
|
2270
|
+
var _excluded$p = ["color", "variant", "children", "classes", "className", "noWrap", "fontWeight", "component"];
|
|
2192
2271
|
var useStyles$c = /*#__PURE__*/styles.makeStyles(theme => ({
|
|
2193
2272
|
root: {
|
|
2194
2273
|
maxWidth: '100%',
|
|
@@ -2272,7 +2351,7 @@ var Tag = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
2272
2351
|
fontWeight = 'bold',
|
|
2273
2352
|
component = 'div'
|
|
2274
2353
|
} = _ref,
|
|
2275
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
2354
|
+
props = _objectWithoutProperties(_ref, _excluded$p);
|
|
2276
2355
|
|
|
2277
2356
|
var styles = useStyles$c({
|
|
2278
2357
|
classes
|
|
@@ -3824,6 +3903,7 @@ exports.InlineGrid = InlineGrid;
|
|
|
3824
3903
|
exports.NumberField = NumberField;
|
|
3825
3904
|
exports.OverflowText = OverflowText;
|
|
3826
3905
|
exports.RadioField = RadioField;
|
|
3906
|
+
exports.RadioFieldCard = RadioFieldCard;
|
|
3827
3907
|
exports.RadioGroupField = RadioGroupField;
|
|
3828
3908
|
exports.ResponsiveContextProvider = ResponsiveContextProvider;
|
|
3829
3909
|
exports.Snackbar = Snackbar;
|