@rocket.chat/fuselage-forms 1.4.0 → 1.5.0

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.
@@ -71,6 +71,7 @@ const getAriaInvalid = (descriptors) => {
71
71
  }
72
72
  return { 'aria-invalid': 'false' };
73
73
  };
74
+ // Input has id and label is htmlFor
74
75
  const useFieldReferencedByInput = () => {
75
76
  const { id, descriptors, setFieldType } = (0, react_1.useContext)(exports.FieldContext);
76
77
  (0, react_1.useEffect)(() => {
@@ -83,6 +84,7 @@ const useFieldReferencedByInput = () => {
83
84
  }), [descriptors, id]);
84
85
  };
85
86
  exports.useFieldReferencedByInput = useFieldReferencedByInput;
87
+ // label has id and input is aria-labelledby
86
88
  const useFieldReferencedByLabel = () => {
87
89
  const { id, descriptors, setFieldType } = (0, react_1.useContext)(exports.FieldContext);
88
90
  (0, react_1.useEffect)(() => {
@@ -95,6 +97,7 @@ const useFieldReferencedByLabel = () => {
95
97
  }), [descriptors, id]);
96
98
  };
97
99
  exports.useFieldReferencedByLabel = useFieldReferencedByLabel;
100
+ // label has id and input is aria-labelledby + has id for aria-controls
98
101
  const useFieldReferencedByLabelWithId = () => {
99
102
  const { id, descriptors, setFieldType } = (0, react_1.useContext)(exports.FieldContext);
100
103
  (0, react_1.useEffect)(() => {
@@ -108,6 +111,7 @@ const useFieldReferencedByLabelWithId = () => {
108
111
  }), [descriptors, id]);
109
112
  };
110
113
  exports.useFieldReferencedByLabelWithId = useFieldReferencedByLabelWithId;
114
+ // label is rendered visually hidden inside the inputs wrapper label
111
115
  const useFieldWrappedByInputLabel = () => {
112
116
  const { id, label, descriptors, setFieldType, onAction } = (0, react_1.useContext)(exports.FieldContext);
113
117
  (0, react_1.useEffect)(() => {
@@ -1 +1 @@
1
- {"version":3,"file":"FieldContext.js","sourceRoot":"","sources":["../../../src/Field/FieldContext.ts"],"names":[],"mappings":";;;AAAA,gEAAiE;AAEjE,iCAMe;AAcF,QAAA,YAAY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AA,mBAAW,EACT,CAAC,IAAiB,EAAE,EAAE;QACpB,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,OAAO;QACT,CAAC;QAED,QAAQ,CAAC,GAAG,EAAE;YACZ,IAAI,CAAC,KAAK,EAAE,CAAC;YACb,IAAI,CAAC,KAAK,EAAE,CAAC;QACf,CAAC,CAAC,CAAC;IACL,CAAC,EACD,CAAC,QAAQ,CAAC,CACX,CACF,CAAC;IAEF,OAAO,IAAA,eAAO,EACZ,GAAG,EAAE,CAAC;QACJ,KAAK;QACL;YACE,kBAAkB,EAAE,cAAc,CAAC,WAAW,EAAE,EAAE,CAAC;YACnD,IAAI,EAAE,UAAU,CAAC,EAAE,EAAE,WAAW,CAAC;YACjC,GAAG,cAAc,CAAC,WAAW,CAAC;SAC/B;QACD,WAAW;KACZ,EACD,CAAC,KAAK,EAAE,WAAW,EAAE,EAAE,EAAE,WAAW,CAAC,CACtC,CAAC;AACJ,CAAC,CAAC;AA5CW,QAAA,2BAA2B,+BA4CtC"}
@@ -13,6 +13,7 @@ const FieldLabel = (props) => {
13
13
  if (fieldType === 'referencedByInput') {
14
14
  return (0, jsx_runtime_1.jsx)(ReferencedLabel_1.default, { ...props });
15
15
  }
16
+ // referencedByLabel
16
17
  return (0, jsx_runtime_1.jsx)(LabelFor_1.default, { ...props });
17
18
  };
18
19
  exports.default = FieldLabel;
@@ -1 +1 @@
1
- {"version":3,"file":"FieldLabel.js","sourceRoot":"","sources":["../../../../src/Field/Label/FieldLabel.tsx"],"names":[],"mappings":";;;AAGA,kDAAoD;AAEpD,+CAAwC;AACxC,yCAAkC;AAClC,uDAAgD;AAMhD,MAAM,UAAU,GAAG,CAAC,KAAsB,EAAE,EAAE;IAC5C,MAAM,SAAS,GAAG,IAAA,gCAAiB,GAAE,CAAC;IAEtC,IAAI,SAAS,KAAK,gBAAgB,EAAE,CAAC;QACnC,OAAO,uBAAC,qBAAW,OAAK,KAAK,GAAI,CAAC;IACpC,CAAC;IACD,IAAI,SAAS,KAAK,mBAAmB,EAAE,CAAC;QACtC,OAAO,uBAAC,yBAAe,OAAK,KAAK,GAAI,CAAC;IACxC,CAAC;IAED,OAAO,uBAAC,kBAAQ,OAAK,KAAK,GAAI,CAAC;AACjC,CAAC,CAAC;AAEF,kBAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"FieldLabel.js","sourceRoot":"","sources":["../../../../src/Field/Label/FieldLabel.tsx"],"names":[],"mappings":";;;AAGA,kDAAoD;AAEpD,+CAAwC;AACxC,yCAAkC;AAClC,uDAAgD;AAMhD,MAAM,UAAU,GAAG,CAAC,KAAsB,EAAE,EAAE;IAC5C,MAAM,SAAS,GAAG,IAAA,gCAAiB,GAAE,CAAC;IAEtC,IAAI,SAAS,KAAK,gBAAgB,EAAE,CAAC;QACnC,OAAO,uBAAC,qBAAW,OAAK,KAAK,GAAI,CAAC;IACpC,CAAC;IACD,IAAI,SAAS,KAAK,mBAAmB,EAAE,CAAC;QACtC,OAAO,uBAAC,yBAAe,OAAK,KAAK,GAAI,CAAC;IACxC,CAAC;IACD,oBAAoB;IACpB,OAAO,uBAAC,kBAAQ,OAAK,KAAK,GAAI,CAAC;AACjC,CAAC,CAAC;AAEF,kBAAe,UAAU,CAAC"}
@@ -1,90 +1,112 @@
1
1
  import { AutoComplete as AutoCompleteComponent, Slider as SliderComponent } from '@rocket.chat/fuselage';
2
- export declare const TextInput: import("react").ForwardRefExoticComponent<Omit<Omit<import("@rocket.chat/fuselage").InputBoxProps, "type"> & {
3
- addon?: import("react").ReactNode;
4
- error?: string;
5
- } & import("react").RefAttributes<HTMLInputElement>, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
6
- export declare const EmailInput: import("react").ForwardRefExoticComponent<Omit<Omit<import("@rocket.chat/fuselage").InputBoxProps, "type"> & {
7
- addon?: import("react").ReactNode;
8
- error?: string;
9
- } & import("react").RefAttributes<HTMLElement>, "ref"> & import("react").RefAttributes<HTMLElement>>;
10
- export declare const PasswordInput: import("react").ForwardRefExoticComponent<Omit<import("@rocket.chat/fuselage").PasswordInputProps & import("react").RefAttributes<HTMLInputElement>, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
11
- export declare const SearchInput: import("react").ForwardRefExoticComponent<Omit<Omit<import("@rocket.chat/fuselage").InputBoxProps, "type"> & {
12
- addon?: import("react").ReactNode;
13
- error?: string;
14
- } & import("react").RefAttributes<HTMLInputElement>, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
15
- export declare const TextAreaInput: import("react").ForwardRefExoticComponent<Omit<Omit<import("@rocket.chat/fuselage").InputBoxProps, "type"> & {
16
- addon?: import("react").ReactNode;
17
- error?: string;
18
- } & import("react").RefAttributes<HTMLTextAreaElement>, "ref"> & import("react").RefAttributes<HTMLTextAreaElement>>;
19
- export declare const TelephoneInput: import("react").ForwardRefExoticComponent<Omit<Omit<import("@rocket.chat/fuselage").InputBoxProps, "type"> & {
20
- addon?: import("react").ReactNode;
21
- input?: import("react").ReactNode;
22
- error?: string;
23
- } & import("react").RefAttributes<HTMLInputElement>, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
24
- export declare const NumberInput: import("react").ForwardRefExoticComponent<Omit<import("@rocket.chat/fuselage").NumberInputProps & import("react").RefAttributes<HTMLInputElement>, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
25
- export declare const UrlInput: import("react").ForwardRefExoticComponent<Omit<import("@rocket.chat/fuselage").UrlInputProps & import("react").RefAttributes<HTMLElement>, "ref"> & import("react").RefAttributes<HTMLElement>>;
26
- export declare const Select: import("react").ForwardRefExoticComponent<Omit<Omit<import("react-aria").AriaSelectProps<object>, "children" | "value" | "onChange"> & {
27
- error?: string;
28
- placeholder?: string;
29
- value?: import("react").Key | null | undefined;
30
- onChange?: ((key: import("react").Key) => any) | undefined;
31
- options: import("@rocket.chat/fuselage").SelectOption[];
32
- small?: boolean;
33
- } & Omit<import("react").AllHTMLAttributes<HTMLElement>, "value" | "onChange"> & import("react").RefAttributes<HTMLElement>, "ref"> & import("react").RefAttributes<HTMLElement>>;
2
+ export declare const TextInput: {
3
+ (props: import("@rocket.chat/fuselage").TextInputProps & import("react").RefAttributes<any>): import("react").JSX.Element;
4
+ displayName: string;
5
+ };
6
+ export declare const EmailInput: {
7
+ (props: import("@rocket.chat/fuselage").EmailInputProps & import("react").RefAttributes<HTMLInputElement>): import("react").JSX.Element;
8
+ displayName: string;
9
+ };
10
+ export declare const PasswordInput: {
11
+ (props: import("@rocket.chat/fuselage").PasswordInputProps & import("react").RefAttributes<HTMLInputElement>): import("react").JSX.Element;
12
+ displayName: string;
13
+ };
14
+ export declare const SearchInput: {
15
+ (props: import("@rocket.chat/fuselage").SearchInputProps & import("react").RefAttributes<HTMLInputElement>): import("react").JSX.Element;
16
+ displayName: string;
17
+ };
18
+ export declare const TextAreaInput: {
19
+ (props: import("@rocket.chat/fuselage").TextAreaInputProps & import("react").RefAttributes<HTMLTextAreaElement>): import("react").JSX.Element;
20
+ displayName: string;
21
+ };
22
+ export declare const NumberInput: {
23
+ (props: import("@rocket.chat/fuselage").NumberInputProps & import("react").RefAttributes<HTMLInputElement>): import("react").JSX.Element;
24
+ displayName: string;
25
+ };
26
+ export declare const UrlInput: {
27
+ (props: import("@rocket.chat/fuselage").UrlInputProps & import("react").RefAttributes<HTMLInputElement>): import("react").JSX.Element;
28
+ displayName: string;
29
+ };
30
+ export declare const Select: {
31
+ (props: Omit<import("react-aria").AriaSelectProps<unknown>, "children" | "value" | "onChange"> & import("react").RefAttributes<HTMLElement> & {
32
+ error?: string;
33
+ placeholder?: string;
34
+ value?: import("react").Key | null | undefined;
35
+ onChange?: ((key: import("react").Key) => any) | undefined;
36
+ options: import("@rocket.chat/fuselage").SelectOption[];
37
+ small?: boolean;
38
+ } & Omit<import("react").AllHTMLAttributes<HTMLElement>, "value" | "onChange">): import("react").JSX.Element;
39
+ displayName: string;
40
+ };
34
41
  export declare const AutoComplete: typeof AutoCompleteComponent;
35
- export declare const MultiSelect: import("react").ForwardRefExoticComponent<Omit<Omit<import("@rocket.chat/fuselage").BoxProps, "value" | "onChange"> & {
36
- value?: import("@rocket.chat/fuselage").SelectOption[0][];
37
- error?: string;
38
- options: import("@rocket.chat/fuselage").SelectOption[];
39
- onChange: (params: import("@rocket.chat/fuselage").SelectOption[0][]) => void;
40
- getLabel?: (params: import("@rocket.chat/fuselage").SelectOption) => import("@rocket.chat/fuselage").SelectOption[1];
41
- getValue?: (params: import("@rocket.chat/fuselage").SelectOption) => import("@rocket.chat/fuselage").SelectOption[0];
42
- customEmpty?: string;
43
- anchor?: import("react").ElementType<import("@rocket.chat/fuselage").MultiSelectAnchorParams> | ((params: import("@rocket.chat/fuselage").MultiSelectAnchorParams) => import("react").ReactNode);
44
- renderOptions?: import("react").ElementType;
45
- renderItem?: import("react").ElementType;
46
- renderSelected?: import("react").ElementType<{
47
- value: import("@rocket.chat/fuselage").SelectOption[0];
48
- label: import("@rocket.chat/fuselage").SelectOption[1];
49
- onMouseDown: import("react").MouseEventHandler;
50
- children: import("react").ReactNode;
51
- }>;
52
- addonIcon?: import("@rocket.chat/fuselage").IconProps["name"];
53
- setFilter?: (filter: string) => void;
54
- } & import("react").RefAttributes<HTMLInputElement>, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
55
- export declare const MultiSelectFiltered: import("react").ForwardRefExoticComponent<Omit<Omit<import("@rocket.chat/fuselage").BoxProps, "value" | "onChange"> & {
56
- value?: import("@rocket.chat/fuselage").SelectOption[0][];
57
- error?: string;
58
- options: import("@rocket.chat/fuselage").SelectOption[];
59
- onChange: (params: import("@rocket.chat/fuselage").SelectOption[0][]) => void;
60
- getLabel?: (params: import("@rocket.chat/fuselage").SelectOption) => import("@rocket.chat/fuselage").SelectOption[1];
61
- getValue?: (params: import("@rocket.chat/fuselage").SelectOption) => import("@rocket.chat/fuselage").SelectOption[0];
62
- customEmpty?: string;
63
- anchor?: import("react").ElementType<import("@rocket.chat/fuselage").MultiSelectAnchorParams> | ((params: import("@rocket.chat/fuselage").MultiSelectAnchorParams) => import("react").ReactNode);
64
- renderOptions?: import("react").ElementType;
65
- renderItem?: import("react").ElementType;
66
- renderSelected?: import("react").ElementType<{
67
- value: import("@rocket.chat/fuselage").SelectOption[0];
68
- label: import("@rocket.chat/fuselage").SelectOption[1];
69
- onMouseDown: import("react").MouseEventHandler;
70
- children: import("react").ReactNode;
71
- }>;
72
- addonIcon?: import("@rocket.chat/fuselage").IconProps["name"];
73
- setFilter?: (filter: string) => void;
74
- } & {
75
- filter?: string;
76
- setFilter?: import("react").Dispatch<import("react").SetStateAction<string>>;
77
- addonIcon?: import("@rocket.chat/fuselage").IconProps["name"];
78
- } & import("react").RefAttributes<HTMLInputElement>, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
42
+ export declare const MultiSelect: {
43
+ (props: Omit<import("@rocket.chat/fuselage").BoxProps, "ref" | "value" | "onChange"> & import("react").RefAttributes<HTMLInputElement> & {
44
+ value?: import("@rocket.chat/fuselage").SelectOption[0][];
45
+ error?: string;
46
+ options: import("@rocket.chat/fuselage").SelectOption[];
47
+ onChange: (params: import("@rocket.chat/fuselage").SelectOption[0][]) => void;
48
+ getLabel?: (params: import("@rocket.chat/fuselage").SelectOption) => import("@rocket.chat/fuselage").SelectOption[1];
49
+ getValue?: (params: import("@rocket.chat/fuselage").SelectOption) => import("@rocket.chat/fuselage").SelectOption[0];
50
+ customEmpty?: string;
51
+ anchor?: import("react").ElementType<import("@rocket.chat/fuselage").MultiSelectAnchorParams>;
52
+ renderOptions?: import("react").ElementType;
53
+ renderItem?: import("react").ElementType;
54
+ renderSelected?: import("react").ElementType<{
55
+ value: import("@rocket.chat/fuselage").SelectOption[0];
56
+ label: import("@rocket.chat/fuselage").SelectOption[1];
57
+ onMouseDown: import("react").MouseEventHandler;
58
+ children: import("react").ReactNode;
59
+ }>;
60
+ addonIcon?: import("@rocket.chat/fuselage").IconProps["name"];
61
+ setFilter?: (filter: string) => void;
62
+ }): import("react").JSX.Element;
63
+ displayName: string;
64
+ };
65
+ export declare const MultiSelectFiltered: {
66
+ (props: Omit<import("@rocket.chat/fuselage").BoxProps, "ref" | "value" | "onChange"> & import("react").RefAttributes<HTMLInputElement> & {
67
+ value?: import("@rocket.chat/fuselage").SelectOption[0][];
68
+ error?: string;
69
+ options: import("@rocket.chat/fuselage").SelectOption[];
70
+ onChange: (params: import("@rocket.chat/fuselage").SelectOption[0][]) => void;
71
+ getLabel?: (params: import("@rocket.chat/fuselage").SelectOption) => import("@rocket.chat/fuselage").SelectOption[1];
72
+ getValue?: (params: import("@rocket.chat/fuselage").SelectOption) => import("@rocket.chat/fuselage").SelectOption[0];
73
+ customEmpty?: string;
74
+ anchor?: import("react").ElementType<import("@rocket.chat/fuselage").MultiSelectAnchorParams>;
75
+ renderOptions?: import("react").ElementType;
76
+ renderItem?: import("react").ElementType;
77
+ renderSelected?: import("react").ElementType<{
78
+ value: import("@rocket.chat/fuselage").SelectOption[0];
79
+ label: import("@rocket.chat/fuselage").SelectOption[1];
80
+ onMouseDown: import("react").MouseEventHandler;
81
+ children: import("react").ReactNode;
82
+ }>;
83
+ addonIcon?: import("@rocket.chat/fuselage").IconProps["name"];
84
+ setFilter?: (filter: string) => void;
85
+ } & {
86
+ filter?: string;
87
+ setFilter?: import("react").Dispatch<import("react").SetStateAction<string>>;
88
+ addonIcon?: import("@rocket.chat/fuselage").IconProps["name"];
89
+ }): import("react").JSX.Element;
90
+ displayName: string;
91
+ };
79
92
  export declare const Slider: typeof SliderComponent;
80
- export declare const CheckBox: import("react").ForwardRefExoticComponent<Omit<import("@rocket.chat/fuselage").BoxProps & {
81
- indeterminate?: boolean;
82
- labelChildren?: import("react").ReactNode;
83
- } & import("react").AllHTMLAttributes<HTMLInputElement> & import("react").RefAttributes<HTMLInputElement>, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
84
- export declare const ToggleSwitch: import("react").ForwardRefExoticComponent<Omit<import("@rocket.chat/fuselage").BoxProps & import("react").AllHTMLAttributes<HTMLInputElement> & {
85
- labelChildren?: import("react").ReactNode;
86
- } & import("react").RefAttributes<HTMLInputElement>, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
87
- export declare const RadioButton: import("react").ForwardRefExoticComponent<Omit<import("@rocket.chat/fuselage").BoxProps & import("react").AllHTMLAttributes<HTMLInputElement> & {
88
- labelChildren?: import("react").ReactNode;
89
- } & import("react").RefAttributes<HTMLInputElement>, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
93
+ export declare const CheckBox: {
94
+ (props: Omit<import("@rocket.chat/fuselage").BoxProps, "ref"> & import("react").RefAttributes<HTMLInputElement> & {
95
+ indeterminate?: boolean;
96
+ labelChildren?: import("react").ReactNode;
97
+ } & import("react").AllHTMLAttributes<HTMLInputElement>): import("react").JSX.Element;
98
+ displayName: string;
99
+ };
100
+ export declare const ToggleSwitch: {
101
+ (props: Omit<import("@rocket.chat/fuselage").BoxProps, "ref"> & import("react").RefAttributes<HTMLInputElement> & import("react").AllHTMLAttributes<HTMLInputElement> & {
102
+ labelChildren?: import("react").ReactNode;
103
+ }): import("react").JSX.Element;
104
+ displayName: string;
105
+ };
106
+ export declare const RadioButton: {
107
+ (props: Omit<import("@rocket.chat/fuselage").BoxProps, "ref"> & import("react").RefAttributes<HTMLInputElement> & import("react").AllHTMLAttributes<HTMLInputElement> & {
108
+ labelChildren?: import("react").ReactNode;
109
+ }): import("react").JSX.Element;
110
+ displayName: string;
111
+ };
90
112
  //# sourceMappingURL=WrappedInputComponents.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"WrappedInputComponents.d.ts","sourceRoot":"","sources":["../../../src/Inputs/WrappedInputComponents.ts"],"names":[],"mappings":"AAAA,OAAO,EAaL,YAAY,IAAI,qBAAqB,EAGrC,MAAM,IAAI,eAAe,EAC1B,MAAM,uBAAuB,CAAC;AAY/B,eAAO,MAAM,SAAS;;;8GAAkC,CAAC;AACzD,eAAO,MAAM,UAAU;;;oGAAmC,CAAC;AAC3D,eAAO,MAAM,aAAa,gNAAsC,CAAC;AACjE,eAAO,MAAM,WAA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AAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;CAE/B,CAAC;AACF,eAAO,MAAM,MAAM,EAEd,OAAO,eAAe,CAAC;AAG5B,eAAO,MAAM,QAAQ;;;;;;CAA6C,CAAC;AACnE,eAAO,MAAM,YAAY;;;;;CAAiD,CAAC;AAC3E,eAAO,MAAM,WAAW;;;;;CAAgD,CAAC"}
@@ -1,21 +1,25 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RadioButton = exports.ToggleSwitch = exports.CheckBox = exports.Slider = exports.MultiSelectFiltered = exports.MultiSelect = exports.AutoComplete = exports.Select = exports.UrlInput = exports.NumberInput = exports.TelephoneInput = exports.TextAreaInput = exports.SearchInput = exports.PasswordInput = exports.EmailInput = exports.TextInput = void 0;
3
+ exports.RadioButton = exports.ToggleSwitch = exports.CheckBox = exports.Slider = exports.MultiSelectFiltered = exports.MultiSelect = exports.AutoComplete = exports.Select = exports.UrlInput = exports.NumberInput = exports.TextAreaInput = exports.SearchInput = exports.PasswordInput = exports.EmailInput = exports.TextInput = void 0;
4
4
  const fuselage_1 = require("@rocket.chat/fuselage");
5
5
  const withLabelHelpers_1 = require("./withLabelHelpers");
6
+ // TODO: Some inputs are still not supported due to requiring a different a11y approach
7
+ // with id
6
8
  exports.TextInput = (0, withLabelHelpers_1.withLabelId)(fuselage_1.TextInput);
7
9
  exports.EmailInput = (0, withLabelHelpers_1.withLabelId)(fuselage_1.EmailInput);
8
10
  exports.PasswordInput = (0, withLabelHelpers_1.withLabelId)(fuselage_1.PasswordInput);
9
11
  exports.SearchInput = (0, withLabelHelpers_1.withLabelId)(fuselage_1.SearchInput);
10
12
  exports.TextAreaInput = (0, withLabelHelpers_1.withLabelId)(fuselage_1.TextAreaInput);
11
- exports.TelephoneInput = (0, withLabelHelpers_1.withLabelId)(fuselage_1.TelephoneInput);
12
13
  exports.NumberInput = (0, withLabelHelpers_1.withLabelId)(fuselage_1.NumberInput);
13
14
  exports.UrlInput = (0, withLabelHelpers_1.withLabelId)(fuselage_1.UrlInput);
15
+ // with aria-labelledby
14
16
  exports.Select = (0, withLabelHelpers_1.withAriaLabelledBy)(fuselage_1.Select);
17
+ // with aria-labelledby + id for aria-controls
15
18
  exports.AutoComplete = (0, withLabelHelpers_1.withAriaLabelledByAndId)((fuselage_1.AutoComplete));
16
19
  exports.MultiSelect = (0, withLabelHelpers_1.withAriaLabelledByAndId)(fuselage_1.MultiSelect);
17
20
  exports.MultiSelectFiltered = (0, withLabelHelpers_1.withAriaLabelledByAndId)(fuselage_1.MultiSelectFiltered);
18
21
  exports.Slider = (0, withLabelHelpers_1.withAriaLabelledBy)(fuselage_1.Slider);
22
+ // with visually hidden label
19
23
  exports.CheckBox = (0, withLabelHelpers_1.withVisuallyHiddenLabel)(fuselage_1.CheckBox);
20
24
  exports.ToggleSwitch = (0, withLabelHelpers_1.withVisuallyHiddenLabel)(fuselage_1.ToggleSwitch);
21
25
  exports.RadioButton = (0, withLabelHelpers_1.withVisuallyHiddenLabel)(fuselage_1.RadioButton);
@@ -1 +1 @@
1
- {"version":3,"file":"WrappedInputComponents.js","sourceRoot":"","sources":["../../../src/Inputs/WrappedInputComponents.ts"],"names":[],"mappings":";;;AAAA,oDAiB+B;AAE/B,yDAK4B;AAKf,QAAA,SAAS,GAAG,IAAA,8BAAW,EAAC,oBAAkB,CAAC,CAAC;AAC5C,QAAA,UAAU,GAAG,IAAA,8BAAW,EAAC,qBAAmB,CAAC,CAAC;AAC9C,QAAA,aAAa,GAAG,IAAA,8BAAW,EAAC,wBAAsB,CAAC,CAAC;AACpD,QAAA,WAAW,GAAG,IAAA,8BAAW,EAAC,sBAAoB,CAAC,CAAC;AAChD,QAAA,aAAa,GAAG,IAAA,8BAAW,EAAC,wBAAiB,CAAC,CAAC;AAC/C,QAAA,cAAc,GAAG,IAAA,8BAAW,EAAC,yBAAuB,CAAC,CAAC;AACtD,QAAA,WAAW,GAAG,IAAA,8BAAW,EAAC,sBAAoB,C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ACV,QAAA,MAAM,GAAG,IAAA,qCAAkB,EAAC,iBAAe,CAAC,CAAC;AAE1D,8CAA8C;AACjC,QAAA,YAAY,GAAG,IAAA,0CAAuB,EACjD,CAAA,uBAA0B,CAAA,CACK,CAAC;AACrB,QAAA,WAAW,GAAG,IAAA,0CAAuB,EAAC,sBAAoB,CAAC,CAAC;AAC5D,QAAA,mBAAmB,GAAG,IAAA,0CAAuB,EACxD,8BAA4B,CAC7B,CAAC;AACW,QAAA,MAAM,GAAG,IAAA,qCAAkB,EACtC,iBAAe,CACU,CAAC;AAE5B,6BAA6B;AAChB,QAAA,QAAQ,GAAG,IAAA,0CAAuB,EAAC,mBAAiB,CAAC,CAAC;AACtD,QAAA,YAAY,GAAG,IAAA,0CAAuB,EAAC,uBAAqB,CAAC,CAAC;AAC9D,QAAA,WAAW,GAAG,IAAA,0CAAuB,EAAC,sBAAoB,CAAC,CAAC"}
@@ -2,19 +2,31 @@ import type { ReactNode, ComponentType, RefAttributes } from 'react';
2
2
  type WithLabelId = {
3
3
  id?: string;
4
4
  };
5
- declare function withLabelId<TProps, TRef>(Component: ComponentType<TProps & WithLabelId & RefAttributes<TRef>>): import("react").ForwardRefExoticComponent<import("react").PropsWithoutRef<TProps> & RefAttributes<TRef>>;
5
+ declare function withLabelId<TProps, TRef>(Component: ComponentType<TProps & WithLabelId & RefAttributes<TRef>>): {
6
+ (props: TProps & RefAttributes<TRef>): import("react").JSX.Element;
7
+ displayName: string;
8
+ };
6
9
  type WithLabelledBy = {
7
10
  'aria-labelledby'?: string;
8
11
  };
9
- declare function withAriaLabelledBy<TProps, TRef>(Component: ComponentType<TProps & WithLabelledBy & RefAttributes<TRef>>): import("react").ForwardRefExoticComponent<import("react").PropsWithoutRef<TProps> & RefAttributes<TRef>>;
12
+ declare function withAriaLabelledBy<TProps, TRef>(Component: ComponentType<TProps & WithLabelledBy & RefAttributes<TRef>>): {
13
+ (props: TProps & RefAttributes<TRef>): import("react").JSX.Element;
14
+ displayName: string;
15
+ };
10
16
  type WithLabelledByAndId = {
11
17
  'aria-labelledby'?: string;
12
18
  'id'?: string;
13
19
  };
14
- declare function withAriaLabelledByAndId<TProps, TRef>(Component: ComponentType<TProps & WithLabelledByAndId & RefAttributes<TRef>>): import("react").ForwardRefExoticComponent<import("react").PropsWithoutRef<TProps> & RefAttributes<TRef>>;
20
+ declare function withAriaLabelledByAndId<TProps, TRef>(Component: ComponentType<TProps & WithLabelledByAndId & RefAttributes<TRef>>): {
21
+ (props: TProps & RefAttributes<TRef>): import("react").JSX.Element;
22
+ displayName: string;
23
+ };
15
24
  type WithChildrenLabel = {
16
25
  labelChildren: ReactNode;
17
26
  };
18
- declare function withVisuallyHiddenLabel<TProps, TRef>(Component: ComponentType<TProps & WithChildrenLabel & RefAttributes<TRef>>): import("react").ForwardRefExoticComponent<import("react").PropsWithoutRef<TProps> & RefAttributes<TRef>>;
27
+ declare function withVisuallyHiddenLabel<TProps, TRef>(Component: ComponentType<TProps & WithChildrenLabel & RefAttributes<TRef>>): {
28
+ (props: TProps & RefAttributes<TRef>): import("react").JSX.Element;
29
+ displayName: string;
30
+ };
19
31
  export { withLabelId, withAriaLabelledBy, withAriaLabelledByAndId, withVisuallyHiddenLabel, };
20
32
  //# sourceMappingURL=withLabelHelpers.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"withLabelHelpers.d.ts","sourceRoot":"","sources":["../../../src/Inputs/withLabelHelpers.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAO,aAAa,EAAE,MAAM,OAAO,CAAC;AAW1E,KAAK,WAAW,GAAG;IAAE,EAAE,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAEnC,iBAAS,WAAW,CAAC,MAAM,EAAE,IAAI,EAC/B,SAAS,EAAE,aAAa,CAAC,MAAM,GAAG,WAAW,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC,4GAgBrE;AAED,KAAK,cAAc,GAAG;IAAE,iBAAiB,CAA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BAAkB,CAAC,MAAM,EAAE,IAAI,EACtC,SAAS,EAAE,aAAa,CAAC,MAAM,GAAG,cAAc,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC;YAEtC,MAAM,GAAG,aAAa,CAAC,IAAI,CAAC;;EAQ9D;AAED,KAAK,mBAAmB,GAAG;IAAE,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAEzE,iBAAS,uBAAuB,CAAC,MAAM,EAAE,IAAI,EAC3C,SAAS,EAAE,aAAa,CAAC,MAAM,GAAG,mBAAmB,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC;YAE3C,MAAM,GAAG,aAAa,CAAC,IAAI,CAAC;;EAQ9D;AAED,KAAK,iBAAiB,GAAG;IAAE,aAAa,EAAE,SAAS,CAAA;CAAE,CAAC;AAEtD,iBAAS,uBAAuB,CAAC,MAAM,EAAE,IAAI,EAC3C,SAAS,EAAE,aAAa,CAAC,MAAM,GAAG,iBAAiB,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC;YAEzC,MAAM,GAAG,aAAa,CAAC,IAAI,CAAC;;EAgB9D;AAED,OAAO,EACL,WAAW,EACX,kBAAkB,EAClB,uBAAuB,EACvB,uBAAuB,GACxB,CAAC"}
@@ -5,40 +5,41 @@ exports.withAriaLabelledBy = withAriaLabelledBy;
5
5
  exports.withAriaLabelledByAndId = withAriaLabelledByAndId;
6
6
  exports.withVisuallyHiddenLabel = withVisuallyHiddenLabel;
7
7
  const jsx_runtime_1 = require("react/jsx-runtime");
8
+ // Disabled this flag since we need to wrap multiple components
9
+ /* eslint-disable react/no-multi-comp */
8
10
  const fuselage_hooks_1 = require("@rocket.chat/fuselage-hooks");
9
- const react_1 = require("react");
10
11
  const react_aria_1 = require("react-aria");
11
12
  const FieldContext_1 = require("../Field/FieldContext");
12
13
  function withLabelId(Component) {
13
- const WrappedComponent = (0, react_1.forwardRef)(function (props, ref) {
14
+ function WrappedComponent(props) {
14
15
  const labelProps = (0, FieldContext_1.useFieldReferencedByInput)();
15
- return ((0, jsx_runtime_1.jsx)(Component, { ...props, ...labelProps, ref: ref }));
16
- });
16
+ return (0, jsx_runtime_1.jsx)(Component, { ...props, ...labelProps });
17
+ }
17
18
  WrappedComponent.displayName = `withLabelId(${Component.displayName ?? Component.name ?? 'InputComponent'})`;
18
19
  return WrappedComponent;
19
20
  }
20
21
  function withAriaLabelledBy(Component) {
21
- const WrappedComponent = (0, react_1.forwardRef)(function (props, ref) {
22
+ function WrappedComponent(props) {
22
23
  const labelProps = (0, FieldContext_1.useFieldReferencedByLabel)();
23
- return ((0, jsx_runtime_1.jsx)(Component, { ...props, ...labelProps, ref: ref }));
24
- });
24
+ return (0, jsx_runtime_1.jsx)(Component, { ...props, ...labelProps });
25
+ }
25
26
  WrappedComponent.displayName = `withAriaLabelledBy(${Component.displayName ?? Component.name ?? 'InputComponent'})`;
26
27
  return WrappedComponent;
27
28
  }
28
29
  function withAriaLabelledByAndId(Component) {
29
- const WrappedComponent = (0, react_1.forwardRef)(function (props, ref) {
30
+ function WrappedComponent(props) {
30
31
  const labelProps = (0, FieldContext_1.useFieldReferencedByLabelWithId)();
31
- return ((0, jsx_runtime_1.jsx)(Component, { ...props, ...labelProps, ref: ref }));
32
- });
32
+ return (0, jsx_runtime_1.jsx)(Component, { ...props, ...labelProps });
33
+ }
33
34
  WrappedComponent.displayName = `withAriaLabelledByAndId(${Component.displayName ?? Component.name ?? 'InputComponent'})`;
34
35
  return WrappedComponent;
35
36
  }
36
37
  function withVisuallyHiddenLabel(Component) {
37
- const WrappedComponent = (0, react_1.forwardRef)(function (props, ref) {
38
+ function WrappedComponent(props) {
38
39
  const [label, labelProps, labelRef] = (0, FieldContext_1.useFieldWrappedByInputLabel)();
39
- const mergedRef = (0, fuselage_hooks_1.useMergedRefs)(ref, labelRef);
40
+ const mergedRef = (0, fuselage_hooks_1.useMergedRefs)(props.ref, labelRef);
40
41
  return ((0, jsx_runtime_1.jsx)(Component, { ...props, ...labelProps, ref: mergedRef, labelChildren: (0, jsx_runtime_1.jsx)(react_aria_1.VisuallyHidden, { children: label }) }));
41
- });
42
+ }
42
43
  WrappedComponent.displayName = `withVisuallyHiddenLabel(${Component.displayName ?? Component.name ?? 'InputComponent'})`;
43
44
  return WrappedComponent;
44
45
  }
@@ -1 +1 @@
1
- {"version":3,"file":"withLabelHelpers.js","sourceRoot":"","sources":["../../../src/Inputs/withLabelHelpers.tsx"],"names":[],"mappings":";;AAqGE,kCAAW;AACX,gDAAkB;AAClB,0DAAuB;AACvB,0DAAuB;;AAtGzB,gEAA4D;AAE5D,iCAAmC;AACnC,2CAA4C;AAE5C,wDAK+B;AAI/B,SAAS,WAAW,CAClB,SAAoE;IAEpE,MAAM,gBAAgB,GAAG,IAAA,kBAAU,EAAe,UAAU,KAAK,EAAE,GAAG;QACpE,MAAM,UAAU,GAAG,IAAA,wCAAyB,GAAE,CAAC;QAC/C,OAAO,CACL,uBAAC,SAAS,OACH,KAA8B,KAC/B,UAAU,EACd,GAAG,EAAE,GAAG,GACR,CACH,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,gBAAgB,CAAC,WAAW,GAAG,eAAe,SAAS,CAAC,WAAW,IAAI,SAAS,CAAC,IAAI,IAAI,gBAAgB,GAAG,CAAC;IAE7G,OAAO,gBAAgB,CAAC;AAC1B,CAAC;AAID,SAAS,kBAAkB,CACzB,SAAuE;IAEvE,MAAM,gBAAgB,GAAG,IAAA,kBAAU,EAAe,UAAU,KAAK,EAAE,GAAG;QACpE,MAAM,UAAU,GAAG,IAAA,wCAAyB,GAAE,CAAC;QAC/C,OAAO,CACL,uBAAC,SAAS,OACH,KAAiC,KAClC,UAAU,EACd,GAAG,EAAE,GAAG,GACR,CACH,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,gBAAgB,CAAC,WAAW,GAAG,sBAAsB,SAAS,CAAC,WAAW,IAAI,SAAS,CAAC,IAAI,IAAI,gBAAgB,GAAG,CAAC;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E,MAAM,SAAS,GAAG,IAAA,8BAAa,EAAC,KAAK,CAAC,GAAG,EAAE,QAAqB,CAAC,CAAC;QAClE,OAAO,CACL,uBAAC,SAAS,OACJ,KAAK,KACL,UAAU,EACd,GAAG,EAAE,SAAS,EACd,aAAa,EAAE,uBAAC,2BAAc,cAAE,KAAK,GAAkB,GACvD,CACH,CAAC;IACJ,CAAC;IAED,gBAAgB,CAAC,WAAW,GAAG,2BAA2B,SAAS,CAAC,WAAW,IAAI,SAAS,CAAC,IAAI,IAAI,gBAAgB,GAAG,CAAC;IAEzH,OAAO,gBAAgB,CAAC;AAC1B,CAAC"}
@@ -71,6 +71,7 @@ const getAriaInvalid = (descriptors) => {
71
71
  }
72
72
  return { 'aria-invalid': 'false' };
73
73
  };
74
+ // Input has id and label is htmlFor
74
75
  const useFieldReferencedByInput = () => {
75
76
  const { id, descriptors, setFieldType } = (0, react_1.useContext)(exports.FieldContext);
76
77
  (0, react_1.useEffect)(() => {
@@ -83,6 +84,7 @@ const useFieldReferencedByInput = () => {
83
84
  }), [descriptors, id]);
84
85
  };
85
86
  exports.useFieldReferencedByInput = useFieldReferencedByInput;
87
+ // label has id and input is aria-labelledby
86
88
  const useFieldReferencedByLabel = () => {
87
89
  const { id, descriptors, setFieldType } = (0, react_1.useContext)(exports.FieldContext);
88
90
  (0, react_1.useEffect)(() => {
@@ -95,6 +97,7 @@ const useFieldReferencedByLabel = () => {
95
97
  }), [descriptors, id]);
96
98
  };
97
99
  exports.useFieldReferencedByLabel = useFieldReferencedByLabel;
100
+ // label has id and input is aria-labelledby + has id for aria-controls
98
101
  const useFieldReferencedByLabelWithId = () => {
99
102
  const { id, descriptors, setFieldType } = (0, react_1.useContext)(exports.FieldContext);
100
103
  (0, react_1.useEffect)(() => {
@@ -108,6 +111,7 @@ const useFieldReferencedByLabelWithId = () => {
108
111
  }), [descriptors, id]);
109
112
  };
110
113
  exports.useFieldReferencedByLabelWithId = useFieldReferencedByLabelWithId;
114
+ // label is rendered visually hidden inside the inputs wrapper label
111
115
  const useFieldWrappedByInputLabel = () => {
112
116
  const { id, label, descriptors, setFieldType, onAction } = (0, react_1.useContext)(exports.FieldContext);
113
117
  (0, react_1.useEffect)(() => {
@@ -1 +1 @@
1
- {"version":3,"file":"FieldContext.js","sourceRoot":"","sources":["../../../src/Field/FieldContext.ts"],"names":[],"mappings":";;;AAAA,gEAAiE;AAEjE,iCAMe;AAcF,QAAA,YAAY,GAAG,IAAA,qBAAa,EAAoB;IAC3D,aAAa,EAAE,GAAG,EAAE,GAAE,CAAC;IACvB,QAAQ,EAAE,GAAG,EAAE,GAAE,CAAC;IAClB,WAAW,EAAE,IAAI,GAAG,EAAE;IACtB,KAAK,EAAE,IAAI;IACX,EAAE,EAAE,EAAE;IACN,SAAS,EAAE,mBAAmB;IAC9B,YAAY,EAAE,GAAG,EAAE,GAAE,CAAC;IACtB,UAAU,EAAE,GAAG,EAAE,GAAE,CAAC;IACpB,QAAQ,EAAE,GAAG,EAAE,GAAE,CAAC;CACnB,CAAC,CAAC;AASH,MAAM,eAAe,GAAG,CAAC,IAAiB,EAAE,EAAE;IAC5C,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;QACtB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,IAAI,GAAG,EAAE,CAAC;IAChB,MAAM,UAAU,GAAG,IAAI,CAAC,aAAa,CAAC,gBAAgB,CACpD,IAAI,EACJ,UAAU,CAAC,SAAS,CACrB,CAAC;IAEF,OAAO,UAAU,CAAC,QAAQ,EAAE,EAAE,CAAC;QAC7B,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;IAChD,CAAC;IAED,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACxB,CAAC,CAAC;AAEK,MAAM,aAAa,GAAG,GAAuC,EAAE;IACpE,MAAM,EAAE,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,GAAG,IAAA,kBAAU,EA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AAE,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,QAAQ,EAAE,GACtD,IAAA,kBAAU,EAAC,oBAAY,CAAC,CAAC;IAE3B,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,YAAY,CAAC,gBAAgB,CAAC,CAAC;IACjC,CAAC,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC;IAEnB,MAAM,WAAW,GAAG,IAAA,mCAAkB,EACpC,IAAA,mBAAW,EACT,CAAC,IAAiB,EAAE,EAAE;QACpB,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,OAAO;QACT,CAAC;QAED,QAAQ,CAAC,GAAG,EAAE;YACZ,IAAI,CAAC,KAAK,EAAE,CAAC;YACb,IAAI,CAAC,KAAK,EAAE,CAAC;QACf,CAAC,CAAC,CAAC;IACL,CAAC,EACD,CAAC,QAAQ,CAAC,CACX,CACF,CAAC;IAEF,OAAO,IAAA,eAAO,EACZ,GAAG,EAAE,CAAC;QACJ,KAAK;QACL;YACE,kBAAkB,EAAE,cAAc,CAAC,WAAW,EAAE,EAAE,CAAC;YACnD,IAAI,EAAE,UAAU,CAAC,EAAE,EAAE,WAAW,CAAC;YACjC,GAAG,cAAc,CAAC,WAAW,CAAC;SAC/B;QACD,WAAW;KACZ,EACD,CAAC,KAAK,EAAE,WAAW,EAAE,EAAE,EAAE,WAAW,CAAC,CACtC,CAAC;AACJ,CAAC,CAAC;AA5CW,QAAA,2BAA2B,+BA4CtC"}
@@ -16,6 +16,7 @@ const FieldLabel = (props) => {
16
16
  if (fieldType === 'referencedByInput') {
17
17
  return (0, jsx_runtime_1.jsx)(ReferencedLabel_1.default, { ...props });
18
18
  }
19
+ // referencedByLabel
19
20
  return (0, jsx_runtime_1.jsx)(LabelFor_1.default, { ...props });
20
21
  };
21
22
  exports.default = FieldLabel;
@@ -1 +1 @@
1
- {"version":3,"file":"FieldLabel.js","sourceRoot":"","sources":["../../../../src/Field/Label/FieldLabel.tsx"],"names":[],"mappings":";;;;;;AAGA,kDAAoD;AAEpD,gEAAwC;AACxC,0DAAkC;AAClC,wEAAgD;AAMhD,MAAM,UAAU,GAAG,CAAC,KAAsB,EAAE,EAAE;IAC5C,MAAM,SAAS,GAAG,IAAA,gCAAiB,GAAE,CAAC;IAEtC,IAAI,SAAS,KAAK,gBAAgB,EAAE,CAAC;QACnC,OAAO,uBAAC,qBAAW,OAAK,KAAK,GAAI,CAAC;IACpC,CAAC;IACD,IAAI,SAAS,KAAK,mBAAmB,EAAE,CAAC;QACtC,OAAO,uBAAC,yBAAe,OAAK,KAAK,GAAI,CAAC;IACxC,CAAC;IAED,OAAO,uBAAC,kBAAQ,OAAK,KAAK,GAAI,CAAC;AACjC,CAAC,CAAC;AAEF,kBAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"FieldLabel.js","sourceRoot":"","sources":["../../../../src/Field/Label/FieldLabel.tsx"],"names":[],"mappings":";;;;;;AAGA,kDAAoD;AAEpD,gEAAwC;AACxC,0DAAkC;AAClC,wEAAgD;AAMhD,MAAM,UAAU,GAAG,CAAC,KAAsB,EAAE,EAAE;IAC5C,MAAM,SAAS,GAAG,IAAA,gCAAiB,GAAE,CAAC;IAEtC,IAAI,SAAS,KAAK,gBAAgB,EAAE,CAAC;QACnC,OAAO,uBAAC,qBAAW,OAAK,KAAK,GAAI,CAAC;IACpC,CAAC;IACD,IAAI,SAAS,KAAK,mBAAmB,EAAE,CAAC;QACtC,OAAO,uBAAC,yBAAe,OAAK,KAAK,GAAI,CAAC;IACxC,CAAC;IACD,oBAAoB;IACpB,OAAO,uBAAC,kBAAQ,OAAK,KAAK,GAAI,CAAC;AACjC,CAAC,CAAC;AAEF,kBAAe,UAAU,CAAC"}
@@ -1,90 +1,112 @@
1
1
  import { AutoComplete as AutoCompleteComponent, Slider as SliderComponent } from '@rocket.chat/fuselage';
2
- export declare const TextInput: import("react").ForwardRefExoticComponent<Omit<Omit<import("@rocket.chat/fuselage").InputBoxProps, "type"> & {
3
- addon?: import("react").ReactNode;
4
- error?: string;
5
- } & import("react").RefAttributes<HTMLInputElement>, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
6
- export declare const EmailInput: import("react").ForwardRefExoticComponent<Omit<Omit<import("@rocket.chat/fuselage").InputBoxProps, "type"> & {
7
- addon?: import("react").ReactNode;
8
- error?: string;
9
- } & import("react").RefAttributes<HTMLElement>, "ref"> & import("react").RefAttributes<HTMLElement>>;
10
- export declare const PasswordInput: import("react").ForwardRefExoticComponent<Omit<import("@rocket.chat/fuselage").PasswordInputProps & import("react").RefAttributes<HTMLInputElement>, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
11
- export declare const SearchInput: import("react").ForwardRefExoticComponent<Omit<Omit<import("@rocket.chat/fuselage").InputBoxProps, "type"> & {
12
- addon?: import("react").ReactNode;
13
- error?: string;
14
- } & import("react").RefAttributes<HTMLInputElement>, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
15
- export declare const TextAreaInput: import("react").ForwardRefExoticComponent<Omit<Omit<import("@rocket.chat/fuselage").InputBoxProps, "type"> & {
16
- addon?: import("react").ReactNode;
17
- error?: string;
18
- } & import("react").RefAttributes<HTMLTextAreaElement>, "ref"> & import("react").RefAttributes<HTMLTextAreaElement>>;
19
- export declare const TelephoneInput: import("react").ForwardRefExoticComponent<Omit<Omit<import("@rocket.chat/fuselage").InputBoxProps, "type"> & {
20
- addon?: import("react").ReactNode;
21
- input?: import("react").ReactNode;
22
- error?: string;
23
- } & import("react").RefAttributes<HTMLInputElement>, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
24
- export declare const NumberInput: import("react").ForwardRefExoticComponent<Omit<import("@rocket.chat/fuselage").NumberInputProps & import("react").RefAttributes<HTMLInputElement>, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
25
- export declare const UrlInput: import("react").ForwardRefExoticComponent<Omit<import("@rocket.chat/fuselage").UrlInputProps & import("react").RefAttributes<HTMLElement>, "ref"> & import("react").RefAttributes<HTMLElement>>;
26
- export declare const Select: import("react").ForwardRefExoticComponent<Omit<Omit<import("react-aria").AriaSelectProps<object>, "children" | "value" | "onChange"> & {
27
- error?: string;
28
- placeholder?: string;
29
- value?: import("react").Key | null | undefined;
30
- onChange?: ((key: import("react").Key) => any) | undefined;
31
- options: import("@rocket.chat/fuselage").SelectOption[];
32
- small?: boolean;
33
- } & Omit<import("react").AllHTMLAttributes<HTMLElement>, "value" | "onChange"> & import("react").RefAttributes<HTMLElement>, "ref"> & import("react").RefAttributes<HTMLElement>>;
2
+ export declare const TextInput: {
3
+ (props: import("@rocket.chat/fuselage").TextInputProps & import("react").RefAttributes<any>): import("react").JSX.Element;
4
+ displayName: string;
5
+ };
6
+ export declare const EmailInput: {
7
+ (props: import("@rocket.chat/fuselage").EmailInputProps & import("react").RefAttributes<HTMLInputElement>): import("react").JSX.Element;
8
+ displayName: string;
9
+ };
10
+ export declare const PasswordInput: {
11
+ (props: import("@rocket.chat/fuselage").PasswordInputProps & import("react").RefAttributes<HTMLInputElement>): import("react").JSX.Element;
12
+ displayName: string;
13
+ };
14
+ export declare const SearchInput: {
15
+ (props: import("@rocket.chat/fuselage").SearchInputProps & import("react").RefAttributes<HTMLInputElement>): import("react").JSX.Element;
16
+ displayName: string;
17
+ };
18
+ export declare const TextAreaInput: {
19
+ (props: import("@rocket.chat/fuselage").TextAreaInputProps & import("react").RefAttributes<HTMLTextAreaElement>): import("react").JSX.Element;
20
+ displayName: string;
21
+ };
22
+ export declare const NumberInput: {
23
+ (props: import("@rocket.chat/fuselage").NumberInputProps & import("react").RefAttributes<HTMLInputElement>): import("react").JSX.Element;
24
+ displayName: string;
25
+ };
26
+ export declare const UrlInput: {
27
+ (props: import("@rocket.chat/fuselage").UrlInputProps & import("react").RefAttributes<HTMLInputElement>): import("react").JSX.Element;
28
+ displayName: string;
29
+ };
30
+ export declare const Select: {
31
+ (props: Omit<import("react-aria").AriaSelectProps<unknown>, "children" | "value" | "onChange"> & import("react").RefAttributes<HTMLElement> & {
32
+ error?: string;
33
+ placeholder?: string;
34
+ value?: import("react").Key | null | undefined;
35
+ onChange?: ((key: import("react").Key) => any) | undefined;
36
+ options: import("@rocket.chat/fuselage").SelectOption[];
37
+ small?: boolean;
38
+ } & Omit<import("react").AllHTMLAttributes<HTMLElement>, "value" | "onChange">): import("react").JSX.Element;
39
+ displayName: string;
40
+ };
34
41
  export declare const AutoComplete: typeof AutoCompleteComponent;
35
- export declare const MultiSelect: import("react").ForwardRefExoticComponent<Omit<Omit<import("@rocket.chat/fuselage").BoxProps, "value" | "onChange"> & {
36
- value?: import("@rocket.chat/fuselage").SelectOption[0][];
37
- error?: string;
38
- options: import("@rocket.chat/fuselage").SelectOption[];
39
- onChange: (params: import("@rocket.chat/fuselage").SelectOption[0][]) => void;
40
- getLabel?: (params: import("@rocket.chat/fuselage").SelectOption) => import("@rocket.chat/fuselage").SelectOption[1];
41
- getValue?: (params: import("@rocket.chat/fuselage").SelectOption) => import("@rocket.chat/fuselage").SelectOption[0];
42
- customEmpty?: string;
43
- anchor?: import("react").ElementType<import("@rocket.chat/fuselage").MultiSelectAnchorParams> | ((params: import("@rocket.chat/fuselage").MultiSelectAnchorParams) => import("react").ReactNode);
44
- renderOptions?: import("react").ElementType;
45
- renderItem?: import("react").ElementType;
46
- renderSelected?: import("react").ElementType<{
47
- value: import("@rocket.chat/fuselage").SelectOption[0];
48
- label: import("@rocket.chat/fuselage").SelectOption[1];
49
- onMouseDown: import("react").MouseEventHandler;
50
- children: import("react").ReactNode;
51
- }>;
52
- addonIcon?: import("@rocket.chat/fuselage").IconProps["name"];
53
- setFilter?: (filter: string) => void;
54
- } & import("react").RefAttributes<HTMLInputElement>, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
55
- export declare const MultiSelectFiltered: import("react").ForwardRefExoticComponent<Omit<Omit<import("@rocket.chat/fuselage").BoxProps, "value" | "onChange"> & {
56
- value?: import("@rocket.chat/fuselage").SelectOption[0][];
57
- error?: string;
58
- options: import("@rocket.chat/fuselage").SelectOption[];
59
- onChange: (params: import("@rocket.chat/fuselage").SelectOption[0][]) => void;
60
- getLabel?: (params: import("@rocket.chat/fuselage").SelectOption) => import("@rocket.chat/fuselage").SelectOption[1];
61
- getValue?: (params: import("@rocket.chat/fuselage").SelectOption) => import("@rocket.chat/fuselage").SelectOption[0];
62
- customEmpty?: string;
63
- anchor?: import("react").ElementType<import("@rocket.chat/fuselage").MultiSelectAnchorParams> | ((params: import("@rocket.chat/fuselage").MultiSelectAnchorParams) => import("react").ReactNode);
64
- renderOptions?: import("react").ElementType;
65
- renderItem?: import("react").ElementType;
66
- renderSelected?: import("react").ElementType<{
67
- value: import("@rocket.chat/fuselage").SelectOption[0];
68
- label: import("@rocket.chat/fuselage").SelectOption[1];
69
- onMouseDown: import("react").MouseEventHandler;
70
- children: import("react").ReactNode;
71
- }>;
72
- addonIcon?: import("@rocket.chat/fuselage").IconProps["name"];
73
- setFilter?: (filter: string) => void;
74
- } & {
75
- filter?: string;
76
- setFilter?: import("react").Dispatch<import("react").SetStateAction<string>>;
77
- addonIcon?: import("@rocket.chat/fuselage").IconProps["name"];
78
- } & import("react").RefAttributes<HTMLInputElement>, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
42
+ export declare const MultiSelect: {
43
+ (props: Omit<import("@rocket.chat/fuselage").BoxProps, "ref" | "value" | "onChange"> & import("react").RefAttributes<HTMLInputElement> & {
44
+ value?: import("@rocket.chat/fuselage").SelectOption[0][];
45
+ error?: string;
46
+ options: import("@rocket.chat/fuselage").SelectOption[];
47
+ onChange: (params: import("@rocket.chat/fuselage").SelectOption[0][]) => void;
48
+ getLabel?: (params: import("@rocket.chat/fuselage").SelectOption) => import("@rocket.chat/fuselage").SelectOption[1];
49
+ getValue?: (params: import("@rocket.chat/fuselage").SelectOption) => import("@rocket.chat/fuselage").SelectOption[0];
50
+ customEmpty?: string;
51
+ anchor?: import("react").ElementType<import("@rocket.chat/fuselage").MultiSelectAnchorParams>;
52
+ renderOptions?: import("react").ElementType;
53
+ renderItem?: import("react").ElementType;
54
+ renderSelected?: import("react").ElementType<{
55
+ value: import("@rocket.chat/fuselage").SelectOption[0];
56
+ label: import("@rocket.chat/fuselage").SelectOption[1];
57
+ onMouseDown: import("react").MouseEventHandler;
58
+ children: import("react").ReactNode;
59
+ }>;
60
+ addonIcon?: import("@rocket.chat/fuselage").IconProps["name"];
61
+ setFilter?: (filter: string) => void;
62
+ }): import("react").JSX.Element;
63
+ displayName: string;
64
+ };
65
+ export declare const MultiSelectFiltered: {
66
+ (props: Omit<import("@rocket.chat/fuselage").BoxProps, "ref" | "value" | "onChange"> & import("react").RefAttributes<HTMLInputElement> & {
67
+ value?: import("@rocket.chat/fuselage").SelectOption[0][];
68
+ error?: string;
69
+ options: import("@rocket.chat/fuselage").SelectOption[];
70
+ onChange: (params: import("@rocket.chat/fuselage").SelectOption[0][]) => void;
71
+ getLabel?: (params: import("@rocket.chat/fuselage").SelectOption) => import("@rocket.chat/fuselage").SelectOption[1];
72
+ getValue?: (params: import("@rocket.chat/fuselage").SelectOption) => import("@rocket.chat/fuselage").SelectOption[0];
73
+ customEmpty?: string;
74
+ anchor?: import("react").ElementType<import("@rocket.chat/fuselage").MultiSelectAnchorParams>;
75
+ renderOptions?: import("react").ElementType;
76
+ renderItem?: import("react").ElementType;
77
+ renderSelected?: import("react").ElementType<{
78
+ value: import("@rocket.chat/fuselage").SelectOption[0];
79
+ label: import("@rocket.chat/fuselage").SelectOption[1];
80
+ onMouseDown: import("react").MouseEventHandler;
81
+ children: import("react").ReactNode;
82
+ }>;
83
+ addonIcon?: import("@rocket.chat/fuselage").IconProps["name"];
84
+ setFilter?: (filter: string) => void;
85
+ } & {
86
+ filter?: string;
87
+ setFilter?: import("react").Dispatch<import("react").SetStateAction<string>>;
88
+ addonIcon?: import("@rocket.chat/fuselage").IconProps["name"];
89
+ }): import("react").JSX.Element;
90
+ displayName: string;
91
+ };
79
92
  export declare const Slider: typeof SliderComponent;
80
- export declare const CheckBox: import("react").ForwardRefExoticComponent<Omit<import("@rocket.chat/fuselage").BoxProps & {
81
- indeterminate?: boolean;
82
- labelChildren?: import("react").ReactNode;
83
- } & import("react").AllHTMLAttributes<HTMLInputElement> & import("react").RefAttributes<HTMLInputElement>, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
84
- export declare const ToggleSwitch: import("react").ForwardRefExoticComponent<Omit<import("@rocket.chat/fuselage").BoxProps & import("react").AllHTMLAttributes<HTMLInputElement> & {
85
- labelChildren?: import("react").ReactNode;
86
- } & import("react").RefAttributes<HTMLInputElement>, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
87
- export declare const RadioButton: import("react").ForwardRefExoticComponent<Omit<import("@rocket.chat/fuselage").BoxProps & import("react").AllHTMLAttributes<HTMLInputElement> & {
88
- labelChildren?: import("react").ReactNode;
89
- } & import("react").RefAttributes<HTMLInputElement>, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
93
+ export declare const CheckBox: {
94
+ (props: Omit<import("@rocket.chat/fuselage").BoxProps, "ref"> & import("react").RefAttributes<HTMLInputElement> & {
95
+ indeterminate?: boolean;
96
+ labelChildren?: import("react").ReactNode;
97
+ } & import("react").AllHTMLAttributes<HTMLInputElement>): import("react").JSX.Element;
98
+ displayName: string;
99
+ };
100
+ export declare const ToggleSwitch: {
101
+ (props: Omit<import("@rocket.chat/fuselage").BoxProps, "ref"> & import("react").RefAttributes<HTMLInputElement> & import("react").AllHTMLAttributes<HTMLInputElement> & {
102
+ labelChildren?: import("react").ReactNode;
103
+ }): import("react").JSX.Element;
104
+ displayName: string;
105
+ };
106
+ export declare const RadioButton: {
107
+ (props: Omit<import("@rocket.chat/fuselage").BoxProps, "ref"> & import("react").RefAttributes<HTMLInputElement> & import("react").AllHTMLAttributes<HTMLInputElement> & {
108
+ labelChildren?: import("react").ReactNode;
109
+ }): import("react").JSX.Element;
110
+ displayName: string;
111
+ };
90
112
  //# sourceMappingURL=WrappedInputComponents.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"WrappedInputComponents.d.ts","sourceRoot":"","sources":["../../../src/Inputs/WrappedInputComponents.ts"],"names":[],"mappings":"AAAA,OAAO,EAaL,YAAY,IAAI,qBAAqB,EAGrC,MAAM,IAAI,eAAe,EAC1B,MAAM,uBAAuB,CAAC;AAY/B,eAAO,MAAM,SAAS;;;8GAAkC,CAAC;AACzD,eAAO,MAAM,UAAU;;;oGAAmC,CAAC;AAC3D,eAAO,MAAM,aAAa,gNAAsC,CAAC;AACjE,eAAO,MAAM,WAAW;;;8GAAoC,CAAC;AAC7D,eAAO,MAAM,aAAa;;;oHAAiC,CAAC;AAC5D,eAAO,MAAM,cAAc;;;;8GAAuC,CAAC;AACnE,eAAO,MAAM,WAAW,8MAAoC,CAAC;AAC7D,eAAO,MAAM,QAAQ,iMAAiC,CAAC;AAGvD,eAAO,MAAM,MAAM;;;;;;;iLAAsC,CAAC;AAG1D,eAAO,MAAM,YAAY,EAEpB,OAAO,qBAAqB,CAAC;AAClC,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;8GAAgD,CAAC;AACzE,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;8GAE/B,CAAC;AACF,eAAO,MAAM,MAAM,EAEd,OAAO,eAAe,CAAC;AAG5B,eAAO,MAAM,QAAQ;;;oKAA6C,CAAC;AACnE,eAAO,MAAM,YAAY;;8GAAiD,CAAC;AAC3E,eAAO,MAAM,WAAW;;8GAAgD,CAAC"}
1
+ {"version":3,"file":"WrappedInputComponents.d.ts","sourceRoot":"","sources":["../../../src/Inputs/WrappedInputComponents.ts"],"names":[],"mappings":"AAAA,OAAO,EAYL,YAAY,IAAI,qBAAqB,EAGrC,MAAM,IAAI,eAAe,EAC1B,MAAM,uBAAuB,CAAC;AAY/B,eAAO,MAAM,SAAS;;;CAAkC,CAAC;AACzD,eAAO,MAAM,UAAU;;;CAAmC,CAAC;AAC3D,eAAO,MAAM,aAAa;;;CAAsC,CAAC;AACjE,eAAO,MAAM,WAAW;;;CAAoC,CAAC;AAC7D,eAAO,MAAM,aAAa;;;CAAiC,CAAC;AAC5D,eAAO,MAAM,WAAW;;;CAAoC,CAAC;AAC7D,eAAO,MAAM,QAAQ;;;CAAiC,CAAC;AAGvD,eAAO,MAAM,MAAM;;;;;;;;;;CAAsC,CAAC;AAG1D,eAAO,MAAM,YAAY,EAEpB,OAAO,qBAAqB,CAAC;AAClC,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;CAAgD,CAAC;AACzE,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;CAE/B,CAAC;AACF,eAAO,MAAM,MAAM,EAEd,OAAO,eAAe,CAAC;AAG5B,eAAO,MAAM,QAAQ;;;;;;CAA6C,CAAC;AACnE,eAAO,MAAM,YAAY;;;;;CAAiD,CAAC;AAC3E,eAAO,MAAM,WAAW;;;;;CAAgD,CAAC"}
@@ -1,21 +1,25 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RadioButton = exports.ToggleSwitch = exports.CheckBox = exports.Slider = exports.MultiSelectFiltered = exports.MultiSelect = exports.AutoComplete = exports.Select = exports.UrlInput = exports.NumberInput = exports.TelephoneInput = exports.TextAreaInput = exports.SearchInput = exports.PasswordInput = exports.EmailInput = exports.TextInput = void 0;
3
+ exports.RadioButton = exports.ToggleSwitch = exports.CheckBox = exports.Slider = exports.MultiSelectFiltered = exports.MultiSelect = exports.AutoComplete = exports.Select = exports.UrlInput = exports.NumberInput = exports.TextAreaInput = exports.SearchInput = exports.PasswordInput = exports.EmailInput = exports.TextInput = void 0;
4
4
  const fuselage_1 = require("@rocket.chat/fuselage");
5
5
  const withLabelHelpers_1 = require("./withLabelHelpers");
6
+ // TODO: Some inputs are still not supported due to requiring a different a11y approach
7
+ // with id
6
8
  exports.TextInput = (0, withLabelHelpers_1.withLabelId)(fuselage_1.TextInput);
7
9
  exports.EmailInput = (0, withLabelHelpers_1.withLabelId)(fuselage_1.EmailInput);
8
10
  exports.PasswordInput = (0, withLabelHelpers_1.withLabelId)(fuselage_1.PasswordInput);
9
11
  exports.SearchInput = (0, withLabelHelpers_1.withLabelId)(fuselage_1.SearchInput);
10
12
  exports.TextAreaInput = (0, withLabelHelpers_1.withLabelId)(fuselage_1.TextAreaInput);
11
- exports.TelephoneInput = (0, withLabelHelpers_1.withLabelId)(fuselage_1.TelephoneInput);
12
13
  exports.NumberInput = (0, withLabelHelpers_1.withLabelId)(fuselage_1.NumberInput);
13
14
  exports.UrlInput = (0, withLabelHelpers_1.withLabelId)(fuselage_1.UrlInput);
15
+ // with aria-labelledby
14
16
  exports.Select = (0, withLabelHelpers_1.withAriaLabelledBy)(fuselage_1.Select);
17
+ // with aria-labelledby + id for aria-controls
15
18
  exports.AutoComplete = (0, withLabelHelpers_1.withAriaLabelledByAndId)((fuselage_1.AutoComplete));
16
19
  exports.MultiSelect = (0, withLabelHelpers_1.withAriaLabelledByAndId)(fuselage_1.MultiSelect);
17
20
  exports.MultiSelectFiltered = (0, withLabelHelpers_1.withAriaLabelledByAndId)(fuselage_1.MultiSelectFiltered);
18
21
  exports.Slider = (0, withLabelHelpers_1.withAriaLabelledBy)(fuselage_1.Slider);
22
+ // with visually hidden label
19
23
  exports.CheckBox = (0, withLabelHelpers_1.withVisuallyHiddenLabel)(fuselage_1.CheckBox);
20
24
  exports.ToggleSwitch = (0, withLabelHelpers_1.withVisuallyHiddenLabel)(fuselage_1.ToggleSwitch);
21
25
  exports.RadioButton = (0, withLabelHelpers_1.withVisuallyHiddenLabel)(fuselage_1.RadioButton);
@@ -1 +1 @@
1
- {"version":3,"file":"WrappedInputComponents.js","sourceRoot":"","sources":["../../../src/Inputs/WrappedInputComponents.ts"],"names":[],"mappings":";;;AAAA,oDAiB+B;AAE/B,yDAK4B;AAKf,QAAA,SAAS,GAAG,IAAA,8BAAW,EAAC,oBAAkB,CAAC,CAAC;AAC5C,QAAA,UAAU,GAAG,IAAA,8BAAW,EAAC,qBAAmB,CAAC,CAAC;AAC9C,QAAA,aAAa,GAAG,IAAA,8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AC;AACpD,QAAA,WAAW,GAAG,IAAA,8BAAW,EAAC,sBAAoB,CAAC,CAAC;AAChD,QAAA,aAAa,GAAG,IAAA,8BAAW,EAAC,wBAAiB,CAAC,CAAC;AAC/C,QAAA,WAAW,GAAG,IAAA,8BAAW,EAAC,sBAAoB,CAAC,CAAC;AAChD,QAAA,QAAQ,GAAG,IAAA,8BAAW,EAAC,mBAAiB,CAAC,CAAC;AAEvD,uBAAuB;AACV,QAAA,MAAM,GAAG,IAAA,qCAAkB,EAAC,iBAAe,CAAC,CAAC;AAE1D,8CAA8C;AACjC,QAAA,YAAY,GAAG,IAAA,0CAAuB,EACjD,CAAA,uBAA0B,CAAA,CACK,CAAC;AACrB,QAAA,WAAW,GAAG,IAAA,0CAAuB,EAAC,sBAAoB,CAAC,CAAC;AAC5D,QAAA,mBAAmB,GAAG,IAAA,0CAAuB,EACxD,8BAA4B,CAC7B,CAAC;AACW,QAAA,MAAM,GAAG,IAAA,qCAAkB,EACtC,iBAAe,CACU,CAAC;AAE5B,6BAA6B;AAChB,QAAA,QAAQ,GAAG,IAAA,0CAAuB,EAAC,mBAAiB,CAAC,CAAC;AACtD,QAAA,YAAY,GAAG,IAAA,0CAAuB,EAAC,uBAAqB,CAAC,CAAC;AAC9D,QAAA,WAAW,GAAG,IAAA,0CAAuB,EAAC,sBAAoB,CAAC,CAAC"}
@@ -2,19 +2,31 @@ import type { ReactNode, ComponentType, RefAttributes } from 'react';
2
2
  type WithLabelId = {
3
3
  id?: string;
4
4
  };
5
- declare function withLabelId<TProps, TRef>(Component: ComponentType<TProps & WithLabelId & RefAttributes<TRef>>): import("react").ForwardRefExoticComponent<import("react").PropsWithoutRef<TProps> & RefAttributes<TRef>>;
5
+ declare function withLabelId<TProps, TRef>(Component: ComponentType<TProps & WithLabelId & RefAttributes<TRef>>): {
6
+ (props: TProps & RefAttributes<TRef>): import("react").JSX.Element;
7
+ displayName: string;
8
+ };
6
9
  type WithLabelledBy = {
7
10
  'aria-labelledby'?: string;
8
11
  };
9
- declare function withAriaLabelledBy<TProps, TRef>(Component: ComponentType<TProps & WithLabelledBy & RefAttributes<TRef>>): import("react").ForwardRefExoticComponent<import("react").PropsWithoutRef<TProps> & RefAttributes<TRef>>;
12
+ declare function withAriaLabelledBy<TProps, TRef>(Component: ComponentType<TProps & WithLabelledBy & RefAttributes<TRef>>): {
13
+ (props: TProps & RefAttributes<TRef>): import("react").JSX.Element;
14
+ displayName: string;
15
+ };
10
16
  type WithLabelledByAndId = {
11
17
  'aria-labelledby'?: string;
12
18
  'id'?: string;
13
19
  };
14
- declare function withAriaLabelledByAndId<TProps, TRef>(Component: ComponentType<TProps & WithLabelledByAndId & RefAttributes<TRef>>): import("react").ForwardRefExoticComponent<import("react").PropsWithoutRef<TProps> & RefAttributes<TRef>>;
20
+ declare function withAriaLabelledByAndId<TProps, TRef>(Component: ComponentType<TProps & WithLabelledByAndId & RefAttributes<TRef>>): {
21
+ (props: TProps & RefAttributes<TRef>): import("react").JSX.Element;
22
+ displayName: string;
23
+ };
15
24
  type WithChildrenLabel = {
16
25
  labelChildren: ReactNode;
17
26
  };
18
- declare function withVisuallyHiddenLabel<TProps, TRef>(Component: ComponentType<TProps & WithChildrenLabel & RefAttributes<TRef>>): import("react").ForwardRefExoticComponent<import("react").PropsWithoutRef<TProps> & RefAttributes<TRef>>;
27
+ declare function withVisuallyHiddenLabel<TProps, TRef>(Component: ComponentType<TProps & WithChildrenLabel & RefAttributes<TRef>>): {
28
+ (props: TProps & RefAttributes<TRef>): import("react").JSX.Element;
29
+ displayName: string;
30
+ };
19
31
  export { withLabelId, withAriaLabelledBy, withAriaLabelledByAndId, withVisuallyHiddenLabel, };
20
32
  //# sourceMappingURL=withLabelHelpers.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"withLabelHelpers.d.ts","sourceRoot":"","sources":["../../../src/Inputs/withLabelHelpers.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAO,aAAa,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_1 = require("react/jsx-runtime");
8
+ // Disabled this flag since we need to wrap multiple components
9
+ /* eslint-disable react/no-multi-comp */
8
10
  const fuselage_hooks_1 = require("@rocket.chat/fuselage-hooks");
9
- const react_1 = require("react");
10
11
  const react_aria_1 = require("react-aria");
11
12
  const FieldContext_1 = require("../Field/FieldContext");
12
13
  function withLabelId(Component) {
13
- const WrappedComponent = (0, react_1.forwardRef)(function (props, ref) {
14
+ function WrappedComponent(props) {
14
15
  const labelProps = (0, FieldContext_1.useFieldReferencedByInput)();
15
- return ((0, jsx_runtime_1.jsx)(Component, { ...props, ...labelProps, ref: ref }));
16
- });
16
+ return (0, jsx_runtime_1.jsx)(Component, { ...props, ...labelProps });
17
+ }
17
18
  WrappedComponent.displayName = `withLabelId(${Component.displayName ?? Component.name ?? 'InputComponent'})`;
18
19
  return WrappedComponent;
19
20
  }
20
21
  function withAriaLabelledBy(Component) {
21
- const WrappedComponent = (0, react_1.forwardRef)(function (props, ref) {
22
+ function WrappedComponent(props) {
22
23
  const labelProps = (0, FieldContext_1.useFieldReferencedByLabel)();
23
- return ((0, jsx_runtime_1.jsx)(Component, { ...props, ...labelProps, ref: ref }));
24
- });
24
+ return (0, jsx_runtime_1.jsx)(Component, { ...props, ...labelProps });
25
+ }
25
26
  WrappedComponent.displayName = `withAriaLabelledBy(${Component.displayName ?? Component.name ?? 'InputComponent'})`;
26
27
  return WrappedComponent;
27
28
  }
28
29
  function withAriaLabelledByAndId(Component) {
29
- const WrappedComponent = (0, react_1.forwardRef)(function (props, ref) {
30
+ function WrappedComponent(props) {
30
31
  const labelProps = (0, FieldContext_1.useFieldReferencedByLabelWithId)();
31
- return ((0, jsx_runtime_1.jsx)(Component, { ...props, ...labelProps, ref: ref }));
32
- });
32
+ return (0, jsx_runtime_1.jsx)(Component, { ...props, ...labelProps });
33
+ }
33
34
  WrappedComponent.displayName = `withAriaLabelledByAndId(${Component.displayName ?? Component.name ?? 'InputComponent'})`;
34
35
  return WrappedComponent;
35
36
  }
36
37
  function withVisuallyHiddenLabel(Component) {
37
- const WrappedComponent = (0, react_1.forwardRef)(function (props, ref) {
38
+ function WrappedComponent(props) {
38
39
  const [label, labelProps, labelRef] = (0, FieldContext_1.useFieldWrappedByInputLabel)();
39
- const mergedRef = (0, fuselage_hooks_1.useMergedRefs)(ref, labelRef);
40
+ const mergedRef = (0, fuselage_hooks_1.useMergedRefs)(props.ref, labelRef);
40
41
  return ((0, jsx_runtime_1.jsx)(Component, { ...props, ...labelProps, ref: mergedRef, labelChildren: (0, jsx_runtime_1.jsx)(react_aria_1.VisuallyHidden, { children: label }) }));
41
- });
42
+ }
42
43
  WrappedComponent.displayName = `withVisuallyHiddenLabel(${Component.displayName ?? Component.name ?? 'InputComponent'})`;
43
44
  return WrappedComponent;
44
45
  }
@@ -1 +1 @@
1
- {"version":3,"file":"withLabelHelpers.js","sourceRoot":"","sources":["../../../src/Inputs/withLabelHelpers.tsx"],"names":[],"mappings":";;AAqGE,kCAAW;AACX,gDAAkB;AAClB,0DAAuB;AACvB,0DAAuB;;AAtGzB,gEAA4D;AAE5D,iCAAmC;AACnC,2CAA4C;AAE5C,wDAK+B;AAI/B,SAAS,WAAW,CAClB,SAAoE;IAEpE,MAAM,gBAAgB,GAAG,IAAA,kBAAU,EAAe,UAAU,KAAK,EAAE,GAAG;QACpE,MAAM,UAAU,GAAG,IAAA,wCAAyB,GAAE,CAAC;QAC/C,OAAO,CACL,uBAAC,SAAS,OACH,KAA8B,KAC/B,UAAU,EACd,GAAG,EAAE,GAAG,GACR,CACH,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,gBAAgB,CAAC,WAAW,GAAG,eAAe,SAAS,CAAC,WAAW,IAAI,SAAS,CAAC,IAAI,IAAI,gBAAgB,GAAG,CAAC;IAE7G,OAAO,gBAAgB,CAAC;AAC1B,CAAC;AAID,SAAS,kBAAkB,CACzB,SAAuE;IAEvE,MAAM,gBAAgB,GAAG,IAAA,kBAAU,EAAe,UAAU,KAAK,EAAE,GAAG;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BAA2B,SAAS,CAAC,WAAW,IAAI,SAAS,CAAC,IAAI,IAAI,gBAAgB,GAAG,CAAC;IAEzH,OAAO,gBAAgB,CAAC;AAC1B,CAAC;AAID,SAAS,uBAAuB,CAC9B,SAA0E;IAE1E,SAAS,gBAAgB,CAAC,KAAmC;QAC3D,MAAM,CAAC,KAAK,EAAE,UAAU,EAAE,QAAQ,CAAC,GAAG,IAAA,0CAA2B,GAAE,CAAC;QACpE,MAAM,SAAS,GAAG,IAAA,8BAAa,EAAC,KAAK,CAAC,GAAG,EAAE,QAAqB,CAAC,CAAC;QAClE,OAAO,CACL,uBAAC,SAAS,OACJ,KAAK,KACL,UAAU,EACd,GAAG,EAAE,SAAS,EACd,aAAa,EAAE,uBAAC,2BAAc,cAAE,KAAK,GAAkB,GACvD,CACH,CAAC;IACJ,CAAC;IAED,gBAAgB,CAAC,WAAW,GAAG,2BAA2B,SAAS,CAAC,WAAW,IAAI,SAAS,CAAC,IAAI,IAAI,gBAAgB,GAAG,CAAC;IAEzH,OAAO,gBAAgB,CAAC;AAC1B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rocket.chat/fuselage-forms",
3
- "version": "1.4.0",
3
+ "version": "1.5.0",
4
4
  "description": "A set of component wrappers to provide ease of use and accessibility out-of-box.",
5
5
  "homepage": "https://github.com/RocketChat/fuselage#readme",
6
6
  "bugs": {
@@ -37,19 +37,20 @@
37
37
  },
38
38
  "devDependencies": {
39
39
  "@microsoft/api-extractor": "~7.58.7",
40
- "@rocket.chat/fuselage": "^0.80.0",
41
- "@rocket.chat/fuselage-hooks": "^0.42.0",
40
+ "@rocket.chat/fuselage": "^0.82.0",
41
+ "@rocket.chat/fuselage-hooks": "^0.43.0",
42
42
  "@rocket.chat/fuselage-tokens": "^0.33.2",
43
- "@rocket.chat/storybook-dark-mode": "^4.2.0",
43
+ "@rocket.chat/storybook-dark-mode": "^4.2.1",
44
44
  "@storybook/addon-docs": "~9.1.20",
45
45
  "@storybook/addon-webpack5-compiler-swc": "~4.0.3",
46
46
  "@storybook/react-webpack5": "~9.1.20",
47
+ "@testing-library/dom": "~10.4.1",
47
48
  "@testing-library/jest-dom": "~6.9.1",
48
49
  "@testing-library/react": "~16.3.2",
49
50
  "@testing-library/user-event": "~14.6.1",
50
51
  "@types/jest": "~30.0.0",
51
52
  "@types/jest-axe": "~3.5.9",
52
- "@types/react": "~19.2.16",
53
+ "@types/react": "~19.2.17",
53
54
  "@types/react-dom": "~19.2.3",
54
55
  "eslint": "~9.39.4",
55
56
  "jest": "~30.4.2",
@@ -78,7 +79,7 @@
78
79
  "access": "public"
79
80
  },
80
81
  "dependencies": {
81
- "@rocket.chat/emitter": "^0.32.0",
82
+ "@rocket.chat/emitter": "^0.33.0",
82
83
  "react-aria": "~3.37.0"
83
84
  }
84
85
  }