@arkitektbedriftene/fe-lib 0.3.0 → 0.3.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.
package/dist/ui.es.js ADDED
@@ -0,0 +1,735 @@
1
+ import T, { forwardRef as ie } from "react";
2
+ import { j as L } from "./jsx-runtime-a0589023.js";
3
+ var $ = "colors", x = "sizes", l = "space", de = { gap: l, gridGap: l, columnGap: l, gridColumnGap: l, rowGap: l, gridRowGap: l, inset: l, insetBlock: l, insetBlockEnd: l, insetBlockStart: l, insetInline: l, insetInlineEnd: l, insetInlineStart: l, margin: l, marginTop: l, marginRight: l, marginBottom: l, marginLeft: l, marginBlock: l, marginBlockEnd: l, marginBlockStart: l, marginInline: l, marginInlineEnd: l, marginInlineStart: l, padding: l, paddingTop: l, paddingRight: l, paddingBottom: l, paddingLeft: l, paddingBlock: l, paddingBlockEnd: l, paddingBlockStart: l, paddingInline: l, paddingInlineEnd: l, paddingInlineStart: l, top: l, right: l, bottom: l, left: l, scrollMargin: l, scrollMarginTop: l, scrollMarginRight: l, scrollMarginBottom: l, scrollMarginLeft: l, scrollMarginX: l, scrollMarginY: l, scrollMarginBlock: l, scrollMarginBlockEnd: l, scrollMarginBlockStart: l, scrollMarginInline: l, scrollMarginInlineEnd: l, scrollMarginInlineStart: l, scrollPadding: l, scrollPaddingTop: l, scrollPaddingRight: l, scrollPaddingBottom: l, scrollPaddingLeft: l, scrollPaddingX: l, scrollPaddingY: l, scrollPaddingBlock: l, scrollPaddingBlockEnd: l, scrollPaddingBlockStart: l, scrollPaddingInline: l, scrollPaddingInlineEnd: l, scrollPaddingInlineStart: l, fontSize: "fontSizes", background: $, backgroundColor: $, backgroundImage: $, borderImage: $, border: $, borderBlock: $, borderBlockEnd: $, borderBlockStart: $, borderBottom: $, borderBottomColor: $, borderColor: $, borderInline: $, borderInlineEnd: $, borderInlineStart: $, borderLeft: $, borderLeftColor: $, borderRight: $, borderRightColor: $, borderTop: $, borderTopColor: $, caretColor: $, color: $, columnRuleColor: $, fill: $, outline: $, outlineColor: $, stroke: $, textDecorationColor: $, fontFamily: "fonts", fontWeight: "fontWeights", lineHeight: "lineHeights", letterSpacing: "letterSpacings", blockSize: x, minBlockSize: x, maxBlockSize: x, inlineSize: x, minInlineSize: x, maxInlineSize: x, width: x, minWidth: x, maxWidth: x, height: x, minHeight: x, maxHeight: x, flexBasis: x, gridTemplateColumns: x, gridTemplateRows: x, borderWidth: "borderWidths", borderTopWidth: "borderWidths", borderRightWidth: "borderWidths", borderBottomWidth: "borderWidths", borderLeftWidth: "borderWidths", borderStyle: "borderStyles", borderTopStyle: "borderStyles", borderRightStyle: "borderStyles", borderBottomStyle: "borderStyles", borderLeftStyle: "borderStyles", borderRadius: "radii", borderTopLeftRadius: "radii", borderTopRightRadius: "radii", borderBottomRightRadius: "radii", borderBottomLeftRadius: "radii", boxShadow: "shadows", textShadow: "shadows", transition: "transitions", zIndex: "zIndices" }, ce = (e, t) => typeof t == "function" ? { "()": Function.prototype.toString.call(t) } : t, A = () => {
4
+ const e = /* @__PURE__ */ Object.create(null);
5
+ return (t, o, ...r) => {
6
+ const i = ((n) => JSON.stringify(n, ce))(t);
7
+ return i in e ? e[i] : e[i] = o(t, ...r);
8
+ };
9
+ }, z = Symbol.for("sxs.internal"), K = (e, t) => Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)), Q = (e) => {
10
+ for (const t in e)
11
+ return !0;
12
+ return !1;
13
+ }, { hasOwnProperty: ge } = Object.prototype, q = (e) => e.includes("-") ? e : e.replace(/[A-Z]/g, (t) => "-" + t.toLowerCase()), pe = /\s+(?![^()]*\))/, F = (e) => (t) => e(...typeof t == "string" ? String(t).split(pe) : [t]), _ = { appearance: (e) => ({ WebkitAppearance: e, appearance: e }), backfaceVisibility: (e) => ({ WebkitBackfaceVisibility: e, backfaceVisibility: e }), backdropFilter: (e) => ({ WebkitBackdropFilter: e, backdropFilter: e }), backgroundClip: (e) => ({ WebkitBackgroundClip: e, backgroundClip: e }), boxDecorationBreak: (e) => ({ WebkitBoxDecorationBreak: e, boxDecorationBreak: e }), clipPath: (e) => ({ WebkitClipPath: e, clipPath: e }), content: (e) => ({ content: e.includes('"') || e.includes("'") || /^([A-Za-z]+\([^]*|[^]*-quote|inherit|initial|none|normal|revert|unset)$/.test(e) ? e : `"${e}"` }), hyphens: (e) => ({ WebkitHyphens: e, hyphens: e }), maskImage: (e) => ({ WebkitMaskImage: e, maskImage: e }), maskSize: (e) => ({ WebkitMaskSize: e, maskSize: e }), tabSize: (e) => ({ MozTabSize: e, tabSize: e }), textSizeAdjust: (e) => ({ WebkitTextSizeAdjust: e, textSizeAdjust: e }), userSelect: (e) => ({ WebkitUserSelect: e, userSelect: e }), marginBlock: F((e, t) => ({ marginBlockStart: e, marginBlockEnd: t || e })), marginInline: F((e, t) => ({ marginInlineStart: e, marginInlineEnd: t || e })), maxSize: F((e, t) => ({ maxBlockSize: e, maxInlineSize: t || e })), minSize: F((e, t) => ({ minBlockSize: e, minInlineSize: t || e })), paddingBlock: F((e, t) => ({ paddingBlockStart: e, paddingBlockEnd: t || e })), paddingInline: F((e, t) => ({ paddingInlineStart: e, paddingInlineEnd: t || e })) }, Y = /([\d.]+)([^]*)/, ue = (e, t) => e.length ? e.reduce((o, r) => (o.push(...t.map((i) => i.includes("&") ? i.replace(/&/g, /[ +>|~]/.test(r) && /&.*&/.test(i) ? `:is(${r})` : r) : r + " " + i)), o), []) : t, me = (e, t) => e in he && typeof t == "string" ? t.replace(/^((?:[^]*[^\w-])?)(fit-content|stretch)((?:[^\w-][^]*)?)$/, (o, r, i, n) => r + (i === "stretch" ? `-moz-available${n};${q(e)}:${r}-webkit-fill-available` : `-moz-fit-content${n};${q(e)}:${r}fit-content`) + n) : String(t), he = { blockSize: 1, height: 1, inlineSize: 1, maxBlockSize: 1, maxHeight: 1, maxInlineSize: 1, maxWidth: 1, minBlockSize: 1, minHeight: 1, minInlineSize: 1, minWidth: 1, width: 1 }, I = (e) => e ? e + "-" : "", le = (e, t, o) => e.replace(/([+-])?((?:\d+(?:\.\d*)?|\.\d+)(?:[Ee][+-]?\d+)?)?(\$|--)([$\w-]+)/g, (r, i, n, c, d) => c == "$" == !!n ? r : (i || c == "--" ? "calc(" : "") + "var(--" + (c === "$" ? I(t) + (d.includes("$") ? "" : I(o)) + d.replace(/\$/g, "-") : d) + ")" + (i || c == "--" ? "*" + (i || "") + (n || "1") + ")" : "")), fe = /\s*,\s*(?![^()]*\))/, $e = Object.prototype.toString, D = (e, t, o, r, i) => {
14
+ let n, c, d;
15
+ const s = (p, m, u) => {
16
+ let a, g;
17
+ const f = (b) => {
18
+ for (a in b) {
19
+ const y = a.charCodeAt(0) === 64, V = y && Array.isArray(b[a]) ? b[a] : [b[a]];
20
+ for (g of V) {
21
+ const v = /[A-Z]/.test(h = a) ? h : h.replace(/-[^]/g, (k) => k[1].toUpperCase()), M = typeof g == "object" && g && g.toString === $e && (!r.utils[v] || !m.length);
22
+ if (v in r.utils && !M) {
23
+ const k = r.utils[v];
24
+ if (k !== c) {
25
+ c = k, f(k(g)), c = null;
26
+ continue;
27
+ }
28
+ } else if (v in _) {
29
+ const k = _[v];
30
+ if (k !== d) {
31
+ d = k, f(k(g)), d = null;
32
+ continue;
33
+ }
34
+ }
35
+ if (y && (S = a.slice(1) in r.media ? "@media " + r.media[a.slice(1)] : a, a = S.replace(/\(\s*([\w-]+)\s*(=|<|<=|>|>=)\s*([\w-]+)\s*(?:(<|<=|>|>=)\s*([\w-]+)\s*)?\)/g, (k, B, R, C, w, E) => {
36
+ const W = Y.test(B), O = 0.0625 * (W ? -1 : 1), [N, X] = W ? [C, B] : [B, C];
37
+ return "(" + (R[0] === "=" ? "" : R[0] === ">" === W ? "max-" : "min-") + N + ":" + (R[0] !== "=" && R.length === 1 ? X.replace(Y, (ae, J, U) => Number(J) + O * (R === ">" ? 1 : -1) + U) : X) + (w ? ") and (" + (w[0] === ">" ? "min-" : "max-") + N + ":" + (w.length === 1 ? E.replace(Y, (ae, J, U) => Number(J) + O * (w === ">" ? -1 : 1) + U) : E) : "") + ")";
38
+ })), M) {
39
+ const k = y ? u.concat(a) : [...u], B = y ? [...m] : ue(m, a.split(fe));
40
+ n !== void 0 && i(ee(...n)), n = void 0, s(g, B, k);
41
+ } else
42
+ n === void 0 && (n = [[], m, u]), a = y || a.charCodeAt(0) !== 36 ? a : `--${I(r.prefix)}${a.slice(1).replace(/\$/g, "-")}`, g = M ? g : typeof g == "number" ? g && v in be ? String(g) + "px" : String(g) : le(me(v, g ?? ""), r.prefix, r.themeMap[v]), n[0].push(`${y ? `${a} ` : `${q(a)}:`}${g}`);
43
+ }
44
+ }
45
+ var S, h;
46
+ };
47
+ f(p), n !== void 0 && i(ee(...n)), n = void 0;
48
+ };
49
+ s(e, t, o);
50
+ }, ee = (e, t, o) => `${o.map((r) => `${r}{`).join("")}${t.length ? `${t.join(",")}{` : ""}${e.join(";")}${t.length ? "}" : ""}${Array(o.length ? o.length + 1 : 0).join("}")}`, be = { animationDelay: 1, animationDuration: 1, backgroundSize: 1, blockSize: 1, border: 1, borderBlock: 1, borderBlockEnd: 1, borderBlockEndWidth: 1, borderBlockStart: 1, borderBlockStartWidth: 1, borderBlockWidth: 1, borderBottom: 1, borderBottomLeftRadius: 1, borderBottomRightRadius: 1, borderBottomWidth: 1, borderEndEndRadius: 1, borderEndStartRadius: 1, borderInlineEnd: 1, borderInlineEndWidth: 1, borderInlineStart: 1, borderInlineStartWidth: 1, borderInlineWidth: 1, borderLeft: 1, borderLeftWidth: 1, borderRadius: 1, borderRight: 1, borderRightWidth: 1, borderSpacing: 1, borderStartEndRadius: 1, borderStartStartRadius: 1, borderTop: 1, borderTopLeftRadius: 1, borderTopRightRadius: 1, borderTopWidth: 1, borderWidth: 1, bottom: 1, columnGap: 1, columnRule: 1, columnRuleWidth: 1, columnWidth: 1, containIntrinsicSize: 1, flexBasis: 1, fontSize: 1, gap: 1, gridAutoColumns: 1, gridAutoRows: 1, gridTemplateColumns: 1, gridTemplateRows: 1, height: 1, inlineSize: 1, inset: 1, insetBlock: 1, insetBlockEnd: 1, insetBlockStart: 1, insetInline: 1, insetInlineEnd: 1, insetInlineStart: 1, left: 1, letterSpacing: 1, margin: 1, marginBlock: 1, marginBlockEnd: 1, marginBlockStart: 1, marginBottom: 1, marginInline: 1, marginInlineEnd: 1, marginInlineStart: 1, marginLeft: 1, marginRight: 1, marginTop: 1, maxBlockSize: 1, maxHeight: 1, maxInlineSize: 1, maxWidth: 1, minBlockSize: 1, minHeight: 1, minInlineSize: 1, minWidth: 1, offsetDistance: 1, offsetRotate: 1, outline: 1, outlineOffset: 1, outlineWidth: 1, overflowClipMargin: 1, padding: 1, paddingBlock: 1, paddingBlockEnd: 1, paddingBlockStart: 1, paddingBottom: 1, paddingInline: 1, paddingInlineEnd: 1, paddingInlineStart: 1, paddingLeft: 1, paddingRight: 1, paddingTop: 1, perspective: 1, right: 1, rowGap: 1, scrollMargin: 1, scrollMarginBlock: 1, scrollMarginBlockEnd: 1, scrollMarginBlockStart: 1, scrollMarginBottom: 1, scrollMarginInline: 1, scrollMarginInlineEnd: 1, scrollMarginInlineStart: 1, scrollMarginLeft: 1, scrollMarginRight: 1, scrollMarginTop: 1, scrollPadding: 1, scrollPaddingBlock: 1, scrollPaddingBlockEnd: 1, scrollPaddingBlockStart: 1, scrollPaddingBottom: 1, scrollPaddingInline: 1, scrollPaddingInlineEnd: 1, scrollPaddingInlineStart: 1, scrollPaddingLeft: 1, scrollPaddingRight: 1, scrollPaddingTop: 1, shapeMargin: 1, textDecoration: 1, textDecorationThickness: 1, textIndent: 1, textUnderlineOffset: 1, top: 1, transitionDelay: 1, transitionDuration: 1, verticalAlign: 1, width: 1, wordSpacing: 1 }, te = (e) => String.fromCharCode(e + (e > 25 ? 39 : 97)), j = (e) => ((t) => {
51
+ let o, r = "";
52
+ for (o = Math.abs(t); o > 52; o = o / 52 | 0)
53
+ r = te(o % 52) + r;
54
+ return te(o % 52) + r;
55
+ })(((t, o) => {
56
+ let r = o.length;
57
+ for (; r; )
58
+ t = 33 * t ^ o.charCodeAt(--r);
59
+ return t;
60
+ })(5381, JSON.stringify(e)) >>> 0), H = ["themed", "global", "styled", "onevar", "resonevar", "allvar", "inline"], ye = (e) => {
61
+ if (e.href && !e.href.startsWith(location.origin))
62
+ return !1;
63
+ try {
64
+ return !!e.cssRules;
65
+ } catch {
66
+ return !1;
67
+ }
68
+ }, Se = (e) => {
69
+ let t;
70
+ const o = () => {
71
+ const { cssRules: i } = t.sheet;
72
+ return [].map.call(i, (n, c) => {
73
+ const { cssText: d } = n;
74
+ let s = "";
75
+ if (d.startsWith("--sxs"))
76
+ return "";
77
+ if (i[c - 1] && (s = i[c - 1].cssText).startsWith("--sxs")) {
78
+ if (!n.cssRules.length)
79
+ return "";
80
+ for (const p in t.rules)
81
+ if (t.rules[p].group === n)
82
+ return `--sxs{--sxs:${[...t.rules[p].cache].join(" ")}}${d}`;
83
+ return n.cssRules.length ? `${s}${d}` : "";
84
+ }
85
+ return d;
86
+ }).join("");
87
+ }, r = () => {
88
+ if (t) {
89
+ const { rules: d, sheet: s } = t;
90
+ if (!s.deleteRule) {
91
+ for (; Object(Object(s.cssRules)[0]).type === 3; )
92
+ s.cssRules.splice(0, 1);
93
+ s.cssRules = [];
94
+ }
95
+ for (const p in d)
96
+ delete d[p];
97
+ }
98
+ const i = Object(e).styleSheets || [];
99
+ for (const d of i)
100
+ if (ye(d)) {
101
+ for (let s = 0, p = d.cssRules; p[s]; ++s) {
102
+ const m = Object(p[s]);
103
+ if (m.type !== 1)
104
+ continue;
105
+ const u = Object(p[s + 1]);
106
+ if (u.type !== 4)
107
+ continue;
108
+ ++s;
109
+ const { cssText: a } = m;
110
+ if (!a.startsWith("--sxs"))
111
+ continue;
112
+ const g = a.slice(14, -3).trim().split(/\s+/), f = H[g[0]];
113
+ f && (t || (t = { sheet: d, reset: r, rules: {}, toString: o }), t.rules[f] = { group: u, index: s, cache: new Set(g) });
114
+ }
115
+ if (t)
116
+ break;
117
+ }
118
+ if (!t) {
119
+ const d = (s, p) => ({ type: p, cssRules: [], insertRule(m, u) {
120
+ this.cssRules.splice(u, 0, d(m, { import: 3, undefined: 1 }[(m.toLowerCase().match(/^@([a-z]+)/) || [])[1]] || 4));
121
+ }, get cssText() {
122
+ return s === "@media{}" ? `@media{${[].map.call(this.cssRules, (m) => m.cssText).join("")}}` : s;
123
+ } });
124
+ t = { sheet: e ? (e.head || e).appendChild(document.createElement("style")).sheet : d("", "text/css"), rules: {}, reset: r, toString: o };
125
+ }
126
+ const { sheet: n, rules: c } = t;
127
+ for (let d = H.length - 1; d >= 0; --d) {
128
+ const s = H[d];
129
+ if (!c[s]) {
130
+ const p = H[d + 1], m = c[p] ? c[p].index : n.cssRules.length;
131
+ n.insertRule("@media{}", m), n.insertRule(`--sxs{--sxs:${d}}`, m), c[s] = { group: n.cssRules[m + 1], index: m, cache: /* @__PURE__ */ new Set([d]) };
132
+ }
133
+ xe(c[s]);
134
+ }
135
+ };
136
+ return r(), t;
137
+ }, xe = (e) => {
138
+ const t = e.group;
139
+ let o = t.cssRules.length;
140
+ e.apply = (r) => {
141
+ try {
142
+ t.insertRule(r, o), ++o;
143
+ } catch {
144
+ }
145
+ };
146
+ }, P = Symbol(), ke = A(), re = (e, t) => ke(e, () => (...o) => {
147
+ let r = { type: null, composers: /* @__PURE__ */ new Set() };
148
+ for (const i of o)
149
+ if (i != null)
150
+ if (i[z]) {
151
+ r.type == null && (r.type = i[z].type);
152
+ for (const n of i[z].composers)
153
+ r.composers.add(n);
154
+ } else
155
+ i.constructor !== Object || i.$$typeof ? r.type == null && (r.type = i) : r.composers.add(Be(i, e));
156
+ return r.type == null && (r.type = "span"), r.composers.size || r.composers.add(["PJLV", {}, [], [], {}, []]), we(e, r, t);
157
+ }), Be = ({ variants: e, compoundVariants: t, defaultVariants: o, ...r }, i) => {
158
+ const n = `${I(i.prefix)}c-${j(r)}`, c = [], d = [], s = /* @__PURE__ */ Object.create(null), p = [];
159
+ for (const a in o)
160
+ s[a] = String(o[a]);
161
+ if (typeof e == "object" && e)
162
+ for (const a in e) {
163
+ m = s, u = a, ge.call(m, u) || (s[a] = "undefined");
164
+ const g = e[a];
165
+ for (const f in g) {
166
+ const b = { [a]: String(f) };
167
+ String(f) === "undefined" && p.push(a);
168
+ const S = g[f], h = [b, S, !Q(S)];
169
+ c.push(h);
170
+ }
171
+ }
172
+ var m, u;
173
+ if (typeof t == "object" && t)
174
+ for (const a of t) {
175
+ let { css: g, ...f } = a;
176
+ g = typeof g == "object" && g || {};
177
+ for (const S in f)
178
+ f[S] = String(f[S]);
179
+ const b = [f, g, !Q(g)];
180
+ d.push(b);
181
+ }
182
+ return [n, r, c, d, s, p];
183
+ }, we = (e, t, o) => {
184
+ const [r, i, n, c] = ve(t.composers), d = typeof t.type == "function" || t.type.$$typeof ? ((u) => {
185
+ function a() {
186
+ for (let g = 0; g < a[P].length; g++) {
187
+ const [f, b] = a[P][g];
188
+ u.rules[f].apply(b);
189
+ }
190
+ return a[P] = [], null;
191
+ }
192
+ return a[P] = [], a.rules = {}, H.forEach((g) => a.rules[g] = { apply: (f) => a[P].push([g, f]) }), a;
193
+ })(o) : null, s = (d || o).rules, p = `.${r}${i.length > 1 ? `:where(.${i.slice(1).join(".")})` : ""}`, m = (u) => {
194
+ u = typeof u == "object" && u || Re;
195
+ const { css: a, ...g } = u, f = {};
196
+ for (const h in n)
197
+ if (delete g[h], h in u) {
198
+ let y = u[h];
199
+ typeof y == "object" && y ? f[h] = { "@initial": n[h], ...y } : (y = String(y), f[h] = y !== "undefined" || c.has(h) ? y : n[h]);
200
+ } else
201
+ f[h] = n[h];
202
+ const b = /* @__PURE__ */ new Set([...i]);
203
+ for (const [h, y, V, v] of t.composers) {
204
+ o.rules.styled.cache.has(h) || (o.rules.styled.cache.add(h), D(y, [`.${h}`], [], e, (B) => {
205
+ s.styled.apply(B);
206
+ }));
207
+ const M = oe(V, f, e.media), k = oe(v, f, e.media, !0);
208
+ for (const B of M)
209
+ if (B !== void 0)
210
+ for (const [R, C, w] of B) {
211
+ const E = `${h}-${j(C)}-${R}`;
212
+ b.add(E);
213
+ const W = (w ? o.rules.resonevar : o.rules.onevar).cache, O = w ? s.resonevar : s.onevar;
214
+ W.has(E) || (W.add(E), D(C, [`.${E}`], [], e, (N) => {
215
+ O.apply(N);
216
+ }));
217
+ }
218
+ for (const B of k)
219
+ if (B !== void 0)
220
+ for (const [R, C] of B) {
221
+ const w = `${h}-${j(C)}-${R}`;
222
+ b.add(w), o.rules.allvar.cache.has(w) || (o.rules.allvar.cache.add(w), D(C, [`.${w}`], [], e, (E) => {
223
+ s.allvar.apply(E);
224
+ }));
225
+ }
226
+ }
227
+ if (typeof a == "object" && a) {
228
+ const h = `${r}-i${j(a)}-css`;
229
+ b.add(h), o.rules.inline.cache.has(h) || (o.rules.inline.cache.add(h), D(a, [`.${h}`], [], e, (y) => {
230
+ s.inline.apply(y);
231
+ }));
232
+ }
233
+ for (const h of String(u.className || "").trim().split(/\s+/))
234
+ h && b.add(h);
235
+ const S = g.className = [...b].join(" ");
236
+ return { type: t.type, className: S, selector: p, props: g, toString: () => S, deferredInjector: d };
237
+ };
238
+ return K(m, { className: r, selector: p, [z]: t, toString: () => (o.rules.styled.cache.has(r) || m(), r) });
239
+ }, ve = (e) => {
240
+ let t = "";
241
+ const o = [], r = {}, i = [];
242
+ for (const [n, , , , c, d] of e) {
243
+ t === "" && (t = n), o.push(n), i.push(...d);
244
+ for (const s in c) {
245
+ const p = c[s];
246
+ (r[s] === void 0 || p !== "undefined" || d.includes(p)) && (r[s] = p);
247
+ }
248
+ }
249
+ return [t, o, r, new Set(i)];
250
+ }, oe = (e, t, o, r) => {
251
+ const i = [];
252
+ e:
253
+ for (let [n, c, d] of e) {
254
+ if (d)
255
+ continue;
256
+ let s, p = 0, m = !1;
257
+ for (s in n) {
258
+ const u = n[s];
259
+ let a = t[s];
260
+ if (a !== u) {
261
+ if (typeof a != "object" || !a)
262
+ continue e;
263
+ {
264
+ let g, f, b = 0;
265
+ for (const S in a) {
266
+ if (u === String(a[S])) {
267
+ if (S !== "@initial") {
268
+ const h = S.slice(1);
269
+ (f = f || []).push(h in o ? o[h] : S.replace(/^@media ?/, "")), m = !0;
270
+ }
271
+ p += b, g = !0;
272
+ }
273
+ ++b;
274
+ }
275
+ if (f && f.length && (c = { ["@media " + f.join(", ")]: c }), !g)
276
+ continue e;
277
+ }
278
+ }
279
+ }
280
+ (i[p] = i[p] || []).push([r ? "cv" : `${s}-${n[s]}`, c, m]);
281
+ }
282
+ return i;
283
+ }, Re = {}, Ee = A(), Ie = (e, t) => Ee(e, () => (...o) => {
284
+ const r = () => {
285
+ for (let i of o) {
286
+ i = typeof i == "object" && i || {};
287
+ let n = j(i);
288
+ if (!t.rules.global.cache.has(n)) {
289
+ if (t.rules.global.cache.add(n), "@import" in i) {
290
+ let c = [].indexOf.call(t.sheet.cssRules, t.rules.themed.group) - 1;
291
+ for (let d of [].concat(i["@import"]))
292
+ d = d.includes('"') || d.includes("'") ? d : `"${d}"`, t.sheet.insertRule(`@import ${d};`, c++);
293
+ delete i["@import"];
294
+ }
295
+ D(i, [], [], e, (c) => {
296
+ t.rules.global.apply(c);
297
+ });
298
+ }
299
+ }
300
+ return "";
301
+ };
302
+ return K(r, { toString: r });
303
+ }), Ce = A(), ze = (e, t) => Ce(e, () => (o) => {
304
+ const r = `${I(e.prefix)}k-${j(o)}`, i = () => {
305
+ if (!t.rules.global.cache.has(r)) {
306
+ t.rules.global.cache.add(r);
307
+ const n = [];
308
+ D(o, [], [], e, (d) => n.push(d));
309
+ const c = `@keyframes ${r}{${n.join("")}}`;
310
+ t.rules.global.apply(c);
311
+ }
312
+ return r;
313
+ };
314
+ return K(i, { get name() {
315
+ return i();
316
+ }, toString: i });
317
+ }), je = class {
318
+ constructor(e, t, o, r) {
319
+ this.token = e == null ? "" : String(e), this.value = t == null ? "" : String(t), this.scale = o == null ? "" : String(o), this.prefix = r == null ? "" : String(r);
320
+ }
321
+ get computedValue() {
322
+ return "var(" + this.variable + ")";
323
+ }
324
+ get variable() {
325
+ return "--" + I(this.prefix) + I(this.scale) + this.token;
326
+ }
327
+ toString() {
328
+ return this.computedValue;
329
+ }
330
+ }, We = A(), Te = (e, t) => We(e, () => (o, r) => {
331
+ r = typeof o == "object" && o || Object(r);
332
+ const i = `.${o = (o = typeof o == "string" ? o : "") || `${I(e.prefix)}t-${j(r)}`}`, n = {}, c = [];
333
+ for (const s in r) {
334
+ n[s] = {};
335
+ for (const p in r[s]) {
336
+ const m = `--${I(e.prefix)}${s}-${p}`, u = le(String(r[s][p]), e.prefix, s);
337
+ n[s][p] = new je(p, u, s, e.prefix), c.push(`${m}:${u}`);
338
+ }
339
+ }
340
+ const d = () => {
341
+ if (c.length && !t.rules.themed.cache.has(o)) {
342
+ t.rules.themed.cache.add(o);
343
+ const s = `${r === e.theme ? ":root," : ""}.${o}{${c.join(";")}}`;
344
+ t.rules.themed.apply(s);
345
+ }
346
+ return o;
347
+ };
348
+ return { ...n, get className() {
349
+ return d();
350
+ }, selector: i, toString: d };
351
+ }), Fe = A(), De = A(), Ae = (e) => {
352
+ const t = ((o) => {
353
+ let r = !1;
354
+ const i = Fe(o, (n) => {
355
+ r = !0;
356
+ const c = "prefix" in (n = typeof n == "object" && n || {}) ? String(n.prefix) : "", d = typeof n.media == "object" && n.media || {}, s = typeof n.root == "object" ? n.root || null : globalThis.document || null, p = typeof n.theme == "object" && n.theme || {}, m = { prefix: c, media: d, theme: p, themeMap: typeof n.themeMap == "object" && n.themeMap || { ...de }, utils: typeof n.utils == "object" && n.utils || {} }, u = Se(s), a = { css: re(m, u), globalCss: Ie(m, u), keyframes: ze(m, u), createTheme: Te(m, u), reset() {
357
+ u.reset(), a.theme.toString();
358
+ }, theme: {}, sheet: u, config: m, prefix: c, getCssText: u.toString, toString: u.toString };
359
+ return String(a.theme = a.createTheme(p)), a;
360
+ });
361
+ return r || i.reset(), i;
362
+ })(e);
363
+ return t.styled = (({ config: o, sheet: r }) => De(o, () => {
364
+ const i = re(o, r);
365
+ return (...n) => {
366
+ const c = i(...n), d = c[z].type, s = T.forwardRef((p, m) => {
367
+ const u = p && p.as || d, { props: a, deferredInjector: g } = c(p);
368
+ return delete a.as, a.ref = m, g ? T.createElement(T.Fragment, null, T.createElement(u, a), T.createElement(g, null)) : T.createElement(u, a);
369
+ });
370
+ return s.className = c.className, s.displayName = `Styled.${d.displayName || d.name || d}`, s.selector = c.selector, s.toString = () => c.selector, s[z] = c[z], s;
371
+ };
372
+ }))(t), t;
373
+ };
374
+ let ne = 9999;
375
+ const Z = () => (ne--, ne), { styled: G, css: Ue, keyframes: se, globalCss: Ye } = Ae({
376
+ theme: {
377
+ colors: {
378
+ gray50: "#F9FAFA",
379
+ gray100: "#EBEEEE",
380
+ gray200: "#CFD6D7",
381
+ gray300: "#B3BEC0",
382
+ gray400: "#97A6A8",
383
+ gray500: "#7C8E91",
384
+ gray600: "#627578",
385
+ gray700: "#4F5F61",
386
+ gray800: "#414D4F",
387
+ gray900: "#2C3435",
388
+ blue50: "#F7FBFB",
389
+ blue100: "#E3F0F2",
390
+ blue200: "#BADADF",
391
+ blue300: "#92C5CC",
392
+ blue400: "#67AEB8",
393
+ blue500: "#3C97A3",
394
+ blue600: "#1F7D8A",
395
+ blue700: "#19656F",
396
+ blue800: "#14525B",
397
+ blue900: "#0E383E",
398
+ yellow50: "#FDFAEF",
399
+ yellow100: "#F9EDCA",
400
+ yellow200: "#EFD27A",
401
+ yellow300: "#E5B626",
402
+ yellow400: "#C89E1C",
403
+ yellow500: "#AA8618",
404
+ yellow600: "#8C6E14",
405
+ yellow700: "#715910",
406
+ yellow800: "#5C490D",
407
+ yellow900: "#3E3109",
408
+ orange500: "#D1721C",
409
+ red50: "#FDF9F9",
410
+ red100: "#F7EBEB",
411
+ red200: "#EBCECD",
412
+ red300: "#DFB1B0",
413
+ red400: "#D39392",
414
+ red500: "#C67473",
415
+ red600: "#B85250",
416
+ red700: "#A92F2D",
417
+ red800: "#901F1E",
418
+ red900: "#631614",
419
+ green50: "#F8FAF9",
420
+ green100: "#E7F0EA",
421
+ green200: "#C5D9CB",
422
+ green300: "#A4C4AD",
423
+ green400: "#82AD8D",
424
+ green500: "#60976F",
425
+ green600: "#3C7F4E",
426
+ green700: "#296839",
427
+ green800: "#21552F",
428
+ green900: "#163920",
429
+ // Primary
430
+ primaryTextOnLightBg: "#194b58",
431
+ primaryBg: "$blue600",
432
+ primaryBgHover: "$blue700",
433
+ primaryTextOnWhite: "$blue600",
434
+ bodyGray: "$gray100",
435
+ hoverDarker: "hsla(214deg, 25%, 21%, 0.06)",
436
+ borderDarker: "hsla(214deg, 25%, 21%, 0.1)",
437
+ selectedDarker: "hsla(214deg, 25%, 21%, 0.06)",
438
+ selectedOnBodyGray: "hsl(214deg, 35%, 80%)",
439
+ darkGrayBg: "#1f2937",
440
+ border: "hsl(214deg, 25%, 80%)",
441
+ text: "#1f2937",
442
+ secondaryText: "$gray500",
443
+ focusRing: "hsla(214deg, 15%, 10%, 0.6)"
444
+ },
445
+ fontSizes: {
446
+ xs: "0.75rem",
447
+ // 12px
448
+ sm: "0.875rem",
449
+ // 14px
450
+ md: "1rem",
451
+ // 16px
452
+ lg: "1.125rem",
453
+ // 18px
454
+ xl: "1.25rem",
455
+ // 20px
456
+ "2xl": "1.5rem",
457
+ // 24px
458
+ "3xl": "1.875rem"
459
+ // 30px
460
+ },
461
+ fontWeights: {
462
+ normal: "var(--ui-font-weight-normal)",
463
+ medium: "var(--ui-font-weight-semibold)",
464
+ bold: "var(--ui-font-weight-bold)"
465
+ },
466
+ space: {
467
+ 1: "0.25rem",
468
+ 2: "0.5rem",
469
+ 3: "0.75rem",
470
+ 4: "1rem",
471
+ 6: "1.5rem",
472
+ 8: "2rem"
473
+ },
474
+ shadows: {
475
+ xs: "0 1px 2px 0 rgba(0, 0, 0, 0.05)",
476
+ sm: "0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",
477
+ md: "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",
478
+ lg: "0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",
479
+ overlayCard: "0 5px 50px 0px rgb(0 0 0 / 0.15), 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)"
480
+ },
481
+ radii: {
482
+ xs: "0.125rem",
483
+ sm: "0.25rem",
484
+ md: "0.5rem",
485
+ mdmd: "calc(0.5rem - 0.125rem)",
486
+ full: "9999px"
487
+ },
488
+ zIndices: {
489
+ /**
490
+ * By using createLayerBelow() we can order the list of layers.
491
+ * Layers higher up will be on top of layers lower down.
492
+ */
493
+ toast: Z(),
494
+ overlayCard: Z(),
495
+ modal: Z()
496
+ }
497
+ },
498
+ media: {
499
+ lg: "(min-width: 1200px)",
500
+ print: "print"
501
+ }
502
+ }), Me = se({
503
+ "0%": {
504
+ transform: "rotate(0)"
505
+ },
506
+ "100%": {
507
+ transform: "rotate(360deg)"
508
+ }
509
+ }), Pe = se({
510
+ "0%": {
511
+ strokeDashoffset: 600
512
+ },
513
+ "100%": {
514
+ strokeDashoffset: 0
515
+ }
516
+ }), He = G("svg", {
517
+ animation: `${Me} 2s linear infinite`
518
+ }), Le = G("circle", {
519
+ animation: `${Pe} 1.6s cubic-bezier(0.4, 0.15, 0.6, 0.85) infinite`,
520
+ fill: "transparent",
521
+ stroke: "currentColor",
522
+ strokeDasharray: 300,
523
+ strokeDashoffset: 600,
524
+ strokeLinecap: "round",
525
+ strokeMiterlimit: 10,
526
+ strokeWidth: 12
527
+ }), Oe = G("div", {
528
+ lineHeight: 0,
529
+ flexShrink: 0,
530
+ variants: {
531
+ size: {
532
+ xs: {
533
+ width: "1rem",
534
+ height: "1rem"
535
+ },
536
+ sm: {
537
+ width: "1.25rem",
538
+ height: "1.25rem"
539
+ },
540
+ md: {
541
+ width: "1.75rem",
542
+ height: "1.75rem"
543
+ },
544
+ lg: {
545
+ width: "2.25rem",
546
+ height: "2.25rem"
547
+ }
548
+ },
549
+ color: {
550
+ light: {
551
+ color: "$gray200"
552
+ },
553
+ dark: {
554
+ color: "$gray800"
555
+ },
556
+ inherit: {
557
+ color: "inherit"
558
+ }
559
+ }
560
+ },
561
+ defaultVariants: {
562
+ size: "sm",
563
+ color: "dark"
564
+ }
565
+ }), Ne = ie(
566
+ (e, t) => /* @__PURE__ */ L.jsx(
567
+ Oe,
568
+ {
569
+ ref: t,
570
+ ...e,
571
+ children: /* @__PURE__ */ L.jsx(
572
+ He,
573
+ {
574
+ x: "0px",
575
+ y: "0px",
576
+ viewBox: "0 0 150 150",
577
+ children: /* @__PURE__ */ L.jsx(
578
+ Le,
579
+ {
580
+ cx: "75",
581
+ cy: "75",
582
+ r: "60"
583
+ }
584
+ )
585
+ }
586
+ )
587
+ }
588
+ )
589
+ ), Ge = G("button", {
590
+ appearance: "none",
591
+ margin: 0,
592
+ padding: 0,
593
+ border: "none",
594
+ background: "none",
595
+ cursor: "pointer",
596
+ fontFamily: "inherit",
597
+ textAlign: "left",
598
+ textDecoration: "none",
599
+ textIndent: 0,
600
+ lineHeight: 1.25,
601
+ display: "inline-flex",
602
+ justifyContent: "center",
603
+ alignItems: "center",
604
+ gap: "$2",
605
+ position: "relative",
606
+ fontWeight: "$medium",
607
+ borderRadius: "$sm",
608
+ whiteSpace: "nowrap",
609
+ transition: "background 0.2s ease-in-out",
610
+ "&:focus, &:focus-visible": {
611
+ outline: "none"
612
+ },
613
+ "&:focus-visible": {
614
+ boxShadow: "0 0 0 2px white, 0 0 0 4px $colors$focusRing"
615
+ },
616
+ "&:disabled": {
617
+ cursor: "not-allowed"
618
+ },
619
+ variants: {
620
+ color: {
621
+ primary: {
622
+ $$solid: "$colors$blue600",
623
+ $$solidHover: "$colors$blue700",
624
+ $$outline: "$colors$blue600",
625
+ $$outlineHover: "$colors$blue100",
626
+ $$outlineText: "$colors$blue600",
627
+ $$disabled: "$colors$blue200"
628
+ },
629
+ secondary: {
630
+ $$solid: "$colors$gray600",
631
+ $$solidHover: "$colors$gray700",
632
+ $$outline: "$colors$gray400",
633
+ $$outlineHover: "$colors$gray100",
634
+ $$outlineText: "$colors$gray600",
635
+ $$disabled: "$colors$gray200"
636
+ },
637
+ success: {
638
+ $$solid: "$colors$green600",
639
+ $$solidHover: "$colors$green700",
640
+ $$outline: "$colors$green600",
641
+ $$outlineHover: "$colors$green100",
642
+ $$outlineText: "$colors$green600",
643
+ $$disabled: "$colors$green200"
644
+ },
645
+ danger: {
646
+ $$solid: "$colors$red600",
647
+ $$solidHover: "$colors$red700",
648
+ $$outline: "$colors$red600",
649
+ $$outlineHover: "$colors$red100",
650
+ $$outlineText: "$colors$red600",
651
+ $$disabled: "$colors$red200"
652
+ },
653
+ warning: {
654
+ $$solid: "$colors$yellow600",
655
+ $$solidHover: "$colors$yellow700",
656
+ $$outline: "$colors$yellow400",
657
+ $$outlineHover: "$colors$yellow50",
658
+ $$outlineText: "$colors$yellow600",
659
+ $$disabled: "$colors$yellow100"
660
+ }
661
+ },
662
+ size: {
663
+ md: {
664
+ fontSize: "$sm",
665
+ padding: "$2 $4",
666
+ height: "2.25rem"
667
+ },
668
+ lg: {
669
+ fontSize: "$md",
670
+ padding: "$3 $6",
671
+ height: "2.75rem"
672
+ }
673
+ },
674
+ variant: {
675
+ solid: {
676
+ background: "$$solid",
677
+ color: "white",
678
+ "&:hover:enabled": {
679
+ backgroundColor: "$$solidHover"
680
+ },
681
+ "&:disabled": {
682
+ backgroundColor: "$$disabled"
683
+ }
684
+ },
685
+ outline: {
686
+ boxShadow: "inset 0 0 0 1px $$outline",
687
+ color: "$$outlineText",
688
+ "&:hover:enabled": {
689
+ backgroundColor: "$$outlineHover"
690
+ },
691
+ "&:disabled": {
692
+ boxShadow: "inset 0 0 0 1px $$disabled",
693
+ color: "$$disabled"
694
+ }
695
+ },
696
+ transparent: {
697
+ backgroundColor: "transparent",
698
+ color: "$$outlineText",
699
+ "&:hover:enabled": {
700
+ backgroundColor: "$$outlineHover"
701
+ },
702
+ "&:disabled": {
703
+ color: "$$disabled"
704
+ }
705
+ }
706
+ }
707
+ },
708
+ defaultVariants: {
709
+ variant: "outline",
710
+ color: "secondary",
711
+ size: "md"
712
+ }
713
+ }), Ze = ie(
714
+ ({ children: e, disabled: t, isLoading: o, ...r }, i) => /* @__PURE__ */ L.jsxs(
715
+ Ge,
716
+ {
717
+ ref: i,
718
+ type: "button",
719
+ disabled: t || o,
720
+ ...r,
721
+ children: [
722
+ e,
723
+ o && /* @__PURE__ */ L.jsx(Ne, { color: "inherit" })
724
+ ]
725
+ }
726
+ )
727
+ );
728
+ export {
729
+ Ze as Button,
730
+ Ne as Spinner,
731
+ Ue as css,
732
+ Ye as globalCss,
733
+ se as keyframes,
734
+ G as styled
735
+ };