semantic-forms 5.3.16 → 5.3.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"sourceRoot":"","sources":["../styles/globals.scss","../styles/inputs.scss","../styles/labels.scss","../styles/colspan.scss","../styles/tabs.scss","../styles/lowFlow.scss","../semanticForms.scss"],"names":[],"mappings":"AACA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;;AAEA;EA5BF;IA6BI;;;AA7BJ;EAgCE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EAEA;;;AAGF;AAAA;EAEE;EACA;EACA;EACA;;AAEA;AAAA;EACE;EACA;EACA;;AAIF;EAdF;AAAA;IAeI;;;AAIF;AAAA;EACE;;AAIF;AAAA;EACE;;AAMF;AAAA;EACE;EACA;EACA;;;AAOJ;EACE;EACA;;;AA6CF;EACE;IA1CA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IAEA;;EAEA;IA2BA;MA1BE;;;EA0BF;IAvBA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;EAEA;IACE;;;AAWJ;EA/CE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;;AAEA;EAgCF;IA/BI;;;AA+BJ;EA5BE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;;AAeJ;EAnDE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;;AAEA;EAoCF;IAnCI;;;AAmCJ;EAhCE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;E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A;;AAKF;AAAA;AAAA;EACE;;AAGF;AAAA;AAAA;EACE;EACA;;AAaN;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EAIA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAIF;EAnCF;IAoCI;IACA;IACA;IACA;;;AAGF;EA1CF;IA2CI;;;AAKJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;EAYE;EACA;EACA;EACA;;AAIF;EACE;IACE;;EAEA;IACE;IACA;IACA;IACA;IACA;IACA;;EAIJ;IACE;;;;ACzZJ;AAAA;EAKE;EACA;EACA;EACA;EACA;EACA;;AAEA;AAAA;EACE;EACA;EACA;;AAGF;AAAA;EACE;EACA;EACA;EACA;;AAEA;AAAA;EACE;;AAQF;EACE;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;;AAOF;EACE;EACA;;AAGF;EACE;EACA;EACA;EACA;;AASF;AAAA;AAAA;AAAA;AAAA;EAEE;EACA;EACA;;AAKJ;EACE;;AAOA;AAAA;AAAA;AAAA;AAAA;EAEE;;AAIJ;EAEE;;AAGF;AAAA;EAEE;;AAMF;EACE;EACA;EACA;EACA;EACA;EACA;EACA,aAlIa;EAmIb;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;;AAEA;EACE;;AAQJ;EACE;;AAGF;EAEE;;AAEA;EACE;;AAMF;EACE;;AAMN;EACE;EACA;EACA;EACA;;AAGF;AAAA;AAAA;EAGE;;AAGF;AAAA;EAEE;;AAGA;AAAA;EACE;EACA;;AAGF;AAAA;EACE;EACA;;AAGF;AAAA;EACE;EACA;;AAGF;AAAA;EACE;EACA;;AAKA;AA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AASF;AAAA;AAAA;EACE;;AAKN;AAAA;AAAA;AAAA;EAEE;;AAGF;AAAA;EACE;EACA;;AAGA;AAAA;AAAA;EAEE;;AAGE;AAAA;AAAA;EACE;;AAGF;AAAA;AAAA;EACE;EACA;EACA;;AAKJ;AAAA;AAAA;EACE;EACA;;AAKJ;AAAA;AAAA;AAAA;AAAA;AAAA;EAGE;;AAIF;AAAA;EACE;EACA;EACA;EACA;;AAIF;AAAA;AAAA;AAAA;AAAA;AAAA;EAGE;;;ACzJJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGA;EACE;EACA;EACA;;AASF;AAAA;AAAA;EAGE;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;;AAGF;EAnBF;IAoBI;;EAEA;IACE;IACA;IACA;IACA;;;AAIJ;EACE;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;;AAEA;EAEE;;AAGF;EAEE;EACA;EACA;EACA;EACA;EAEA;EAEA;EACA;EACA;EACA;;AAIJ;EACE;;AAEA;EACE;EACA;EACA;;AAGF;EACE;IACE;;;AAKF;EACE;;AAIJ;EACE;EACA;;AAKN;AAAA;EAEE;EACA;EACA;;AAGF;EACE;;AAGF;EACE;;AAIF;EACE;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;;AAEA;EACE;EACA;;AAEA;EACE;;AAEA;EAEE;EACA;EACA;;AAOJ;EACE;;AAIJ;EACE;EACA;EACA;EACA;EACA;;AAGA;EAEE;EACA;EACA;EACA;EACA;;AAGA;EACE;;AAIF;EACE;;AAIF;EACE;EACA;EACA;EACA;;AAIJ;EACE;;AAKA;EACE;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;;AAKJ;EACE;EACA;EACA;;AAKJ;EACE;;AAEA;EACE;;AAKJ;EACE;EACA;;AAEA;EACE;;AAIF;EACE;EACA;;AAIF;AAAA;AAAA;EAGE;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;;AAGF;AAAA;EAEE;EACA;;AASR;EACE;EACA;EACA;;AAIF;EACE;EACA;EACA;EACA;;AAIJ;AAAA;EAEE;EACA;EACA;EACA;EACA;;AAEA;AAAA;EACE;EACA;;AAIJ;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;;AAIJ;AAAA;EAEE;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;AAAA;EACE;;AAGF;AAAA;EACE;EACA;;AAGF;AAAA;EACE;;AAGF;AAAA;EACE;;AAGF;AAAA;AAAA;EACE;EACA;EACA;;AAGF;AAAA;AAAA;EACE;;AAKA;AAAA;AAAA;AAAA;AAAA;EACE;;AAKJ;AAAA;EACE;;AAIF;AAAA;EACE","file":"semantic-forms.css"}
1
+ {"version":3,"sourceRoot":"","sources":["../styles/globals.scss","../styles/inputs.scss","../styles/labels.scss","../styles/colspan.scss","../styles/tabs.scss","../styles/lowFlow.scss","../semanticForms.scss"],"names":[],"mappings":"AACA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;;AAEA;EA7BF;IA8BI;;;AA9BJ;EAiCE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EAEA;;;AAGF;AAAA;EAEE;EACA;EACA;EACA;;AAEA;AAAA;EACE;EACA;EACA;;AAIF;EAdF;AAAA;IAeI;;;AAIF;AAAA;EACE;;AAIF;AAAA;EACE;;AAMF;AAAA;EACE;EACA;EACA;;;AAOJ;EACE;EACA;;;AAgDF;EACE;IA7CA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IAEA;;EAEA;IA8BA;MA7BE;;;EA6BF;IA1BA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IAGA;;EAEA;IACE;;;AAWJ;EAlDE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;;AAEA;EAmCF;IAlCI;;;AAkCJ;EA/BE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAGA;;AAEA;EACE;;;AAeJ;EAtDE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;;AAEA;EAuCF;IAtCI;;;AAsCJ;EAnCE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAGA;;AAEA;EACE;;;AAoBJ;EACE;;;AAGF;EACE;IACE;;;AAIJ;EACE;;;AChIA;AAAA;EAEE;;AAGF;EACE;EACA;EACA;EACA;;AAMA;AAAA;EACE;;AAIJ;AAAA;AAAA;EAGE;EACA;EACA;EACA;EACA;EACA;EACA;;AAKA;AAAA;AAAA;EACE;EACA;;AAQF;AAAA;AAAA;EACE;;AAQO;EACP;;;AAIO;EACP;;;AAGF;AAAA;AAAA;EACE;EACA;EACA;EACA;;AAIE;AAAA;AAAA;AAAA;AAAA;EACE;;AAKJ;AAAA;AAAA;EACE;;AAIJ;AAAA;AAAA;EACE;;AAGF;AAAA;AAAA;EACE;EACA;;AAIO;EACP;EACA;;;AAGF;AAAA;AAAA;EACE;EACA;;AAGF;AAAA;AAAA;EACE;EACA;;AASA;AAAA;AAAA;EACE;;AAGF;AAAA;AAAA;EACE;;AAKN;EACE;EAEA;;AAGA;EAEE;EACA;EAEA;EACA;EACA;EACA;EACA;;AAIF;EACE;EACA;EACA;;AAEA;EACE;;AAEA;EACE;;AAGF;EACE;;AAMR;EACE;EACA;EACA;EACA;EACA;;AAEA;EACE;;AAKJ;EACE;;AAIF;EACE;EACA;EACA;EACA;EAEA;EACA;EACA,OAjOc;EAkOd,QAlOc;EAmOd;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;;AAEA;EACE;;AAKJ;EACE;;AAIF;AAAA;AAAA;AAAA;EAIE;;AAIF;AAAA;EAEE;;AAIF;AAAA;AAAA;EArQA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;AAAA;AAAA;EACE;;AAsPF;AAAA;AAAA;EAjPA;;AAEA;AAAA;AAAA;EACE;;AAoPF;EACE;;AAEA;EAEE;;AAKJ;EACE;EACA;;AAIF;EACE;EACA;EACA;EACA;;AAMA;AAAA;AAAA;AAAA;AAAA;EAEE;;AAGF;AAAA;AAAA;EACE;;AAUA;AAAA;AAAA;AAAA;AAAA;EACE;;AAGF;AAAA;AAAA;AAAA;AAAA;EACE;EACA;;AAKF;AAAA;AAAA;EACE;;AAGF;AAAA;AAAA;EACE;EACA;;AAaN;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EAIA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAIF;EAnCF;IAoCI;IACA;IACA;IACA;;;AAGF;EA1CF;IA2CI;;;AAKJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;EAYE;EACA;EACA;EACA;;AAIF;EACE;IACE;;EAEA;IACE;IACA;IACA;IACA;IACA;IACA;;EAIJ;IACE;;;;AAMN;EAjbE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;AA4ZJ;EAvZE;;AAEA;EACE;;AAoZJ;EAGE;;;ACnbA;AAAA;EAKE;EACA;EACA;EACA;EACA;EACA;;AAEA;AAAA;EACE;EACA;EACA;;AAGF;AAAA;EACE;EACA;EACA;EACA;;AAEA;AAAA;EACE;;AAQF;EACE;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;E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EACA;EAGA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAGA;EACA;EACA;EACA;EACA;;AAEA;EACE;;AAIF;EACE;EACA;EACA;EACA;;AAIF;EACE;EACA;;AAKJ;EACE;EACA;EACA;;AAIF;EACE;;AAKJ;EACE;;AAEA;EAEE;EACA;;;AC1EN;AAAA;EAEE;;AAEA;AAAA;EACE;EACA;;AAMF;AAAA;EACE;;AAEA;AAAA;EACE;;AAIA;AAAA;EACE;EACA;EACA;;AAKJ;AAAA;EACE;;AAGF;AAAA;EACE;;AAGA;AAAA;EACE;EACA;EACA;;AAKN;AAAA;EACE;EACA;;AAEA;AAAA;EACE;EACA;;AAIJ;AAAA;EACE;EACA;EACA;;AAEA;AAAA;EACE;EACA;;AAIJ;AAAA;EACE;EACA;;AAEA;AAAA;EACE;EACA;;AAIJ;AAAA;EACE;;AAEA;AAAA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAKA;AAAA;EACE;EACA;;AASF;AAAA;AAAA;EACE;;AAKN;AAAA;AAAA;AAAA;EAEE;;AAGF;AAAA;EACE;EACA;;AAGA;AAAA;AAAA;EAEE;;AAGE;AAAA;AAAA;EACE;;AAGF;AAAA;AAAA;EACE;EACA;EACA;;AAKJ;AAAA;AAAA;EACE;EACA;;AAKJ;AAAA;AAAA;AAAA;AAAA;AAAA;EAGE;;AAIF;AAAA;EACE;EACA;EACA;EACA;;AAIF;AAAA;AAAA;AAAA;AAAA;AAAA;EAGE;;;ACzJJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGA;EACE;EACA;EACA;;AASF;AAAA;AAAA;EAGE;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;;AAGF;EAnBF;IAoBI;;EAEA;IACE;IACA;IACA;IACA;;;AAIJ;EACE;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;;AAEA;EAEE;;AAGF;EAEE;EACA;EACA;EACA;EACA;EAEA;EAEA;EACA;EACA;EACA;;AAIJ;EACE;;AAEA;EACE;EACA;EACA;;AAGF;EACE;IACE;;;AAKF;EACE;;AAIJ;EACE;EACA;;AAKN;AAAA;EAEE;EACA;EACA;;AAGF;EACE;;AAGF;EACE;;AAIF;EACE;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;;AAEA;EACE;EACA;;AAEA;EACE;;AAEA;EAEE;EACA;EACA;;AAOJ;EACE;;AAIJ;EACE;EACA;EACA;EACA;EACA;;AAGA;EAEE;EACA;EACA;EACA;EACA;;AAGA;EACE;;AAIF;EACE;;AAIF;EACE;EACA;EACA;EACA;;AAIJ;EACE;;AAKA;EACE;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;;AAKJ;EACE;EACA;EACA;;AAKJ;EACE;;AAEA;EACE;;AAKJ;EACE;EACA;;AAEA;EACE;;AAIF;EACE;EACA;;AAIF;AAAA;AAAA;EAGE;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;;AAGF;AAAA;EAEE;EACA;;AASR;EACE;EACA;EACA;;AAIF;EACE;EACA;EACA;EACA;;AAIJ;AAAA;EAEE;EACA;EACA;EACA;EACA;;AAEA;AAAA;EACE;EACA;;AAIJ;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;;AAIJ;AAAA;EAEE;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;AAAA;EACE;;AAGF;AAAA;EACE;EACA;;AAGF;AAAA;EACE;;AAGF;AAAA;EACE;;AAGF;AAAA;AAAA;EACE;EACA;EACA;;AAGF;AAAA;AAAA;EACE;;AAKA;AAAA;AAAA;AAAA;AAAA;EACE;;AAKJ;AAAA;EACE;;AAIF;AAAA;EACE","file":"semantic-forms.css"}
@@ -58,7 +58,9 @@ input.addEventListener("click",clickEvent=>clickEvent.preventDefault(),{once:tru
58
58
  // returns the field, which is the new textarea when one was made
59
59
  const enhanceAutoGrow=(input,form)=>{if(input.getAttribute("data-auto-grow")===null)return input;
60
60
  // progressively enhance inputs into textareas
61
- if(input.nodeName==="INPUT"&&input.type==="text"){const newInput=document.createElement("textarea");newInput.id=input.id;newInput.class=input.class;newInput.innerText=input.value;newInput.setAttribute("data-auto-grow","");input.replaceWith(newInput);input=newInput}if(input.nodeName==="TEXTAREA")
61
+ if(input.nodeName==="INPUT"&&input.type==="text"){
62
+ // the textarea takes over everything the input had except what only an input has, so its name, its class, whether it's required, and so on all carry over
63
+ const newInput=document.createElement("textarea");for(const attribute of input.attributes)if(!["type","value","size","list","pattern"].includes(attribute.name))newInput.setAttribute(attribute.name,attribute.value);newInput.value=input.value;input.replaceWith(newInput);input=newInput}if(input.nodeName==="TEXTAREA")
62
64
  // when pressing enter while this input is focused, we want to submit
63
65
  input.addEventListener("keypress",e=>{if(e.key!=="Enter"||e.key==="Enter"&&e.shiftKey)return;e.preventDefault();form.requestSubmit()});return input};
64
66
  // the behavior of the control itself, as opposed to the labels and buttons placed around it: switches and textareas. this is all a field in a customLayout element gets, and every other field gets it too
@@ -85,8 +87,8 @@ input.style.removeProperty("width");input.style.removeProperty("box-sizing");inp
85
87
  const rows=Math.round((scrollHeight-blockPadding)/lineHeight);
86
88
  // set the calculated rows attribute (limited by rowLimit)
87
89
  if(maxRows)input.setAttribute("rows",""+Math.min(rows,Number(maxRows)));else input.setAttribute("rows",""+rows)};input.addEventListener("input",handleInput);
88
- // trigger the event to set the initial rows value
89
- input.dispatchEvent(new Event("input",{bubbles:true}))}
90
+ // set the initial rows value. this calls the sizing directly rather than firing an input event, which would tell the app's own listeners the user had changed the field
91
+ handleInput()}
90
92
  // progressively enhance textarea for Firefox and Safari
91
93
  // this may be removed once fully supported in Firefox and Safari: https://caniuse.com/wf-field-sizing
92
94
  if(input.getAttribute("data-auto-grow")!==null)if(!("fieldSizing"in document.createElement("input").style)){const adjustHeight=()=>{if(input.value.length){const borderWidth=parseInt(window.getComputedStyle(input).getPropertyValue("border-width"));input.style.height=input.scrollHeight+borderWidth*2+"px"}else input.style.height=window.getComputedStyle(form).getPropertyValue("--semanticFormsInputHeight")};
@@ -95,30 +97,33 @@ input.style.height=window.getComputedStyle(form).getPropertyValue("--semanticFor
95
97
  // shifts the clear button to the right if a scrollbar is present
96
98
  const shiftClearBtn=()=>{const clearBtn=input.parentElement?.querySelector("button.clear");if(clearBtn)clearBtn.style.marginRight=input.clientHeight<input.scrollHeight?"15px":""};input.addEventListener("input",shiftClearBtn);input.addEventListener("mouseup",shiftClearBtn);shiftClearBtn()}};const enhanceInput=(input,form)=>{
97
99
  // ignore input if it has previously been formatted
98
- if(input.classList.contains("semanticform")||!input.id)return;const type=input.getAttribute("type");if(!lookups.nodeName.includes(input.nodeName)&&!lookups.inputType.includes(type))return;
100
+ if(input.classList.contains("semanticform"))return;const type=input.getAttribute("type");if(!lookups.nodeName.includes(input.nodeName)&&!lookups.inputType.includes(type))return;
101
+ // a field without an id has no label to float or place buttons beside, but the control itself is still enhanced, such as a switch being given its role and dragging
102
+ if(!input.id){input.classList.add("semanticform");enhanceControl(input,type,form);return}
99
103
  // inside a customLayout element the app lays out the <dl> itself, so nothing is added, moved or rewritten around the field: no float label, no clear or show password button, no wrapping <div>, no required asterisk or help icon, and no value appended to the label of a range. the control itself is still enhanced. it is marked like any other enhanced field so that reinitializing does not enhance it twice
100
- if(input.closest(".customLayout")){input.classList.add("semanticform");enhanceControl(enhanceAutoGrow(input,form),type,form);return}
104
+ if(input.closest(".customLayout")){input.classList.add("semanticform");input=enhanceAutoGrow(input,form);enhanceControl(input,type,form);if(type==="range"&&input.getAttribute("data-display-value")!==null)displayRangeValue(input,null);return}
101
105
  // recursively find <dl> element
102
106
  let dl=input.parentNode;while(dl&&dl.nodeName!=="DL")dl=dl.parentNode;if(!dl)return;if(!dl.classList.contains("floatLabelForm"))dl.classList.add("floatLabelForm");
103
107
  // the label is looked up in the input's own tree rather than the document, so that a form inside a shadow root finds its labels instead of coming up empty
104
- const tree=input.getRootNode();const label=input.parentNode.parentNode.id&&(type==="checkbox"||type==="radio")?tree.querySelector("label[data-for="+input.parentNode.parentNode.id.replace(/\./g,"\\.")+"]"):tree.querySelector("label[for="+input.id.replace(/\./g,"\\.")+"]");if(!label){console.error(`semantic-forms: Found an input (${input.id||input.getAttribute("name")}) without a properly associated label. Make sure there is a label for it and the label has a matching "for" attribute.`);return}input.classList.add("semanticform");
108
+ const tree=input.getRootNode();const label=input.parentNode.parentNode.id&&(type==="checkbox"||type==="radio")?tree.querySelector(`label[data-for="${window.CSS.escape(input.parentNode.parentNode.id)}"]`):tree.querySelector(`label[for="${window.CSS.escape(input.id)}"]`);if(!label){console.error(`semantic-forms: Found an input (${input.id||input.getAttribute("name")}) without a properly associated label. Make sure there is a label for it and the label has a matching "for" attribute.`);return}input.classList.add("semanticform");
105
109
  // an input outside a <dd> is reported by the checks further down, so tolerate it here
106
110
  const isWrapped=input.closest("dd")?.parentElement.nodeName==="DIV";
107
111
  // #region create labels
108
- const newLabel=document.createElement("label");newLabel.className="floatLabelFormAnimatedLabel";if(type==="checkbox"||type==="radio"){const div=isWrapped?input.closest("dd").parentElement:document.createElement("div");const dt=label.closest("dt");const dd=input.closest("dd");if(!dt||!dd){console.error(`semantic-forms: Found an input (${input.id||input.getAttribute("name")}) that is not inside a <dd> element.`);return}if(dd.firstChild.nodeName!=="LABEL"){if(type==="checkbox"&&input.parentNode.nodeName==="DD"){newLabel.setAttribute("for",input.id);input.parentNode.classList.add("singleCheckbox");newLabel.className="";label.setAttribute("hidden","hidden");insertAfter(newLabel,input)}if(type==="radio"&&input.parentNode.nodeName==="DD"){newLabel.setAttribute("for",input.id);input.parentNode.classList.add("singleRadio");newLabel.className="";label.setAttribute("hidden","hidden");insertAfter(newLabel,input)}newLabel.innerHTML=label.innerHTML;if(label.hasAttribute("title")&&label.getAttribute("data-show-help-icon")!==null&&!label.querySelector("span.help")){const text=label.getAttribute("title");label.innerHTML+=` <span title="${text}" class="help">${icons.helpIcon}</span>`;newLabel.innerHTML+=` <span title="${text}" class="help">${icons.helpIcon}</span>`}if(dd.querySelector(":required")&&label.getAttribute("data-no-asterisk")===null&&!label.querySelector("span.required")){const text=label.getAttribute("data-asterisk-text")||"This field is required.";label.innerHTML+=` <span title="${text}" class="required">*</span>`;newLabel.innerHTML+=` <span title="${text}" class="required">*</span>`}if(!dd.querySelector("label"))dd.append(newLabel)}
112
+ const newLabel=document.createElement("label");newLabel.className="floatLabelFormAnimatedLabel";if(type==="checkbox"||type==="radio"){const div=isWrapped?input.closest("dd").parentElement:document.createElement("div");const dt=label.closest("dt");const dd=input.closest("dd");if(!dt||!dd){console.error(`semantic-forms: Found an input (${input.id||input.getAttribute("name")}) that is not inside a <dd> element.`);return}if(dd.firstChild.nodeName!=="LABEL"){if(type==="checkbox"&&input.parentNode.nodeName==="DD"){newLabel.setAttribute("for",input.id);input.parentNode.classList.add("singleCheckbox");newLabel.className="";label.setAttribute("hidden","hidden");insertAfter(newLabel,input)}if(type==="radio"&&input.parentNode.nodeName==="DD"){newLabel.setAttribute("for",input.id);input.parentNode.classList.add("singleRadio");newLabel.className="";label.setAttribute("hidden","hidden");insertAfter(newLabel,input)}newLabel.innerHTML=label.innerHTML;if(label.hasAttribute("title")&&label.getAttribute("data-show-help-icon")!==null&&!label.querySelector("span.help")){const text=label.getAttribute("title");appendBadge(label,"help",text,icons.helpIcon);appendBadge(newLabel,"help",text,icons.helpIcon)}if(dd.querySelector(":required")&&label.getAttribute("data-no-asterisk")===null&&!label.querySelector("span.required")){const text=label.getAttribute("data-asterisk-text")||"This field is required.";appendBadge(label,"required",text,"*");appendBadge(newLabel,"required",text,"*")}if(!dd.querySelector("label"))dd.append(newLabel)}
109
113
  // if the user did not wrap the input in a div, do it for them
110
114
  if(!isWrapped){
111
115
  // the wrapper goes where the <dt> was, so the field keeps its place in the markup. a div the author wrote is already in the right place and is deliberately left where it is: moving it would push the field past anything the enhancer does not touch, such as a <dd> holding only a button
112
116
  dt.before(div);div.append(dt,dd);
113
117
  // determine visibility of newly created <div>
114
- if(dt.style.display==="none"&&dd.style.display==="none")div.style.display="none"}}else{newLabel.setAttribute("for",input.id);newLabel.innerHTML=label.innerHTML;if(input.hasAttribute("title")&&label.getAttribute("data-show-help-icon")!==null&&!label.querySelector("span.help")){const text=input.getAttribute("title");newLabel.innerHTML+=` <span title="${text}" class="help">${icons.helpIcon}</span>`}if(input.hasAttribute("required")&&label.getAttribute("data-no-asterisk")===null&&!label.querySelector("span.required")){const text=label.getAttribute("data-asterisk-text")||"This field is required.";newLabel.innerHTML+=` <span title="${text}" class="required">*</span>`}label.setAttribute("hidden","hidden");insertAfter(newLabel,input)}
118
+ if(dt.style.display==="none"&&dd.style.display==="none")div.style.display="none"}}else{newLabel.setAttribute("for",input.id);newLabel.innerHTML=label.innerHTML;if(input.hasAttribute("title")&&label.getAttribute("data-show-help-icon")!==null&&!label.querySelector("span.help"))appendBadge(newLabel,"help",input.getAttribute("title"),icons.helpIcon);if(input.hasAttribute("required")&&label.getAttribute("data-no-asterisk")===null&&!label.querySelector("span.required"))appendBadge(newLabel,"required",label.getAttribute("data-asterisk-text")||"This field is required.","*");label.setAttribute("hidden","hidden");insertAfter(newLabel,input)}
115
119
  // #endregion
116
120
  // #region standard inputs
117
121
  input=enhanceAutoGrow(input,form);if(type!=="checkbox"&&type!=="radio"){if(!input.getAttribute("placeholder"))input.setAttribute("placeholder"," ");const div=isWrapped?input.closest("dd").parentElement:document.createElement("div");const dt=label.closest("dt");const dd=input.closest("dd");if(!dt||!dd){console.error(`semantic-forms: Found an input (${input.id||input.getAttribute("name")}) that does not have a corresponding ${!dt?"<dt>":"<dd>"} element.`);return}
118
122
  // input clear button. a field the user cannot edit does not get one, since the button would empty it anyway. a field that only becomes uneditable later is handled in css
119
- if(input.nodeName!=="SELECT"&&type!=="range"&&!input.readOnly&&!input.disabled){const clearBtn=document.createElement("button");clearBtn.type="button";clearBtn.title=input.getAttribute("data-clear-field-text")||"Clear field";clearBtn.ariaLabel=input.getAttribute("data-clear-field-text")||"Clear field";clearBtn.tabIndex=-1;clearBtn.innerHTML='<svg viewBox="0 0 16 16" width="18" height="18"><path d="M 1 1 L 15 15 M 1 15 L 15 1" fill="none" stroke-width="2" stroke="currentColor" />';clearBtn.classList.add("clear");clearBtn.id=`semanticFormsClearButton_${input.id}`;clearBtn.addEventListener("click",()=>{input.previousValue=input.value;input.value="";input.focus();lastClearFieldPressed=input.id;
120
- // used for any other updates required by various inputs
121
- input.dispatchEvent(new Event("input",{bubbles:true}))});insertAfter(clearBtn,dd.querySelector("label"))}input.addEventListener("focus",event=>{if(event.target.nodeName==="INPUT")lastFocusedInput=event.target});
123
+ if(input.nodeName!=="SELECT"&&type!=="range"&&!input.readOnly&&!input.disabled){const clearBtn=document.createElement("button");clearBtn.type="button";clearBtn.title=input.getAttribute("data-clear-field-text")||"Clear field";clearBtn.ariaLabel=input.getAttribute("data-clear-field-text")||"Clear field";clearBtn.tabIndex=-1;clearBtn.innerHTML='<svg viewBox="0 0 16 16" width="18" height="18"><path d="M 1 1 L 15 15 M 1 15 L 15 1" fill="none" stroke-width="2" stroke="currentColor" />';clearBtn.classList.add("clear");clearBtn.setAttribute("data-semantic-forms-clear","");// (what marks it as a clear button, whatever its title says)
124
+ clearBtn.id=`semanticFormsClearButton_${input.id}`;clearBtn.addEventListener("click",()=>{input.previousValue=input.value;input.value="";input.focus();lastClearFieldPressed=input.id;
125
+ // the field has been changed, as typing in it and leaving it would change it, so it says so the same way
126
+ input.dispatchEvent(new Event("input",{bubbles:true}));input.dispatchEvent(new Event("change",{bubbles:true}))});insertAfter(clearBtn,dd.querySelector("label"))}input.addEventListener("focus",event=>{if(event.target.nodeName==="INPUT")lastFocusedInput=event.target});
122
127
  // the colspan- and col- utility classes are documented as going on the dd, but they size and place the grid item, which is the div wrapping it, so move any of them across
123
128
  for(const utility of dd.className.match(/colspan-(?:[0-9]|full)|col-[0-9]/g)||[]){dd.classList.remove(utility);div.classList.add(utility)}
124
129
  // check for max-content attribute
@@ -134,9 +139,20 @@ if(dt.style.display==="none"&&dd.style.display==="none")div.style.display="none"
134
139
  // handle file input clear btn, cannot be handled with CSS
135
140
  if(type==="file"){const clearBtn=input.parentElement.querySelector(".clear");input.addEventListener("input",event=>{clearBtn.style.display=event.target.files.length?"flex":"none"});clearBtn.addEventListener("click",()=>{clearBtn.style.display="none"})}
136
141
  // handle range inputs set to display the value. every other per-field flag in the library is a data attribute, so that is the documented way to ask for this, but the original `displayValue` class is still honored
137
- if(type==="range"&&(input.getAttribute("data-display-value")!==null||input.classList.contains("displayValue"))){const label=input.parentNode.parentNode.querySelector("dd label");label.innerHTML+=`<span class="seperator">: </span><output>${input.value}</output>`;input.addEventListener("input",event=>{const output=event.target.parentNode.parentNode.querySelector("output");output.innerHTML=event.target.value})}
142
+ if(type==="range"&&(input.getAttribute("data-display-value")!==null||input.classList.contains("displayValue")))displayRangeValue(input,input.parentNode.parentNode.querySelector("dd label"));
138
143
  // show password button
139
- if(type==="password"&&input.getAttribute("data-no-reveal")===null){const showBtn=document.createElement("button");showBtn.type="button";showBtn.title=input.getAttribute("data-show-password-text")||"Show password";showBtn.ariaLabel=input.getAttribute("data-show-password-text")||"Show password";showBtn.tabIndex=-1;showBtn.innerHTML=icons.passwordShow;showBtn.classList.add("show");showBtn.id=`semanticFormsShowButton_${input.id}`;const dd=input.closest("dd");if(!dd){console.error(`semantic-forms: Found an input (${input.id||input.getAttribute("name")}) that is not inside a <dd> element.`);return}showBtn.addEventListener("click",()=>{if(input.type==="password"){showBtn.innerHTML=icons.passwordHide;showBtn.title=input.getAttribute("data-hide-password-text")||"Hide password";showBtn.ariaLabel=input.getAttribute("data-hide-password-text")||"Hide password";input.type="text"}else{showBtn.innerHTML=icons.passwordShow;showBtn.title=input.getAttribute("data-show-password-text")||"Show password";showBtn.ariaLabel=input.getAttribute("data-show-password-text")||"Show password";input.type="password"}input.focus()});insertAfter(showBtn,dd.querySelector("label"))}enhanceControl(input,type,form)};const handleUndoRedo=event=>{
144
+ if(type==="password"&&input.getAttribute("data-no-reveal")===null){const showBtn=document.createElement("button");showBtn.type="button";showBtn.title=input.getAttribute("data-show-password-text")||"Show password";showBtn.ariaLabel=input.getAttribute("data-show-password-text")||"Show password";showBtn.tabIndex=-1;showBtn.innerHTML=icons.passwordShow;showBtn.classList.add("show");showBtn.id=`semanticFormsShowButton_${input.id}`;const dd=input.closest("dd");if(!dd){console.error(`semantic-forms: Found an input (${input.id||input.getAttribute("name")}) that is not inside a <dd> element.`);return}showBtn.addEventListener("click",()=>{if(input.type==="password"){showBtn.innerHTML=icons.passwordHide;showBtn.title=input.getAttribute("data-hide-password-text")||"Hide password";showBtn.ariaLabel=input.getAttribute("data-hide-password-text")||"Hide password";input.type="text"}else{showBtn.innerHTML=icons.passwordShow;showBtn.title=input.getAttribute("data-show-password-text")||"Show password";showBtn.ariaLabel=input.getAttribute("data-show-password-text")||"Show password";input.type="password"}input.focus()});insertAfter(showBtn,dd.querySelector("label"))}enhanceControl(input,type,form)};
145
+ // appends a help icon or a required asterisk to a label, with its title set as text, so a title holding quotes or markup is shown as it is rather than breaking the label
146
+ const appendBadge=(label,className,title,content)=>{const badge=document.createElement("span");badge.className=className;badge.title=title;badge.innerHTML=content;// (the library's own icon, or an asterisk)
147
+ label.append(" ",badge)};
148
+ // shows a range's value as it moves, formatted by its data-display-format attribute, in which {value} stands for the value, such as "{value}%"
149
+
150
+ // in a float label form the value goes after the label; in a customLayout element, where nothing is added around a field, it goes in the <output> for the range, if the page has one
151
+ const displayRangeValue=(input,label)=>{const format=()=>(input.getAttribute("data-display-format")||"{value}").replaceAll("{value}",input.value);let output;if(label){const separator=document.createElement("span");separator.className="seperator";separator.textContent=": ";output=document.createElement("output");label.append(separator,output)}else{output=input.getRootNode().querySelector(`output[for="${window.CSS.escape(input.id)}"]`);if(!output)return}output.textContent=format();input.addEventListener("input",()=>{output.textContent=format()})};
152
+ // marks a field invalid, which the stylesheet outlines, with a message saying why, which screen readers read along with the field. options.messageIn is the element to put the message in; by default it goes after the field, where the stylesheet shows it
153
+
154
+ // calling it again replaces the message, and clearInvalid undoes it
155
+ const setInvalid=(input,message,options={})=>{input.classList.add("invalid");input.setAttribute("aria-invalid","true");const id=`${input.id||"semanticFormsField"}SemanticFormsInvalid`;let text=input.getRootNode().getElementById?.(id)||document.getElementById(id);if(!text){text=document.createElement("p");text.id=id;text.className="semanticFormsInvalidText";if(options.messageIn)options.messageIn.append(text);else input.parentNode.append(text)}text.textContent=message;const describedBy=(input.getAttribute("aria-describedby")||"").split(" ").filter(token=>token&&token!==id);input.setAttribute("aria-describedby",[...describedBy,id].join(" "))};const clearInvalid=input=>{input.classList.remove("invalid");input.removeAttribute("aria-invalid");const id=`${input.id||"semanticFormsField"}SemanticFormsInvalid`;const text=input.getRootNode().getElementById?.(id)||document.getElementById(id);text?.remove();const describedBy=(input.getAttribute("aria-describedby")||"").split(" ").filter(token=>token&&token!==id);if(describedBy.length)input.setAttribute("aria-describedby",describedBy.join(" "));else input.removeAttribute("aria-describedby")};const handleUndoRedo=event=>{
140
156
  // handle undo/redo
141
157
  if((event.ctrlKey||event.metaKey)&&event.key==="z"&&!event.shiftKey){
142
158
  // undo clearing a field
@@ -146,7 +162,7 @@ event.preventDefault();lastFocusedInput.redoValue=lastFocusedInput.value;lastFoc
146
162
  // redo clearing a field
147
163
  if(lastFocusedInput)if(lastFocusedInput?.parentNode?.querySelector("button.clear")?.id===`semanticFormsClearButton_${lastClearFieldPressed}`||lastFocusedInput?.parentNode?.querySelector("button.clear")?.name===`semanticFormsClearButton_${lastClearFieldPressed}`)if(lastFocusedInput.redoValue){
148
164
  // as above, the browser's own redo would otherwise apply on top of this
149
- event.preventDefault();lastFocusedInput.previousValue=lastFocusedInput.value;lastFocusedInput.value=lastFocusedInput.redoValue}};module.exports={enhanceInput,handleUndoRedo}
165
+ event.preventDefault();lastFocusedInput.previousValue=lastFocusedInput.value;lastFocusedInput.value=lastFocusedInput.redoValue}};module.exports={enhanceInput,handleUndoRedo,setInvalid,clearInvalid}
150
166
  /***/},
151
167
  /***/497(module,__unused_webpack_exports,__webpack_require__){const{getOS,insertAfter}=__webpack_require__(584);const specialCharMap={Minus:"-",Equal:"=",BracketLeft:"[",BracketRight:"]",Backslash:"\\",Semicolon:";",Quote:"'",Comma:",",Period:".",Slash:"/",Backquote:"`"};const shiftSpecialCharMap={1:"!",2:"@",3:"#",4:"$",5:"%",6:"^",7:"&",8:"*",9:"(",0:")",Minus:"_",Equal:"+",BracketLeft:"{",BracketRight:"}",Backslash:"|",Semicolon:":",Quote:'"',Comma:"<",Period:">",Slash:"?",Backquote:"~"};
152
168
  // handles keyboard shortcut events
@@ -202,9 +218,11 @@ tabList.addEventListener("keydown",event=>{const current=tabs.indexOf(document.a
202
218
  // the panel carrying [data-selected] is the one that opens, defaulting to the first. without javascript every panel is on the page at once, so the attribute only means anything once the tabs have been built
203
219
  const marked=panels.filter(panel=>panel.hasAttribute("data-selected"));if(marked.length>1)console.error('semantic-forms: Found more than one <fieldset> with a "data-selected" attribute in a tab group. Only the first one will be selected.',group);group.prepend(tabList);selectTab(marked.length?panels.indexOf(marked[0]):0)}};module.exports={enhanceTabs}
204
220
  /***/},
205
- /***/90(module,__unused_webpack_exports,__webpack_require__){const{createKeyboardShortcut,shortcutListener}=__webpack_require__(497);const{enhanceInput,handleUndoRedo}=__webpack_require__(866);const{enhanceTabs}=__webpack_require__(61);const{setInkOffset}=__webpack_require__(584);
221
+ /***/90(module,__unused_webpack_exports,__webpack_require__){const{createKeyboardShortcut,shortcutListener}=__webpack_require__(497);const{enhanceInput,handleUndoRedo,setInvalid,clearInvalid}=__webpack_require__(866);const{enhanceTabs}=__webpack_require__(61);const{setInkOffset}=__webpack_require__(584);
206
222
  // one observer per tree that has been handed to semanticForms, so that a shadow root gets its own without replacing the document's
207
223
  const observers=new WeakMap;
224
+ // the keyboard shortcuts every form has asked for, kept in one list with one listener for them all, since semanticForms runs again for every form added to the page. a shortcut whose field has left the page is dropped
225
+ const keyboardShortcuts=[];let listeningForShortcuts=false;const pruneShortcuts=()=>{for(let i=keyboardShortcuts.length-1;i>=0;i--)if(!keyboardShortcuts[i].input.isConnected)keyboardShortcuts.splice(i,1)};
208
226
  // progressively enhances every semanticForms form in a tree
209
227
 
210
228
  // root: document or shadow root to search; defaults to the main document
@@ -212,7 +230,7 @@ const semanticForms=(root=document)=>{
212
230
  // do some feature detection so none of the JS executes if the browser is too old
213
231
  if(typeof document.getElementsByClassName!=="function"||typeof document.querySelector!=="function"||!document.body.classList||!window.MutationObserver){console.warn("semantic-forms was loaded into an unsupported browser and will not execute.");return}
214
232
  // custom keyboard shortcut listener
215
- const keyboardShortcuts=[];document.addEventListener("keydown",e=>shortcutListener(e,keyboardShortcuts));
233
+ if(!listeningForShortcuts){document.addEventListener("keydown",e=>shortcutListener(e,keyboardShortcuts));listeningForShortcuts=true}pruneShortcuts();
216
234
  // progressively enhance form elements that have the semanticForms class
217
235
  const forms=root.querySelectorAll("form.semanticForms:not(.semanticFormsActive), table.semanticForms:not(.semanticFormsActive)");for(const form of forms){form.classList.add("semanticFormsActive");if(form.classList.contains("lowFlow"))continue;
218
236
  // how far this font's letters sit from the middle of their own line box, which the stylesheet subtracts wherever it centers text. it is measured per form rather than per field, so that a form holding nothing but buttons is corrected too
@@ -220,7 +238,7 @@ setInkOffset(form,form);
220
238
  // update each input in the semantic form
221
239
  const inputs=Array.from(form.querySelectorAll("input, textarea, select"));for(const input of inputs){enhanceInput(input,form);
222
240
  // handle keyboard shortcuts
223
- if(input.getAttribute("data-focus-key")!==null){const shortcut=createKeyboardShortcut(input,keyboardShortcuts);keyboardShortcuts.push(shortcut)}}
241
+ if(input.getAttribute("data-focus-key")!==null&&!keyboardShortcuts.some(shortcut=>shortcut.input===input)){const shortcut=createKeyboardShortcut(input,keyboardShortcuts);keyboardShortcuts.push(shortcut)}}
224
242
  // done after the inputs so that anything sizing itself measures while it is still on screen
225
243
  enhanceTabs(form)}
226
244
  // prevents multiple listeners
@@ -234,7 +252,9 @@ if(root===document)window.semanticFormsObserver=observer}semanticForms.reinitial
234
252
  // with no form given this just rescans for forms that are not active yet
235
253
  if(!form)return semanticForms(root);form.classList.remove("semanticFormsActive");
236
254
  // the form knows which tree it belongs to, so a form in a shadow root reinitializes there
237
- semanticForms(form.getRootNode())}};module.exports=semanticForms
255
+ semanticForms(form.getRootNode())}};
256
+ // marks a field invalid with a message saying why, or clears that: see the docs for setInvalid
257
+ semanticForms.setInvalid=setInvalid;semanticForms.clearInvalid=clearInvalid;module.exports=semanticForms
238
258
  /***/}
239
259
  /******/};
240
260
  /************************************************************************/