File tree 4 files changed +12
-7
lines changed
src/lib/bits/toggle-group
4 files changed +12
-7
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " bits-ui " : patch
3
+ ---
4
+
5
+ fix: correct item events
Original file line number Diff line number Diff line change 1
1
<script lang =" ts" >
2
2
import { melt } from " @melt-ui/svelte" ;
3
3
import { setCtx , getAttrs } from " ../ctx.js" ;
4
- import type { Events , Props } from " ../types.js" ;
4
+ import type { Props } from " ../types.js" ;
5
5
6
6
type T = $$Generic <" single" | " multiple" >;
7
7
8
8
type $$Props = Props <T >;
9
- type $$Events = Events ;
10
9
export let kind: $$Props [" kind" ] = " single" as T ;
11
10
export let disabled: $$Props [" disabled" ] = undefined ;
12
11
export let loop: $$Props [" loop" ] = undefined ;
Original file line number Diff line number Diff line change 1
1
<script lang =" ts" >
2
2
import { melt } from " @melt-ui/svelte" ;
3
- import { getCtx , getAttrs } from " ../ctx" ;
4
- import type { ItemProps } from " ../types" ;
3
+ import { getCtx , getAttrs } from " ../ctx.js " ;
4
+ import type { ItemProps , ItemEvents } from " ../types.js " ;
5
5
import { createDispatcher } from " $lib/internal" ;
6
6
7
7
type $$Props = ItemProps ;
8
+ type $$Events = ItemEvents ;
8
9
9
10
export let value: $$Props [" value" ];
10
11
export let disabled: $$Props [" disabled" ] = false ;
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ type ItemProps = {
25
25
} & AsChild &
26
26
HTMLButtonAttributes ;
27
27
28
- type Events < T extends Element = HTMLButtonElement > = {
28
+ type ItemEvents < T extends Element = HTMLButtonElement > = {
29
29
click : CustomEventHandler < MouseEvent , T > ;
30
30
keydown : CustomEventHandler < KeyboardEvent , T > ;
31
31
} ;
@@ -37,7 +37,7 @@ export type {
37
37
Props as ToggleGroupProps ,
38
38
ItemProps as ToggleGroupItemProps ,
39
39
//
40
- Events ,
40
+ ItemEvents ,
41
41
//
42
- Events as ToggleGroupEvents
42
+ ItemEvents as ToggleGroupItemEvents
43
43
} ;
You can’t perform that action at this time.
0 commit comments