diff --git a/CHANGELOG.md b/CHANGELOG.md index 6236778e..27e5c320 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,17 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [1.0.0-next.1](https://github.com/carbon-design-system/carbon-components-svelte/compare/v1.0.0-next.0...v1.0.0-next.1) (2024-01-17) + + +### ⚠ BREAKING CHANGES + +* TextInput v11 Styles (#1889) + +### Features + +* TextInput v11 Styles ([#1889](https://github.com/carbon-design-system/carbon-components-svelte/issues/1889)) ([c436dbd](https://github.com/carbon-design-system/carbon-components-svelte/commit/c436dbd76177f7553ba4206601f5ef2e416da594)), closes [#1667](https://github.com/carbon-design-system/carbon-components-svelte/issues/1667) [#1633](https://github.com/carbon-design-system/carbon-components-svelte/issues/1633) [#1621](https://github.com/carbon-design-system/carbon-components-svelte/issues/1621) [#1621](https://github.com/carbon-design-system/carbon-components-svelte/issues/1621) [#1888](https://github.com/carbon-design-system/carbon-components-svelte/issues/1888) + ## [1.0.0-next.0](https://github.com/carbon-design-system/carbon-components-svelte/compare/v0.82.8...v1.0.0-next.0) (2024-01-12) diff --git a/COMPONENT_INDEX.md b/COMPONENT_INDEX.md index 52e213fa..dc437397 100644 --- a/COMPONENT_INDEX.md +++ b/COMPONENT_INDEX.md @@ -1,6 +1,6 @@ # Component Index -> 166 components exported from carbon-components-svelte@1.0.0-next.0. +> 166 components exported from carbon-components-svelte@1.0.0-next.1. ## Components @@ -4153,56 +4153,65 @@ None. ### Props -| Prop name | Required | Kind | Reactive | Type | Default value | Description | -| :---------- | :------- | :--------------- | :------- | --------------------------------------------- | ------------------------------------------------ | --------------------------------------------------------------------------------------------------------------- | -| ref | No | let | Yes | null | HTMLInputElement | null | Obtain a reference to the input HTML element | -| 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. | -| size | No | let | No | "sm" | "lg" | undefined | Set the size of the input | -| placeholder | No | let | No | string | "" | Specify the placeholder text | -| light | No | let | No | boolean | false | Set to `true` to enable the light variant | -| disabled | No | let | No | boolean | false | Set to `true` to disable the input | -| helperText | No | let | No | string | "" | Specify the helper text | -| id | No | let | No | string | "ccs-" + Math.random().toString(36) | Set an id for the input element | -| name | No | let | No | string | undefined | Specify a name attribute for the input | -| labelText | No | let | No | string | "" | Specify the label text | -| hideLabel | No | let | No | boolean | false | Set to `true` to visually hide the label text | -| invalid | No | let | No | boolean | false | Set to `true` to indicate an invalid state | -| invalidText | No | let | No | string | "" | Specify the invalid state text | -| warn | No | let | No | boolean | false | Set to `true` to indicate an warning state | -| warnText | No | let | No | string | "" | Specify the warning state text | -| required | No | let | No | boolean | false | Set to `true` to mark the field as required | -| inline | No | let | No | boolean | false | Set to `true` to use the inline variant | -| readonly | No | let | No | boolean | false | Set to `true` to use the read-only variant | +| Prop name | Required | Kind | Reactive | Type | Default value | Description | +| :-------------- | :------- | :--------------- | :------- | ---------------------------------------------------------- | ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| ref | No | let | Yes | null | HTMLInputElement | null | Obtain a reference to the input HTML element | +| value | No | let | Yes | null | number | string | "" | Specify the input value
`value` will be set to `null` if `typeof value === "number"` and `value` is empty | +| size | No | let | No | "sm" | "md" | "lg" | "md" | Set the size of the input | +| placeholder | No | let | No | string | "" | Specify the placeholder text | +| light | No | let | No | boolean | false | Set to `true` to enable the light variant
For use on $ui-01 backgrounds only. Don't use this to make tile background color same as container background color
The light prop for `TextInput` has been deprecated in favor of the new `Layer` Layer component. It will be removed in the next major release
@deprecated | +| disabled | No | let | No | boolean | false | Set to `true` to disable the input | +| labelText | No | let | No | string | "" | Specify the label text | +| hideLabel | No | let | No | boolean | false | Set to `true` to visually hide the label text | +| helperText | No | let | No | string | "" | Specify the helper text | +| counter | No | let | No | boolean | false | Set to `true` to enable display the character counter. Requires `maxCount` to be set. | +| maxCount | No | let | No | number | undefined | Specify the maximum number of characters/words allowed
This is needed in order for `counter` to display | +| invalid | No | let | No | boolean | false | Set to `true` to indicate an invalid state | +| invalidText | No | let | No | string | "" | Specify the invalid state text | +| warn | No | let | No | boolean | false | Set to `true` to indicate an warning state | +| warnText | No | let | No | string | "" | Specify the warning state text | +| id | No | let | No | string | "ccs-" + Math.random().toString(36) | Set an id for the input element | +| name | No | let | No | string | undefined | Specify a name attribute for the input | +| inline | No | let | No | boolean | false | Set to `true` to use the inline variant | +| required | No | let | No | boolean | false | Set to `true` to mark the field as required | +| readonly | No | let | No | boolean | false | Set to `true` to use the read-only variant | +| labelAttributes | No | let | No | import('svelte/elements').HTMLLabelAttributes | {} | Set HTML attributes on the `label` element | +| inputAttributes | No | let | No | import('svelte/elements').HTMLInputAttributes | {} | Set HTML attributes on the `input` element | ### Slots -| Slot name | Default | Props | Fallback | -| :-------- | :------ | :---- | :----------------------- | -| 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 | -| :--------- | :--------- | :-------------------------------------------- | -| 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 | -- | +| Event name | Type | Detail | +| :----------- | :-------- | :----- | +| click | forwarded | -- | +| pointerup | forwarded | -- | +| pointerover | forwarded | -- | +| pointerenter | forwarded | -- | +| pointerleave | forwarded | -- | +| change | forwarded | -- | +| input | forwarded | -- | +| keydown | forwarded | -- | +| keyup | forwarded | -- | +| focus | forwarded | -- | +| blur | forwarded | -- | +| paste | forwarded | -- | ## `TextInputSkeleton` ### Props -| Prop name | Required | Kind | Reactive | Type | Default value | Description | -| :-------- | :------- | :--------------- | :------- | -------------------- | ------------------ | ------------------------------------ | -| hideLabel | No | let | No | boolean | false | Set to `true` to hide the label text | +| Prop name | Required | Kind | Reactive | Type | Default value | Description | +| :------------ | :------- | :--------------- | :------- | -------------------------------------------------------- | ------------------ | ---------------------------------------------------------- | +| hideLabel | No | let | No | boolean | false | Set to `true` to hide the label text | +| divAttributes | No | let | No | import('svelte/elements').HTMLDivAttributes | {} | Specify the div HTML attributes for the skeleton container | ### Slots @@ -4210,12 +4219,13 @@ None. ### Events -| Event name | Type | Detail | -| :--------- | :-------- | :----- | -| click | forwarded | -- | -| mouseover | forwarded | -- | -| mouseenter | forwarded | -- | -| mouseleave | forwarded | -- | +| Event name | Type | Detail | +| :----------- | :-------- | :----- | +| click | forwarded | -- | +| pointerup | forwarded | -- | +| pointerover | forwarded | -- | +| pointerenter | forwarded | -- | +| pointerleave | forwarded | -- | ## `Theme` diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 91c0d286..49abba20 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -171,7 +171,15 @@ The workflow is automatically triggered when pushing a tag that begins with `v` However, maintainers must perform a few things in preparation for a release. -Locally, while on `master` and the branch is clean, run `npm run release`. This command will: + + +While performing a prerelease: + +1. manually bump `package.json`'s `version` key to your target version. +2. ensure the `--first-release` flag is passed to the `standard-version` command. +3. Run `npm run release` then continue below. + +For regular releases, while on `master` and the branch is clean, run `npm run release`. This command will: - Bump the semantic version in `package.json` - Generate notes in `CHANGELOG.md` diff --git a/docs/package-lock.json b/docs/package-lock.json index 5e5a5a12..1a9b52b1 100644 --- a/docs/package-lock.json +++ b/docs/package-lock.json @@ -25,7 +25,7 @@ } }, "..": { - "version": "0.82.7", + "version": "1.0.0-next.0", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -39,17 +39,17 @@ "autoprefixer": "^10.4.8", "carbon-icons-svelte": "^12.1.0", "postcss": "^8.4.16", - "prettier": "^3.1.1", - "prettier-plugin-svelte": "^3.1.2", + "prettier": "^2.8.8", + "prettier-plugin-svelte": "^2.10.1", "rollup": "^2.78.1", "rollup-plugin-svelte": "^7.1.0", "rollup-plugin-terser": "^7.0.2", "sass": "^1.49.11", "standard-version": "^9.5.0", - "sveld": "^0.19.0", + "sveld": "^0.19.1", "svelte": "^4.2.0", "svelte-check": "^3.4.6", - "typescript": "^4.7.4" + "typescript": "^5.3.3" } }, "node_modules/@ampproject/remapping": { diff --git a/docs/src/COMPONENT_API.json b/docs/src/COMPONENT_API.json index 5ff09943..60018cc2 100644 --- a/docs/src/COMPONENT_API.json +++ b/docs/src/COMPONENT_API.json @@ -12742,21 +12742,10 @@ "moduleName": "TextInput", "filePath": "src/TextInput/TextInput.svelte", "props": [ - { - "name": "size", - "kind": "let", - "description": "Set the size of the input", - "type": "\"sm\" | \"lg\"", - "isFunction": false, - "isFunctionDeclaration": false, - "isRequired": false, - "constant": false, - "reactive": false - }, { "name": "value", "kind": "let", - "description": "Specify the input value.\n\n`value` will be set to `null` if type=\"number\"\nand the value is empty.", + "description": "Specify the input value\n`value` will be set to `null` if `typeof value === \"number\"` and `value` is empty", "type": "null | number | string", "value": "\"\"", "isFunction": false, @@ -12765,6 +12754,30 @@ "constant": false, "reactive": true }, + { + "name": "ref", + "kind": "let", + "description": "Obtain a reference to the input HTML element", + "type": "null | HTMLInputElement", + "value": "null", + "isFunction": false, + "isFunctionDeclaration": false, + "isRequired": false, + "constant": false, + "reactive": true + }, + { + "name": "size", + "kind": "let", + "description": "Set the size of the input", + "type": "\"sm\" | \"md\" | \"lg\"", + "value": "\"md\"", + "isFunction": false, + "isFunctionDeclaration": false, + "isRequired": false, + "constant": false, + "reactive": false + }, { "name": "placeholder", "kind": "let", @@ -12780,7 +12793,7 @@ { "name": "light", "kind": "let", - "description": "Set to `true` to enable the light variant", + "description": "Set to `true` to enable the light variant\nFor use on $ui-01 backgrounds only. Don't use this to make tile background color same as container background color\nThe light prop for `TextInput` has been deprecated in favor of the new `Layer` Layer component. It will be removed in the next major release\n@deprecated ", "type": "boolean", "value": "false", "isFunction": false, @@ -12801,41 +12814,6 @@ "constant": false, "reactive": false }, - { - "name": "helperText", - "kind": "let", - "description": "Specify the helper text", - "type": "string", - "value": "\"\"", - "isFunction": false, - "isFunctionDeclaration": false, - "isRequired": false, - "constant": false, - "reactive": false - }, - { - "name": "id", - "kind": "let", - "description": "Set an id for the input element", - "type": "string", - "value": "\"ccs-\" + Math.random().toString(36)", - "isFunction": false, - "isFunctionDeclaration": false, - "isRequired": false, - "constant": false, - "reactive": false - }, - { - "name": "name", - "kind": "let", - "description": "Specify a name attribute for the input", - "type": "string", - "isFunction": false, - "isFunctionDeclaration": false, - "isRequired": false, - "constant": false, - "reactive": false - }, { "name": "labelText", "kind": "let", @@ -12860,6 +12838,41 @@ "constant": false, "reactive": false }, + { + "name": "helperText", + "kind": "let", + "description": "Specify the helper text", + "type": "string", + "value": "\"\"", + "isFunction": false, + "isFunctionDeclaration": false, + "isRequired": false, + "constant": false, + "reactive": false + }, + { + "name": "counter", + "kind": "let", + "description": "Set to `true` to enable display the character counter. Requires `maxCount` to be set.", + "type": "boolean", + "value": "false", + "isFunction": false, + "isFunctionDeclaration": false, + "isRequired": false, + "constant": false, + "reactive": false + }, + { + "name": "maxCount", + "kind": "let", + "description": "Specify the maximum number of characters/words allowed\nThis is needed in order for `counter` to display", + "type": "number", + "isFunction": false, + "isFunctionDeclaration": false, + "isRequired": false, + "constant": false, + "reactive": false + }, { "name": "invalid", "kind": "let", @@ -12909,23 +12922,22 @@ "reactive": false }, { - "name": "ref", + "name": "id", "kind": "let", - "description": "Obtain a reference to the input HTML element", - "type": "null | HTMLInputElement", - "value": "null", + "description": "Set an id for the input element", + "type": "string", + "value": "\"ccs-\" + Math.random().toString(36)", "isFunction": false, "isFunctionDeclaration": false, "isRequired": false, "constant": false, - "reactive": true + "reactive": false }, { - "name": "required", + "name": "name", "kind": "let", - "description": "Set to `true` to mark the field as required", - "type": "boolean", - "value": "false", + "description": "Specify a name attribute for the input", + "type": "string", "isFunction": false, "isFunctionDeclaration": false, "isRequired": false, @@ -12944,6 +12956,18 @@ "constant": false, "reactive": false }, + { + "name": "required", + "kind": "let", + "description": "Set to `true` to mark the field as required", + "type": "boolean", + "value": "false", + "isFunction": false, + "isFunctionDeclaration": false, + "isRequired": false, + "constant": false, + "reactive": false + }, { "name": "readonly", "kind": "let", @@ -12955,40 +12979,74 @@ "isRequired": false, "constant": false, "reactive": false + }, + { + "name": "labelAttributes", + "kind": "let", + "description": "Set HTML attributes on the `label` element", + "type": "import('svelte/elements').HTMLLabelAttributes", + "value": "{}", + "isFunction": false, + "isFunctionDeclaration": false, + "isRequired": false, + "constant": false, + "reactive": false + }, + { + "name": "inputAttributes", + "kind": "let", + "description": "Set HTML attributes on the `input` element", + "type": "import('svelte/elements').HTMLInputAttributes", + "value": "{}", + "isFunction": false, + "isFunctionDeclaration": false, + "isRequired": false, + "constant": false, + "reactive": false } ], "moduleExports": [], "slots": [ + { + "name": "helperText", + "default": false, + "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" }, - { "type": "forwarded", "name": "mouseleave", "element": "div" }, + { "type": "forwarded", "name": "pointerup", "element": "div" }, + { "type": "forwarded", "name": "pointerover", "element": "div" }, + { "type": "forwarded", "name": "pointerenter", "element": "div" }, + { "type": "forwarded", "name": "pointerleave", "element": "div" }, + { "type": "forwarded", "name": "change", "element": "input" }, + { "type": "forwarded", "name": "input", "element": "input" }, { "type": "forwarded", "name": "keydown", "element": "input" }, { "type": "forwarded", "name": "keyup", "element": "input" }, { "type": "forwarded", "name": "focus", "element": "input" }, { "type": "forwarded", "name": "blur", "element": "input" }, { "type": "forwarded", "name": "paste", "element": "input" } ], - "typedefs": [], - "rest_props": { "type": "Element", "name": "input" } + "typedefs": [] }, { "moduleName": "TextInputSkeleton", @@ -13005,18 +13063,30 @@ "isRequired": false, "constant": false, "reactive": false + }, + { + "name": "divAttributes", + "kind": "let", + "description": "Specify the div HTML attributes for the skeleton container", + "type": "import('svelte/elements').HTMLDivAttributes", + "value": "{}", + "isFunction": false, + "isFunctionDeclaration": false, + "isRequired": false, + "constant": false, + "reactive": false } ], "moduleExports": [], "slots": [], "events": [ { "type": "forwarded", "name": "click", "element": "div" }, - { "type": "forwarded", "name": "mouseover", "element": "div" }, - { "type": "forwarded", "name": "mouseenter", "element": "div" }, - { "type": "forwarded", "name": "mouseleave", "element": "div" } + { "type": "forwarded", "name": "pointerup", "element": "div" }, + { "type": "forwarded", "name": "pointerover", "element": "div" }, + { "type": "forwarded", "name": "pointerenter", "element": "div" }, + { "type": "forwarded", "name": "pointerleave", "element": "div" } ], - "typedefs": [], - "rest_props": { "type": "Element", "name": "div" } + "typedefs": [] }, { "moduleName": "Theme", diff --git a/docs/src/pages/components/TextInput.svx b/docs/src/pages/components/TextInput.svx index e624a225..4ceb521d 100644 --- a/docs/src/pages/components/TextInput.svx +++ b/docs/src/pages/components/TextInput.svx @@ -9,47 +9,51 @@ components: ["TextInput", "TextInputSkeleton"] ## Default - + ## With helper text - + ## Hidden label - + ## Light variant - + ## Inline variant - + ## Read-only variant - + ## Large size - + ## Small size - + + +## Character Counter + + ## Invalid state - + ## Warning state - + ## Disabled state - + ## Skeleton diff --git a/package.json b/package.json index 774bee0c..b7962014 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "carbon-components-svelte", - "version": "1.0.0-next.0", + "version": "1.0.0-next.1", "license": "Apache-2.0", "description": "Svelte implementation of the Carbon Design System", "svelte": "./src/index.js", @@ -32,7 +32,7 @@ "build:docs": "node scripts/build-docs", "build:lib": "rollup -c", "format": "prettier --write \"./**/*.{svelte,js,md}\"", - "release": "standard-version && npm run build:docs" + "release": "standard-version --first-release && npm run build:docs" }, "dependencies": { "flatpickr": "4.6.9" diff --git a/src/TextInput/TextInput.svelte b/src/TextInput/TextInput.svelte index fb574ef4..51e3294f 100644 --- a/src/TextInput/TextInput.svelte +++ b/src/TextInput/TextInput.svelte @@ -1,51 +1,52 @@
{#if !hideLabel} diff --git a/tests/TextInput.test.svelte b/tests/TextInput.test.svelte index e9f77639..082b60e2 100644 --- a/tests/TextInput.test.svelte +++ b/tests/TextInput.test.svelte @@ -5,13 +5,13 @@ + + diff --git a/types/TextInput/TextInput.svelte.d.ts b/types/TextInput/TextInput.svelte.d.ts index e42bfaf6..9cbb422d 100644 --- a/types/TextInput/TextInput.svelte.d.ts +++ b/types/TextInput/TextInput.svelte.d.ts @@ -1,24 +1,25 @@ import type { SvelteComponentTyped } from "svelte"; -import type { SvelteHTMLElements } from "svelte/elements"; -type RestProps = SvelteHTMLElements["input"]; - -export interface TextInputProps extends RestProps { +export interface TextInputProps { /** - * Set the size of the input - * @default undefined - */ - size?: "sm" | "lg"; - - /** - * Specify the input value. - * - * `value` will be set to `null` if type="number" - * and the value is empty. + * Specify the input value + * `value` will be set to `null` if `typeof value === "number"` and `value` is empty * @default "" */ value?: null | number | string; + /** + * Obtain a reference to the input HTML element + * @default null + */ + ref?: null | HTMLInputElement; + + /** + * Set the size of the input + * @default "md" + */ + size?: "sm" | "md" | "lg"; + /** * Specify the placeholder text * @default "" @@ -27,6 +28,9 @@ export interface TextInputProps extends RestProps { /** * Set to `true` to enable the light variant + * For use on $ui-01 backgrounds only. Don't use this to make tile background color same as container background color + * The light prop for `TextInput` has been deprecated in favor of the new `Layer` Layer component. It will be removed in the next major release + * @deprecated * @default false */ light?: boolean; @@ -37,24 +41,6 @@ export interface TextInputProps extends RestProps { */ disabled?: boolean; - /** - * Specify the helper text - * @default "" - */ - helperText?: string; - - /** - * Set an id for the input element - * @default "ccs-" + Math.random().toString(36) - */ - id?: string; - - /** - * Specify a name attribute for the input - * @default undefined - */ - name?: string; - /** * Specify the label text * @default "" @@ -67,6 +53,25 @@ export interface TextInputProps extends RestProps { */ hideLabel?: boolean; + /** + * Specify the helper text + * @default "" + */ + helperText?: string; + + /** + * Set to `true` to enable display the character counter. Requires `maxCount` to be set. + * @default false + */ + counter?: boolean; + + /** + * Specify the maximum number of characters/words allowed + * This is needed in order for `counter` to display + * @default undefined + */ + maxCount?: number; + /** * Set to `true` to indicate an invalid state * @default false @@ -92,16 +97,16 @@ export interface TextInputProps extends RestProps { warnText?: string; /** - * Obtain a reference to the input HTML element - * @default null + * Set an id for the input element + * @default "ccs-" + Math.random().toString(36) */ - ref?: null | HTMLInputElement; + id?: string; /** - * Set to `true` to mark the field as required - * @default false + * Specify a name attribute for the input + * @default undefined */ - required?: boolean; + name?: string; /** * Set to `true` to use the inline variant @@ -109,29 +114,46 @@ export interface TextInputProps extends RestProps { */ inline?: boolean; + /** + * Set to `true` to mark the field as required + * @default false + */ + required?: boolean; + /** * Set to `true` to use the read-only variant * @default false */ readonly?: boolean; - [key: `data-${string}`]: any; + /** + * Set HTML attributes on the `label` element + * @default {} + */ + labelAttributes?: import("svelte/elements").HTMLLabelAttributes; + + /** + * Set HTML attributes on the `input` element + * @default {} + */ + inputAttributes?: import("svelte/elements").HTMLInputAttributes; } export default class TextInput extends SvelteComponentTyped< TextInputProps, { - change: CustomEvent; - input: CustomEvent; click: WindowEventMap["click"]; - mouseover: WindowEventMap["mouseover"]; - mouseenter: WindowEventMap["mouseenter"]; - mouseleave: WindowEventMap["mouseleave"]; + pointerup: WindowEventMap["pointerup"]; + pointerover: WindowEventMap["pointerover"]; + pointerenter: WindowEventMap["pointerenter"]; + pointerleave: WindowEventMap["pointerleave"]; + change: WindowEventMap["change"]; + input: WindowEventMap["input"]; keydown: WindowEventMap["keydown"]; keyup: WindowEventMap["keyup"]; focus: WindowEventMap["focus"]; blur: WindowEventMap["blur"]; paste: DocumentAndElementEventHandlersEventMap["paste"]; }, - { labelText: {} } + { helperText: {}; invalidText: {}; labelText: {}; warnText: {} } > {} diff --git a/types/TextInput/TextInputSkeleton.svelte.d.ts b/types/TextInput/TextInputSkeleton.svelte.d.ts index c7291482..8bf70996 100644 --- a/types/TextInput/TextInputSkeleton.svelte.d.ts +++ b/types/TextInput/TextInputSkeleton.svelte.d.ts @@ -1,25 +1,27 @@ import type { SvelteComponentTyped } from "svelte"; -import type { SvelteHTMLElements } from "svelte/elements"; -type RestProps = SvelteHTMLElements["div"]; - -export interface TextInputSkeletonProps extends RestProps { +export interface TextInputSkeletonProps { /** * Set to `true` to hide the label text * @default false */ hideLabel?: boolean; - [key: `data-${string}`]: any; + /** + * Specify the div HTML attributes for the skeleton container + * @default {} + */ + divAttributes?: import("svelte/elements").HTMLDivAttributes; } export default class TextInputSkeleton extends SvelteComponentTyped< TextInputSkeletonProps, { click: WindowEventMap["click"]; - mouseover: WindowEventMap["mouseover"]; - mouseenter: WindowEventMap["mouseenter"]; - mouseleave: WindowEventMap["mouseleave"]; + pointerup: WindowEventMap["pointerup"]; + pointerover: WindowEventMap["pointerover"]; + pointerenter: WindowEventMap["pointerenter"]; + pointerleave: WindowEventMap["pointerleave"]; }, {} > {}