@danderson00/react-forms-material 0.0.41 → 0.0.42
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.js +25 -62
- package/dist/index.js.map +1 -1
- package/dist/styles.js +0 -2
- package/dist/styles.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -30,63 +30,35 @@ Object.defineProperty(exports, "wrapInput", {
|
|
|
30
30
|
return _reactForms.wrapInput;
|
|
31
31
|
}
|
|
32
32
|
});
|
|
33
|
-
|
|
34
33
|
var _react = require("react");
|
|
35
|
-
|
|
36
34
|
var _reactForms = require("@danderson00/react-forms");
|
|
37
|
-
|
|
38
35
|
var _ErrorMessage = require("@danderson00/react-forms/dist/ErrorMessage");
|
|
39
|
-
|
|
40
36
|
var _Button = _interopRequireDefault(require("@material-ui/core/Button"));
|
|
41
|
-
|
|
42
37
|
var _Checkbox = _interopRequireDefault(require("@material-ui/core/Checkbox"));
|
|
43
|
-
|
|
44
38
|
var _FormControl = _interopRequireDefault(require("@material-ui/core/FormControl"));
|
|
45
|
-
|
|
46
39
|
var _FormHelperText = _interopRequireDefault(require("@material-ui/core/FormHelperText"));
|
|
47
|
-
|
|
48
40
|
var _Input = _interopRequireDefault(require("@material-ui/core/Input"));
|
|
49
|
-
|
|
50
41
|
var _InputLabel = _interopRequireDefault(require("@material-ui/core/InputLabel"));
|
|
51
|
-
|
|
52
42
|
var _MenuItem = _interopRequireDefault(require("@material-ui/core/MenuItem"));
|
|
53
|
-
|
|
54
43
|
var _Radio = _interopRequireDefault(require("@material-ui/core/Radio"));
|
|
55
|
-
|
|
56
44
|
var _RadioGroup = _interopRequireDefault(require("@material-ui/core/RadioGroup"));
|
|
57
|
-
|
|
58
45
|
var _Select = _interopRequireDefault(require("@material-ui/core/Select"));
|
|
59
|
-
|
|
60
46
|
require("./styles");
|
|
61
|
-
|
|
62
47
|
var _excluded = ["className", "error", "hiddenLabel", "variant", "margin", "label", "helperText", "shrinkLabel", "valid", "pattern"],
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
48
|
+
_excluded2 = ["name", "values", "labels", "numeric", "required", "getFieldValue", "getFieldValues"],
|
|
49
|
+
_excluded3 = ["values", "labels"];
|
|
66
50
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
67
|
-
|
|
68
51
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
69
|
-
|
|
70
52
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
71
|
-
|
|
72
53
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
73
|
-
|
|
74
54
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
75
|
-
|
|
76
55
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
77
|
-
|
|
78
56
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
79
|
-
|
|
80
57
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
81
|
-
|
|
82
58
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
83
|
-
|
|
84
59
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
85
|
-
|
|
86
60
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
87
|
-
|
|
88
61
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
89
|
-
|
|
90
62
|
var ErrorMessage = function ErrorMessage(_ref) {
|
|
91
63
|
var error = _ref.error;
|
|
92
64
|
return /*#__PURE__*/(0, _react.createElement)(_FormHelperText["default"], {
|
|
@@ -94,7 +66,6 @@ var ErrorMessage = function ErrorMessage(_ref) {
|
|
|
94
66
|
error: true
|
|
95
67
|
});
|
|
96
68
|
};
|
|
97
|
-
|
|
98
69
|
exports.ErrorMessage = ErrorMessage;
|
|
99
70
|
var Form = (0, _reactForms.FormProvider)(_reactForms.context.Provider, {
|
|
100
71
|
margin: 'dense'
|
|
@@ -104,35 +75,30 @@ var Submit = (0, _reactForms.wrapSubmit)(_Button["default"]);
|
|
|
104
75
|
exports.Submit = Submit;
|
|
105
76
|
var Button = _Button["default"];
|
|
106
77
|
exports.Button = Button;
|
|
107
|
-
|
|
108
78
|
var wrapped = function wrapped(component, options, baseOptions) {
|
|
109
79
|
return (0, _reactForms.wrapInput)(base(component, options, baseOptions), _objectSpread({
|
|
110
80
|
passErrorProp: true
|
|
111
81
|
}, options));
|
|
112
82
|
};
|
|
113
|
-
|
|
114
83
|
var base = function base(component) {
|
|
115
84
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
116
|
-
|
|
117
85
|
var _ref2 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
86
|
+
alwaysShrinkLabel = _ref2.alwaysShrinkLabel,
|
|
87
|
+
_ref2$shrinkLabel = _ref2.shrinkLabel,
|
|
88
|
+
shrinkLabelOption = _ref2$shrinkLabel === void 0 ? true : _ref2$shrinkLabel,
|
|
89
|
+
passError = _ref2.passError;
|
|
123
90
|
return function (_ref3) {
|
|
124
91
|
var className = _ref3.className,
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
92
|
+
error = _ref3.error,
|
|
93
|
+
hiddenLabel = _ref3.hiddenLabel,
|
|
94
|
+
variant = _ref3.variant,
|
|
95
|
+
margin = _ref3.margin,
|
|
96
|
+
label = _ref3.label,
|
|
97
|
+
helperText = _ref3.helperText,
|
|
98
|
+
shrinkLabel = _ref3.shrinkLabel,
|
|
99
|
+
valid = _ref3.valid,
|
|
100
|
+
pattern = _ref3.pattern,
|
|
101
|
+
inputProps = _objectWithoutProperties(_ref3, _excluded);
|
|
136
102
|
return /*#__PURE__*/(0, _react.createElement)(_FormControl["default"], {
|
|
137
103
|
className: "react-forms-material-field".concat(options.type ? " react-forms-material-".concat(options.type) : '').concat(className ? " ".concat(className) : ''),
|
|
138
104
|
error: error,
|
|
@@ -165,7 +131,6 @@ var base = function base(component) {
|
|
|
165
131
|
});
|
|
166
132
|
};
|
|
167
133
|
};
|
|
168
|
-
|
|
169
134
|
var Input = (0, _reactForms.wrapInput)(_Input["default"]);
|
|
170
135
|
exports.Input = Input;
|
|
171
136
|
var Text = wrapped(_Input["default"]);
|
|
@@ -184,14 +149,13 @@ var RadioButton = wrapped(_Radio["default"], {
|
|
|
184
149
|
exports.RadioButton = RadioButton;
|
|
185
150
|
var Radio = (0, _reactForms.createRawConsumer)(base(function (_ref4) {
|
|
186
151
|
var name = _ref4.name,
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
152
|
+
values = _ref4.values,
|
|
153
|
+
labels = _ref4.labels,
|
|
154
|
+
numeric = _ref4.numeric,
|
|
155
|
+
required = _ref4.required,
|
|
156
|
+
getFieldValue = _ref4.getFieldValue,
|
|
157
|
+
getFieldValues = _ref4.getFieldValues,
|
|
158
|
+
props = _objectWithoutProperties(_ref4, _excluded2);
|
|
195
159
|
return /*#__PURE__*/(0, _react.createElement)(_RadioGroup["default"], _objectSpread(_objectSpread({}, props), {}, {
|
|
196
160
|
children: [values.map(function (value, index) {
|
|
197
161
|
return /*#__PURE__*/(0, _react.createElement)(RadioButton, _objectSpread({
|
|
@@ -214,9 +178,8 @@ var Radio = (0, _reactForms.createRawConsumer)(base(function (_ref4) {
|
|
|
214
178
|
exports.Radio = Radio;
|
|
215
179
|
var Select = wrapped(function (_ref5) {
|
|
216
180
|
var values = _ref5.values,
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
181
|
+
labels = _ref5.labels,
|
|
182
|
+
props = _objectWithoutProperties(_ref5, _excluded3);
|
|
220
183
|
return /*#__PURE__*/(0, _react.createElement)(_Select["default"], _objectSpread(_objectSpread({}, props), {}, {
|
|
221
184
|
children: values.map(function (value, index) {
|
|
222
185
|
return /*#__PURE__*/(0, _react.createElement)(_MenuItem["default"], _objectSpread({
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["ErrorMessage","error","createElement","MuiFormHelperText","children","extractErrorMessage","Form","FormProvider","context","Provider","margin","Submit","wrapSubmit","MuiButton","Button","wrapped","component","options","baseOptions","wrapInput","base","passErrorProp","alwaysShrinkLabel","shrinkLabel","shrinkLabelOption","passError","className","hiddenLabel","variant","label","helperText","valid","pattern","inputProps","MuiFormControl","type","fullWidth","required","MuiInputLabel","key","htmlFor","id","shrink","Input","MuiInput","Text","Checkbox","MuiCheckbox","RadioButton","MuiRadio","Radio","createRawConsumer","name","values","labels","numeric","getFieldValue","getFieldValues","props","MuiRadioGroup","map","value","index","Select","MuiSelect","MuiMenuItem","wrapField"],"sources":["../src/index.js"],"sourcesContent":["import { createElement } from 'react'\nimport { FormProvider, Group, context, createRawConsumer, wrapInput, wrapSubmit, useForm, useFormValues } from '@danderson00/react-forms'\nimport { extractErrorMessage } from '@danderson00/react-forms/dist/ErrorMessage'\nimport MuiButton from '@material-ui/core/Button'\nimport MuiCheckbox from '@material-ui/core/Checkbox'\nimport MuiFormControl from '@material-ui/core/FormControl'\nimport MuiFormHelperText from '@material-ui/core/FormHelperText'\nimport MuiInput from '@material-ui/core/Input'\nimport MuiInputLabel from '@material-ui/core/InputLabel'\nimport MuiMenuItem from '@material-ui/core/MenuItem'\nimport MuiRadio from '@material-ui/core/Radio'\nimport MuiRadioGroup from '@material-ui/core/RadioGroup'\nimport MuiSelect from '@material-ui/core/Select'\nimport './styles'\n\nexport const ErrorMessage = ({ error }) => createElement(MuiFormHelperText, { children: extractErrorMessage(error), error: true })\nexport const Form = FormProvider(context.Provider, { margin: 'dense' }, ErrorMessage)\nexport const Submit = wrapSubmit(MuiButton)\nexport const Button = MuiButton\nexport { useForm, useFormValues, Group, wrapInput }\n\nconst wrapped = (component, options, baseOptions) => wrapInput(\n base(component, options, baseOptions),\n { passErrorProp: true, ...options }\n)\n\nconst base = (component, options = {}, { alwaysShrinkLabel, shrinkLabel: shrinkLabelOption = true, passError } = {}) => (\n ({ className, error, hiddenLabel, variant, margin, label, helperText, shrinkLabel, valid, pattern, ...inputProps }) => (\n createElement(MuiFormControl, {\n className: `react-forms-material-field${options.type ? ` react-forms-material-${options.type}` : ''}${className ? ` ${className}` : ''}`,\n error,\n fullWidth: inputProps.fullWidth,\n hiddenLabel,\n required: inputProps.required,\n variant,\n margin,\n children: [\n ...(label ? [createElement(MuiInputLabel, {\n key: 'label',\n htmlFor: inputProps.id,\n children: label,\n ...(shrinkLabelOption === false && { shrink: false }),\n ...((alwaysShrinkLabel || shrinkLabel) && { className: 'MuiInputLabel-shrink' }),\n })] : []),\n\n createElement(component, {\n key: 'input',\n variant,\n ...(passError && { error }),\n ...inputProps,\n inputProps: { ...(pattern && { pattern }), ...inputProps.inputProps }\n }),\n\n ...(helperText ? [createElement(MuiFormHelperText, {\n key: 'helperText',\n children: helperText\n })] : [])\n ]\n })\n )\n)\n\nexport const Input = wrapInput(MuiInput)\nexport const Text = wrapped(MuiInput)\nexport const Checkbox = wrapped(MuiCheckbox, { type: 'checkbox' }, { alwaysShrinkLabel: true })\nexport const RadioButton = wrapped(MuiRadio, { type: 'radio' }, { shrinkLabel: false })\n\nexport const Radio = createRawConsumer(base(\n ({ name, values, labels, numeric, required, getFieldValue, getFieldValues, ...props }) => (\n createElement(MuiRadioGroup, { ...props, children: [\n values.map((value, index) =>\n createElement(RadioButton, {\n name,\n value,\n numeric,\n key: value,\n label: (labels && labels[index]) || value,\n margin: props.margin,\n ...(required && { required })\n })\n )\n ] })\n ),\n { type: 'radiogroup' },\n { alwaysShrinkLabel: true }\n))\n\nexport const Select = wrapped(({ values, labels, ...props }) =>\n createElement(MuiSelect, { ...props, children:\n values.map((value, index) =>\n createElement(MuiMenuItem, {\n value,\n key: value,\n children: (labels && labels[index]) || value,\n ...(props.required && { required: props.required })\n })\n )\n }),\n { type: 'select' },\n { alwaysShrinkLabel: true }\n)\n\nexport const wrapField = wrapped"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":["ErrorMessage","error","createElement","MuiFormHelperText","children","extractErrorMessage","Form","FormProvider","context","Provider","margin","Submit","wrapSubmit","MuiButton","Button","wrapped","component","options","baseOptions","wrapInput","base","passErrorProp","alwaysShrinkLabel","shrinkLabel","shrinkLabelOption","passError","className","hiddenLabel","variant","label","helperText","valid","pattern","inputProps","MuiFormControl","type","fullWidth","required","MuiInputLabel","key","htmlFor","id","shrink","Input","MuiInput","Text","Checkbox","MuiCheckbox","RadioButton","MuiRadio","Radio","createRawConsumer","name","values","labels","numeric","getFieldValue","getFieldValues","props","MuiRadioGroup","map","value","index","Select","MuiSelect","MuiMenuItem","wrapField"],"sources":["../src/index.js"],"sourcesContent":["import { createElement } from 'react'\nimport { FormProvider, Group, context, createRawConsumer, wrapInput, wrapSubmit, useForm, useFormValues } from '@danderson00/react-forms'\nimport { extractErrorMessage } from '@danderson00/react-forms/dist/ErrorMessage'\nimport MuiButton from '@material-ui/core/Button'\nimport MuiCheckbox from '@material-ui/core/Checkbox'\nimport MuiFormControl from '@material-ui/core/FormControl'\nimport MuiFormHelperText from '@material-ui/core/FormHelperText'\nimport MuiInput from '@material-ui/core/Input'\nimport MuiInputLabel from '@material-ui/core/InputLabel'\nimport MuiMenuItem from '@material-ui/core/MenuItem'\nimport MuiRadio from '@material-ui/core/Radio'\nimport MuiRadioGroup from '@material-ui/core/RadioGroup'\nimport MuiSelect from '@material-ui/core/Select'\nimport './styles'\n\nexport const ErrorMessage = ({ error }) => createElement(MuiFormHelperText, { children: extractErrorMessage(error), error: true })\nexport const Form = FormProvider(context.Provider, { margin: 'dense' }, ErrorMessage)\nexport const Submit = wrapSubmit(MuiButton)\nexport const Button = MuiButton\nexport { useForm, useFormValues, Group, wrapInput }\n\nconst wrapped = (component, options, baseOptions) => wrapInput(\n base(component, options, baseOptions),\n { passErrorProp: true, ...options }\n)\n\nconst base = (component, options = {}, { alwaysShrinkLabel, shrinkLabel: shrinkLabelOption = true, passError } = {}) => (\n ({ className, error, hiddenLabel, variant, margin, label, helperText, shrinkLabel, valid, pattern, ...inputProps }) => (\n createElement(MuiFormControl, {\n className: `react-forms-material-field${options.type ? ` react-forms-material-${options.type}` : ''}${className ? ` ${className}` : ''}`,\n error,\n fullWidth: inputProps.fullWidth,\n hiddenLabel,\n required: inputProps.required,\n variant,\n margin,\n children: [\n ...(label ? [createElement(MuiInputLabel, {\n key: 'label',\n htmlFor: inputProps.id,\n children: label,\n ...(shrinkLabelOption === false && { shrink: false }),\n ...((alwaysShrinkLabel || shrinkLabel) && { className: 'MuiInputLabel-shrink' }),\n })] : []),\n\n createElement(component, {\n key: 'input',\n variant,\n ...(passError && { error }),\n ...inputProps,\n inputProps: { ...(pattern && { pattern }), ...inputProps.inputProps }\n }),\n\n ...(helperText ? [createElement(MuiFormHelperText, {\n key: 'helperText',\n children: helperText\n })] : [])\n ]\n })\n )\n)\n\nexport const Input = wrapInput(MuiInput)\nexport const Text = wrapped(MuiInput)\nexport const Checkbox = wrapped(MuiCheckbox, { type: 'checkbox' }, { alwaysShrinkLabel: true })\nexport const RadioButton = wrapped(MuiRadio, { type: 'radio' }, { shrinkLabel: false })\n\nexport const Radio = createRawConsumer(base(\n ({ name, values, labels, numeric, required, getFieldValue, getFieldValues, ...props }) => (\n createElement(MuiRadioGroup, { ...props, children: [\n values.map((value, index) =>\n createElement(RadioButton, {\n name,\n value,\n numeric,\n key: value,\n label: (labels && labels[index]) || value,\n margin: props.margin,\n ...(required && { required })\n })\n )\n ] })\n ),\n { type: 'radiogroup' },\n { alwaysShrinkLabel: true }\n))\n\nexport const Select = wrapped(({ values, labels, ...props }) =>\n createElement(MuiSelect, { ...props, children:\n values.map((value, index) =>\n createElement(MuiMenuItem, {\n value,\n key: value,\n children: (labels && labels[index]) || value,\n ...(props.required && { required: props.required })\n })\n )\n }),\n { type: 'select' },\n { alwaysShrinkLabel: true }\n)\n\nexport const wrapField = wrapped"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAiB;EAAA;EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEV,IAAMA,YAAY,GAAG,SAAfA,YAAY;EAAA,IAAMC,KAAK,QAALA,KAAK;EAAA,oBAAO,IAAAC,oBAAa,EAACC,0BAAiB,EAAE;IAAEC,QAAQ,EAAE,IAAAC,iCAAmB,EAACJ,KAAK,CAAC;IAAEA,KAAK,EAAE;EAAK,CAAC,CAAC;AAAA;AAAA;AAC3H,IAAMK,IAAI,GAAG,IAAAC,wBAAY,EAACC,mBAAO,CAACC,QAAQ,EAAE;EAAEC,MAAM,EAAE;AAAQ,CAAC,EAAEV,YAAY,CAAC;AAAA;AAC9E,IAAMW,MAAM,GAAG,IAAAC,sBAAU,EAACC,kBAAS,CAAC;AAAA;AACpC,IAAMC,MAAM,GAAGD,kBAAS;AAAA;AAG/B,IAAME,OAAO,GAAG,SAAVA,OAAO,CAAIC,SAAS,EAAEC,OAAO,EAAEC,WAAW;EAAA,OAAK,IAAAC,qBAAS,EAC5DC,IAAI,CAACJ,SAAS,EAAEC,OAAO,EAAEC,WAAW,CAAC;IACnCG,aAAa,EAAE;EAAI,GAAKJ,OAAO,EAClC;AAAA;AAED,IAAMG,IAAI,GAAG,SAAPA,IAAI,CAAIJ,SAAS;EAAA,IAAEC,OAAO,uEAAG,CAAC,CAAC;EAAA,gFAA4E,CAAC,CAAC;IAA1EK,iBAAiB,SAAjBA,iBAAiB;IAAA,0BAAEC,WAAW;IAAEC,iBAAiB,kCAAG,IAAI;IAAEC,SAAS,SAATA,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AAKD,KAAK;QACzCnD,MAAM,EAAEgD,KAAK,CAAChD;MAAM,GAChB2B,QAAQ,IAAI;QAAEA,QAAQ,EAARA;MAAS,CAAC,EAC5B;IAAA,EACH;EACF,GAAG;AAAA,CACL,EACD;EAAEF,IAAI,EAAE;AAAa,CAAC,EACtB;EAAEb,iBAAiB,EAAE;AAAM,CAAC,CAC7B,CAAC;AAAA;AAEK,IAAMyC,MAAM,GAAGhD,OAAO,CAAC;EAAA,IAAGsC,MAAM,SAANA,MAAM;IAAEC,MAAM,SAANA,MAAM;IAAKI,KAAK;EAAA,oBACvD,IAAAxD,oBAAa,EAAC8D,kBAAS,kCAAON,KAAK;IAAEtD,QAAQ,EAC3CiD,MAAM,CAACO,GAAG,CAAC,UAACC,KAAK,EAAEC,KAAK;MAAA,oBACtB,IAAA5D,oBAAa,EAAC+D,oBAAW;QACvBJ,KAAK,EAALA,KAAK;QACLtB,GAAG,EAAEsB,KAAK;QACVzD,QAAQ,EAAGkD,MAAM,IAAIA,MAAM,CAACQ,KAAK,CAAC,IAAKD;MAAK,GACxCH,KAAK,CAACrB,QAAQ,IAAI;QAAEA,QAAQ,EAAEqB,KAAK,CAACrB;MAAS,CAAC,EAClD;IAAA;EACH,GACD;AAAA,GACF;EAAEF,IAAI,EAAE;AAAS,CAAC,EAClB;EAAEb,iBAAiB,EAAE;AAAM,CAAC,CAC7B;AAAA;AAEM,IAAM4C,SAAS,GAAGnD,OAAO;AAAA"}
|
package/dist/styles.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _injectCss = _interopRequireDefault(require("@danderson00/react-forms/dist/injectCss"));
|
|
4
|
-
|
|
5
4
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
6
|
-
|
|
7
5
|
(0, _injectCss["default"])('react-forms-material-styles', "\n .react-forms-material-radiogroup.MuiFormControl-root {\n overflow: hidden;\n }\n\n .react-forms-material-radio.MuiFormControl-root {\n flex-direction: row-reverse;\n justify-content: flex-end;\n }\n \n .react-forms-material-radio .MuiInputLabel-formControl {\n position: static;\n }\n\n .react-forms-material-radio .MuiRadio-root {\n transform: translate(0, 9px) scale(1);\n } \n \n .react-forms-material-checkbox .MuiCheckbox-root {\n transform: translate(0, 9px) scale(1);\n }\n \n /* allow forms to be embedded in dialogs - essentially replicate a few styles */\n .MuiDialog-container form {\n display: flex;\n }\n \n .MuiDialog-container form .MuiDialogContent-root {\n display: flex;\n align-items: flex-start;\n flex-direction: column;\n }\n\n .MuiDialog-container form .MuiDialogActions-root {\n align-self: flex-end;\n }\n \n .react-forms input::-webkit-outer-spin-button,\n .react-forms input::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n\n .react-forms input[type=number] {\n -moz-appearance: textfield;\n }\n");
|
|
8
6
|
//# sourceMappingURL=styles.js.map
|
package/dist/styles.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","names":["injectCss"],"sources":["../src/styles.js"],"sourcesContent":["import injectCss from '@danderson00/react-forms/dist/injectCss'\n\ninjectCss('react-forms-material-styles', `\n .react-forms-material-radiogroup.MuiFormControl-root {\n overflow: hidden;\n }\n\n .react-forms-material-radio.MuiFormControl-root {\n flex-direction: row-reverse;\n justify-content: flex-end;\n }\n \n .react-forms-material-radio .MuiInputLabel-formControl {\n position: static;\n }\n\n .react-forms-material-radio .MuiRadio-root {\n transform: translate(0, 9px) scale(1);\n } \n \n .react-forms-material-checkbox .MuiCheckbox-root {\n transform: translate(0, 9px) scale(1);\n }\n \n /* allow forms to be embedded in dialogs - essentially replicate a few styles */\n .MuiDialog-container form {\n display: flex;\n }\n \n .MuiDialog-container form .MuiDialogContent-root {\n display: flex;\n align-items: flex-start;\n flex-direction: column;\n }\n\n .MuiDialog-container form .MuiDialogActions-root {\n align-self: flex-end;\n }\n \n .react-forms input::-webkit-outer-spin-button,\n .react-forms input::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n\n .react-forms input[type=number] {\n -moz-appearance: textfield;\n }\n`)\n\n\n"],"mappings":";;AAAA
|
|
1
|
+
{"version":3,"file":"styles.js","names":["injectCss"],"sources":["../src/styles.js"],"sourcesContent":["import injectCss from '@danderson00/react-forms/dist/injectCss'\n\ninjectCss('react-forms-material-styles', `\n .react-forms-material-radiogroup.MuiFormControl-root {\n overflow: hidden;\n }\n\n .react-forms-material-radio.MuiFormControl-root {\n flex-direction: row-reverse;\n justify-content: flex-end;\n }\n \n .react-forms-material-radio .MuiInputLabel-formControl {\n position: static;\n }\n\n .react-forms-material-radio .MuiRadio-root {\n transform: translate(0, 9px) scale(1);\n } \n \n .react-forms-material-checkbox .MuiCheckbox-root {\n transform: translate(0, 9px) scale(1);\n }\n \n /* allow forms to be embedded in dialogs - essentially replicate a few styles */\n .MuiDialog-container form {\n display: flex;\n }\n \n .MuiDialog-container form .MuiDialogContent-root {\n display: flex;\n align-items: flex-start;\n flex-direction: column;\n }\n\n .MuiDialog-container form .MuiDialogActions-root {\n align-self: flex-end;\n }\n \n .react-forms input::-webkit-outer-spin-button,\n .react-forms input::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n\n .react-forms input[type=number] {\n -moz-appearance: textfield;\n }\n`)\n\n\n"],"mappings":";;AAAA;AAA+D;AAE/D,IAAAA,qBAAS,EAAC,6BAA6B,umCA8CrC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@danderson00/react-forms-material",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.42",
|
|
4
4
|
"description": "Beautiful, ultra simple, stateless, validated forms for use in React function components",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "src/index.js",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"prepare": "babel src --source-maps --out-dir dist"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@danderson00/react-forms": "0.0.
|
|
13
|
+
"@danderson00/react-forms": "0.0.42",
|
|
14
14
|
"@material-ui/core": "^4.11.3"
|
|
15
15
|
},
|
|
16
16
|
"peerDependencies": {
|