@abgov/react-components 6.5.0-alpha.2 → 6.5.0-alpha.3

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.mjs CHANGED
@@ -412,6 +412,8 @@ function GoabCheckbox({
412
412
  value,
413
413
  text,
414
414
  description,
415
+ reveal,
416
+ revealAriaLabel,
415
417
  maxWidth,
416
418
  children,
417
419
  onChange,
@@ -449,6 +451,7 @@ function GoabCheckbox({
449
451
  text,
450
452
  value: typeof value === "boolean" ? value ? "true" : void 0 : value,
451
453
  arialabel: ariaLabel,
454
+ revealarialabel: revealAriaLabel,
452
455
  description: typeof description === "string" ? description : void 0,
453
456
  maxwidth: maxWidth,
454
457
  mt,
@@ -456,8 +459,9 @@ function GoabCheckbox({
456
459
  mb,
457
460
  ml,
458
461
  children: [
459
- description && typeof description !== "string" && /* @__PURE__ */ jsx("div", { slot: "description", children: description }),
460
- children
462
+ children,
463
+ typeof description !== "string" && description && /* @__PURE__ */ jsx("div", { slot: "description", children: description }),
464
+ reveal && /* @__PURE__ */ jsx("div", { slot: "reveal", children: reveal })
461
465
  ]
462
466
  }
463
467
  );
@@ -573,6 +577,7 @@ function GoabDatePicker({
573
577
  max,
574
578
  testId,
575
579
  disabled,
580
+ type,
576
581
  mt,
577
582
  mr,
578
583
  mb,
@@ -588,11 +593,15 @@ function GoabDatePicker({
588
593
  const current = ref.current;
589
594
  const handleChange = (e) => {
590
595
  const detail = e.detail;
591
- onChange(detail);
596
+ onChange == null ? void 0 : onChange(detail);
592
597
  };
593
- current.addEventListener("_change", handleChange);
598
+ if (onChange) {
599
+ current.addEventListener("_change", handleChange);
600
+ }
594
601
  return () => {
595
- current.removeEventListener("_change", handleChange);
602
+ if (onChange) {
603
+ current.removeEventListener("_change", handleChange);
604
+ }
596
605
  };
597
606
  }, [onChange]);
598
607
  return /* @__PURE__ */ jsx(
@@ -601,6 +610,7 @@ function GoabDatePicker({
601
610
  ref,
602
611
  name,
603
612
  value: (value == null ? void 0 : value.toISOString()) || "",
613
+ type,
604
614
  error: error ? "true" : void 0,
605
615
  disabled: disabled ? "true" : void 0,
606
616
  min: min == null ? void 0 : min.toISOString(),
@@ -2847,6 +2857,7 @@ function GoabInput({
2847
2857
  trailingContent,
2848
2858
  maxLength,
2849
2859
  trailingIconAriaLabel,
2860
+ textAlign = "left",
2850
2861
  onTrailingIconClick,
2851
2862
  onChange,
2852
2863
  onFocus,
@@ -2924,6 +2935,7 @@ function GoabInput({
2924
2935
  ml,
2925
2936
  handletrailingiconclick: onTrailingIconClick ? "true" : "false",
2926
2937
  trailingiconarialabel: trailingIconAriaLabel,
2938
+ textalign: textAlign,
2927
2939
  children: [
2928
2940
  leadingContent && /* @__PURE__ */ jsx("div", { slot: "leadingContent", children: leadingContent }),
2929
2941
  trailingContent && /* @__PURE__ */ jsx("div", { slot: "trailingContent", children: trailingContent })
@@ -3058,6 +3070,7 @@ function GoabInputNumber({
3058
3070
  min = Number.MIN_VALUE,
3059
3071
  max = Number.MAX_VALUE,
3060
3072
  value,
3073
+ textAlign = "right",
3061
3074
  ...props
3062
3075
  }) {
3063
3076
  const onNumberChange = ({ name, value: value2 }) => {
@@ -3087,7 +3100,8 @@ function GoabInputNumber({
3087
3100
  onFocus,
3088
3101
  onBlur,
3089
3102
  type: "number",
3090
- onKeyPress
3103
+ onKeyPress,
3104
+ textAlign
3091
3105
  }
3092
3106
  );
3093
3107
  }
@@ -3339,6 +3353,8 @@ function GoabRadioItem({
3339
3353
  label,
3340
3354
  value,
3341
3355
  description,
3356
+ reveal,
3357
+ revealAriaLabel,
3342
3358
  maxWidth,
3343
3359
  disabled,
3344
3360
  checked,
@@ -3362,12 +3378,14 @@ function GoabRadioItem({
3362
3378
  disabled: disabled ? "true" : void 0,
3363
3379
  checked: checked ? "true" : void 0,
3364
3380
  arialabel: ariaLabel,
3381
+ revealarialabel: revealAriaLabel,
3365
3382
  mt,
3366
3383
  mr,
3367
3384
  mb,
3368
3385
  ml,
3369
3386
  children: [
3370
3387
  description && typeof description !== "string" && /* @__PURE__ */ jsx("div", { slot: "description", children: description }),
3388
+ reveal && /* @__PURE__ */ jsx("div", { slot: "reveal", children: reveal }),
3371
3389
  children
3372
3390
  ]
3373
3391
  }