Skip to content

Commit 8d838e0

Browse files
committed
refactor: rename and unify control id name
1 parent 3ffcf39 commit 8d838e0

File tree

13 files changed

+25
-10
lines changed

13 files changed

+25
-10
lines changed

packages/core/src/useCalendar/useCalendarControl.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ export function useCalendarControl(_props: Reactivify<CalendarControlProps, 'fie
340340
/**
341341
* The id of the calendar element.
342342
*/
343-
calendarId,
343+
controlId: calendarId,
344344

345345
/**
346346
* The props for the calendar element.

packages/core/src/useCheckbox/useCheckbox.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ export function useCheckbox<TValue = string>(_props: Reactivify<CheckboxProps<TV
283283
/**
284284
* The id of the input element.
285285
*/
286-
inputId,
286+
controlId: inputId,
287287

288288
/**
289289
* Props for the error message element.

packages/core/src/useCheckbox/useCheckboxGroup.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,11 @@ export function useCheckboxGroup<TCheckbox>(_props: Reactivify<CheckboxGroupProp
201201

202202
return exposeField(
203203
{
204+
/**
205+
* The id of the group element.
206+
*/
207+
groupId,
208+
204209
/**
205210
* Props for the group element.
206211
*/

packages/core/src/useComboBox/useComboBoxControl.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,11 @@ export function useComboBoxControl<TOption, TValue = TOption>(
319319

320320
return exposeField(
321321
{
322+
/**
323+
* The id of the input element.
324+
*/
325+
controlId: inputId,
326+
322327
/**
323328
* Props for the input element.
324329
*/

packages/core/src/useFileField/useFileControl.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ export function useFileControl(_props: Reactivify<FileControlProps, 'onUpload' |
341341
/**
342342
* The id of the input element.
343343
*/
344-
inputId,
344+
controlId: inputId,
345345

346346
/**
347347
* The props for the input element.

packages/core/src/useNumberField/useNumberControl.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ export function useNumberControl(_props: Reactivify<NumberControlProps, '_field'
243243
/**
244244
* The id of the input element.
245245
*/
246-
inputId,
246+
controlId: inputId,
247247

248248
/**
249249
* Decrements the number field value.

packages/core/src/useOtpField/useOtpControl.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ export function useOtpControl(_props: Reactivify<OtpControlProps, ExcludedProps>
291291
/**
292292
* The id of the control element.
293293
*/
294-
inputId: id,
294+
controlId: id,
295295

296296
/**
297297
* The props of the control element.

packages/core/src/useRadio/useRadio.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ export function useRadio<TValue = string>(_props: Reactivify<RadioProps<TValue>>
131131
/**
132132
* The id of the input element.
133133
*/
134-
inputId,
134+
controlId: inputId,
135135
/**
136136
* Reference to the input element.
137137
*/

packages/core/src/useRadio/useRadioGroup.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,11 @@ export function useRadioGroup<TValue = string>(_props: Reactivify<RadioGroupProp
236236
* Props for the group element.
237237
*/
238238
groupProps,
239+
240+
/**
241+
* The id of the group element.
242+
*/
243+
groupId,
239244
},
240245
field,
241246
);

packages/core/src/useSelect/useSelectControl.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ export function useSelectControl<TOption, TValue = TOption>(
237237
/**
238238
* The id of the input element.
239239
*/
240-
inputId,
240+
controlId: inputId,
241241

242242
/**
243243
* The model value of the select field.

0 commit comments

Comments
 (0)