@sebgroup/green-react 3.18.0 → 3.20.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/package.json CHANGED
@@ -2,13 +2,13 @@
2
2
  "name": "@sebgroup/green-react",
3
3
  "main": "./src/index.js",
4
4
  "module": "./src/index.js",
5
- "version": "3.18.0",
5
+ "version": "3.20.0",
6
6
  "peerDependencies": {
7
7
  "react": "^17 || ^18",
8
8
  "react-dom": "^17 || ^18"
9
9
  },
10
10
  "dependencies": {
11
- "@sebgroup/green-core": "^1.41.2",
11
+ "@sebgroup/green-core": "^1.41.3",
12
12
  "@sebgroup/chlorophyll": "^3.6.2",
13
13
  "@sebgroup/extract": "^3.0.1",
14
14
  "@lit/react": "^1.0.2",
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import { GdsDatepicker } from '@sebgroup/green-core/components/datepicker/index.js';
2
3
  import { GdsValidator } from '@sebgroup/green-core/components/form/form-control';
3
4
  export declare const CoreDatepicker: import("@lit/react").ReactWebComponent<GdsDatepicker, {
@@ -11,35 +12,35 @@ export type DatepickerOptions = {
11
12
  /**
12
13
  * Whether to disable weekends in the calendar.
13
14
  */
14
- disabledWeekends: boolean;
15
+ disabledWeekends?: boolean;
15
16
  /**
16
17
  * Whether to hide the label above the input field.
17
18
  */
18
- hideLabel: boolean;
19
+ hideLabel?: boolean;
19
20
  /**
20
21
  * Validation state of the form control. Setting this to true triggers the invalid state of the control.
21
22
  */
22
- invalid: boolean;
23
+ invalid?: boolean;
23
24
  /**
24
25
  * Validate the form control element. Should return the validity state and an optional validation message.
25
26
  */
26
- validator: GdsValidator;
27
+ validator?: GdsValidator;
27
28
  /**
28
29
  * The label text displayed above the datepicker. This should always be set to a descriptive label.
29
30
  */
30
- label: string;
31
+ label?: string;
31
32
  /**
32
33
  * The maximum date that can be selected.
33
34
  */
34
- maxDate: Date;
35
+ maxDate?: Date;
35
36
  /**
36
37
  * The minimum date that can be selected.
37
38
  */
38
- minDate: Date;
39
+ minDate?: Date;
39
40
  /**
40
41
  * Controls whether the datepicker popover is open.
41
42
  */
42
- open: boolean;
43
+ open?: boolean;
43
44
  /**
44
45
  * Callback function that is called when the value of the Datepicker changes.
45
46
  */
@@ -47,15 +48,15 @@ export type DatepickerOptions = {
47
48
  /**
48
49
  * Sets the datepicker as a required field for forms.
49
50
  */
50
- required: boolean;
51
+ required?: boolean;
51
52
  /**
52
53
  * Whether to show a column of week numbers in the calendar.
53
54
  */
54
- showWeeks: boolean;
55
+ showWeeks?: boolean;
55
56
  /**
56
57
  * Whether to use the small variant of the datepicker field.
57
58
  */
58
- size: 'small' | 'medium';
59
+ size?: 'small' | 'medium';
59
60
  /**
60
61
  * The test ID used for testing.
61
62
  */
@@ -65,6 +66,14 @@ export type DatepickerOptions = {
65
66
  * This can be a string if set via the value attribute in markup, or via the setAttribute DOM API.
66
67
  */
67
68
  value?: Date;
69
+ /**
70
+ * The ref to the datepicker element.
71
+ */
72
+ ref?: React.Ref<GdsDatepicker>;
73
+ /**
74
+ * The children of the datepicker.
75
+ */
76
+ children?: React.ReactNode;
68
77
  /**
69
78
  * @deprecated Use `value` instead.
70
79
  */
@@ -74,5 +83,5 @@ export type DatepickerOptions = {
74
83
  */
75
84
  currentDate?: Date;
76
85
  };
77
- export declare const Datepicker: ({ label, onChange, minDate, maxDate, value, showWeeks, testId, validator, selectedDate, currentDate, ...props }: DatepickerOptions) => import("react/jsx-runtime").JSX.Element;
86
+ export declare const Datepicker: React.ForwardRefExoticComponent<Omit<DatepickerOptions, "ref"> & React.RefAttributes<unknown>>;
78
87
  export default Datepicker;
@@ -1,6 +1,6 @@
1
1
  import { _ as __rest } from '../../../_tslib.js';
2
2
  import { jsx } from 'react/jsx-runtime';
3
- import React, { useEffect } from 'react';
3
+ import React, { forwardRef, useRef, useImperativeHandle, useEffect } from 'react';
4
4
  import { createComponent } from '@lit/react';
5
5
  import { GdsDatepicker } from '@sebgroup/green-core/components/datepicker/index.js';
6
6
  import { getScopedTagName } from '@sebgroup/green-core/scoping';
@@ -15,7 +15,7 @@ var CoreDatepicker = createComponent({
15
15
  },
16
16
  react: React
17
17
  });
18
- var Datepicker = function Datepicker(_a) {
18
+ var Datepicker = /*#__PURE__*/forwardRef(function (_a, ref) {
19
19
  var _a$label = _a.label,
20
20
  label = _a$label === void 0 ? 'Date' : _a$label,
21
21
  onChange = _a.onChange,
@@ -37,10 +37,13 @@ var Datepicker = function Datepicker(_a) {
37
37
  onChange(e.detail.value);
38
38
  }
39
39
  };
40
- var ref = React.useRef(null);
40
+ var _ref = useRef(null);
41
+ useImperativeHandle(ref, function () {
42
+ return _ref.current;
43
+ }, [_ref]);
41
44
  useEffect(function () {
42
- if (ref.current) {
43
- ref.current.validator = validator;
45
+ if (_ref === null || _ref === void 0 ? void 0 : _ref.current) {
46
+ _ref.current.validator = validator;
44
47
  }
45
48
  }, [validator]);
46
49
  return jsx("div", {
@@ -53,9 +56,9 @@ var Datepicker = function Datepicker(_a) {
53
56
  showWeekNumbers: showWeeks,
54
57
  onchange: onChangeHandler,
55
58
  value: value,
56
- ref: ref
59
+ ref: _ref
57
60
  }, props))
58
61
  });
59
- };
62
+ });
60
63
 
61
64
  export { CoreDatepicker, Datepicker, Datepicker as default };
@@ -10,5 +10,5 @@ export interface ButtonProps extends DetailedHTMLProps<ButtonHTMLAttributes<HTML
10
10
  /** Renders as a `data-testid` attribute on the `<button>` element, useful in testing scenarios. */
11
11
  testId?: string;
12
12
  }
13
- export declare function Button({ className, variant, active, type, size, testId, ...otherProps }: ButtonProps): import("react/jsx-runtime").JSX.Element;
13
+ export declare const Button: import("react").ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
14
14
  export default Button;
@@ -1,8 +1,9 @@
1
1
  import { _ as __rest } from '../../../../_tslib.js';
2
2
  import { jsx } from 'react/jsx-runtime';
3
+ import { forwardRef } from 'react';
3
4
  import classNames from 'classnames';
4
5
 
5
- function Button(_a) {
6
+ var Button = /*#__PURE__*/forwardRef(function (_a, ref) {
6
7
  var _b;
7
8
  var className = _a.className,
8
9
  variant = _a.variant,
@@ -12,21 +13,23 @@ function Button(_a) {
12
13
  type = _a$type === void 0 ? 'button' : _a$type,
13
14
  size = _a.size,
14
15
  testId = _a.testId,
15
- otherProps = __rest(_a, ["className", "variant", "active", "type", "size", "testId"]);
16
+ props = __rest(_a, ["className", "variant", "active", "type", "size", "testId"]);
16
17
  var buttonClassName = classNames(className, variant, size, {
17
18
  active: active
18
19
  }) || undefined;
19
20
  return variant == 'close' ? jsx("button", Object.assign({
20
21
  className: buttonClassName,
21
- "aria-label": (_b = otherProps['aria-label']) !== null && _b !== void 0 ? _b : 'Close',
22
- "data-testid": testId
23
- }, otherProps, {
22
+ "aria-label": (_b = props['aria-label']) !== null && _b !== void 0 ? _b : 'Close',
23
+ "data-testid": testId,
24
+ ref: ref
25
+ }, props, {
24
26
  children: jsx("i", {})
25
27
  })) : jsx("button", Object.assign({
26
28
  className: buttonClassName,
27
29
  type: type,
28
- "data-testid": testId
29
- }, otherProps));
30
- }
30
+ "data-testid": testId,
31
+ ref: ref
32
+ }, props));
33
+ });
31
34
 
32
35
  export { Button, Button as default };
@@ -1,4 +1,5 @@
1
1
  export { Button } from './button.js';
2
2
  import '../../../../_tslib.js';
3
3
  import 'react/jsx-runtime';
4
+ import 'react';
4
5
  import 'classnames';
@@ -1,8 +1,8 @@
1
1
  import { _ as _slicedToArray } from '../../../../_rollupPluginBabelHelpers.js';
2
+ import { _ as __rest } from '../../../../_tslib.js';
2
3
  import { jsx } from 'react/jsx-runtime';
3
4
  import { useState, useEffect } from 'react';
4
5
  import { Button } from '../button/button.js';
5
- import '../../../../_tslib.js';
6
6
  import '@sebgroup/extract';
7
7
  import classNames from 'classnames';
8
8
  import { Group } from '../group/group.js';
@@ -43,8 +43,10 @@ var ButtonGroup = function ButtonGroup(_ref) {
43
43
  return jsx(Group, {
44
44
  "data-label": "button-group",
45
45
  id: id,
46
- children: buttons.map(function (props) {
47
- return jsx(Button, Object.assign({}, props), props.key);
46
+ children: buttons.map(function (_a) {
47
+ var key = _a.key,
48
+ props = __rest(_a, ["key"]);
49
+ return jsx(Button, Object.assign({}, props), key);
48
50
  })
49
51
  });
50
52
  };
@@ -1,9 +1,9 @@
1
1
  export { ButtonGroup } from './buttonGroup.js';
2
2
  import '../../../../_rollupPluginBabelHelpers.js';
3
+ import '../../../../_tslib.js';
3
4
  import 'react/jsx-runtime';
4
5
  import 'react';
5
6
  import '../button/button.js';
6
- import '../../../../_tslib.js';
7
7
  import 'classnames';
8
8
  import '@sebgroup/extract';
9
9
  import '../group/group.js';
@@ -12,4 +12,4 @@ export interface CheckboxProps extends HTMLProps<HTMLInputElement> {
12
12
  /** A handler function that takes the event and can act on it */
13
13
  onChange?: FormEventHandler<HTMLInputElement>;
14
14
  }
15
- export declare const Checkbox: ({ "aria-describedby": ariaDescribedBy, id, label, validator, testId, required, className, ...props }: CheckboxProps) => import("react/jsx-runtime").JSX.Element;
15
+ export declare const Checkbox: import("react").ForwardRefExoticComponent<Omit<CheckboxProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
@@ -3,9 +3,9 @@ import { _ as __rest } from '../../../../_tslib.js';
3
3
  import { jsxs, jsx } from 'react/jsx-runtime';
4
4
  import { randomId, validateClassName } from '@sebgroup/extract';
5
5
  import classNames from 'classnames';
6
- import { useState } from 'react';
6
+ import { forwardRef, useState } from 'react';
7
7
 
8
- var Checkbox = function Checkbox(_a) {
8
+ var Checkbox = /*#__PURE__*/forwardRef(function (_a, ref) {
9
9
  var ariaDescribedBy = _a['aria-describedby'],
10
10
  _a$id = _a.id,
11
11
  id = _a$id === void 0 ? randomId() : _a$id,
@@ -35,7 +35,8 @@ var Checkbox = function Checkbox(_a) {
35
35
  type: "checkbox",
36
36
  "data-testid": testId,
37
37
  id: uuid,
38
- required: required
38
+ required: required,
39
+ ref: ref
39
40
  }, props)), jsx("i", {})]
40
41
  }), validator && jsx("span", {
41
42
  className: "form-info",
@@ -43,6 +44,6 @@ var Checkbox = function Checkbox(_a) {
43
44
  children: validator.message
44
45
  })]
45
46
  });
46
- };
47
+ });
47
48
 
48
49
  export { Checkbox };
@@ -1,13 +1,3 @@
1
- import { ReactNode, MouseEvent } from 'react';
2
- import { ButtonType } from '@sebgroup/extract';
3
- interface IconButtonInterface {
4
- children: ReactNode;
5
- type?: ButtonType;
6
- onClick: (event: MouseEvent) => void;
7
- 'aria-expanded'?: boolean;
8
- 'aria-controls'?: string;
9
- size?: 'small' | 'normal';
10
- title?: string;
11
- }
12
- export declare const IconButton: ({ children, onClick, ...props }: IconButtonInterface) => import("react/jsx-runtime").JSX.Element;
13
- export {};
1
+ /// <reference types="react" />
2
+ import { ButtonProps } from '../button/button';
3
+ export declare const IconButton: import("react").ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
@@ -1,20 +1,15 @@
1
- import { _ as __rest } from '../../../../_tslib.js';
2
1
  import { jsx } from 'react/jsx-runtime';
2
+ import { forwardRef } from 'react';
3
+ import { Button } from '../button/button.js';
4
+ import '../../../../_tslib.js';
5
+ import 'classnames';
3
6
 
4
- var IconButton = function IconButton(_a) {
5
- var _b;
6
- var children = _a.children,
7
- onClick = _a.onClick,
8
- props = __rest(_a, ["children", "onClick"]);
9
- return jsx("button", {
10
- className: "icon ".concat(props.size === 'small' && 'small'),
11
- onClick: onClick,
12
- "aria-controls": props['aria-controls'],
13
- "aria-expanded": props['aria-expanded'],
14
- type: (_b = props.type) !== null && _b !== void 0 ? _b : 'button',
15
- title: props.title,
16
- children: children
17
- });
18
- };
7
+ var IconButton = /*#__PURE__*/forwardRef(function (props, ref) {
8
+ return jsx(Button, Object.assign({}, props, {
9
+ className: "icon",
10
+ ref: ref,
11
+ children: props.children
12
+ }));
13
+ });
19
14
 
20
15
  export { IconButton };
@@ -1,3 +1,6 @@
1
1
  export { IconButton } from './iconButton.js';
2
- import '../../../../_tslib.js';
3
2
  import 'react/jsx-runtime';
3
+ import 'react';
4
+ import '../button/button.js';
5
+ import '../../../../_tslib.js';
6
+ import 'classnames';
@@ -12,9 +12,9 @@ export { RadioGroup } from './radioButton/radioGroup.js';
12
12
  export { TextArea } from './textarea/textarea.js';
13
13
  import '../../../_tslib.js';
14
14
  import 'react/jsx-runtime';
15
+ import 'react';
15
16
  import 'classnames';
16
17
  import '../../../_rollupPluginBabelHelpers.js';
17
- import 'react';
18
18
  import '@sebgroup/extract';
19
19
  import './formContext.js';
20
20
  import './validateInput.js';
@@ -9,6 +9,7 @@ import '@sebgroup/extract';
9
9
  import '../../formItem/formItem.js';
10
10
  import 'classnames';
11
11
  import '../iconButton/iconButton.js';
12
+ import '../button/button.js';
12
13
  import '../../icons/times.js';
13
14
  import '../../icons/infoCircle.js';
14
15
  import '../group/group.js';
@@ -13,14 +13,18 @@ export interface InputProps extends IExpandableInformation, DetailedHTMLProps<In
13
13
  unit?: string;
14
14
  /** Validation object */
15
15
  validator?: IValidator;
16
- /** Value of input */
16
+ /**
17
+ * Value of input
18
+ */
17
19
  value?: string | number;
18
20
  /** Function called when input value changes */
19
21
  onChangeInput?: (value: string) => string;
22
+ /** Pass an string that is an id to another element describing the input-field*/
23
+ 'aria-describedby'?: string;
20
24
  }
21
- export declare const Input: ({ "aria-describedby": ariaDescribedBy, autoComplete, children, className, testId: dataTestId, expandableInfo, expandableInfoButtonLabel, formatter, id, label, info, onChange, unit, role, validator, onChangeInput, value, required, ...props }: InputProps) => import("react/jsx-runtime").JSX.Element;
22
- export declare const TextInput: (props: Omit<InputProps, 'type'>) => import("react/jsx-runtime").JSX.Element;
23
- export declare const EmailInput: (props: Omit<InputProps, 'type'>) => import("react/jsx-runtime").JSX.Element;
24
- export declare const NumberInput: (props: Omit<InputProps, 'type'>) => import("react/jsx-runtime").JSX.Element;
25
+ export declare const Input: import("react").ForwardRefExoticComponent<Omit<InputProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
26
+ export declare const TextInput: import("react").ForwardRefExoticComponent<Omit<Omit<InputProps, "type">, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
27
+ export declare const EmailInput: import("react").ForwardRefExoticComponent<Omit<Omit<InputProps, "type">, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
28
+ export declare const NumberInput: import("react").ForwardRefExoticComponent<Omit<Omit<InputProps, "type">, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
25
29
  export { RadioButton } from '../radioButton/radioButton';
26
30
  export { Checkbox } from '../checkbox/checkbox';
@@ -1,7 +1,7 @@
1
1
  import { _ as _slicedToArray, a as _defineProperty } from '../../../../_rollupPluginBabelHelpers.js';
2
2
  import { _ as __rest } from '../../../../_tslib.js';
3
3
  import { jsx, jsxs } from 'react/jsx-runtime';
4
- import { useState, useEffect, useCallback } from 'react';
4
+ import { forwardRef, useState, useEffect, useCallback } from 'react';
5
5
  import { randomId, validateClassName } from '@sebgroup/extract';
6
6
  import { FormItem } from '../../formItem/formItem.js';
7
7
  import { Group } from '../group/group.js';
@@ -9,11 +9,12 @@ import classNames from 'classnames';
9
9
  export { RadioButton } from '../radioButton/radioButton.js';
10
10
  export { Checkbox } from '../checkbox/checkbox.js';
11
11
  import '../iconButton/iconButton.js';
12
+ import '../button/button.js';
12
13
  import '../../icons/times.js';
13
14
  import '../../icons/infoCircle.js';
14
15
  import '../useInput.js';
15
16
 
16
- var Input = function Input(_a) {
17
+ var Input = /*#__PURE__*/forwardRef(function (_a, ref) {
17
18
  var ariaDescribedBy = _a['aria-describedby'],
18
19
  _a$autoComplete = _a.autoComplete,
19
20
  autoComplete = _a$autoComplete === void 0 ? 'off' : _a$autoComplete,
@@ -77,7 +78,8 @@ var Input = function Input(_a) {
77
78
  onChange: handleChange,
78
79
  role: role,
79
80
  value: localValue,
80
- required: required
81
+ required: required,
82
+ ref: ref
81
83
  }, props));
82
84
  if (showSimpleInput) return input;
83
85
  var spanClassName = classNames('form-text', {
@@ -104,21 +106,27 @@ var Input = function Input(_a) {
104
106
  })
105
107
  })
106
108
  });
107
- };
108
- var TextInput = function TextInput(props) {
109
+ });
110
+ var TextInput = /*#__PURE__*/forwardRef(function (props, ref) {
109
111
  return jsx(Input, Object.assign({
110
112
  type: "text"
111
- }, props));
112
- };
113
- var EmailInput = function EmailInput(props) {
113
+ }, props, {
114
+ ref: ref
115
+ }));
116
+ });
117
+ var EmailInput = /*#__PURE__*/forwardRef(function (props, ref) {
114
118
  return jsx(Input, Object.assign({
115
119
  type: "email"
116
- }, props));
117
- };
118
- var NumberInput = function NumberInput(props) {
120
+ }, props, {
121
+ ref: ref
122
+ }));
123
+ });
124
+ var NumberInput = /*#__PURE__*/forwardRef(function (props, ref) {
119
125
  return jsx(Input, Object.assign({
120
126
  type: "number"
121
- }, props));
122
- };
127
+ }, props, {
128
+ ref: ref
129
+ }));
130
+ });
123
131
 
124
132
  export { EmailInput, Input, NumberInput, TextInput };
@@ -9,5 +9,6 @@ import 'classnames';
9
9
  import '../../../../_rollupPluginBabelHelpers.js';
10
10
  import '../../formItem/formItem.js';
11
11
  import '../iconButton/iconButton.js';
12
+ import '../button/button.js';
12
13
  import '../../icons/times.js';
13
14
  import '../../icons/infoCircle.js';
@@ -6,6 +6,7 @@ import { FormItem } from '../../formItem/formItem.js';
6
6
  import classNames from 'classnames';
7
7
  import '../../../../_tslib.js';
8
8
  import '../iconButton/iconButton.js';
9
+ import '../button/button.js';
9
10
  import '../../icons/times.js';
10
11
  import '../../icons/infoCircle.js';
11
12
 
@@ -7,5 +7,6 @@ import 'react';
7
7
  import '../../formItem/formItem.js';
8
8
  import 'classnames';
9
9
  import '../iconButton/iconButton.js';
10
+ import '../button/button.js';
10
11
  import '../../icons/times.js';
11
12
  import '../../icons/infoCircle.js';
@@ -12,4 +12,4 @@ export interface ITextAreaProps extends IExpandableInformation, DetailedHTMLProp
12
12
  /** Value of textarea */
13
13
  value?: string;
14
14
  }
15
- export declare const TextArea: ({ "aria-describedby": ariaDescribedBy, autoComplete, className, expandableInfo, expandableInfoButtonLabel, id, label, info, onChange, role, rows, validator, value, testId: dataTestId, maxLength, required, ...props }: ITextAreaProps) => import("react/jsx-runtime").JSX.Element;
15
+ export declare const TextArea: import("react").ForwardRefExoticComponent<Omit<ITextAreaProps, "ref"> & import("react").RefAttributes<HTMLTextAreaElement>>;
@@ -2,14 +2,15 @@ import { _ as _slicedToArray, a as _defineProperty } from '../../../../_rollupPl
2
2
  import { _ as __rest } from '../../../../_tslib.js';
3
3
  import { jsx } from 'react/jsx-runtime';
4
4
  import { randomId, validateClassName } from '@sebgroup/extract';
5
- import { useState, useEffect, useCallback } from 'react';
5
+ import { forwardRef, useState, useEffect, useCallback } from 'react';
6
6
  import { FormItem } from '../../formItem/formItem.js';
7
7
  import classNames from 'classnames';
8
8
  import '../iconButton/iconButton.js';
9
+ import '../button/button.js';
9
10
  import '../../icons/times.js';
10
11
  import '../../icons/infoCircle.js';
11
12
 
12
- var TextArea = function TextArea(_a) {
13
+ var TextArea = /*#__PURE__*/forwardRef(function (_a, ref) {
13
14
  var ariaDescribedBy = _a['aria-describedby'],
14
15
  _a$autoComplete = _a.autoComplete,
15
16
  autoComplete = _a$autoComplete === void 0 ? 'off' : _a$autoComplete,
@@ -71,10 +72,11 @@ var TextArea = function TextArea(_a) {
71
72
  value: localValue,
72
73
  "data-testid": dataTestId,
73
74
  maxLength: maxLength,
74
- required: required
75
+ required: required,
76
+ ref: ref
75
77
  }, props))
76
78
  })
77
79
  });
78
- };
80
+ });
79
81
 
80
82
  export { TextArea };
@@ -1,12 +1,13 @@
1
1
  import { _ as _slicedToArray, b as _asyncToGenerator, c as _regeneratorRuntime } from '../../../_rollupPluginBabelHelpers.js';
2
2
  import { jsxs, jsx } from 'react/jsx-runtime';
3
3
  import '../../../_tslib.js';
4
+ import { useRef, useState, useLayoutEffect, useEffect } from 'react';
4
5
  import classNames from 'classnames';
5
6
  import { IconButton } from '../form/iconButton/iconButton.js';
6
- import { useRef, useState, useLayoutEffect, useEffect } from 'react';
7
7
  import { debounce, randomId, validateClassName, delay } from '@sebgroup/extract';
8
8
  import { Times } from '../icons/times.js';
9
9
  import { InfoCircle } from '../icons/infoCircle.js';
10
+ import '../form/button/button.js';
10
11
 
11
12
  var FormItem = function FormItem(_ref) {
12
13
  var expandableInfo = _ref.expandableInfo,
@@ -72,6 +73,7 @@ var FormItem = function FormItem(_ref) {
72
73
  size: "small",
73
74
  "aria-expanded": isExpanded,
74
75
  "aria-controls": "".concat(inputId, "-expandable-info"),
76
+ "aria-label": expandableInfoButtonLabel,
75
77
  onClick: function () {
76
78
  var _onClick = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(event) {
77
79
  return _regeneratorRuntime().wrap(function _callee$(_context) {
@@ -2,9 +2,10 @@ export { FormItem } from './formItem.js';
2
2
  import '../../../_rollupPluginBabelHelpers.js';
3
3
  import 'react/jsx-runtime';
4
4
  import '../../../_tslib.js';
5
+ import 'react';
5
6
  import 'classnames';
6
7
  import '../form/iconButton/iconButton.js';
7
- import 'react';
8
+ import '../form/button/button.js';
8
9
  import '@sebgroup/extract';
9
10
  import '../icons/times.js';
10
11
  import '../icons/infoCircle.js';
@@ -8,5 +8,6 @@ import '../icons/chevronDown.js';
8
8
  import '../formItem/formItem.js';
9
9
  import 'classnames';
10
10
  import '../form/iconButton/iconButton.js';
11
+ import '../form/button/button.js';
11
12
  import '../icons/times.js';
12
13
  import '../icons/infoCircle.js';
@@ -7,6 +7,7 @@ import { ChevronDown } from '../icons/chevronDown.js';
7
7
  import { FormItem } from '../formItem/formItem.js';
8
8
  import classNames from 'classnames';
9
9
  import '../form/iconButton/iconButton.js';
10
+ import '../form/button/button.js';
10
11
  import '../icons/times.js';
11
12
  import '../icons/infoCircle.js';
12
13