Skip to content

Commit 2b77cf8

Browse files
committed
fix: remove bindable rune from things that don't need it
1 parent 99ca184 commit 2b77cf8

File tree

29 files changed

+212
-216
lines changed

29 files changed

+212
-216
lines changed

MIGRATING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ This doc contains information that will help you migrate your code from an older
99
- Svelte 5 is required! Svelte 4 will not work.
1010
- Events have been renamed, removing colons and adopting CamelCase. (ex: SMUISwitch:change to SMUISwitchChange)
1111
- Event modifiers are now wrapper functions, exported from `@smui/common/events`.
12+
- Slots must be migrated to snippets.
1213
- The deprecated "MDC" events have been removed. All event names should be migrated to the corresponding "SMUI" event names.
1314
- The "Fixation" theme now uses Tahoma as its large header font.
1415

packages/badge/src/Badge.svelte

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,12 @@
6161
children?: Snippet;
6262
};
6363
let {
64-
use = $bindable([]),
65-
class: className = $bindable(''),
66-
square = $bindable(false),
67-
color = $bindable('primary'),
68-
position = $bindable('middle'),
69-
align = $bindable('top-end'),
64+
use = [],
65+
class: className = '',
66+
square = false,
67+
color = 'primary',
68+
position = 'middle',
69+
align = 'top-end',
7070
children,
7171
...restProps
7272
}: OwnProps & SmuiAttrs<'span', keyof OwnProps> = $props();

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,12 @@
6363
children?: Snippet;
6464
};
6565
let {
66-
use = $bindable([]),
67-
class: className = $bindable(''),
68-
style = $bindable(''),
69-
bottomAppBar = $bindable(),
70-
component: MyComponent = $bindable(SmuiElement),
71-
tag = $bindable('main' as TagName),
66+
use = [],
67+
class: className = '',
68+
style = '',
69+
bottomAppBar = null,
70+
component: MyComponent = SmuiElement,
71+
tag = 'main' as TagName,
7272
children,
7373
...restProps
7474
}: OwnProps & SmuiAttrs<TagName, keyof OwnProps> = $props();

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@
5454
children?: Snippet;
5555
};
5656
let {
57-
use = $bindable([]),
58-
class: className = $bindable(''),
59-
style = $bindable(''),
60-
variant = $bindable('standard'),
61-
color = $bindable('primary'),
57+
use = [],
58+
class: className = '',
59+
style = '',
60+
variant = 'standard',
61+
color = 'primary',
6262
children,
6363
...restProps
6464
}: OwnProps & SmuiAttrs<'div', keyof OwnProps> = $props();

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@
3939
children?: Snippet;
4040
};
4141
let {
42-
use = $bindable([]),
43-
class: className = $bindable(''),
44-
fabInset = $bindable(false),
42+
use = [],
43+
class: className = '',
44+
fabInset = false,
4545
children,
4646
...restProps
4747
}: Omit<ComponentProps<typeof Paper>, keyof OwnProps> &

packages/button/src/Button.svelte

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -130,19 +130,19 @@
130130
children?: Snippet;
131131
};
132132
let {
133-
use = $bindable([]),
134-
class: className = $bindable(''),
135-
style = $bindable(''),
136-
ripple = $bindable(true),
137-
color = $bindable('primary'),
138-
variant = $bindable('text'),
139-
touch = $bindable(false),
140-
href = $bindable(undefined),
141-
action = $bindable('close'),
142-
defaultAction = $bindable(false),
143-
secondary = $bindable(false),
144-
component: MyComponent = $bindable(SmuiElement),
145-
tag = $bindable((href == null ? 'button' : 'a') as TagName),
133+
use = [],
134+
class: className = '',
135+
style = '',
136+
ripple = true,
137+
color = 'primary',
138+
variant = 'text',
139+
touch = false,
140+
href,
141+
action = 'close',
142+
defaultAction = false,
143+
secondary = false,
144+
component: MyComponent = SmuiElement,
145+
tag = (href == null ? 'button' : 'a') as TagName,
146146
children,
147147
...restProps
148148
}: OwnProps & SmuiAttrs<TagName, keyof OwnProps> = $props();

packages/button/src/Group.svelte

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@
3838
3939
// Remember to update $$Props if you add/remove/rename props.
4040
let {
41-
use = $bindable([]),
42-
class: className = $bindable(''),
43-
variant = $bindable('text'),
41+
use = [],
42+
class: className = '',
43+
variant = 'text',
4444
children,
4545
...restProps
4646
}: OwnProps & SmuiAttrs<'div', keyof OwnProps> = $props();

packages/checkbox/src/Checkbox.svelte

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -156,18 +156,18 @@
156156
input$class?: string;
157157
};
158158
let {
159-
use = $bindable([]),
160-
class: className = $bindable(''),
161-
style = $bindable(''),
159+
use = [],
160+
class: className = '',
161+
style = '',
162162
disabled = $bindable(false),
163-
touch = $bindable(false),
163+
touch = false,
164164
indeterminate = $bindable(uninitializedValue as unknown as boolean),
165165
group = $bindable(uninitializedValue as unknown as any[]),
166166
checked = $bindable(uninitializedValue as unknown as boolean),
167-
value = $bindable(null),
168-
valueKey = $bindable(uninitializedValue as unknown as string),
169-
input$use = $bindable([]),
170-
input$class = $bindable(''),
167+
value = null,
168+
valueKey = uninitializedValue as unknown as string,
169+
input$use = [],
170+
input$class = '',
171171
...restProps
172172
}: OwnProps &
173173
SmuiAttrs<'div', keyof OwnProps> & {

packages/common/src/CommonIcon.svelte

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,11 @@
5959
children?: Snippet;
6060
};
6161
let {
62-
use = $bindable([]),
63-
class: className = $bindable(''),
64-
on = $bindable(false),
65-
component: MyComponent = $bindable(SmuiElement),
66-
tag = $bindable('i' as TagName),
62+
use = [],
63+
class: className = '',
64+
on = false,
65+
component: MyComponent = SmuiElement,
66+
tag = 'i' as TagName,
6767
children,
6868
...restProps
6969
}: OwnProps & SmuiAttrs<TagName, keyof OwnProps> = $props();

packages/common/src/CommonLabel.svelte

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@
5959
children?: Snippet;
6060
};
6161
let {
62-
use = $bindable([]),
63-
class: className = $bindable(''),
64-
component: MyComponent = $bindable(SmuiElement),
65-
tag = $bindable('span' as TagName),
62+
use = [],
63+
class: className = '',
64+
component: MyComponent = SmuiElement,
65+
tag = 'span' as TagName,
6666
children,
6767
...restProps
6868
}: OwnProps & SmuiAttrs<TagName, keyof OwnProps> = $props();

0 commit comments

Comments
 (0)