day_spec/controls/searchfield.rs
1// Copyright © The Daybrite Project
2// SPDX-License-Identifier: MPL-2.0
3
4pub const KIND: &str = "day.piece.searchfield";
5
6/// Full props (realize). `text` seeds the control; `placeholder` is the empty-state prompt. Only
7/// `text` changes after build (via [`SearchPatch::SetText`]); the placeholder is fixed at build.
8#[derive(Clone, Debug, Default, PartialEq)]
9pub struct SearchProps {
10 pub text: String,
11 pub placeholder: String,
12}
13
14/// The single imperative update: replace the control's text (programmatic sync from the signal).
15#[derive(Clone, Debug, PartialEq)]
16pub enum SearchPatch {
17 SetText(String),
18}