semantic-forms 5.1.3 → 5.1.5
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 +10 -0
- package/dist/semantic-forms.cjs +1 -1
- package/dist/semantic-forms.cjs.map +1 -1
- package/dist/semantic-forms.css +48 -23
- package/dist/semantic-forms.css.map +1 -1
- package/dist/semantic-forms.js +1 -1
- 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 +3 -3
- package/dist/semantic-forms.mjs.map +1 -1
- package/docs/statics/js/semantic-forms-main.js +4 -0
- package/docs/statics/pages/fullDemo.html +3 -27
- package/docs/statics/pages/usage.html +18 -0
- package/package.json +4 -4
- package/semanticForms.js +1 -1
- package/semanticForms.scss +12 -2
|
@@ -121,6 +121,24 @@
|
|
|
121
121
|
</li>
|
|
122
122
|
</ul>
|
|
123
123
|
|
|
124
|
+
<p>You can also disable float labels on a per-field basis with the <code>no-float-label</code> class:</p>
|
|
125
|
+
|
|
126
|
+
<pre><code class='language-html' lang='html'><escape>
|
|
127
|
+
<form class="semanticForms">
|
|
128
|
+
<dl>
|
|
129
|
+
<dt><label for="search">Search</label></dt>
|
|
130
|
+
<dd><input id="search" name="search" type="search" placeholder="e.g. cool stuff" class="no-float-label"></dd>
|
|
131
|
+
</dl>
|
|
132
|
+
</form>
|
|
133
|
+
</escape></code></pre>
|
|
134
|
+
|
|
135
|
+
<form class="semanticForms">
|
|
136
|
+
<dl>
|
|
137
|
+
<dt><label for="search">Search</label></dt>
|
|
138
|
+
<dd><input id="search" name="search" type="search" placeholder="e.g. cool stuff" class="no-float-label"></dd>
|
|
139
|
+
</dl>
|
|
140
|
+
</form>
|
|
141
|
+
|
|
124
142
|
<h4 id="responsivecolumns">Responsive columns</h4>
|
|
125
143
|
|
|
126
144
|
<p>This feature makes it so the form fields will grow, shrink, expand the number of columns, or reduce the number of columns based on how much space exists in the container. You can customize it by applying various <code>colspan-#</code> classes to various elements in the form markup structure.</p>
|
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"url": "https://github.com/rooseveltframework/semantic-forms/graphs/contributors"
|
|
9
9
|
}
|
|
10
10
|
],
|
|
11
|
-
"version": "5.1.
|
|
11
|
+
"version": "5.1.5",
|
|
12
12
|
"files": [
|
|
13
13
|
"dist",
|
|
14
14
|
"semanticForms.scss",
|
|
@@ -21,13 +21,13 @@
|
|
|
21
21
|
"readmeFilename": "README.md",
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@jsdevtools/coverage-istanbul-loader": "3.0.5",
|
|
24
|
-
"@playwright/test": "1.
|
|
25
|
-
"eslint": "9.
|
|
24
|
+
"@playwright/test": "1.55.0",
|
|
25
|
+
"eslint": "9.35.0",
|
|
26
26
|
"eslint-plugin-html": "8.1.3",
|
|
27
27
|
"express": "5.1.0",
|
|
28
28
|
"nodemon": "3.1.10",
|
|
29
29
|
"nyc": "17.1.0",
|
|
30
|
-
"sass": "1.
|
|
30
|
+
"sass": "1.92.1",
|
|
31
31
|
"http-server": "14.1.1",
|
|
32
32
|
"standard": "17.1.2",
|
|
33
33
|
"webpack-cli": "6.0.1"
|
package/semanticForms.js
CHANGED
|
@@ -7,7 +7,7 @@ const semanticForms = () => {
|
|
|
7
7
|
|
|
8
8
|
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>'
|
|
9
9
|
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>'
|
|
10
|
-
const helpTextIcon = '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="
|
|
10
|
+
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>'
|
|
11
11
|
|
|
12
12
|
const nodeNameLookup = ['TEXTAREA', 'SELECT']
|
|
13
13
|
const inputTypeLookup = ['checkbox', 'color', 'date', 'datetime-local', 'email', 'file', 'image', 'month', 'number', 'password', 'radio', 'range', 'search', 'tel', 'text', 'time', 'url', 'week']
|
package/semanticForms.scss
CHANGED
|
@@ -564,8 +564,8 @@ table.semanticForms.light {
|
|
|
564
564
|
input:not([type='submit'], [type='reset'], [type='image']),
|
|
565
565
|
select,
|
|
566
566
|
textarea {
|
|
567
|
-
&:focus:not([type=checkbox], [type=radio]) ~ label:first-of-type,
|
|
568
|
-
&:not(:placeholder-shown
|
|
567
|
+
&:focus:not([type=checkbox], [type=radio], .no-float-label) ~ label:first-of-type,
|
|
568
|
+
&:not(:placeholder-shown):not(.no-float-label):not([type=checkbox]):not([type=radio]) ~ label:first-of-type {
|
|
569
569
|
color: var(--semanticFormsTextColor) !important;
|
|
570
570
|
// TODO: finish this work on making the help icon responsive
|
|
571
571
|
// width: 100%;
|
|
@@ -580,6 +580,16 @@ table.semanticForms.light {
|
|
|
580
580
|
}
|
|
581
581
|
}
|
|
582
582
|
|
|
583
|
+
// hide float label if no-float-label class is present
|
|
584
|
+
input:not([type='submit'], [type='reset'], [type='image']),
|
|
585
|
+
select,
|
|
586
|
+
textarea {
|
|
587
|
+
&:focus.no-float-label ~ label:first-of-type,
|
|
588
|
+
&:not(:placeholder-shown).no-float-label:not([type=checkbox]):not([type=radio]) ~ label:first-of-type {
|
|
589
|
+
display: none;
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
|
|
583
593
|
select ~ label:first-of-type {
|
|
584
594
|
// force label to be correct color
|
|
585
595
|
color: var(--semanticFormsTextColor) !important;
|