From bed2d4bdc2b13545622fca940a5224d3c80746a1 Mon Sep 17 00:00:00 2001 From: Eric Newport Date: Sat, 17 Jun 2023 11:05:05 -0400 Subject: [PATCH] 3.0.3 - Fixed issue that prevented id selectors from allowing dots in the string. - Fixed issue that prevented the clear field from dispatching an input event. --- CHANGELOG.md | 5 +++++ package-lock.json | 36 ++++++++++++++++++------------------ package.json | 2 +- semanticForms.html | 24 ++++++++++++------------ semanticForms.js | 6 ++++-- 5 files changed, 40 insertions(+), 33 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 82c45a3..87c6114 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ - Put your changes here... +## 3.0.3 + +- Fixed issue that prevented id selectors from allowing dots in the string. +- Fixed issue that prevented the clear field from dispatching an input event. + ## 3.0.2 - Added support for a single checkbox rather than a group of checkboxes. diff --git a/package-lock.json b/package-lock.json index b713bc3..54ed66c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "semantic-forms", - "version": "3.0.2", + "version": "3.0.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "semantic-forms", - "version": "3.0.2", + "version": "3.0.3", "license": "CC-BY-4.0", "devDependencies": { "less": "4.1.3", @@ -88,9 +88,9 @@ "dev": true }, "node_modules/@eslint/js": { - "version": "8.42.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.42.0.tgz", - "integrity": "sha512-6SWlXpWU5AvId8Ac7zjzmIOqMOba/JWY8XZ4A7q7Gn1Vlfg/SFFIlrtHXt9nPn4op9ZPAkl91Jao+QQv3r/ukw==", + "version": "8.43.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.43.0.tgz", + "integrity": "sha512-s2UHCoiXfxMvmfzqoN+vrQ84ahUSYde9qNO1MdxmoEhyHWsfmwOpFlwYV+ePJEVc7gFnATGUi376WowX1N7tFg==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -194,9 +194,9 @@ "dev": true }, "node_modules/acorn": { - "version": "8.8.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", - "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", + "version": "8.9.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.9.0.tgz", + "integrity": "sha512-jaVNAFBHNLXspO543WnNNPZFRtavh3skAkITqD0/2aeMkKZTN+254PyhwxFYrk3vQ1xfY+2wbesJMs/JC8/PwQ==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -379,9 +379,9 @@ } }, "node_modules/builtins/node_modules/semver": { - "version": "7.5.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.1.tgz", - "integrity": "sha512-Wvss5ivl8TMRZXXESstBA4uR5iXgEN/VC5/sOcuXdVLzcdkz4HWetIoRfG5gb5X+ij/G9rw9YoGn3QoQ8OCSpw==", + "version": "7.5.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.2.tgz", + "integrity": "sha512-SoftuTROv/cRjCze/scjGyiDtcUyxw1rgYQSZY7XTmtR5hX+dm76iDbTH8TkLPHCQmlbQVSSbNZCPM2hb0knnQ==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -647,15 +647,15 @@ } }, "node_modules/eslint": { - "version": "8.42.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.42.0.tgz", - "integrity": "sha512-ulg9Ms6E1WPf67PHaEY4/6E2tEn5/f7FXGzr3t9cBMugOmf1INYvuUwwh1aXQN4MfJ6a5K2iNwP3w4AColvI9A==", + "version": "8.43.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.43.0.tgz", + "integrity": "sha512-aaCpf2JqqKesMFGgmRPessmVKjcGXqdlAYLLC3THM8t5nBRZRQ+st5WM/hoJXkdioEXLLbXgclUpM0TXo5HX5Q==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.4.0", "@eslint/eslintrc": "^2.0.3", - "@eslint/js": "8.42.0", + "@eslint/js": "8.43.0", "@humanwhocodes/config-array": "^0.11.10", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", @@ -902,9 +902,9 @@ } }, "node_modules/eslint-plugin-n/node_modules/semver": { - "version": "7.5.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.1.tgz", - "integrity": "sha512-Wvss5ivl8TMRZXXESstBA4uR5iXgEN/VC5/sOcuXdVLzcdkz4HWetIoRfG5gb5X+ij/G9rw9YoGn3QoQ8OCSpw==", + "version": "7.5.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.2.tgz", + "integrity": "sha512-SoftuTROv/cRjCze/scjGyiDtcUyxw1rgYQSZY7XTmtR5hX+dm76iDbTH8TkLPHCQmlbQVSSbNZCPM2hb0knnQ==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" diff --git a/package.json b/package.json index c15dfdc..258a90b 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "semantic-forms", "description": "Semantic Forms", "author": "Eric Newport ", - "version": "3.0.2", + "version": "3.0.3", "files": [ "semanticForms.css", "semanticForms.js", diff --git a/semanticForms.html b/semanticForms.html index 8824d0d..2f416f6 100644 --- a/semanticForms.html +++ b/semanticForms.html @@ -114,20 +114,20 @@

Semantic Forms

- +

Flexbox button layout pattern with two submit buttons:

-
  • -
  • +
  • +
  • Flexbox button layout pattern with three submit buttons:

    -
  • -
  • -
  • +
  • +
  • +
  • @@ -226,20 +226,20 @@

    Semantic Forms

    - +

    Flexbox button layout pattern with two submit buttons:

    -
  • -
  • +
  • +
  • Flexbox button layout pattern with three submit buttons:

    -
  • -
  • -
  • +
  • +
  • +
  • diff --git a/semanticForms.js b/semanticForms.js index 0a4b439..616759f 100644 --- a/semanticForms.js +++ b/semanticForms.js @@ -50,9 +50,9 @@ window.semanticForms = function () { dl.classList.add('floatLabelForm') } if (input.parentNode.parentNode.id && (type === 'checkbox' || type === 'radio')) { - label = document.querySelector('label[data-for=' + input.parentNode.parentNode.id + ']') + label = document.querySelector('label[data-for=' + input.parentNode.parentNode.id.replace(/\./g, '\\.') + ']') } else { - label = document.querySelector('label[for=' + input.id + ']') + label = document.querySelector('label[for=' + input.id.replace(/\./g, '\\.') + ']') } labelHTML = label.innerHTML if (type === 'checkbox' || type === 'radio') { @@ -126,6 +126,8 @@ window.semanticForms = function () { clearfieldHorizontalOffset + clearfieldVerticalOffset > e.clientY - el.getBoundingClientRect().top ) { el.value = '' + el.dispatchEvent(new Event('input')) + el.form.dispatchEvent(new Event('input')) el.classList.remove('x') el.classList.remove('onX') }