1use {
2 rooting::{
3 el,
4 El,
5 },
6};
7
8pub const CSS_CLASS_LABEL: &'static str = "rf_label";
10
11pub const CSS_CLASS_SMALL_INPUT: &'static str = "rf_input_small";
14
15pub const CSS_CLASS_BIG_INPUT: &'static str = "rf_input_big";
18
19pub const CSS_CLASS_OPTION_ENABLE: &'static str = "rf_input_option";
21
22pub const CSS_CLASS_ERROR: &'static str = "rf_error";
25
26pub const CSS_CLASS_SUBFORM: &'static str = "rf_subform";
28pub const CSS_CLASS_BUTTON_ICON: &'static str = "rf_button_icon";
29
30pub const CSS_CLASS_TEXT: &'static str = "rf_input_text";
32
33pub const CSS_CLASS_HIDDEN: &'static str = "disable_hide";
36pub const CSS_CLASS_VEC: &'static str = "rf_vec";
37pub const CSS_CLASS_VEC_ITEMS: &'static str = "rf_vec_items";
38pub const CSS_CLASS_VEC_ITEM_HEADER: &'static str = "rf_vec_item_header";
39pub const CSS_CLASS_BUTTON_ICON_DELETE: &'static str = "rf_button_delete";
40pub const CSS_CLASS_BUTTON_ICON_ADD: &'static str = "rf_button_add";
41pub const CSS_CLASS_BUTTON_ICON_MOVE_DOWN: &'static str = "rf_button_move_up";
42pub const CSS_CLASS_BUTTON_ICON_MOVE_UP: &'static str = "rf_button_move_down";
43
44pub const ATTR_LABEL: &'static str = "aria-label";
46
47pub fn css_class_depth(depth: usize) -> String {
48 return format!("rf_depth_m7_{}", 1 + depth % 7);
49}
50
51pub fn err_el() -> El {
52 return el("span").classes(&[CSS_CLASS_ERROR]);
53}