33minver: 0.16.0
44also:
55 components/dropdown-select/test.html: Testing - Dropdown Select
6+ elements/hx-select-control: < hx-select-control >
7+ elements/hx-select: < hx-select >
68---
79{% extends 'component.njk' %}
810{% block content %}
@@ -31,9 +33,8 @@ <h2 id="basic-select">Basic Select</h2>
3133 </ header >
3234
3335 < div >
34- < div class =" hxSelect " >
36+ < hx-select-control >
3537 < select
36- id ="selDemo "
3738 :disabled ="isDisabled "
3839 :required ="isRequired "
3940 >
@@ -43,10 +44,7 @@ <h2 id="basic-select">Basic Select</h2>
4344 < option value ="3 "> Option 3</ option >
4445 </ select >
4546 < hx-select > </ hx-select >
46- < label for ="selDemo ">
47- Choose an Option
48- </ label >
49- </ div >
47+ </ hx-select-control >
5048 </ div >
5149
5250 < footer >
@@ -57,40 +55,28 @@ <h2 id="basic-select">Basic Select</h2>
5755 < hx-busy > </ hx-busy >
5856 < p > Loading...</ p >
5957 </ div >
60- < p class ="hxSubBody hxSubdued ">
61- < hx-icon type ="info-circle "> </ hx-icon >
62- < code > <select></ code > must be defined before
63- < code > <hx-select></ code > and < code > <label></ code >
64- for styles to be effective.
65- </ p >
66- < p class ="hxSubBody hxSubdued ">
67- < hx-icon type ="info-circle "> </ hx-icon >
68- Extra elements will be hidden.
69- </ p >
7058 </ section >
7159
60+ <!--
61+ TODO:
62+ Need centralized documentation of HelixUI form control validation behavior.
63+ -->
7264 < section >
7365 < h2 id ="validation "> Validation</ h2 >
7466 < p class ="comfortable ">
7567 A {{page.title}} is designed to take advantage of standardized
7668 < a href ="https://mzl.la/2SuKTmv "> HTML form validation</ a > capabilities.
77- Error styles will be applied as long as the < code > <select></ code >
78- element matches the < code > :invalid</ code > CSS pseudo-class.
7969 </ p >
8070 < p >
81- There are two ways to modify validity of the
82- < code > <select></ code > element.
71+ By default, a {{page.title}} is styled as if it were valid.
72+ Otherwise, any form control that is invalid on initial render
73+ would display as invalid before the user has had a chance to
74+ interact with the form.
75+ </ p >
76+ < p >
77+ As the user interacts with a {{page.title}}, it will automatically update
78+ itself in order to communicate when it is appropriate for the browser
79+ to apply invalid control styles.
8380 </ p >
84- < ol class ="hxList ">
85- < li >
86- add or remove the < code > required</ code > attribute
87- </ li >
88- < li >
89- calling its
90- < a href ="https://mzl.la/2MQYTkd ">
91- < code > setCustomValidity()</ code >
92- </ a > method
93- </ li >
94- </ ol >
9581 </ section >
9682{% endblock %}
0 commit comments