y200subcontrols 0.0.24 → 0.0.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<script>export let checked = false;
|
|
2
|
+
export let label = "";
|
|
3
|
+
export let id = void 0;
|
|
4
|
+
export let name = void 0;
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<label class="flex cursor-pointer">
|
|
8
|
+
<input type="checkbox" bind:checked class="hidden peer" {id} {name} />
|
|
9
|
+
<div
|
|
10
|
+
class=" rounded-full h-5 w-10 flex my-auto bg-slate-300
|
|
11
|
+
peer-checked:bg-teal-600 transition-all duration-300"
|
|
12
|
+
>
|
|
13
|
+
<div
|
|
14
|
+
class="w-5 h-5 rounded-full my-auto border border-slate-400 {!checked
|
|
15
|
+
? 'bg-slate-400 translate-x-0'
|
|
16
|
+
: ' translate-x-5 bg-slate-100 '} transition-all ease-in-out duration-300
|
|
17
|
+
"
|
|
18
|
+
/>
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
<span class="text-slate-500 my-auto mx-2 text-lg font-thin">
|
|
22
|
+
{label}
|
|
23
|
+
</span>
|
|
24
|
+
</label>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
checked?: boolean;
|
|
5
|
+
label?: string;
|
|
6
|
+
id?: string | undefined;
|
|
7
|
+
name?: string | undefined;
|
|
8
|
+
};
|
|
9
|
+
events: {
|
|
10
|
+
[evt: string]: CustomEvent<any>;
|
|
11
|
+
};
|
|
12
|
+
slots: {};
|
|
13
|
+
exports?: {} | undefined;
|
|
14
|
+
bindings?: string | undefined;
|
|
15
|
+
};
|
|
16
|
+
export type ToggleButtonProps = typeof __propDef.props;
|
|
17
|
+
export type ToggleButtonEvents = typeof __propDef.events;
|
|
18
|
+
export type ToggleButtonSlots = typeof __propDef.slots;
|
|
19
|
+
export default class ToggleButton extends SvelteComponent<ToggleButtonProps, ToggleButtonEvents, ToggleButtonSlots> {
|
|
20
|
+
}
|
|
21
|
+
export {};
|
package/dist/index.d.ts
CHANGED
|
@@ -3,4 +3,5 @@ import Button from "./components/Button.svelte";
|
|
|
3
3
|
import Card from "./components/Card.svelte";
|
|
4
4
|
import CardHeader from "./components/CardHeader.svelte";
|
|
5
5
|
import Form from "./components/Form.svelte";
|
|
6
|
-
|
|
6
|
+
import ToggleButton from "./components/ToggleButton.svelte";
|
|
7
|
+
export { Button, LoadingIndicator, Card, CardHeader, Form, ToggleButton };
|
package/dist/index.js
CHANGED
|
@@ -4,4 +4,5 @@ import Button from "./components/Button.svelte";
|
|
|
4
4
|
import Card from "./components/Card.svelte";
|
|
5
5
|
import CardHeader from "./components/CardHeader.svelte";
|
|
6
6
|
import Form from "./components/Form.svelte";
|
|
7
|
-
|
|
7
|
+
import ToggleButton from "./components/ToggleButton.svelte";
|
|
8
|
+
export { Button, LoadingIndicator, Card, CardHeader, Form, ToggleButton };
|