From f7d7fdf5b1e55cffca9f315140acfe45092467ac Mon Sep 17 00:00:00 2001 From: Cory LaViska Date: Tue, 20 Dec 2022 18:23:19 -0500 Subject: [PATCH] rerorder props --- src/components/input/input.ts | 26 +++++++++++++------------- src/components/textarea/textarea.ts | 6 +++--- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/components/input/input.ts b/src/components/input/input.ts index 7a4f202a..e1a8a723 100644 --- a/src/components/input/input.ts +++ b/src/components/input/input.ts @@ -115,6 +115,15 @@ export default class SlInput extends ShoelaceElement implements ShoelaceFormCont /** Adds a clear button when the input is not empty. */ @property({ type: Boolean }) clearable = false; + /** Disables the input. */ + @property({ type: Boolean, reflect: true }) disabled = false; + + /** Placeholder text to show as a hint when the input is empty. */ + @property() placeholder = ''; + + /** Makes the input readonly. */ + @property({ type: Boolean, reflect: true }) readonly = false; + /** Adds a button to toggle the password's visibility. Only applies to password types. */ @property({ attribute: 'password-toggle', type: Boolean }) passwordToggle = false; @@ -124,14 +133,11 @@ export default class SlInput extends ShoelaceElement implements ShoelaceFormCont /** Hides the browser's built-in increment/decrement spin buttons for number inputs. */ @property({ attribute: 'no-spin-buttons', type: Boolean }) noSpinButtons = false; - /** Placeholder text to show as a hint when the input is empty. */ - @property() placeholder = ''; + /** Makes the input a required field. */ + @property({ type: Boolean, reflect: true }) required = false; - /** Disables the input. */ - @property({ type: Boolean, reflect: true }) disabled = false; - - /** Makes the input readonly. */ - @property({ type: Boolean, reflect: true }) readonly = false; + /** A regular expression pattern to validate input against. */ + @property() pattern: string; /** The minimum length of input that will be considered valid. */ @property({ type: Number }) minlength: number; @@ -151,12 +157,6 @@ export default class SlInput extends ShoelaceElement implements ShoelaceFormCont */ @property() step: number | 'any'; - /** A regular expression pattern to validate input against. */ - @property() pattern: string; - - /** Makes the input a required field. */ - @property({ type: Boolean, reflect: true }) required = false; - /** Controls whether and how text input is automatically capitalized as it is entered by the user. */ @property() autocapitalize: 'off' | 'none' | 'on' | 'sentences' | 'words' | 'characters'; diff --git a/src/components/textarea/textarea.ts b/src/components/textarea/textarea.ts index 972a3c9a..e2c01ad4 100644 --- a/src/components/textarea/textarea.ts +++ b/src/components/textarea/textarea.ts @@ -81,15 +81,15 @@ export default class SlTextarea extends ShoelaceElement implements ShoelaceFormC /** Makes the textarea readonly. */ @property({ type: Boolean, reflect: true }) readonly = false; + /** Makes the textarea a required field. */ + @property({ type: Boolean, reflect: true }) required = false; + /** The minimum length of input that will be considered valid. */ @property({ type: Number }) minlength: number; /** The maximum length of input that will be considered valid. */ @property({ type: Number }) maxlength: number; - /** Makes the textarea a required field. */ - @property({ type: Boolean, reflect: true }) required = false; - /** Controls whether and how text input is automatically capitalized as it is entered by the user. */ @property() autocapitalize: 'off' | 'none' | 'on' | 'sentences' | 'words' | 'characters';