@sebgroup/green-react 1.12.2 → 1.13.0

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
@@ -3158,11 +3158,11 @@ const RadioGroup = ({
3158
3158
  var _a;
3159
3159
  if (radioBtnRef && radioBtnRef.current) {
3160
3160
  const form = (_a = radioBtnRef === null || radioBtnRef === void 0 ? void 0 : radioBtnRef.current) === null || _a === void 0 ? void 0 : _a.form;
3161
- const resetListner = () => {
3161
+ const resetListener = () => {
3162
3162
  setSelected(undefined);
3163
3163
  };
3164
- form === null || form === void 0 ? void 0 : form.addEventListener('reset', resetListner);
3165
- return () => form === null || form === void 0 ? void 0 : form.removeEventListener('reset', resetListner);
3164
+ form === null || form === void 0 ? void 0 : form.addEventListener('reset', resetListener);
3165
+ return () => form === null || form === void 0 ? void 0 : form.removeEventListener('reset', resetListener);
3166
3166
  } else {
3167
3167
  // eslint-disable-next-line @typescript-eslint/no-empty-function
3168
3168
  return () => {};
@@ -3433,7 +3433,8 @@ const Select = /*#__PURE__*/React.forwardRef(({
3433
3433
  onChange,
3434
3434
  onSelect,
3435
3435
  expandableInfo,
3436
- expandableInfoButtonLabel
3436
+ expandableInfoButtonLabel,
3437
+ name
3437
3438
  }, ref) => {
3438
3439
  const selectId = id !== null && id !== void 0 ? id : randomId();
3439
3440
  const validatorClassName = validateClassName(validator === null || validator === void 0 ? void 0 : validator.indicator);
@@ -3452,6 +3453,7 @@ const Select = /*#__PURE__*/React.forwardRef(({
3452
3453
  id: selectId,
3453
3454
  "data-testid": testId,
3454
3455
  className: className,
3456
+ name: name,
3455
3457
  defaultValue: defaultValue,
3456
3458
  value: value,
3457
3459
  ref: ref,
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@sebgroup/green-react",
3
- "version": "1.12.2",
3
+ "version": "1.13.0",
4
4
  "peerDependencies": {
5
5
  "react": "^17 || ^18",
6
6
  "react-dom": "^17 || ^18"
7
7
  },
8
8
  "dependencies": {
9
- "@sebgroup/chlorophyll": "^1.11.4",
10
- "@sebgroup/extract": "^1.4.1",
9
+ "@sebgroup/chlorophyll": "^1.14.0",
10
+ "@sebgroup/extract": "^1.5.0",
11
11
  "classnames": "^2.3.2"
12
12
  },
13
13
  "description": "React components built on top of @sebgroup/chlorophyll.",
@@ -1,7 +1,7 @@
1
1
  import React, { InputHTMLAttributes } from 'react';
2
2
  import { IValidator } from '@sebgroup/extract';
3
3
  import { CheckboxProps, NumberInputProps, RadioButtonProps, TextInputProps } from '../types';
4
- export declare type Renderer = (type: string, props: InputHTMLAttributes<HTMLInputElement>, onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void, onChangeInput?: (value: string) => string, label?: string, info?: string, validator?: IValidator, expandableInfo?: React.ReactNode, expandableInfoButtonLabel?: string, testId?: string) => JSX.Element;
4
+ export declare type Renderer = (type: string, props: InputHTMLAttributes<HTMLInputElement>, onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void, onChangeInput?: (value: string) => string, label?: string, info?: string | React.ReactNode, validator?: IValidator, expandableInfo?: React.ReactNode, expandableInfoButtonLabel?: string, testId?: string) => JSX.Element;
5
5
  export declare const RenderInput: Renderer;
6
6
  export declare const TextInput: ({ label, info, testId, onChange, onChangeInput, validator, expandableInfo, expandableInfoButtonLabel, ...props }: TextInputProps) => JSX.Element;
7
7
  export declare const EmailInput: ({ label, info, onChange, onChangeInput, validator, testId, ...props }: TextInputProps) => JSX.Element;
@@ -1,13 +1,9 @@
1
1
  import React from 'react';
2
- import { IValidator } from '@sebgroup/extract';
3
- export interface RadioGroupProps {
4
- label?: string;
2
+ import { IValidator, IExpandableInformation, ILabelAndLabelInformation } from '@sebgroup/extract';
3
+ export interface RadioGroupProps extends IExpandableInformation, ILabelAndLabelInformation {
5
4
  title?: string;
6
- labelInformation?: string;
7
5
  valueSelected?: string;
8
6
  description?: string;
9
- expandableInfo?: string;
10
- expandableInfoButtonLabel?: string;
11
7
  defaultSelected?: string;
12
8
  validator?: IValidator;
13
9
  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,11 @@
1
- import { IValidator } from '@sebgroup/extract';
1
+ import { IExpandableInformation, ILabelAndLabelInformation, IValidator } from '@sebgroup/extract';
2
2
  import React, { ReactNode } from 'react';
3
- interface FormItemProps {
3
+ interface FormItemProps extends IExpandableInformation, ILabelAndLabelInformation {
4
4
  onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
5
5
  onChangeInput?: (value: string) => string;
6
- label?: string;
7
- labelInformation?: string;
8
6
  validator?: IValidator;
9
- expandableInfo?: React.ReactNode;
10
7
  inputId?: string;
11
8
  children: ReactNode;
12
- expandableInfoButtonLabel?: string;
13
9
  role?: string;
14
10
  }
15
11
  export declare const FormItem: ({ expandableInfo, label, labelInformation, validator, inputId, children, expandableInfoButtonLabel, role, }: FormItemProps) => JSX.Element;
@@ -11,6 +11,7 @@ export interface SelectProps extends SelectorAttributesProps, LabelProps {
11
11
  testId?: string;
12
12
  expandableInfo?: string;
13
13
  expandableInfoButtonLabel?: string;
14
+ name?: string;
14
15
  }
15
16
  interface OptionProps {
16
17
  children: string;