odontogram 0.0.1 → 0.1.2

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 (55) hide show
  1. package/dist/index.d.mts +35 -0
  2. package/dist/index.mjs +297 -0
  3. package/package.json +48 -100
  4. package/readme.md +140 -0
  5. package/src/index.ts +2 -0
  6. package/src/og-odontogram.ts +109 -0
  7. package/src/og-tooth.ts +76 -0
  8. package/src/stories/Layout.stories.ts +64 -0
  9. package/src/stories/Odontogram.stories.ts +68 -0
  10. package/LICENSE +0 -21
  11. package/README.md +0 -299
  12. package/cdn/components/button/button.d.ts +0 -25
  13. package/cdn/components/button/button.d.ts.map +0 -1
  14. package/cdn/components/button/button.js +0 -598
  15. package/cdn/components/button/button.styles.d.ts +0 -3
  16. package/cdn/components/button/button.styles.d.ts.map +0 -1
  17. package/cdn/components/button/index.d.ts +0 -2
  18. package/cdn/components/button/index.d.ts.map +0 -1
  19. package/cdn/components/button/index.js +0 -2
  20. package/cdn/components/index.d.ts +0 -2
  21. package/cdn/components/index.d.ts.map +0 -1
  22. package/cdn/components/index.js +0 -1
  23. package/cdn/index.d.ts +0 -2
  24. package/cdn/index.d.ts.map +0 -1
  25. package/cdn/index.js +0 -1
  26. package/cdn/loader.js +0 -118
  27. package/custom-elements.json +0 -152
  28. package/dist/components/button/button.d.ts +0 -25
  29. package/dist/components/button/button.d.ts.map +0 -1
  30. package/dist/components/button/button.js +0 -47
  31. package/dist/components/button/button.js.map +0 -1
  32. package/dist/components/button/button.styles.d.ts +0 -3
  33. package/dist/components/button/button.styles.d.ts.map +0 -1
  34. package/dist/components/button/button.styles.js +0 -43
  35. package/dist/components/button/button.styles.js.map +0 -1
  36. package/dist/components/button/index.d.ts +0 -2
  37. package/dist/components/button/index.d.ts.map +0 -1
  38. package/dist/components/button/index.js +0 -3
  39. package/dist/components/button/index.js.map +0 -1
  40. package/dist/components/index.d.ts +0 -2
  41. package/dist/components/index.d.ts.map +0 -1
  42. package/dist/components/index.js +0 -2
  43. package/dist/components/index.js.map +0 -1
  44. package/dist/index.d.ts +0 -2
  45. package/dist/index.d.ts.map +0 -1
  46. package/dist/index.js +0 -2
  47. package/dist/index.js.map +0 -1
  48. package/react/MyButton.d.ts +0 -90
  49. package/react/MyButton.js +0 -32
  50. package/react/index.d.ts +0 -1
  51. package/react/index.js +0 -1
  52. package/react/react-utils.js +0 -67
  53. package/types/custom-element-jsx.d.ts +0 -236
  54. package/types/custom-element-svelte.d.ts +0 -70
  55. package/types/custom-element-vuejs.d.ts +0 -40
@@ -1,598 +0,0 @@
1
- const O = globalThis, j = O.ShadowRoot && (O.ShadyCSS === void 0 || O.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, D = /* @__PURE__ */ Symbol(), V = /* @__PURE__ */ new WeakMap();
2
- let et = class {
3
- constructor(t, e, s) {
4
- if (this._$cssResult$ = !0, s !== D) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
5
- this.cssText = t, this.t = e;
6
- }
7
- get styleSheet() {
8
- let t = this.o;
9
- const e = this.t;
10
- if (j && t === void 0) {
11
- const s = e !== void 0 && e.length === 1;
12
- s && (t = V.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), s && V.set(e, t));
13
- }
14
- return t;
15
- }
16
- toString() {
17
- return this.cssText;
18
- }
19
- };
20
- const at = (r) => new et(typeof r == "string" ? r : r + "", void 0, D), lt = (r, ...t) => {
21
- const e = r.length === 1 ? r[0] : t.reduce((s, i, o) => s + ((n) => {
22
- if (n._$cssResult$ === !0) return n.cssText;
23
- if (typeof n == "number") return n;
24
- throw Error("Value passed to 'css' function must be a 'css' function result: " + n + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
25
- })(i) + r[o + 1], r[0]);
26
- return new et(e, r, D);
27
- }, ct = (r, t) => {
28
- if (j) r.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
29
- else for (const e of t) {
30
- const s = document.createElement("style"), i = O.litNonce;
31
- i !== void 0 && s.setAttribute("nonce", i), s.textContent = e.cssText, r.appendChild(s);
32
- }
33
- }, W = j ? (r) => r : (r) => r instanceof CSSStyleSheet ? ((t) => {
34
- let e = "";
35
- for (const s of t.cssRules) e += s.cssText;
36
- return at(e);
37
- })(r) : r;
38
- const { is: dt, defineProperty: pt, getOwnPropertyDescriptor: ut, getOwnPropertyNames: $t, getOwnPropertySymbols: ft, getPrototypeOf: _t } = Object, N = globalThis, Z = N.trustedTypes, gt = Z ? Z.emptyScript : "", At = N.reactiveElementPolyfillSupport, E = (r, t) => r, H = { toAttribute(r, t) {
39
- switch (t) {
40
- case Boolean:
41
- r = r ? gt : null;
42
- break;
43
- case Object:
44
- case Array:
45
- r = r == null ? r : JSON.stringify(r);
46
- }
47
- return r;
48
- }, fromAttribute(r, t) {
49
- let e = r;
50
- switch (t) {
51
- case Boolean:
52
- e = r !== null;
53
- break;
54
- case Number:
55
- e = r === null ? null : Number(r);
56
- break;
57
- case Object:
58
- case Array:
59
- try {
60
- e = JSON.parse(r);
61
- } catch {
62
- e = null;
63
- }
64
- }
65
- return e;
66
- } }, L = (r, t) => !dt(r, t), J = { attribute: !0, type: String, converter: H, reflect: !1, useDefault: !1, hasChanged: L };
67
- Symbol.metadata ??= /* @__PURE__ */ Symbol("metadata"), N.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
68
- let y = class extends HTMLElement {
69
- static addInitializer(t) {
70
- this._$Ei(), (this.l ??= []).push(t);
71
- }
72
- static get observedAttributes() {
73
- return this.finalize(), this._$Eh && [...this._$Eh.keys()];
74
- }
75
- static createProperty(t, e = J) {
76
- if (e.state && (e.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(t) && ((e = Object.create(e)).wrapped = !0), this.elementProperties.set(t, e), !e.noAccessor) {
77
- const s = /* @__PURE__ */ Symbol(), i = this.getPropertyDescriptor(t, s, e);
78
- i !== void 0 && pt(this.prototype, t, i);
79
- }
80
- }
81
- static getPropertyDescriptor(t, e, s) {
82
- const { get: i, set: o } = ut(this.prototype, t) ?? { get() {
83
- return this[e];
84
- }, set(n) {
85
- this[e] = n;
86
- } };
87
- return { get: i, set(n) {
88
- const a = i?.call(this);
89
- o?.call(this, n), this.requestUpdate(t, a, s);
90
- }, configurable: !0, enumerable: !0 };
91
- }
92
- static getPropertyOptions(t) {
93
- return this.elementProperties.get(t) ?? J;
94
- }
95
- static _$Ei() {
96
- if (this.hasOwnProperty(E("elementProperties"))) return;
97
- const t = _t(this);
98
- t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
99
- }
100
- static finalize() {
101
- if (this.hasOwnProperty(E("finalized"))) return;
102
- if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(E("properties"))) {
103
- const e = this.properties, s = [...$t(e), ...ft(e)];
104
- for (const i of s) this.createProperty(i, e[i]);
105
- }
106
- const t = this[Symbol.metadata];
107
- if (t !== null) {
108
- const e = litPropertyMetadata.get(t);
109
- if (e !== void 0) for (const [s, i] of e) this.elementProperties.set(s, i);
110
- }
111
- this._$Eh = /* @__PURE__ */ new Map();
112
- for (const [e, s] of this.elementProperties) {
113
- const i = this._$Eu(e, s);
114
- i !== void 0 && this._$Eh.set(i, e);
115
- }
116
- this.elementStyles = this.finalizeStyles(this.styles);
117
- }
118
- static finalizeStyles(t) {
119
- const e = [];
120
- if (Array.isArray(t)) {
121
- const s = new Set(t.flat(1 / 0).reverse());
122
- for (const i of s) e.unshift(W(i));
123
- } else t !== void 0 && e.push(W(t));
124
- return e;
125
- }
126
- static _$Eu(t, e) {
127
- const s = e.attribute;
128
- return s === !1 ? void 0 : typeof s == "string" ? s : typeof t == "string" ? t.toLowerCase() : void 0;
129
- }
130
- constructor() {
131
- super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
132
- }
133
- _$Ev() {
134
- this._$ES = new Promise((t) => this.enableUpdating = t), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach((t) => t(this));
135
- }
136
- addController(t) {
137
- (this._$EO ??= /* @__PURE__ */ new Set()).add(t), this.renderRoot !== void 0 && this.isConnected && t.hostConnected?.();
138
- }
139
- removeController(t) {
140
- this._$EO?.delete(t);
141
- }
142
- _$E_() {
143
- const t = /* @__PURE__ */ new Map(), e = this.constructor.elementProperties;
144
- for (const s of e.keys()) this.hasOwnProperty(s) && (t.set(s, this[s]), delete this[s]);
145
- t.size > 0 && (this._$Ep = t);
146
- }
147
- createRenderRoot() {
148
- const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
149
- return ct(t, this.constructor.elementStyles), t;
150
- }
151
- connectedCallback() {
152
- this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach((t) => t.hostConnected?.());
153
- }
154
- enableUpdating(t) {
155
- }
156
- disconnectedCallback() {
157
- this._$EO?.forEach((t) => t.hostDisconnected?.());
158
- }
159
- attributeChangedCallback(t, e, s) {
160
- this._$AK(t, s);
161
- }
162
- _$ET(t, e) {
163
- const s = this.constructor.elementProperties.get(t), i = this.constructor._$Eu(t, s);
164
- if (i !== void 0 && s.reflect === !0) {
165
- const o = (s.converter?.toAttribute !== void 0 ? s.converter : H).toAttribute(e, s.type);
166
- this._$Em = t, o == null ? this.removeAttribute(i) : this.setAttribute(i, o), this._$Em = null;
167
- }
168
- }
169
- _$AK(t, e) {
170
- const s = this.constructor, i = s._$Eh.get(t);
171
- if (i !== void 0 && this._$Em !== i) {
172
- const o = s.getPropertyOptions(i), n = typeof o.converter == "function" ? { fromAttribute: o.converter } : o.converter?.fromAttribute !== void 0 ? o.converter : H;
173
- this._$Em = i;
174
- const a = n.fromAttribute(e, o.type);
175
- this[i] = a ?? this._$Ej?.get(i) ?? a, this._$Em = null;
176
- }
177
- }
178
- requestUpdate(t, e, s, i = !1, o) {
179
- if (t !== void 0) {
180
- const n = this.constructor;
181
- if (i === !1 && (o = this[t]), s ??= n.getPropertyOptions(t), !((s.hasChanged ?? L)(o, e) || s.useDefault && s.reflect && o === this._$Ej?.get(t) && !this.hasAttribute(n._$Eu(t, s)))) return;
182
- this.C(t, e, s);
183
- }
184
- this.isUpdatePending === !1 && (this._$ES = this._$EP());
185
- }
186
- C(t, e, { useDefault: s, reflect: i, wrapped: o }, n) {
187
- s && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(t) && (this._$Ej.set(t, n ?? e ?? this[t]), o !== !0 || n !== void 0) || (this._$AL.has(t) || (this.hasUpdated || s || (e = void 0), this._$AL.set(t, e)), i === !0 && this._$Em !== t && (this._$Eq ??= /* @__PURE__ */ new Set()).add(t));
188
- }
189
- async _$EP() {
190
- this.isUpdatePending = !0;
191
- try {
192
- await this._$ES;
193
- } catch (e) {
194
- Promise.reject(e);
195
- }
196
- const t = this.scheduleUpdate();
197
- return t != null && await t, !this.isUpdatePending;
198
- }
199
- scheduleUpdate() {
200
- return this.performUpdate();
201
- }
202
- performUpdate() {
203
- if (!this.isUpdatePending) return;
204
- if (!this.hasUpdated) {
205
- if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) {
206
- for (const [i, o] of this._$Ep) this[i] = o;
207
- this._$Ep = void 0;
208
- }
209
- const s = this.constructor.elementProperties;
210
- if (s.size > 0) for (const [i, o] of s) {
211
- const { wrapped: n } = o, a = this[i];
212
- n !== !0 || this._$AL.has(i) || a === void 0 || this.C(i, void 0, o, a);
213
- }
214
- }
215
- let t = !1;
216
- const e = this._$AL;
217
- try {
218
- t = this.shouldUpdate(e), t ? (this.willUpdate(e), this._$EO?.forEach((s) => s.hostUpdate?.()), this.update(e)) : this._$EM();
219
- } catch (s) {
220
- throw t = !1, this._$EM(), s;
221
- }
222
- t && this._$AE(e);
223
- }
224
- willUpdate(t) {
225
- }
226
- _$AE(t) {
227
- this._$EO?.forEach((e) => e.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
228
- }
229
- _$EM() {
230
- this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
231
- }
232
- get updateComplete() {
233
- return this.getUpdateComplete();
234
- }
235
- getUpdateComplete() {
236
- return this._$ES;
237
- }
238
- shouldUpdate(t) {
239
- return !0;
240
- }
241
- update(t) {
242
- this._$Eq &&= this._$Eq.forEach((e) => this._$ET(e, this[e])), this._$EM();
243
- }
244
- updated(t) {
245
- }
246
- firstUpdated(t) {
247
- }
248
- };
249
- y.elementStyles = [], y.shadowRootOptions = { mode: "open" }, y[E("elementProperties")] = /* @__PURE__ */ new Map(), y[E("finalized")] = /* @__PURE__ */ new Map(), At?.({ ReactiveElement: y }), (N.reactiveElementVersions ??= []).push("2.1.2");
250
- const z = globalThis, K = (r) => r, M = z.trustedTypes, F = M ? M.createPolicy("lit-html", { createHTML: (r) => r }) : void 0, st = "$lit$", f = `lit$${Math.random().toFixed(9).slice(2)}$`, it = "?" + f, yt = `<${it}>`, A = document, w = () => A.createComment(""), C = (r) => r === null || typeof r != "object" && typeof r != "function", I = Array.isArray, mt = (r) => I(r) || typeof r?.[Symbol.iterator] == "function", k = `[
251
- \f\r]`, v = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, G = /-->/g, Q = />/g, _ = RegExp(`>|${k}(?:([^\\s"'>=/]+)(${k}*=${k}*(?:[^
252
- \f\r"'\`<>=]|("|')|))|$)`, "g"), X = /'/g, Y = /"/g, rt = /^(?:script|style|textarea|title)$/i, bt = (r) => (t, ...e) => ({ _$litType$: r, strings: t, values: e }), vt = bt(1), m = /* @__PURE__ */ Symbol.for("lit-noChange"), d = /* @__PURE__ */ Symbol.for("lit-nothing"), tt = /* @__PURE__ */ new WeakMap(), g = A.createTreeWalker(A, 129);
253
- function ot(r, t) {
254
- if (!I(r) || !r.hasOwnProperty("raw")) throw Error("invalid template strings array");
255
- return F !== void 0 ? F.createHTML(t) : t;
256
- }
257
- const Et = (r, t) => {
258
- const e = r.length - 1, s = [];
259
- let i, o = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", n = v;
260
- for (let a = 0; a < e; a++) {
261
- const h = r[a];
262
- let c, p, l = -1, u = 0;
263
- for (; u < h.length && (n.lastIndex = u, p = n.exec(h), p !== null); ) u = n.lastIndex, n === v ? p[1] === "!--" ? n = G : p[1] !== void 0 ? n = Q : p[2] !== void 0 ? (rt.test(p[2]) && (i = RegExp("</" + p[2], "g")), n = _) : p[3] !== void 0 && (n = _) : n === _ ? p[0] === ">" ? (n = i ?? v, l = -1) : p[1] === void 0 ? l = -2 : (l = n.lastIndex - p[2].length, c = p[1], n = p[3] === void 0 ? _ : p[3] === '"' ? Y : X) : n === Y || n === X ? n = _ : n === G || n === Q ? n = v : (n = _, i = void 0);
264
- const $ = n === _ && r[a + 1].startsWith("/>") ? " " : "";
265
- o += n === v ? h + yt : l >= 0 ? (s.push(c), h.slice(0, l) + st + h.slice(l) + f + $) : h + f + (l === -2 ? a : $);
266
- }
267
- return [ot(r, o + (r[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), s];
268
- };
269
- class P {
270
- constructor({ strings: t, _$litType$: e }, s) {
271
- let i;
272
- this.parts = [];
273
- let o = 0, n = 0;
274
- const a = t.length - 1, h = this.parts, [c, p] = Et(t, e);
275
- if (this.el = P.createElement(c, s), g.currentNode = this.el.content, e === 2 || e === 3) {
276
- const l = this.el.content.firstChild;
277
- l.replaceWith(...l.childNodes);
278
- }
279
- for (; (i = g.nextNode()) !== null && h.length < a; ) {
280
- if (i.nodeType === 1) {
281
- if (i.hasAttributes()) for (const l of i.getAttributeNames()) if (l.endsWith(st)) {
282
- const u = p[n++], $ = i.getAttribute(l).split(f), U = /([.?@])?(.*)/.exec(u);
283
- h.push({ type: 1, index: o, name: U[2], strings: $, ctor: U[1] === "." ? wt : U[1] === "?" ? Ct : U[1] === "@" ? Pt : R }), i.removeAttribute(l);
284
- } else l.startsWith(f) && (h.push({ type: 6, index: o }), i.removeAttribute(l));
285
- if (rt.test(i.tagName)) {
286
- const l = i.textContent.split(f), u = l.length - 1;
287
- if (u > 0) {
288
- i.textContent = M ? M.emptyScript : "";
289
- for (let $ = 0; $ < u; $++) i.append(l[$], w()), g.nextNode(), h.push({ type: 2, index: ++o });
290
- i.append(l[u], w());
291
- }
292
- }
293
- } else if (i.nodeType === 8) if (i.data === it) h.push({ type: 2, index: o });
294
- else {
295
- let l = -1;
296
- for (; (l = i.data.indexOf(f, l + 1)) !== -1; ) h.push({ type: 7, index: o }), l += f.length - 1;
297
- }
298
- o++;
299
- }
300
- }
301
- static createElement(t, e) {
302
- const s = A.createElement("template");
303
- return s.innerHTML = t, s;
304
- }
305
- }
306
- function b(r, t, e = r, s) {
307
- if (t === m) return t;
308
- let i = s !== void 0 ? e._$Co?.[s] : e._$Cl;
309
- const o = C(t) ? void 0 : t._$litDirective$;
310
- return i?.constructor !== o && (i?._$AO?.(!1), o === void 0 ? i = void 0 : (i = new o(r), i._$AT(r, e, s)), s !== void 0 ? (e._$Co ??= [])[s] = i : e._$Cl = i), i !== void 0 && (t = b(r, i._$AS(r, t.values), i, s)), t;
311
- }
312
- class St {
313
- constructor(t, e) {
314
- this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
315
- }
316
- get parentNode() {
317
- return this._$AM.parentNode;
318
- }
319
- get _$AU() {
320
- return this._$AM._$AU;
321
- }
322
- u(t) {
323
- const { el: { content: e }, parts: s } = this._$AD, i = (t?.creationScope ?? A).importNode(e, !0);
324
- g.currentNode = i;
325
- let o = g.nextNode(), n = 0, a = 0, h = s[0];
326
- for (; h !== void 0; ) {
327
- if (n === h.index) {
328
- let c;
329
- h.type === 2 ? c = new x(o, o.nextSibling, this, t) : h.type === 1 ? c = new h.ctor(o, h.name, h.strings, this, t) : h.type === 6 && (c = new xt(o, this, t)), this._$AV.push(c), h = s[++a];
330
- }
331
- n !== h?.index && (o = g.nextNode(), n++);
332
- }
333
- return g.currentNode = A, i;
334
- }
335
- p(t) {
336
- let e = 0;
337
- for (const s of this._$AV) s !== void 0 && (s.strings !== void 0 ? (s._$AI(t, s, e), e += s.strings.length - 2) : s._$AI(t[e])), e++;
338
- }
339
- }
340
- class x {
341
- get _$AU() {
342
- return this._$AM?._$AU ?? this._$Cv;
343
- }
344
- constructor(t, e, s, i) {
345
- this.type = 2, this._$AH = d, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = s, this.options = i, this._$Cv = i?.isConnected ?? !0;
346
- }
347
- get parentNode() {
348
- let t = this._$AA.parentNode;
349
- const e = this._$AM;
350
- return e !== void 0 && t?.nodeType === 11 && (t = e.parentNode), t;
351
- }
352
- get startNode() {
353
- return this._$AA;
354
- }
355
- get endNode() {
356
- return this._$AB;
357
- }
358
- _$AI(t, e = this) {
359
- t = b(this, t, e), C(t) ? t === d || t == null || t === "" ? (this._$AH !== d && this._$AR(), this._$AH = d) : t !== this._$AH && t !== m && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : mt(t) ? this.k(t) : this._(t);
360
- }
361
- O(t) {
362
- return this._$AA.parentNode.insertBefore(t, this._$AB);
363
- }
364
- T(t) {
365
- this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
366
- }
367
- _(t) {
368
- this._$AH !== d && C(this._$AH) ? this._$AA.nextSibling.data = t : this.T(A.createTextNode(t)), this._$AH = t;
369
- }
370
- $(t) {
371
- const { values: e, _$litType$: s } = t, i = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = P.createElement(ot(s.h, s.h[0]), this.options)), s);
372
- if (this._$AH?._$AD === i) this._$AH.p(e);
373
- else {
374
- const o = new St(i, this), n = o.u(this.options);
375
- o.p(e), this.T(n), this._$AH = o;
376
- }
377
- }
378
- _$AC(t) {
379
- let e = tt.get(t.strings);
380
- return e === void 0 && tt.set(t.strings, e = new P(t)), e;
381
- }
382
- k(t) {
383
- I(this._$AH) || (this._$AH = [], this._$AR());
384
- const e = this._$AH;
385
- let s, i = 0;
386
- for (const o of t) i === e.length ? e.push(s = new x(this.O(w()), this.O(w()), this, this.options)) : s = e[i], s._$AI(o), i++;
387
- i < e.length && (this._$AR(s && s._$AB.nextSibling, i), e.length = i);
388
- }
389
- _$AR(t = this._$AA.nextSibling, e) {
390
- for (this._$AP?.(!1, !0, e); t !== this._$AB; ) {
391
- const s = K(t).nextSibling;
392
- K(t).remove(), t = s;
393
- }
394
- }
395
- setConnected(t) {
396
- this._$AM === void 0 && (this._$Cv = t, this._$AP?.(t));
397
- }
398
- }
399
- class R {
400
- get tagName() {
401
- return this.element.tagName;
402
- }
403
- get _$AU() {
404
- return this._$AM._$AU;
405
- }
406
- constructor(t, e, s, i, o) {
407
- this.type = 1, this._$AH = d, this._$AN = void 0, this.element = t, this.name = e, this._$AM = i, this.options = o, s.length > 2 || s[0] !== "" || s[1] !== "" ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = d;
408
- }
409
- _$AI(t, e = this, s, i) {
410
- const o = this.strings;
411
- let n = !1;
412
- if (o === void 0) t = b(this, t, e, 0), n = !C(t) || t !== this._$AH && t !== m, n && (this._$AH = t);
413
- else {
414
- const a = t;
415
- let h, c;
416
- for (t = o[0], h = 0; h < o.length - 1; h++) c = b(this, a[s + h], e, h), c === m && (c = this._$AH[h]), n ||= !C(c) || c !== this._$AH[h], c === d ? t = d : t !== d && (t += (c ?? "") + o[h + 1]), this._$AH[h] = c;
417
- }
418
- n && !i && this.j(t);
419
- }
420
- j(t) {
421
- t === d ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
422
- }
423
- }
424
- class wt extends R {
425
- constructor() {
426
- super(...arguments), this.type = 3;
427
- }
428
- j(t) {
429
- this.element[this.name] = t === d ? void 0 : t;
430
- }
431
- }
432
- class Ct extends R {
433
- constructor() {
434
- super(...arguments), this.type = 4;
435
- }
436
- j(t) {
437
- this.element.toggleAttribute(this.name, !!t && t !== d);
438
- }
439
- }
440
- class Pt extends R {
441
- constructor(t, e, s, i, o) {
442
- super(t, e, s, i, o), this.type = 5;
443
- }
444
- _$AI(t, e = this) {
445
- if ((t = b(this, t, e, 0) ?? d) === m) return;
446
- const s = this._$AH, i = t === d && s !== d || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, o = t !== d && (s === d || i);
447
- i && this.element.removeEventListener(this.name, this, s), o && this.element.addEventListener(this.name, this, t), this._$AH = t;
448
- }
449
- handleEvent(t) {
450
- typeof this._$AH == "function" ? this._$AH.call(this.options?.host ?? this.element, t) : this._$AH.handleEvent(t);
451
- }
452
- }
453
- class xt {
454
- constructor(t, e, s) {
455
- this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = s;
456
- }
457
- get _$AU() {
458
- return this._$AM._$AU;
459
- }
460
- _$AI(t) {
461
- b(this, t);
462
- }
463
- }
464
- const Ut = z.litHtmlPolyfillSupport;
465
- Ut?.(P, x), (z.litHtmlVersions ??= []).push("3.3.2");
466
- const Ot = (r, t, e) => {
467
- const s = e?.renderBefore ?? t;
468
- let i = s._$litPart$;
469
- if (i === void 0) {
470
- const o = e?.renderBefore ?? null;
471
- s._$litPart$ = i = new x(t.insertBefore(w(), o), o, void 0, e ?? {});
472
- }
473
- return i._$AI(r), i;
474
- };
475
- const B = globalThis;
476
- class S extends y {
477
- constructor() {
478
- super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
479
- }
480
- createRenderRoot() {
481
- const t = super.createRenderRoot();
482
- return this.renderOptions.renderBefore ??= t.firstChild, t;
483
- }
484
- update(t) {
485
- const e = this.render();
486
- this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = Ot(e, this.renderRoot, this.renderOptions);
487
- }
488
- connectedCallback() {
489
- super.connectedCallback(), this._$Do?.setConnected(!0);
490
- }
491
- disconnectedCallback() {
492
- super.disconnectedCallback(), this._$Do?.setConnected(!1);
493
- }
494
- render() {
495
- return m;
496
- }
497
- }
498
- S._$litElement$ = !0, S.finalized = !0, B.litElementHydrateSupport?.({ LitElement: S });
499
- const Ht = B.litElementPolyfillSupport;
500
- Ht?.({ LitElement: S });
501
- (B.litElementVersions ??= []).push("4.2.2");
502
- const Mt = { attribute: !0, type: String, converter: H, reflect: !1, hasChanged: L }, Tt = (r = Mt, t, e) => {
503
- const { kind: s, metadata: i } = e;
504
- let o = globalThis.litPropertyMetadata.get(i);
505
- if (o === void 0 && globalThis.litPropertyMetadata.set(i, o = /* @__PURE__ */ new Map()), s === "setter" && ((r = Object.create(r)).wrapped = !0), o.set(e.name, r), s === "accessor") {
506
- const { name: n } = e;
507
- return { set(a) {
508
- const h = t.get.call(this);
509
- t.set.call(this, a), this.requestUpdate(n, h, r, !0, a);
510
- }, init(a) {
511
- return a !== void 0 && this.C(n, void 0, r, a), a;
512
- } };
513
- }
514
- if (s === "setter") {
515
- const { name: n } = e;
516
- return function(a) {
517
- const h = this[n];
518
- t.call(this, a), this.requestUpdate(n, h, r, !0, a);
519
- };
520
- }
521
- throw Error("Unsupported decorator location: " + s);
522
- };
523
- function nt(r) {
524
- return (t, e) => typeof e == "object" ? Tt(r, t, e) : ((s, i, o) => {
525
- const n = i.hasOwnProperty(o);
526
- return i.constructor.createProperty(o, s), n ? Object.getOwnPropertyDescriptor(i, o) : void 0;
527
- })(r, t, e);
528
- }
529
- const Nt = lt`
530
- :host {
531
- --button-bg-color: #f0f0f0;
532
- --button-fg-color: #333;
533
- --button-border-color: transparent;
534
-
535
- display: inline-flex;
536
- }
537
-
538
- button {
539
- cursor: pointer;
540
- background-color: var(--button-bg-color);
541
- border: 1px solid var(--button-border-color);
542
- border-radius: 4px;
543
- color: var(--button-fg-color);
544
- padding: 8px 16px;
545
- }
546
-
547
- button:disabled {
548
- cursor: not-allowed;
549
- opacity: 0.5;
550
- }
551
-
552
- :host([variation='primary']) {
553
- --button-bg-color: #024996;
554
- --button-fg-color: white;
555
- --button-border-color: #024996;
556
- }
557
-
558
- :host([variation='hollow']) {
559
- --button-bg-color: transparent;
560
- --button-fg-color: #024996;
561
- --button-border-color: #024996;
562
- }
563
-
564
- :host([variation='transparent']) {
565
- --button-bg-color: transparent;
566
- --button-fg-color: #024996;
567
- --button-border-color: transparent;
568
- }
569
- `;
570
- var Rt = Object.defineProperty, ht = (r, t, e, s) => {
571
- for (var i = void 0, o = r.length - 1, n; o >= 0; o--)
572
- (n = r[o]) && (i = n(t, e, i) || i);
573
- return i && Rt(t, e, i), i;
574
- };
575
- const q = class q extends S {
576
- constructor() {
577
- super(...arguments), this.disabled = !1;
578
- }
579
- render() {
580
- return vt`
581
- <button part="control" ?disabled=${this.disabled}>
582
- <slot></slot>
583
- </button>
584
- `;
585
- }
586
- };
587
- q.styles = Nt;
588
- let T = q;
589
- ht([
590
- nt()
591
- ], T.prototype, "variation");
592
- ht([
593
- nt({ type: Boolean })
594
- ], T.prototype, "disabled");
595
- export {
596
- T as MyButton,
597
- T as default
598
- };
@@ -1,3 +0,0 @@
1
- declare const _default: import('lit').CSSResult;
2
- export default _default;
3
- //# sourceMappingURL=button.styles.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"button.styles.d.ts","sourceRoot":"","sources":["../../../src/components/button/button.styles.ts"],"names":[],"mappings":";AAEA,wBAwCE"}
@@ -1,2 +0,0 @@
1
- export type * from './button.js';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/button/index.ts"],"names":[],"mappings":"AAEA,mBAAmB,aAAa,CAAC"}
@@ -1,2 +0,0 @@
1
- import { MyButton as t } from "./button.js";
2
- customElements.define("my-button", t);
@@ -1,2 +0,0 @@
1
- export * from './button/index.js';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC"}
@@ -1 +0,0 @@
1
- import "./button/index.js";
package/cdn/index.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export * from './components/index.js';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC"}
package/cdn/index.js DELETED
@@ -1 +0,0 @@
1
- import "./components/button/index.js";