@uktrade/react-component-library 0.20.1 → 0.20.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/dist/components/Inputs/CheckBoxesInput/CheckBoxGroupInput.js +1 -1
- package/dist/components/Inputs/SelectInput/SelectInput.js +1 -1
- package/dist/components/Inputs/TextInput/TextInput.js +1 -1
- package/package.json +1 -1
- package/src/components/Inputs/CheckBoxesInput/CheckBoxGroupInput.tsx +1 -1
- package/src/components/Inputs/SelectInput/SelectInput.tsx +1 -1
- package/src/components/Inputs/TextInput/TextInput.tsx +1 -1
|
@@ -16,7 +16,7 @@ export const CheckboxGroup = ({ legend, hint, error, options, name, values, lege
|
|
|
16
16
|
return (_jsx("div", { className: clsx("govuk-form-group", {
|
|
17
17
|
"govuk-form-group--error": hasError,
|
|
18
18
|
}), children: _jsxs("fieldset", { className: "govuk-fieldset", "aria-describedby": errorId, children: [_jsx("legend", { className: clsx("govuk-fieldset__legend", {
|
|
19
|
-
[`govuk-fieldset__legend--${legendSize}`]:
|
|
19
|
+
[`govuk-fieldset__legend--${legendSize}`]: true,
|
|
20
20
|
}), children: legendHeading }), hint && _jsx("div", { className: "govuk-hint", children: hint }), hasError && (_jsxs("p", { id: errorId, className: "govuk-error-message", children: [_jsx("span", { className: "govuk-visually-hidden", children: "Error:" }), " ", error] })), _jsx("div", { className: clsx("govuk-checkboxes", {
|
|
21
21
|
"govuk-checkboxes--small": checkboxSize === "small",
|
|
22
22
|
}), "data-module": "govuk-checkboxes", children: options.map((opt) => (_jsxs("div", { className: "govuk-checkboxes__item", children: [_jsx("input", { className: "govuk-checkboxes__input", id: opt.id, name: name, type: "checkbox", value: opt.value, checked: values.includes(opt.value), onChange: handleChange, "aria-label": opt.ariaLabel }), _jsx("label", { className: "govuk-label govuk-checkboxes__label", htmlFor: opt.id, children: opt.label }), opt.hint && (_jsx("div", { className: "govuk-hint govuk-checkboxes__hint", children: opt.hint }))] }, opt.id))) })] }) }));
|
|
@@ -8,7 +8,7 @@ export const SelectInput = ({ id, label, hint, error, options, placeholder, labe
|
|
|
8
8
|
const errorId = hasError ? `${id}-error` : undefined;
|
|
9
9
|
const ariaDescribedBy = [hintId, errorId].filter(Boolean).join(" ") || undefined;
|
|
10
10
|
const labelElement = (_jsx("label", { htmlFor: id, className: clsx("govuk-label", {
|
|
11
|
-
[`govuk-label--${labelSize}`]:
|
|
11
|
+
[`govuk-label--${labelSize}`]: true,
|
|
12
12
|
}), children: label }));
|
|
13
13
|
return (_jsxs("div", { className: clsx("govuk-form-group", {
|
|
14
14
|
"govuk-form-group--error": hasError,
|
|
@@ -8,7 +8,7 @@ export const TextInput = ({ id, label, hint, error, width = "20", labelSize = "m
|
|
|
8
8
|
const errorId = hasError ? `${id}-error` : undefined;
|
|
9
9
|
const describedBy = [hintId, errorId].filter(Boolean).join(" ") || undefined;
|
|
10
10
|
const labelElement = (_jsx("label", { htmlFor: id, className: clsx("govuk-label", {
|
|
11
|
-
[`govuk-label--${labelSize}`]:
|
|
11
|
+
[`govuk-label--${labelSize}`]: true,
|
|
12
12
|
}), children: label }));
|
|
13
13
|
const input = (_jsx("input", { id: id, className: clsx("govuk-input", `govuk-input--width-${width}`, className), "aria-invalid": hasError, "aria-describedby": describedBy, placeholder: placeholder, ...props }));
|
|
14
14
|
return (_jsxs("div", { className: clsx("govuk-form-group", {
|
package/package.json
CHANGED
|
@@ -69,7 +69,7 @@ export const CheckboxGroup = ({
|
|
|
69
69
|
<fieldset className="govuk-fieldset" aria-describedby={errorId}>
|
|
70
70
|
<legend
|
|
71
71
|
className={clsx("govuk-fieldset__legend", {
|
|
72
|
-
[`govuk-fieldset__legend--${legendSize}`]:
|
|
72
|
+
[`govuk-fieldset__legend--${legendSize}`]: true,
|
|
73
73
|
})}
|
|
74
74
|
>
|
|
75
75
|
{legendHeading}
|