diff --git a/COMPONENT_INDEX.md b/COMPONENT_INDEX.md
index 7e3a18d0..dc4af73d 100644
--- a/COMPONENT_INDEX.md
+++ b/COMPONENT_INDEX.md
@@ -4219,7 +4219,7 @@ None.
| :-------------- | :------- | :--------------- | :------- | --------------------------------------------- | ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| value | No | let
| Yes | null | number | string
| ""
| Specify the input value
`value` will be set to `null` if `type = "number"` and the value is empty |
| ref | No | let
| Yes | null | HTMLInputElement
| null
| Obtain a reference to the input HTML element |
-| counter | No | let
| No | -- | undefined
| Set to "char" to enable display the character counter or "word" to display the word count. |
+| counter | No | let
| No | "char" | "word"
| undefined
| Set to "char" to enable display the character counter or "word" to display the word count. |
| disabled | No | let
| No | boolean
| false
| Set to `true` to disable the input |
| helperText | No | let
| No | string
| ""
| Specify the helper text |
| hideLabel | No | let
| No | boolean
| false
| Set to `true` to visually hide the label text |
@@ -4242,26 +4242,28 @@ None.
### Slots
-| Slot name | Default | Props | Fallback |
-| :--------- | :------ | :---- | :------------------------ |
-| helperText | No | -- | {helperText}
|
-| labelText | No | -- | {labelText}
|
+| Slot name | Default | Props | Fallback |
+| :---------- | :------ | :---- | :------------------------- |
+| helperText | No | -- | {helperText}
|
+| invalidText | No | -- | {invalidText}
|
+| labelText | No | -- | {labelText}
|
+| warnText | No | -- | {warnText}
|
### Events
-| Event name | Type | Detail |
-| :--------- | :--------- | :----- |
-| click | forwarded | -- |
-| mouseover | forwarded | -- |
-| mouseenter | forwarded | -- |
-| mouseleave | forwarded | -- |
-| keydown | forwarded | -- |
-| keyup | forwarded | -- |
-| focus | forwarded | -- |
-| blur | forwarded | -- |
-| paste | forwarded | -- |
-| input | dispatched | -- |
-| change | dispatched | -- |
+| Event name | Type | Detail |
+| :--------- | :--------- | :-------------------------------------------- |
+| change | dispatched | null | number | string
|
+| input | dispatched | null | number | string
|
+| click | forwarded | -- |
+| mouseover | forwarded | -- |
+| mouseenter | forwarded | -- |
+| mouseleave | forwarded | -- |
+| keydown | forwarded | -- |
+| keyup | forwarded | -- |
+| focus | forwarded | -- |
+| blur | forwarded | -- |
+| paste | forwarded | -- |
## `TextInputSkeleton`
diff --git a/docs/src/COMPONENT_API.json b/docs/src/COMPONENT_API.json
index fc6a873a..d06ad877 100644
--- a/docs/src/COMPONENT_API.json
+++ b/docs/src/COMPONENT_API.json
@@ -12701,6 +12701,7 @@
"name": "counter",
"kind": "let",
"description": "Set to \"char\" to enable display the character counter or \"word\" to display the word count.",
+ "type": "\"char\" | \"word\"",
"isFunction": false,
"isFunctionDeclaration": false,
"isRequired": false,
@@ -12965,14 +12966,36 @@
"fallback": "{helperText}",
"slot_props": "{}"
},
+ {
+ "name": "invalidText",
+ "default": false,
+ "fallback": "{invalidText}",
+ "slot_props": "{}"
+ },
{
"name": "labelText",
"default": false,
"fallback": "{labelText}",
"slot_props": "{}"
+ },
+ {
+ "name": "warnText",
+ "default": false,
+ "fallback": "{warnText}",
+ "slot_props": "{}"
}
],
"events": [
+ {
+ "type": "dispatched",
+ "name": "change",
+ "detail": "null | number | string"
+ },
+ {
+ "type": "dispatched",
+ "name": "input",
+ "detail": "null | number | string"
+ },
{ "type": "forwarded", "name": "click", "element": "div" },
{ "type": "forwarded", "name": "mouseover", "element": "div" },
{ "type": "forwarded", "name": "mouseenter", "element": "div" },
@@ -12981,9 +13004,7 @@
{ "type": "forwarded", "name": "keyup", "element": "input" },
{ "type": "forwarded", "name": "focus", "element": "input" },
{ "type": "forwarded", "name": "blur", "element": "input" },
- { "type": "forwarded", "name": "paste", "element": "input" },
- { "type": "dispatched", "name": "input" },
- { "type": "dispatched", "name": "change" }
+ { "type": "forwarded", "name": "paste", "element": "input" }
],
"typedefs": []
},
diff --git a/src/TextInput/TextInput.svelte b/src/TextInput/TextInput.svelte
index 42f316ce..2912dfce 100644
--- a/src/TextInput/TextInput.svelte
+++ b/src/TextInput/TextInput.svelte
@@ -293,11 +293,15 @@
{/if}
{#if isFluid && !inline && invalid}