@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/cjs/index.js
CHANGED
|
@@ -50468,9 +50468,13 @@ var TextField = function (_a) {
|
|
|
50468
50468
|
}, [value]);
|
|
50469
50469
|
return (jsxRuntime.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) {
|
|
50470
50470
|
setInternalValue(e.currentTarget.value);
|
|
50471
|
-
onChange
|
|
50471
|
+
if (onChange) {
|
|
50472
|
+
onChange(e);
|
|
50473
|
+
}
|
|
50472
50474
|
}, onBlur: function (e) {
|
|
50473
|
-
onBlur
|
|
50475
|
+
if (onBlur) {
|
|
50476
|
+
onBlur(e);
|
|
50477
|
+
}
|
|
50474
50478
|
}, error: !!error, disabled: disabled, InputProps: { endAdornment: endAdornment }, inputProps: { maxLength: maxLength } }, props, { helperText: jsxRuntime.jsxs("div", __assign$1({ style: { display: 'table', width: '100%' } }, { children: [(error || props.helperText) && (jsxRuntime.jsx("div", __assign$1({ style: {
|
|
50475
50479
|
display: maxLength ? 'table-cell' : '',
|
|
50476
50480
|
float: 'left'
|
|
@@ -51039,6 +51043,7 @@ var TextFieldCss = function (muiTokens) {
|
|
|
51039
51043
|
MuiInputLabel: {
|
|
51040
51044
|
styleOverrides: {
|
|
51041
51045
|
root: {
|
|
51046
|
+
fontWeight: 500,
|
|
51042
51047
|
'&#text-field-mui-label': {
|
|
51043
51048
|
fontSize: '14px',
|
|
51044
51049
|
lineHeight: '18px',
|
|
@@ -51079,6 +51084,9 @@ var ButtonCss = function (muiTokens) {
|
|
|
51079
51084
|
return {
|
|
51080
51085
|
MuiButton: {
|
|
51081
51086
|
styleOverrides: {
|
|
51087
|
+
'@font-face': {
|
|
51088
|
+
fontFamily: 'Roboto'
|
|
51089
|
+
},
|
|
51082
51090
|
root: {
|
|
51083
51091
|
borderRadius: '4px',
|
|
51084
51092
|
padding: '7.5px 16px',
|
|
@@ -51129,9 +51137,6 @@ var AccordionCss = function () {
|
|
|
51129
51137
|
return {
|
|
51130
51138
|
MuiAccordionSummary: {
|
|
51131
51139
|
styleOverrides: {
|
|
51132
|
-
'@font-face': {
|
|
51133
|
-
fontFamily: 'Roboto'
|
|
51134
|
-
},
|
|
51135
51140
|
content: {
|
|
51136
51141
|
paddingLeft: '12px',
|
|
51137
51142
|
fontWeight: 500,
|