braid-design-system 32.14.2 → 32.14.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/CHANGELOG.md +8 -0
- package/dist/styles/lib/components/Autosuggest/Autosuggest.cjs +0 -6
- package/dist/styles/lib/components/Autosuggest/Autosuggest.mjs +0 -6
- package/dist/styles/lib/components/Dropdown/Dropdown.cjs +0 -1
- package/dist/styles/lib/components/Dropdown/Dropdown.mjs +0 -1
- package/dist/styles/lib/components/MonthPicker/MonthPicker.cjs +0 -1
- package/dist/styles/lib/components/MonthPicker/MonthPicker.mjs +0 -1
- package/dist/styles/lib/components/Textarea/Textarea.cjs +0 -1
- package/dist/styles/lib/components/Textarea/Textarea.mjs +0 -1
- package/dist/styles/lib/components/private/Field/Field.cjs +0 -2
- package/dist/styles/lib/components/private/Field/Field.mjs +0 -2
- package/dist/styles/lib/components/private/Placeholder/Placeholder.cjs +0 -2
- package/dist/styles/lib/components/private/Placeholder/Placeholder.mjs +0 -2
- package/dist/wireframe.chunk.d.ts +6 -7
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# braid-design-system
|
|
2
2
|
|
|
3
|
+
## 32.14.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- **Autosuggest:** Fix aria-label and aria-labelledby features ([#1420](https://github.com/seek-oss/braid-design-system/pull/1420))
|
|
8
|
+
|
|
9
|
+
Fixes an issue where the `aria-label` and `aria-labelledby` props provided by a consumer were being overidden internally by the `Autosuggest` component.
|
|
10
|
+
|
|
3
11
|
## 32.14.2
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -255,12 +255,8 @@ const createAccessbilityProps = ({
|
|
|
255
255
|
isOpen
|
|
256
256
|
}) => {
|
|
257
257
|
const menuId = `${id}-menu`;
|
|
258
|
-
const labelId = `${id}-label`;
|
|
259
258
|
const assistiveDescriptionId = `${id}-aria-description`;
|
|
260
259
|
return {
|
|
261
|
-
labelProps: {
|
|
262
|
-
id: labelId
|
|
263
|
-
},
|
|
264
260
|
inputProps: {
|
|
265
261
|
id,
|
|
266
262
|
role: "combobox",
|
|
@@ -269,7 +265,6 @@ const createAccessbilityProps = ({
|
|
|
269
265
|
// backwards compatibility for screenreaders implementing ARIA 1.0
|
|
270
266
|
"aria-controls": menuId,
|
|
271
267
|
"aria-expanded": isOpen,
|
|
272
|
-
"aria-labelledby": labelId,
|
|
273
268
|
"aria-autocomplete": "list",
|
|
274
269
|
"aria-activedescendant": typeof highlightedIndex === "number" ? getItemId(id, highlightedIndex) : void 0,
|
|
275
270
|
"aria-describedby": assistiveDescriptionId,
|
|
@@ -775,7 +770,6 @@ const Autosuggest = React.forwardRef(function({
|
|
|
775
770
|
{
|
|
776
771
|
...restProps,
|
|
777
772
|
id,
|
|
778
|
-
labelId: a11y.labelProps.id,
|
|
779
773
|
value: value.text,
|
|
780
774
|
prefix: void 0,
|
|
781
775
|
secondaryIcon: onClear ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -251,12 +251,8 @@ const createAccessbilityProps = ({
|
|
|
251
251
|
isOpen
|
|
252
252
|
}) => {
|
|
253
253
|
const menuId = `${id}-menu`;
|
|
254
|
-
const labelId = `${id}-label`;
|
|
255
254
|
const assistiveDescriptionId = `${id}-aria-description`;
|
|
256
255
|
return {
|
|
257
|
-
labelProps: {
|
|
258
|
-
id: labelId
|
|
259
|
-
},
|
|
260
256
|
inputProps: {
|
|
261
257
|
id,
|
|
262
258
|
role: "combobox",
|
|
@@ -265,7 +261,6 @@ const createAccessbilityProps = ({
|
|
|
265
261
|
// backwards compatibility for screenreaders implementing ARIA 1.0
|
|
266
262
|
"aria-controls": menuId,
|
|
267
263
|
"aria-expanded": isOpen,
|
|
268
|
-
"aria-labelledby": labelId,
|
|
269
264
|
"aria-autocomplete": "list",
|
|
270
265
|
"aria-activedescendant": typeof highlightedIndex === "number" ? getItemId(id, highlightedIndex) : void 0,
|
|
271
266
|
"aria-describedby": assistiveDescriptionId,
|
|
@@ -771,7 +766,6 @@ const Autosuggest = forwardRef(function({
|
|
|
771
766
|
{
|
|
772
767
|
...restProps,
|
|
773
768
|
id,
|
|
774
|
-
labelId: a11y.labelProps.id,
|
|
775
769
|
value: value.text,
|
|
776
770
|
prefix: void 0,
|
|
777
771
|
secondaryIcon: onClear ? /* @__PURE__ */ jsx(
|
|
@@ -19,7 +19,6 @@ const clsx__default = /* @__PURE__ */ _interopDefaultCompat(clsx);
|
|
|
19
19
|
const Field = ({
|
|
20
20
|
id,
|
|
21
21
|
value,
|
|
22
|
-
labelId,
|
|
23
22
|
name,
|
|
24
23
|
disabled,
|
|
25
24
|
autoComplete,
|
|
@@ -76,7 +75,6 @@ const Field = ({
|
|
|
76
75
|
hasVisualLabelOrDescription ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
77
76
|
styles_lib_components_MonthPicker_MonthPicker_cjs.FieldLabel,
|
|
78
77
|
{
|
|
79
|
-
id: labelId,
|
|
80
78
|
htmlFor: id,
|
|
81
79
|
label: "label" in restProps ? restProps.label : void 0,
|
|
82
80
|
disabled,
|
|
@@ -15,7 +15,6 @@ import { useBackgroundLightness } from "../../Box/BackgroundContext.mjs";
|
|
|
15
15
|
const Field = ({
|
|
16
16
|
id,
|
|
17
17
|
value,
|
|
18
|
-
labelId,
|
|
19
18
|
name,
|
|
20
19
|
disabled,
|
|
21
20
|
autoComplete,
|
|
@@ -72,7 +71,6 @@ const Field = ({
|
|
|
72
71
|
hasVisualLabelOrDescription ? /* @__PURE__ */ jsx(
|
|
73
72
|
FieldLabel,
|
|
74
73
|
{
|
|
75
|
-
id: labelId,
|
|
76
74
|
htmlFor: id,
|
|
77
75
|
label: "label" in restProps ? restProps.label : void 0,
|
|
78
76
|
disabled,
|
|
@@ -630,7 +630,6 @@ const PasswordField = React.forwardRef(
|
|
|
630
630
|
value,
|
|
631
631
|
icon: void 0,
|
|
632
632
|
prefix: void 0,
|
|
633
|
-
labelId: void 0,
|
|
634
633
|
disabled,
|
|
635
634
|
secondaryMessage: null,
|
|
636
635
|
alwaysShowSecondaryIcon: !disabled,
|
|
@@ -887,7 +886,6 @@ const TextField = React.forwardRef(
|
|
|
887
886
|
...restProps,
|
|
888
887
|
id,
|
|
889
888
|
value,
|
|
890
|
-
labelId: void 0,
|
|
891
889
|
secondaryMessage: characterLimit ? styles_lib_components_Textarea_Textarea_cjs.getCharacterLimitStatus({
|
|
892
890
|
value,
|
|
893
891
|
characterLimit
|
|
@@ -624,7 +624,6 @@ const PasswordField = forwardRef(
|
|
|
624
624
|
value,
|
|
625
625
|
icon: void 0,
|
|
626
626
|
prefix: void 0,
|
|
627
|
-
labelId: void 0,
|
|
628
627
|
disabled,
|
|
629
628
|
secondaryMessage: null,
|
|
630
629
|
alwaysShowSecondaryIcon: !disabled,
|
|
@@ -881,7 +880,6 @@ const TextField = forwardRef(
|
|
|
881
880
|
...restProps,
|
|
882
881
|
id,
|
|
883
882
|
value,
|
|
884
|
-
labelId: void 0,
|
|
885
883
|
secondaryMessage: characterLimit ? getCharacterLimitStatus({
|
|
886
884
|
value,
|
|
887
885
|
characterLimit
|
|
@@ -2926,7 +2926,6 @@ type FieldLabelVariant$1 = {
|
|
|
2926
2926
|
interface FieldBaseProps {
|
|
2927
2927
|
id: NonNullable<FormElementProps$1['id']>;
|
|
2928
2928
|
value?: FormElementProps$1['value'];
|
|
2929
|
-
labelId?: string;
|
|
2930
2929
|
name?: FormElementProps$1['name'];
|
|
2931
2930
|
disabled?: FormElementProps$1['disabled'];
|
|
2932
2931
|
autoComplete?: FormElementProps$1['autoComplete'];
|
|
@@ -2976,7 +2975,7 @@ interface LegacyMessageSuggestion {
|
|
|
2976
2975
|
/** @deprecated Use `noSuggestionsMessage` prop instead */
|
|
2977
2976
|
message: string;
|
|
2978
2977
|
}
|
|
2979
|
-
type AutosuggestBaseProps<Value> = Omit<FieldBaseProps, 'value' | 'autoComplete' | '
|
|
2978
|
+
type AutosuggestBaseProps<Value> = Omit<FieldBaseProps, 'value' | 'autoComplete' | 'prefix'> & {
|
|
2980
2979
|
value: AutosuggestValue<Value>;
|
|
2981
2980
|
suggestions: Suggestions<Value> | LegacyMessageSuggestion | ((value: AutosuggestValue<Value>) => Suggestions<Value> | LegacyMessageSuggestion);
|
|
2982
2981
|
noSuggestionsMessage?: string | {
|
|
@@ -3247,7 +3246,7 @@ declare const Drawer$1: ({ width, position, ...restProps }: DrawerProps) => JSX.
|
|
|
3247
3246
|
|
|
3248
3247
|
type ValidDropdownChildren = AllHTMLAttributes<HTMLOptionElement | HTMLOptGroupElement>;
|
|
3249
3248
|
type SelectProps = AllHTMLAttributes<HTMLSelectElement>;
|
|
3250
|
-
type DropdownBaseProps = Omit<FieldBaseProps, 'value' | '
|
|
3249
|
+
type DropdownBaseProps = Omit<FieldBaseProps, 'value' | 'secondaryMessage' | 'prefix'> & {
|
|
3251
3250
|
children: ValidDropdownChildren[] | ValidDropdownChildren;
|
|
3252
3251
|
value: NonNullable<SelectProps['value']>;
|
|
3253
3252
|
onChange: NonNullable<SelectProps['onChange']>;
|
|
@@ -3474,7 +3473,7 @@ type MonthNames = [
|
|
|
3474
3473
|
];
|
|
3475
3474
|
type FocusHandler = () => void;
|
|
3476
3475
|
type ChangeHandler$1 = (value: MonthPickerValue) => void;
|
|
3477
|
-
type MonthPickerBaseProps = Omit<FieldGroupBaseProps, 'value' | '
|
|
3476
|
+
type MonthPickerBaseProps = Omit<FieldGroupBaseProps, 'value' | 'aria-describedby' | 'name' | 'autoComplete' | 'secondaryMessage' | 'autoFocus' | 'icon' | 'prefix'> & {
|
|
3478
3477
|
value: MonthPickerValue;
|
|
3479
3478
|
onChange: ChangeHandler$1;
|
|
3480
3479
|
onBlur?: FocusHandler;
|
|
@@ -3535,7 +3534,7 @@ interface PaginationProps {
|
|
|
3535
3534
|
declare const Pagination$1: ({ page, total, linkProps, label, pageLabel, nextLabel, previousLabel, pageLimit, data, ...restProps }: PaginationProps) => JSX.Element;
|
|
3536
3535
|
|
|
3537
3536
|
type InputProps$1 = AllHTMLAttributes<HTMLInputElement>;
|
|
3538
|
-
type PasswordFieldBaseProps = Omit<FieldBaseProps, 'value' | '
|
|
3537
|
+
type PasswordFieldBaseProps = Omit<FieldBaseProps, 'value' | 'secondaryMessage' | 'icon' | 'prefix'> & {
|
|
3539
3538
|
value: NonNullable<InputProps$1['value']>;
|
|
3540
3539
|
onChange: NonNullable<InputProps$1['onChange']>;
|
|
3541
3540
|
onBlur?: InputProps$1['onBlur'];
|
|
@@ -3703,7 +3702,7 @@ type TagProps = {
|
|
|
3703
3702
|
declare const Tag$1: ({ onClear, clearLabel, data, id, icon, children, ...restProps }: TagProps) => JSX.Element;
|
|
3704
3703
|
|
|
3705
3704
|
type NativeTextareaProps = AllHTMLAttributes<HTMLTextAreaElement>;
|
|
3706
|
-
type TextareaBaseProps = Omit<FieldBaseProps, 'value' | '
|
|
3705
|
+
type TextareaBaseProps = Omit<FieldBaseProps, 'value' | 'secondaryMessage' | 'icon' | 'prefix'> & {
|
|
3707
3706
|
value: NonNullable<NativeTextareaProps['value']>;
|
|
3708
3707
|
onChange: NonNullable<NativeTextareaProps['onChange']>;
|
|
3709
3708
|
onBlur?: NativeTextareaProps['onBlur'];
|
|
@@ -3750,7 +3749,7 @@ declare const validTypes: {
|
|
|
3750
3749
|
url: string;
|
|
3751
3750
|
};
|
|
3752
3751
|
type InputProps = AllHTMLAttributes<HTMLInputElement>;
|
|
3753
|
-
type TextFieldBaseProps = Omit<FieldBaseProps, 'value' | '
|
|
3752
|
+
type TextFieldBaseProps = Omit<FieldBaseProps, 'value' | 'secondaryMessage'> & {
|
|
3754
3753
|
value: NonNullable<InputProps['value']>;
|
|
3755
3754
|
type?: keyof typeof validTypes;
|
|
3756
3755
|
inputMode?: InputProps['inputMode'];
|