semantic-forms 5.1.10 → 5.1.12
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.
- package/CHANGELOG.md +11 -0
- package/dist/semantic-forms.cjs +20 -6
- package/dist/semantic-forms.cjs.map +1 -1
- package/dist/semantic-forms.css +154 -21
- package/dist/semantic-forms.css.map +1 -1
- package/dist/semantic-forms.js +20 -6
- package/dist/semantic-forms.js.map +1 -1
- package/dist/semantic-forms.min.js +1 -1
- package/dist/semantic-forms.min.js.map +1 -1
- package/dist/semantic-forms.min.mjs +1 -1
- package/dist/semantic-forms.min.mjs.map +1 -1
- package/dist/semantic-forms.mjs +20 -6
- package/dist/semantic-forms.mjs.map +1 -1
- package/docs/statics/pages/fullDemo.html +55 -8
- package/docs/statics/pages/usage.html +33 -0
- package/package.json +1 -1
- package/semanticForms.js +61 -5
- package/semanticForms.scss +159 -114
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
## 5.1.12
|
|
2
|
+
|
|
3
|
+
- Fixed a visual bug with details element arrows.
|
|
4
|
+
- Added the ability to place buttons and submit inputs next to other form inputs.
|
|
5
|
+
- Added the ability to allow fixed-width form elements to grow with their content using the `data-max-content` attribute.
|
|
6
|
+
- Added the ability to create one-line textareas that grow in height using the `data-auto-grow` attribute.
|
|
7
|
+
|
|
8
|
+
## 5.1.11
|
|
9
|
+
|
|
10
|
+
- Fixed offset of `button-link` elements when in menus.
|
|
11
|
+
|
|
1
12
|
## 5.1.10
|
|
2
13
|
|
|
3
14
|
- Added ability to style links to look like Semantic Forms buttons using the `button-link` class.
|
package/dist/semantic-forms.cjs
CHANGED
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
\**************************/
|
|
7
7
|
/***/module=>{const semanticForms=()=>{
|
|
8
8
|
// do some feature detection so none of the JS executes if the browser is too old
|
|
9
|
-
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}const passwordShow='<svg fill="none" height="256" viewBox="0 0 24 24" width="256" xmlns="http://www.w3.org/2000/svg"><g stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="m1 12s4-8 11-8 11 8 11 8"/><path d="m1 12s4 8 11 8 11-8 11-8"/><circle cx="12" cy="12" r="3"/></g></svg>';const passwordHide='<svg fill="none" height="256" viewBox="0 0 24 24" width="256" xmlns="http://www.w3.org/2000/svg"><g stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="m2 2 20 20"/><path d="m6.71277 6.7226c-3.04798 2.07267-4.71277 5.2774-4.71277 5.2774s3.63636 7 10 7c2.0503 0 3.8174-.7266 5.2711-1.7116m-6.2711-12.23018c.3254-.03809.6588-.05822 1-.05822 6.3636 0 10 7 10 7s-.6918 1.3317-2 2.8335"/><path d="m14 14.2362c-.5308.475-1.2316.7639-2 .7639-1.6569 0-3-1.3431-3-3 0-.8237.33193-1.5698.86932-2.11192"/></g></svg>';const helpTextIcon='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16" version="1.1" style="overflow:visible;
|
|
9
|
+
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}const passwordShow='<svg fill="none" height="256" viewBox="0 0 24 24" width="256" xmlns="http://www.w3.org/2000/svg"><g stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="m1 12s4-8 11-8 11 8 11 8"/><path d="m1 12s4 8 11 8 11-8 11-8"/><circle cx="12" cy="12" r="3"/></g></svg>';const passwordHide='<svg fill="none" height="256" viewBox="0 0 24 24" width="256" xmlns="http://www.w3.org/2000/svg"><g stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="m2 2 20 20"/><path d="m6.71277 6.7226c-3.04798 2.07267-4.71277 5.2774-4.71277 5.2774s3.63636 7 10 7c2.0503 0 3.8174-.7266 5.2711-1.7116m-6.2711-12.23018c.3254-.03809.6588-.05822 1-.05822 6.3636 0 10 7 10 7s-.6918 1.3317-2 2.8335"/><path d="m14 14.2362c-.5308.475-1.2316.7639-2 .7639-1.6569 0-3-1.3431-3-3 0-.8237.33193-1.5698.86932-2.11192"/></g></svg>';const helpTextIcon='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16" viewBox="0 0 16 16" version="1.1" style="overflow:visible;"><rect width="16" height="16" fill="none"/><path fill="currentColor" d="M8,10.5c-0.552,0-1,0.448-1,1c0,0.552,0.448,1,1,1c0.552,0,1-0.448,1-1C9,10.948,8.552,10.5,8,10.5z M8,0 C3.582,0,0,3.582,0,8c0,4.418,3.582,8,8,8s8-3.582,8-8C16,3.582,12.418,0,8,0z M12.243,12.243C11.109,13.376,9.603,14,8,14 s-3.109-0.624-4.243-1.757C2.624,11.109,2,9.603,2,8s0.624-3.109,1.757-4.243C4.891,2.624,6.397,2,8,2s3.109,0.624,4.243,1.757 C13.376,4.891,14,6.397,14,8C14,9.603,13.376,11.109,12.243,12.243z M7.927,3.755c-2.248,0-2.76,1.695-2.802,2.906h1.571 c0.028-0.256,0.101-1.418,1.221-1.418c0.672,0,1.206,0.406,1.206,1.175c0,0.695-0.724,1.155-1.303,1.711 C7.241,8.685,7.168,9.325,7.168,9.824V10c0.146,0,1.615,0,1.615,0V9.824c0-1.256,1.967-1.594,1.967-3.541 C10.75,5.059,9.874,3.755,7.927,3.755z"/></svg>';const nodeNameLookup=["TEXTAREA","SELECT"];const inputTypeLookup=["checkbox","color","date","datetime-local","email","file","image","month","number","password","radio","range","search","tel","text","time","url","week"];
|
|
10
10
|
// progressively enhance form elements that have the semanticForms class
|
|
11
11
|
const forms=document.querySelectorAll("form.semanticForms:not(.semanticFormsActive)");for(const form of forms){form.classList.add("semanticFormsActive");if(form.classList.contains("lowFlow"))continue;
|
|
12
12
|
// update each input in the semantic form
|
|
13
|
-
const inputs=Array.from(form.querySelectorAll("input, textarea, select"));for(
|
|
13
|
+
const inputs=Array.from(form.querySelectorAll("input, textarea, select"));for(let input of inputs){
|
|
14
14
|
// ignore input if it has previously been formatted
|
|
15
15
|
if(input.classList.contains("semanticform")||!input.id)continue;const type=input.getAttribute("type");if(nodeNameLookup.includes(input.nodeName)||inputTypeLookup.includes(type)){
|
|
16
16
|
// recursively find <dl> element
|
|
@@ -22,17 +22,26 @@ let dd=input.parentNode;while(dd&&dd.nodeName!=="DD")dd=dd.parentNode;if(!dd){co
|
|
|
22
22
|
// removes old div that a radio or checkbox may have been added to
|
|
23
23
|
if(dd.parentElement.nodeName==="DIV")dd.parentElement.remove();const div=document.createElement("div");div.append(label.closest("dt"),dd);dl.append(div)}else{const newLabel=document.createElement("label");newLabel.setAttribute("for",input.id);newLabel.className="floatLabelFormAnimatedLabel";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">${helpTextIcon}</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)}
|
|
24
24
|
// #endregion
|
|
25
|
-
// standard inputs
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
// #region standard inputs
|
|
26
|
+
// check for auto-grow attribute on textareas
|
|
27
|
+
if(input.getAttribute("data-auto-grow")!==null){
|
|
28
|
+
// progressively enhance inputs into textareas
|
|
29
|
+
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")
|
|
30
|
+
// when pressing enter while this input is focused, we want to submit
|
|
31
|
+
input.addEventListener("keypress",e=>{if(e.key!=="Enter"||e.key==="Enter"&&e.shiftKey)return;e.preventDefault();form.requestSubmit()})}if(type!=="checkbox"&&type!=="radio"){if(!input.getAttribute("placeholder"))input.setAttribute("placeholder"," ");const div=document.createElement("div");const dt=label.closest("dt");const dd=input.closest("dd");if(!dt){console.error(`semantic-forms: Found an input (${input.id||input.getAttribute("name")}) that does not have a corresponding <dt> element.`);continue}if(!dd){console.error(`semantic-forms: Found an input (${input.id||input.getAttribute("name")}) that does not have a corresponding <dd> element.`);continue}
|
|
32
|
+
// #region input clear button
|
|
28
33
|
if(input.nodeName!=="SELECT"&&type!=="range"){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;
|
|
29
34
|
// used for any other updates required by various inputs
|
|
30
35
|
input.dispatchEvent(new Event("input",{bubbles:true}))});insertAfter(clearBtn,dd.querySelector("label"))}input.addEventListener("focus",event=>{if(event.target.nodeName==="INPUT")lastFocusedInput=event.target});
|
|
31
36
|
// #endregion
|
|
32
37
|
// check for colspan- utility class
|
|
33
|
-
if(/colspan-/.test(dd.className)){const match=dd.className.match(/colspan-([0-9]|full)/)[0];dd.classList.remove(match);div.classList.add(match)}
|
|
38
|
+
if(/colspan-/.test(dd.className)){const match=dd.className.match(/colspan-([0-9]|full)/)[0];dd.classList.remove(match);div.classList.add(match)}
|
|
39
|
+
// check for max-content attribute
|
|
40
|
+
// this may be removed once fully supported in Firefox and Safari: https://caniuse.com/wf-field-sizing
|
|
41
|
+
if(input.getAttribute("data-max-content")!==null)if(!("fieldSizing"in document.createElement("input").style)){const adjustWidth=()=>{const value=input.value!==""?input.value:input.placeholder;const width=value.length*8+40;input.style.width=width+"px";input.style.maxWidth="100%";div.style.width=width+"px"};adjustWidth();input.addEventListener("input",adjustWidth)}div.append(dt,dd);dl.append(div);
|
|
34
42
|
// determine visibility of newly created <div>
|
|
35
43
|
if(dt.style.display==="none"&&dd.style.display==="none")div.style.display="none"}
|
|
44
|
+
// #endregion
|
|
36
45
|
// handle file input clear btn, cannot be handled with CSS
|
|
37
46
|
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"})}
|
|
38
47
|
// handle range inputs with a class to display the value
|
|
@@ -62,6 +71,11 @@ const rows=Math.round((scrollHeight-blockPadding)/lineHeight);
|
|
|
62
71
|
if(maxRows)input.setAttribute("rows",""+Math.min(rows,Number(maxRows)));else input.setAttribute("rows",""+rows)};input.addEventListener("input",handleInput);
|
|
63
72
|
// trigger the event to set the initial rows value
|
|
64
73
|
input.dispatchEvent(new Event("input",{bubbles:true}))}
|
|
74
|
+
// progressively enhance textarea for Firefox and Safari
|
|
75
|
+
// this may be removed once fully supported in Firefox and Safari: https://caniuse.com/wf-field-sizing
|
|
76
|
+
if(input.getAttribute("data-auto-grow")!==null){const adjustHeight=()=>{if(input.value.length)input.style.height=input.scrollHeight+"px";else input.style.height=window.getComputedStyle(form).getPropertyValue("--semanticFormsInputHeight")};
|
|
77
|
+
// set initial height to semantic-forms CSS variable
|
|
78
|
+
input.style.height=window.getComputedStyle(form).getPropertyValue("--semanticFormsInputHeight");input.addEventListener("input",adjustHeight)}
|
|
65
79
|
// shifts the clear button to the right if a scrollbar is present
|
|
66
80
|
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()}}}}
|
|
67
81
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"semantic-forms.cjs","mappings":"CAAA,SAA2CA,KAAMC,SAChD,UAAUC,UAAY,iBAAmBC,SAAW,SACnDA,OAAOD,QAAUD,eACb,UAAUG,SAAW,YAAcA,OAAOC,IAC9CD,OAAO,gBAAiB,GAAIH,cACxB,UAAUC,UAAY,SAC1BA,QAAQ,iBAAmBD,eAE3BD,KAAK,iBAAmBC,SACzB,EATD,CASGK,KAAM,Y;;;;;;cCTT,MAAMC,cAAgB;;AAEpB,UAAWC,SAASC,yBAA2B,mBAAqBD,SAASE,gBAAkB,aAAeF,SAASG,KAAKC,YAAcC,OAAOC,iBAAkB,CACjKC,QAAQC,KAAK,+EACb,MACF,CAEA,MAAMC,aAAe,8SACrB,MAAMC,aAAe,siBACrB,MAAMC,aAAe,q8BAErB,MAAMC,eAAiB,CAAC,WAAY,UACpC,MAAMC,gBAAkB,CAAC,WAAY,QAAS,OAAQ,iBAAkB,QAAS,OAAQ,QAAS,QAAS,SAAU,WAAY,QAAS,QAAS,SAAU,MAAO,OAAQ,OAAQ,MAAO;wEAG3L;MAAMC,MAAQd,SAASe,iBAAiB,gDAExC,IAAK,MAAMC,QAAQF,MAAO,CACxBE,KAAKZ,UAAUa,IAAI,uBACnB,GAAID,KAAKZ,UAAUc,SAAS,WAAY;yCAGxC;MAAMC,OAASC,MAAMC,KAAKL,KAAKD,iBAAiB,4BAChD,IAAK,MAAMO,SAASH,OAAQ;;AAE1B,GAAIG,MAAMlB,UAAUc,SAAS,kBAAoBI,MAAMC,GAAI,SAE3D,MAAMC,KAAOF,MAAMG,aAAa,QAChC,GAAIb,eAAec,SAASJ,MAAMK,WAAad,gBAAg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QACf;;;;;;;QCnBA,IAAIkI,oBAAsBL,oBAAoB","sources":["webpack://semanticForms/webpack/universalModuleDefinition","webpack://semanticForms/./semanticForms.js","webpack://semanticForms/webpack/bootstrap","webpack://semanticForms/webpack/startup"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"semanticForms\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"semanticForms\"] = factory();\n\telse\n\t\troot[\"semanticForms\"] = factory();\n})(this, () => {\nreturn ","const semanticForms = () => {\n // do some feature detection so none of the JS executes if the browser is too old\n if (typeof document.getElementsByClassName !== 'function' || typeof document.querySelector !== 'function' || !document.body.classList || !window.MutationObserver) {\n console.warn('semantic-forms was loaded into an unsupported browser and will not execute.')\n return\n }\n\n const passwordShow = '<svg fill=\"none\" height=\"256\" viewBox=\"0 0 24 24\" width=\"256\" xmlns=\"http://www.w3.org/2000/svg\"><g stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"m1 12s4-8 11-8 11 8 11 8\"/><path d=\"m1 12s4 8 11 8 11-8 11-8\"/><circle cx=\"12\" cy=\"12\" r=\"3\"/></g></svg>'\n const passwordHide = '<svg fill=\"none\" height=\"256\" viewBox=\"0 0 24 24\" width=\"256\" xmlns=\"http://www.w3.org/2000/svg\"><g stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"m2 2 20 20\"/><path d=\"m6.71277 6.7226c-3.04798 2.07267-4.71277 5.2774-4.71277 5.2774s3.63636 7 10 7c2.0503 0 3.8174-.7266 5.2711-1.7116m-6.2711-12.23018c.3254-.03809.6588-.05822 1-.05822 6.3636 0 10 7 10 7s-.6918 1.3317-2 2.8335\"/><path d=\"m14 14.2362c-.5308.475-1.2316.7639-2 .7639-1.6569 0-3-1.3431-3-3 0-.8237.33193-1.5698.86932-2.11192\"/></g></svg>'\n const helpTextIcon = '<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" version=\"1.1\" style=\"overflow:visible;margin-top:1px;\"><rect width=\"16\" height=\"16\" fill=\"none\"/><path fill=\"currentColor\" d=\"M8,10.5c-0.552,0-1,0.448-1,1c0,0.552,0.448,1,1,1c0.552,0,1-0.448,1-1C9,10.948,8.552,10.5,8,10.5z M8,0 C3.582,0,0,3.582,0,8c0,4.418,3.582,8,8,8s8-3.582,8-8C16,3.582,12.418,0,8,0z M12.243,12.243C11.109,13.376,9.603,14,8,14 s-3.109-0.624-4.243-1.757C2.624,11.109,2,9.603,2,8s0.624-3.109,1.757-4.243C4.891,2.624,6.397,2,8,2s3.109,0.624,4.243,1.757 C13.376,4.891,14,6.397,14,8C14,9.603,13.376,11.109,12.243,12.243z M7.927,3.755c-2.248,0-2.76,1.695-2.802,2.906h1.571 c0.028-0.256,0.101-1.418,1.221-1.418c0.672,0,1.206,0.406,1.206,1.175c0,0.695-0.724,1.155-1.303,1.711 C7.241,8.685,7.168,9.325,7.168,9.824V10c0.146,0,1.615,0,1.615,0V9.824c0-1.256,1.967-1.594,1.967-3.541 C10.75,5.059,9.874,3.755,7.927,3.755z\"/></svg>'\n\n const nodeNameLookup = ['TEXTAREA', 'SELECT']\n const inputTypeLookup = ['checkbox', 'color', 'date', 'datetime-local', 'email', 'file', 'image', 'month', 'number', 'password', 'radio', 'range', 'search', 'tel', 'text', 'time', 'url', 'week']\n\n // progressively enhance form elements that have the semanticForms class\n const forms = document.querySelectorAll('form.semanticForms:not(.semanticFormsActive)')\n\n for (const form of forms) {\n form.classList.add('semanticFormsActive')\n if (form.classList.contains('lowFlow')) continue\n\n // update each input in the semantic form\n const inputs = Array.from(form.querySelectorAll('input, textarea, select'))\n for (const input of inputs) {\n // ignore input if it has previously been formatted\n if (input.classList.contains('semanticform') || !input.id) continue\n\n const type = input.getAttribute('type')\n if (nodeNameLookup.includes(input.nodeName) || inputTypeLookup.includes(type)) {\n // recursively find <dl> element\n let dl = input.parentNode\n while (dl && dl.nodeName !== 'DL') dl = dl.parentNode\n\n if (!dl) continue\n if (!dl.classList.contains('floatLabelForm')) dl.classList.add('floatLabelForm')\n\n const label = input.parentNode.parentNode.id && (type === 'checkbox' || type === 'radio')\n ? document.querySelector('label[data-for=' + input.parentNode.parentNode.id.replace(/\\./g, '\\\\.') + ']')\n : document.querySelector('label[for=' + input.id.replace(/\\./g, '\\\\.') + ']')\n\n if (!label) {\n 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.`)\n }\n\n input.classList.add('semanticform')\n\n // #region create labels\n\n if (type === 'checkbox' || type === 'radio') {\n // recursively find <dd> element\n let dd = input.parentNode\n while (dd && dd.nodeName !== 'DD') dd = dd.parentNode\n\n if (!dd) {\n console.error(`semantic-forms: Found an input (${input.id || input.getAttribute('name')}) that is not inside a <dd> element.`)\n continue\n }\n\n if (dd.firstChild.nodeName !== 'LABEL') {\n const newLabel = document.createElement('label')\n newLabel.className = 'floatLabelFormAnimatedLabel'\n\n if (type === 'checkbox' && input.parentNode.nodeName === 'DD') {\n newLabel.setAttribute('for', input.id)\n input.parentNode.classList.add('singleCheckbox')\n newLabel.className = ''\n label.setAttribute('hidden', 'hidden')\n insertAfter(newLabel, input)\n }\n\n if (type === 'radio' && input.parentNode.nodeName === 'DD') {\n newLabel.setAttribute('for', input.id)\n input.parentNode.classList.add('singleRadio')\n newLabel.className = ''\n label.setAttribute('hidden', 'hidden')\n insertAfter(newLabel, input)\n }\n\n newLabel.innerHTML = label.innerHTML\n\n if (label.hasAttribute('title') && label.getAttribute('data-show-help-icon') !== null && !label.querySelector('span.help')) {\n const text = label.getAttribute('title')\n label.innerHTML += ` <span title=\"${text}\" class=\"help\">${helpTextIcon}</span>`\n newLabel.innerHTML += ` <span title=\"${text}\" class=\"help\">${helpTextIcon}</span>`\n }\n\n if (dd.querySelector(':required') && label.getAttribute('data-no-asterisk') === null && !label.querySelector('span.required')) {\n const text = label.getAttribute('data-asterisk-text') || 'This field is required.'\n label.innerHTML += ` <span title=\"${text}\" class=\"required\">*</span>`\n newLabel.innerHTML += ` <span title=\"${text}\" class=\"required\">*</span>`\n }\n\n if (!dd.querySelector('label')) dd.append(newLabel)\n }\n\n // removes old div that a radio or checkbox may have been added to\n if (dd.parentElement.nodeName === 'DIV') dd.parentElement.remove()\n\n const div = document.createElement('div')\n div.append(label.closest('dt'), dd)\n dl.append(div)\n } else {\n const newLabel = document.createElement('label')\n newLabel.setAttribute('for', input.id)\n newLabel.className = 'floatLabelFormAnimatedLabel'\n\n newLabel.innerHTML = label.innerHTML\n\n if (input.hasAttribute('title') && label.getAttribute('data-show-help-icon') !== null && !label.querySelector('span.help')) {\n const text = input.getAttribute('title')\n newLabel.innerHTML += ` <span title=\"${text}\" class=\"help\">${helpTextIcon}</span>`\n }\n\n if (input.hasAttribute('required') && label.getAttribute('data-no-asterisk') === null && !label.querySelector('span.required')) {\n const text = label.getAttribute('data-asterisk-text') || 'This field is required.'\n newLabel.innerHTML += ` <span title=\"${text}\" class=\"required\">*</span>`\n }\n\n label.setAttribute('hidden', 'hidden')\n\n insertAfter(newLabel, input)\n }\n // #endregion\n\n // standard inputs\n if (type !== 'checkbox' && type !== 'radio') {\n if (!input.getAttribute('placeholder')) input.setAttribute('placeholder', ' ')\n\n const div = document.createElement('div')\n const dt = label.closest('dt')\n const dd = input.closest('dd')\n\n if (!dt) {\n console.error(`semantic-forms: Found an input (${input.id || input.getAttribute('name')}) that does not have a corresponding <dt> element.`)\n continue\n }\n if (!dd) {\n console.error(`semantic-forms: Found an input (${input.id || input.getAttribute('name')}) that does not have a corresponding <dd> element.`)\n continue\n }\n\n // #region clear button\n if (input.nodeName !== 'SELECT' && type !== 'range') {\n const clearBtn = document.createElement('button')\n clearBtn.type = 'button'\n clearBtn.title = input.getAttribute('data-clear-field-text') || 'Clear field'\n clearBtn.ariaLabel = input.getAttribute('data-clear-field-text') || 'Clear field'\n clearBtn.tabIndex = -1\n 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\" />'\n clearBtn.classList.add('clear')\n clearBtn.id = `semanticFormsClearButton_${input.id}`\n clearBtn.addEventListener('click', () => {\n input.previousValue = input.value\n input.value = ''\n input.focus()\n lastClearFieldPressed = input.id\n\n // used for any other updates required by various inputs\n input.dispatchEvent(new Event('input', { bubbles: true }))\n })\n insertAfter(clearBtn, dd.querySelector('label'))\n }\n input.addEventListener('focus', event => {\n if (event.target.nodeName === 'INPUT') lastFocusedInput = event.target\n })\n // #endregion\n\n // check for colspan- utility class\n if (/colspan-/.test(dd.className)) {\n const match = dd.className.match(/colspan-([0-9]|full)/)[0]\n dd.classList.remove(match)\n div.classList.add(match)\n }\n\n div.append(dt, dd)\n dl.append(div)\n\n // determine visibility of newly created <div>\n if (dt.style.display === 'none' && dd.style.display === 'none') div.style.display = 'none'\n }\n\n // handle file input clear btn, cannot be handled with CSS\n if (type === 'file') {\n const clearBtn = input.parentElement.querySelector('.clear')\n input.addEventListener('input', event => {\n clearBtn.style.display = event.target.files.length ? 'flex' : 'none'\n })\n clearBtn.addEventListener('click', () => {\n clearBtn.style.display = 'none'\n })\n }\n\n // handle range inputs with a class to display the value\n if (type === 'range' && input.classList.contains('displayValue')) {\n const label = input.parentNode.parentNode.querySelector('dd label')\n label.innerHTML += `<span class=\"seperator\">: </span><output>${input.value}</output>`\n input.addEventListener('input', event => {\n const output = event.target.parentNode.parentNode.querySelector('output')\n output.innerHTML = event.target.value\n })\n }\n\n // #region show password button\n if (type === 'password' && input.getAttribute('data-no-reveal') === null) {\n const showBtn = document.createElement('button')\n showBtn.type = 'button'\n showBtn.title = input.getAttribute('data-show-password-text') || 'Show password'\n showBtn.ariaLabel = input.getAttribute('data-show-password-text') || 'Show password'\n showBtn.tabIndex = -1\n showBtn.innerHTML = passwordShow\n showBtn.classList.add('show')\n showBtn.id = `semanticFormsShowButton_${input.id}`\n const dd = input.closest('dd')\n if (!dd) {\n console.error(`semantic-forms: Found an input (${input.id || input.getAttribute('name')}) that is not inside a <dd> element.`)\n continue\n }\n showBtn.addEventListener('click', () => {\n if (input.type === 'password') {\n showBtn.innerHTML = passwordHide\n showBtn.title = input.getAttribute('data-hide-password-text') || 'Hide password'\n showBtn.ariaLabel = input.getAttribute('data-hide-password-text') || 'Hide password'\n input.type = 'text'\n } else {\n showBtn.innerHTML = passwordShow\n showBtn.title = input.getAttribute('data-show-password-text') || 'Show password'\n showBtn.ariaLabel = input.getAttribute('data-show-password-text') || 'Show password'\n input.type = 'password'\n }\n input.focus()\n })\n insertAfter(showBtn, dd.querySelector('label'))\n }\n // #endregion\n\n // add listener to shift clear button when scrollbar present\n if (input.nodeName === 'TEXTAREA') {\n if (input.getAttribute('data-disable-autosize') === null) {\n // add auto-sizing\n input.style.setProperty('resize', 'none')\n input.style.setProperty('min-height', '0')\n input.style.setProperty('max-height', 'none')\n input.style.setProperty('height', 'auto')\n\n const handleInput = () => {\n // reset rows attribute to get accurate scrollHeight\n let maxRows = input.getAttribute('data-max-rows')\n\n if (maxRows) {\n if (isNaN(maxRows) || Number(maxRows) <= 0) {\n console.warn(`An invalid value was passed to the \"data-max-rows\" attribute. This value will be ignored.\\n\\nProvided value: ${input.getAttribute('data-max-rows')}`)\n maxRows = null\n }\n }\n\n const minRows = input.getAttribute('data-max-rows') && Number(input.getAttribute('data-max-rows')) < 5 ? input.getAttribute('data-max-rows') : '5'\n input.setAttribute('rows', minRows)\n\n // get the computed values object reference\n const style = window.getComputedStyle(input)\n\n // force content-box for size accurate line-height calculation, remove scrollbars, lock width (subtract inline padding and inline border widths), and remove inline padding and borders to keep width consistent (for text wrapping accuracy)\n const inlinePadding = parseFloat(style['padding-left']) + parseFloat(style['padding-right'])\n const inlineBorderWidth = parseFloat(style['border-left-width']) + parseFloat(style['border-right-width'])\n input.style.setProperty('overflow', 'hidden', 'important')\n input.style.setProperty('width', (parseFloat(style.width) - inlinePadding - inlineBorderWidth) + 'px')\n input.style.setProperty('box-sizing', 'content-box')\n input.style.setProperty('padding-inline', '0')\n input.style.setProperty('border-width', '0')\n\n // get the base line height, and top / bottom padding\n const blockPadding = parseFloat(style['padding-top']) + parseFloat(style['padding-bottom'])\n const lineHeight = style['line-height'] === 'normal'\n ? parseFloat(style.height) // if line-height is not explicitly set, use the computed height value (ignore padding due to content-box)\n : parseFloat(style['line-height']) // otherwise (line-height is explicitly set), use the computed line-height value\n\n // get the scroll height (rounding to be safe to ensure cross browser consistency)\n const scrollHeight = Math.round(input.scrollHeight)\n\n // undo overflow, width, border-width, box-sizing & inline padding overrides\n input.style.removeProperty('width')\n input.style.removeProperty('box-sizing')\n input.style.removeProperty('padding-inline')\n input.style.removeProperty('border-width')\n input.style.removeProperty('overflow')\n\n // subtract blockPadding from scrollHeight and divide that by our lineHeight to get the row count, round to nearest integer as it will always be within ~.1 of the correct whole number\n const rows = Math.round((scrollHeight - blockPadding) / lineHeight)\n\n // set the calculated rows attribute (limited by rowLimit)\n if (maxRows) {\n input.setAttribute('rows', '' + Math.min(rows, Number(maxRows)))\n } else {\n input.setAttribute('rows', '' + rows)\n }\n }\n\n input.addEventListener('input', handleInput)\n\n // trigger the event to set the initial rows value\n input.dispatchEvent(new Event('input', { bubbles: true }))\n }\n\n // shifts the clear button to the right if a scrollbar is present\n const shiftClearBtn = () => {\n const clearBtn = input.parentElement?.querySelector('button.clear')\n if (clearBtn) clearBtn.style.marginRight = input.clientHeight < input.scrollHeight ? '15px' : ''\n }\n input.addEventListener('input', shiftClearBtn)\n input.addEventListener('mouseup', shiftClearBtn)\n shiftClearBtn()\n }\n }\n }\n }\n\n /**\n * Places an element immediately after another element\n * @param {Object} newNode element being placed after the reference node\n * @param {*} referenceNode element to be used as reference for new node\n */\n function insertAfter (newNode, referenceNode) {\n if (referenceNode.nextSibling) referenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling)\n else referenceNode.parentNode.appendChild(newNode)\n }\n\n // handle undo/redo\n let lastFocusedInput\n let lastClearFieldPressed\n document.addEventListener('keydown', event => {\n if ((event.ctrlKey || event.metaKey) && event.key === 'z' && !event.shiftKey) {\n // undo clearing a field\n if (lastFocusedInput) {\n if (lastFocusedInput?.parentNode?.querySelector('button.clear').id === `semanticFormsClearButton_${lastClearFieldPressed}` || lastFocusedInput?.parentNode?.querySelector('button.clear').name === `semanticFormsClearButton_${lastClearFieldPressed}`) {\n if (lastFocusedInput.previousValue) {\n lastFocusedInput.redoValue = lastFocusedInput.value\n lastFocusedInput.value = lastFocusedInput.previousValue\n }\n }\n }\n } else if ((event.ctrlKey && event.key === 'y') || (event.metaKey && event.shiftKey && event.key === 'z')) {\n // redo clearing a field\n if (lastFocusedInput) {\n if (lastFocusedInput?.parentNode?.querySelector('button.clear').id === `semanticFormsClearButton_${lastClearFieldPressed}` || lastFocusedInput?.parentNode?.querySelector('button.clear').name === `semanticFormsClearButton_${lastClearFieldPressed}`) {\n if (lastFocusedInput.redoValue) {\n lastFocusedInput.previousValue = lastFocusedInput.value\n lastFocusedInput.value = lastFocusedInput.redoValue\n }\n }\n }\n }\n })\n\n // monitor changes to the DOM and enhance new semanticForms forms that get added\n if (!window.semanticFormsObserver) {\n window.semanticFormsObserver = new window.MutationObserver(mutations => {\n let stop = false\n for (const mutation of mutations) {\n for (const node of mutation.addedNodes) {\n if (node.nodeName === 'FORM' || node?.querySelector?.('form')) {\n semanticForms()\n stop = true\n }\n }\n if (stop) break\n }\n })\n window.semanticFormsObserver.observe(document.body, { attributes: false, childList: true, characterData: false, subtree: true })\n }\n\n semanticForms.reinitialize = form => {\n form.classList.remove('semanticFormsActive')\n semanticForms()\n }\n}\n\nmodule.exports = semanticForms\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(\"./semanticForms.js\");\n"],"names":["root","factory","exports","module","define","amd","this","semanticForms","document","getElementsByClassName","querySelector","body","classList","window","MutationObserver","console","warn","passwordShow","passwordHide","helpTextIcon","nodeNameLookup","inputTypeLookup","forms","querySelectorAll","form","add","contains","inputs","Array","from","input","id","type","getAttribute","includes","nodeName","dl","parentNode","label","replace","error","dd","firstChild","newLabel","createElement","className","setAttribute","insertAfter","innerHTML","hasAttribute","text","append","parentElement","remove","div","closest","dt","clearBtn","title","ariaLabel","tabIndex","addEventListener","previousValue","value","focus","lastClearFieldPressed","dispatchEvent","Event","bubbles","event","target","lastFocusedInput","test","match","style","display","files","length","output","showBtn","setProperty","handleInput","maxRows","isNaN","Number","minRows","getComputedStyle","inlinePadding","parseFloat","inlineBorderWidth","width","blockPadding","lineHeight","height","scrollHeight","Math","round","removeProperty","rows","min","shiftClearBtn","marginRight","clientHeight","newNode","referenceNode","nextSibling","insertBefore","appendChild","ctrlKey","metaKey","key","shiftKey","name","redoValue","semanticFormsObserver","mutations","stop","mutation","node","addedNodes","observe","attributes","childList","characterData","subtree","reinitialize","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","__webpack_exports__"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"semantic-forms.cjs","mappings":"CAAA,SAA2CA,KAAMC,SAChD,U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AkB3C,YAAY3B,cAAc,gBAAgBkH,OAAS,4BAA4BlD,wBAC7N,GAAIM,iBAAiB6C,UAAW,CAC9B7C,iBAAiBR,cAAgBQ,iBAAiBrB,MAClDqB,iBAAiBrB,MAAQqB,iBAAiB6C,SAC5C;gFAOR;IAAKhH,OAAOiH,sBAAuB,CACjCjH,OAAOiH,sBAAwB,IAAIjH,OAAOC,iBAAiBiH,YACzD,IAAIC,KAAO,MACX,IAAK,MAAMC,YAAYF,UAAW,CAChC,IAAK,MAAMG,QAAQD,SAASE,WAC1B,GAAID,KAAK/F,WAAa,QAAU+F,MAAMxH,gBAAgB,QAAS,CAC7DH,gBACAyH,KAAO,IACT,CAEF,GAAIA,KAAM,KACZ,IAEFnH,OAAOiH,sBAAsBM,QAAQ5H,SAASG,KAAM,CAAE0H,WAAY,MAAOC,UAAW,KAAMC,cAAe,MAAOC,QAAS,MAC3H,CAEAjI,cAAckI,aAAejH,OAC3BA,KAAKZ,UAAUyC,OAAO,uBACtB9C,kBAIJJ,OAAOD,QAAUK;;;;;QC/ajB,IAAImI,yBAA2B,CAAC;;;QAGhC,SAASC,oBAAoBC;;QAE5B,IAAIC,aAAeH,yBAAyBE;QAC5C,GAAIC,oBAAiBC;QACpB,OAAOD,aAAa3I;;;QAGrB,IAAIC,OAASuI,yBAAyBE,UAAY;;;QAGjD1I,QAAS,CAAC;;;;QAIX6I,oBAAoBH,UAAUzI,OAAQA,OAAOD,QAASyI;;;QAGtD,OAAOxI,OAAOD;QACf;;;;;;;QCnBA,IAAI8I,oBAAsBL,oBAAoB","sources":["webpack://semanticForms/webpack/universalModuleDefinition","webpack://semanticForms/./semanticForms.js","webpack://semanticForms/webpack/bootstrap","webpack://semanticForms/webpack/startup"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"semanticForms\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"semanticForms\"] = factory();\n\telse\n\t\troot[\"semanticForms\"] = factory();\n})(this, () => {\nreturn ","const semanticForms = () => {\n // do some feature detection so none of the JS executes if the browser is too old\n if (typeof document.getElementsByClassName !== 'function' || typeof document.querySelector !== 'function' || !document.body.classList || !window.MutationObserver) {\n console.warn('semantic-forms was loaded into an unsupported browser and will not execute.')\n return\n }\n\n const passwordShow = '<svg fill=\"none\" height=\"256\" viewBox=\"0 0 24 24\" width=\"256\" xmlns=\"http://www.w3.org/2000/svg\"><g stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"m1 12s4-8 11-8 11 8 11 8\"/><path d=\"m1 12s4 8 11 8 11-8 11-8\"/><circle cx=\"12\" cy=\"12\" r=\"3\"/></g></svg>'\n const passwordHide = '<svg fill=\"none\" height=\"256\" viewBox=\"0 0 24 24\" width=\"256\" xmlns=\"http://www.w3.org/2000/svg\"><g stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\"><path d=\"m2 2 20 20\"/><path d=\"m6.71277 6.7226c-3.04798 2.07267-4.71277 5.2774-4.71277 5.2774s3.63636 7 10 7c2.0503 0 3.8174-.7266 5.2711-1.7116m-6.2711-12.23018c.3254-.03809.6588-.05822 1-.05822 6.3636 0 10 7 10 7s-.6918 1.3317-2 2.8335\"/><path d=\"m14 14.2362c-.5308.475-1.2316.7639-2 .7639-1.6569 0-3-1.3431-3-3 0-.8237.33193-1.5698.86932-2.11192\"/></g></svg>'\n const helpTextIcon = '<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" version=\"1.1\" style=\"overflow:visible;\"><rect width=\"16\" height=\"16\" fill=\"none\"/><path fill=\"currentColor\" d=\"M8,10.5c-0.552,0-1,0.448-1,1c0,0.552,0.448,1,1,1c0.552,0,1-0.448,1-1C9,10.948,8.552,10.5,8,10.5z M8,0 C3.582,0,0,3.582,0,8c0,4.418,3.582,8,8,8s8-3.582,8-8C16,3.582,12.418,0,8,0z M12.243,12.243C11.109,13.376,9.603,14,8,14 s-3.109-0.624-4.243-1.757C2.624,11.109,2,9.603,2,8s0.624-3.109,1.757-4.243C4.891,2.624,6.397,2,8,2s3.109,0.624,4.243,1.757 C13.376,4.891,14,6.397,14,8C14,9.603,13.376,11.109,12.243,12.243z M7.927,3.755c-2.248,0-2.76,1.695-2.802,2.906h1.571 c0.028-0.256,0.101-1.418,1.221-1.418c0.672,0,1.206,0.406,1.206,1.175c0,0.695-0.724,1.155-1.303,1.711 C7.241,8.685,7.168,9.325,7.168,9.824V10c0.146,0,1.615,0,1.615,0V9.824c0-1.256,1.967-1.594,1.967-3.541 C10.75,5.059,9.874,3.755,7.927,3.755z\"/></svg>'\n\n const nodeNameLookup = ['TEXTAREA', 'SELECT']\n const inputTypeLookup = ['checkbox', 'color', 'date', 'datetime-local', 'email', 'file', 'image', 'month', 'number', 'password', 'radio', 'range', 'search', 'tel', 'text', 'time', 'url', 'week']\n\n // progressively enhance form elements that have the semanticForms class\n const forms = document.querySelectorAll('form.semanticForms:not(.semanticFormsActive)')\n\n for (const form of forms) {\n form.classList.add('semanticFormsActive')\n if (form.classList.contains('lowFlow')) continue\n\n // update each input in the semantic form\n const inputs = Array.from(form.querySelectorAll('input, textarea, select'))\n for (let input of inputs) {\n // ignore input if it has previously been formatted\n if (input.classList.contains('semanticform') || !input.id) continue\n\n const type = input.getAttribute('type')\n if (nodeNameLookup.includes(input.nodeName) || inputTypeLookup.includes(type)) {\n // recursively find <dl> element\n let dl = input.parentNode\n while (dl && dl.nodeName !== 'DL') dl = dl.parentNode\n\n if (!dl) continue\n if (!dl.classList.contains('floatLabelForm')) dl.classList.add('floatLabelForm')\n\n const label = input.parentNode.parentNode.id && (type === 'checkbox' || type === 'radio')\n ? document.querySelector('label[data-for=' + input.parentNode.parentNode.id.replace(/\\./g, '\\\\.') + ']')\n : document.querySelector('label[for=' + input.id.replace(/\\./g, '\\\\.') + ']')\n\n if (!label) {\n 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.`)\n }\n\n input.classList.add('semanticform')\n\n // #region create labels\n if (type === 'checkbox' || type === 'radio') {\n // recursively find <dd> element\n let dd = input.parentNode\n while (dd && dd.nodeName !== 'DD') dd = dd.parentNode\n\n if (!dd) {\n console.error(`semantic-forms: Found an input (${input.id || input.getAttribute('name')}) that is not inside a <dd> element.`)\n continue\n }\n\n if (dd.firstChild.nodeName !== 'LABEL') {\n const newLabel = document.createElement('label')\n newLabel.className = 'floatLabelFormAnimatedLabel'\n\n if (type === 'checkbox' && input.parentNode.nodeName === 'DD') {\n newLabel.setAttribute('for', input.id)\n input.parentNode.classList.add('singleCheckbox')\n newLabel.className = ''\n label.setAttribute('hidden', 'hidden')\n insertAfter(newLabel, input)\n }\n\n if (type === 'radio' && input.parentNode.nodeName === 'DD') {\n newLabel.setAttribute('for', input.id)\n input.parentNode.classList.add('singleRadio')\n newLabel.className = ''\n label.setAttribute('hidden', 'hidden')\n insertAfter(newLabel, input)\n }\n\n newLabel.innerHTML = label.innerHTML\n\n if (label.hasAttribute('title') && label.getAttribute('data-show-help-icon') !== null && !label.querySelector('span.help')) {\n const text = label.getAttribute('title')\n label.innerHTML += ` <span title=\"${text}\" class=\"help\">${helpTextIcon}</span>`\n newLabel.innerHTML += ` <span title=\"${text}\" class=\"help\">${helpTextIcon}</span>`\n }\n\n if (dd.querySelector(':required') && label.getAttribute('data-no-asterisk') === null && !label.querySelector('span.required')) {\n const text = label.getAttribute('data-asterisk-text') || 'This field is required.'\n label.innerHTML += ` <span title=\"${text}\" class=\"required\">*</span>`\n newLabel.innerHTML += ` <span title=\"${text}\" class=\"required\">*</span>`\n }\n\n if (!dd.querySelector('label')) dd.append(newLabel)\n }\n\n // removes old div that a radio or checkbox may have been added to\n if (dd.parentElement.nodeName === 'DIV') dd.parentElement.remove()\n\n const div = document.createElement('div')\n div.append(label.closest('dt'), dd)\n dl.append(div)\n } else {\n const newLabel = document.createElement('label')\n newLabel.setAttribute('for', input.id)\n newLabel.className = 'floatLabelFormAnimatedLabel'\n\n newLabel.innerHTML = label.innerHTML\n\n if (input.hasAttribute('title') && label.getAttribute('data-show-help-icon') !== null && !label.querySelector('span.help')) {\n const text = input.getAttribute('title')\n newLabel.innerHTML += ` <span title=\"${text}\" class=\"help\">${helpTextIcon}</span>`\n }\n\n if (input.hasAttribute('required') && label.getAttribute('data-no-asterisk') === null && !label.querySelector('span.required')) {\n const text = label.getAttribute('data-asterisk-text') || 'This field is required.'\n newLabel.innerHTML += ` <span title=\"${text}\" class=\"required\">*</span>`\n }\n\n label.setAttribute('hidden', 'hidden')\n\n insertAfter(newLabel, input)\n }\n // #endregion\n\n // #region standard inputs\n // check for auto-grow attribute on textareas\n if (input.getAttribute('data-auto-grow') !== null) {\n // progressively enhance inputs into textareas\n if (input.nodeName === 'INPUT' && input.type === 'text') {\n const newInput = document.createElement('textarea')\n newInput.id = input.id\n newInput.class = input.class\n newInput.innerText = input.value\n newInput.setAttribute('data-auto-grow', '')\n input.replaceWith(newInput)\n input = newInput\n\n }\n\n if (input.nodeName === 'TEXTAREA') {\n // when pressing enter while this input is focused, we want to submit\n input.addEventListener('keypress', (e) => {\n if (e.key !== 'Enter' || (e.key === 'Enter' && e.shiftKey)) return\n e.preventDefault()\n form.requestSubmit()\n })\n }\n }\n\n if (type !== 'checkbox' && type !== 'radio') {\n if (!input.getAttribute('placeholder')) input.setAttribute('placeholder', ' ')\n\n const div = document.createElement('div')\n const dt = label.closest('dt')\n const dd = input.closest('dd')\n\n if (!dt) {\n console.error(`semantic-forms: Found an input (${input.id || input.getAttribute('name')}) that does not have a corresponding <dt> element.`)\n continue\n }\n if (!dd) {\n console.error(`semantic-forms: Found an input (${input.id || input.getAttribute('name')}) that does not have a corresponding <dd> element.`)\n continue\n }\n\n // #region input clear button\n if (input.nodeName !== 'SELECT' && type !== 'range') {\n const clearBtn = document.createElement('button')\n clearBtn.type = 'button'\n clearBtn.title = input.getAttribute('data-clear-field-text') || 'Clear field'\n clearBtn.ariaLabel = input.getAttribute('data-clear-field-text') || 'Clear field'\n clearBtn.tabIndex = -1\n 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\" />'\n clearBtn.classList.add('clear')\n clearBtn.id = `semanticFormsClearButton_${input.id}`\n clearBtn.addEventListener('click', () => {\n input.previousValue = input.value\n input.value = ''\n input.focus()\n lastClearFieldPressed = input.id\n\n // used for any other updates required by various inputs\n input.dispatchEvent(new Event('input', { bubbles: true }))\n })\n insertAfter(clearBtn, dd.querySelector('label'))\n }\n input.addEventListener('focus', event => {\n if (event.target.nodeName === 'INPUT') lastFocusedInput = event.target\n })\n // #endregion\n\n // check for colspan- utility class\n if (/colspan-/.test(dd.className)) {\n const match = dd.className.match(/colspan-([0-9]|full)/)[0]\n dd.classList.remove(match)\n div.classList.add(match)\n }\n \n // check for max-content attribute\n // this may be removed once fully supported in Firefox and Safari: https://caniuse.com/wf-field-sizing \n if (input.getAttribute('data-max-content') !== null) {\n if (!('fieldSizing' in document.createElement('input').style)) {\n const adjustWidth = () => {\n const value = input.value !== '' ? input.value : input.placeholder\n const width = value.length * 8 + 40\n input.style.width = width + 'px'\n input.style.maxWidth = '100%'\n div.style.width = width + 'px'\n }\n adjustWidth()\n input.addEventListener('input', adjustWidth)\n }\n }\n\n div.append(dt, dd)\n dl.append(div)\n\n // determine visibility of newly created <div>\n if (dt.style.display === 'none' && dd.style.display === 'none') div.style.display = 'none'\n }\n // #endregion\n\n // handle file input clear btn, cannot be handled with CSS\n if (type === 'file') {\n const clearBtn = input.parentElement.querySelector('.clear')\n input.addEventListener('input', event => {\n clearBtn.style.display = event.target.files.length ? 'flex' : 'none'\n })\n clearBtn.addEventListener('click', () => {\n clearBtn.style.display = 'none'\n })\n }\n\n // handle range inputs with a class to display the value\n if (type === 'range' && input.classList.contains('displayValue')) {\n const label = input.parentNode.parentNode.querySelector('dd label')\n label.innerHTML += `<span class=\"seperator\">: </span><output>${input.value}</output>`\n input.addEventListener('input', event => {\n const output = event.target.parentNode.parentNode.querySelector('output')\n output.innerHTML = event.target.value\n })\n }\n\n // #region show password button\n if (type === 'password' && input.getAttribute('data-no-reveal') === null) {\n const showBtn = document.createElement('button')\n showBtn.type = 'button'\n showBtn.title = input.getAttribute('data-show-password-text') || 'Show password'\n showBtn.ariaLabel = input.getAttribute('data-show-password-text') || 'Show password'\n showBtn.tabIndex = -1\n showBtn.innerHTML = passwordShow\n showBtn.classList.add('show')\n showBtn.id = `semanticFormsShowButton_${input.id}`\n const dd = input.closest('dd')\n if (!dd) {\n console.error(`semantic-forms: Found an input (${input.id || input.getAttribute('name')}) that is not inside a <dd> element.`)\n continue\n }\n showBtn.addEventListener('click', () => {\n if (input.type === 'password') {\n showBtn.innerHTML = passwordHide\n showBtn.title = input.getAttribute('data-hide-password-text') || 'Hide password'\n showBtn.ariaLabel = input.getAttribute('data-hide-password-text') || 'Hide password'\n input.type = 'text'\n } else {\n showBtn.innerHTML = passwordShow\n showBtn.title = input.getAttribute('data-show-password-text') || 'Show password'\n showBtn.ariaLabel = input.getAttribute('data-show-password-text') || 'Show password'\n input.type = 'password'\n }\n input.focus()\n })\n insertAfter(showBtn, dd.querySelector('label'))\n }\n // #endregion\n\n // add listener to shift clear button when scrollbar present\n if (input.nodeName === 'TEXTAREA') {\n if (input.getAttribute('data-disable-autosize') === null) {\n // add auto-sizing\n input.style.setProperty('resize', 'none')\n input.style.setProperty('min-height', '0')\n input.style.setProperty('max-height', 'none')\n input.style.setProperty('height', 'auto')\n\n const handleInput = () => {\n // reset rows attribute to get accurate scrollHeight\n let maxRows = input.getAttribute('data-max-rows')\n\n if (maxRows) {\n if (isNaN(maxRows) || Number(maxRows) <= 0) {\n console.warn(`An invalid value was passed to the \"data-max-rows\" attribute. This value will be ignored.\\n\\nProvided value: ${input.getAttribute('data-max-rows')}`)\n maxRows = null\n }\n }\n\n const minRows = input.getAttribute('data-max-rows') && Number(input.getAttribute('data-max-rows')) < 5 ? input.getAttribute('data-max-rows') : '5'\n input.setAttribute('rows', minRows)\n\n // get the computed values object reference\n const style = window.getComputedStyle(input)\n\n // force content-box for size accurate line-height calculation, remove scrollbars, lock width (subtract inline padding and inline border widths), and remove inline padding and borders to keep width consistent (for text wrapping accuracy)\n const inlinePadding = parseFloat(style['padding-left']) + parseFloat(style['padding-right'])\n const inlineBorderWidth = parseFloat(style['border-left-width']) + parseFloat(style['border-right-width'])\n input.style.setProperty('overflow', 'hidden', 'important')\n input.style.setProperty('width', (parseFloat(style.width) - inlinePadding - inlineBorderWidth) + 'px')\n input.style.setProperty('box-sizing', 'content-box')\n input.style.setProperty('padding-inline', '0')\n input.style.setProperty('border-width', '0')\n\n // get the base line height, and top / bottom padding\n const blockPadding = parseFloat(style['padding-top']) + parseFloat(style['padding-bottom'])\n const lineHeight = style['line-height'] === 'normal'\n ? parseFloat(style.height) // if line-height is not explicitly set, use the computed height value (ignore padding due to content-box)\n : parseFloat(style['line-height']) // otherwise (line-height is explicitly set), use the computed line-height value\n\n // get the scroll height (rounding to be safe to ensure cross browser consistency)\n const scrollHeight = Math.round(input.scrollHeight)\n\n // undo overflow, width, border-width, box-sizing & inline padding overrides\n input.style.removeProperty('width')\n input.style.removeProperty('box-sizing')\n input.style.removeProperty('padding-inline')\n input.style.removeProperty('border-width')\n input.style.removeProperty('overflow')\n\n // subtract blockPadding from scrollHeight and divide that by our lineHeight to get the row count, round to nearest integer as it will always be within ~.1 of the correct whole number\n const rows = Math.round((scrollHeight - blockPadding) / lineHeight)\n\n // set the calculated rows attribute (limited by rowLimit)\n if (maxRows) {\n input.setAttribute('rows', '' + Math.min(rows, Number(maxRows)))\n } else {\n input.setAttribute('rows', '' + rows)\n }\n }\n\n input.addEventListener('input', handleInput)\n\n // trigger the event to set the initial rows value\n input.dispatchEvent(new Event('input', { bubbles: true }))\n }\n\n // progressively enhance textarea for Firefox and Safari\n // this may be removed once fully supported in Firefox and Safari: https://caniuse.com/wf-field-sizing \n if (input.getAttribute('data-auto-grow') !== null) {\n const adjustHeight = () => {\n if (input.value.length) {\n input.style.height = input.scrollHeight + 'px'\n } else {\n input.style.height = window.getComputedStyle(form).getPropertyValue('--semanticFormsInputHeight')\n }\n }\n\n // set initial height to semantic-forms CSS variable\n input.style.height = window.getComputedStyle(form).getPropertyValue('--semanticFormsInputHeight')\n input.addEventListener('input', adjustHeight)\n }\n\n // shifts the clear button to the right if a scrollbar is present\n const shiftClearBtn = () => {\n const clearBtn = input.parentElement?.querySelector('button.clear')\n if (clearBtn) clearBtn.style.marginRight = input.clientHeight < input.scrollHeight ? '15px' : ''\n }\n input.addEventListener('input', shiftClearBtn)\n input.addEventListener('mouseup', shiftClearBtn)\n shiftClearBtn()\n }\n }\n }\n }\n\n /**\n * Places an element immediately after another element\n * @param {Object} newNode element being placed after the reference node\n * @param {*} referenceNode element to be used as reference for new node\n */\n function insertAfter (newNode, referenceNode) {\n if (referenceNode.nextSibling) referenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling)\n else referenceNode.parentNode.appendChild(newNode)\n }\n\n // handle undo/redo\n let lastFocusedInput\n let lastClearFieldPressed\n document.addEventListener('keydown', event => {\n if ((event.ctrlKey || event.metaKey) && event.key === 'z' && !event.shiftKey) {\n // undo clearing a field\n if (lastFocusedInput) {\n if (lastFocusedInput?.parentNode?.querySelector('button.clear').id === `semanticFormsClearButton_${lastClearFieldPressed}` || lastFocusedInput?.parentNode?.querySelector('button.clear').name === `semanticFormsClearButton_${lastClearFieldPressed}`) {\n if (lastFocusedInput.previousValue) {\n lastFocusedInput.redoValue = lastFocusedInput.value\n lastFocusedInput.value = lastFocusedInput.previousValue\n }\n }\n }\n } else if ((event.ctrlKey && event.key === 'y') || (event.metaKey && event.shiftKey && event.key === 'z')) {\n // redo clearing a field\n if (lastFocusedInput) {\n if (lastFocusedInput?.parentNode?.querySelector('button.clear').id === `semanticFormsClearButton_${lastClearFieldPressed}` || lastFocusedInput?.parentNode?.querySelector('button.clear').name === `semanticFormsClearButton_${lastClearFieldPressed}`) {\n if (lastFocusedInput.redoValue) {\n lastFocusedInput.previousValue = lastFocusedInput.value\n lastFocusedInput.value = lastFocusedInput.redoValue\n }\n }\n }\n }\n })\n\n // monitor changes to the DOM and enhance new semanticForms forms that get added\n if (!window.semanticFormsObserver) {\n window.semanticFormsObserver = new window.MutationObserver(mutations => {\n let stop = false\n for (const mutation of mutations) {\n for (const node of mutation.addedNodes) {\n if (node.nodeName === 'FORM' || node?.querySelector?.('form')) {\n semanticForms()\n stop = true\n }\n }\n if (stop) break\n }\n })\n window.semanticFormsObserver.observe(document.body, { attributes: false, childList: true, characterData: false, subtree: true })\n }\n\n semanticForms.reinitialize = form => {\n form.classList.remove('semanticFormsActive')\n semanticForms()\n }\n}\n\nmodule.exports = semanticForms\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(\"./semanticForms.js\");\n"],"names":["root","factory","exports","module","define","amd","this","semanticForms","document","getElementsByClassName","querySelector","body","classList","window","MutationObserver","console","warn","passwordShow","passwordHide","helpTextIcon","nodeNameLookup","inputTypeLookup","forms","querySelectorAll","form","add","contains","inputs","Array","from","input","id","type","getAttribute","includes","nodeName","dl","parentNode","label","replace","error","dd","firstChild","newLabel","createElement","className","setAttribute","insertAfter","innerHTML","hasAttribute","text","append","parentElement","remove","div","closest","newInput","class","innerText","value","replaceWith","addEventListener","e","key","shiftKey","preventDefault","requestSubmit","dt","clearBtn","title","ariaLabel","tabIndex","previousValue","focus","lastClearFieldPressed","dispatchEvent","Event","bubbles","event","target","lastFocusedInput","test","match","style","adjustWidth","placeholder","width","length","maxWidth","display","files","output","showBtn","setProperty","handleInput","maxRows","isNaN","Number","minRows","getComputedStyle","inlinePadding","parseFloat","inlineBorderWidth","blockPadding","lineHeight","height","scrollHeight","Math","round","removeProperty","rows","min","adjustHeight","getPropertyValue","shiftClearBtn","marginRight","clientHeight","newNode","referenceNode","nextSibling","insertBefore","appendChild","ctrlKey","metaKey","name","redoValue","semanticFormsObserver","mutations","stop","mutation","node","addedNodes","observe","attributes","childList","characterData","subtree","reinitialize","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","__webpack_exports__"],"sourceRoot":""}
|
package/dist/semantic-forms.css
CHANGED
|
@@ -130,6 +130,14 @@ table.semanticForms.light {
|
|
|
130
130
|
container-type: inline-size;
|
|
131
131
|
container-name: semanticForm;
|
|
132
132
|
}
|
|
133
|
+
@supports (interpolate-size: allow-keywords) {
|
|
134
|
+
form.semanticForms,
|
|
135
|
+
form.semanticForms.light,
|
|
136
|
+
table.semanticForms,
|
|
137
|
+
table.semanticForms.light {
|
|
138
|
+
interpolate-size: allow-keywords;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
133
141
|
form.semanticForms [hidden],
|
|
134
142
|
form.semanticForms.light [hidden],
|
|
135
143
|
table.semanticForms [hidden],
|
|
@@ -461,6 +469,12 @@ table.semanticForms.light textarea {
|
|
|
461
469
|
width: 100%;
|
|
462
470
|
min-height: 38px;
|
|
463
471
|
}
|
|
472
|
+
form.semanticForms textarea[data-auto-grow],
|
|
473
|
+
form.semanticForms.light textarea[data-auto-grow],
|
|
474
|
+
table.semanticForms textarea[data-auto-grow],
|
|
475
|
+
table.semanticForms.light textarea[data-auto-grow] {
|
|
476
|
+
field-sizing: content;
|
|
477
|
+
}
|
|
464
478
|
form.semanticForms input[type=search],
|
|
465
479
|
form.semanticForms.light input[type=search],
|
|
466
480
|
table.semanticForms input[type=search],
|
|
@@ -643,6 +657,21 @@ table.semanticForms.light button:not(.clear):not(.show):hover,
|
|
|
643
657
|
table.semanticForms.light .button-link:hover {
|
|
644
658
|
filter: brightness(1.05);
|
|
645
659
|
}
|
|
660
|
+
form.semanticForms .button-link,
|
|
661
|
+
form.semanticForms.light .button-link,
|
|
662
|
+
table.semanticForms .button-link,
|
|
663
|
+
table.semanticForms.light .button-link {
|
|
664
|
+
display: block;
|
|
665
|
+
}
|
|
666
|
+
form.semanticForms .button-link:visited, form.semanticForms .button-link:link,
|
|
667
|
+
form.semanticForms.light .button-link:visited,
|
|
668
|
+
form.semanticForms.light .button-link:link,
|
|
669
|
+
table.semanticForms .button-link:visited,
|
|
670
|
+
table.semanticForms .button-link:link,
|
|
671
|
+
table.semanticForms.light .button-link:visited,
|
|
672
|
+
table.semanticForms.light .button-link:link {
|
|
673
|
+
color: var(--semanticFormsTextColor) !important;
|
|
674
|
+
}
|
|
646
675
|
form.semanticForms [data-invalid-text],
|
|
647
676
|
form.semanticForms.light [data-invalid-text],
|
|
648
677
|
table.semanticForms [data-invalid-text],
|
|
@@ -837,10 +866,28 @@ table.semanticForms.light details::details-content {
|
|
|
837
866
|
opacity: 0;
|
|
838
867
|
transition: opacity 250ms ease-in, visibility 0ms ease-in 250ms;
|
|
839
868
|
}
|
|
869
|
+
@supports (interpolate-size: allow-keywords) {
|
|
870
|
+
form.semanticForms details,
|
|
871
|
+
form.semanticForms.light details,
|
|
872
|
+
table.semanticForms details,
|
|
873
|
+
table.semanticForms.light details {
|
|
874
|
+
transition: opacity 250ms ease-in, visibility 0ms ease-in 250ms, height 250ms;
|
|
875
|
+
}
|
|
876
|
+
form.semanticForms details::details-content,
|
|
877
|
+
form.semanticForms.light details::details-content,
|
|
878
|
+
table.semanticForms details::details-content,
|
|
879
|
+
table.semanticForms.light details::details-content {
|
|
880
|
+
height: 0;
|
|
881
|
+
overflow: hidden;
|
|
882
|
+
transition: height 250ms, content-visibility 250ms;
|
|
883
|
+
transition-behavior: allow-discrete;
|
|
884
|
+
}
|
|
885
|
+
}
|
|
840
886
|
form.semanticForms details summary,
|
|
841
887
|
form.semanticForms.light details summary,
|
|
842
888
|
table.semanticForms details summary,
|
|
843
889
|
table.semanticForms.light details summary {
|
|
890
|
+
cursor: pointer;
|
|
844
891
|
margin: 0;
|
|
845
892
|
line-height: 1;
|
|
846
893
|
position: absolute;
|
|
@@ -872,12 +919,6 @@ table.semanticForms.light details summary::before {
|
|
|
872
919
|
transform-origin: 0.2rem 50%;
|
|
873
920
|
transition: 250ms transform ease;
|
|
874
921
|
}
|
|
875
|
-
form.semanticForms details[open],
|
|
876
|
-
form.semanticForms.light details[open],
|
|
877
|
-
table.semanticForms details[open],
|
|
878
|
-
table.semanticForms.light details[open] {
|
|
879
|
-
padding-top: 35px;
|
|
880
|
-
}
|
|
881
922
|
form.semanticForms details[open]::details-content,
|
|
882
923
|
form.semanticForms.light details[open]::details-content,
|
|
883
924
|
table.semanticForms details[open]::details-content,
|
|
@@ -886,10 +927,18 @@ table.semanticForms.light details[open]::details-content {
|
|
|
886
927
|
opacity: 1;
|
|
887
928
|
transition: opacity 250ms ease-in, visibility 0ms ease-in 0ms;
|
|
888
929
|
}
|
|
889
|
-
|
|
890
|
-
form.semanticForms
|
|
891
|
-
|
|
892
|
-
table.semanticForms
|
|
930
|
+
@supports (interpolate-size: allow-keywords) {
|
|
931
|
+
form.semanticForms details[open]::details-content,
|
|
932
|
+
form.semanticForms.light details[open]::details-content,
|
|
933
|
+
table.semanticForms details[open]::details-content,
|
|
934
|
+
table.semanticForms.light details[open]::details-content {
|
|
935
|
+
height: auto;
|
|
936
|
+
}
|
|
937
|
+
}
|
|
938
|
+
form.semanticForms details[open] summary::before,
|
|
939
|
+
form.semanticForms.light details[open] summary::before,
|
|
940
|
+
table.semanticForms details[open] summary::before,
|
|
941
|
+
table.semanticForms.light details[open] summary::before {
|
|
893
942
|
transform: rotate(90deg);
|
|
894
943
|
}
|
|
895
944
|
form.semanticForms details[open], form.semanticForms summary,
|
|
@@ -901,12 +950,6 @@ table.semanticForms.light details[open],
|
|
|
901
950
|
table.semanticForms.light summary {
|
|
902
951
|
margin-bottom: 10px;
|
|
903
952
|
}
|
|
904
|
-
form.semanticForms summary,
|
|
905
|
-
form.semanticForms.light summary,
|
|
906
|
-
table.semanticForms summary,
|
|
907
|
-
table.semanticForms.light summary {
|
|
908
|
-
cursor: pointer;
|
|
909
|
-
}
|
|
910
953
|
@supports (scrollbar-color: auto) {
|
|
911
954
|
form.semanticForms textarea,
|
|
912
955
|
form.semanticForms.light textarea,
|
|
@@ -983,6 +1026,62 @@ table.semanticForms.light dl:has(dt > label, dd > input, dd > select, dd > texta
|
|
|
983
1026
|
display: flex;
|
|
984
1027
|
flex-direction: column;
|
|
985
1028
|
}
|
|
1029
|
+
form.semanticForms dl:has(dt > label, dd > input, dd > select, dd > textarea) dd:not(.checkboxes, .radios):not(.singleCheckbox, .singleRadio):has(button:not(.clear, .show), input[type=submit]:not(.clear, .show)),
|
|
1030
|
+
form.semanticForms.light dl:has(dt > label, dd > input, dd > select, dd > textarea) dd:not(.checkboxes, .radios):not(.singleCheckbox, .singleRadio):has(button:not(.clear, .show), input[type=submit]:not(.clear, .show)),
|
|
1031
|
+
table.semanticForms dl:has(dt > label, dd > input, dd > select, dd > textarea) dd:not(.checkboxes, .radios):not(.singleCheckbox, .singleRadio):has(button:not(.clear, .show), input[type=submit]:not(.clear, .show)),
|
|
1032
|
+
table.semanticForms.light dl:has(dt > label, dd > input, dd > select, dd > textarea) dd:not(.checkboxes, .radios):not(.singleCheckbox, .singleRadio):has(button:not(.clear, .show), input[type=submit]:not(.clear, .show)) {
|
|
1033
|
+
display: grid;
|
|
1034
|
+
grid-template-columns: 2fr 1fr;
|
|
1035
|
+
}
|
|
1036
|
+
form.semanticForms dl:has(dt > label, dd > input, dd > select, dd > textarea) dd:not(.checkboxes, .radios):not(.singleCheckbox, .singleRadio):has(button:not(.clear, .show), input[type=submit]:not(.clear, .show)) button.clear, form.semanticForms dl:has(dt > label, dd > input, dd > select, dd > textarea) dd:not(.checkboxes, .radios):not(.singleCheckbox, .singleRadio):has(button:not(.clear, .show), input[type=submit]:not(.clear, .show)) button.show,
|
|
1037
|
+
form.semanticForms.light dl:has(dt > label, dd > input, dd > select, dd > textarea) dd:not(.checkboxes, .radios):not(.singleCheckbox, .singleRadio):has(button:not(.clear, .show), input[type=submit]:not(.clear, .show)) button.clear,
|
|
1038
|
+
form.semanticForms.light dl:has(dt > label, dd > input, dd > select, dd > textarea) dd:not(.checkboxes, .radios):not(.singleCheckbox, .singleRadio):has(button:not(.clear, .show), input[type=submit]:not(.clear, .show)) button.show,
|
|
1039
|
+
table.semanticForms dl:has(dt > label, dd > input, dd > select, dd > textarea) dd:not(.checkboxes, .radios):not(.singleCheckbox, .singleRadio):has(button:not(.clear, .show), input[type=submit]:not(.clear, .show)) button.clear,
|
|
1040
|
+
table.semanticForms dl:has(dt > label, dd > input, dd > select, dd > textarea) dd:not(.checkboxes, .radios):not(.singleCheckbox, .singleRadio):has(button:not(.clear, .show), input[type=submit]:not(.clear, .show)) button.show,
|
|
1041
|
+
table.semanticForms.light dl:has(dt > label, dd > input, dd > select, dd > textarea) dd:not(.checkboxes, .radios):not(.singleCheckbox, .singleRadio):has(button:not(.clear, .show), input[type=submit]:not(.clear, .show)) button.clear,
|
|
1042
|
+
table.semanticForms.light dl:has(dt > label, dd > input, dd > select, dd > textarea) dd:not(.checkboxes, .radios):not(.singleCheckbox, .singleRadio):has(button:not(.clear, .show), input[type=submit]:not(.clear, .show)) button.show {
|
|
1043
|
+
right: 36%;
|
|
1044
|
+
}
|
|
1045
|
+
form.semanticForms dl:has(dt > label, dd > input, dd > select, dd > textarea) dd:not(.checkboxes, .radios):not(.singleCheckbox, .singleRadio):has(button:not(.clear, .show), input[type=submit]:not(.clear, .show)) input:not([type=submit]), form.semanticForms dl:has(dt > label, dd > input, dd > select, dd > textarea) dd:not(.checkboxes, .radios):not(.singleCheckbox, .singleRadio):has(button:not(.clear, .show), input[type=submit]:not(.clear, .show)) select, form.semanticForms dl:has(dt > label, dd > input, dd > select, dd > textarea) dd:not(.checkboxes, .radios):not(.singleCheckbox, .singleRadio):has(button:not(.clear, .show), input[type=submit]:not(.clear, .show)) textarea,
|
|
1046
|
+
form.semanticForms.light dl:has(dt > label, dd > input, dd > select, dd > textarea) dd:not(.checkboxes, .radios):not(.singleCheckbox, .singleRadio):has(button:not(.clear, .show), input[type=submit]:not(.clear, .show)) input:not([type=submit]),
|
|
1047
|
+
form.semanticForms.light dl:has(dt > label, dd > input, dd > select, dd > textarea) dd:not(.checkboxes, .radios):not(.singleCheckbox, .singleRadio):has(button:not(.clear, .show), input[type=submit]:not(.clear, .show)) select,
|
|
1048
|
+
form.semanticForms.light dl:has(dt > label, dd > input, dd > select, dd > textarea) dd:not(.checkboxes, .radios):not(.singleCheckbox, .singleRadio):has(button:not(.clear, .show), input[type=submit]:not(.clear, .show)) textarea,
|
|
1049
|
+
table.semanticForms dl:has(dt > label, dd > input, dd > select, dd > textarea) dd:not(.checkboxes, .radios):not(.singleCheckbox, .singleRadio):has(button:not(.clear, .show), input[type=submit]:not(.clear, .show)) input:not([type=submit]),
|
|
1050
|
+
table.semanticForms dl:has(dt > label, dd > input, dd > select, dd > textarea) dd:not(.checkboxes, .radios):not(.singleCheckbox, .singleRadio):has(button:not(.clear, .show), input[type=submit]:not(.clear, .show)) select,
|
|
1051
|
+
table.semanticForms dl:has(dt > label, dd > input, dd > select, dd > textarea) dd:not(.checkboxes, .radios):not(.singleCheckbox, .singleRadio):has(button:not(.clear, .show), input[type=submit]:not(.clear, .show)) textarea,
|
|
1052
|
+
table.semanticForms.light dl:has(dt > label, dd > input, dd > select, dd > textarea) dd:not(.checkboxes, .radios):not(.singleCheckbox, .singleRadio):has(button:not(.clear, .show), input[type=submit]:not(.clear, .show)) input:not([type=submit]),
|
|
1053
|
+
table.semanticForms.light dl:has(dt > label, dd > input, dd > select, dd > textarea) dd:not(.checkboxes, .radios):not(.singleCheckbox, .singleRadio):has(button:not(.clear, .show), input[type=submit]:not(.clear, .show)) select,
|
|
1054
|
+
table.semanticForms.light dl:has(dt > label, dd > input, dd > select, dd > textarea) dd:not(.checkboxes, .radios):not(.singleCheckbox, .singleRadio):has(button:not(.clear, .show), input[type=submit]:not(.clear, .show)) textarea {
|
|
1055
|
+
grid-row: 1/2;
|
|
1056
|
+
grid-column: 1/2;
|
|
1057
|
+
}
|
|
1058
|
+
form.semanticForms dl:has(dt > label, dd > input, dd > select, dd > textarea) dd:not(.checkboxes, .radios):not(.singleCheckbox, .singleRadio):has(button:not(.clear, .show), input[type=submit]:not(.clear, .show)) button:not(.clear, .show),
|
|
1059
|
+
form.semanticForms dl:has(dt > label, dd > input, dd > select, dd > textarea) dd:not(.checkboxes, .radios):not(.singleCheckbox, .singleRadio):has(button:not(.clear, .show), input[type=submit]:not(.clear, .show)) input[type=submit]:not(.clear, .show),
|
|
1060
|
+
form.semanticForms.light dl:has(dt > label, dd > input, dd > select, dd > textarea) dd:not(.checkboxes, .radios):not(.singleCheckbox, .singleRadio):has(button:not(.clear, .show), input[type=submit]:not(.clear, .show)) button:not(.clear, .show),
|
|
1061
|
+
form.semanticForms.light dl:has(dt > label, dd > input, dd > select, dd > textarea) dd:not(.checkboxes, .radios):not(.singleCheckbox, .singleRadio):has(button:not(.clear, .show), input[type=submit]:not(.clear, .show)) input[type=submit]:not(.clear, .show),
|
|
1062
|
+
table.semanticForms dl:has(dt > label, dd > input, dd > select, dd > textarea) dd:not(.checkboxes, .radios):not(.singleCheckbox, .singleRadio):has(button:not(.clear, .show), input[type=submit]:not(.clear, .show)) button:not(.clear, .show),
|
|
1063
|
+
table.semanticForms dl:has(dt > label, dd > input, dd > select, dd > textarea) dd:not(.checkboxes, .radios):not(.singleCheckbox, .singleRadio):has(button:not(.clear, .show), input[type=submit]:not(.clear, .show)) input[type=submit]:not(.clear, .show),
|
|
1064
|
+
table.semanticForms.light dl:has(dt > label, dd > input, dd > select, dd > textarea) dd:not(.checkboxes, .radios):not(.singleCheckbox, .singleRadio):has(button:not(.clear, .show), input[type=submit]:not(.clear, .show)) button:not(.clear, .show),
|
|
1065
|
+
table.semanticForms.light dl:has(dt > label, dd > input, dd > select, dd > textarea) dd:not(.checkboxes, .radios):not(.singleCheckbox, .singleRadio):has(button:not(.clear, .show), input[type=submit]:not(.clear, .show)) input[type=submit]:not(.clear, .show) {
|
|
1066
|
+
grid-row: 1/2;
|
|
1067
|
+
grid-column: 2/3;
|
|
1068
|
+
width: 100%;
|
|
1069
|
+
max-width: 100%;
|
|
1070
|
+
padding: 10px;
|
|
1071
|
+
margin-top: var(--semanticFormsInputTopMargin);
|
|
1072
|
+
height: var(--semanticFormsInputHeight);
|
|
1073
|
+
text-overflow: ellipsis;
|
|
1074
|
+
white-space: nowrap;
|
|
1075
|
+
overflow: hidden;
|
|
1076
|
+
display: inline-block;
|
|
1077
|
+
}
|
|
1078
|
+
form.semanticForms dl:has(dt > label, dd > input, dd > select, dd > textarea) dd:not(.checkboxes, .radios):not(.singleCheckbox, .singleRadio):has(button:not(.clear, .show), input[type=submit]:not(.clear, .show)) label:nth-of-type(2),
|
|
1079
|
+
form.semanticForms.light dl:has(dt > label, dd > input, dd > select, dd > textarea) dd:not(.checkboxes, .radios):not(.singleCheckbox, .singleRadio):has(button:not(.clear, .show), input[type=submit]:not(.clear, .show)) label:nth-of-type(2),
|
|
1080
|
+
table.semanticForms dl:has(dt > label, dd > input, dd > select, dd > textarea) dd:not(.checkboxes, .radios):not(.singleCheckbox, .singleRadio):has(button:not(.clear, .show), input[type=submit]:not(.clear, .show)) label:nth-of-type(2),
|
|
1081
|
+
table.semanticForms.light dl:has(dt > label, dd > input, dd > select, dd > textarea) dd:not(.checkboxes, .radios):not(.singleCheckbox, .singleRadio):has(button:not(.clear, .show), input[type=submit]:not(.clear, .show)) label:nth-of-type(2) {
|
|
1082
|
+
grid-row: 2/3;
|
|
1083
|
+
grid-column: 1/-1;
|
|
1084
|
+
}
|
|
986
1085
|
form.semanticForms dl:has(dt > label, dd > input, dd > select, dd > textarea) dd:not(.checkboxes, .radios).singleCheckbox, form.semanticForms dl:has(dt > label, dd > input, dd > select, dd > textarea) dd:not(.checkboxes, .radios).singleRadio,
|
|
987
1086
|
form.semanticForms.light dl:has(dt > label, dd > input, dd > select, dd > textarea) dd:not(.checkboxes, .radios).singleCheckbox,
|
|
988
1087
|
form.semanticForms.light dl:has(dt > label, dd > input, dd > select, dd > textarea) dd:not(.checkboxes, .radios).singleRadio,
|
|
@@ -1012,7 +1111,7 @@ table.semanticForms dl:has(dt > label, dd > input, dd > select, dd > textarea) d
|
|
|
1012
1111
|
table.semanticForms.light dl:has(dt > label, dd > input, dd > select, dd > textarea) dd:not(.checkboxes, .radios).singleCheckbox label:nth-of-type(2),
|
|
1013
1112
|
table.semanticForms.light dl:has(dt > label, dd > input, dd > select, dd > textarea) dd:not(.checkboxes, .radios).singleRadio label:nth-of-type(2) {
|
|
1014
1113
|
grid-column: 1/-1;
|
|
1015
|
-
padding
|
|
1114
|
+
padding: 0 10px;
|
|
1016
1115
|
font-size: small;
|
|
1017
1116
|
color: var(--semanticFormsTextColor);
|
|
1018
1117
|
}
|
|
@@ -1112,6 +1211,8 @@ table.semanticForms input[type=checkbox] + label:first-of-type span.help,
|
|
|
1112
1211
|
table.semanticForms input[type=radio] + label:first-of-type span.help,
|
|
1113
1212
|
table.semanticForms.light input[type=checkbox] + label:first-of-type span.help,
|
|
1114
1213
|
table.semanticForms.light input[type=radio] + label:first-of-type span.help {
|
|
1214
|
+
display: grid;
|
|
1215
|
+
place-items: center;
|
|
1115
1216
|
cursor: help;
|
|
1116
1217
|
pointer-events: auto;
|
|
1117
1218
|
}
|
|
@@ -1166,6 +1267,7 @@ table.semanticForms.light .floatLabelForm div dd:not(.singleCheckbox, .singleRad
|
|
|
1166
1267
|
table.semanticForms.light .floatLabelForm div dd:not(.singleCheckbox, .singleRadio, .checkboxes, .radios) textarea:not(:placeholder-shown):not(.no-float-label):not([type=checkbox]):not([type=radio]) ~ label:first-of-type {
|
|
1167
1268
|
color: var(--semanticFormsTextColor) !important;
|
|
1168
1269
|
transform: translateY(-150%) scale(0.7);
|
|
1270
|
+
width: 100%;
|
|
1169
1271
|
}
|
|
1170
1272
|
form.semanticForms .floatLabelForm div dd:not(.singleCheckbox, .singleRadio, .checkboxes, .radios) input:not([type=submit], [type=reset], [type=image]):focus.no-float-label ~ label:first-of-type, form.semanticForms .floatLabelForm div dd:not(.singleCheckbox, .singleRadio, .checkboxes, .radios) input:not([type=submit], [type=reset], [type=image]):not(:placeholder-shown).no-float-label:not([type=checkbox]):not([type=radio]) ~ label:first-of-type,
|
|
1171
1273
|
form.semanticForms .floatLabelForm div dd:not(.singleCheckbox, .singleRadio, .checkboxes, .radios) select:focus.no-float-label ~ label:first-of-type,
|
|
@@ -1223,7 +1325,7 @@ form.semanticForms.light .floatLabelForm div dd:not(.singleCheckbox, .singleRadi
|
|
|
1223
1325
|
table.semanticForms .floatLabelForm div dd:not(.singleCheckbox, .singleRadio, .checkboxes, .radios) label:nth-of-type(2),
|
|
1224
1326
|
table.semanticForms.light .floatLabelForm div dd:not(.singleCheckbox, .singleRadio, .checkboxes, .radios) label:nth-of-type(2) {
|
|
1225
1327
|
margin-top: -5px;
|
|
1226
|
-
padding
|
|
1328
|
+
padding: 0 10px;
|
|
1227
1329
|
font-size: small;
|
|
1228
1330
|
color: var(--semanticFormsTextColor);
|
|
1229
1331
|
}
|
|
@@ -1358,6 +1460,8 @@ form.semanticForms .floatLabelForm div dd:not(.singleCheckbox, .singleRadio, .ch
|
|
|
1358
1460
|
form.semanticForms.light .floatLabelForm div dd:not(.singleCheckbox, .singleRadio, .checkboxes, .radios) label:first-of-type span.help,
|
|
1359
1461
|
table.semanticForms .floatLabelForm div dd:not(.singleCheckbox, .singleRadio, .checkboxes, .radios) label:first-of-type span.help,
|
|
1360
1462
|
table.semanticForms.light .floatLabelForm div dd:not(.singleCheckbox, .singleRadio, .checkboxes, .radios) label:first-of-type span.help {
|
|
1463
|
+
display: grid;
|
|
1464
|
+
place-items: center;
|
|
1361
1465
|
cursor: help;
|
|
1362
1466
|
pointer-events: auto;
|
|
1363
1467
|
}
|
|
@@ -1377,6 +1481,9 @@ form.semanticForms .floatLabelForm div dt label,
|
|
|
1377
1481
|
form.semanticForms.light .floatLabelForm div dt label,
|
|
1378
1482
|
table.semanticForms .floatLabelForm div dt label,
|
|
1379
1483
|
table.semanticForms.light .floatLabelForm div dt label {
|
|
1484
|
+
display: flex;
|
|
1485
|
+
align-items: center;
|
|
1486
|
+
gap: 5px;
|
|
1380
1487
|
z-index: 2;
|
|
1381
1488
|
user-select: auto;
|
|
1382
1489
|
color: var(--semanticFormsTextColor);
|
|
@@ -1390,12 +1497,14 @@ table.semanticForms.light .floatLabelForm div dt label {
|
|
|
1390
1497
|
overflow: hidden;
|
|
1391
1498
|
text-overflow: ellipsis;
|
|
1392
1499
|
min-width: 0;
|
|
1393
|
-
width:
|
|
1500
|
+
width: 100%;
|
|
1394
1501
|
}
|
|
1395
1502
|
form.semanticForms .floatLabelForm div dt label span.help,
|
|
1396
1503
|
form.semanticForms.light .floatLabelForm div dt label span.help,
|
|
1397
1504
|
table.semanticForms .floatLabelForm div dt label span.help,
|
|
1398
1505
|
table.semanticForms.light .floatLabelForm div dt label span.help {
|
|
1506
|
+
display: grid;
|
|
1507
|
+
place-items: center;
|
|
1399
1508
|
cursor: help;
|
|
1400
1509
|
pointer-events: auto;
|
|
1401
1510
|
}
|
|
@@ -1415,6 +1524,30 @@ table.semanticForms.light .floatLabelForm div:has(dd input:required) dt label >
|
|
|
1415
1524
|
pointer-events: auto;
|
|
1416
1525
|
color: red;
|
|
1417
1526
|
}
|
|
1527
|
+
form.semanticForms .floatLabelForm div:has([data-max-content]),
|
|
1528
|
+
form.semanticForms.light .floatLabelForm div:has([data-max-content]),
|
|
1529
|
+
table.semanticForms .floatLabelForm div:has([data-max-content]),
|
|
1530
|
+
table.semanticForms.light .floatLabelForm div:has([data-max-content]) {
|
|
1531
|
+
max-width: max-content;
|
|
1532
|
+
min-width: 150px;
|
|
1533
|
+
}
|
|
1534
|
+
form.semanticForms .floatLabelForm div:has([data-max-content]) dd,
|
|
1535
|
+
form.semanticForms.light .floatLabelForm div:has([data-max-content]) dd,
|
|
1536
|
+
table.semanticForms .floatLabelForm div:has([data-max-content]) dd,
|
|
1537
|
+
table.semanticForms.light .floatLabelForm div:has([data-max-content]) dd {
|
|
1538
|
+
width: max-content;
|
|
1539
|
+
}
|
|
1540
|
+
form.semanticForms .floatLabelForm div:has([data-max-content]) dd input, form.semanticForms .floatLabelForm div:has([data-max-content]) dd select,
|
|
1541
|
+
form.semanticForms.light .floatLabelForm div:has([data-max-content]) dd input,
|
|
1542
|
+
form.semanticForms.light .floatLabelForm div:has([data-max-content]) dd select,
|
|
1543
|
+
table.semanticForms .floatLabelForm div:has([data-max-content]) dd input,
|
|
1544
|
+
table.semanticForms .floatLabelForm div:has([data-max-content]) dd select,
|
|
1545
|
+
table.semanticForms.light .floatLabelForm div:has([data-max-content]) dd input,
|
|
1546
|
+
table.semanticForms.light .floatLabelForm div:has([data-max-content]) dd select {
|
|
1547
|
+
field-sizing: content;
|
|
1548
|
+
min-width: 150px;
|
|
1549
|
+
max-width: max-content;
|
|
1550
|
+
}
|
|
1418
1551
|
form.semanticForms .floatLabelForm input::placeholder, form.semanticForms .floatLabelForm textarea::placeholder,
|
|
1419
1552
|
form.semanticForms.light .floatLabelForm input::placeholder,
|
|
1420
1553
|
form.semanticForms.light .floatLabelForm textarea::placeholder,
|
|
@@ -2487,8 +2620,8 @@ table.semanticForms tbody tr:last-of-type th,
|
|
|
2487
2620
|
table.semanticForms tbody tr:last-of-type td {
|
|
2488
2621
|
border-bottom: none;
|
|
2489
2622
|
}
|
|
2490
|
-
.semanticForms table menu:has(li > input, li > label, li > button, li > select, li > textarea),
|
|
2491
|
-
table.semanticForms menu:has(li > input, li > label, li > button, li > select, li > textarea) {
|
|
2623
|
+
.semanticForms table menu:has(li > input, li > label, li > button, li > select, li > textarea, li > a),
|
|
2624
|
+
table.semanticForms menu:has(li > input, li > label, li > button, li > select, li > textarea, li > a) {
|
|
2492
2625
|
width: max-content;
|
|
2493
2626
|
}
|
|
2494
2627
|
|