@sebgroup/green-react 1.12.0 → 1.12.2

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
 
@@ -3623,7 +3629,8 @@ function Slider({
3623
3629
  children: [jsx("div", {
3624
3630
  children: label && jsxs(Fragment, {
3625
3631
  children: [jsx("label", Object.assign({
3626
- htmlFor: name
3632
+ htmlFor: name,
3633
+ id: `${name}-label`
3627
3634
  }, {
3628
3635
  children: label
3629
3636
  })), instruction && jsx("p", {
@@ -3638,6 +3645,7 @@ function Slider({
3638
3645
  value: inputFieldValue,
3639
3646
  id: `${name}-textbox`,
3640
3647
  name: name,
3648
+ "aria-labelledby": `${name}-label`,
3641
3649
  className: errorMessage ? 'is-invalid' : '',
3642
3650
  disabled: disabled,
3643
3651
  onChange: e => handleInputFieldChange(e.currentTarget.value),
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@sebgroup/green-react",
3
- "version": "1.12.0",
3
+ "version": "1.12.2",
4
4
  "peerDependencies": {
5
5
  "react": "^17 || ^18",
6
6
  "react-dom": "^17 || ^18"
7
7
  },
8
8
  "dependencies": {
9
- "@sebgroup/chlorophyll": "^1.11.2",
10
- "@sebgroup/extract": "^1.3.4",
9
+ "@sebgroup/chlorophyll": "^1.11.4",
10
+ "@sebgroup/extract": "^1.4.1",
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;