Skip to content

Commit

Permalink
Upgrade svelte-check, svelte2tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
rgossiaux committed Jul 11, 2023
1 parent 4eb752c commit 888b4b3
Show file tree
Hide file tree
Showing 13 changed files with 214 additions and 114 deletions.
305 changes: 201 additions & 104 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,12 @@
"rehype-autolink-headings": "^6.1.1",
"rehype-slug": "^5.0.1",
"svelte": "^3.47.0",
"svelte-check": "^2.4.1",
"svelte-check": "^3.4.3",
"svelte-inline-compile": "^0.0.1",
"svelte-jester": "^2.1.5",
"svelte-popperjs": "^1.2.7",
"svelte-preprocess": "^4.9.8",
"svelte2tsx": "^0.5.0",
"svelte2tsx": "^0.6.15",
"tailwindcss": "^3.0.0",
"ts-jest": "^27.1.2",
"tslib": "^2.3.1",
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/listbox/Listbox.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
/** Whether the entire `Listbox` should be oriented horizontally instead of vertically */
horizontal?: boolean;
/** The selected value */
value?: StateDefinition["value"];
value: StateDefinition["value"];
};
</script>

Expand Down
3 changes: 2 additions & 1 deletion src/lib/components/listbox/ListboxOption.svelte
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<script lang="ts" context="module">
// The HTML typings include `value` so we must ignore it
type TListboxOptionProps<
TSlotProps extends {},
TAsProp extends SupportedAs
> = TPassThroughProps<TSlotProps, TAsProp, "li"> & {
> = Omit<TPassThroughProps<TSlotProps, TAsProp, "li">, "value"> & {
/** The option value */
value: unknown;
/** Whether the option should be disabled for keyboard navigation and ARIA purposes */
Expand Down
4 changes: 0 additions & 4 deletions src/lib/hooks/use-inert-others.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ let originals = new Map<

function inert(element: HTMLElement) {
element.setAttribute("aria-hidden", "true");
// @ts-expect-error `inert` does not exist on HTMLElement (yet!)
element.inert = true;
}

Expand All @@ -16,7 +15,6 @@ function restore(element: HTMLElement) {

if (original["aria-hidden"] === null) element.removeAttribute("aria-hidden");
else element.setAttribute("aria-hidden", original["aria-hidden"]);
// @ts-expect-error `inert` does not exist on HTMLElement (yet!)
element.inert = original.inert;
}

Expand Down Expand Up @@ -53,7 +51,6 @@ export function useInertOthers<TElement extends HTMLElement>(
if (interactables.size === 1) {
originals.set(child, {
"aria-hidden": child.getAttribute("aria-hidden"),
// @ts-expect-error `inert` does not exist on HTMLElement (yet!)
inert: child.inert,
});

Expand Down Expand Up @@ -83,7 +80,6 @@ export function useInertOthers<TElement extends HTMLElement>(

originals.set(child, {
"aria-hidden": child.getAttribute("aria-hidden"),
// @ts-expect-error `inert` does not exist on HTMLElement (yet!)
inert: child.inert,
});

Expand Down
1 change: 1 addition & 0 deletions src/routes/docs/1.0/examples/_PopoverIconOne.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
viewBox="0 0 48 48"
fill="none"
xmlns="http://www.w3.org/2000/svg"
{...$$props}
>
<rect width="48" height="48" rx="8" fill="#FFEDD5" />
<path
Expand Down
1 change: 1 addition & 0 deletions src/routes/docs/1.0/examples/_PopoverIconThree.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
viewBox="0 0 48 48"
fill="none"
xmlns="http://www.w3.org/2000/svg"
{...$$props}
>
<rect width="48" height="48" rx="8" fill="#FFEDD5" />
<rect x="13" y="32" width="2" height="4" fill="#FDBA74" />
Expand Down
1 change: 1 addition & 0 deletions src/routes/docs/1.0/examples/_PopoverIconTwo.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
viewBox="0 0 48 48"
fill="none"
xmlns="http://www.w3.org/2000/svg"
{...$$props}
>
<rect width="48" height="48" rx="8" fill="#FFEDD5" />
<path
Expand Down
1 change: 1 addition & 0 deletions src/routes/docs/2.0/examples/_PopoverIconOne.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
viewBox="0 0 48 48"
fill="none"
xmlns="http://www.w3.org/2000/svg"
{...$$props}
>
<rect width="48" height="48" rx="8" fill="#FFEDD5" />
<path
Expand Down
1 change: 1 addition & 0 deletions src/routes/docs/2.0/examples/_PopoverIconThree.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
viewBox="0 0 48 48"
fill="none"
xmlns="http://www.w3.org/2000/svg"
{...$$props}
>
<rect width="48" height="48" rx="8" fill="#FFEDD5" />
<rect x="13" y="32" width="2" height="4" fill="#FDBA74" />
Expand Down
1 change: 1 addition & 0 deletions src/routes/docs/2.0/examples/_PopoverIconTwo.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
viewBox="0 0 48 48"
fill="none"
xmlns="http://www.w3.org/2000/svg"
{...$$props}
>
<rect width="48" height="48" rx="8" fill="#FFEDD5" />
<path
Expand Down
2 changes: 1 addition & 1 deletion src/routes/popover/_Button.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<PopoverButton
class="px-3 py-2 bg-gray-300 border-2 border-transparent focus:outline-none focus:border-blue-900"
{...$$restProps}
{...$$props}
>
<slot />
</PopoverButton>
2 changes: 1 addition & 1 deletion src/routes/popover/_Link.svelte
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<a
href="/"
class="px-3 py-2 border-2 border-transparent hover:bg-gray-200 focus:bg-gray-200 focus:outline-none focus:border-blue-900"
{...$$restProps}
{...$$props}
>
<slot />
</a>

1 comment on commit 888b4b3

@vercel
Copy link

@vercel vercel bot commented on 888b4b3 Jul 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.