@groupeactual/ui-kit 0.4.20 → 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.
@@ -1,9 +1,10 @@
1
- import { ChangeEventHandler, FocusEventHandler, ReactNode } from 'react';
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: FocusEventHandler<unknown>;
6
- onChange: ChangeEventHandler<unknown>;
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(e);
50471
+ if (onChange) {
50472
+ onChange(e);
50473
+ }
50472
50474
  }, onBlur: function (e) {
50473
- onBlur(e);
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,
@@ -51314,9 +51319,9 @@ var useMaterialThemeTokens = function (themeName) {
51314
51319
  textCase: designTokens["".concat(themeName, "TextCaseNone")],
51315
51320
  textDecoration: designTokens["".concat(themeName, "TextDecorationUnderline")]
51316
51321
  },
51317
- fontWeightRegular: fontWeights.RobotoBold,
51322
+ fontWeightRegular: fontWeights.RobotoRegular,
51318
51323
  fontWeightMedium: fontWeights.RobotoMedium,
51319
- fontWeightBold: fontWeights.RobotoRegular
51324
+ fontWeightBold: fontWeights.RobotoBold
51320
51325
  },
51321
51326
  breakpoints: {
51322
51327
  values: {