From ed4ac04c281cae70e3263539c025bd66b4c5fa3b Mon Sep 17 00:00:00 2001 From: Philippe Pittoli Date: Sat, 8 Jul 2023 03:47:13 +0200 Subject: [PATCH] Bulma: provide remaining signatures. --- src/Bulma.purs | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/Bulma.purs b/src/Bulma.purs index 2a22d96..f3be622 100644 --- a/src/Bulma.purs +++ b/src/Bulma.purs @@ -280,7 +280,8 @@ btn title action1 action2 validity true -> HE.onClick \_ -> action1 _ -> HE.onClick \_ -> action2 - +render_input :: forall w i. + Boolean -> String -> (String -> i) -> String -> Boolean -> (HP.IProp DHI.HTMLinput i) -> HH.HTML w i render_input password placeholder action value validity cond = HH.input $ [ HE.onValueInput action @@ -292,24 +293,30 @@ render_input password placeholder action value validity cond false -> [] true -> [ HP.type_ HP.InputPassword ] +field_inner :: forall w i. + Boolean -> String -> String -> (String -> i) -> String -> Boolean -> (HP.IProp DHI.HTMLinput i) -> HH.HTML w i field_inner ispassword title placeholder action value validity cond = div_field - [ div_field_label title + [ div_field_label , div_field_content $ render_input ispassword placeholder action value validity cond ] where div_field = HH.div [ HP.classes (C.field <> C.horizontal) ] - div_field_label title + div_field_label = HH.div [ HP.classes (C.field_label <> C.normal) ] [HH.label [ HP.classes C.label ] [ HH.text title ]] div_field_content content - = HH.div [HP.classes C.field_body] + = HH.div [ HP.classes C.field_body ] [ HH.div [HP.classes C.field ] [ HH.div [HP.classes C.control ] [ content ] ] ] +box_input :: forall w i. + String -> String -> (String -> i) -> String -> Boolean -> (HP.IProp DHI.HTMLinput i) -> HH.HTML w i box_input = field_inner false +box_password :: forall w i. + String -> String -> (String -> i) -> String -> Boolean -> (HP.IProp DHI.HTMLinput i) -> HH.HTML w i box_password = field_inner true section_medium :: forall w i. Array (HH.HTML w i) -> HH.HTML w i @@ -318,6 +325,8 @@ section_medium = HH.section [ HP.classes (C.section <> C.medium) ] field :: forall w i. Array HH.ClassName -> Array (HH.HTML w i) -> HH.HTML w i field classes = HH.div [ HP.classes (C.field <> classes) ] +new_domain_field :: forall w i. + (String -> i) -> String -> Array (HP.IProp DHI.HTMLselect i) -> Array String -> HH.HTML w i new_domain_field inputaction text selectaction accepted_domains = field C.has_addons [ HH.p