@styleon/foundation 0.0.0-next.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.
package/README.md ADDED
@@ -0,0 +1,5 @@
1
+ # Styleon Design system
2
+
3
+ ```bash
4
+ npm i @styleon/foundation
5
+ ```
@@ -0,0 +1,6 @@
1
+ import { LitElement, TemplateResult } from 'lit';
2
+ export declare class FlashButton extends LitElement {
3
+ static styles: import('lit').CSSResult;
4
+ variant: 'primary' | 'secondary';
5
+ render(): TemplateResult;
6
+ }
@@ -0,0 +1,32 @@
1
+ import "../node_modules/@lit/reactive-element/reactive-element.js";
2
+ import { html as i } from "../node_modules/lit-html/lit-html.js";
3
+ import { LitElement as l } from "../node_modules/lit-element/lit-element.js";
4
+ import u from "./button.scss.js";
5
+ import { customElement as f } from "../node_modules/@lit/reactive-element/decorators/custom-element.js";
6
+ import { property as v } from "../node_modules/@lit/reactive-element/decorators/property.js";
7
+ import { unsafeCSS as c, css as b } from "../node_modules/@lit/reactive-element/css-tag.js";
8
+ var y = Object.defineProperty, _ = Object.getOwnPropertyDescriptor, m = (p, r, s, e) => {
9
+ for (var t = e > 1 ? void 0 : e ? _(r, s) : r, a = p.length - 1, n; a >= 0; a--)
10
+ (n = p[a]) && (t = (e ? n(r, s, t) : n(t)) || t);
11
+ return e && t && y(r, s, t), t;
12
+ };
13
+ let o = class extends l {
14
+ constructor() {
15
+ super(...arguments), this.variant = "primary";
16
+ }
17
+ render() {
18
+ return i`<button>
19
+ <slot></slot>
20
+ </button>`;
21
+ }
22
+ };
23
+ o.styles = b`${c(u)}`;
24
+ m([
25
+ v({ type: String, reflect: !0, attribute: "variant" })
26
+ ], o.prototype, "variant", 2);
27
+ o = m([
28
+ f("flash-button")
29
+ ], o);
30
+ export {
31
+ o as FlashButton
32
+ };
@@ -0,0 +1,4 @@
1
+ const o = "button{background-color:#555ab9;color:#fff;padding:11px 20px;font-size:14px;border-radius:4px;border:none}";
2
+ export {
3
+ o as default
4
+ };
@@ -0,0 +1,2 @@
1
+ export * as FlashButton from './button/button.component';
2
+ export * as FlashModal from './modal/modal';
package/dist/index.js ADDED
@@ -0,0 +1,6 @@
1
+ import * as o from "./button/button.component.js";
2
+ import * as t from "./modal/modal.js";
3
+ export {
4
+ o as FlashButton,
5
+ t as FlashModal
6
+ };
@@ -0,0 +1,5 @@
1
+ import { LitElement, TemplateResult } from 'lit';
2
+ export declare class FlashModal extends LitElement {
3
+ static get styles(): any;
4
+ render(): TemplateResult;
5
+ }
@@ -0,0 +1,19 @@
1
+ import "../node_modules/@lit/reactive-element/reactive-element.js";
2
+ import { html as t } from "../node_modules/lit-html/lit-html.js";
3
+ import { LitElement as e } from "../node_modules/lit-element/lit-element.js";
4
+ import o from "./modal.scss.js";
5
+ class r extends e {
6
+ // static styles = css`${ButtonStyle}`;
7
+ static get styles() {
8
+ return o;
9
+ }
10
+ render() {
11
+ return t`<button>
12
+ <slot></slot>
13
+ </button>`;
14
+ }
15
+ }
16
+ customElements.define("flash-button", r);
17
+ export {
18
+ r as FlashModal
19
+ };
@@ -0,0 +1,4 @@
1
+ const d = "p{border:1px solid red}";
2
+ export {
3
+ d as default
4
+ };
@@ -0,0 +1,50 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2019 Google LLC
4
+ * SPDX-License-Identifier: BSD-3-Clause
5
+ */
6
+ const r = globalThis, c = r.ShadowRoot && (r.ShadyCSS === void 0 || r.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, a = Symbol(), i = /* @__PURE__ */ new WeakMap();
7
+ class l {
8
+ constructor(s, t, o) {
9
+ if (this._$cssResult$ = !0, o !== a) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
10
+ this.cssText = s, this.t = t;
11
+ }
12
+ get styleSheet() {
13
+ let s = this.o;
14
+ const t = this.t;
15
+ if (c && s === void 0) {
16
+ const o = t !== void 0 && t.length === 1;
17
+ o && (s = i.get(t)), s === void 0 && ((this.o = s = new CSSStyleSheet()).replaceSync(this.cssText), o && i.set(t, s));
18
+ }
19
+ return s;
20
+ }
21
+ toString() {
22
+ return this.cssText;
23
+ }
24
+ }
25
+ const h = (e) => new l(typeof e == "string" ? e : e + "", void 0, a), p = (e, ...s) => {
26
+ const t = e.length === 1 ? e[0] : s.reduce((o, S, u) => o + ((n) => {
27
+ if (n._$cssResult$ === !0) return n.cssText;
28
+ if (typeof n == "number") return n;
29
+ 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.");
30
+ })(S) + e[u + 1], e[0]);
31
+ return new l(t, e, a);
32
+ }, d = (e, s) => {
33
+ if (c) e.adoptedStyleSheets = s.map((t) => t instanceof CSSStyleSheet ? t : t.styleSheet);
34
+ else for (const t of s) {
35
+ const o = document.createElement("style"), S = r.litNonce;
36
+ S !== void 0 && o.setAttribute("nonce", S), o.textContent = t.cssText, e.appendChild(o);
37
+ }
38
+ }, y = c ? (e) => e : (e) => e instanceof CSSStyleSheet ? ((s) => {
39
+ let t = "";
40
+ for (const o of s.cssRules) t += o.cssText;
41
+ return h(t);
42
+ })(e) : e;
43
+ export {
44
+ l as CSSResult,
45
+ d as adoptStyles,
46
+ p as css,
47
+ y as getCompatibleStyle,
48
+ c as supportsAdoptingStyleSheets,
49
+ h as unsafeCSS
50
+ };
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2017 Google LLC
4
+ * SPDX-License-Identifier: BSD-3-Clause
5
+ */
6
+ const s = (e) => (t, n) => {
7
+ n !== void 0 ? n.addInitializer(() => {
8
+ customElements.define(e, t);
9
+ }) : customElements.define(e, t);
10
+ };
11
+ export {
12
+ s as customElement
13
+ };
@@ -0,0 +1,37 @@
1
+ import { notEqual as p, defaultConverter as l } from "../reactive-element.js";
2
+ /**
3
+ * @license
4
+ * Copyright 2017 Google LLC
5
+ * SPDX-License-Identifier: BSD-3-Clause
6
+ */
7
+ const d = { attribute: !0, type: String, converter: l, reflect: !1, hasChanged: p }, u = (r = d, a, t) => {
8
+ const { kind: n, metadata: s } = t;
9
+ let o = globalThis.litPropertyMetadata.get(s);
10
+ if (o === void 0 && globalThis.litPropertyMetadata.set(s, o = /* @__PURE__ */ new Map()), o.set(t.name, r), n === "accessor") {
11
+ const { name: e } = t;
12
+ return { set(i) {
13
+ const c = a.get.call(this);
14
+ a.set.call(this, i), this.requestUpdate(e, c, r);
15
+ }, init(i) {
16
+ return i !== void 0 && this.P(e, void 0, r), i;
17
+ } };
18
+ }
19
+ if (n === "setter") {
20
+ const { name: e } = t;
21
+ return function(i) {
22
+ const c = this[e];
23
+ a.call(this, i), this.requestUpdate(e, c, r);
24
+ };
25
+ }
26
+ throw Error("Unsupported decorator location: " + n);
27
+ };
28
+ function f(r) {
29
+ return (a, t) => typeof t == "object" ? u(r, a, t) : ((n, s, o) => {
30
+ const e = s.hasOwnProperty(o);
31
+ return s.constructor.createProperty(o, e ? { ...n, wrapped: !0 } : n), e ? Object.getOwnPropertyDescriptor(s, o) : void 0;
32
+ })(r, a, t);
33
+ }
34
+ export {
35
+ f as property,
36
+ u as standardProperty
37
+ };
@@ -0,0 +1,247 @@
1
+ import { getCompatibleStyle as u, adoptStyles as $ } from "./css-tag.js";
2
+ import { CSSResult as O, css as C, supportsAdoptingStyleSheets as R, unsafeCSS as z } from "./css-tag.js";
3
+ /**
4
+ * @license
5
+ * Copyright 2017 Google LLC
6
+ * SPDX-License-Identifier: BSD-3-Clause
7
+ */
8
+ const { is: m, defineProperty: y, getOwnPropertyDescriptor: g, getOwnPropertyNames: P, getOwnPropertySymbols: b, getPrototypeOf: v } = Object, a = globalThis, f = a.trustedTypes, S = f ? f.emptyScript : "", p = a.reactiveElementPolyfillSupport, l = (r, t) => r, d = { toAttribute(r, t) {
9
+ switch (t) {
10
+ case Boolean:
11
+ r = r ? S : null;
12
+ break;
13
+ case Object:
14
+ case Array:
15
+ r = r == null ? r : JSON.stringify(r);
16
+ }
17
+ return r;
18
+ }, fromAttribute(r, t) {
19
+ let e = r;
20
+ switch (t) {
21
+ case Boolean:
22
+ e = r !== null;
23
+ break;
24
+ case Number:
25
+ e = r === null ? null : Number(r);
26
+ break;
27
+ case Object:
28
+ case Array:
29
+ try {
30
+ e = JSON.parse(r);
31
+ } catch {
32
+ e = null;
33
+ }
34
+ }
35
+ return e;
36
+ } }, _ = (r, t) => !m(r, t), E = { attribute: !0, type: String, converter: d, reflect: !1, hasChanged: _ };
37
+ Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), a.litPropertyMetadata ?? (a.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
38
+ class h extends HTMLElement {
39
+ static addInitializer(t) {
40
+ this._$Ei(), (this.l ?? (this.l = [])).push(t);
41
+ }
42
+ static get observedAttributes() {
43
+ return this.finalize(), this._$Eh && [...this._$Eh.keys()];
44
+ }
45
+ static createProperty(t, e = E) {
46
+ if (e.state && (e.attribute = !1), this._$Ei(), this.elementProperties.set(t, e), !e.noAccessor) {
47
+ const s = Symbol(), i = this.getPropertyDescriptor(t, s, e);
48
+ i !== void 0 && y(this.prototype, t, i);
49
+ }
50
+ }
51
+ static getPropertyDescriptor(t, e, s) {
52
+ const { get: i, set: o } = g(this.prototype, t) ?? { get() {
53
+ return this[e];
54
+ }, set(n) {
55
+ this[e] = n;
56
+ } };
57
+ return { get() {
58
+ return i == null ? void 0 : i.call(this);
59
+ }, set(n) {
60
+ const c = i == null ? void 0 : i.call(this);
61
+ o.call(this, n), this.requestUpdate(t, c, s);
62
+ }, configurable: !0, enumerable: !0 };
63
+ }
64
+ static getPropertyOptions(t) {
65
+ return this.elementProperties.get(t) ?? E;
66
+ }
67
+ static _$Ei() {
68
+ if (this.hasOwnProperty(l("elementProperties"))) return;
69
+ const t = v(this);
70
+ t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
71
+ }
72
+ static finalize() {
73
+ if (this.hasOwnProperty(l("finalized"))) return;
74
+ if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(l("properties"))) {
75
+ const e = this.properties, s = [...P(e), ...b(e)];
76
+ for (const i of s) this.createProperty(i, e[i]);
77
+ }
78
+ const t = this[Symbol.metadata];
79
+ if (t !== null) {
80
+ const e = litPropertyMetadata.get(t);
81
+ if (e !== void 0) for (const [s, i] of e) this.elementProperties.set(s, i);
82
+ }
83
+ this._$Eh = /* @__PURE__ */ new Map();
84
+ for (const [e, s] of this.elementProperties) {
85
+ const i = this._$Eu(e, s);
86
+ i !== void 0 && this._$Eh.set(i, e);
87
+ }
88
+ this.elementStyles = this.finalizeStyles(this.styles);
89
+ }
90
+ static finalizeStyles(t) {
91
+ const e = [];
92
+ if (Array.isArray(t)) {
93
+ const s = new Set(t.flat(1 / 0).reverse());
94
+ for (const i of s) e.unshift(u(i));
95
+ } else t !== void 0 && e.push(u(t));
96
+ return e;
97
+ }
98
+ static _$Eu(t, e) {
99
+ const s = e.attribute;
100
+ return s === !1 ? void 0 : typeof s == "string" ? s : typeof t == "string" ? t.toLowerCase() : void 0;
101
+ }
102
+ constructor() {
103
+ super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
104
+ }
105
+ _$Ev() {
106
+ var t;
107
+ this._$ES = new Promise((e) => this.enableUpdating = e), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), (t = this.constructor.l) == null || t.forEach((e) => e(this));
108
+ }
109
+ addController(t) {
110
+ var e;
111
+ (this._$EO ?? (this._$EO = /* @__PURE__ */ new Set())).add(t), this.renderRoot !== void 0 && this.isConnected && ((e = t.hostConnected) == null || e.call(t));
112
+ }
113
+ removeController(t) {
114
+ var e;
115
+ (e = this._$EO) == null || e.delete(t);
116
+ }
117
+ _$E_() {
118
+ const t = /* @__PURE__ */ new Map(), e = this.constructor.elementProperties;
119
+ for (const s of e.keys()) this.hasOwnProperty(s) && (t.set(s, this[s]), delete this[s]);
120
+ t.size > 0 && (this._$Ep = t);
121
+ }
122
+ createRenderRoot() {
123
+ const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
124
+ return $(t, this.constructor.elementStyles), t;
125
+ }
126
+ connectedCallback() {
127
+ var t;
128
+ this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (t = this._$EO) == null || t.forEach((e) => {
129
+ var s;
130
+ return (s = e.hostConnected) == null ? void 0 : s.call(e);
131
+ });
132
+ }
133
+ enableUpdating(t) {
134
+ }
135
+ disconnectedCallback() {
136
+ var t;
137
+ (t = this._$EO) == null || t.forEach((e) => {
138
+ var s;
139
+ return (s = e.hostDisconnected) == null ? void 0 : s.call(e);
140
+ });
141
+ }
142
+ attributeChangedCallback(t, e, s) {
143
+ this._$AK(t, s);
144
+ }
145
+ _$EC(t, e) {
146
+ var o;
147
+ const s = this.constructor.elementProperties.get(t), i = this.constructor._$Eu(t, s);
148
+ if (i !== void 0 && s.reflect === !0) {
149
+ const n = (((o = s.converter) == null ? void 0 : o.toAttribute) !== void 0 ? s.converter : d).toAttribute(e, s.type);
150
+ this._$Em = t, n == null ? this.removeAttribute(i) : this.setAttribute(i, n), this._$Em = null;
151
+ }
152
+ }
153
+ _$AK(t, e) {
154
+ var o;
155
+ const s = this.constructor, i = s._$Eh.get(t);
156
+ if (i !== void 0 && this._$Em !== i) {
157
+ const n = s.getPropertyOptions(i), c = typeof n.converter == "function" ? { fromAttribute: n.converter } : ((o = n.converter) == null ? void 0 : o.fromAttribute) !== void 0 ? n.converter : d;
158
+ this._$Em = i, this[i] = c.fromAttribute(e, n.type), this._$Em = null;
159
+ }
160
+ }
161
+ requestUpdate(t, e, s) {
162
+ if (t !== void 0) {
163
+ if (s ?? (s = this.constructor.getPropertyOptions(t)), !(s.hasChanged ?? _)(this[t], e)) return;
164
+ this.P(t, e, s);
165
+ }
166
+ this.isUpdatePending === !1 && (this._$ES = this._$ET());
167
+ }
168
+ P(t, e, s) {
169
+ this._$AL.has(t) || this._$AL.set(t, e), s.reflect === !0 && this._$Em !== t && (this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Set())).add(t);
170
+ }
171
+ async _$ET() {
172
+ this.isUpdatePending = !0;
173
+ try {
174
+ await this._$ES;
175
+ } catch (e) {
176
+ Promise.reject(e);
177
+ }
178
+ const t = this.scheduleUpdate();
179
+ return t != null && await t, !this.isUpdatePending;
180
+ }
181
+ scheduleUpdate() {
182
+ return this.performUpdate();
183
+ }
184
+ performUpdate() {
185
+ var s;
186
+ if (!this.isUpdatePending) return;
187
+ if (!this.hasUpdated) {
188
+ if (this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this._$Ep) {
189
+ for (const [o, n] of this._$Ep) this[o] = n;
190
+ this._$Ep = void 0;
191
+ }
192
+ const i = this.constructor.elementProperties;
193
+ if (i.size > 0) for (const [o, n] of i) n.wrapped !== !0 || this._$AL.has(o) || this[o] === void 0 || this.P(o, this[o], n);
194
+ }
195
+ let t = !1;
196
+ const e = this._$AL;
197
+ try {
198
+ t = this.shouldUpdate(e), t ? (this.willUpdate(e), (s = this._$EO) == null || s.forEach((i) => {
199
+ var o;
200
+ return (o = i.hostUpdate) == null ? void 0 : o.call(i);
201
+ }), this.update(e)) : this._$EU();
202
+ } catch (i) {
203
+ throw t = !1, this._$EU(), i;
204
+ }
205
+ t && this._$AE(e);
206
+ }
207
+ willUpdate(t) {
208
+ }
209
+ _$AE(t) {
210
+ var e;
211
+ (e = this._$EO) == null || e.forEach((s) => {
212
+ var i;
213
+ return (i = s.hostUpdated) == null ? void 0 : i.call(s);
214
+ }), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
215
+ }
216
+ _$EU() {
217
+ this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
218
+ }
219
+ get updateComplete() {
220
+ return this.getUpdateComplete();
221
+ }
222
+ getUpdateComplete() {
223
+ return this._$ES;
224
+ }
225
+ shouldUpdate(t) {
226
+ return !0;
227
+ }
228
+ update(t) {
229
+ this._$Ej && (this._$Ej = this._$Ej.forEach((e) => this._$EC(e, this[e]))), this._$EU();
230
+ }
231
+ updated(t) {
232
+ }
233
+ firstUpdated(t) {
234
+ }
235
+ }
236
+ h.elementStyles = [], h.shadowRootOptions = { mode: "open" }, h[l("elementProperties")] = /* @__PURE__ */ new Map(), h[l("finalized")] = /* @__PURE__ */ new Map(), p == null || p({ ReactiveElement: h }), (a.reactiveElementVersions ?? (a.reactiveElementVersions = [])).push("2.0.4");
237
+ export {
238
+ O as CSSResult,
239
+ h as ReactiveElement,
240
+ $ as adoptStyles,
241
+ C as css,
242
+ d as defaultConverter,
243
+ u as getCompatibleStyle,
244
+ _ as notEqual,
245
+ R as supportsAdoptingStyleSheets,
246
+ z as unsafeCSS
247
+ };
@@ -0,0 +1,49 @@
1
+ import { ReactiveElement as o } from "../@lit/reactive-element/reactive-element.js";
2
+ import { defaultConverter as u, notEqual as m } from "../@lit/reactive-element/reactive-element.js";
3
+ import { render as i, noChange as l } from "../lit-html/lit-html.js";
4
+ import { html as f, nothing as E } from "../lit-html/lit-html.js";
5
+ /**
6
+ * @license
7
+ * Copyright 2017 Google LLC
8
+ * SPDX-License-Identifier: BSD-3-Clause
9
+ */
10
+ class n extends o {
11
+ constructor() {
12
+ super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
13
+ }
14
+ createRenderRoot() {
15
+ var t;
16
+ const e = super.createRenderRoot();
17
+ return (t = this.renderOptions).renderBefore ?? (t.renderBefore = e.firstChild), e;
18
+ }
19
+ update(e) {
20
+ const t = this.render();
21
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this._$Do = i(t, this.renderRoot, this.renderOptions);
22
+ }
23
+ connectedCallback() {
24
+ var e;
25
+ super.connectedCallback(), (e = this._$Do) == null || e.setConnected(!0);
26
+ }
27
+ disconnectedCallback() {
28
+ var e;
29
+ super.disconnectedCallback(), (e = this._$Do) == null || e.setConnected(!1);
30
+ }
31
+ render() {
32
+ return l;
33
+ }
34
+ }
35
+ var s;
36
+ n._$litElement$ = !0, n.finalized = !0, (s = globalThis.litElementHydrateSupport) == null || s.call(globalThis, { LitElement: n });
37
+ const r = globalThis.litElementPolyfillSupport;
38
+ r == null || r({ LitElement: n });
39
+ (globalThis.litElementVersions ?? (globalThis.litElementVersions = [])).push("4.1.1");
40
+ export {
41
+ n as LitElement,
42
+ o as ReactiveElement,
43
+ u as defaultConverter,
44
+ f as html,
45
+ l as noChange,
46
+ m as notEqual,
47
+ E as nothing,
48
+ i as render
49
+ };
@@ -0,0 +1,242 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2017 Google LLC
4
+ * SPDX-License-Identifier: BSD-3-Clause
5
+ */
6
+ const y = globalThis, M = y.trustedTypes, B = M ? M.createPolicy("lit-html", { createHTML: (h) => h }) : void 0, W = "$lit$", p = `lit$${Math.random().toFixed(9).slice(2)}$`, k = "?" + p, D = `<${k}>`, f = document, x = () => f.createComment(""), H = (h) => h === null || typeof h != "object" && typeof h != "function", I = Array.isArray, z = (h) => I(h) || typeof (h == null ? void 0 : h[Symbol.iterator]) == "function", w = `[
7
+ \f\r]`, m = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, P = /-->/g, U = />/g, u = RegExp(`>|${w}(?:([^\\s"'>=/]+)(${w}*=${w}*(?:[^
8
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), O = /'/g, R = /"/g, V = /^(?:script|style|textarea|title)$/i, Z = (h) => (t, ...e) => ({ _$litType$: h, strings: t, values: e }), X = Z(1), N = Symbol.for("lit-noChange"), a = Symbol.for("lit-nothing"), L = /* @__PURE__ */ new WeakMap(), g = f.createTreeWalker(f, 129);
9
+ function j(h, t) {
10
+ if (!I(h) || !h.hasOwnProperty("raw")) throw Error("invalid template strings array");
11
+ return B !== void 0 ? B.createHTML(t) : t;
12
+ }
13
+ const F = (h, t) => {
14
+ const e = h.length - 1, s = [];
15
+ let i, o = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", n = m;
16
+ for (let A = 0; A < e; A++) {
17
+ const r = h[A];
18
+ let $, _, l = -1, c = 0;
19
+ for (; c < r.length && (n.lastIndex = c, _ = n.exec(r), _ !== null); ) c = n.lastIndex, n === m ? _[1] === "!--" ? n = P : _[1] !== void 0 ? n = U : _[2] !== void 0 ? (V.test(_[2]) && (i = RegExp("</" + _[2], "g")), n = u) : _[3] !== void 0 && (n = u) : n === u ? _[0] === ">" ? (n = i ?? m, l = -1) : _[1] === void 0 ? l = -2 : (l = n.lastIndex - _[2].length, $ = _[1], n = _[3] === void 0 ? u : _[3] === '"' ? R : O) : n === R || n === O ? n = u : n === P || n === U ? n = m : (n = u, i = void 0);
20
+ const d = n === u && h[A + 1].startsWith("/>") ? " " : "";
21
+ o += n === m ? r + D : l >= 0 ? (s.push($), r.slice(0, l) + W + r.slice(l) + p + d) : r + p + (l === -2 ? A : d);
22
+ }
23
+ return [j(h, o + (h[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), s];
24
+ };
25
+ class T {
26
+ constructor({ strings: t, _$litType$: e }, s) {
27
+ let i;
28
+ this.parts = [];
29
+ let o = 0, n = 0;
30
+ const A = t.length - 1, r = this.parts, [$, _] = F(t, e);
31
+ if (this.el = T.createElement($, s), g.currentNode = this.el.content, e === 2 || e === 3) {
32
+ const l = this.el.content.firstChild;
33
+ l.replaceWith(...l.childNodes);
34
+ }
35
+ for (; (i = g.nextNode()) !== null && r.length < A; ) {
36
+ if (i.nodeType === 1) {
37
+ if (i.hasAttributes()) for (const l of i.getAttributeNames()) if (l.endsWith(W)) {
38
+ const c = _[n++], d = i.getAttribute(l).split(p), C = /([.?@])?(.*)/.exec(c);
39
+ r.push({ type: 1, index: o, name: C[2], strings: d, ctor: C[1] === "." ? G : C[1] === "?" ? J : C[1] === "@" ? K : S }), i.removeAttribute(l);
40
+ } else l.startsWith(p) && (r.push({ type: 6, index: o }), i.removeAttribute(l));
41
+ if (V.test(i.tagName)) {
42
+ const l = i.textContent.split(p), c = l.length - 1;
43
+ if (c > 0) {
44
+ i.textContent = M ? M.emptyScript : "";
45
+ for (let d = 0; d < c; d++) i.append(l[d], x()), g.nextNode(), r.push({ type: 2, index: ++o });
46
+ i.append(l[c], x());
47
+ }
48
+ }
49
+ } else if (i.nodeType === 8) if (i.data === k) r.push({ type: 2, index: o });
50
+ else {
51
+ let l = -1;
52
+ for (; (l = i.data.indexOf(p, l + 1)) !== -1; ) r.push({ type: 7, index: o }), l += p.length - 1;
53
+ }
54
+ o++;
55
+ }
56
+ }
57
+ static createElement(t, e) {
58
+ const s = f.createElement("template");
59
+ return s.innerHTML = t, s;
60
+ }
61
+ }
62
+ function v(h, t, e = h, s) {
63
+ var n, A;
64
+ if (t === N) return t;
65
+ let i = s !== void 0 ? (n = e._$Co) == null ? void 0 : n[s] : e._$Cl;
66
+ const o = H(t) ? void 0 : t._$litDirective$;
67
+ return (i == null ? void 0 : i.constructor) !== o && ((A = i == null ? void 0 : i._$AO) == null || A.call(i, !1), o === void 0 ? i = void 0 : (i = new o(h), i._$AT(h, e, s)), s !== void 0 ? (e._$Co ?? (e._$Co = []))[s] = i : e._$Cl = i), i !== void 0 && (t = v(h, i._$AS(h, t.values), i, s)), t;
68
+ }
69
+ class q {
70
+ constructor(t, e) {
71
+ this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
72
+ }
73
+ get parentNode() {
74
+ return this._$AM.parentNode;
75
+ }
76
+ get _$AU() {
77
+ return this._$AM._$AU;
78
+ }
79
+ u(t) {
80
+ const { el: { content: e }, parts: s } = this._$AD, i = ((t == null ? void 0 : t.creationScope) ?? f).importNode(e, !0);
81
+ g.currentNode = i;
82
+ let o = g.nextNode(), n = 0, A = 0, r = s[0];
83
+ for (; r !== void 0; ) {
84
+ if (n === r.index) {
85
+ let $;
86
+ r.type === 2 ? $ = new b(o, o.nextSibling, this, t) : r.type === 1 ? $ = new r.ctor(o, r.name, r.strings, this, t) : r.type === 6 && ($ = new Q(o, this, t)), this._$AV.push($), r = s[++A];
87
+ }
88
+ n !== (r == null ? void 0 : r.index) && (o = g.nextNode(), n++);
89
+ }
90
+ return g.currentNode = f, i;
91
+ }
92
+ p(t) {
93
+ let e = 0;
94
+ 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++;
95
+ }
96
+ }
97
+ class b {
98
+ get _$AU() {
99
+ var t;
100
+ return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this._$Cv;
101
+ }
102
+ constructor(t, e, s, i) {
103
+ this.type = 2, this._$AH = a, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = s, this.options = i, this._$Cv = (i == null ? void 0 : i.isConnected) ?? !0;
104
+ }
105
+ get parentNode() {
106
+ let t = this._$AA.parentNode;
107
+ const e = this._$AM;
108
+ return e !== void 0 && (t == null ? void 0 : t.nodeType) === 11 && (t = e.parentNode), t;
109
+ }
110
+ get startNode() {
111
+ return this._$AA;
112
+ }
113
+ get endNode() {
114
+ return this._$AB;
115
+ }
116
+ _$AI(t, e = this) {
117
+ t = v(this, t, e), H(t) ? t === a || t == null || t === "" ? (this._$AH !== a && this._$AR(), this._$AH = a) : t !== this._$AH && t !== N && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : z(t) ? this.k(t) : this._(t);
118
+ }
119
+ O(t) {
120
+ return this._$AA.parentNode.insertBefore(t, this._$AB);
121
+ }
122
+ T(t) {
123
+ this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
124
+ }
125
+ _(t) {
126
+ this._$AH !== a && H(this._$AH) ? this._$AA.nextSibling.data = t : this.T(f.createTextNode(t)), this._$AH = t;
127
+ }
128
+ $(t) {
129
+ var o;
130
+ const { values: e, _$litType$: s } = t, i = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = T.createElement(j(s.h, s.h[0]), this.options)), s);
131
+ if (((o = this._$AH) == null ? void 0 : o._$AD) === i) this._$AH.p(e);
132
+ else {
133
+ const n = new q(i, this), A = n.u(this.options);
134
+ n.p(e), this.T(A), this._$AH = n;
135
+ }
136
+ }
137
+ _$AC(t) {
138
+ let e = L.get(t.strings);
139
+ return e === void 0 && L.set(t.strings, e = new T(t)), e;
140
+ }
141
+ k(t) {
142
+ I(this._$AH) || (this._$AH = [], this._$AR());
143
+ const e = this._$AH;
144
+ let s, i = 0;
145
+ for (const o of t) i === e.length ? e.push(s = new b(this.O(x()), this.O(x()), this, this.options)) : s = e[i], s._$AI(o), i++;
146
+ i < e.length && (this._$AR(s && s._$AB.nextSibling, i), e.length = i);
147
+ }
148
+ _$AR(t = this._$AA.nextSibling, e) {
149
+ var s;
150
+ for ((s = this._$AP) == null ? void 0 : s.call(this, !1, !0, e); t && t !== this._$AB; ) {
151
+ const i = t.nextSibling;
152
+ t.remove(), t = i;
153
+ }
154
+ }
155
+ setConnected(t) {
156
+ var e;
157
+ this._$AM === void 0 && (this._$Cv = t, (e = this._$AP) == null || e.call(this, t));
158
+ }
159
+ }
160
+ class S {
161
+ get tagName() {
162
+ return this.element.tagName;
163
+ }
164
+ get _$AU() {
165
+ return this._$AM._$AU;
166
+ }
167
+ constructor(t, e, s, i, o) {
168
+ this.type = 1, this._$AH = a, 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 = a;
169
+ }
170
+ _$AI(t, e = this, s, i) {
171
+ const o = this.strings;
172
+ let n = !1;
173
+ if (o === void 0) t = v(this, t, e, 0), n = !H(t) || t !== this._$AH && t !== N, n && (this._$AH = t);
174
+ else {
175
+ const A = t;
176
+ let r, $;
177
+ for (t = o[0], r = 0; r < o.length - 1; r++) $ = v(this, A[s + r], e, r), $ === N && ($ = this._$AH[r]), n || (n = !H($) || $ !== this._$AH[r]), $ === a ? t = a : t !== a && (t += ($ ?? "") + o[r + 1]), this._$AH[r] = $;
178
+ }
179
+ n && !i && this.j(t);
180
+ }
181
+ j(t) {
182
+ t === a ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
183
+ }
184
+ }
185
+ class G extends S {
186
+ constructor() {
187
+ super(...arguments), this.type = 3;
188
+ }
189
+ j(t) {
190
+ this.element[this.name] = t === a ? void 0 : t;
191
+ }
192
+ }
193
+ class J extends S {
194
+ constructor() {
195
+ super(...arguments), this.type = 4;
196
+ }
197
+ j(t) {
198
+ this.element.toggleAttribute(this.name, !!t && t !== a);
199
+ }
200
+ }
201
+ class K extends S {
202
+ constructor(t, e, s, i, o) {
203
+ super(t, e, s, i, o), this.type = 5;
204
+ }
205
+ _$AI(t, e = this) {
206
+ if ((t = v(this, t, e, 0) ?? a) === N) return;
207
+ const s = this._$AH, i = t === a && s !== a || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, o = t !== a && (s === a || i);
208
+ i && this.element.removeEventListener(this.name, this, s), o && this.element.addEventListener(this.name, this, t), this._$AH = t;
209
+ }
210
+ handleEvent(t) {
211
+ var e;
212
+ typeof this._$AH == "function" ? this._$AH.call(((e = this.options) == null ? void 0 : e.host) ?? this.element, t) : this._$AH.handleEvent(t);
213
+ }
214
+ }
215
+ class Q {
216
+ constructor(t, e, s) {
217
+ this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = s;
218
+ }
219
+ get _$AU() {
220
+ return this._$AM._$AU;
221
+ }
222
+ _$AI(t) {
223
+ v(this, t);
224
+ }
225
+ }
226
+ const E = y.litHtmlPolyfillSupport;
227
+ E == null || E(T, b), (y.litHtmlVersions ?? (y.litHtmlVersions = [])).push("3.2.1");
228
+ const Y = (h, t, e) => {
229
+ const s = (e == null ? void 0 : e.renderBefore) ?? t;
230
+ let i = s._$litPart$;
231
+ if (i === void 0) {
232
+ const o = (e == null ? void 0 : e.renderBefore) ?? null;
233
+ s._$litPart$ = i = new b(t.insertBefore(x(), o), o, void 0, e ?? {});
234
+ }
235
+ return i._$AI(h), i;
236
+ };
237
+ export {
238
+ X as html,
239
+ N as noChange,
240
+ a as nothing,
241
+ Y as render
242
+ };
package/dist/vite.svg ADDED
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
package/package.json ADDED
@@ -0,0 +1,55 @@
1
+ {
2
+ "name": "@styleon/foundation",
3
+ "private": false,
4
+ "version": "0.0.0-next.0",
5
+ "type": "module",
6
+ "files": [
7
+ "dist",
8
+ "README.md"
9
+ ],
10
+ "scripts": {
11
+ "dev": "vite",
12
+ "build": "tsc && vite build",
13
+ "preview": "vite preview",
14
+ "storybook": "storybook dev -p 6006",
15
+ "build-storybook": "storybook build",
16
+ "static:build": "cd storybook-static && http-server"
17
+ },
18
+ "devDependencies": {
19
+ "@chromatic-com/storybook": "^3.2.4",
20
+ "@storybook/addon-essentials": "^8.5.8",
21
+ "@storybook/blocks": "^8.5.8",
22
+ "@storybook/test": "^8.5.8",
23
+ "@storybook/web-components": "^8.5.8",
24
+ "@storybook/web-components-vite": "^8.5.8",
25
+ "@types/node": "^22.13.8",
26
+ "lit": "^3.2.1",
27
+ "sass": "^1.85.0",
28
+ "semantic-release": "^24.2.3",
29
+ "storybook": "^8.5.8",
30
+ "style-dictionary": "^4.3.2",
31
+ "typescript": "~5.7.2",
32
+ "vite": "^6.1.0",
33
+ "vite-plugin-dts": "^4.5.1"
34
+ },
35
+ "description": "styleon Design system",
36
+ "main": "index.js",
37
+ "repository": {
38
+ "type": "git",
39
+ "url": "git+https://github.com/styleon-tech/foundation.git"
40
+ },
41
+ "keywords": [
42
+ "styleon",
43
+ "Design",
44
+ "System"
45
+ ],
46
+ "publishConfig": {
47
+ "access": "public"
48
+ },
49
+ "author": "Rushil Patel",
50
+ "license": "ISC",
51
+ "bugs": {
52
+ "url": "https://github.com/styleon-tech/foundation/issues"
53
+ },
54
+ "homepage": "https://github.com/styleon-tech/foundation#readme"
55
+ }