fluent-svelte-extra 1.2.9 → 1.3.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/TextBox/TextBox.svelte
CHANGED
|
@@ -5,6 +5,8 @@ import TextBoxButton from "../TextBox/TextBoxButton.svelte";
|
|
|
5
5
|
/** The input's current value. */
|
|
6
6
|
export let value = "";
|
|
7
7
|
export let disableBottomBorder = false;
|
|
8
|
+
/** Maximum value length for text inputs */
|
|
9
|
+
export let maxLength = undefined;
|
|
8
10
|
/** Determiness the input type of the textbox. */
|
|
9
11
|
export let type = "text";
|
|
10
12
|
/** The initial placeholder text displayed if no value is present. */
|
|
@@ -92,7 +94,7 @@ The TextBox control lets a user type text into an app. The text displays on the
|
|
|
92
94
|
<!-- Dirty workaround for the fact that svelte can't handle two-way binding when the input type is dynamic. -->
|
|
93
95
|
<!-- prettier-ignore -->
|
|
94
96
|
{#if type === "text"}
|
|
95
|
-
<input type="text" bind:value bind:this={inputElement} use:forwardEvents {...inputProps}/>
|
|
97
|
+
<input type="text" maxlength={maxLength} bind:value bind:this={inputElement} use:forwardEvents {...inputProps}/>
|
|
96
98
|
{:else if type === "number"}
|
|
97
99
|
<input type="number" bind:value bind:this={inputElement} use:forwardEvents {...inputProps}/>
|
|
98
100
|
{:else if type === "search"}
|
|
@@ -4,6 +4,7 @@ declare const __propDef: {
|
|
|
4
4
|
[x: string]: any;
|
|
5
5
|
value?: any;
|
|
6
6
|
disableBottomBorder?: boolean;
|
|
7
|
+
maxLength?: number;
|
|
7
8
|
type?: "number" | "search" | "text" | "password" | "email" | "tel" | "url" | "date" | "datetime-local" | "month" | "time" | "week";
|
|
8
9
|
placeholder?: string;
|
|
9
10
|
clearButton?: boolean;
|
package/package.json
CHANGED