feat(text-input-skeleton)!: remove forwarded events, props

This commit is contained in:
Eric Liu 2024-04-29 22:04:18 -07:00
commit f7d8cd6e95
4 changed files with 9 additions and 60 deletions

View file

@ -4220,9 +4220,8 @@ None.
### Props ### Props
| Prop name | Required | Kind | Reactive | Type | Default value | Description | | Prop name | Required | Kind | Reactive | Type | Default value | Description |
| :------------ | :------- | :--------------- | :------- | -------------------------------------------------------- | ------------------ | ---------------------------------------------------------- | | :-------- | :------- | :--------------- | :------- | -------------------- | ------------------ | ------------------------------------ |
| hideLabel | No | <code>let</code> | No | <code>boolean</code> | <code>false</code> | Set to `true` to hide the label text | | hideLabel | No | <code>let</code> | No | <code>boolean</code> | <code>false</code> | Set to `true` to hide the label text |
| divAttributes | No | <code>let</code> | No | <code>import('svelte/elements').HTMLDivAttributes</code> | <code>{}</code> | Specify the div HTML attributes for the skeleton container |
### Slots ### Slots
@ -4230,13 +4229,7 @@ None.
### Events ### Events
| Event name | Type | Detail | None.
| :----------- | :-------- | :----- |
| click | forwarded | -- |
| pointerup | forwarded | -- |
| pointerover | forwarded | -- |
| pointerenter | forwarded | -- |
| pointerleave | forwarded | -- |
## `Theme` ## `Theme`

View file

@ -13110,29 +13110,11 @@
"isRequired": false, "isRequired": false,
"constant": false, "constant": false,
"reactive": 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": [], "moduleExports": [],
"slots": [], "slots": [],
"events": [ "events": [],
{ "type": "forwarded", "name": "click", "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": [] "typedefs": []
}, },
{ {

View file

@ -1,25 +1,11 @@
<script> <script>
// @ts-check
/** Set to `true` to hide the label text */ /** Set to `true` to hide the label text */
export let hideLabel = false; export let hideLabel = false;
/**
* Specify the div HTML attributes for the skeleton container
* @type {import('svelte/elements').HTMLDivAttributes}
*/
export let divAttributes = {};
</script> </script>
<!-- svelte-ignore a11y-mouse-events-have-key-events --> <div class:bx--form-item="{true}">
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div
class:bx--form-item="{true}"
{...divAttributes}
on:click
on:pointerup
on:pointerover
on:pointerenter
on:pointerleave
>
{#if !hideLabel} {#if !hideLabel}
<span class:bx--label="{true}" class:bx--skeleton="{true}"></span> <span class:bx--label="{true}" class:bx--skeleton="{true}"></span>
{/if} {/if}

View file

@ -6,22 +6,10 @@ export interface TextInputSkeletonProps {
* @default false * @default false
*/ */
hideLabel?: boolean; hideLabel?: boolean;
/**
* Specify the div HTML attributes for the skeleton container
* @default {}
*/
divAttributes?: import("svelte/elements").HTMLDivAttributes;
} }
export default class TextInputSkeleton extends SvelteComponentTyped< export default class TextInputSkeleton extends SvelteComponentTyped<
TextInputSkeletonProps, TextInputSkeletonProps,
{ Record<string, any>,
click: WindowEventMap["click"];
pointerup: WindowEventMap["pointerup"];
pointerover: WindowEventMap["pointerover"];
pointerenter: WindowEventMap["pointerenter"];
pointerleave: WindowEventMap["pointerleave"];
},
{} {}
> {} > {}