svelte-migrate: updated files
This commit is contained in:
@@ -1,8 +0,0 @@
|
|||||||
<script context="module" lang="ts">
|
|
||||||
export function load() {
|
|
||||||
return {
|
|
||||||
status: 302,
|
|
||||||
redirect: "docs",
|
|
||||||
};
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|||||||
5
src/routes/+page.ts
Normal file
5
src/routes/+page.ts
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
import { redirect } from '@sveltejs/kit';
|
||||||
|
|
||||||
|
export function load() {
|
||||||
|
throw redirect(302, "docs");
|
||||||
|
}
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
<script context="module" lang="ts">
|
|
||||||
export function load() {
|
|
||||||
return {
|
|
||||||
status: 302,
|
|
||||||
redirect: "docs/2.0",
|
|
||||||
};
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|||||||
5
src/routes/docs/+page.ts
Normal file
5
src/routes/docs/+page.ts
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
import { redirect } from '@sveltejs/kit';
|
||||||
|
|
||||||
|
export function load() {
|
||||||
|
throw redirect(302, "docs/2.0");
|
||||||
|
}
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
# Dialog
|
# Dialog
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Preview from "./_Preview.svelte";
|
import Preview from "../_Preview.svelte";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Preview url="examples/dialog" code="" class="h-[410px] bg-indigo-300"/>
|
<Preview url="examples/dialog" code="" class="h-[410px] bg-indigo-300"/>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# Disclosure
|
# Disclosure
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Preview from "./_Preview.svelte";
|
import Preview from "../_Preview.svelte";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Preview url="examples/disclosure" code="" class="h-[370px] bg-fuchsia-300"/>
|
<Preview url="examples/disclosure" code="" class="h-[370px] bg-fuchsia-300"/>
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { Popover, PopoverButton, PopoverPanel, Transition } from "$lib";
|
import { Popover, PopoverButton, PopoverPanel, Transition } from "$lib";
|
||||||
import { ChevronDownIcon } from "@rgossiaux/svelte-heroicons/solid";
|
import { ChevronDownIcon } from "@rgossiaux/svelte-heroicons/solid";
|
||||||
import PopoverIconOne from "./_PopoverIconOne.svelte";
|
import PopoverIconOne from "../_PopoverIconOne.svelte";
|
||||||
import PopoverIconTwo from "./_PopoverIconTwo.svelte";
|
import PopoverIconTwo from "../_PopoverIconTwo.svelte";
|
||||||
import PopoverIconThree from "./_PopoverIconThree.svelte";
|
import PopoverIconThree from "../_PopoverIconThree.svelte";
|
||||||
|
|
||||||
const solutions = [
|
const solutions = [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -373,7 +373,7 @@ You can use [actions](https://svelte.dev/tutorial/actions) with this library as
|
|||||||
```svelte
|
```svelte
|
||||||
<script>
|
<script>
|
||||||
import { Switch } from "@rgossiaux/svelte-headlessui";
|
import { Switch } from "@rgossiaux/svelte-headlessui";
|
||||||
import { action1, action2, action3 } from "./my-library";
|
import { action1, action2, action3 } from "../my-library";
|
||||||
let action1options = {};
|
let action1options = {};
|
||||||
let action3options = { foo: true };
|
let action3options = { foo: true };
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# Listbox
|
# Listbox
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Preview from "./_Preview.svelte";
|
import Preview from "../_Preview.svelte";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Preview url="examples/listbox" code="" class="h-[410px] bg-orange-300"/>
|
<Preview url="examples/listbox" code="" class="h-[410px] bg-orange-300"/>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# Menu
|
# Menu
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Preview from "./_Preview.svelte";
|
import Preview from "../_Preview.svelte";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Preview url="examples/menu" code="" class="h-[410px] bg-violet-300"/>
|
<Preview url="examples/menu" code="" class="h-[410px] bg-violet-300"/>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# Popover
|
# Popover
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Preview from "./_Preview.svelte";
|
import Preview from "../_Preview.svelte";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Preview url="examples/popover" code="" class="h-[520px] bg-orange-500"/>
|
<Preview url="examples/popover" code="" class="h-[520px] bg-orange-500"/>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# Radio Group
|
# Radio Group
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Preview from "./_Preview.svelte";
|
import Preview from "../_Preview.svelte";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Preview url="examples/radio-group" code="" class="h-[380px] bg-cyan-300"/>
|
<Preview url="examples/radio-group" code="" class="h-[380px] bg-cyan-300"/>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# Switch
|
# Switch
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Preview from "./_Preview.svelte";
|
import Preview from "../_Preview.svelte";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Preview url="examples/switch" code="" class="h-[180px] bg-teal-300"/>
|
<Preview url="examples/switch" code="" class="h-[180px] bg-teal-300"/>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# Tabs
|
# Tabs
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Preview from "./_Preview.svelte";
|
import Preview from "../_Preview.svelte";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Preview url="examples/tabs" code="" class="h-[340px] bg-blue-300"/>
|
<Preview url="examples/tabs" code="" class="h-[340px] bg-blue-300"/>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# Transition
|
# Transition
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Preview from "./_Preview.svelte";
|
import Preview from "../_Preview.svelte";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Preview url="examples/transition" code="" class="h-[340px] bg-rose-300"/>
|
<Preview url="examples/transition" code="" class="h-[340px] bg-rose-300"/>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# Dialog
|
# Dialog
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Preview from "./_Preview.svelte";
|
import Preview from "../_Preview.svelte";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Preview url="examples/dialog" code="" class="h-[410px] bg-indigo-300"/>
|
<Preview url="examples/dialog" code="" class="h-[410px] bg-indigo-300"/>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# Disclosure
|
# Disclosure
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Preview from "./_Preview.svelte";
|
import Preview from "../_Preview.svelte";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Preview url="examples/disclosure" code="" class="h-[370px] bg-fuchsia-300"/>
|
<Preview url="examples/disclosure" code="" class="h-[370px] bg-fuchsia-300"/>
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { Popover, PopoverButton, PopoverPanel, Transition } from "$lib";
|
import { Popover, PopoverButton, PopoverPanel, Transition } from "$lib";
|
||||||
import { ChevronDownIcon } from "@rgossiaux/svelte-heroicons/solid";
|
import { ChevronDownIcon } from "@rgossiaux/svelte-heroicons/solid";
|
||||||
import PopoverIconOne from "./_PopoverIconOne.svelte";
|
import PopoverIconOne from "../_PopoverIconOne.svelte";
|
||||||
import PopoverIconTwo from "./_PopoverIconTwo.svelte";
|
import PopoverIconTwo from "../_PopoverIconTwo.svelte";
|
||||||
import PopoverIconThree from "./_PopoverIconThree.svelte";
|
import PopoverIconThree from "../_PopoverIconThree.svelte";
|
||||||
|
|
||||||
const solutions = [
|
const solutions = [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -371,7 +371,7 @@ You can use [actions](https://svelte.dev/tutorial/actions) with this library as
|
|||||||
```svelte
|
```svelte
|
||||||
<script>
|
<script>
|
||||||
import { Switch } from "@rgossiaux/svelte-headlessui";
|
import { Switch } from "@rgossiaux/svelte-headlessui";
|
||||||
import { action1, action2, action3 } from "./my-library";
|
import { action1, action2, action3 } from "../my-library";
|
||||||
let action1options = {};
|
let action1options = {};
|
||||||
let action3options = { foo: true };
|
let action3options = { foo: true };
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# Listbox
|
# Listbox
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Preview from "./_Preview.svelte";
|
import Preview from "../_Preview.svelte";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Preview url="examples/listbox" code="" class="h-[410px] bg-orange-300"/>
|
<Preview url="examples/listbox" code="" class="h-[410px] bg-orange-300"/>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# Menu
|
# Menu
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Preview from "./_Preview.svelte";
|
import Preview from "../_Preview.svelte";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Preview url="examples/menu" code="" class="h-[410px] bg-violet-300"/>
|
<Preview url="examples/menu" code="" class="h-[410px] bg-violet-300"/>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# Popover
|
# Popover
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Preview from "./_Preview.svelte";
|
import Preview from "../_Preview.svelte";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Preview url="examples/popover" code="" class="h-[520px] bg-orange-500"/>
|
<Preview url="examples/popover" code="" class="h-[520px] bg-orange-500"/>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# Radio Group
|
# Radio Group
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Preview from "./_Preview.svelte";
|
import Preview from "../_Preview.svelte";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Preview url="examples/radio-group" code="" class="h-[380px] bg-cyan-300"/>
|
<Preview url="examples/radio-group" code="" class="h-[380px] bg-cyan-300"/>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# Switch
|
# Switch
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Preview from "./_Preview.svelte";
|
import Preview from "../_Preview.svelte";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Preview url="examples/switch" code="" class="h-[180px] bg-teal-300"/>
|
<Preview url="examples/switch" code="" class="h-[180px] bg-teal-300"/>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# Tabs
|
# Tabs
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Preview from "./_Preview.svelte";
|
import Preview from "../_Preview.svelte";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Preview url="examples/tabs" code="" class="h-[340px] bg-blue-300"/>
|
<Preview url="examples/tabs" code="" class="h-[340px] bg-blue-300"/>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# Transition
|
# Transition
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Preview from "./_Preview.svelte";
|
import Preview from "../_Preview.svelte";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Preview url="examples/transition" code="" class="h-[340px] bg-rose-300"/>
|
<Preview url="examples/transition" code="" class="h-[340px] bg-rose-300"/>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import PeopleList from "./_PeopleList.svelte";
|
import PeopleList from "../_PeopleList.svelte";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="flex justify-center w-screen h-full p-12 space-x-4 bg-gray-50">
|
<div class="flex justify-center w-screen h-full p-12 space-x-4 bg-gray-50">
|
||||||
|
|||||||
@@ -10,8 +10,8 @@
|
|||||||
import Portal from "$lib/components/portal/Portal.svelte";
|
import Portal from "$lib/components/portal/Portal.svelte";
|
||||||
|
|
||||||
import { createPopperActions } from "svelte-popperjs";
|
import { createPopperActions } from "svelte-popperjs";
|
||||||
import Button from "./_Button.svelte";
|
import Button from "../_Button.svelte";
|
||||||
import Link from "./_Link.svelte";
|
import Link from "../_Link.svelte";
|
||||||
|
|
||||||
let options = {
|
let options = {
|
||||||
placement: "bottom-start",
|
placement: "bottom-start",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { Transition } from "$lib";
|
import { Transition } from "$lib";
|
||||||
import Box from "./_Box.svelte";
|
import Box from "../_Box.svelte";
|
||||||
|
|
||||||
let isOpen = false;
|
let isOpen = false;
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { Transition } from "$lib";
|
import { Transition } from "$lib";
|
||||||
import Box from "./_Box.svelte";
|
import Box from "../_Box.svelte";
|
||||||
|
|
||||||
let isOpen = false;
|
let isOpen = false;
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user