Replaced underscores in HTML element attributes with dashes because Phoenix LiveView 0.19 no longer does automatic substitution.
Updated components:
select
: attrprompt
is ignored whenis_multiple
is also used. This preventsPhoenix.HTML.Form.multiple_select/4
from raising an error.
Breaking change: action_list_item
now always renders a checkbox group, also when is_multiple_select
is set on the list items. This change makes handling form data in events more consistent: the data will always consist of a list of checkbox values.
Fixes a bug introduced in 0.2.6
where single select action_list_item
s did not get unique ids.
- Fixes a bug where
FormHelpers.field_state
did not handle forms without a changeset. - Updated components:
text_input
: added attrsname
andvalue
checkbox
: add attrschecked
,checked_value
,hidden_input
- Update
@primer/css
to21.0.0
.
Updated components:
action_menu
andselect_menu
:- Added
prompt
slot attroptions
to pass Prompt options. This enables (for example) to postpone submitting a form in the menu by callingsubmit
event in the Prompt functionswillHide
ordidHide
.
- Added
- Fixes a bug where variables in error messages where not interpolated.
- Update to
phoenix_html
3.3.x
- Clarified
layout
attributes to change the rendered order of slots. - Improve field name and id generation.
- Use checkboxes and radio buttons in action lists.
Updated component:
checkbox
:- Added attr
is_multiple
: When creating a list of checkboxes. Appends[]
to the input name so that a list of values is passed to the form events. - Added attr
is_omit_label
: Omits any label.
- Added attr
Updated component:
text_input
:- Moved attr
is_trailing_action_divider
to slottrailing_action
asis_divider
- Added attr
is_visible_with_value
to slottrailing_action
to only show the trailing action when the input has a value. Use this cor example to show a clear button only when the input has a value to clear.
- Moved attr
The rework includes styles from Primer ViewComponents. The form styles from this flavor of Primer is more mature than the generally used Primer CSS.
Updated components:
text_input
:- Added attr
is_monospace
- Added slots
leading_visual
andtrailing_action
- Added attr
is_trailing_action_divider
- Inputs inside a form group no longer have a background color by default; use
is_contrast
to set it explicitly - Removed validation message for hidden inputs
- Added attr
textarea
:- Added attr
is_monospace
- Use
is_contrast
to explicitly set a contrasting background color
- Added attr
checkbox
andradio_button
- Have a clearer (more colorful) appearance
- Changed the HTML structure
radio_group
- For consistency, added input styling from Primer ViewComponents radio button (keeping the initial size)
select
:- Added wrapper HTML element
- Added attr
is_monospace
- Added attr
is_large
- Added attr
is_short
- Added attr
is_shorter
- Added attr
is_full_width
- Improved styling for multiple select
subnav
with search field:- Added attr
is_wrap
to wrap child elements - Improved CSS for small screens
- Added attr
Added component:
input_validation_message
- can be used as standalone message component for inputs where the position of the validation feedback is not so obvious, for example lists of checkboxes or radio buttons
Additional:
- Added styling for input elements inside a disabled fieldset
JavaScript and CSS dependencies (from npm library primer-live
) are now incorporated in the Elixir package. The installation instructions are slightly simplified (see the documentation) and are recommended for a fresh setup. The previous installation method works just fine for existing projects.
Added anchor link attributes to button
to create a link that looks like a button.
Removed Octicon builder template files from distribution.
- Updated
octicons
dependency to17.10.1
- Code quality refactoring
- Documentation updates
Added:
theme_menu_options
to create a theme menuTheme.html_attributes
to set theme attributes on elements- Theme functions for persistent theme data in the session
Fixes an issue where validation messages did not show.
Added:
theme
Updated:
- Prevent attribute open on select menu
Added:
styled_html
Updated:
- Removed requirement for Elixir version
Updated:
- Added
is_small
fortabnav
items
Updated:
oticon
icons
Added:
drawer
Bug fix:
- Improve
action_menu
on mobile
Added:
action_menu
Bug fix:
action_link_item
: pass class tolink
slot.
First release.