44 < meta charset ="utf-8 ">
55 < title > PatternFly Element | pfe-select Demo</ title >
66
7- < noscript >
8- < link href ="../../pfelement/dist/pfelement-noscript.min.css " rel ="stylesheet ">
9- </ noscript >
7+ <!-- Stylesheets for testing light DOM styles.
8+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.3.1/css/bootstrap-reboot.css">
9+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/typebase.css/0.5.0/typebase.css">
10+ -->
1011
11- < link href ="../../pfelement/dist/pfelement.min.css " rel ="stylesheet ">
12+ < link rel ="stylesheet " href ="../../pfe-styles/dist/pfe-base.css " />
13+ < link rel ="stylesheet " href ="../../pfe-styles/dist/pfe-context.css " />
14+ < link rel ="stylesheet " href ="../../pfe-styles/dist/pfe-layouts.css " />
1215
1316 <!-- uncomment the es5-adapter if you're using the umd version -->
1417 < script src ="https://cdnjs.cloudflare.com/ajax/libs/webcomponentsjs/2.3.0/custom-elements-es5-adapter.js "> </ script >
1518 < script src ="https://cdnjs.cloudflare.com/ajax/libs/webcomponentsjs/2.3.0/webcomponents-bundle.js "> </ script >
1619 < script src ="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.5/require.min.js "> </ script >
17- < script > require ( [ '../dist/pfe-select.umd.js' ] ) </ script >
20+
21+ < script >
22+ require ( [
23+ '../../pfe-band/dist/pfe-band.umd.js' ,
24+ '../dist/pfe-select.umd.js'
25+ ] ) ;
26+ </ script >
27+
28+ < noscript >
29+ < link href ="../../pfelement/dist/pfelement-noscript.min.css " rel ="stylesheet ">
30+ </ noscript >
31+
32+ < link href ="../../pfelement/dist/pfelement.min.css " rel ="stylesheet ">
33+
34+ < style >
35+ /* For demo only */
36+ label {
37+ font-size : 20px ;
38+ font-weight : 800 ;
39+ }
40+ </ style >
1841 </ head >
1942 < body unresolved >
43+ < pfe-band >
44+ < h1 slot ="pfe-band--header "> < code > <pfe-select></ code > </ h1 >
45+ < label for ="example1 "> Example one</ label >
46+ < pfe-select id ="pfe-select-success ">
47+ < select id ="example1 ">
48+ < option disabled > Please select an option</ option >
49+ < option value ="1 "> One</ option >
50+ < option value ="2 "> Two</ option >
51+ < option value ="3 "> Three</ option >
52+ </ select >
53+ </ pfe-select >
54+ < p slot ="pfe-band--footer "> < strong > Selected option:</ strong > < span id ="selectedOption "> </ span > </ p >
55+ </ pfe-band >
2056
21- < h1 > <pfe-select></ h1 >
22- < label for ="example1 "> Example one</ label >
23- < pfe-select id ="pfe-select-success ">
24- < select id ="example1 ">
25- < option disabled > Please select an option</ option >
26- < option value ="1 "> One</ option >
27- < option value ="2 "> Two</ option >
28- < option value ="3 "> Three</ option >
29- </ select >
30- </ pfe-select >
31- < p > Selected Option: < span id ="selectedOption "> </ span > </ p >
57+ < pfe-band pfe-color ="lighter ">
58+ < h1 slot ="pfe-band--header "> < code > <pfe-select></ code > with error check using < code > pfe-invalid</ code > attribute</ h1 >
59+ < label for ="example2 "> Example two</ label >
60+ < pfe-select id ="pfe-select-error ">
61+ < select id ="example2 ">
62+ < option value =""> Please select an option</ option >
63+ < option value ="1 "> One</ option >
64+ < option value ="2 "> Two</ option >
65+ < option value ="3 "> Three</ option >
66+ </ select >
67+ </ pfe-select >
68+ </ pfe-band >
3269
33- < h1 > <pfe-select> with error check using pfe-invalid attribute</ h1 >
34- < label for ="example2 "> Example two</ label >
35- < pfe-select id ="pfe-select-error ">
36- < select id ="example2 ">
37- < option value =""> Please select an option</ option >
38- < option value ="1 "> One</ option >
39- < option value ="2 "> Two</ option >
40- < option value ="3 "> Three</ option >
41- </ select >
42- </ pfe-select >
70+ < pfe-band pfe-color ="lightest ">
71+ < h1 slot ="pfe-band--header "> < code > <pfe-select></ code > with JS options and < code > <select></ code > element</ h1 >
72+ < p > In this case, the existing select element will be destroyed and options will be created through custom options array</ p >
73+ < label for ="example3 "> Example three</ label >
74+ < pfe-select id ="pfe-select-with-js-options ">
75+ < select id ="example3 ">
76+ < option value ="1 "> One</ option >
77+ < option value ="2 "> Two</ option >
78+ </ select >
79+ </ pfe-select >
80+ </ pfe-band >
4381
44- < h1 > <pfe-select> with JS options and <select> element</ h1 >
45- < p > In this case, the existing select element will be destroyed and options will be created through custom options array</ p >
46- < label for ="example3 "> Example three</ label >
47- < pfe-select id ="pfe-select-with-js-options ">
48- < select id ="example3 ">
49- < option value ="1 "> One</ option >
50- < option value ="2 "> Two</ option >
51- </ select >
52- </ pfe-select >
53-
54- < h1 > <pfe-select> with only JS options</ h1 >
55- < label for ="example4 "> Example Four</ label >
56- < pfe-select id ="pfe-select-with-js-options-only ">
57- </ pfe-select >
82+ < pfe-band pfe-color ="lighter ">
83+ < h1 slot ="pfe-band--header "> < code > <pfe-select></ code > with only JS options</ h1 >
84+ < label for ="example4 "> Example Four</ label >
85+ < pfe-select id ="pfe-select-with-js-options-only "> </ pfe-select >
86+ </ pfe-band >
5887
5988 < script >
6089 let select = document . querySelector ( "#pfe-select-success" ) ;
@@ -75,7 +104,7 @@ <h1><pfe-select> with only JS options</h1>
75104 customElements . whenDefined ( "pfe-select" ) . then ( function ( ) {
76105 // Default Options
77106 selectWithJSOptions . pfeOptions = [
78- { text : "Please select an Option " , value : "" , selected : true } ,
107+ { text : "Please select an option " , value : "" , selected : true } ,
79108 { text : 'One' , value : '1' , selected : false } ,
80109 { text : 'Two' , value : '2' , selected : false } ,
81110 { text : 'Three' , value : '3' , selected : false }
@@ -89,13 +118,12 @@ <h1><pfe-select> with only JS options</h1>
89118 customElements . whenDefined ( "pfe-select" ) . then ( function ( ) {
90119 // Default Options
91120 selectWithJSOptionsOnly . pfeOptions = [
92- { text : "Please select an Option " , value : "" , selected : true } ,
121+ { text : "Please select an option " , value : "" , selected : true } ,
93122 { text : 'One' , value : '1' , selected : false } ,
94123 { text : 'Two' , value : '2' , selected : false } ,
95124 { text : 'Three' , value : '3' , selected : false }
96125 ] ;
97126 } ) ;
98-
99127 </ script >
100128 </ body >
101129</ html >
0 commit comments