-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
56 changed files
with
38,449 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
<auro-combobox> | ||
<span slot="label">Name</span> | ||
<auro-menu> | ||
<auro-menuoption value="fca" id="airport-fca" suggest="fca montana kalispell">glacier park international</auro-menuoption> | ||
<auro-menuoption value="sfo" id="airport-sfo" suggest="sfo california san francisco">san francisco international</auro-menuoption> | ||
<auro-menuoption value="boi" id="airport-boi" suggest="boi idaho boise">gowen field</auro-menuoption> | ||
<auro-menuoption value="stl" id="airport-stl" suggest="stl missouri st louis">lambert st louis international</auro-menuoption> | ||
<auro-menuoption value="ylw" id="airport-ylw" suggest="ylw british columbia kelowna">kelowna international</auro-menuoption> | ||
<auro-menuoption value="ykm" id="airport-ykm" suggest="ykm washington yakima">yakima air terminal</auro-menuoption> | ||
<auro-menuoption value="puw" id="airport-puw" suggest="puw washington pullman">pullman moscow regional</auro-menuoption> | ||
<auro-menuoption value="yeg" id="airport-yeg" suggest="yeg alberta edmonton">edmonton international</auro-menuoption> | ||
<auro-menuoption value="tpa" id="airport-tpa" suggest="tpa florida tampa">tampa international</auro-menuoption> | ||
<auro-menuoption value="msp" id="airport-msp" suggest="msp minnesota minneapolis">minneapolis st paul international</auro-menuoption> | ||
<auro-menuoption value="ida" id="airport-ida" suggest="ida idaho idaho falls">idaho falls regional airport</auro-menuoption> | ||
<auro-menuoption value="mfr" id="airport-mfr" suggest="mfr oregon medford">rogue valley international</auro-menuoption> | ||
<auro-menuoption value="psp" id="airport-psp" suggest="psp california palm springs">palm springs international</auro-menuoption> | ||
<auro-menuoption value="lir" id="airport-lir" suggest="lir guanacaste liberia">guanacaste airport</auro-menuoption> | ||
<auro-menuoption value="oak" id="airport-oak" suggest="oak california oakland">oakland international</auro-menuoption> | ||
<auro-menuoption value="bos" id="airport-bos" suggest="bos massachusetts boston">logan international</auro-menuoption> | ||
<auro-menuoption value="bwi" id="airport-bwi" suggest="bwi maryland baltimore">thurgood marshall international</auro-menuoption> | ||
<auro-menuoption value="dal" id="airport-dal" suggest="dal texas dallas">dallas love field</auro-menuoption> | ||
<auro-menuoption value="sba" id="airport-sba" suggest="sba california santa barbara">santa barbara municipal</auro-menuoption> | ||
<auro-menuoption value="mci" id="airport-mci" suggest="mci missouri kansas city">kansas city international</auro-menuoption> | ||
<auro-menuoption value="koa" id="airport-koa" suggest="koa hawaii kona">kona international</auro-menuoption> | ||
<auro-menuoption value="pvr" id="airport-pvr" suggest="pvr jalisco puerto vallarta">licenciado gustavo diaz ordaz international</auro-menuoption> | ||
<auro-menuoption value="wrg" id="airport-wrg" suggest="wrg alaska wrangell">wrangell</auro-menuoption> | ||
<auro-menuoption value="scc" id="airport-scc" suggest="scc alaska prudhoe bay">deadhorse</auro-menuoption> | ||
<auro-menuoption value="lto" id="airport-lto" suggest="lto baja california loreto">loreto international</auro-menuoption> | ||
<auro-menuoption value="ome" id="airport-ome" suggest="ome alaska nome">nome</auro-menuoption> | ||
<auro-menuoption value="ict" id="airport-ict" suggest="ict kansas wichita">dwight d eisenhower national</auro-menuoption> | ||
<auro-menuoption value="phl" id="airport-phl" suggest="phl pennsylvania philadelphia">philadelphia international</auro-menuoption> | ||
<auro-menuoption value="dfw" id="airport-dfw" suggest="dfw texas dallas">dallas fort worth international</auro-menuoption> | ||
<auro-menuoption value="ind" id="airport-ind" suggest="ind indiana indianapolis">indianapolis international</auro-menuoption> | ||
<auro-menuoption value="smf" id="airport-smf" suggest="smf california sacramento">sacramento international</auro-menuoption> | ||
<auro-menuoption value="sit" id="airport-sit" suggest="sit alaska sitka">rocky gutierrez</auro-menuoption> | ||
<auro-menuoption value="dut" id="airport-dut" suggest="dut alaska dutch harbor">unalaska</auro-menuoption> | ||
<auro-menuoption value="cdv" id="airport-cdv" suggest="cdv alaska cordova">merle mudhole smith</auro-menuoption> | ||
<auro-menuoption value="psg" id="airport-psg" suggest="psg alaska petersburg">james a johnson</auro-menuoption> | ||
<auro-menuoption value="bna" id="airport-bna" suggest="bna tennessee nashville">nashville international</auro-menuoption> | ||
<auro-menuoption value="geg" id="airport-geg" suggest="geg washington spokane">spokane international</auro-menuoption> | ||
<auro-menuoption value="ktn" id="airport-ktn" suggest="ktn alaska ketchikan">ketchikan international</auro-menuoption> | ||
<auro-menuoption value="pit" id="airport-pit" suggest="pit pennsylvania pittsburgh">pittsburgh international</auro-menuoption> | ||
<auro-menuoption value="sbp" id="airport-sbp" suggest="sbp california san luis obispo">san luis obispo regional</auro-menuoption> | ||
<auro-menuoption value="bur" id="airport-bur" suggest="bur california burbank">hollywood burbank</auro-menuoption> | ||
<auro-menuoption value="msy" id="airport-msy" suggest="msy louisiana new orleans">louis armstrong international</auro-menuoption> | ||
<auro-menuoption value="pae" id="airport-pae" suggest="pae washington everett">paine field</auro-menuoption> | ||
<auro-menuoption value="cvg" id="airport-cvg" suggest="cvg ohio cincinnati">cincinnati northern kentucky international</auro-menuoption> | ||
<auro-menuoption value="yak" id="airport-yak" suggest="yak alaska yakutat">yakutat</auro-menuoption> | ||
<auro-menuoption value="pdx" id="airport-pdx" suggest="pdx oregon portland">portland international</auro-menuoption> | ||
<auro-menuoption value="anc" id="airport-anc" suggest="anc alaska anchorage">ted stevens</auro-menuoption> | ||
<auro-menuoption value="sea" id="airport-sea" suggest="sea washington seattle">seattle tacoma international</auro-menuoption> | ||
<auro-menuoption value="san" id="airport-san" suggest="san california san diego">san diego international</auro-menuoption> | ||
<auro-menuoption value="sat" id="airport-sat" suggest="sat texas san antonio">san antonio international</auro-menuoption> | ||
<auro-menuoption value="fat" id="airport-fat" suggest="fat california fresno">fresno yosemite international</auro-menuoption> | ||
<auro-menuoption value="aus" id="airport-aus" suggest="aus texas austin">austin bergstrom international</auro-menuoption> | ||
<auro-menuoption value="ord" id="airport-ord" suggest="ord illinois chicago">ohare international</auro-menuoption> | ||
<auro-menuoption value="gdl" id="airport-gdl" suggest="gdl jalisco guadalajara">guadalajara international</auro-menuoption> | ||
<auro-menuoption value="sjc" id="airport-sjc" suggest="sjc california san jose">san jose international</auro-menuoption> | ||
<auro-menuoption value="jnu" id="airport-jnu" suggest="jnu alaska juneau">juneau international</auro-menuoption> | ||
<auro-menuoption value="rdm" id="airport-rdm" suggest="rdm oregon redmond">roberts field</auro-menuoption> | ||
<auro-menuoption value="sts" id="airport-sts" suggest="sts california sonoma">charles m schulz</auro-menuoption> | ||
<auro-menuoption value="fai" id="airport-fai" suggest="fai alaska fairbanks">fairbanks international</auro-menuoption> | ||
<auro-menuoption value="rdu" id="airport-rdu" suggest="rdu north carolina raleigh">raleigh durham international</auro-menuoption> | ||
<auro-menuoption value="oma" id="airport-oma" suggest="oma nebraska omaha">eppley airfield</auro-menuoption> | ||
<auro-menuoption value="bzn" id="airport-bzn" suggest="bzn montana bozeman">bozeman yellowstone international</auro-menuoption> | ||
<auro-menuoption value="ont" id="airport-ont" suggest="ont california ontario">ontario international</auro-menuoption> | ||
<auro-menuoption value="ogg" id="airport-ogg" suggest="ogg hawaii maui">kahului international</auro-menuoption> | ||
<auro-menuoption value="sun" id="airport-sun" suggest="sun idaho sun valley">friedman memorial</auro-menuoption> | ||
<auro-menuoption value="mzt" id="airport-mzt" suggest="mzt sinaloa mazatlan">general rafael buelna international</auro-menuoption> | ||
<auro-menuoption value="dlg" id="airport-dlg" suggest="dlg alaska dillingham">dillingham</auro-menuoption> | ||
<auro-menuoption value="adq" id="airport-adq" suggest="adq alaska kodiak">kodiak</auro-menuoption> | ||
<auro-menuoption value="den" id="airport-den" suggest="den colorado denver">denver international</auro-menuoption> | ||
<auro-menuoption value="zlo" id="airport-zlo" suggest="zlo colima manzanillo">manzanillo international</auro-menuoption> | ||
<auro-menuoption value="sjd" id="airport-sjd" suggest="sjd baja california los cabos">los cabos international</auro-menuoption> | ||
<auro-menuoption value="elp" id="airport-elp" suggest="elp texas el paso">el paso international airport</auro-menuoption> | ||
<auro-menuoption value="atl" id="airport-atl" suggest="atl georgia atlanta">hartsfield jackson international</auro-menuoption> | ||
<auro-menuoption value="lax" id="airport-lax" suggest="lax california los angeles">los angeles international</auro-menuoption> | ||
<auro-menuoption value="rsw" id="airport-rsw" suggest="rsw florida fort myers">southwest florida international</auro-menuoption> | ||
<auro-menuoption value="cle" id="airport-cle" suggest="cle ohio cleveland">cleveland hopkins international airport</auro-menuoption> | ||
<auro-menuoption value="otz" id="airport-otz" suggest="otz alaska kotzebue">ralph wien memorial</auro-menuoption> | ||
<auro-menuoption value="bze" id="airport-bze" suggest="bze belize belize city">philip sw goldson international airport</auro-menuoption> | ||
<auro-menuoption value="eat" id="airport-eat" suggest="eat washington wenatchee">pangborn memorial</auro-menuoption> | ||
<auro-menuoption value="dtw" id="airport-dtw" suggest="dtw michigan detroit">detroit metropolitan</auro-menuoption> | ||
<auro-menuoption value="bet" id="airport-bet" suggest="bet alaska bethel">bethel</auro-menuoption> | ||
<auro-menuoption value="dca" id="airport-dca" suggest="dca district of columbia washington">ronald reagan national</auro-menuoption> | ||
<auro-menuoption value="rno" id="airport-rno" suggest="rno nevada reno">reno tahoe international</auro-menuoption> | ||
<auro-menuoption value="brw" id="airport-brw" suggest="brw alaska barrow">wiley post will rogers</auro-menuoption> | ||
<auro-menuoption value="mry" id="airport-mry" suggest="mry california monterey">monterey regional</auro-menuoption> | ||
<auro-menuoption value="hnl" id="airport-hnl" suggest="hnl hawaii oahu">honolulu international</auro-menuoption> | ||
<auro-menuoption value="okc" id="airport-okc" suggest="okc oklahoma oklahoma city">will rogers world</auro-menuoption> | ||
<auro-menuoption value="iad" id="airport-iad" suggest="iad virginia dulles">washington dulles international</auro-menuoption> | ||
<auro-menuoption value="mia" id="airport-mia" suggest="mia florida miami">miami international</auro-menuoption> | ||
<auro-menuoption value="bli" id="airport-bli" suggest="bli washington bellingham">bellingham international</auro-menuoption> | ||
<auro-menuoption value="hln" id="airport-hln" suggest="hln montana helena">helena regional</auro-menuoption> | ||
<auro-menuoption value="gtf" id="airport-gtf" suggest="gtf montana great falls">great falls international</auro-menuoption> | ||
<auro-menuoption value="zih" id="airport-zih" suggest="zih guerrero zihuatanejo">ixtapa zihuatanejo international</auro-menuoption> | ||
<auro-menuoption value="yyc" id="airport-yyc" suggest="yyc alberta calgary">calgary international</auro-menuoption> | ||
<auro-menuoption value="sna" id="airport-sna" suggest="sna california santa ana">john wayne</auro-menuoption> | ||
<auro-menuoption value="fll" id="airport-fll" suggest="fll florida fort lauderdale">fort lauderdale hollywood international</auro-menuoption> | ||
<auro-menuoption value="ewr" id="airport-ewr" suggest="ewr new jersey newark">newark liberty international</auro-menuoption> | ||
<auro-menuoption value="hdn" id="airport-hdn" suggest="hdn colorado steamboat springs">yampa valley regional</auro-menuoption> | ||
<auro-menuoption value="psc" id="airport-psc" suggest="psc washington pasco">tri cities</auro-menuoption> | ||
<auro-menuoption value="tus" id="airport-tus" suggest="tus arizona tucson">tucson international</auro-menuoption> | ||
<auro-menuoption value="abq" id="airport-abq" suggest="abq new mexico albuquerque">albuquerque international sunport</auro-menuoption> | ||
<auro-menuoption value="jfk" id="airport-jfk" suggest="jfk new york new york">john f kennedy international</auro-menuoption> | ||
<auro-menuoption value="yvr" id="airport-yvr" suggest="yvr british columbia vancouver">vancouver international</auro-menuoption> | ||
<auro-menuoption value="sjo" id="airport-sjo" suggest="sjo san jose alajuela province">juan santamaria international</auro-menuoption> | ||
<auro-menuoption value="las" id="airport-las" suggest="las nevada las vegas">harry reid international airport</auro-menuoption> | ||
<auro-menuoption value="lih" id="airport-lih" suggest="lih hawaii kauai">lihue international</auro-menuoption> | ||
<auro-menuoption value="mso" id="airport-mso" suggest="mso montana missoula">missoula international</auro-menuoption> | ||
<auro-menuoption value="alw" id="airport-alw" suggest="alw washington walla walla">walla walla regional</auro-menuoption> | ||
<auro-menuoption value="mke" id="airport-mke" suggest="mke wisconsin milwaukee">milwaukee mitchell international</auro-menuoption> | ||
<auro-menuoption value="eug" id="airport-eug" suggest="eug oregon eugene">mahlon sweet field</auro-menuoption> | ||
<auro-menuoption value="akn" id="airport-akn" suggest="akn alaska king salmon">king salmon</auro-menuoption> | ||
<auro-menuoption value="cun" id="airport-cun" suggest="cun quintana roo cancun">cancun international</auro-menuoption> | ||
<auro-menuoption value="rdd" id="airport-rdd" suggest="rdd california redding">redding municipal airport</auro-menuoption> | ||
<auro-menuoption value="mco" id="airport-mco" suggest="mco florida orlando">orlando international</auro-menuoption> | ||
<auro-menuoption value="slc" id="airport-slc" suggest="slc utah salt lake city">salt lake city international</auro-menuoption> | ||
<auro-menuoption value="phx" id="airport-phx" suggest="phx arizona phoenix">sky harbor international</auro-menuoption> | ||
<auro-menuoption value="bil" id="airport-bil" suggest="bil montana billings">billings logan international</auro-menuoption> | ||
<auro-menuoption value="gst" id="airport-gst" suggest="gst alaska gustavus">gustavus</auro-menuoption> | ||
<auro-menuoption value="adk" id="airport-adk" suggest="adk alaska adak">adak</auro-menuoption> | ||
<auro-menuoption value="cvg" id="airport-cvg" suggest="cvg kentucky hebron">cincinnati northern kentucky international</auro-menuoption> | ||
<auro-menuoption value="jac" id="airport-jac" suggest="jac wyoming jackson">jackson hole airport</auro-menuoption> | ||
<auro-menuoption value="cmh" id="airport-cmh" suggest="cmh ohio columbus">john glenn columbus international</auro-menuoption> | ||
<auro-menuoption value="yyj" id="airport-yyj" suggest="yyj british columbia victoria">victoria international</auro-menuoption> | ||
<auro-menuoption value="chs" id="airport-chs" suggest="chs south carolina charleston">charleston international</auro-menuoption> | ||
<auro-menuoption value="iah" id="airport-iah" suggest="iah texas houston">george bush intercontinental</auro-menuoption> | ||
<auro-menuoption static nomatch>Unknown airport... </auro-menuoption> | ||
</auro-menu> | ||
</auro-combobox> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<auro-combobox> | ||
<span slot="label">Name</span> | ||
<auro-menu> | ||
<auro-menuoption value="Apples" id="option-0">Apples</auro-menuoption> | ||
<auro-menuoption value="Oranges" id="option-1">Oranges</auro-menuoption> | ||
<auro-menuoption value="Peaches" id="option-2">Peaches</auro-menuoption> | ||
<auro-menuoption value="Grapes" id="option-3">Grapes</auro-menuoption> | ||
<auro-menuoption value="Cherries" id="option-4">Cherries</auro-menuoption> | ||
<auro-menuoption static nomatch>No matching option</auro-menuoption> | ||
</auro-menu> | ||
</auro-combobox> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<custom-combobox> | ||
<span slot="label">Name</span> | ||
<auro-menu> | ||
<auro-menuoption value="Apples" id="option-0">Apples</auro-menuoption> | ||
<auro-menuoption value="Oranges" id="option-1">Oranges</auro-menuoption> | ||
<auro-menuoption value="Peaches" id="option-2">Peaches</auro-menuoption> | ||
<auro-menuoption value="Grapes" id="option-3">Grapes</auro-menuoption> | ||
<auro-menuoption value="Cherries" id="option-4">Cherries</auro-menuoption> | ||
<auro-menuoption static nomatch>No matching option</auro-menuoption> | ||
</auro-menu> | ||
</custom-combobox> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<auro-combobox disabled> | ||
<span slot="label">Name</span> | ||
<auro-menu> | ||
<auro-menuoption value="Apples" id="option-0">Apples</auro-menuoption> | ||
<auro-menuoption value="Oranges" id="option-1">Oranges</auro-menuoption> | ||
<auro-menuoption value="Peaches" id="option-2">Peaches</auro-menuoption> | ||
<auro-menuoption value="Grapes" id="option-3">Grapes</auro-menuoption> | ||
<auro-menuoption value="Cherries" id="option-4">Cherries</auro-menuoption> | ||
<auro-menuoption value="Prefer Alaska" id="option-5">Prefer Alaska</auro-menuoption> | ||
<auro-menuoption static nomatch>No matching option</auro-menuoption> | ||
</auro-menu> | ||
</auro-combobox> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<!-- HTML example file --> | ||
<!-- ----------------- --> | ||
<auro-combobox id="dynamicMenuExample" noFilter> | ||
<span slot="label">Name</span> | ||
<!-- | ||
The auro-combobox element requires an empty auro-menu element | ||
due to the requirements of auro-dropdown and auro-input | ||
--> | ||
<auro-menu id="initMenu"></auro-menu> | ||
</auro-combobox> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
// Javascript example file | ||
// ----------------------- | ||
import { DynamicData } from './dynamicMenuDataApi'; | ||
|
||
export function dynamicMenuExample() { | ||
// Resets the root menu | ||
function resetMenu(root) { | ||
while (root.firstChild) { | ||
root.removeChild(root.firstChild); | ||
} | ||
} | ||
|
||
// Generates HTML for menu and submenus using country & city data from an external API | ||
function generateHtml(data) { | ||
const initialMenu = document.querySelector('#initMenu'); | ||
|
||
resetMenu(initialMenu); | ||
|
||
for (let index = 0; index < data.length; index++) { | ||
let country = data[index]['country']; | ||
let cities = data[index]['cities']; | ||
|
||
generateMenuOptionHtml(initialMenu, country, country); | ||
|
||
for (let indexB = 0; indexB < cities.length; indexB++) { | ||
let subMenu = document.createElement('auro-menu'); | ||
|
||
generateMenuOptionHtml(subMenu, cities[indexB], cities[indexB]); | ||
|
||
initialMenu.appendChild(subMenu); | ||
} | ||
}; | ||
} | ||
|
||
// Helper function that generates HTML for menuoptions | ||
function generateMenuOptionHtml(menu, label, value) { | ||
let option = document.createElement('auro-menuoption'); | ||
|
||
option.value = value; | ||
option.innerHTML = label; | ||
|
||
menu.appendChild(option); | ||
} | ||
|
||
// Main javascript that runs all JS to create example | ||
const dynamicData = new DynamicData(); | ||
const dynamicMenuExample = document.querySelector('#dynamicMenuExample'); | ||
const dropdownEl = dynamicMenuExample.shadowRoot.querySelector(dynamicMenuExample.dropdownTag._$litStatic$); | ||
const inputEl = dropdownEl.querySelector(dynamicMenuExample.inputTag._$litStatic$); | ||
|
||
inputEl.addEventListener('input', () => { | ||
let data = dynamicData.getData(); | ||
data = dynamicData.filterData(data, dynamicMenuExample.value); | ||
|
||
generateHtml(data); | ||
}); | ||
} |
Oops, something went wrong.