@sebgroup/green-react 1.12.1 → 1.12.3

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/index.js CHANGED
@@ -2645,8 +2645,9 @@ const Form = props => {
2645
2645
 
2646
2646
  const FormItems = ({
2647
2647
  children,
2648
+ name,
2648
2649
  validate,
2649
- name
2650
+ onChange: _onFormItemsChanged
2650
2651
  }) => {
2651
2652
  const {
2652
2653
  setValues,
@@ -2711,7 +2712,12 @@ const FormItems = ({
2711
2712
  return /*#__PURE__*/React.cloneElement(children, {
2712
2713
  validator: (errors === null || errors === void 0 ? void 0 : errors[name]) && validate,
2713
2714
  name,
2714
- onChange
2715
+ onChange: event => {
2716
+ if (typeof _onFormItemsChanged === 'function') {
2717
+ _onFormItemsChanged(event);
2718
+ }
2719
+ onChange(event);
2720
+ }
2715
2721
  });
2716
2722
  };
2717
2723
 
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@sebgroup/green-react",
3
- "version": "1.12.1",
3
+ "version": "1.12.3",
4
4
  "peerDependencies": {
5
5
  "react": "^17 || ^18",
6
6
  "react-dom": "^17 || ^18"
7
7
  },
8
8
  "dependencies": {
9
- "@sebgroup/chlorophyll": "^1.11.3",
10
- "@sebgroup/extract": "^1.4.0",
9
+ "@sebgroup/chlorophyll": "^1.11.8",
10
+ "@sebgroup/extract": "^1.4.3",
11
11
  "classnames": "^2.3.2"
12
12
  },
13
13
  "description": "React components built on top of @sebgroup/chlorophyll.",
@@ -2,8 +2,9 @@ import { IValidator } from '@sebgroup/extract';
2
2
  import React from 'react';
3
3
  export interface FormItemsProps {
4
4
  children: React.ReactNode;
5
- validate?: IValidator;
6
5
  name: string;
6
+ validate?: IValidator;
7
+ onChange?: React.ChangeEventHandler<HTMLInputElement>;
7
8
  }
8
9
  export declare const FormItems: React.FC<FormItemsProps>;
9
10
  export default FormItems;
@@ -1,13 +1,11 @@
1
1
  import React from 'react';
2
- import { IValidator } from '@sebgroup/extract';
3
- export interface RadioGroupProps {
2
+ import { IValidator, IExpandableInformation } from '@sebgroup/extract';
3
+ export interface RadioGroupProps extends IExpandableInformation {
4
4
  label?: string;
5
5
  title?: string;
6
6
  labelInformation?: string;
7
7
  valueSelected?: string;
8
8
  description?: string;
9
- expandableInfo?: string;
10
- expandableInfoButtonLabel?: string;
11
9
  defaultSelected?: string;
12
10
  validator?: IValidator;
13
11
  onChangeRadio?: (value: string) => string;
@@ -1,12 +1,10 @@
1
- import { IValidator } from '@sebgroup/extract';
2
- import React, { HTMLProps } from 'react';
3
- export interface TextInputProps extends HTMLProps<HTMLInputElement> {
1
+ import { IValidator, IExpandableInformation } from '@sebgroup/extract';
2
+ import { HTMLProps } from 'react';
3
+ export interface TextInputProps extends HTMLProps<HTMLInputElement>, IExpandableInformation {
4
4
  type?: 'text' | 'email' | 'number';
5
5
  label?: string;
6
6
  info?: string;
7
7
  testId?: string;
8
- expandableInfo?: React.ReactNode;
9
- expandableInfoButtonLabel?: string;
10
8
  validator?: IValidator;
11
9
  onChangeInput?: (value: string) => string;
12
10
  }
@@ -15,8 +13,6 @@ export interface NumberInputProps extends TextInputProps {
15
13
  min?: number;
16
14
  max?: number;
17
15
  step?: number;
18
- expandableInfo?: React.ReactNode;
19
- expandableInfoButtonLabel?: string;
20
16
  }
21
17
  export interface CheckboxProps extends HTMLProps<HTMLInputElement> {
22
18
  testId?: string;
@@ -1,15 +1,13 @@
1
- import { IValidator } from '@sebgroup/extract';
1
+ import { IExpandableInformation, IValidator } from '@sebgroup/extract';
2
2
  import React, { ReactNode } from 'react';
3
- interface FormItemProps {
3
+ interface FormItemProps extends IExpandableInformation {
4
4
  onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
5
5
  onChangeInput?: (value: string) => string;
6
6
  label?: string;
7
7
  labelInformation?: string;
8
8
  validator?: IValidator;
9
- expandableInfo?: React.ReactNode;
10
9
  inputId?: string;
11
10
  children: ReactNode;
12
- expandableInfoButtonLabel?: string;
13
11
  role?: string;
14
12
  }
15
13
  export declare const FormItem: ({ expandableInfo, label, labelInformation, validator, inputId, children, expandableInfoButtonLabel, role, }: FormItemProps) => JSX.Element;