@input-kit/phone 0.4.2 → 0.6.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.
package/dist/index.d.cts CHANGED
@@ -83,6 +83,7 @@ interface PhoneInputLabels {
83
83
  searchCountriesAriaLabel: string;
84
84
  countryOptionsAriaLabel: string;
85
85
  countryButtonAriaLabel: string;
86
+ countryResultsAnnouncement: string;
86
87
  }
87
88
  interface PhoneInputOptions {
88
89
  defaultCountry?: string;
@@ -132,11 +133,32 @@ interface UsePhoneInputReturn extends PhoneInputState, PhoneInputActions {
132
133
  inputProps: InputHTMLAttributes<HTMLInputElement> & {
133
134
  ref: RefObject<HTMLInputElement | null>;
134
135
  };
136
+ highlightedIndex: number;
137
+ activeCountry: Country | undefined;
138
+ countryResultsText: string;
139
+ setHighlightedIndex: (index: number) => void;
140
+ moveHighlight: (nextIndex: number) => void;
135
141
  countryButtonProps: {
136
142
  onClick: () => void;
137
143
  'aria-expanded': boolean;
138
144
  'aria-haspopup': 'listbox';
139
145
  'aria-label': string;
146
+ 'aria-controls': string;
147
+ };
148
+ countrySearchProps: {
149
+ role: 'combobox';
150
+ value: string;
151
+ onChange: (event: {
152
+ target: {
153
+ value: string;
154
+ };
155
+ }) => void;
156
+ 'aria-expanded': boolean;
157
+ 'aria-controls': string;
158
+ 'aria-autocomplete': 'list';
159
+ 'aria-activedescendant': string | undefined;
160
+ 'aria-label': string;
161
+ placeholder: string;
140
162
  };
141
163
  countrySelectorProps: {
142
164
  onClick: () => void;
@@ -145,10 +167,12 @@ interface UsePhoneInputReturn extends PhoneInputState, PhoneInputActions {
145
167
  'aria-label': string;
146
168
  };
147
169
  dropdownProps: {
170
+ id: string;
148
171
  role: 'listbox';
149
172
  'aria-label': string;
150
- 'aria-activedescendant'?: string;
151
173
  };
174
+ listboxId: string;
175
+ activeOptionId: string | undefined;
152
176
  filteredCountries: Country[];
153
177
  countries: Country[];
154
178
  selectCountry: (country: Country) => void;
package/dist/index.d.ts CHANGED
@@ -83,6 +83,7 @@ interface PhoneInputLabels {
83
83
  searchCountriesAriaLabel: string;
84
84
  countryOptionsAriaLabel: string;
85
85
  countryButtonAriaLabel: string;
86
+ countryResultsAnnouncement: string;
86
87
  }
87
88
  interface PhoneInputOptions {
88
89
  defaultCountry?: string;
@@ -132,11 +133,32 @@ interface UsePhoneInputReturn extends PhoneInputState, PhoneInputActions {
132
133
  inputProps: InputHTMLAttributes<HTMLInputElement> & {
133
134
  ref: RefObject<HTMLInputElement | null>;
134
135
  };
136
+ highlightedIndex: number;
137
+ activeCountry: Country | undefined;
138
+ countryResultsText: string;
139
+ setHighlightedIndex: (index: number) => void;
140
+ moveHighlight: (nextIndex: number) => void;
135
141
  countryButtonProps: {
136
142
  onClick: () => void;
137
143
  'aria-expanded': boolean;
138
144
  'aria-haspopup': 'listbox';
139
145
  'aria-label': string;
146
+ 'aria-controls': string;
147
+ };
148
+ countrySearchProps: {
149
+ role: 'combobox';
150
+ value: string;
151
+ onChange: (event: {
152
+ target: {
153
+ value: string;
154
+ };
155
+ }) => void;
156
+ 'aria-expanded': boolean;
157
+ 'aria-controls': string;
158
+ 'aria-autocomplete': 'list';
159
+ 'aria-activedescendant': string | undefined;
160
+ 'aria-label': string;
161
+ placeholder: string;
140
162
  };
141
163
  countrySelectorProps: {
142
164
  onClick: () => void;
@@ -145,10 +167,12 @@ interface UsePhoneInputReturn extends PhoneInputState, PhoneInputActions {
145
167
  'aria-label': string;
146
168
  };
147
169
  dropdownProps: {
170
+ id: string;
148
171
  role: 'listbox';
149
172
  'aria-label': string;
150
- 'aria-activedescendant'?: string;
151
173
  };
174
+ listboxId: string;
175
+ activeOptionId: string | undefined;
152
176
  filteredCountries: Country[];
153
177
  countries: Country[];
154
178
  selectCountry: (country: Country) => void;