Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 2.0 #96

Merged
merged 27 commits into from
Jun 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
4b64dae
Move <Listbox> to bind:value
rgossiaux May 25, 2022
ead93ef
Move <Switch> to bind:checked
rgossiaux May 25, 2022
2eff7eb
Move <RadioGroup> to bind:value
rgossiaux May 25, 2022
6118b75
Version documentation
rgossiaux May 25, 2022
beb5c2c
Add latest/ version to docs
rgossiaux May 25, 2022
b516eb8
Make some changes to on:change
rgossiaux May 25, 2022
dc04180
Move docs/__layout.svelte to versioned code
rgossiaux Jun 11, 2023
58b75e5
Fix sidebar component
rgossiaux Jun 11, 2023
85b7502
Fix app.css imports; fix Listbox example
rgossiaux Jun 11, 2023
3def900
Add redirect to latest docs version
rgossiaux Jun 11, 2023
25e152d
Remove references to custom events from latest/ docs
rgossiaux Jun 11, 2023
887a05d
Update Headless UI docs page
rgossiaux Jun 11, 2023
7605c66
Rename the Transition events to match the Svelte names
rgossiaux Jun 11, 2023
bba8bc1
Move to <svelte:element> in Render.svelte
rgossiaux Jun 11, 2023
c119337
Remove unused ManagedListbox test component
rgossiaux Jun 11, 2023
052eb9a
Minor updates to test code
rgossiaux Jun 11, 2023
24de2c3
Add version to Docs header; fix broken links
rgossiaux Jun 11, 2023
82408d0
Fix home link
rgossiaux Jun 11, 2023
6fb5c3c
Move latest/ to 2.0/
rgossiaux Jun 11, 2023
821ba02
Rename references from latest/ to 2.0/
rgossiaux Jun 11, 2023
365fbd9
Upgrade minimum Svelte version to 3.47
rgossiaux Jun 11, 2023
61baf65
Also increase minimum Svelte version
rgossiaux Jun 11, 2023
59f78b1
Update package-lock.json
rgossiaux Jun 11, 2023
586cac0
Add links to other docs versions
rgossiaux Jun 11, 2023
746c91e
Add migration notes to version history
rgossiaux Jun 11, 2023
2134daf
Port "Ensure correct DOM node order when performing focus actions"
rgossiaux Jun 11, 2023
c832342
Fix version history links
rgossiaux Jun 11, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"test": "jest"
},
"peerDependencies": {
"svelte": "^3.44.0"
"svelte": "^3.47.0"
},
"devDependencies": {
"@babel/cli": "^7.16.0",
Expand Down Expand Up @@ -57,7 +57,7 @@
"prettier-plugin-svelte": "^2.4.0",
"rehype-autolink-headings": "^6.1.1",
"rehype-slug": "^5.0.1",
"svelte": "^3.44.0",
"svelte": "^3.47.0",
"svelte-check": "^2.4.1",
"svelte-inline-compile": "^0.0.1",
"svelte-jester": "^2.1.5",
Expand Down
4 changes: 4 additions & 0 deletions src/lib/components/description/description.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ it("should be possible to use a DescriptionProvider and a single Description, an
</p>




<span>
Contents
Expand Down Expand Up @@ -87,6 +88,7 @@ it("should be possible to use a DescriptionProvider and multiple Description com
</p>




<span>
Contents
Expand All @@ -99,6 +101,7 @@ it("should be possible to use a DescriptionProvider and multiple Description com
</p>



</div>
`);
});
Expand All @@ -124,6 +127,7 @@ it("should be possible to use a DescriptionProvider with slot props", async () =
</p>




<span>
Contents
Expand Down
7 changes: 7 additions & 0 deletions src/lib/components/label/label.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ it("should be possible to use a LabelProvider and a single Label, and have them
</label>




<span>
Contents
Expand Down Expand Up @@ -93,6 +94,7 @@ it("should be possible to use a LabelProvider and multiple Label components, and
</label>




<span>
Contents
Expand All @@ -105,6 +107,7 @@ it("should be possible to use a LabelProvider and multiple Label components, and
</label>



</div>
`);
});
Expand All @@ -129,6 +132,7 @@ it("should be possible to render a Label with an `as` prop", async () => {
</p>




<span>
Contents
Expand Down Expand Up @@ -159,6 +163,7 @@ it("should be possible to change the props of a Label", async () => {
</label>




<span>
Contents
Expand All @@ -181,6 +186,7 @@ it("should be possible to change the props of a Label", async () => {
</label>




<span>
Contents
Expand Down Expand Up @@ -209,6 +215,7 @@ it("should be possible to use a LabelProvider with slot props", async () => {
</label>




<span>
Contents
Expand Down
16 changes: 5 additions & 11 deletions src/lib/components/listbox/Listbox.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
clearSearch(): void;
registerOption(id: string, dataRef: ListboxOptionDataRef): void;
unregisterOption(id: string): void;
select(value: unknown): void;
select(newValue: unknown): void;
};

const LISTBOX_CONTEXT_NAME = "headlessui-listbox-context";
Expand Down Expand Up @@ -69,7 +69,7 @@
Focus,
calculateActiveIndex,
} from "$lib/utils/calculate-active-index";
import { createEventDispatcher, getContext, setContext } from "svelte";
import { getContext, setContext } from "svelte";
import type { Readable, Writable } from "svelte/store";
import { writable } from "svelte/store";
import { match } from "$lib/utils/match";
Expand All @@ -92,13 +92,7 @@
export let value: StateDefinition["value"];

/***** Events *****/
const forwardEvents = forwardEventsBuilder(get_current_component(), [
"change",
]);

const dispatch = createEventDispatcher<{
change: any;
}>();
const forwardEvents = forwardEventsBuilder(get_current_component());

/***** Component *****/
$: orientation = (
Expand Down Expand Up @@ -229,9 +223,9 @@
return nextOptions.indexOf(currentActiveOption);
})();
},
select(value: unknown) {
select(newValue: unknown) {
if (disabled) return;
dispatch("change", value);
value = newValue;
},
});
setContext(LISTBOX_CONTEXT_NAME, api);
Expand Down
8 changes: 0 additions & 8 deletions src/lib/components/listbox/_ManagedListbox.svelte

This file was deleted.

Loading