design-react-kit 5.4.0 → 5.4.1
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/CHANGELOG.md +10 -0
- package/dist/Input/Input.cjs +1 -1
- package/dist/Input/Input.cjs.map +1 -1
- package/dist/Input/TextArea.cjs +1 -1
- package/dist/Input/TextArea.cjs.map +1 -1
- package/dist/Input/TextArea.js +4 -1
- package/dist/Input/TextArea.js.map +1 -1
- package/dist/Input/utils.cjs +1 -1
- package/dist/Input/utils.cjs.map +1 -1
- package/dist/Input/utils.js +2 -2
- package/dist/Input/utils.js.map +1 -1
- package/dist/Rating/Rating.cjs +1 -1
- package/dist/Rating/Rating.cjs.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/types/Input/TextArea.d.ts +1 -1
- package/package.json +1 -1
- package/src/Input/TextArea.tsx +9 -3
- package/src/Input/utils.tsx +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, { ReactNode, Ref, TextareaHTMLAttributes } from 'react';
|
|
2
2
|
import type { CSSModule } from 'reactstrap/types/lib/utils';
|
|
3
3
|
export interface TextAreaProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
4
4
|
/** Etichetta del campo TextArea. */
|
package/package.json
CHANGED
package/src/Input/TextArea.tsx
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, { ReactNode, Ref, TextareaHTMLAttributes } from 'react';
|
|
2
2
|
|
|
3
|
-
import { InputContainer } from './InputContainer';
|
|
4
|
-
import { getClasses, getValidationTextControlClass, useFocus } from './utils';
|
|
5
3
|
import type { CSSModule } from 'reactstrap/types/lib/utils';
|
|
4
|
+
import { InputContainer } from './InputContainer';
|
|
5
|
+
import { getClasses, getFormControlClass, getValidationTextControlClass, useFocus } from './utils';
|
|
6
6
|
|
|
7
7
|
export interface TextAreaProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
8
8
|
/** Etichetta del campo TextArea. */
|
|
@@ -56,6 +56,11 @@ export const TextArea = ({
|
|
|
56
56
|
|
|
57
57
|
const extraAttributes: { ['aria-describedby']?: string } = {};
|
|
58
58
|
|
|
59
|
+
//Chiamo questa funzione per impostare classNames a 'form-control'
|
|
60
|
+
const formControlClass = getFormControlClass(
|
|
61
|
+
{},
|
|
62
|
+
cssModule
|
|
63
|
+
);
|
|
59
64
|
// associate the input field with the help text
|
|
60
65
|
const infoId = id ? `${id}Description` : undefined;
|
|
61
66
|
if (id) {
|
|
@@ -73,6 +78,7 @@ export const TextArea = ({
|
|
|
73
78
|
label,
|
|
74
79
|
validationText,
|
|
75
80
|
normalized: Boolean(normalized),
|
|
81
|
+
formControlClass,
|
|
76
82
|
validationTextControlClass,
|
|
77
83
|
isFocused,
|
|
78
84
|
originalWrapperClass
|
package/src/Input/utils.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import classNames from 'classnames';
|
|
2
|
-
import {
|
|
2
|
+
import { useCallback, useState } from 'react';
|
|
3
3
|
import type { CSSModule } from 'reactstrap/types/lib/utils';
|
|
4
4
|
import { mapToCssModules } from '../utils';
|
|
5
5
|
import type { InputProps } from './Input';
|
|
@@ -98,7 +98,7 @@ export function getClasses(
|
|
|
98
98
|
),
|
|
99
99
|
cssModule
|
|
100
100
|
);
|
|
101
|
-
const wrapperClass = mapToCssModules(classNames(
|
|
101
|
+
const wrapperClass = mapToCssModules(classNames(originalWrapperClass, 'form-group'), cssModule);
|
|
102
102
|
const validationTextClass = mapToCssModules(
|
|
103
103
|
classNames(
|
|
104
104
|
{
|