@sb1/ffe-form-react 11.0.6 → 11.0.8

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/es/Tooltip.js CHANGED
@@ -36,7 +36,7 @@ var Tooltip = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
36
36
  onClick(evt);
37
37
  }
38
38
  };
39
- return /*#__PURE__*/React.createElement("span", _extends({}, rest, {
39
+ return /*#__PURE__*/React.createElement("div", _extends({}, rest, {
40
40
  className: classNames('ffe-tooltip', {
41
41
  'ffe-tooltip--open': _isOpen
42
42
  })
@@ -56,7 +56,7 @@ var Tooltip = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
56
56
  className: "ffe-tooltip__text",
57
57
  id: tooltipId,
58
58
  isOpen: _isOpen
59
- }, /*#__PURE__*/React.createElement("div", {
59
+ }, /*#__PURE__*/React.createElement("span", {
60
60
  className: classNames('ffe-small-text', className),
61
61
  role: _isOpen ? 'status' : 'none'
62
62
  }, children)));
package/lib/Tooltip.js CHANGED
@@ -46,7 +46,7 @@ var Tooltip = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
46
46
  onClick(evt);
47
47
  }
48
48
  };
49
- return /*#__PURE__*/_react.default.createElement("span", _extends({}, rest, {
49
+ return /*#__PURE__*/_react.default.createElement("div", _extends({}, rest, {
50
50
  className: (0, _classnames.default)('ffe-tooltip', {
51
51
  'ffe-tooltip--open': _isOpen
52
52
  })
@@ -66,7 +66,7 @@ var Tooltip = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
66
66
  className: "ffe-tooltip__text",
67
67
  id: tooltipId,
68
68
  isOpen: _isOpen
69
- }, /*#__PURE__*/_react.default.createElement("div", {
69
+ }, /*#__PURE__*/_react.default.createElement("span", {
70
70
  className: (0, _classnames.default)('ffe-small-text', className),
71
71
  role: _isOpen ? 'status' : 'none'
72
72
  }, children)));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sb1/ffe-form-react",
3
- "version": "11.0.6",
3
+ "version": "11.0.8",
4
4
  "description": "React component for form elements in ffe",
5
5
  "license": "MIT",
6
6
  "author": "SpareBank 1",
@@ -25,8 +25,8 @@
25
25
  "test:watch": "ffe-buildtool jest --watch"
26
26
  },
27
27
  "dependencies": {
28
- "@sb1/ffe-collapse-react": "^2.0.2",
29
- "@sb1/ffe-form": "^23.0.4",
28
+ "@sb1/ffe-collapse-react": "^2.0.3",
29
+ "@sb1/ffe-form": "^23.0.6",
30
30
  "classnames": "^2.3.1",
31
31
  "uuid": "^9.0.0"
32
32
  },
@@ -44,5 +44,5 @@
44
44
  "publishConfig": {
45
45
  "access": "public"
46
46
  },
47
- "gitHead": "d68b4f8edf76c7c49ad50b6798904314bba455bd"
47
+ "gitHead": "1ab898e744977e4cb4db1bee9b65369a0deeef9a"
48
48
  }
package/types/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
 
3
3
  export interface CheckboxProps
4
- extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'children'> {
4
+ extends Omit<React.ComponentProps<'input'>, 'children'> {
5
5
  noMargins?: boolean;
6
6
  hiddenLabel?: boolean;
7
7
  id?: string;
@@ -14,15 +14,13 @@ export interface CheckboxProps
14
14
  }) => React.ReactNode);
15
15
  }
16
16
 
17
- export interface BaseFieldMessageProps
18
- extends React.HTMLAttributes<HTMLElement> {
17
+ export interface BaseFieldMessageProps extends React.ComponentProps<'html'> {
19
18
  children: React.ReactNode;
20
19
  className?: string;
21
20
  element?: string;
22
21
  }
23
22
 
24
- export interface InputProps
25
- extends React.InputHTMLAttributes<HTMLInputElement> {
23
+ export interface InputProps extends React.ComponentProps<'input'> {
26
24
  className?: string;
27
25
  inline?: boolean;
28
26
  textLike?: boolean;
@@ -47,8 +45,7 @@ export interface PhoneNumberProps {
47
45
  numberRef?: React.Ref<HTMLInputElement>;
48
46
  }
49
47
 
50
- export interface LabelProps
51
- extends React.LabelHTMLAttributes<HTMLLabelElement> {
48
+ export interface LabelProps extends React.ComponentProps<'label'> {
52
49
  block?: boolean;
53
50
  children: React.ReactNode;
54
51
  className?: string;
@@ -56,7 +53,7 @@ export interface LabelProps
56
53
  }
57
54
 
58
55
  export interface InputGroupProps
59
- extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> {
56
+ extends Omit<React.ComponentProps<'div'>, 'children'> {
60
57
  inputId?: string;
61
58
  /** Unless you only have one element in your `InputGroup` you will have to use the function-as-a-child pattern. */
62
59
  children:
@@ -76,7 +73,7 @@ export interface InputGroupProps
76
73
  tooltip?: React.ReactNode;
77
74
  }
78
75
 
79
- export interface TooltipProps extends React.HTMLAttributes<HTMLSpanElement> {
76
+ export interface TooltipProps extends React.ComponentProps<'span'> {
80
77
  'aria-controls'?: string;
81
78
  children?: React.ReactNode;
82
79
  className?: string;
@@ -86,8 +83,7 @@ export interface TooltipProps extends React.HTMLAttributes<HTMLSpanElement> {
86
83
  ref?: React.ForwardedRef<HTMLButtonElement>;
87
84
  }
88
85
 
89
- export interface RadioBlockProps
90
- extends React.InputHTMLAttributes<HTMLInputElement> {
86
+ export interface RadioBlockProps extends React.ComponentProps<'input'> {
91
87
  checked?: boolean;
92
88
  children?: React.ReactNode;
93
89
  className?: string;
@@ -101,8 +97,7 @@ export interface RadioBlockProps
101
97
  }
102
98
 
103
99
  // As value has a different type than InputHTMLAttributes<T> we have to weaken it
104
- interface WeakInputAttributes
105
- extends React.InputHTMLAttributes<HTMLInputElement> {
100
+ interface WeakInputAttributes extends React.ComponentProps<'input'> {
106
101
  value: any;
107
102
  }
108
103
 
@@ -121,8 +116,7 @@ export interface RadioButtonProps extends WeakInputAttributes {
121
116
  }
122
117
 
123
118
  // As onChange has a different type than React.FieldsetHTMLAttributes<T> we have to weaken it
124
- interface WeakFieldSetAttributes
125
- extends React.FieldsetHTMLAttributes<HTMLFieldSetElement> {
119
+ interface WeakFieldSetAttributes extends React.ComponentProps<'fieldset'> {
126
120
  onChange?: any;
127
121
  }
128
122
 
@@ -149,8 +143,7 @@ export interface RadioButtonInputGroupProps
149
143
  tooltip?: string | React.ReactNode;
150
144
  }
151
145
 
152
- export interface RadioSwitchProps
153
- extends React.InputHTMLAttributes<HTMLInputElement> {
146
+ export interface RadioSwitchProps extends React.ComponentProps<'input'> {
154
147
  checked?: boolean;
155
148
  className?: string;
156
149
  labelProps?: {};
@@ -167,13 +160,11 @@ export interface RadioSwitchProps
167
160
  condensed?: boolean;
168
161
  }
169
162
 
170
- export interface TextAreaProps
171
- extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
163
+ export interface TextAreaProps extends React.ComponentProps<'textarea'> {
172
164
  className?: string;
173
165
  }
174
166
 
175
- export interface ToggleSwitchProps
176
- extends React.InputHTMLAttributes<HTMLInputElement> {
167
+ export interface ToggleSwitchProps extends React.ComponentProps<'input'> {
177
168
  children: React.ReactNode;
178
169
  className?: string;
179
170
  locale?: 'nb' | 'nn' | 'en';