@progressive-development/pd-contact 0.1.68 → 0.5.0

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.
Files changed (40) hide show
  1. package/dist/index.js +10 -0
  2. package/dist/locales/be.js +20 -0
  3. package/dist/locales/de.js +20 -0
  4. package/dist/locales/en.js +20 -0
  5. package/dist/node_modules/@progressive-development/pd-forms/pd-checkbox.js +2 -0
  6. package/dist/node_modules/@progressive-development/pd-forms/pd-form-container.js +2 -0
  7. package/dist/node_modules/@progressive-development/pd-forms/pd-form-row.js +2 -0
  8. package/dist/node_modules/@progressive-development/pd-forms/pd-hover-box.js +2 -0
  9. package/dist/node_modules/@progressive-development/pd-forms/pd-input.js +2 -0
  10. package/dist/node_modules/@progressive-development/pd-forms/pd-radio-group.js +2 -0
  11. package/dist/node_modules/@progressive-development/pd-forms/src/PdBaseInputElement.js +86 -0
  12. package/dist/node_modules/@progressive-development/pd-forms/src/PdBaseUi.js +33 -0
  13. package/dist/node_modules/@progressive-development/pd-forms/src/PdBaseUiInput.js +229 -0
  14. package/dist/node_modules/@progressive-development/pd-forms/src/PdCheckbox.js +230 -0
  15. package/dist/node_modules/@progressive-development/pd-forms/src/PdFormContainer.js +167 -0
  16. package/dist/node_modules/@progressive-development/pd-forms/src/PdFormRow.js +92 -0
  17. package/dist/node_modules/@progressive-development/pd-forms/src/PdHoverBox.js +108 -0
  18. package/dist/node_modules/@progressive-development/pd-forms/src/PdInput.js +79 -0
  19. package/dist/node_modules/@progressive-development/pd-forms/src/PdRadioGroup.js +72 -0
  20. package/dist/node_modules/@progressive-development/pd-forms/src/shared-input-field-styles.js +152 -0
  21. package/dist/node_modules/@progressive-development/pd-forms/src/shared-input-styles.js +64 -0
  22. package/dist/node_modules/@progressive-development/pd-icon/pd-icon.js +4 -0
  23. package/dist/node_modules/@progressive-development/pd-icon/src/PdIcon.js +595 -0
  24. package/dist/node_modules/lit-html/directive.js +27 -0
  25. package/dist/node_modules/lit-html/directives/class-map.js +36 -0
  26. package/dist/node_modules/lit-html/lit-html.js +242 -0
  27. package/dist/pd-contact.js +2 -0
  28. package/dist/src/PdContact.js +616 -0
  29. package/package.json +46 -22
  30. package/.editorconfig +0 -29
  31. package/.storybook/main.js +0 -3
  32. package/.storybook/server.mjs +0 -8
  33. package/demo/index.html +0 -29
  34. package/index.js +0 -1
  35. package/pd-contact.js +0 -3
  36. package/src/PdContact.js +0 -618
  37. package/stories/index.stories.js +0 -78
  38. package/test/pd-contact.test.js +0 -32
  39. package/web-dev-server.config.mjs +0 -27
  40. package/web-test-runner.config.mjs +0 -41
@@ -0,0 +1,27 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2017 Google LLC
4
+ * SPDX-License-Identifier: BSD-3-Clause
5
+ */
6
+ const t = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, e = (t2) => (...e2) => ({ _$litDirective$: t2, values: e2 });
7
+ class i {
8
+ constructor(t2) {
9
+ }
10
+ get _$AU() {
11
+ return this._$AM._$AU;
12
+ }
13
+ _$AT(t2, e2, i2) {
14
+ this._$Ct = t2, this._$AM = e2, this._$Ci = i2;
15
+ }
16
+ _$AS(t2, e2) {
17
+ return this.update(t2, e2);
18
+ }
19
+ update(t2, e2) {
20
+ return this.render(...e2);
21
+ }
22
+ }
23
+ export {
24
+ i as Directive,
25
+ t as PartType,
26
+ e as directive
27
+ };
@@ -0,0 +1,36 @@
1
+ import { noChange as T } from "../lit-html.js";
2
+ import { directive as e, Directive as i, PartType as t } from "../directive.js";
3
+ /**
4
+ * @license
5
+ * Copyright 2018 Google LLC
6
+ * SPDX-License-Identifier: BSD-3-Clause
7
+ */
8
+ const o = e(class extends i {
9
+ constructor(t$1) {
10
+ var i2;
11
+ if (super(t$1), t$1.type !== t.ATTRIBUTE || "class" !== t$1.name || (null === (i2 = t$1.strings) || void 0 === i2 ? void 0 : i2.length) > 2) throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
12
+ }
13
+ render(t2) {
14
+ return " " + Object.keys(t2).filter((i2) => t2[i2]).join(" ") + " ";
15
+ }
16
+ update(i2, [s]) {
17
+ var r, o2;
18
+ if (void 0 === this.it) {
19
+ this.it = /* @__PURE__ */ new Set(), void 0 !== i2.strings && (this.nt = new Set(i2.strings.join(" ").split(/\s/).filter((t2) => "" !== t2)));
20
+ for (const t2 in s) s[t2] && !(null === (r = this.nt) || void 0 === r ? void 0 : r.has(t2)) && this.it.add(t2);
21
+ return this.render(s);
22
+ }
23
+ const e2 = i2.element.classList;
24
+ this.it.forEach((t2) => {
25
+ t2 in s || (e2.remove(t2), this.it.delete(t2));
26
+ });
27
+ for (const t2 in s) {
28
+ const i3 = !!s[t2];
29
+ i3 === this.it.has(t2) || (null === (o2 = this.nt) || void 0 === o2 ? void 0 : o2.has(t2)) || (i3 ? (e2.add(t2), this.it.add(t2)) : (e2.remove(t2), this.it.delete(t2)));
30
+ }
31
+ return T;
32
+ }
33
+ });
34
+ export {
35
+ o as classMap
36
+ };
@@ -0,0 +1,242 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2017 Google LLC
4
+ * SPDX-License-Identifier: BSD-3-Clause
5
+ */
6
+ var t;
7
+ const i = window, s = i.trustedTypes, e = s ? s.createPolicy("lit-html", { createHTML: (t2) => t2 }) : void 0, o = "$lit$", n = `lit$${(Math.random() + "").slice(9)}$`, l = "?" + n, h = `<${l}>`, r = document, u = () => r.createComment(""), d = (t2) => null === t2 || "object" != typeof t2 && "function" != typeof t2, c = Array.isArray, v = (t2) => c(t2) || "function" == typeof (null == t2 ? void 0 : t2[Symbol.iterator]), a = "[ \n\f\r]", f = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, _ = /-->/g, m = />/g, p = RegExp(`>|${a}(?:([^\\s"'>=/]+)(${a}*=${a}*(?:[^
8
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), g = /'/g, $ = /"/g, y = /^(?:script|style|textarea|title)$/i, T = Symbol.for("lit-noChange"), A = Symbol.for("lit-nothing"), E = /* @__PURE__ */ new WeakMap(), C = r.createTreeWalker(r, 129, null, false);
9
+ function P(t2, i2) {
10
+ if (!Array.isArray(t2) || !t2.hasOwnProperty("raw")) throw Error("invalid template strings array");
11
+ return void 0 !== e ? e.createHTML(i2) : i2;
12
+ }
13
+ const V = (t2, i2) => {
14
+ const s2 = t2.length - 1, e2 = [];
15
+ let l2, r2 = 2 === i2 ? "<svg>" : "", u2 = f;
16
+ for (let i3 = 0; i3 < s2; i3++) {
17
+ const s3 = t2[i3];
18
+ let d2, c2, v2 = -1, a2 = 0;
19
+ for (; a2 < s3.length && (u2.lastIndex = a2, c2 = u2.exec(s3), null !== c2); ) a2 = u2.lastIndex, u2 === f ? "!--" === c2[1] ? u2 = _ : void 0 !== c2[1] ? u2 = m : void 0 !== c2[2] ? (y.test(c2[2]) && (l2 = RegExp("</" + c2[2], "g")), u2 = p) : void 0 !== c2[3] && (u2 = p) : u2 === p ? ">" === c2[0] ? (u2 = null != l2 ? l2 : f, v2 = -1) : void 0 === c2[1] ? v2 = -2 : (v2 = u2.lastIndex - c2[2].length, d2 = c2[1], u2 = void 0 === c2[3] ? p : '"' === c2[3] ? $ : g) : u2 === $ || u2 === g ? u2 = p : u2 === _ || u2 === m ? u2 = f : (u2 = p, l2 = void 0);
20
+ const w = u2 === p && t2[i3 + 1].startsWith("/>") ? " " : "";
21
+ r2 += u2 === f ? s3 + h : v2 >= 0 ? (e2.push(d2), s3.slice(0, v2) + o + s3.slice(v2) + n + w) : s3 + n + (-2 === v2 ? (e2.push(void 0), i3) : w);
22
+ }
23
+ return [P(t2, r2 + (t2[s2] || "<?>") + (2 === i2 ? "</svg>" : "")), e2];
24
+ };
25
+ class N {
26
+ constructor({ strings: t2, _$litType$: i2 }, e2) {
27
+ let h2;
28
+ this.parts = [];
29
+ let r2 = 0, d2 = 0;
30
+ const c2 = t2.length - 1, v2 = this.parts, [a2, f2] = V(t2, i2);
31
+ if (this.el = N.createElement(a2, e2), C.currentNode = this.el.content, 2 === i2) {
32
+ const t3 = this.el.content, i3 = t3.firstChild;
33
+ i3.remove(), t3.append(...i3.childNodes);
34
+ }
35
+ for (; null !== (h2 = C.nextNode()) && v2.length < c2; ) {
36
+ if (1 === h2.nodeType) {
37
+ if (h2.hasAttributes()) {
38
+ const t3 = [];
39
+ for (const i3 of h2.getAttributeNames()) if (i3.endsWith(o) || i3.startsWith(n)) {
40
+ const s2 = f2[d2++];
41
+ if (t3.push(i3), void 0 !== s2) {
42
+ const t4 = h2.getAttribute(s2.toLowerCase() + o).split(n), i4 = /([.?@])?(.*)/.exec(s2);
43
+ v2.push({ type: 1, index: r2, name: i4[2], strings: t4, ctor: "." === i4[1] ? H : "?" === i4[1] ? L : "@" === i4[1] ? z : k });
44
+ } else v2.push({ type: 6, index: r2 });
45
+ }
46
+ for (const i3 of t3) h2.removeAttribute(i3);
47
+ }
48
+ if (y.test(h2.tagName)) {
49
+ const t3 = h2.textContent.split(n), i3 = t3.length - 1;
50
+ if (i3 > 0) {
51
+ h2.textContent = s ? s.emptyScript : "";
52
+ for (let s2 = 0; s2 < i3; s2++) h2.append(t3[s2], u()), C.nextNode(), v2.push({ type: 2, index: ++r2 });
53
+ h2.append(t3[i3], u());
54
+ }
55
+ }
56
+ } else if (8 === h2.nodeType) if (h2.data === l) v2.push({ type: 2, index: r2 });
57
+ else {
58
+ let t3 = -1;
59
+ for (; -1 !== (t3 = h2.data.indexOf(n, t3 + 1)); ) v2.push({ type: 7, index: r2 }), t3 += n.length - 1;
60
+ }
61
+ r2++;
62
+ }
63
+ }
64
+ static createElement(t2, i2) {
65
+ const s2 = r.createElement("template");
66
+ return s2.innerHTML = t2, s2;
67
+ }
68
+ }
69
+ function S(t2, i2, s2 = t2, e2) {
70
+ var o2, n2, l2, h2;
71
+ if (i2 === T) return i2;
72
+ let r2 = void 0 !== e2 ? null === (o2 = s2._$Co) || void 0 === o2 ? void 0 : o2[e2] : s2._$Cl;
73
+ const u2 = d(i2) ? void 0 : i2._$litDirective$;
74
+ return (null == r2 ? void 0 : r2.constructor) !== u2 && (null === (n2 = null == r2 ? void 0 : r2._$AO) || void 0 === n2 || n2.call(r2, false), void 0 === u2 ? r2 = void 0 : (r2 = new u2(t2), r2._$AT(t2, s2, e2)), void 0 !== e2 ? (null !== (l2 = (h2 = s2)._$Co) && void 0 !== l2 ? l2 : h2._$Co = [])[e2] = r2 : s2._$Cl = r2), void 0 !== r2 && (i2 = S(t2, r2._$AS(t2, i2.values), r2, e2)), i2;
75
+ }
76
+ class M {
77
+ constructor(t2, i2) {
78
+ this._$AV = [], this._$AN = void 0, this._$AD = t2, this._$AM = i2;
79
+ }
80
+ get parentNode() {
81
+ return this._$AM.parentNode;
82
+ }
83
+ get _$AU() {
84
+ return this._$AM._$AU;
85
+ }
86
+ u(t2) {
87
+ var i2;
88
+ const { el: { content: s2 }, parts: e2 } = this._$AD, o2 = (null !== (i2 = null == t2 ? void 0 : t2.creationScope) && void 0 !== i2 ? i2 : r).importNode(s2, true);
89
+ C.currentNode = o2;
90
+ let n2 = C.nextNode(), l2 = 0, h2 = 0, u2 = e2[0];
91
+ for (; void 0 !== u2; ) {
92
+ if (l2 === u2.index) {
93
+ let i3;
94
+ 2 === u2.type ? i3 = new R(n2, n2.nextSibling, this, t2) : 1 === u2.type ? i3 = new u2.ctor(n2, u2.name, u2.strings, this, t2) : 6 === u2.type && (i3 = new Z(n2, this, t2)), this._$AV.push(i3), u2 = e2[++h2];
95
+ }
96
+ l2 !== (null == u2 ? void 0 : u2.index) && (n2 = C.nextNode(), l2++);
97
+ }
98
+ return C.currentNode = r, o2;
99
+ }
100
+ v(t2) {
101
+ let i2 = 0;
102
+ for (const s2 of this._$AV) void 0 !== s2 && (void 0 !== s2.strings ? (s2._$AI(t2, s2, i2), i2 += s2.strings.length - 2) : s2._$AI(t2[i2])), i2++;
103
+ }
104
+ }
105
+ class R {
106
+ constructor(t2, i2, s2, e2) {
107
+ var o2;
108
+ this.type = 2, this._$AH = A, this._$AN = void 0, this._$AA = t2, this._$AB = i2, this._$AM = s2, this.options = e2, this._$Cp = null === (o2 = null == e2 ? void 0 : e2.isConnected) || void 0 === o2 || o2;
109
+ }
110
+ get _$AU() {
111
+ var t2, i2;
112
+ return null !== (i2 = null === (t2 = this._$AM) || void 0 === t2 ? void 0 : t2._$AU) && void 0 !== i2 ? i2 : this._$Cp;
113
+ }
114
+ get parentNode() {
115
+ let t2 = this._$AA.parentNode;
116
+ const i2 = this._$AM;
117
+ return void 0 !== i2 && 11 === (null == t2 ? void 0 : t2.nodeType) && (t2 = i2.parentNode), t2;
118
+ }
119
+ get startNode() {
120
+ return this._$AA;
121
+ }
122
+ get endNode() {
123
+ return this._$AB;
124
+ }
125
+ _$AI(t2, i2 = this) {
126
+ t2 = S(this, t2, i2), d(t2) ? t2 === A || null == t2 || "" === t2 ? (this._$AH !== A && this._$AR(), this._$AH = A) : t2 !== this._$AH && t2 !== T && this._(t2) : void 0 !== t2._$litType$ ? this.g(t2) : void 0 !== t2.nodeType ? this.$(t2) : v(t2) ? this.T(t2) : this._(t2);
127
+ }
128
+ k(t2) {
129
+ return this._$AA.parentNode.insertBefore(t2, this._$AB);
130
+ }
131
+ $(t2) {
132
+ this._$AH !== t2 && (this._$AR(), this._$AH = this.k(t2));
133
+ }
134
+ _(t2) {
135
+ this._$AH !== A && d(this._$AH) ? this._$AA.nextSibling.data = t2 : this.$(r.createTextNode(t2)), this._$AH = t2;
136
+ }
137
+ g(t2) {
138
+ var i2;
139
+ const { values: s2, _$litType$: e2 } = t2, o2 = "number" == typeof e2 ? this._$AC(t2) : (void 0 === e2.el && (e2.el = N.createElement(P(e2.h, e2.h[0]), this.options)), e2);
140
+ if ((null === (i2 = this._$AH) || void 0 === i2 ? void 0 : i2._$AD) === o2) this._$AH.v(s2);
141
+ else {
142
+ const t3 = new M(o2, this), i3 = t3.u(this.options);
143
+ t3.v(s2), this.$(i3), this._$AH = t3;
144
+ }
145
+ }
146
+ _$AC(t2) {
147
+ let i2 = E.get(t2.strings);
148
+ return void 0 === i2 && E.set(t2.strings, i2 = new N(t2)), i2;
149
+ }
150
+ T(t2) {
151
+ c(this._$AH) || (this._$AH = [], this._$AR());
152
+ const i2 = this._$AH;
153
+ let s2, e2 = 0;
154
+ for (const o2 of t2) e2 === i2.length ? i2.push(s2 = new R(this.k(u()), this.k(u()), this, this.options)) : s2 = i2[e2], s2._$AI(o2), e2++;
155
+ e2 < i2.length && (this._$AR(s2 && s2._$AB.nextSibling, e2), i2.length = e2);
156
+ }
157
+ _$AR(t2 = this._$AA.nextSibling, i2) {
158
+ var s2;
159
+ for (null === (s2 = this._$AP) || void 0 === s2 || s2.call(this, false, true, i2); t2 && t2 !== this._$AB; ) {
160
+ const i3 = t2.nextSibling;
161
+ t2.remove(), t2 = i3;
162
+ }
163
+ }
164
+ setConnected(t2) {
165
+ var i2;
166
+ void 0 === this._$AM && (this._$Cp = t2, null === (i2 = this._$AP) || void 0 === i2 || i2.call(this, t2));
167
+ }
168
+ }
169
+ class k {
170
+ constructor(t2, i2, s2, e2, o2) {
171
+ this.type = 1, this._$AH = A, this._$AN = void 0, this.element = t2, this.name = i2, this._$AM = e2, this.options = o2, s2.length > 2 || "" !== s2[0] || "" !== s2[1] ? (this._$AH = Array(s2.length - 1).fill(new String()), this.strings = s2) : this._$AH = A;
172
+ }
173
+ get tagName() {
174
+ return this.element.tagName;
175
+ }
176
+ get _$AU() {
177
+ return this._$AM._$AU;
178
+ }
179
+ _$AI(t2, i2 = this, s2, e2) {
180
+ const o2 = this.strings;
181
+ let n2 = false;
182
+ if (void 0 === o2) t2 = S(this, t2, i2, 0), n2 = !d(t2) || t2 !== this._$AH && t2 !== T, n2 && (this._$AH = t2);
183
+ else {
184
+ const e3 = t2;
185
+ let l2, h2;
186
+ for (t2 = o2[0], l2 = 0; l2 < o2.length - 1; l2++) h2 = S(this, e3[s2 + l2], i2, l2), h2 === T && (h2 = this._$AH[l2]), n2 || (n2 = !d(h2) || h2 !== this._$AH[l2]), h2 === A ? t2 = A : t2 !== A && (t2 += (null != h2 ? h2 : "") + o2[l2 + 1]), this._$AH[l2] = h2;
187
+ }
188
+ n2 && !e2 && this.j(t2);
189
+ }
190
+ j(t2) {
191
+ t2 === A ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, null != t2 ? t2 : "");
192
+ }
193
+ }
194
+ class H extends k {
195
+ constructor() {
196
+ super(...arguments), this.type = 3;
197
+ }
198
+ j(t2) {
199
+ this.element[this.name] = t2 === A ? void 0 : t2;
200
+ }
201
+ }
202
+ const I = s ? s.emptyScript : "";
203
+ class L extends k {
204
+ constructor() {
205
+ super(...arguments), this.type = 4;
206
+ }
207
+ j(t2) {
208
+ t2 && t2 !== A ? this.element.setAttribute(this.name, I) : this.element.removeAttribute(this.name);
209
+ }
210
+ }
211
+ class z extends k {
212
+ constructor(t2, i2, s2, e2, o2) {
213
+ super(t2, i2, s2, e2, o2), this.type = 5;
214
+ }
215
+ _$AI(t2, i2 = this) {
216
+ var s2;
217
+ if ((t2 = null !== (s2 = S(this, t2, i2, 0)) && void 0 !== s2 ? s2 : A) === T) return;
218
+ const e2 = this._$AH, o2 = t2 === A && e2 !== A || t2.capture !== e2.capture || t2.once !== e2.once || t2.passive !== e2.passive, n2 = t2 !== A && (e2 === A || o2);
219
+ o2 && this.element.removeEventListener(this.name, this, e2), n2 && this.element.addEventListener(this.name, this, t2), this._$AH = t2;
220
+ }
221
+ handleEvent(t2) {
222
+ var i2, s2;
223
+ "function" == typeof this._$AH ? this._$AH.call(null !== (s2 = null === (i2 = this.options) || void 0 === i2 ? void 0 : i2.host) && void 0 !== s2 ? s2 : this.element, t2) : this._$AH.handleEvent(t2);
224
+ }
225
+ }
226
+ class Z {
227
+ constructor(t2, i2, s2) {
228
+ this.element = t2, this.type = 6, this._$AN = void 0, this._$AM = i2, this.options = s2;
229
+ }
230
+ get _$AU() {
231
+ return this._$AM._$AU;
232
+ }
233
+ _$AI(t2) {
234
+ S(this, t2);
235
+ }
236
+ }
237
+ const B = i.litHtmlPolyfillSupport;
238
+ null == B || B(N, R), (null !== (t = i.litHtmlVersions) && void 0 !== t ? t : i.litHtmlVersions = []).push("2.8.0");
239
+ export {
240
+ T as noChange,
241
+ A as nothing
242
+ };
@@ -0,0 +1,2 @@
1
+ import { PdContact } from "./src/PdContact.js";
2
+ window.customElements.define("pd-contact", PdContact);