Skip to content

Commit d00860a

Browse files
committed
fix: never confuse an exported function type with an html attr type
Fixes #575
1 parent 310e572 commit d00860a

File tree

87 files changed

+257
-120
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+257
-120
lines changed

packages/accordion/src/Accordion.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
class?: string;
3535
multiple?: boolean;
3636
};
37-
type $$Props = OwnProps & SmuiAttrs<'div', OwnProps>;
37+
type $$Props = OwnProps & SmuiAttrs<'div', OwnProps, 'getElement'>;
3838
3939
import type { SMUIAccordionPanelAccessor } from './Panel.types.js';
4040

packages/accordion/src/Header.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
style?: string;
7070
ripple?: boolean;
7171
};
72-
type $$Props = OwnProps & SmuiAttrs<'div', OwnProps>;
72+
type $$Props = OwnProps & SmuiAttrs<'div', OwnProps, 'getElement'>;
7373
7474
const forwardEvents = forwardEventsBuilder(get_current_component());
7575

packages/autocomplete/src/Autocomplete.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@
127127
menu$anchorCorner?: Menu['$$prop_def']['anchorCorner'];
128128
};
129129
type $$Props = OwnProps &
130-
SmuiAttrs<'div', OwnProps> & {
130+
SmuiAttrs<'div', OwnProps, 'focus' | 'blur' | 'getElement'> & {
131131
[k in keyof Menu['$$prop_def'] as `menu\$${k}`]?: Menu['$$prop_def'][k];
132132
} & {
133133
[k in keyof Textfield['$$prop_def'] as `textfield\$${k}`]?: Textfield['$$prop_def'][k];

packages/badge/src/Badge.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
| 'bottom-middle'
4444
| 'bottom-end';
4545
};
46-
type $$Props = OwnProps & SmuiAttrs<'span', OwnProps>;
46+
type $$Props = OwnProps & SmuiAttrs<'span', OwnProps, 'getElement'>;
4747
4848
const forwardEvents = forwardEventsBuilder(get_current_component());
4949

packages/banner/src/Banner.svelte

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,11 @@
103103
graphic$class?: string;
104104
};
105105
type $$Props = OwnProps &
106-
SmuiAttrs<'div', OwnProps> & {
106+
SmuiAttrs<
107+
'div',
108+
OwnProps,
109+
'isOpen' | 'setOpen' | 'layout' | 'getElement'
110+
> & {
107111
[k in keyof SmuiElementPropMap['div'] as `content\$${k}`]?: SmuiElementPropMap['div'][k];
108112
} & {
109113
[k in keyof SmuiElementPropMap['div'] as `textWrapper\$${k}`]?: SmuiElementPropMap['div'][k];

packages/bottom-app-bar/src/AutoAdjust.svelte

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@
3535
tag?: TagName;
3636
};
3737
type $$Props = OwnProps &
38-
(SmuiAttrs<keyof SmuiElementMap, OwnProps> | SmuiSvgAttrs<OwnProps>);
38+
(
39+
| SmuiAttrs<keyof SmuiElementMap, OwnProps, 'getElement'>
40+
| SmuiSvgAttrs<OwnProps, 'getElement'>
41+
);
3942
4043
import type BottomAppBar from './BottomAppBar.svelte';
4144

packages/bottom-app-bar/src/BottomAppBar.svelte

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@
3939
color?: 'default' | 'primary' | 'secondary' | string;
4040
variant?: 'fixed' | 'static' | 'standard';
4141
};
42-
type $$Props = OwnProps & SmuiAttrs<'div', OwnProps>;
42+
type $$Props = OwnProps &
43+
SmuiAttrs<'div', OwnProps, 'getPropStore' | 'getElement'>;
4344
4445
const forwardEvents = forwardEventsBuilder(get_current_component());
4546

packages/button/src/Button.svelte

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,10 @@
8383
tag?: TagName;
8484
};
8585
type $$Props = OwnProps &
86-
(SmuiAttrs<keyof SmuiElementMap, OwnProps> | SmuiSvgAttrs<OwnProps>);
86+
(
87+
| SmuiAttrs<keyof SmuiElementMap, OwnProps, 'getElement'>
88+
| SmuiSvgAttrs<OwnProps, 'getElement'>
89+
);
8790
8891
const forwardEvents = forwardEventsBuilder(get_current_component());
8992

packages/button/src/Group.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
class?: string;
2828
variant?: 'text' | 'raised' | 'unelevated' | 'outlined';
2929
};
30-
type $$Props = OwnProps & SmuiAttrs<'div', OwnProps>;
30+
type $$Props = OwnProps & SmuiAttrs<'div', OwnProps, 'getElement'>;
3131
3232
const forwardEvents = forwardEventsBuilder(get_current_component());
3333

packages/card/src/Actions.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
class?: string;
2929
fullBleed?: boolean;
3030
};
31-
type $$Props = OwnProps & SmuiAttrs<'div', OwnProps>;
31+
type $$Props = OwnProps & SmuiAttrs<'div', OwnProps, 'getElement'>;
3232
3333
const forwardEvents = forwardEventsBuilder(get_current_component());
3434

0 commit comments

Comments
 (0)