@groupeactual/ui-kit 0.4.21 → 0.4.22
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/cjs/components/Form/TextField/TextField.d.ts +4 -3
- package/dist/cjs/index.js +10 -5
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/components/Form/TextField/TextField.d.ts +4 -3
- package/dist/esm/index.js +10 -5
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +4 -3
- package/package.json +1 -1
- package/src/components/Form/TextField/TextField.tsx +10 -11
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FocusEventHandler, ReactNode } from 'react';
|
|
2
2
|
import { TextFieldProps } from '@mui/material/TextField';
|
|
3
|
+
import { InputProps as StandardInputProps } from '@mui/material/Input/Input';
|
|
3
4
|
interface Props {
|
|
4
5
|
error?: string;
|
|
5
|
-
onBlur
|
|
6
|
-
onChange
|
|
6
|
+
onBlur?: FocusEventHandler<unknown>;
|
|
7
|
+
onChange?: StandardInputProps['onChange'];
|
|
7
8
|
label: string;
|
|
8
9
|
value: string;
|
|
9
10
|
name: string;
|
package/dist/esm/index.js
CHANGED
|
@@ -50442,9 +50442,13 @@ var TextField = function (_a) {
|
|
|
50442
50442
|
}, [value]);
|
|
50443
50443
|
return (jsx(MuiTextField, __assign$1({ id: label === placeholder ? 'text-field-mui' : 'test-field-ds', variant: "outlined", name: name, label: label, value: internalValue, placeholder: label === placeholder ? undefined : placeholder, FormHelperTextProps: { component: 'div' }, InputLabelProps: { shrink: label === placeholder ? undefined : true }, onClick: function (e) { return e.stopPropagation(); }, onChange: function (e) {
|
|
50444
50444
|
setInternalValue(e.currentTarget.value);
|
|
50445
|
-
onChange
|
|
50445
|
+
if (onChange) {
|
|
50446
|
+
onChange(e);
|
|
50447
|
+
}
|
|
50446
50448
|
}, onBlur: function (e) {
|
|
50447
|
-
onBlur
|
|
50449
|
+
if (onBlur) {
|
|
50450
|
+
onBlur(e);
|
|
50451
|
+
}
|
|
50448
50452
|
}, error: !!error, disabled: disabled, InputProps: { endAdornment: endAdornment }, inputProps: { maxLength: maxLength } }, props, { helperText: jsxs("div", __assign$1({ style: { display: 'table', width: '100%' } }, { children: [(error || props.helperText) && (jsx("div", __assign$1({ style: {
|
|
50449
50453
|
display: maxLength ? 'table-cell' : '',
|
|
50450
50454
|
float: 'left'
|
|
@@ -51013,6 +51017,7 @@ var TextFieldCss = function (muiTokens) {
|
|
|
51013
51017
|
MuiInputLabel: {
|
|
51014
51018
|
styleOverrides: {
|
|
51015
51019
|
root: {
|
|
51020
|
+
fontWeight: 500,
|
|
51016
51021
|
'&#text-field-mui-label': {
|
|
51017
51022
|
fontSize: '14px',
|
|
51018
51023
|
lineHeight: '18px',
|
|
@@ -51053,6 +51058,9 @@ var ButtonCss = function (muiTokens) {
|
|
|
51053
51058
|
return {
|
|
51054
51059
|
MuiButton: {
|
|
51055
51060
|
styleOverrides: {
|
|
51061
|
+
'@font-face': {
|
|
51062
|
+
fontFamily: 'Roboto'
|
|
51063
|
+
},
|
|
51056
51064
|
root: {
|
|
51057
51065
|
borderRadius: '4px',
|
|
51058
51066
|
padding: '7.5px 16px',
|
|
@@ -51103,9 +51111,6 @@ var AccordionCss = function () {
|
|
|
51103
51111
|
return {
|
|
51104
51112
|
MuiAccordionSummary: {
|
|
51105
51113
|
styleOverrides: {
|
|
51106
|
-
'@font-face': {
|
|
51107
|
-
fontFamily: 'Roboto'
|
|
51108
|
-
},
|
|
51109
51114
|
content: {
|
|
51110
51115
|
paddingLeft: '12px',
|
|
51111
51116
|
fontWeight: 500,
|