From f6fa41b64653160493cc8857e0fb1933234a5050 Mon Sep 17 00:00:00 2001 From: Melanie Boeckmann Date: Thu, 9 Jan 2025 06:39:33 -0800 Subject: [PATCH] fix: input size property description (#728) --- packages/web/src/components.d.ts | 4 +-- .../src/components/gcds-input/gcds-input.tsx | 4 +-- .../web/src/components/gcds-input/readme.md | 32 +++++++++---------- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/packages/web/src/components.d.ts b/packages/web/src/components.d.ts index 1940a87e7..2bb542852 100644 --- a/packages/web/src/components.d.ts +++ b/packages/web/src/components.d.ts @@ -624,7 +624,7 @@ export namespace Components { */ "required"?: boolean; /** - * Size attribute for an input element. Defines max-length as well. + * Size attribute for an input element to provide a visual indication of the expected text length to the user. */ "size"?: number; /** @@ -2453,7 +2453,7 @@ declare namespace LocalJSX { */ "required"?: boolean; /** - * Size attribute for an input element. Defines max-length as well. + * Size attribute for an input element to provide a visual indication of the expected text length to the user. */ "size"?: number; /** diff --git a/packages/web/src/components/gcds-input/gcds-input.tsx b/packages/web/src/components/gcds-input/gcds-input.tsx index 4ce97df73..f09105561 100644 --- a/packages/web/src/components/gcds-input/gcds-input.tsx +++ b/packages/web/src/components/gcds-input/gcds-input.tsx @@ -104,8 +104,8 @@ export class GcdsInput { @Prop() required?: boolean = false; /** - * Size attribute for an input element. - * Defines max-length as well. + * Size attribute for an input element to provide a visual indication + * of the expected text length to the user. */ @Prop() size?: number; diff --git a/packages/web/src/components/gcds-input/readme.md b/packages/web/src/components/gcds-input/readme.md index 1505b1126..3d43c3581 100644 --- a/packages/web/src/components/gcds-input/readme.md +++ b/packages/web/src/components/gcds-input/readme.md @@ -7,22 +7,22 @@ ## Properties -| Property | Attribute | Description | Type | Default | -| ---------------------- | --------------- | ---------------------------------------------------------------- | ------------------------------------------------------------------ | ----------- | -| `autocomplete` | `autocomplete` | String to have autocomplete enabled | `string` | `undefined` | -| `disabled` | `disabled` | Specifies if an input element is disabled or not. | `boolean` | `false` | -| `errorMessage` | `error-message` | Error message for an invalid input element. | `string` | `undefined` | -| `hideLabel` | `hide-label` | Specifies if the label is hidden or not. | `boolean` | `false` | -| `hint` | `hint` | Hint displayed below the label and above the input field. | `string` | `undefined` | -| `inputId` _(required)_ | `input-id` | Id attribute for an input element. | `string` | `undefined` | -| `label` _(required)_ | `label` | Form field label | `string` | `undefined` | -| `name` _(required)_ | `name` | Name attribute for an input element. | `string` | `undefined` | -| `required` | `required` | Specifies if a form field is required or not. | `boolean` | `false` | -| `size` | `size` | Size attribute for an input element. Defines max-length as well. | `number` | `undefined` | -| `type` | `type` | Set Input types | `"email" \| "number" \| "password" \| "search" \| "text" \| "url"` | `'text'` | -| `validateOn` | `validate-on` | Set event to call validator | `"blur" \| "other" \| "submit"` | `undefined` | -| `validator` | -- | Array of validators | `(string \| ValidatorEntry \| Validator)[]` | `undefined` | -| `value` | `value` | Default value for an input element. | `string` | `undefined` | +| Property | Attribute | Description | Type | Default | +| ---------------------- | --------------- | ----------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------ | ----------- | +| `autocomplete` | `autocomplete` | String to have autocomplete enabled | `string` | `undefined` | +| `disabled` | `disabled` | Specifies if an input element is disabled or not. | `boolean` | `false` | +| `errorMessage` | `error-message` | Error message for an invalid input element. | `string` | `undefined` | +| `hideLabel` | `hide-label` | Specifies if the label is hidden or not. | `boolean` | `false` | +| `hint` | `hint` | Hint displayed below the label and above the input field. | `string` | `undefined` | +| `inputId` _(required)_ | `input-id` | Id attribute for an input element. | `string` | `undefined` | +| `label` _(required)_ | `label` | Form field label | `string` | `undefined` | +| `name` _(required)_ | `name` | Name attribute for an input element. | `string` | `undefined` | +| `required` | `required` | Specifies if a form field is required or not. | `boolean` | `false` | +| `size` | `size` | Size attribute for an input element to provide a visual indication of the expected text length to the user. | `number` | `undefined` | +| `type` | `type` | Set Input types | `"email" \| "number" \| "password" \| "search" \| "text" \| "url"` | `'text'` | +| `validateOn` | `validate-on` | Set event to call validator | `"blur" \| "other" \| "submit"` | `undefined` | +| `validator` | -- | Array of validators | `(string \| ValidatorEntry \| Validator)[]` | `undefined` | +| `value` | `value` | Default value for an input element. | `string` | `undefined` | ## Events