Benign rust 24 installs Download

leptos_aria_combo_box 0.1.0

“Accessible filtering combo box for Leptos”

Basename is uppercase README.mdCaret or XOR expression text
SHA-256a0d14b5a06dd0b589bd60356a0c2d6eb159e5237b51d77e95d609e2c7c22d956
MaleculeH₂(CmOs)

Evidence

imports leptos::prelude::* lib.rs · lines 2–28
2:80…
3#![allow(clippy::needless_pass_by_value)]
4
5use std::sync::Arc;
6
7use leptos::prelude::*;
8use leptos_aria_list_box::ListBox;
9use leptos_aria_list_box::ListBoxOption;
10use leptos_aria_selection::Selection;
11use leptos_aria_selection::SelectionMode;
12use leptos_aria_selection::SelectionState;
13use leptos_aria_selection::UseSelectionStateProps;
14use leptos_aria_selection::use_selection_state;
15use leptos_aria_utils::merge_class;
16use wasm_bindgen::JsCast;
17
18/// One option of a combo box: a value with its text.
19#[derive(Clone, Debug, PartialEq, Eq)]
20pub struct ComboBoxItem {
21 pub value: String,
22 pub label: String,
23}
24
25/// A selection signal, the reactive read of the shared selection state.
26pub type SelectionSignal = Signal<Selection>;
27
28/// …
imports leptos::mount::mount_to lib.rs · lines 341–352
341:12… est, target_arch = "wasm32"))]
342mod tests {
343 use leptos::mount::mount_to;
344 use wasm_bindgen::JsCast;
345 use wasm_bindgen_test::*;
346
347 use super::*;
348
349 wasm_bindgen_test_configure!(run_in_browser);
350
351 #[wasm_bindgen_test]
352 async fn combo_box_ren …
assert_eq! macro lib.rs · lines 352–361
352:39… ox_role() {
353 let fixture = Fixture::mount();
354
355 assert_eq!(
356 fixture.input.get_attribute("aria-autocomplete").as_deref(),
357 Some("list")
⋯4 lines
Rust set_value method call lib.rs · lines 489–500
489:2… }
490 }
491
492 async fn type_text(&self, text: &str) {
493 self.input.set_value(text);
494 self.input
495 .dispatch_event(&web_sys::Event::new("input").unwrap())
⋯5 lines
References a public code-forge URL readme.md · lines 1–11
⋯4 lines
5# leptos_aria_combo_box
6
7> Accessible filtering combo box for Leptos.
8
9Part of [`leptos_aria`](https://crates.io/crates/leptos_aria), headless and accessible Leptos components ported from React Aria. Most projects depend on the `leptos_aria` facade crate, which re-exports this one.
10
11[Website](https://ifiokjr.github.io/leptos_aria/) · [API docs](https://docs.rs/leptos_aria_combo_box) · [Tailwind guide](https://ifiokjr.github.io/leptos_aria/tailwind.html) · [Repository](https://github.com/ifiokjr/leptos_aria)

No evidence locations were recorded for this file. Raw result

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.