@maif/react-forms 1.0.25 → 1.0.29

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/lib/form.js CHANGED
@@ -171,16 +171,16 @@ var defaultVal = function defaultVal(t, array, defaultValue) {
171
171
 
172
172
  var getDefaultValues = function getDefaultValues(flow, schema) {
173
173
  return flow.reduce(function (acc, key) {
174
+ if (_typeof(key) === 'object') {
175
+ return _objectSpread(_objectSpread({}, acc), getDefaultValues(key.flow, schema));
176
+ }
177
+
174
178
  var entry = schema[key];
175
179
 
176
180
  if (!entry) {
177
181
  return acc;
178
182
  }
179
183
 
180
- if (_typeof(key) === 'object') {
181
- return _objectSpread(_objectSpread({}, acc), getDefaultValues(key.flow, schema));
182
- }
183
-
184
184
  return _objectSpread(_objectSpread({}, acc), {}, _defineProperty({}, key, defaultVal(entry.type, entry.array || entry.isMulti, entry.defaultValue)));
185
185
  }, {});
186
186
  };
@@ -238,7 +238,7 @@ var Form = /*#__PURE__*/_react["default"].forwardRef(function (_ref2, ref) {
238
238
  var isArray = (0, _Option.option)(subSchema).orElse(schema).map(function (s) {
239
239
  return s[key];
240
240
  }).map(function (entry) {
241
- return !!entry.array;
241
+ return !!entry.array && !entry.render;
242
242
  }).getOrElse(false);
243
243
 
244
244
  if (isArray) {
@@ -270,7 +270,7 @@ var Form = /*#__PURE__*/_react["default"].forwardRef(function (_ref2, ref) {
270
270
  var isArray = (0, _Option.option)(subSchema).orElse(schema).map(function (s) {
271
271
  return s[key];
272
272
  }).map(function (entry) {
273
- return !!entry.array;
273
+ return !!entry.array && !entry.render;
274
274
  }).getOrElse(false);
275
275
 
276
276
  if (isArray) {
@@ -347,6 +347,18 @@ var Form = /*#__PURE__*/_react["default"].forwardRef(function (_ref2, ref) {
347
347
  }
348
348
  };
349
349
  });
350
+
351
+ var functionalProperty = function functionalProperty(entry, prop) {
352
+ if (typeof prop === 'function') {
353
+ return prop({
354
+ rawValues: getValues(),
355
+ value: getValues(entry)
356
+ });
357
+ } else {
358
+ return prop;
359
+ }
360
+ };
361
+
350
362
  return /*#__PURE__*/_react["default"].createElement(_reactHookForm.FormProvider, methods, /*#__PURE__*/_react["default"].createElement("form", {
351
363
  className: className || "".concat(classes.pr_15, " ").concat(classes.full_width),
352
364
  onSubmit: _handleSubmit(function (data) {
@@ -391,7 +403,7 @@ var Form = /*#__PURE__*/_react["default"].forwardRef(function (_ref2, ref) {
391
403
  key: "".concat(entry, "-").concat(idx),
392
404
  entry: entry,
393
405
  error: error,
394
- label: (step === null || step === void 0 ? void 0 : step.label) === null ? null : (step === null || step === void 0 ? void 0 : step.label) || entry,
406
+ label: functionalProperty(entry, (step === null || step === void 0 ? void 0 : step.label) === null ? null : (step === null || step === void 0 ? void 0 : step.label) || entry),
395
407
  help: step === null || step === void 0 ? void 0 : step.help,
396
408
  render: inputWrapper
397
409
  }, /*#__PURE__*/_react["default"].createElement(Step, {
@@ -408,7 +420,8 @@ var Form = /*#__PURE__*/_react["default"].forwardRef(function (_ref2, ref) {
408
420
  setValue: setValue,
409
421
  watch: watch,
410
422
  inputWrapper: inputWrapper,
411
- httpClient: maybeCustomHttpClient
423
+ httpClient: maybeCustomHttpClient,
424
+ functionalProperty: functionalProperty
412
425
  }));
413
426
  }), /*#__PURE__*/_react["default"].createElement(Footer, {
414
427
  render: footer,
@@ -473,7 +486,8 @@ var Step = function Step(_ref4) {
473
486
  inputWrapper = _ref4.inputWrapper,
474
487
  httpClient = _ref4.httpClient,
475
488
  defaultValue = _ref4.defaultValue,
476
- index = _ref4.index;
489
+ index = _ref4.index,
490
+ functionalProperty = _ref4.functionalProperty;
477
491
  var classes = (0, _styleContext.useCustomStyle)();
478
492
 
479
493
  if (entry && _typeof(entry) === 'object') {
@@ -519,7 +533,7 @@ var Step = function Step(_ref4) {
519
533
  key: "collapse-".concat(en, "-").concat(entryIdx),
520
534
  entry: en,
521
535
  error: err,
522
- label: (stp === null || stp === void 0 ? void 0 : stp.label) === null ? null : (stp === null || stp === void 0 ? void 0 : stp.label) || en,
536
+ label: functionalProperty(en, (stp === null || stp === void 0 ? void 0 : stp.label) === null ? null : (stp === null || stp === void 0 ? void 0 : stp.label) || en),
523
537
  help: stp === null || stp === void 0 ? void 0 : stp.help,
524
538
  render: inputWrapper
525
539
  }, /*#__PURE__*/_react["default"].createElement(Step, {
@@ -536,24 +550,27 @@ var Step = function Step(_ref4) {
536
550
  watch: watch,
537
551
  inputWrapper: inputWrapper,
538
552
  httpClient: httpClient,
539
- defaultValue: stp === null || stp === void 0 ? void 0 : stp.defaultValue
553
+ defaultValue: stp === null || stp === void 0 ? void 0 : stp.defaultValue,
554
+ functionalProperty: functionalProperty
540
555
  }));
541
556
  }));
542
557
  }
543
558
 
544
- var disabled = function disabled() {
545
- if (typeof step.disabled === 'function') {
546
- return step.disabled({
547
- rawValues: getValues(),
548
- value: getValues(entry)
549
- });
550
- } else {
551
- return step.disabled;
552
- }
553
- };
554
-
555
559
  if (step.array) {
556
- return /*#__PURE__*/_react["default"].createElement(ArrayStep, {
560
+ return /*#__PURE__*/_react["default"].createElement(CustomizableInput, {
561
+ render: step.render,
562
+ field: {
563
+ setValue: function setValue(key, value) {
564
+ return _setValue(key, value);
565
+ },
566
+ rawValues: getValues(),
567
+ value: getValues(entry),
568
+ onChange: function onChange(v) {
569
+ return _setValue(entry, v);
570
+ }
571
+ },
572
+ error: error
573
+ }, /*#__PURE__*/_react["default"].createElement(ArrayStep, {
557
574
  entry: entry,
558
575
  step: step,
559
576
  trigger: trigger,
@@ -564,13 +581,14 @@ var Step = function Step(_ref4) {
564
581
  values: getValues(entry),
565
582
  defaultValue: step.defaultValue || defaultVal(step.type),
566
583
  getValues: getValues,
567
- disabled: disabled(),
584
+ disabled: functionalProperty(entry, step.disabled),
568
585
  component: function component(props, idx) {
569
586
  var _error$idx;
570
587
 
571
588
  return /*#__PURE__*/_react["default"].createElement(Step, {
572
589
  entry: "".concat(entry, "[").concat(idx, "].value"),
573
590
  step: _objectSpread(_objectSpread({}, schema[realEntry || entry]), {}, {
591
+ render: step.itemRender,
574
592
  onChange: undefined,
575
593
  array: false
576
594
  }),
@@ -586,10 +604,11 @@ var Step = function Step(_ref4) {
586
604
  httpClient: httpClient,
587
605
  defaultValue: props.defaultValue,
588
606
  value: props.value,
589
- index: idx
607
+ index: idx,
608
+ functionalProperty: functionalProperty
590
609
  });
591
610
  }
592
- });
611
+ }));
593
612
  }
594
613
 
595
614
  var registeredInput = register(entry);
@@ -628,7 +647,7 @@ var Step = function Step(_ref4) {
628
647
  type: "text",
629
648
  id: entry,
630
649
  className: (0, _classnames["default"])(classes.input, _defineProperty({}, classes.input__invalid, error)),
631
- readOnly: disabled() ? 'readOnly' : null
650
+ readOnly: functionalProperty(entry, step.disabled) ? 'readOnly' : null
632
651
  }, step.props, {
633
652
  defaultValue: defaultValue,
634
653
  placeholder: step.placeholder
@@ -651,7 +670,7 @@ var Step = function Step(_ref4) {
651
670
  error: error
652
671
  }, /*#__PURE__*/_react["default"].createElement(_index.CodeInput, _extends({
653
672
  className: (0, _classnames["default"])(_defineProperty({}, classes.input__invalid, error)),
654
- readOnly: disabled() ? true : false,
673
+ readOnly: functionalProperty(entry, step.disabled) ? true : false,
655
674
  onChange: function onChange(e) {
656
675
  field.onChange(e);
657
676
  (0, _Option.option)(step.onChange).map(function (onChange) {
@@ -685,7 +704,7 @@ var Step = function Step(_ref4) {
685
704
  error: error
686
705
  }, /*#__PURE__*/_react["default"].createElement(_index.MarkdownInput, _extends({}, step.props, {
687
706
  className: (0, _classnames["default"])(_defineProperty({}, classes.input__invalid, error)),
688
- readOnly: disabled() ? 'readOnly' : null,
707
+ readOnly: functionalProperty(entry, step.disabled) ? 'readOnly' : null,
689
708
  onChange: function onChange(e) {
690
709
  field.onChange(e);
691
710
  (0, _Option.option)(step.onChange).map(function (onChange) {
@@ -720,7 +739,7 @@ var Step = function Step(_ref4) {
720
739
  error: error
721
740
  }, /*#__PURE__*/_react["default"].createElement(_index.SelectInput, _extends({}, step.props, step, {
722
741
  className: (0, _classnames["default"])(_defineProperty({}, classes.input__invalid, error)),
723
- disabled: disabled(),
742
+ disabled: functionalProperty(entry, step.disabled),
724
743
  value: field.value,
725
744
  possibleValues: step.options,
726
745
  defaultValue: defaultValue,
@@ -759,7 +778,7 @@ var Step = function Step(_ref4) {
759
778
  type: step.format || 'text',
760
779
  id: entry,
761
780
  className: (0, _classnames["default"])(classes.input, _defineProperty({}, classes.input__invalid, error)),
762
- readOnly: disabled() ? 'readOnly' : null,
781
+ readOnly: functionalProperty(entry, step.disabled) ? 'readOnly' : null,
763
782
  defaultValue: defaultValue,
764
783
  placeholder: step.placeholder
765
784
  }, inputProps)));
@@ -785,7 +804,7 @@ var Step = function Step(_ref4) {
785
804
  error: error
786
805
  }, /*#__PURE__*/_react["default"].createElement(_index.SelectInput, _extends({}, step.props, step, {
787
806
  className: (0, _classnames["default"])(classes.content, _defineProperty({}, classes.input__invalid, error)),
788
- readOnly: disabled() ? 'readOnly' : null,
807
+ readOnly: functionalProperty(entry, step.disabled) ? 'readOnly' : null,
789
808
  onChange: function onChange(e) {
790
809
  field.onChange(e);
791
810
  (0, _Option.option)(step.onChange).map(function (onChange) {
@@ -822,7 +841,7 @@ var Step = function Step(_ref4) {
822
841
  type: step.format || 'number',
823
842
  id: entry,
824
843
  className: (0, _classnames["default"])(classes.input, _defineProperty({}, classes.input__invalid, error)),
825
- readOnly: disabled() ? 'readOnly' : null,
844
+ readOnly: functionalProperty(entry, step.disabled) ? 'readOnly' : null,
826
845
  name: entry,
827
846
  placeholder: step.placeholder,
828
847
  defaultValue: defaultValue
@@ -846,7 +865,7 @@ var Step = function Step(_ref4) {
846
865
  error: error
847
866
  }, /*#__PURE__*/_react["default"].createElement(_index.BooleanInput, _extends({}, step.props, {
848
867
  className: (0, _classnames["default"])(_defineProperty({}, classes.input__invalid, error)),
849
- readOnly: disabled() ? 'readOnly' : null,
868
+ readOnly: functionalProperty(entry, step.disabled) ? 'readOnly' : null,
850
869
  onChange: function onChange(e) {
851
870
  field.onChange(e);
852
871
  (0, _Option.option)(step.onChange).map(function (onChange) {
@@ -883,7 +902,7 @@ var Step = function Step(_ref4) {
883
902
  error: error
884
903
  }, /*#__PURE__*/_react["default"].createElement(_index.SelectInput, _extends({}, step.props, step, {
885
904
  className: (0, _classnames["default"])(_defineProperty({}, classes.input__invalid, error)),
886
- readOnly: disabled() ? 'readOnly' : null,
905
+ readOnly: functionalProperty(entry, step.disabled) ? 'readOnly' : null,
887
906
  onChange: function onChange(e) {
888
907
  field.onChange(e);
889
908
  (0, _Option.option)(step.onChange).map(function (onChange) {
@@ -930,7 +949,8 @@ var Step = function Step(_ref4) {
930
949
  maybeCustomHttpClient: httpClient,
931
950
  value: getValues(entry) || defaultValue,
932
951
  error: error,
933
- index: index
952
+ index: index,
953
+ functionalProperty: functionalProperty
934
954
  }));
935
955
 
936
956
  default:
@@ -951,7 +971,7 @@ var Step = function Step(_ref4) {
951
971
  error: error
952
972
  }, /*#__PURE__*/_react["default"].createElement(_index.ObjectInput, _extends({}, step.props, step, {
953
973
  className: (0, _classnames["default"])(_defineProperty({}, classes.input__invalid, error)),
954
- readOnly: disabled() ? 'readOnly' : null,
974
+ readOnly: functionalProperty(entry, step.disabled) ? 'readOnly' : null,
955
975
  onChange: function onChange(e) {
956
976
  field.onChange(e);
957
977
  (0, _Option.option)(step.onChange).map(function (onChange) {
@@ -988,7 +1008,7 @@ var Step = function Step(_ref4) {
988
1008
  }, /*#__PURE__*/_react["default"].createElement(_reactRainbowComponents.DatePicker, _extends({}, step.props, {
989
1009
  id: "datePicker-1",
990
1010
  className: (0, _classnames["default"])(_defineProperty({}, classes.input__invalid, error)),
991
- readOnly: disabled() ? 'readOnly' : null,
1011
+ readOnly: functionalProperty(entry, step.disabled) ? 'readOnly' : null,
992
1012
  value: field.value,
993
1013
  onChange: function onChange(e) {
994
1014
  field.onChange(e);
@@ -1050,7 +1070,7 @@ var Step = function Step(_ref4) {
1050
1070
  }), /*#__PURE__*/_react["default"].createElement("button", {
1051
1071
  type: "button",
1052
1072
  className: "".concat(classes.btn, " ").concat(classes.flex, " ").concat(classes.ai_center),
1053
- disabled: uploading || disabled(),
1073
+ disabled: uploading || functionalProperty(entry, step.disabled),
1054
1074
  onClick: trigger
1055
1075
  }, uploading && /*#__PURE__*/_react["default"].createElement(_reactFeather.Loader, null), !uploading && /*#__PURE__*/_react["default"].createElement(_reactFeather.Upload, null), /*#__PURE__*/_react["default"].createElement("span", {
1056
1076
  className: "".concat(classes.ml_5)
@@ -1102,7 +1122,7 @@ var Step = function Step(_ref4) {
1102
1122
  type: "file",
1103
1123
  id: entry,
1104
1124
  className: (0, _classnames["default"])(classes.input, _defineProperty({}, classes.input__invalid, error)),
1105
- readOnly: disabled() ? 'readOnly' : null,
1125
+ readOnly: functionalProperty(entry, step.disabled) ? 'readOnly' : null,
1106
1126
  name: entry,
1107
1127
  placeholder: step.placeholder
1108
1128
  }, inputProps)));
@@ -1182,6 +1202,8 @@ var ArrayStep = function ArrayStep(_ref15) {
1182
1202
  };
1183
1203
 
1184
1204
  var NestedForm = function NestedForm(_ref16) {
1205
+ var _classNames15;
1206
+
1185
1207
  var schema = _ref16.schema,
1186
1208
  flow = _ref16.flow,
1187
1209
  parent = _ref16.parent,
@@ -1190,7 +1212,8 @@ var NestedForm = function NestedForm(_ref16) {
1190
1212
  index = _ref16.index,
1191
1213
  error = _ref16.error,
1192
1214
  value = _ref16.value,
1193
- step = _ref16.step;
1215
+ step = _ref16.step,
1216
+ functionalProperty = _ref16.functionalProperty;
1194
1217
 
1195
1218
  var _useFormContext = (0, _reactHookForm.useFormContext)(),
1196
1219
  register = _useFormContext.register,
@@ -1266,9 +1289,9 @@ var NestedForm = function NestedForm(_ref16) {
1266
1289
  }, []);
1267
1290
  var bordered = computedSandF.filter(function (x) {
1268
1291
  return x.visibleStep;
1269
- }).length > 1 && step.label === null;
1292
+ }).length > 1 && step.label !== null;
1270
1293
  return /*#__PURE__*/_react["default"].createElement("div", {
1271
- className: (0, _classnames["default"])(_defineProperty({}, classes.nestedform__border, bordered))
1294
+ className: (0, _classnames["default"])((_classNames15 = {}, _defineProperty(_classNames15, classes.nestedform__border, bordered), _defineProperty(_classNames15, classes.border__error, !!error), _classNames15))
1272
1295
  }, !!step.collapsable && schemaAndFlow.flow.length > 1 && collapsed && /*#__PURE__*/_react["default"].createElement(_reactFeather.ArrowDown, {
1273
1296
  size: 30,
1274
1297
  className: classes.cursor_pointer,
@@ -1313,7 +1336,7 @@ var NestedForm = function NestedForm(_ref16) {
1313
1336
  className: (0, _classnames["default"])(_defineProperty({}, classes.display__none, isCollapsed || !visibleStep)),
1314
1337
  entry: "".concat(parent, ".").concat(entry),
1315
1338
  error: realError,
1316
- label: (step === null || step === void 0 ? void 0 : step.label) === null ? null : (step === null || step === void 0 ? void 0 : step.label) || entry,
1339
+ label: functionalProperty(entry, (step === null || step === void 0 ? void 0 : step.label) === null ? null : (step === null || step === void 0 ? void 0 : step.label) || entry),
1317
1340
  help: step.help,
1318
1341
  render: inputWrapper
1319
1342
  }, /*#__PURE__*/_react["default"].createElement(Step, {
@@ -1331,7 +1354,8 @@ var NestedForm = function NestedForm(_ref16) {
1331
1354
  watch: watch,
1332
1355
  inputWrapper: inputWrapper,
1333
1356
  httpClient: maybeCustomHttpClient,
1334
- defaultValue: value && value[entry]
1357
+ defaultValue: value && value[entry],
1358
+ functionalProperty: functionalProperty
1335
1359
  }));
1336
1360
  }));
1337
1361
  };
@@ -42,8 +42,7 @@ var resolvers = (_resolvers = {}, _defineProperty(_resolvers, _type.type.string,
42
42
  }), _resolvers);
43
43
 
44
44
  var buildSubResolver = function buildSubResolver(props, key, dependencies, rawData) {
45
- var type = props.type,
46
- _props$constraints = props.constraints,
45
+ var _props$constraints = props.constraints,
47
46
  constraints = _props$constraints === void 0 ? [] : _props$constraints;
48
47
 
49
48
  if (props.array || props.isMulti) {
@@ -64,13 +63,13 @@ var buildSubResolver = function buildSubResolver(props, key, dependencies, rawDa
64
63
  return constraints.reduce(function (resolver, constraint) {
65
64
  return jsonOrFunctionConstraint(constraint, resolver, key, dependencies);
66
65
  }, arrayResolver);
67
- } else if (props.type === type.object && props.schema) {
66
+ } else if (props.type === _type.type.object && props.schema) {
68
67
  var _subResolver = getShapeAndDependencies(props.flow || Object.keys(props.schema), props.schema, dependencies, rawData);
69
68
 
70
69
  return constraints.reduce(function (resolver, constraint) {
71
70
  return jsonOrFunctionConstraint(constraint, resolver, key, dependencies);
72
71
  }, yup.object().shape(_subResolver.shape, dependencies));
73
- } else if (props.type === type.object && props.conditionalSchema) {
72
+ } else if (props.type === _type.type.object && props.conditionalSchema) {
74
73
  var _option$map$getOrElse = (0, _Option.option)(props.conditionalSchema).map(function (condiSchema) {
75
74
  var ref = (0, _Option.option)(condiSchema.ref).map(function (ref) {
76
75
  return rawData[ref];
@@ -100,7 +99,7 @@ var buildSubResolver = function buildSubResolver(props, key, dependencies, rawDa
100
99
  } else {
101
100
  return constraints.reduce(function (resolver, constraint) {
102
101
  return jsonOrFunctionConstraint(constraint, resolver, key, dependencies);
103
- }, resolvers[type]());
102
+ }, resolvers[props.type]());
104
103
  }
105
104
  };
106
105
 
package/lib/style.d.ts CHANGED
@@ -12,22 +12,23 @@ export namespace style {
12
12
  opacity: number;
13
13
  };
14
14
  };
15
- namespace btn {
16
- const borderRadius: number;
17
- const padding: number;
18
- const fontSize: string;
19
- const cursor: string;
20
- const borderWidth: string;
21
- const backgroundColor: string;
22
- }
15
+ const btn: {
16
+ borderRadius: number;
17
+ padding: number;
18
+ fontSize: string;
19
+ cursor: string;
20
+ borderWidth: string;
21
+ backgroundColor: string;
22
+ '&:disabled': {
23
+ opacity: number;
24
+ cursor: string;
25
+ };
26
+ };
23
27
  namespace btn_sm {
24
- const fontSize_1: string;
25
- export { fontSize_1 as fontSize };
26
- const padding_1: string;
27
- export { padding_1 as padding };
28
- export const lineHeight: string;
29
- const borderRadius_1: string;
30
- export { borderRadius_1 as borderRadius };
28
+ const fontSize: string;
29
+ const padding: string;
30
+ const lineHeight: string;
31
+ const borderRadius: string;
31
32
  }
32
33
  const btn_group: {
33
34
  "& > button:not(:last-child)": {
@@ -127,8 +128,8 @@ export namespace style {
127
128
  const marginBottom: number;
128
129
  }
129
130
  namespace p_15 {
130
- const padding_2: number;
131
- export { padding_2 as padding };
131
+ const padding_1: number;
132
+ export { padding_1 as padding };
132
133
  }
133
134
  namespace pr_15 {
134
135
  const paddingRight: number;
@@ -160,16 +161,15 @@ export namespace style {
160
161
  const alignItems: string;
161
162
  }
162
163
  namespace cursor_pointer {
163
- const cursor_1: string;
164
- export { cursor_1 as cursor };
164
+ const cursor: string;
165
165
  }
166
166
  namespace collapse {
167
167
  const display_2: string;
168
168
  export { display_2 as display };
169
169
  const justifyContent_2: string;
170
170
  export { justifyContent_2 as justifyContent };
171
- const cursor_2: string;
172
- export { cursor_2 as cursor };
171
+ const cursor_1: string;
172
+ export { cursor_1 as cursor };
173
173
  }
174
174
  namespace collapse_label {
175
175
  export const fontWeight: string;
@@ -202,8 +202,8 @@ export namespace style {
202
202
  export { width_1 as width };
203
203
  const marginTop_4: string;
204
204
  export { marginTop_4 as marginTop };
205
- const fontSize_2: string;
206
- export { fontSize_2 as fontSize };
205
+ const fontSize_1: string;
206
+ export { fontSize_1 as fontSize };
207
207
  const color_4: string;
208
208
  export { color_4 as color };
209
209
  }
@@ -223,4 +223,8 @@ export namespace style {
223
223
  export { marginBottom_1 as marginBottom };
224
224
  export const position: string;
225
225
  }
226
+ namespace border__error {
227
+ const borderColor_1: string;
228
+ export { borderColor_1 as borderColor };
229
+ }
226
230
  }
package/lib/style.js CHANGED
@@ -46,7 +46,11 @@ var style = (_style = {
46
46
  fontSize: "1rem",
47
47
  cursor: "pointer",
48
48
  borderWidth: '1px',
49
- backgroundColor: '#fff'
49
+ backgroundColor: '#fff',
50
+ '&:disabled': {
51
+ opacity: .6,
52
+ cursor: 'not-allowed'
53
+ }
50
54
  },
51
55
  btn_sm: {
52
56
  fontSize: "0.875rem",
@@ -168,5 +172,7 @@ var style = (_style = {
168
172
  paddingLeft: '1rem',
169
173
  marginBottom: '.5rem',
170
174
  position: 'relative'
175
+ }), _defineProperty(_style, "border__error", {
176
+ borderColor: "#dc3545"
171
177
  }), _style);
172
178
  exports.style = style;
@@ -1 +1 @@
1
- export function useCustomStyle(overrideStyle?: {}): import("jss").Classes<"code" | "flex" | "input" | "btn" | "btn_sm" | "btn_group" | "btn_red" | "btn_green" | "btn_blue" | "btn_grey" | "txt_red" | "ml_5" | "ml_10" | "mr_5" | "mr_10" | "mt_5" | "mt_10" | "mt_20" | "mb_5" | "p_15" | "pr_15" | "full_width" | "d_none" | "flexColumn" | "justifyContentBetween" | "jc_end" | "ac_center" | "ai_center" | "cursor_pointer" | "collapse" | "collapse_label" | "collapse_error" | "datepicker" | "input__boolean__on" | "input__boolean__off" | "input__invalid" | "invalid_feedback" | "display__none" | "collapse__inline" | "nestedform__border">;
1
+ export function useCustomStyle(overrideStyle?: {}): import("jss").Classes<"code" | "flex" | "input" | "btn" | "btn_sm" | "btn_group" | "btn_red" | "btn_green" | "btn_blue" | "btn_grey" | "txt_red" | "ml_5" | "ml_10" | "mr_5" | "mr_10" | "mt_5" | "mt_10" | "mt_20" | "mb_5" | "p_15" | "pr_15" | "full_width" | "d_none" | "flexColumn" | "justifyContentBetween" | "jc_end" | "ac_center" | "ai_center" | "cursor_pointer" | "collapse" | "collapse_label" | "collapse_error" | "datepicker" | "input__boolean__on" | "input__boolean__off" | "input__invalid" | "invalid_feedback" | "display__none" | "collapse__inline" | "nestedform__border" | "border__error">;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@maif/react-forms",
3
3
  "description": "Build react safe forms as fast as possible",
4
- "version": "1.0.25",
4
+ "version": "1.0.29",
5
5
  "main": "lib/index.js",
6
6
  "author": "MAIF team",
7
7
  "keywords": [