Skip to content

Commit

Permalink
feat(checkbox, combobox, input-date-picker, input-time-picker, segmen…
Browse files Browse the repository at this point in the history
…ted-control, select): add required property (#8517)

**Related Issue:** #8057

## Summary

Remove the `@internal` tag from the `required` property on form
components.

---------

Co-authored-by: Kitty Hurley <[email protected]>
Co-authored-by: Matt Driscoll <[email protected]>
  • Loading branch information
3 people authored Jan 9, 2024
1 parent a0c3b15 commit 72a1ce4
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,7 @@ export class Checkbox
*/
@Prop({ reflect: true }) name: string;

/**
* When `true`, the component must have a value in order for the form to submit.
*
* @internal
*/
/** When `true`, the component must have a value in order for the form to submit. */
@Prop({ reflect: true }) required = false;

/** Specifies the size of the component. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,11 +210,7 @@ export class Combobox
this.reposition(true);
}

/**
* When `true`, the component must have a value in order for the form to submit.
*
* @internal
*/
/** When `true`, the component must have a value in order for the form to submit. */
@Prop({ reflect: true }) required = false;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -305,11 +305,7 @@ export class InputDatePicker
/** When `true`, activates a range for the component. */
@Prop({ reflect: true }) range = false;

/**
* When `true`, the component must have a value in order for the form to submit.
*
* @internal
*/
/** When `true`, the component must have a value in order for the form to submit. */
@Prop({ reflect: true }) required = false;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,11 +270,7 @@ export class InputTimePicker
);
}

/**
* When `true`, the component must have a value in order for the form to submit.
*
* @internal
*/
/** When `true`, the component must have a value in order for the form to submit. */
@Prop({ reflect: true }) required = false;

/** Specifies the size of the component. */
Expand Down
3 changes: 1 addition & 2 deletions packages/calcite-components/src/components/rating/rating.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,7 @@ export class Rating
*
* When not set, the component will be associated with its ancestor form element, if any.
*/
@Prop({ reflect: true })
form: string;
@Prop({ reflect: true }) form: string;

/**
* Made into a prop for testing purposes only
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,9 @@ export class SegmentedControl
*
* When not set, the component will be associated with its ancestor form element, if any.
*/
@Prop({ reflect: true })
form: string;
@Prop({ reflect: true }) form: string;

/**
* When `true`, the component must have a value in order for the form to submit.
*
* @internal
*/
/** When `true`, the component must have a value in order for the form to submit. */
@Prop({ reflect: true }) required = false;

/**
Expand Down
6 changes: 1 addition & 5 deletions packages/calcite-components/src/components/select/select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,7 @@ export class Select
*/
@Prop({ reflect: true }) name: string;

/**
* When `true`, the component must have a value in order for the form to submit.
*
* @internal
*/
/** When `true`, the component must have a value in order for the form to submit. */
@Prop({ reflect: true }) required = false;

/**
Expand Down

0 comments on commit 72a1ce4

Please sign in to comment.