@opengeoweb/form-fields 2.14.0 → 4.0.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/index.esm.js CHANGED
@@ -316,7 +316,8 @@ var ReactHookFormSelect = function ReactHookFormSelect(_a) {
316
316
  _onChange = _a$onChange === void 0 ? function () {} : _a$onChange,
317
317
  disabled = _a.disabled,
318
318
  className = _a.className,
319
- otherProps = __rest(_a, ["name", "label", "defaultValue", "children", "rules", "onChange", "disabled", "className"]);
319
+ sx = _a.sx,
320
+ otherProps = __rest(_a, ["name", "label", "defaultValue", "children", "rules", "onChange", "disabled", "className", "sx"]);
320
321
 
321
322
  var labelId = "".concat(name, "-label");
322
323
  var inputRef = React.useRef(null);
@@ -328,6 +329,7 @@ var ReactHookFormSelect = function ReactHookFormSelect(_a) {
328
329
  var errors = getErrors(name, formErrors);
329
330
  return /*#__PURE__*/React.createElement(ReactHookFormFormControl, {
330
331
  className: className,
332
+ sx: sx,
331
333
  disabled: disabled,
332
334
  errors: errors
333
335
  }, /*#__PURE__*/React.createElement(InputLabel, {
@@ -442,11 +444,12 @@ var ReactHookFormTextField = function ReactHookFormTextField(_a) {
442
444
  _a$helperText = _a.helperText,
443
445
  helperText = _a$helperText === void 0 ? '' : _a$helperText,
444
446
  className = _a.className,
447
+ sx = _a.sx,
445
448
  _a$onChange = _a.onChange,
446
449
  _onChange = _a$onChange === void 0 ? function () {
447
450
  return null;
448
451
  } : _a$onChange,
449
- otherProps = __rest(_a, ["name", "label", "defaultValue", "rules", "disabled", "upperCase", "helperText", "className", "onChange"]);
452
+ otherProps = __rest(_a, ["name", "label", "defaultValue", "rules", "disabled", "upperCase", "helperText", "className", "sx", "onChange"]);
450
453
 
451
454
  var inputRef = React.useRef(null);
452
455
 
@@ -457,6 +460,7 @@ var ReactHookFormTextField = function ReactHookFormTextField(_a) {
457
460
  var errors = getErrors(name, formErrors);
458
461
  return /*#__PURE__*/React.createElement(ReactHookFormFormControl, {
459
462
  className: className,
463
+ sx: sx,
460
464
  disabled: disabled,
461
465
  errors: errors
462
466
  }, /*#__PURE__*/React.createElement(Controller, {
@@ -575,11 +579,12 @@ var ReactHookFormNumberField = function ReactHookFormNumberField(_a) {
575
579
  _a$helperText = _a.helperText,
576
580
  helperText = _a$helperText === void 0 ? '' : _a$helperText,
577
581
  className = _a.className,
582
+ sx = _a.sx,
578
583
  _a$onChange = _a.onChange,
579
584
  _onChange = _a$onChange === void 0 ? function () {
580
585
  return null;
581
586
  } : _a$onChange,
582
- otherProps = __rest(_a, ["name", "label", "defaultValue", "rules", "disabled", "inputMode", "helperText", "className", "onChange"]);
587
+ otherProps = __rest(_a, ["name", "label", "defaultValue", "rules", "disabled", "inputMode", "helperText", "className", "sx", "onChange"]);
583
588
 
584
589
  var inputRef = React.useRef(null);
585
590
 
@@ -605,6 +610,7 @@ var ReactHookFormNumberField = function ReactHookFormNumberField(_a) {
605
610
 
606
611
  return /*#__PURE__*/React.createElement(ReactHookFormFormControl, {
607
612
  className: className,
613
+ sx: sx,
608
614
  disabled: disabled,
609
615
  errors: errors
610
616
  }, /*#__PURE__*/React.createElement(Controller, {
@@ -670,7 +676,8 @@ var ReactHookKeyboardDateTimePicker = function ReactHookKeyboardDateTimePicker(_
670
676
  return null;
671
677
  } : _a$onChange,
672
678
  className = _a.className,
673
- otherProps = __rest(_a, ["name", "rules", "disabled", "label", "format", "openTo", "defaultNullValue", "helperText", "onChange", "className"]);
679
+ sx = _a.sx,
680
+ otherProps = __rest(_a, ["name", "rules", "disabled", "label", "format", "openTo", "defaultNullValue", "helperText", "onChange", "className", "sx"]);
674
681
 
675
682
  var inputRef = React.useRef(null);
676
683
 
@@ -683,7 +690,8 @@ var ReactHookKeyboardDateTimePicker = function ReactHookKeyboardDateTimePicker(_
683
690
  return /*#__PURE__*/React.createElement(ReactHookFormFormControl, {
684
691
  disabled: disabled,
685
692
  errors: errors,
686
- className: className
693
+ className: className,
694
+ sx: sx
687
695
  }, /*#__PURE__*/React.createElement(Controller, {
688
696
  render: function render(_props) {
689
697
  return /*#__PURE__*/React.createElement(DateTimePicker, Object.assign({
package/index.umd.js CHANGED
@@ -383,7 +383,8 @@
383
383
  _onChange = _c === void 0 ? function () {} : _c,
384
384
  disabled = _a.disabled,
385
385
  className = _a.className,
386
- otherProps = __rest(_a, ["name", "label", "defaultValue", "children", "rules", "onChange", "disabled", "className"]);
386
+ sx = _a.sx,
387
+ otherProps = __rest(_a, ["name", "label", "defaultValue", "children", "rules", "onChange", "disabled", "className", "sx"]);
387
388
 
388
389
  var labelId = name + "-label";
389
390
  var inputRef = React__namespace.useRef(null);
@@ -395,6 +396,7 @@
395
396
  var errors = getErrors(name, formErrors);
396
397
  return /*#__PURE__*/React__namespace.createElement(ReactHookFormFormControl, {
397
398
  className: className,
399
+ sx: sx,
398
400
  disabled: disabled,
399
401
  errors: errors
400
402
  }, /*#__PURE__*/React__namespace.createElement(material.InputLabel, {
@@ -509,11 +511,12 @@
509
511
  _e = _a.helperText,
510
512
  helperText = _e === void 0 ? '' : _e,
511
513
  className = _a.className,
514
+ sx = _a.sx,
512
515
  _f = _a.onChange,
513
516
  _onChange = _f === void 0 ? function () {
514
517
  return null;
515
518
  } : _f,
516
- otherProps = __rest(_a, ["name", "label", "defaultValue", "rules", "disabled", "upperCase", "helperText", "className", "onChange"]);
519
+ otherProps = __rest(_a, ["name", "label", "defaultValue", "rules", "disabled", "upperCase", "helperText", "className", "sx", "onChange"]);
517
520
 
518
521
  var inputRef = React__namespace.useRef(null);
519
522
 
@@ -524,6 +527,7 @@
524
527
  var errors = getErrors(name, formErrors);
525
528
  return /*#__PURE__*/React__namespace.createElement(ReactHookFormFormControl, {
526
529
  className: className,
530
+ sx: sx,
527
531
  disabled: disabled,
528
532
  errors: errors
529
533
  }, /*#__PURE__*/React__namespace.createElement(reactHookForm.Controller, {
@@ -613,11 +617,12 @@
613
617
  _e = _a.helperText,
614
618
  helperText = _e === void 0 ? '' : _e,
615
619
  className = _a.className,
620
+ sx = _a.sx,
616
621
  _f = _a.onChange,
617
622
  _onChange = _f === void 0 ? function () {
618
623
  return null;
619
624
  } : _f,
620
- otherProps = __rest(_a, ["name", "label", "defaultValue", "rules", "disabled", "inputMode", "helperText", "className", "onChange"]);
625
+ otherProps = __rest(_a, ["name", "label", "defaultValue", "rules", "disabled", "inputMode", "helperText", "className", "sx", "onChange"]);
621
626
 
622
627
  var inputRef = React__namespace.useRef(null);
623
628
 
@@ -645,6 +650,7 @@
645
650
 
646
651
  return /*#__PURE__*/React__namespace.createElement(ReactHookFormFormControl, {
647
652
  className: className,
653
+ sx: sx,
648
654
  disabled: disabled,
649
655
  errors: errors
650
656
  }, /*#__PURE__*/React__namespace.createElement(reactHookForm.Controller, {
@@ -710,7 +716,8 @@
710
716
  return null;
711
717
  } : _g,
712
718
  className = _a.className,
713
- otherProps = __rest(_a, ["name", "rules", "disabled", "label", "format", "openTo", "defaultNullValue", "helperText", "onChange", "className"]);
719
+ sx = _a.sx,
720
+ otherProps = __rest(_a, ["name", "rules", "disabled", "label", "format", "openTo", "defaultNullValue", "helperText", "onChange", "className", "sx"]);
714
721
 
715
722
  var inputRef = React__namespace.useRef(null);
716
723
 
@@ -723,7 +730,8 @@
723
730
  return /*#__PURE__*/React__namespace.createElement(ReactHookFormFormControl, {
724
731
  disabled: disabled,
725
732
  errors: errors,
726
- className: className
733
+ className: className,
734
+ sx: sx
727
735
  }, /*#__PURE__*/React__namespace.createElement(reactHookForm.Controller, {
728
736
  render: function render(_props) {
729
737
  return /*#__PURE__*/React__namespace.createElement(lab.DateTimePicker, __assign({
@@ -1,4 +1,5 @@
1
1
  import * as React from 'react';
2
+ import { SxProps, Theme } from '@mui/material';
2
3
  import { Moment } from 'moment-timezone';
3
4
  import { DateTimePickerProps } from '@mui/lab';
4
5
  import { Rules } from './types';
@@ -12,6 +13,7 @@ declare type ReactHookKeyboardDateTimePickerProps = Partial<DateTimePickerProps>
12
13
  helperText?: string;
13
14
  label?: string;
14
15
  format?: string;
16
+ sx?: SxProps<Theme>;
15
17
  };
16
18
  declare const ReactHookKeyboardDateTimePicker: React.FC<ReactHookKeyboardDateTimePickerProps>;
17
19
  export default ReactHookKeyboardDateTimePicker;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opengeoweb/form-fields",
3
- "version": "2.14.0",
3
+ "version": "4.0.0",
4
4
  "description": "GeoWeb form-fields library for the opengeoweb project",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -16,8 +16,7 @@
16
16
  "react": "^17.0.2",
17
17
  "@mui/material": "^5.2.8",
18
18
  "moment": "^2.29.0",
19
- "@opengeoweb/theme": "2.14.0",
20
- "@mui/styles": "^5.2.3",
19
+ "@opengeoweb/theme": "4.0.0",
21
20
  "moment-timezone": "^0.5.31",
22
21
  "@mui/lab": "^5.0.0-alpha.64",
23
22
  "lodash": "^4.17.20"