m3e/timepicker
Timepicker is presents a time picker on a temporary surface.
This file was generated by m3e/generator
DO NOT EDIT
Types
Config is a public record for configuring this component.
pub type Config {
Config(
variant: timepicker_variant.TimepickerVariant,
mode: timepicker_mode.TimepickerMode,
orientation: timepicker_orientation.TimepickerOrientation,
date: option.Option(date.Date),
format: timepicker_format.TimepickerFormat,
max_time: option.Option(time_parts.TimeParts),
min_time: option.Option(time_parts.TimeParts),
show_seconds: ShowSeconds,
confirm_label: String,
dismiss_label: String,
dial_label: String,
input_label: String,
hour_label: String,
minute_label: String,
second_label: String,
mode_toggle_label: String,
hide_mode_toggle: HideModeToggle,
period_toggle_label: String,
for: option.Option(String),
)
}
Constructors
-
Config( variant: timepicker_variant.TimepickerVariant, mode: timepicker_mode.TimepickerMode, orientation: timepicker_orientation.TimepickerOrientation, date: option.Option(date.Date), format: timepicker_format.TimepickerFormat, max_time: option.Option(time_parts.TimeParts), min_time: option.Option(time_parts.TimeParts), show_seconds: ShowSeconds, confirm_label: String, dismiss_label: String, dial_label: String, input_label: String, hour_label: String, minute_label: String, second_label: String, mode_toggle_label: String, hide_mode_toggle: HideModeToggle, period_toggle_label: String, for: option.Option(String), )
HideModeToggle is whether to hide the mode toggle button.
pub type HideModeToggle {
IsHideModeToggle
IsNotHideModeToggle
}
Constructors
-
IsHideModeToggle -
IsNotHideModeToggle
ShowSeconds is whether to show seconds.
pub type ShowSeconds {
IsShowSeconds
IsNotShowSeconds
}
Constructors
-
IsShowSeconds -
IsNotShowSeconds
Timepicker is a View Model for this component
Fields:
- variant: The appearance variant of the picker.
- mode: The mode in which to select time.
- orientation: The orientation of the picker.
- date: The selected date.
- format: Whether to use a 12‑hour or 24‑hour clock.
- max_time: The maximum time that can be selected.
- min_time: The minimum time that can be selected.
- show_seconds: Whether to show seconds.
- confirm_label: Label given to the button used apply the selected date and close the picker.
- dismiss_label: Label given to the button used discard the selected date and close the picker.
- dial_label: Label given to the the picker when in dial mode.
- input_label: Label given to the the picker when in input mode.
- hour_label: Label for the hour field.
- minute_label: Label for the minute field.
- second_label: The label for the second field.
- mode_toggle_label: The accessible label given to the mode toggle button.
- hide_mode_toggle: Whether to hide the mode toggle button.
- period_toggle_label: The accessible label given to the period toggle.
- for: The identifier of the interactive control to which this element is attached.
pub opaque type Timepicker
Values
pub fn confirm_label(
record: Timepicker,
confirm_label: String,
) -> Timepicker
confirm_label sets the value of confirm_label for this Timepicker.
pub fn date(
record: Timepicker,
date: option.Option(date.Date),
) -> Timepicker
date sets the value of date for this Timepicker.
pub fn default_config() -> Config
default_config is the default configuration for this component.
pub const default_confirm_label: String
pub const default_date: option.Option(date.Date)
pub const default_dial_label: String
pub const default_dismiss_label: String
pub const default_for: option.Option(String)
pub const default_format: timepicker_format.TimepickerFormat
pub const default_hide_mode_toggle: HideModeToggle
pub const default_hour_label: String
pub const default_input_label: String
pub const default_max_time: option.Option(time_parts.TimeParts)
pub const default_min_time: option.Option(time_parts.TimeParts)
pub const default_minute_label: String
pub const default_mode: timepicker_mode.TimepickerMode
pub const default_mode_toggle_label: String
pub const default_orientation: timepicker_orientation.TimepickerOrientation
pub const default_period_toggle_label: String
pub const default_second_label: String
pub const default_show_seconds: ShowSeconds
pub const default_variant: timepicker_variant.TimepickerVariant
pub fn dial_label(
record: Timepicker,
dial_label: String,
) -> Timepicker
dial_label sets the value of dial_label for this Timepicker.
pub fn dismiss_label(
record: Timepicker,
dismiss_label: String,
) -> Timepicker
dismiss_label sets the value of dismiss_label for this Timepicker.
pub fn for(
record: Timepicker,
for: option.Option(String),
) -> Timepicker
for sets the value of for for this Timepicker.
pub fn format(
record: Timepicker,
format: timepicker_format.TimepickerFormat,
) -> Timepicker
format sets the value of format for this Timepicker.
pub fn from_config(config: Config) -> Timepicker
from_config creates a new Timepicker from the given configuration.
pub fn hide_mode_toggle(
record: Timepicker,
hide_mode_toggle: HideModeToggle,
) -> Timepicker
hide_mode_toggle sets the value of hide_mode_toggle for this Timepicker.
pub fn hour_label(
record: Timepicker,
hour_label: String,
) -> Timepicker
hour_label sets the value of hour_label for this Timepicker.
pub fn input_label(
record: Timepicker,
input_label: String,
) -> Timepicker
input_label sets the value of input_label for this Timepicker.
pub fn max_time(
record: Timepicker,
max_time: option.Option(time_parts.TimeParts),
) -> Timepicker
max_time sets the value of max_time for this Timepicker.
pub fn min_time(
record: Timepicker,
min_time: option.Option(time_parts.TimeParts),
) -> Timepicker
min_time sets the value of min_time for this Timepicker.
pub fn minute_label(
record: Timepicker,
minute_label: String,
) -> Timepicker
minute_label sets the value of minute_label for this Timepicker.
pub fn mode(
record: Timepicker,
mode: timepicker_mode.TimepickerMode,
) -> Timepicker
mode sets the value of mode for this Timepicker.
pub fn mode_toggle_label(
record: Timepicker,
mode_toggle_label: String,
) -> Timepicker
mode_toggle_label sets the value of mode_toggle_label for this Timepicker.
pub fn orientation(
record: Timepicker,
orientation: timepicker_orientation.TimepickerOrientation,
) -> Timepicker
orientation sets the value of orientation for this Timepicker.
pub fn period_toggle_label(
record: Timepicker,
period_toggle_label: String,
) -> Timepicker
period_toggle_label sets the value of period_toggle_label for this Timepicker.
pub fn render(
model: Timepicker,
attributes: List(attribute.Attribute(msg)),
) -> element.Element(msg)
render creates a Lustre Element for a Timepicker
pub fn render_config(
c: Config,
attributes: List(attribute.Attribute(msg)),
) -> element.Element(msg)
render_config creates a Lustre Element from a Timepicker Config
pub fn second_label(
record: Timepicker,
second_label: String,
) -> Timepicker
second_label sets the value of second_label for this Timepicker.
pub fn show_seconds(
record: Timepicker,
show_seconds: ShowSeconds,
) -> Timepicker
show_seconds sets the value of show_seconds for this Timepicker.
pub fn variant(
record: Timepicker,
variant: timepicker_variant.TimepickerVariant,
) -> Timepicker
variant sets the value of variant for this Timepicker.