@gudhub/ssg-web-components-library 1.0.34 → 1.0.36

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gudhub/ssg-web-components-library",
3
- "version": "1.0.34",
3
+ "version": "1.0.36",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -2,6 +2,7 @@ accordion-only {
2
2
  --hover-transition-duration: .2s;
3
3
  --expand-transition-duration: .5s;
4
4
  --gap: 20px;
5
+ background: var(--bg-color);
5
6
  .subtitle {
6
7
  max-width: 940px;
7
8
  margin-left: auto;
@@ -38,9 +38,11 @@ const emailValidation = (input) => {
38
38
  };
39
39
 
40
40
  const phoneValidation = (input) => {
41
- const regex = /^\d{10}$/;
41
+ // const regex = /^\d{10}$/; // Default strict regex for checking phone number
42
42
 
43
- let isValid = regex.test(input.value);
43
+ // let isValid = regex.test(input.value);
44
+
45
+ let isValid = /^\+?\d+$/; // We can write only numbers without special symbols besides "+" sign
44
46
 
45
47
  if (!isValid) {
46
48
  input.classList.add('error');
@@ -10,9 +10,9 @@ class PricesCards extends GHComponent {
10
10
 
11
11
  async onServerRender() {
12
12
  this.ghId = this.getAttribute('data-gh-id') || null;
13
- this.chapter = this.getAttribute('data-chapter') || 'pages';
13
+ this.application = this.hasAttribute('application') ? this.getAttribute('application') : undefined;
14
14
 
15
- const json = await super.getGhData(this.ghId, this.chapter);
15
+ const json = await super.getGhData(this.ghId, this.application);
16
16
 
17
17
  this.cards = json.cards;
18
18
 
@@ -11,6 +11,7 @@ prices-cards {
11
11
  .subtitle {
12
12
  margin-right: auto;
13
13
  margin-left: auto;
14
+ margin-bottom: 30px;
14
15
  max-width: 507px;
15
16
  text-align: center;
16
17
  }