@prodigio-io/sdk 2.1.2 → 2.1.4

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/dist/index.js CHANGED
@@ -92,33 +92,40 @@ async function verifyBadgeToken(token) {
92
92
  }
93
93
  }
94
94
  var BADGE_ELEMENT_ID = "prodigio-badge-widget";
95
- function injectBadge(position = "bottom-right") {
95
+ function injectBadge(_position) {
96
96
  if (typeof document === "undefined") return;
97
97
  if (document.getElementById(BADGE_ELEMENT_ID)) return;
98
- const side = position === "bottom-left" ? "left: 20px;" : "right: 20px;";
98
+ const wrapper = document.createElement("div");
99
+ wrapper.id = BADGE_ELEMENT_ID;
100
+ wrapper.style.cssText = `
101
+ width: 100%; display: flex; justify-content: flex-end;
102
+ padding: 16px 20px; box-sizing: border-box;
103
+ `;
99
104
  const el = document.createElement("a");
100
- el.id = BADGE_ELEMENT_ID;
101
105
  el.href = "https://prodigio.io";
102
106
  el.target = "_blank";
103
107
  el.rel = "noopener noreferrer";
104
108
  el.setAttribute("data-prodigio-badge", "true");
105
109
  el.setAttribute("aria-label", "Hiring powered by Prodigio");
106
110
  el.style.cssText = `
107
- position: fixed; bottom: 20px; ${side}
108
- z-index: 2147483647; display: inline-flex; align-items: center; gap: 6px;
109
- padding: 6px 10px; background: #ffffff; border: 1px solid #e5e5e5;
110
- border-radius: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.08);
111
+ display: inline-flex; align-items: center; gap: 7px;
112
+ padding: 7px 14px; background: #ffffff; border: 1px solid #e5e5e5;
113
+ border-radius: 24px; box-shadow: 0 2px 8px rgba(0,0,0,0.08);
111
114
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
112
- font-size: 11px; font-weight: 500; color: #666666;
115
+ font-size: 12px; font-weight: 400; color: #555555;
113
116
  text-decoration: none; cursor: pointer; transition: box-shadow 0.15s ease;
117
+ white-space: nowrap;
114
118
  `;
115
119
  el.innerHTML = `
116
- <svg width="14" height="14" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
117
- <rect width="24" height="24" rx="6" fill="#3730A3"/>
118
- <path d="M7 7h5.5a3.5 3.5 0 0 1 0 7H7V7z" fill="#fff"/>
119
- <path d="M7 14h6a3 3 0 0 1 0 6H7v-6z" fill="#fff" opacity="0.6"/>
120
- </svg>
121
- <span>Hiring powered by Prodigio</span>
120
+ <span style="color:#555555;font-weight:400;">Hiring powered by</span>
121
+ <span style="display:inline-flex;align-items:center;gap:5px;">
122
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
123
+ <rect width="24" height="24" rx="6" fill="#3730A3"/>
124
+ <path d="M7 7h5.5a3.5 3.5 0 0 1 0 7H7V7z" fill="#fff"/>
125
+ <path d="M7 14h6a3 3 0 0 1 0 6H7v-6z" fill="#fff" opacity="0.6"/>
126
+ </svg>
127
+ <span style="color:#111111;font-weight:600;font-size:12px;">Prodigio</span>
128
+ </span>
122
129
  `;
123
130
  el.addEventListener("mouseenter", () => {
124
131
  el.style.boxShadow = "0 4px 12px rgba(0,0,0,0.12)";
@@ -126,7 +133,8 @@ function injectBadge(position = "bottom-right") {
126
133
  el.addEventListener("mouseleave", () => {
127
134
  el.style.boxShadow = "0 2px 8px rgba(0,0,0,0.08)";
128
135
  });
129
- document.body.appendChild(el);
136
+ wrapper.appendChild(el);
137
+ document.body.appendChild(wrapper);
130
138
  }
131
139
  function removeBadge() {
132
140
  var _a;
package/dist/index.mjs CHANGED
@@ -66,33 +66,40 @@ async function verifyBadgeToken(token) {
66
66
  }
67
67
  }
68
68
  var BADGE_ELEMENT_ID = "prodigio-badge-widget";
69
- function injectBadge(position = "bottom-right") {
69
+ function injectBadge(_position) {
70
70
  if (typeof document === "undefined") return;
71
71
  if (document.getElementById(BADGE_ELEMENT_ID)) return;
72
- const side = position === "bottom-left" ? "left: 20px;" : "right: 20px;";
72
+ const wrapper = document.createElement("div");
73
+ wrapper.id = BADGE_ELEMENT_ID;
74
+ wrapper.style.cssText = `
75
+ width: 100%; display: flex; justify-content: flex-end;
76
+ padding: 16px 20px; box-sizing: border-box;
77
+ `;
73
78
  const el = document.createElement("a");
74
- el.id = BADGE_ELEMENT_ID;
75
79
  el.href = "https://prodigio.io";
76
80
  el.target = "_blank";
77
81
  el.rel = "noopener noreferrer";
78
82
  el.setAttribute("data-prodigio-badge", "true");
79
83
  el.setAttribute("aria-label", "Hiring powered by Prodigio");
80
84
  el.style.cssText = `
81
- position: fixed; bottom: 20px; ${side}
82
- z-index: 2147483647; display: inline-flex; align-items: center; gap: 6px;
83
- padding: 6px 10px; background: #ffffff; border: 1px solid #e5e5e5;
84
- border-radius: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.08);
85
+ display: inline-flex; align-items: center; gap: 7px;
86
+ padding: 7px 14px; background: #ffffff; border: 1px solid #e5e5e5;
87
+ border-radius: 24px; box-shadow: 0 2px 8px rgba(0,0,0,0.08);
85
88
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
86
- font-size: 11px; font-weight: 500; color: #666666;
89
+ font-size: 12px; font-weight: 400; color: #555555;
87
90
  text-decoration: none; cursor: pointer; transition: box-shadow 0.15s ease;
91
+ white-space: nowrap;
88
92
  `;
89
93
  el.innerHTML = `
90
- <svg width="14" height="14" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
91
- <rect width="24" height="24" rx="6" fill="#3730A3"/>
92
- <path d="M7 7h5.5a3.5 3.5 0 0 1 0 7H7V7z" fill="#fff"/>
93
- <path d="M7 14h6a3 3 0 0 1 0 6H7v-6z" fill="#fff" opacity="0.6"/>
94
- </svg>
95
- <span>Hiring powered by Prodigio</span>
94
+ <span style="color:#555555;font-weight:400;">Hiring powered by</span>
95
+ <span style="display:inline-flex;align-items:center;gap:5px;">
96
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
97
+ <rect width="24" height="24" rx="6" fill="#3730A3"/>
98
+ <path d="M7 7h5.5a3.5 3.5 0 0 1 0 7H7V7z" fill="#fff"/>
99
+ <path d="M7 14h6a3 3 0 0 1 0 6H7v-6z" fill="#fff" opacity="0.6"/>
100
+ </svg>
101
+ <span style="color:#111111;font-weight:600;font-size:12px;">Prodigio</span>
102
+ </span>
96
103
  `;
97
104
  el.addEventListener("mouseenter", () => {
98
105
  el.style.boxShadow = "0 4px 12px rgba(0,0,0,0.12)";
@@ -100,7 +107,8 @@ function injectBadge(position = "bottom-right") {
100
107
  el.addEventListener("mouseleave", () => {
101
108
  el.style.boxShadow = "0 2px 8px rgba(0,0,0,0.08)";
102
109
  });
103
- document.body.appendChild(el);
110
+ wrapper.appendChild(el);
111
+ document.body.appendChild(wrapper);
104
112
  }
105
113
  function removeBadge() {
106
114
  var _a;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prodigio-io/sdk",
3
- "version": "2.1.2",
3
+ "version": "2.1.4",
4
4
  "description": "Official JavaScript SDK for the Prodigio hiring API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",