@charisol/plexo-sdk 1.0.14 → 1.0.15

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.
@@ -13,7 +13,7 @@ var e = /* @__PURE__ */ new Set([
13
13
  }, a = (e, a) => {
14
14
  let o = i(e, a), s = n(e.style || {}), c = r(o.htmlClassNames, o.htmlClass, o.validationClass, o.validationClassName), l = t(o.name || o.fieldName || "field"), u = t(o.placeholder || ""), d = o.required ? " required" : "";
15
15
  if (a === "email") return `<mj-table><tr><td style="padding:10px 12px;border:1px solid #d1d5db;border-radius:6px;color:#64748b;${s}">${u || l}</td></tr></mj-table>`;
16
- let f = t(o.inputType || (e.type === "input" ? o.type || "text" : e.type)), p = o.htmlId ? ` id="${t(o.htmlId)}"` : "", m = c ? ` class="${t(c)}"` : "";
16
+ let f = t(o.inputType || o.type || (e.type === "input" ? o.kind || "text" : e.type)), p = o.htmlId ? ` id="${t(o.htmlId)}"` : "", m = c ? ` class="${t(c)}"` : "";
17
17
  return e.type === "textarea" ? `<textarea${p}${m} name="${l}" placeholder="${u}" style="${s}"${d}>${t(o.value || "")}</textarea>` : e.type === "select" ? `<select${p}${m} name="${l}" style="${s}"${d}>${(o.options || []).map((e) => `<option value="${t(e.value)}">${t(e.label)}</option>`).join("")}</select>` : `<input${p}${m} type="${f}" name="${l}" placeholder="${u}" value="${t(o.value || "")}" style="${s}"${d} />`;
18
18
  }, o = (e, o) => {
19
19
  let s = i(e, o), c = n(e.style || {}), l = r(s.htmlClassNames, s.htmlClass), u = s.htmlId ? ` id="${t(s.htmlId)}"` : "", d = l ? ` class="${t(l)}"` : "", f = t(s.actionUrl || s.action || "#"), p = t(s.method || "POST"), m = s.fields || [], h = t(s.submitLabel || "Submit");
package/dist/index.js CHANGED
@@ -827,6 +827,14 @@ var A = [
827
827
  label: "Email",
828
828
  value: "email"
829
829
  },
830
+ {
831
+ label: "Number",
832
+ value: "number"
833
+ },
834
+ {
835
+ label: "Date",
836
+ value: "date"
837
+ },
830
838
  {
831
839
  label: "Textarea",
832
840
  value: "textarea"
@@ -1370,6 +1378,31 @@ var A = [
1370
1378
  borderRadius: "12px",
1371
1379
  borderWidth: "1px",
1372
1380
  borderColor: "#e2e8f0"
1381
+ } : e === "number" ? {
1382
+ id: t,
1383
+ kind: e,
1384
+ name: "number",
1385
+ label: "Number",
1386
+ showLabel: !0,
1387
+ inheritStylesFromPrevious: !1,
1388
+ placeholder: "0",
1389
+ fontSize: "13px",
1390
+ labelFontWeight: "700",
1391
+ borderRadius: "12px",
1392
+ borderWidth: "1px",
1393
+ borderColor: "#e2e8f0"
1394
+ } : e === "date" ? {
1395
+ id: t,
1396
+ kind: e,
1397
+ name: "date",
1398
+ label: "Date",
1399
+ showLabel: !0,
1400
+ inheritStylesFromPrevious: !1,
1401
+ fontSize: "13px",
1402
+ labelFontWeight: "700",
1403
+ borderRadius: "12px",
1404
+ borderWidth: "1px",
1405
+ borderColor: "#e2e8f0"
1373
1406
  } : e === "textarea" ? {
1374
1407
  id: t,
1375
1408
  kind: e,
@@ -48159,7 +48192,11 @@ var oP = (e) => {
48159
48192
  }) : /* @__PURE__ */ E("span", { className: `flex h-3.5 w-3.5 items-center justify-center border border-slate-350 ${n.kind === "radio" ? "rounded-full" : "rounded-sm"}` }), e.label]
48160
48193
  }, e.value))
48161
48194
  }) : /* @__PURE__ */ E("input", {
48162
- type: n.kind === "email" ? "email" : "text",
48195
+ type: [
48196
+ "email",
48197
+ "number",
48198
+ "date"
48199
+ ].includes(n.kind) ? n.kind : "text",
48163
48200
  placeholder: n.placeholder || "Type here",
48164
48201
  className: `w-full border bg-white px-3.5 py-3 outline-none ${_ ? "" : "pointer-events-none"}`,
48165
48202
  style: {
@@ -1,7 +1,7 @@
1
1
  import type { ReactNode } from 'react';
2
2
  import type { ColumnJSON, ElementJSON, RowJSON, TemplateJSON } from './types';
3
3
  export type StockProvider = 'all' | 'unsplash' | 'pexels' | 'pixabay';
4
- export type FormFieldKind = 'text' | 'email' | 'textarea' | 'select' | 'radio' | 'checkbox';
4
+ export type FormFieldKind = 'text' | 'email' | 'number' | 'date' | 'textarea' | 'select' | 'radio' | 'checkbox';
5
5
  export interface StockImageResult {
6
6
  id: string;
7
7
  src: string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@charisol/plexo-sdk",
3
3
  "private": false,
4
- "version": "1.0.14",
4
+ "version": "1.0.15",
5
5
  "description": "Plexo visual email and landing page builder SDK — drag-and-drop template editor with AI integration.",
6
6
  "keywords": [
7
7
  "email-builder",