@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.js +24 -6
- package/index.js.map +1 -1
- package/index.mjs +24 -6
- package/index.mjs.map +1 -1
- package/lib/checkbox/checkbox.d.ts +5 -1
- package/lib/date-picker/date-picker.d.ts +5 -3
- package/lib/input/input.d.ts +4 -2
- package/lib/radio-group/radio.d.ts +5 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -414,6 +414,8 @@ function GoabCheckbox({
|
|
|
414
414
|
value,
|
|
415
415
|
text,
|
|
416
416
|
description,
|
|
417
|
+
reveal,
|
|
418
|
+
revealAriaLabel,
|
|
417
419
|
maxWidth,
|
|
418
420
|
children,
|
|
419
421
|
onChange,
|
|
@@ -451,6 +453,7 @@ function GoabCheckbox({
|
|
|
451
453
|
text,
|
|
452
454
|
value: typeof value === "boolean" ? value ? "true" : void 0 : value,
|
|
453
455
|
arialabel: ariaLabel,
|
|
456
|
+
revealarialabel: revealAriaLabel,
|
|
454
457
|
description: typeof description === "string" ? description : void 0,
|
|
455
458
|
maxwidth: maxWidth,
|
|
456
459
|
mt,
|
|
@@ -458,8 +461,9 @@ function GoabCheckbox({
|
|
|
458
461
|
mb,
|
|
459
462
|
ml,
|
|
460
463
|
children: [
|
|
461
|
-
|
|
462
|
-
children
|
|
464
|
+
children,
|
|
465
|
+
typeof description !== "string" && description && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "description", children: description }),
|
|
466
|
+
reveal && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "reveal", children: reveal })
|
|
463
467
|
]
|
|
464
468
|
}
|
|
465
469
|
);
|
|
@@ -575,6 +579,7 @@ function GoabDatePicker({
|
|
|
575
579
|
max,
|
|
576
580
|
testId,
|
|
577
581
|
disabled,
|
|
582
|
+
type,
|
|
578
583
|
mt,
|
|
579
584
|
mr,
|
|
580
585
|
mb,
|
|
@@ -590,11 +595,15 @@ function GoabDatePicker({
|
|
|
590
595
|
const current = ref.current;
|
|
591
596
|
const handleChange = (e) => {
|
|
592
597
|
const detail = e.detail;
|
|
593
|
-
onChange(detail);
|
|
598
|
+
onChange == null ? void 0 : onChange(detail);
|
|
594
599
|
};
|
|
595
|
-
|
|
600
|
+
if (onChange) {
|
|
601
|
+
current.addEventListener("_change", handleChange);
|
|
602
|
+
}
|
|
596
603
|
return () => {
|
|
597
|
-
|
|
604
|
+
if (onChange) {
|
|
605
|
+
current.removeEventListener("_change", handleChange);
|
|
606
|
+
}
|
|
598
607
|
};
|
|
599
608
|
}, [onChange]);
|
|
600
609
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -603,6 +612,7 @@ function GoabDatePicker({
|
|
|
603
612
|
ref,
|
|
604
613
|
name,
|
|
605
614
|
value: (value == null ? void 0 : value.toISOString()) || "",
|
|
615
|
+
type,
|
|
606
616
|
error: error ? "true" : void 0,
|
|
607
617
|
disabled: disabled ? "true" : void 0,
|
|
608
618
|
min: min == null ? void 0 : min.toISOString(),
|
|
@@ -2849,6 +2859,7 @@ function GoabInput({
|
|
|
2849
2859
|
trailingContent,
|
|
2850
2860
|
maxLength,
|
|
2851
2861
|
trailingIconAriaLabel,
|
|
2862
|
+
textAlign = "left",
|
|
2852
2863
|
onTrailingIconClick,
|
|
2853
2864
|
onChange,
|
|
2854
2865
|
onFocus,
|
|
@@ -2926,6 +2937,7 @@ function GoabInput({
|
|
|
2926
2937
|
ml,
|
|
2927
2938
|
handletrailingiconclick: onTrailingIconClick ? "true" : "false",
|
|
2928
2939
|
trailingiconarialabel: trailingIconAriaLabel,
|
|
2940
|
+
textalign: textAlign,
|
|
2929
2941
|
children: [
|
|
2930
2942
|
leadingContent && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "leadingContent", children: leadingContent }),
|
|
2931
2943
|
trailingContent && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "trailingContent", children: trailingContent })
|
|
@@ -3060,6 +3072,7 @@ function GoabInputNumber({
|
|
|
3060
3072
|
min = Number.MIN_VALUE,
|
|
3061
3073
|
max = Number.MAX_VALUE,
|
|
3062
3074
|
value,
|
|
3075
|
+
textAlign = "right",
|
|
3063
3076
|
...props
|
|
3064
3077
|
}) {
|
|
3065
3078
|
const onNumberChange = ({ name, value: value2 }) => {
|
|
@@ -3089,7 +3102,8 @@ function GoabInputNumber({
|
|
|
3089
3102
|
onFocus,
|
|
3090
3103
|
onBlur,
|
|
3091
3104
|
type: "number",
|
|
3092
|
-
onKeyPress
|
|
3105
|
+
onKeyPress,
|
|
3106
|
+
textAlign
|
|
3093
3107
|
}
|
|
3094
3108
|
);
|
|
3095
3109
|
}
|
|
@@ -3341,6 +3355,8 @@ function GoabRadioItem({
|
|
|
3341
3355
|
label,
|
|
3342
3356
|
value,
|
|
3343
3357
|
description,
|
|
3358
|
+
reveal,
|
|
3359
|
+
revealAriaLabel,
|
|
3344
3360
|
maxWidth,
|
|
3345
3361
|
disabled,
|
|
3346
3362
|
checked,
|
|
@@ -3364,12 +3380,14 @@ function GoabRadioItem({
|
|
|
3364
3380
|
disabled: disabled ? "true" : void 0,
|
|
3365
3381
|
checked: checked ? "true" : void 0,
|
|
3366
3382
|
arialabel: ariaLabel,
|
|
3383
|
+
revealarialabel: revealAriaLabel,
|
|
3367
3384
|
mt,
|
|
3368
3385
|
mr,
|
|
3369
3386
|
mb,
|
|
3370
3387
|
ml,
|
|
3371
3388
|
children: [
|
|
3372
3389
|
description && typeof description !== "string" && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "description", children: description }),
|
|
3390
|
+
reveal && /* @__PURE__ */ jsxRuntime.jsx("div", { slot: "reveal", children: reveal }),
|
|
3373
3391
|
children
|
|
3374
3392
|
]
|
|
3375
3393
|
}
|