Releases: supermacro/elm-antd
Customizeable Vertical Offsets for Ant.Modal
This release introduces two new functions to customize the vertical offset of the modal:
withVerticalOffsetInPercentage
withVerticalOffsetInPixels
Thanks to @aszenz for the contribution!
Small, but importatnt, Modal tweaks
Fixes:
- #90
- "click" events emitted from the contents (i.e. from an input, button, etc.) of a modal do not trigger the "onCancel" event anymore.
✨ New Modal Component! ✨
This release introduces a v1 of a configurable Ant.Modal
!
Demo: https://elm-antd.netlify.app/components/modal
Docs: https://package.elm-lang.org/packages/supermacro/elm-antd/latest/Ant-Modal
UI Fixes
This release fixes the following UI bugs (mainly around explicitly setting properties, and ensuring that external CSS rules do not apply their own styles to elm-antd components):
Other fixes
I accidentally shut down the file server last month hehe ... I deployed it once more and updated the file server to work again (in light of a breaking change I had also added last month).
So you should now be able to see source code examples again.
New TextArea!
This API introduces a text area api that can also be included in forms.
There was also some cleanup related to switching over to normalize.css
.
Changes
Ant.Form - MAJOR
Added:
textareaField :
{ rows : Basics.Int }
-> { parser : String.String -> Result.Result String.String output
, value : values -> String.String
, update : String.String -> values -> values
, error : values -> Maybe.Maybe String.String
, attributes : Ant.Form.InputField.Attributes
}
-> Ant.Form.Form values output
Changed:
- type TextType = TextRaw | TextArea
+ type TextType = TextRaw | TextArea { rows : Basics.Int }
Ant.Input - MAJOR
Added:
withTextAreaType :
{ rows : Basics.Int } -> Ant.Input.Input msg -> Ant.Input.Input msg
Removed:
type InputType msg
= Text
| Password { textVisible : Bool } (Bool -> msg)
Ant.Space - MINOR
Added:
withFullCrossAxisSize : Ant.Space.Space msg -> Ant.Space.Space msg
Ant.Theme - MAJOR
Added:
createMonochromaticColors :
Color.Color -> Basics.Float -> Ant.Theme.Colors -> Ant.Theme.Colors
defaultColors : Ant.Theme.Colors
Removed:
createTheme : Color -> Theme
Changed:
- type alias Theme = { colors : Colors }
+ type alias Theme =
{ colors : Ant.Theme.Colors
, typography : Ant.Theme.TypographyOptions
}
Expose view functions for Ant.Form 🤦♂️
Total derp. I forgot to expose the Ant.Form.View
functions in the v6.0.0
release.
Now you can call Ant.Form.View.toHtml
to render your forms into Html msg
!
✨ FORMS ✨ + new functionality + breaking changes
Introducing a delightful Ant.Form
API!
This is a fork of hecrj/composable-form with a near-identical API.
There are currently only three fields that this API currently renders (input
, password
, and checkbox
) but more will come over time.
Check out the complex form demo over at https://elm-antd.netlify.com/components/form to see the API in action.
Full Changelog / Diff
---- ADDED MODULES - MINOR ----
Ant.Form
Ant.Form.CheckboxField
Ant.Form.InputField
Ant.Form.PasswordField
---- Ant.Button - MINOR ----
Added:
type HtmlButtonType = Button_ | Reset | Submit
withHtmlType :
Ant.Button.HtmlButtonType
-> Ant.Button.Button msg
-> Ant.Button.Button msg
---- Ant.Checkbox - MAJOR ----
Changed:
- checkbox : Bool -> Checkbox msg
+ checkbox : Ant.Checkbox.Checkbox msg
- toHtml : Checkbox msg -> Html msg
+ toHtml : Basics.Bool -> Ant.Checkbox.Checkbox msg -> Html.Html msg
- withOnCheck : msg -> Checkbox msg -> Checkbox msg
+ withOnCheck :
(Basics.Bool -> msg)
-> Ant.Checkbox.Checkbox msg
-> Ant.Checkbox.Checkbox msg
---- Ant.Input - MAJOR ----
Added:
withPasswordType :
(Basics.Bool -> msg)
-> Basics.Bool
-> Ant.Input.Input msg
-> Ant.Input.Input msg
Removed:
type Model
getValue : Model -> String
init : Model
setValue : String -> Model -> Model
withType : InputType -> Input msg -> Input msg
Changed:
- type InputType = Text | Password
+ type InputType msg
= Text
| Password { textVisible : Basics.Bool } (Basics.Bool -> msg)
- input : (Model -> msg) -> Input msg
+ input : (String.String -> msg) -> Ant.Input.Input msg
- toHtml : Model -> Input msg -> Html msg
+ toHtml : String.String -> Ant.Input.Input msg -> Html.Html msg
---- Ant.Typography.Text - MAJOR ----
Added:
type LinkTarget = Blank | Self | Parent | Top
withType :
Ant.Typography.Text.TextType
-> Ant.Typography.Text.Text
-> Ant.Typography.Text.Text
Removed:
textType : TextType -> Text -> Text
Changed:
- type TextType = Primary | Secondary | Warning | Danger
+ type TextType
= Primary
| Link Ant.Typography.Text.Url Ant.Typography.Text.LinkTarget
| Secondary
| Warning
| Danger
New Password Input + overall changes to Input component
This release introduces a new input field for passwords!
This is also a breaking change because the way the state of inputs works has now changed.
✨ New Checkbox component ✨
This release introduces Ant.Checkbox
!
Head over to https://elm-antd.netlify.app/components/checkbox to see Ant.Checkbox
in action.
Space default orientation is now horizontal
Ant.Space
will, by default, now render components horizontally instead of vertically.
Thanks to @joshuanianji for the contribution!