Skip to content
This repository was archived by the owner on Sep 26, 2022. It is now read-only.

Commit 4f33fe1

Browse files
feat: export input elements
Signed-off-by: Florian-Schoenherr <[email protected]>
1 parent 69e82c9 commit 4f33fe1

File tree

13 files changed

+122
-7
lines changed

13 files changed

+122
-7
lines changed

packages/api-generator/dist/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/api-generator/src/Button.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,21 @@
240240
"type": "object"
241241
},
242242
"defaultValue": null
243+
},
244+
{
245+
"visibility": "public",
246+
"description": null,
247+
"keywords": [],
248+
"name": "button",
249+
"kind": "let",
250+
"static": false,
251+
"readonly": false,
252+
"type": {
253+
"kind": "type",
254+
"text": "object",
255+
"type": "object"
256+
},
257+
"defaultValue": null
243258
}
244259
],
245260
"computed": [],

packages/api-generator/src/Checkbox.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,21 @@
148148
"type": "object"
149149
},
150150
"defaultValue": null
151+
},
152+
{
153+
"keywords": [],
154+
"visibility": "public",
155+
"description": "The <input/> element of the checkbox.",
156+
"name": "inputElement",
157+
"kind": "let",
158+
"static": false,
159+
"readonly": false,
160+
"type": {
161+
"kind": "type",
162+
"text": "object",
163+
"type": "object"
164+
},
165+
"defaultValue": null
151166
}
152167
],
153168
"computed": [],

packages/api-generator/src/Radio.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,21 @@
111111
"type": "object"
112112
},
113113
"defaultValue": null
114+
},
115+
{
116+
"keywords": [],
117+
"visibility": "public",
118+
"description": "The <input/> element of the radio.",
119+
"name": "inputElement",
120+
"kind": "let",
121+
"static": false,
122+
"readonly": false,
123+
"type": {
124+
"kind": "type",
125+
"text": "object",
126+
"type": "object"
127+
},
128+
"defaultValue": null
114129
}
115130
],
116131
"computed": [],

packages/api-generator/src/Switch.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,21 @@
156156
"type": "object"
157157
},
158158
"defaultValue": null
159+
},
160+
{
161+
"keywords": [],
162+
"visibility": "public",
163+
"description": "The <input/> element of the switch.",
164+
"name": "inputElement",
165+
"kind": "let",
166+
"static": false,
167+
"readonly": false,
168+
"type": {
169+
"kind": "type",
170+
"text": "object",
171+
"type": "object"
172+
},
173+
"defaultValue": null
159174
}
160175
],
161176
"computed": [],

packages/api-generator/src/TextField.json

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -349,10 +349,34 @@
349349
"type": "object"
350350
},
351351
"defaultValue": null
352+
},
353+
{
354+
"visibility": "public",
355+
"description": null,
356+
"keywords": [],
357+
"name": "inputElement",
358+
"kind": "let",
359+
"static": false,
360+
"readonly": false,
361+
"type": {
362+
"kind": "type",
363+
"text": "object",
364+
"type": "object"
365+
},
366+
"defaultValue": null
352367
}
353368
],
354369
"computed": [],
355-
"methods": [],
370+
"methods": [
371+
{
372+
"visibility": "public",
373+
"description": null,
374+
"keywords": [],
375+
"name": "validate",
376+
"args": [],
377+
"static": false
378+
}
379+
],
356380
"components": [],
357381
"description": null,
358382
"keywords": [],
@@ -364,7 +388,7 @@
364388
"locations": null,
365389
"loc": null,
366390
"visibility": "public",
367-
"description": "Slot for prepend inside the input.",
391+
"description": "keypress Event is deprecated. Use keydown or keyup instead",
368392
"keywords": []
369393
},
370394
{
@@ -408,7 +432,7 @@
408432
"keywords": []
409433
},
410434
{
411-
"name": "keyup",
435+
"name": "keydown",
412436
"parent": "input",
413437
"modificators": [],
414438
"locations": null,
@@ -418,7 +442,7 @@
418442
"keywords": []
419443
},
420444
{
421-
"name": "keydown",
445+
"name": "keyup",
422446
"parent": "input",
423447
"modificators": [],
424448
"locations": null,

packages/api-generator/src/Textarea.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,21 @@
364364
"type": "object"
365365
},
366366
"defaultValue": null
367+
},
368+
{
369+
"visibility": "public",
370+
"description": null,
371+
"keywords": [],
372+
"name": "textarea",
373+
"kind": "let",
374+
"static": false,
375+
"readonly": false,
376+
"type": {
377+
"kind": "type",
378+
"text": "object",
379+
"type": "object"
380+
},
381+
"defaultValue": null
367382
}
368383
],
369384
"computed": [],

packages/svelte-materialify/src/components/Button/Button.svelte

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,14 @@
1919
export let type = 'button';
2020
export let ripple = {};
2121
export let style = null;
22+
export let button = null;
2223
</script>
2324

2425
<style lang="scss" src="./Button.scss" global>
2526
</style>
2627

2728
<button
29+
bind:this={button}
2830
class="s-btn size-{size} {klass}"
2931
class:s-btn--fab={fab}
3032
class:icon

packages/svelte-materialify/src/components/Checkbox/Checkbox.svelte

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@
3737
// Styles to add to checkbox.
3838
export let style = null;
3939
40+
// The <input/> element of the checkbox.
41+
export let inputElement = null;
42+
4043
id = id || `s-checkbox-${uid(5)}`;
4144
4245
$: hasValidGroup = Array.isArray(group);
@@ -68,6 +71,7 @@
6871
use:TextColor={checked || indeterminate ? color : false}>
6972
<input
7073
type="checkbox"
74+
bind:this={inputElement}
7175
role="checkbox"
7276
aria-checked={checked}
7377
bind:checked

packages/svelte-materialify/src/components/Radio/Radio.svelte

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@
2828
// Styles for the radio wrapper.
2929
export let style = null;
3030
31+
// The <input/> element of the radio.
32+
export let inputElement = null;
33+
3134
id = id || `s-radio-${uid(5)}`;
3235
$: active = group === value;
3336
</script>
@@ -43,6 +46,7 @@
4346
use:Ripple={{ centered: true }}>
4447
<input
4548
type="radio"
49+
bind:this={inputElement}
4650
role="radio"
4751
aria-selected={active}
4852
bind:group

0 commit comments

Comments
 (0)