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
| 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 |
| divAttributes | No | <code>let</code> | No | <code>import('svelte/elements').HTMLDivAttributes</code> | <code>{}</code> | Specify the div HTML attributes for the skeleton container |
### Slots
@ -4230,13 +4229,7 @@ None.
### Events
| Event name | Type | Detail |
| :----------- | :-------- | :----- |
| click | forwarded | -- |
| pointerup | forwarded | -- |
| pointerover | forwarded | -- |
| pointerenter | forwarded | -- |
| pointerleave | forwarded | -- |
None.
## `Theme`

View file

@ -13110,29 +13110,11 @@
"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": "pointerup", "element": "div" },
{ "type": "forwarded", "name": "pointerover", "element": "div" },
{ "type": "forwarded", "name": "pointerenter", "element": "div" },
{ "type": "forwarded", "name": "pointerleave", "element": "div" }
],
"events": [],
"typedefs": []
},
{

View file

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

View file

@ -6,22 +6,10 @@ export interface TextInputSkeletonProps {
* @default false
*/
hideLabel?: boolean;
/**
* 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"];
pointerup: WindowEventMap["pointerup"];
pointerover: WindowEventMap["pointerover"];
pointerenter: WindowEventMap["pointerenter"];
pointerleave: WindowEventMap["pointerleave"];
},
Record<string, any>,
{}
> {}