@florid-kit/components 2.6.17 → 3.0.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 (70) hide show
  1. package/assets/icons/icons-occ.d.ts +315 -0
  2. package/assets/icons/icons.d.ts +12 -84
  3. package/assets/icons/svg-utils.d.ts +13 -0
  4. package/behaviors/performance-mixin.d.ts +0 -23
  5. package/behaviors/performance-reporter.d.ts +1 -0
  6. package/components/accordion-group.mjs +61 -0
  7. package/components/accordion.mjs +185 -0
  8. package/components/arch-image.mjs +135 -0
  9. package/components/badge.mjs +75 -0
  10. package/components/breadcrumb.mjs +83 -0
  11. package/components/breadcrumbs.mjs +35 -0
  12. package/components/button.d.ts +3 -0
  13. package/components/button.mjs +12 -0
  14. package/components/checkbox.mjs +188 -0
  15. package/components/chip.mjs +158 -0
  16. package/components/chipset.mjs +44 -0
  17. package/components/dots.mjs +60 -0
  18. package/components/dropdown-variant.d.ts +1 -0
  19. package/components/dropdown-variant.mjs +446 -0
  20. package/components/dropdown.d.ts +1 -0
  21. package/components/dropdown.mjs +303 -0
  22. package/components/feedback-message.mjs +136 -0
  23. package/components/filter-chip.mjs +215 -0
  24. package/components/footer-simplify.mjs +178 -0
  25. package/components/header-simplify.mjs +234 -0
  26. package/components/icon-button.d.ts +5 -0
  27. package/components/icon-button.mjs +340 -0
  28. package/components/input.mjs +298 -0
  29. package/components/link.mjs +172 -0
  30. package/components/mediumtile.mjs +307 -0
  31. package/components/minitile.mjs +234 -0
  32. package/components/option-tile-group.mjs +105 -0
  33. package/components/option-tile.mjs +413 -0
  34. package/components/popin.mjs +412 -0
  35. package/components/radio.mjs +165 -0
  36. package/components/rating.mjs +81 -0
  37. package/components/reassurance.mjs +163 -0
  38. package/components/search-input-dropdown.mjs +314 -0
  39. package/components/search-input.mjs +107 -0
  40. package/components/side-panel.mjs +1206 -0
  41. package/components/tab.mjs +140 -0
  42. package/components/tablist.mjs +44 -0
  43. package/components/tag.mjs +86 -0
  44. package/components/textarea.mjs +269 -0
  45. package/components/thumbnail-navigation.mjs +232 -0
  46. package/components/toast.mjs +191 -0
  47. package/components/tooltip.mjs +125 -0
  48. package/components/wishlist-button.mjs +132 -0
  49. package/css-C8WrrxT-.mjs +41 -0
  50. package/css.d.ts +1 -0
  51. package/directive-helpers-BHuwIghp.mjs +11 -0
  52. package/directive-oAbCiebi.mjs +27 -0
  53. package/element-internals-Dw7LndlH.mjs +19 -0
  54. package/icons-Pdn_6YtT.mjs +104 -0
  55. package/icons-occ.mjs +834 -0
  56. package/if-defined-j0wE2gL4.mjs +10 -0
  57. package/index.mjs +41 -9712
  58. package/live-C_TUoYRm.mjs +30 -0
  59. package/loader.d.ts +3 -0
  60. package/loader.mjs +78 -0
  61. package/logo-CEgaTL93.mjs +4 -0
  62. package/package.json +19 -1
  63. package/performance-mixin-D7YmSeqN.mjs +628 -0
  64. package/performance-reporter-B7ZOqnDk.mjs +89 -0
  65. package/property-S_Y9cb04.mjs +36 -0
  66. package/query-NJDNu0-P.mjs +25 -0
  67. package/state-DjMxXomO.mjs +12 -0
  68. package/svg-utils-CRDBD8ES.mjs +47 -0
  69. package/unsafe-svg-C3uTocNg.mjs +34 -0
  70. package/index.js +0 -5748
@@ -0,0 +1,89 @@
1
+ function w(n, m, s) {
2
+ const a = n.get(m);
3
+ a ? (a.count++, a.total += s, a.min = Math.min(a.min, s), a.max = Math.max(a.max, s)) : n.set(m, { count: 1, total: s, min: s, max: s });
4
+ }
5
+ function E(n) {
6
+ return n < 16 ? "🟢" : n < 50 ? "🟡" : n < 100 ? "🟠" : "🔴";
7
+ }
8
+ function F(n, m, s = 20) {
9
+ const a = Math.round(n / m * s);
10
+ return "█".repeat(a) + "░".repeat(s - a);
11
+ }
12
+ function M() {
13
+ const n = /* @__PURE__ */ new Map(), m = /* @__PURE__ */ new Map(), s = [];
14
+ let a = !1, x;
15
+ const p = [];
16
+ try {
17
+ new PerformanceObserver(
18
+ (o) => o.getEntries().forEach((r) => p.push({ start: r.startTime, duration: r.duration }))
19
+ ).observe({ type: "longtask", buffered: !0 });
20
+ } catch {
21
+ }
22
+ const g = /* @__PURE__ */ new Map();
23
+ try {
24
+ new PerformanceObserver((o) => {
25
+ o.getEntries().forEach((r) => {
26
+ r.hadRecentInput || (r.sources ?? []).forEach((f) => {
27
+ var d, b;
28
+ const i = (b = (d = f.node) == null ? void 0 : d.nodeName) == null ? void 0 : b.toLowerCase();
29
+ i != null && i.startsWith("o-") && g.set(i, (g.get(i) ?? 0) + r.value);
30
+ });
31
+ });
32
+ }).observe({ type: "layout-shift", buffered: !0 });
33
+ } catch {
34
+ }
35
+ const v = () => {
36
+ if (a || (a = !0, clearTimeout(x), n.size === 0)) return;
37
+ const u = [...n.keys()].map((t) => {
38
+ const e = n.get(t), c = m.get(t), l = e.total / e.count, h = c ? c.total / c.count : l;
39
+ return { tag: t, count: e.count, avgInit: l, avgPaint: h, maxPaint: (c == null ? void 0 : c.max) ?? e.max };
40
+ }), o = u.reduce((t, e) => t + e.count, 0), r = Math.max(...u.map((t) => t.maxPaint)), f = [...u].sort((t, e) => e.avgPaint - t.avgPaint)[0], i = p.reduce((t, e) => t + e.duration, 0), d = [...g.values()].reduce((t, e) => t + e, 0), b = [
41
+ `${E(r)} First paint: ${r.toFixed(0)}ms`,
42
+ `· ${o} component${o > 1 ? "s" : ""}`,
43
+ i > 0 ? `· 🔴 ${i.toFixed(0)}ms blocked` : "",
44
+ d > 0.1 ? `· ⚠️ CLS ${d.toFixed(3)}` : ""
45
+ ].filter(Boolean).join(" ");
46
+ console.group(`%c⚡ Florid%c ${b}`, "font-weight:bold;color:#b45309", "font-weight:normal");
47
+ const y = Math.max(...u.map((t) => t.maxPaint), 1);
48
+ if (console.groupCollapsed(`📦 Components (${o} instances, slowest: ${f.tag} ~${f.avgPaint.toFixed(0)}ms)`), console.table(
49
+ Object.fromEntries(
50
+ u.sort((t, e) => e.avgPaint - t.avgPaint).map(({ tag: t, count: e, avgInit: c, avgPaint: l, maxPaint: h }) => [
51
+ t,
52
+ {
53
+ "×": e,
54
+ JS: `${c.toFixed(1)}ms`,
55
+ paint: `${l.toFixed(1)}ms`,
56
+ max: `${h.toFixed(1)}ms`,
57
+ "": `${E(l)} ${F(l, y)}`
58
+ }
59
+ ])
60
+ )
61
+ ), console.groupEnd(), p.length > 0 && (console.groupCollapsed(`🔴 Long tasks — ${p.length} task${p.length > 1 ? "s" : ""}, ${i.toFixed(0)}ms total blocked`), p.forEach((t, e) => {
62
+ const c = t.start + t.duration, l = s.filter(($) => $.name.endsWith(":init") && $.start < c && $.end > t.start).map(($) => $.name.replace(/:init.*/, "")), h = [...new Set(l)].join(", ") || "unknown (third-party?)";
63
+ console.log(
64
+ ` Task ${e + 1}: ${t.duration.toFixed(0)}ms ${t.duration > 200 ? "🔴 severe" : t.duration > 100 ? "🟠 high" : "🟡 noticeable"} → likely: ${h}`
65
+ );
66
+ }), console.groupEnd()), g.size > 0) {
67
+ const t = d < 0.1 ? "🟢 good" : d < 0.25 ? "🟡 needs improvement" : "🔴 poor";
68
+ console.groupCollapsed(`📐 Layout shifts — CLS ${d.toFixed(4)} ${t}`), g.forEach((e, c) => {
69
+ const l = e < 0.01 ? "🟢" : e < 0.1 ? "🟡" : "🔴";
70
+ console.log(` ${l} ${c}: ${e.toFixed(4)}`);
71
+ }), console.groupEnd();
72
+ }
73
+ console.log(
74
+ "%c💡%c JS = Lit render time · paint = JS + CSS layout/paint · dev builds are 3–5× slower than prod",
75
+ "font-weight:bold",
76
+ "font-weight:normal;color:gray"
77
+ ), console.groupEnd();
78
+ }, k = new PerformanceObserver((u) => {
79
+ u.getEntries().forEach((o) => {
80
+ var i;
81
+ const r = (i = o.detail) == null ? void 0 : i.parent, f = o.name.replace(/:[^:]+$/, "") + (r ? ` [${r}]` : "");
82
+ o.name.endsWith(":init") && w(n, f, o.duration), o.name.endsWith(":to-paint") && w(m, f, o.duration), s.push({ name: o.name, start: o.startTime, end: o.startTime + o.duration });
83
+ }), clearTimeout(x), x = setTimeout(v, 500);
84
+ });
85
+ setTimeout(v, 5e3), k.observe({ type: "measure", buffered: !0 });
86
+ }
87
+ export {
88
+ M as start
89
+ };
@@ -0,0 +1,36 @@
1
+ import { f as p, u as l } from "./performance-mixin-D7YmSeqN.mjs";
2
+ /**
3
+ * @license
4
+ * Copyright 2017 Google LLC
5
+ * SPDX-License-Identifier: BSD-3-Clause
6
+ */
7
+ const u = { attribute: !0, type: String, converter: l, reflect: !1, hasChanged: p }, d = (t = u, s, e) => {
8
+ const { kind: a, metadata: i } = e;
9
+ let r = globalThis.litPropertyMetadata.get(i);
10
+ if (r === void 0 && globalThis.litPropertyMetadata.set(i, r = /* @__PURE__ */ new Map()), a === "setter" && ((t = Object.create(t)).wrapped = !0), r.set(e.name, t), a === "accessor") {
11
+ const { name: o } = e;
12
+ return { set(n) {
13
+ const c = s.get.call(this);
14
+ s.set.call(this, n), this.requestUpdate(o, c, t);
15
+ }, init(n) {
16
+ return n !== void 0 && this.C(o, void 0, t, n), n;
17
+ } };
18
+ }
19
+ if (a === "setter") {
20
+ const { name: o } = e;
21
+ return function(n) {
22
+ const c = this[o];
23
+ s.call(this, n), this.requestUpdate(o, c, t);
24
+ };
25
+ }
26
+ throw Error("Unsupported decorator location: " + a);
27
+ };
28
+ function f(t) {
29
+ return (s, e) => typeof e == "object" ? d(t, s, e) : ((a, i, r) => {
30
+ const o = i.hasOwnProperty(r);
31
+ return i.constructor.createProperty(r, a), o ? Object.getOwnPropertyDescriptor(i, r) : void 0;
32
+ })(t, s, e);
33
+ }
34
+ export {
35
+ f as n
36
+ };
@@ -0,0 +1,25 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2017 Google LLC
4
+ * SPDX-License-Identifier: BSD-3-Clause
5
+ */
6
+ const l = (r, t, e) => (e.configurable = !0, e.enumerable = !0, Reflect.decorate && typeof t != "object" && Object.defineProperty(r, t, e), e);
7
+ /**
8
+ * @license
9
+ * Copyright 2017 Google LLC
10
+ * SPDX-License-Identifier: BSD-3-Clause
11
+ */
12
+ function i(r, t) {
13
+ return (e, n, f) => {
14
+ const u = (c) => {
15
+ var o;
16
+ return ((o = c.renderRoot) == null ? void 0 : o.querySelector(r)) ?? null;
17
+ };
18
+ return l(e, n, { get() {
19
+ return u(this);
20
+ } });
21
+ };
22
+ }
23
+ export {
24
+ i as e
25
+ };
@@ -0,0 +1,12 @@
1
+ import { n as r } from "./property-S_Y9cb04.mjs";
2
+ /**
3
+ * @license
4
+ * Copyright 2017 Google LLC
5
+ * SPDX-License-Identifier: BSD-3-Clause
6
+ */
7
+ function n(t) {
8
+ return r({ ...t, state: !0, attribute: !1 });
9
+ }
10
+ export {
11
+ n as r
12
+ };
@@ -0,0 +1,47 @@
1
+ import { e as p, i as d, t as h } from "./directive-oAbCiebi.mjs";
2
+ import { T as o } from "./performance-mixin-D7YmSeqN.mjs";
3
+ import { b as v } from "./icons-Pdn_6YtT.mjs";
4
+ const a = /* @__PURE__ */ new Map();
5
+ function f(e, t, r) {
6
+ const s = `${e}|${t}|${r}`;
7
+ let n = a.get(s);
8
+ if (n !== void 0) return n || null;
9
+ const { svg: c, pixelSize: i, shouldApplyLogicalSize: u } = v(e, { size: t, bgstyle: r });
10
+ if (!c)
11
+ return e.startsWith("occ-") || a.set(s, ""), null;
12
+ const g = u ? ` width="${i}" height="${i}"` : "";
13
+ return n = (u ? c.replace(/\s(width|height)="[^"]*"/g, "") : c).replace("<svg", `<svg aria-hidden="true" focusable="false" part="svg"${g}`).replace(/<path\b/g, '<path part="icon-path"').replace(/<g\b/g, '<g part="icon-group"').replace(/<circle\b/g, '<circle part="icon-circle"'), a.set(s, n), n;
14
+ }
15
+ function x(e) {
16
+ return e ? e.replace("<svg", '<svg aria-hidden="true" focusable="false" part="svg"') : "";
17
+ }
18
+ const l = /* @__PURE__ */ new Map();
19
+ function S(e) {
20
+ const t = document.createElement("template");
21
+ return t.innerHTML = e, t.content.firstElementChild ?? null;
22
+ }
23
+ function m(e, t) {
24
+ if (l.has(e)) return l.get(e) ?? null;
25
+ const r = S(t);
26
+ return l.set(e, r), r;
27
+ }
28
+ class $ extends d {
29
+ constructor(t) {
30
+ if (super(t), t.type !== h.CHILD)
31
+ throw new Error("cachedSvg() can only be used in child position");
32
+ }
33
+ render(t, r, s) {
34
+ const n = f(t, r, s);
35
+ if (!n) return o;
36
+ const c = `${t}|${r}|${s}`;
37
+ if (c === this._currentKey) return o;
38
+ this._currentKey = c;
39
+ const i = m(c, n);
40
+ return i ? i.cloneNode(!0) : o;
41
+ }
42
+ }
43
+ const y = p($);
44
+ export {
45
+ y as c,
46
+ x as g
47
+ };
@@ -0,0 +1,34 @@
1
+ import { i as o, t as c, e as u } from "./directive-oAbCiebi.mjs";
2
+ import { E as r, T as a } from "./performance-mixin-D7YmSeqN.mjs";
3
+ /**
4
+ * @license
5
+ * Copyright 2017 Google LLC
6
+ * SPDX-License-Identifier: BSD-3-Clause
7
+ */
8
+ class i extends o {
9
+ constructor(t) {
10
+ if (super(t), this.it = r, t.type !== c.CHILD) throw Error(this.constructor.directiveName + "() can only be used in child bindings");
11
+ }
12
+ render(t) {
13
+ if (t === r || t == null) return this._t = void 0, this.it = t;
14
+ if (t === a) return t;
15
+ if (typeof t != "string") throw Error(this.constructor.directiveName + "() called with a non-string value");
16
+ if (t === this.it) return this._t;
17
+ this.it = t;
18
+ const e = [t];
19
+ return e.raw = e, this._t = { _$litType$: this.constructor.resultType, strings: e, values: [] };
20
+ }
21
+ }
22
+ i.directiveName = "unsafeHTML", i.resultType = 1;
23
+ /**
24
+ * @license
25
+ * Copyright 2017 Google LLC
26
+ * SPDX-License-Identifier: BSD-3-Clause
27
+ */
28
+ class s extends i {
29
+ }
30
+ s.directiveName = "unsafeSVG", s.resultType = 2;
31
+ const d = u(s);
32
+ export {
33
+ d as o
34
+ };