@cocso-ui/react 1.2.3 → 1.2.4

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.
@@ -25,7 +25,13 @@ function OneTimePasswordField({
25
25
  ref,
26
26
  ...props
27
27
  }) {
28
- return /*#__PURE__*/jsxRuntime.jsx(inputOtp.OTPInput, {
28
+ return /*#__PURE__*/jsxRuntime.jsx(inputOtp.OTPInput
29
+ // The hidden input is the control, and it is unnamed without this. The
30
+ // component exists for one-time codes, so a default name is meaningful
31
+ // where a generic one would not be — the same call `Spinner` and
32
+ // `Progress` make. A caller passing `aria-label` overrides it.
33
+ , {
34
+ "aria-label": "One-time code",
29
35
  containerClassName: cn.cn(oneTimePasswordField_module.otp, className),
30
36
  onChange: onValueChange,
31
37
  ref: ref,
@@ -23,7 +23,13 @@ function OneTimePasswordField({
23
23
  ref,
24
24
  ...props
25
25
  }) {
26
- return /*#__PURE__*/jsx(OTPInput, {
26
+ return /*#__PURE__*/jsx(OTPInput
27
+ // The hidden input is the control, and it is unnamed without this. The
28
+ // component exists for one-time codes, so a default name is meaningful
29
+ // where a generic one would not be — the same call `Spinner` and
30
+ // `Progress` make. A caller passing `aria-label` overrides it.
31
+ , {
32
+ "aria-label": "One-time code",
27
33
  containerClassName: cn(styles.otp, className),
28
34
  onChange: onValueChange,
29
35
  ref: ref,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocso-ui/react",
3
- "version": "1.2.3",
3
+ "version": "1.2.4",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/cocso/cocso-ui.git",