@svgrid/grid-wc 3.0.1 → 3.0.3

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 (104) hide show
  1. package/README.md +24 -1
  2. package/dist/GridMenus-DMkf7UMn.js +1086 -0
  3. package/dist/SvChartMenu-DkSyLWYH.js +413 -0
  4. package/dist/SvDateRangeInput-BrYTQEMM.js +197 -0
  5. package/dist/SvDateTimePicker-Czin1Ead.js +766 -0
  6. package/dist/SvField-Bmzp3ObZ.js +147 -0
  7. package/dist/SvGridCellEditor-DhXEIlyE.js +560 -0
  8. package/dist/SvGridChart-BMdCbrqb.js +3702 -0
  9. package/dist/SvGridChartBuilder-Chp_MD1B.js +1166 -0
  10. package/dist/SvGridChartPanel-BIV2O2Lp.js +1743 -0
  11. package/dist/SvGridChartView-DyhkumD-.js +45 -0
  12. package/dist/SvGridDropdown-BwPpGwLz.js +257 -0
  13. package/dist/angular/fesm2022/svgrid-grid-wc-angular.mjs +212 -7
  14. package/dist/angular/fesm2022/svgrid-grid-wc-angular.mjs.map +1 -1
  15. package/dist/angular/types/svgrid-grid-wc-angular.d.ts +92 -2
  16. package/dist/{cell-formatting-Eypm-id0.js → cell-formatting-CBfgahv1.js} +1 -1
  17. package/dist/chart/SvChartMenu-DslxOgPN.js +590 -0
  18. package/dist/chart/chart-export-BHGuh_kZ.js +127 -0
  19. package/dist/chart/chart-export-pdf-BjkkIEkE.js +104 -0
  20. package/dist/chart/chart-summary-6Xu2JoNC.js +137 -0
  21. package/dist/chart/chart-trend-7fxtAqEl.js +56 -0
  22. package/dist/chart/chart-validate-CD6ptiwg.js +180 -0
  23. package/dist/chart/client-BuB0wIgc.js +2757 -0
  24. package/dist/chart/sv-chart-element.d.ts +98 -0
  25. package/dist/chart/sv-chart-element.js +7282 -0
  26. package/dist/chart-D_LKA1fr.js +4398 -0
  27. package/dist/chart-export-pdf-9OCvhzr0.js +104 -0
  28. package/dist/chart-summary-v3Lhe8YD.js +137 -0
  29. package/dist/chart-validate-CD6ptiwg.js +180 -0
  30. package/dist/{shadow/client-DjwUji8D.js → client-DEF0GRjE.js} +1 -1
  31. package/dist/{shadow/column-resize-DvCRUrN3.js → column-resize-DUPgynvc.js} +3 -3
  32. package/dist/date-format-DMTwV8NC.js +1128 -0
  33. package/dist/{shadow/dismissable-DvhBKm3q.js → dismissable-CQ6XFXsk.js} +5 -1
  34. package/dist/{export-format-uGayRKWM.js → export-format-CAi1mp-1.js} +1 -1
  35. package/dist/focus-trap-Dbb2tJxb.js +65 -0
  36. package/dist/list-option-DrRyivWp.js +82 -0
  37. package/dist/react/chart.d.ts +99 -0
  38. package/dist/react/chart.js +49 -0
  39. package/dist/react/index.d.ts +72 -0
  40. package/dist/react/index.js +8 -1
  41. package/dist/row-resize-limG_N1z.js +111 -0
  42. package/dist/shadow/GridMenus-DMkf7UMn.js +1086 -0
  43. package/dist/shadow/SvChartMenu-DkSyLWYH.js +413 -0
  44. package/dist/shadow/SvDateRangeInput-BrYTQEMM.js +197 -0
  45. package/dist/shadow/SvDateTimePicker-Czin1Ead.js +766 -0
  46. package/dist/shadow/SvField-Bmzp3ObZ.js +147 -0
  47. package/dist/shadow/SvGridCellEditor-DhXEIlyE.js +560 -0
  48. package/dist/shadow/SvGridChart-BMdCbrqb.js +3702 -0
  49. package/dist/shadow/SvGridChartBuilder-Chp_MD1B.js +1166 -0
  50. package/dist/shadow/SvGridChartPanel-BIV2O2Lp.js +1743 -0
  51. package/dist/shadow/SvGridChartView-DyhkumD-.js +45 -0
  52. package/dist/shadow/SvGridDropdown-BwPpGwLz.js +257 -0
  53. package/dist/shadow/{cell-formatting-Eypm-id0.js → cell-formatting-CBfgahv1.js} +1 -1
  54. package/dist/shadow/chart-D_LKA1fr.js +4398 -0
  55. package/dist/shadow/chart-export-pdf-9OCvhzr0.js +104 -0
  56. package/dist/shadow/chart-summary-v3Lhe8YD.js +137 -0
  57. package/dist/shadow/chart-validate-CD6ptiwg.js +180 -0
  58. package/dist/{client-DjwUji8D.js → shadow/client-DEF0GRjE.js} +1 -1
  59. package/dist/{column-resize-DvCRUrN3.js → shadow/column-resize-DUPgynvc.js} +3 -3
  60. package/dist/shadow/date-format-DMTwV8NC.js +1128 -0
  61. package/dist/{dismissable-DvhBKm3q.js → shadow/dismissable-CQ6XFXsk.js} +5 -1
  62. package/dist/shadow/{export-format-DhdZREP1.js → export-format-mnW_rVBZ.js} +1 -1
  63. package/dist/shadow/focus-trap-Dbb2tJxb.js +65 -0
  64. package/dist/shadow/list-option-DrRyivWp.js +82 -0
  65. package/dist/shadow/row-resize-limG_N1z.js +111 -0
  66. package/dist/shadow/sv-grid-shadow-element.d.ts +41 -0
  67. package/dist/shadow/sv-grid-shadow-element.js +5905 -3986
  68. package/dist/shadow/{svelte-virtualizer.svelte-DZ9UcyfT.js → svelte-virtualizer.svelte-CnGhFGDc.js} +37 -34
  69. package/dist/shadow/validate-BqDthkNr.js +88 -0
  70. package/dist/sv-grid-element.d.ts +41 -0
  71. package/dist/sv-grid-element.js +5874 -3985
  72. package/dist/{svelte-virtualizer.svelte-DZ9UcyfT.js → svelte-virtualizer.svelte-CnGhFGDc.js} +37 -34
  73. package/dist/validate-BqDthkNr.js +88 -0
  74. package/dist/vue/chart.d.ts +64 -0
  75. package/dist/vue/chart.js +41 -0
  76. package/dist/vue/index.d.ts +26 -2
  77. package/dist/vue/index.js +1 -22
  78. package/package.json +18 -5
  79. package/dist/GridMenus-YwTw9Upd.js +0 -1123
  80. package/dist/SvDateRangeInput-CrxeppBV.js +0 -196
  81. package/dist/SvDateTimePicker-xAO-Pb4S.js +0 -765
  82. package/dist/SvField-CE345DyF.js +0 -146
  83. package/dist/SvGridCellEditor-D7SyHtff.js +0 -550
  84. package/dist/SvGridChart-CMaVmlso.js +0 -1477
  85. package/dist/SvGridChartPanel-Pc_IW0eA.js +0 -833
  86. package/dist/SvGridChartView-DLhhzmFy.js +0 -52
  87. package/dist/SvGridDropdown-DUncHqM-.js +0 -256
  88. package/dist/chart-GRBAgN1M.js +0 -1658
  89. package/dist/date-format-D_oQ5Yw0.js +0 -1127
  90. package/dist/row-resize-D-8s3cqT.js +0 -94
  91. package/dist/shadow/GridMenus-YwTw9Upd.js +0 -1123
  92. package/dist/shadow/SvDateRangeInput-CrxeppBV.js +0 -196
  93. package/dist/shadow/SvDateTimePicker-xAO-Pb4S.js +0 -765
  94. package/dist/shadow/SvField-CE345DyF.js +0 -146
  95. package/dist/shadow/SvGridCellEditor-D7SyHtff.js +0 -550
  96. package/dist/shadow/SvGridChart-CMaVmlso.js +0 -1477
  97. package/dist/shadow/SvGridChartPanel-Pc_IW0eA.js +0 -833
  98. package/dist/shadow/SvGridChartView-DLhhzmFy.js +0 -52
  99. package/dist/shadow/SvGridDropdown-DUncHqM-.js +0 -256
  100. package/dist/shadow/chart-GRBAgN1M.js +0 -1658
  101. package/dist/shadow/date-format-D_oQ5Yw0.js +0 -1127
  102. package/dist/shadow/row-resize-D-8s3cqT.js +0 -94
  103. package/dist/shadow/validate-CgmAtX1A.js +0 -75
  104. package/dist/validate-CgmAtX1A.js +0 -75
@@ -0,0 +1,45 @@
1
+ (function(){try{var c=".sv-grid-chart-view.svelte-733vyy{box-sizing:border-box;width:100%;height:100%;min-height:0;display:grid}\n";if(typeof globalThis!=='undefined'){var f=globalThis.__SVGRID_WC_ADD_CSS__;if(typeof f==='function')f(c);else(globalThis.__SVGRID_WC_CSS_CHUNKS__=globalThis.__SVGRID_WC_CSS_CHUNKS__||[]).push(c);}if(typeof document==='undefined')return;if(document.querySelector('style[data-svgrid-grid-wc-chunk="SvGridChartView"]'))return;var s=document.createElement('style');s.setAttribute('data-svgrid-grid-wc-chunk',"SvGridChartView");s.textContent=c;document.head.appendChild(s);}catch(e){}})();
2
+ import { s as e } from "./chart-D_LKA1fr.js";
3
+ import { R as t, et as n, it as r, j as i, k as a, nt as o, q as s, tt as c } from "./client-DEF0GRjE.js";
4
+ import { t as l } from "./SvGridChart-BMdCbrqb.js";
5
+ //#region ../grid/dist/SvGridChartView.svelte
6
+ var u = i("<div class=\"sv-grid-chart-view svelte-733vyy\"><!></div>");
7
+ function d(i, d) {
8
+ o(d, !0);
9
+ let f = n(() => {
10
+ let t = e(d.data ?? [], {
11
+ type: d.chart.type ?? "bar",
12
+ category: d.chart.category,
13
+ value: d.chart.value,
14
+ series: d.chart.series,
15
+ reduce: d.chart.reduce,
16
+ stacked: d.chart.stacked,
17
+ stacked100: d.chart.stacked100,
18
+ sort: d.chart.sort,
19
+ topN: d.chart.topN,
20
+ palette: d.chart.palette
21
+ });
22
+ d.chart.valueFormat && (t.valueFormat = d.chart.valueFormat);
23
+ let n = d.chart.locale ?? d.localization?.locale;
24
+ return n && (t.locale = n), d.chart.currency && (t.currency = d.chart.currency), t;
25
+ });
26
+ var p = u(), m = s(p);
27
+ {
28
+ let e = n(() => d.chart.legend ?? !0), r = n(() => d.chart.dataLabels ?? !1);
29
+ l(m, {
30
+ get spec() {
31
+ return t(f);
32
+ },
33
+ autosize: !0,
34
+ get legend() {
35
+ return t(e);
36
+ },
37
+ get dataLabels() {
38
+ return t(r);
39
+ }
40
+ });
41
+ }
42
+ r(p), a(i, p), c();
43
+ }
44
+ //#endregion
45
+ export { d as default };
@@ -0,0 +1,257 @@
1
+ (function(){try{var c=".sv-grid-dropdown.svelte-r4kmto{background:var(--sg-bg,#fff);height:100%;color:var(--sg-fg,#0f172a);position:absolute;top:0;left:0;right:0}.sv-grid-dropdown-trigger.svelte-r4kmto{background:var(--sg-bg,#fff);width:100%;height:100%;min-height:28px;color:var(--sg-fg,#0f172a);font:inherit;text-align:start;cursor:pointer;box-sizing:border-box;border:0;outline:none;align-items:center;gap:6px;padding:0 8px;display:flex}.sv-grid-dropdown-trigger.svelte-r4kmto:focus{outline:2px solid var(--sg-accent,#2563eb);outline-offset:-2px}.sv-grid-dropdown-trigger-chips.svelte-r4kmto{flex-wrap:wrap;align-items:center;padding:4px 8px}.sv-grid-dropdown-chips.svelte-r4kmto{flex-wrap:wrap;flex:auto;align-items:center;gap:4px;min-width:0;display:inline-flex}.sv-grid-dropdown-label.svelte-r4kmto{text-overflow:ellipsis;white-space:nowrap;flex:auto;min-width:0;overflow:hidden}.sv-grid-dropdown-caret.svelte-r4kmto{opacity:.7;flex:none;font-size:10px;line-height:1}.sv-grid-dropdown-panel{background:var(--sg-header-bg,var(--sg-bg,#fff));color:var(--sg-fg,#0f172a);border:1px solid var(--sg-accent,#2563eb);border-radius:6px;padding:4px 0;font-family:inherit;overflow-y:auto;box-shadow:0 12px 28px #00000073}.sv-grid-dropdown-panel.sv-grid-dropdown-panel-fits{overflow:visible}.sv-grid-dropdown-option{cursor:pointer;-webkit-user-select:none;user-select:none;color:var(--sg-fg,#0f172a);align-items:center;gap:8px;padding:6px 10px;display:flex}.sv-grid-dropdown-option-highlighted{background:var(--sg-row-hover-bg,#2563eb1a)}.sv-grid-dropdown-option-selected{background:var(--sg-selection-bg,#2563eb26);font-weight:600}.sv-grid-dropdown-option-selected.sv-grid-dropdown-option-highlighted{background:var(--sg-row-hover-bg,#2563eb2e)}.sv-grid-dropdown-option-label{text-overflow:ellipsis;white-space:nowrap;flex:auto;min-width:0;overflow:hidden}.sv-grid-dropdown-check{color:var(--sg-accent,#2563eb);flex:0 0 16px;justify-content:center;align-items:center;font-weight:700;display:inline-flex}.sv-grid-dropdown-swatch{border:1px solid color-mix(in srgb, var(--sg-fg,#0f172a) 25%, transparent);border-radius:999px;flex:0 0 12px;width:12px;height:12px}.sv-grid-dropdown-option-chip{text-overflow:ellipsis;white-space:nowrap;border:1px solid #0000;border-radius:999px;align-items:center;max-width:100%;padding:2px 11px;font-size:.9em;font-weight:600;line-height:1.5;display:inline-flex;overflow:hidden}.sv-grid-dropdown-empty{color:var(--sg-muted,#0f172a8c);padding:8px 10px;font-size:.9em;font-style:italic}.sv-grid-dropdown-footer{border-top:1px solid var(--sg-border,#0f172a14);justify-content:flex-end;margin-top:2px;padding:4px 6px;display:flex}.sv-grid-dropdown-done{text-transform:uppercase;letter-spacing:.04em;color:#fff;background:var(--sg-accent,#2563eb);cursor:pointer;border:0;border-radius:4px;padding:4px 10px;font-size:11px}.sv-grid-dropdown-done:hover{filter:brightness(1.12)}.sv-grid-chip.svelte-r4kmto{background:color-mix(in srgb, var(--sg-accent,#2563eb) 18%, transparent);color:var(--sg-fg,#0f172a);border:1px solid color-mix(in srgb, var(--sg-accent,#2563eb) 35%, transparent);white-space:nowrap;border-radius:999px;align-items:center;gap:4px;padding:2px 8px;font-size:.85em;line-height:1.4;display:inline-flex}.sv-grid-chip-removable.svelte-r4kmto{padding-inline-end:2px}.sv-grid-chip-remove.svelte-r4kmto{background:color-mix(in srgb, var(--sg-fg,#0f172a) 18%, transparent);width:16px;height:16px;color:inherit;cursor:pointer;border:0;border-radius:999px;justify-content:center;align-items:center;padding:0;font-size:12px;line-height:1;display:inline-flex}.sv-grid-chip-remove.svelte-r4kmto:hover{color:#fff;background:#dc2626b3}\n";if(typeof globalThis!=='undefined'){var f=globalThis.__SVGRID_WC_ADD_CSS__;if(typeof f==='function')f(c);else(globalThis.__SVGRID_WC_CSS_CHUNKS__=globalThis.__SVGRID_WC_CSS_CHUNKS__||[]).push(c);}if(typeof document==='undefined')return;if(document.querySelector('style[data-svgrid-grid-wc-chunk="SvGridDropdown"]'))return;var s=document.createElement('style');s.setAttribute('data-svgrid-grid-wc-chunk',"SvGridDropdown");s.textContent=c;document.head.appendChild(s);}catch(e){}})();
2
+ import { A as e, E as t, F as n, H as r, I as i, J as a, L as o, N as s, O as c, Q as l, R as u, U as d, X as f, Y as p, Z as m, a as h, d as ee, et as g, f as _, it as v, j as y, k as b, n as x, nt as S, q as C, rt as w, s as te, tt as T, v as E, w as D, x as O, y as k } from "./client-DEF0GRjE.js";
3
+ import { n as ne, r as re, t as ie } from "./popover-WsGlvtQv.js";
4
+ //#region ../grid/dist/SvGridDropdown.svelte
5
+ var ae = y("<span class=\"sv-grid-chip sv-grid-chip-removable svelte-r4kmto\"> <span class=\"sv-grid-chip-remove svelte-r4kmto\" role=\"button\">×</span></span>"), oe = y("<span class=\"sv-grid-dropdown-chips svelte-r4kmto\"></span>"), se = y("<span class=\"sv-grid-chip svelte-r4kmto\"> </span>"), ce = y("<span class=\"sv-grid-dropdown-label svelte-r4kmto\"> </span>"), le = y("<input type=\"search\" class=\"sv-grid-dropdown-search\" placeholder=\"Search…\"/>"), ue = y("<div class=\"sv-grid-dropdown-empty\" role=\"status\" aria-live=\"polite\">Loading…</div>"), de = y("<div class=\"sv-grid-dropdown-empty\"> </div>"), fe = y("<span class=\"sv-grid-dropdown-check\" aria-hidden=\"true\"> </span>"), pe = y("<span class=\"sv-grid-dropdown-option-chip\"> </span>"), me = y("<span class=\"sv-grid-dropdown-option-label\"> </span>"), he = y("<div role=\"option\"><!> <!></div>"), ge = y("<div class=\"sv-grid-dropdown-footer\"><button type=\"button\" class=\"sv-grid-dropdown-done\">Done</button></div>"), _e = y("<div role=\"listbox\"><!> <!> <!></div>"), ve = y("<div><button type=\"button\" aria-haspopup=\"listbox\"><!> <span class=\"sv-grid-dropdown-caret svelte-r4kmto\" aria-hidden=\"true\">▾</span></button> <!></div>");
6
+ function ye(n, y) {
7
+ let ye = s();
8
+ S(y, !0);
9
+ let A = x(y, "multiple", 3, !1), be = x(y, "placeholder", 3, "Select…"), j = x(y, "renderChipsInTrigger", 3, !1), M = x(y, "searchable", 3, !1), xe = x(y, "autoOpen", 3, !0), Se = x(y, "loading", 3, !1), Ce = x(y, "invalid", 3, !1);
10
+ function N(e) {
11
+ return e >= 0 && e < u(I).length ? `${ye}-opt-${e}` : void 0;
12
+ }
13
+ let P = g(() => y.options.some((e) => e.color) ? 40 : 32), F = l(""), I = g(() => !M() || !u(F).trim() ? y.options : (() => {
14
+ let e = u(F).trim().toLowerCase();
15
+ return y.options.filter((t) => t.label.toLowerCase().includes(e));
16
+ })()), L = l(!1), R = l(-1), z = l(null), B = l(null), V = l(null), H = l(f({
17
+ top: 0,
18
+ left: 0,
19
+ width: 0,
20
+ openUpward: !1,
21
+ maxHeight: 0,
22
+ availHeight: 0
23
+ })), U = g(() => Array.isArray(y.value) ? y.value : y.value == null || y.value === "" ? [] : [y.value]), we = g(() => {
24
+ if (u(U).length === 0) return be();
25
+ if (!A()) {
26
+ let e = u(U)[0], t = y.options.find((t) => String(t.value) === String(e));
27
+ return t ? t.label : String(e);
28
+ }
29
+ return `${u(U).length} selected`;
30
+ }), Te = g(() => {
31
+ if (A() || u(U).length !== 1) return;
32
+ let e = u(U)[0];
33
+ return y.options.find((t) => String(t.value) === String(e))?.color;
34
+ });
35
+ function W(e) {
36
+ return u(U).some((t) => String(t) === String(e.value));
37
+ }
38
+ function G(e) {
39
+ if (A()) {
40
+ let t = W(e) ? u(U).filter((t) => String(t) !== String(e.value)) : [...u(U), e.value];
41
+ y.onChange?.(t);
42
+ } else y.onChange?.(e.value), m(L, !1), y.onCommit?.();
43
+ }
44
+ function K() {
45
+ if (!u(L)) {
46
+ if (m(L, !0), u(R) < 0) {
47
+ let e = y.options.findIndex((e) => W(e));
48
+ m(R, e >= 0 ? e : 0, !0);
49
+ }
50
+ q();
51
+ }
52
+ }
53
+ function q() {
54
+ if (!u(B)) return;
55
+ let e = Math.min(u(I).length, 10), t = M() ? 38 : 0, n = e * u(P) + (A() ? 40 : 0) + t + 8;
56
+ m(H, ie(u(B).getBoundingClientRect(), {
57
+ estimatedHeight: n,
58
+ clampHorizontal: !1
59
+ }), !0);
60
+ }
61
+ d(() => {
62
+ if (!u(L)) return;
63
+ let e = () => q();
64
+ return window.addEventListener("scroll", e, !0), window.addEventListener("resize", e), () => {
65
+ window.removeEventListener("scroll", e, !0), window.removeEventListener("resize", e);
66
+ };
67
+ }), d(() => {
68
+ u(L) && (u(I).length, u(P), q());
69
+ });
70
+ function J() {
71
+ m(L, !1), m(R, -1);
72
+ }
73
+ function Ee(e) {
74
+ if (e.stopPropagation(), e.key === "Escape") {
75
+ e.preventDefault(), J(), y.onCancel?.();
76
+ return;
77
+ }
78
+ if (e.key === "ArrowDown") {
79
+ if (e.preventDefault(), !u(L)) {
80
+ K();
81
+ return;
82
+ }
83
+ m(R, Math.min(u(R) + 1, y.options.length - 1), !0), Y();
84
+ } else if (e.key === "ArrowUp") {
85
+ if (e.preventDefault(), !u(L)) {
86
+ K();
87
+ return;
88
+ }
89
+ m(R, Math.max(u(R) - 1, 0), !0), Y();
90
+ } else if (e.key === "Home") {
91
+ if (!u(L)) return;
92
+ e.preventDefault(), m(R, 0), Y();
93
+ } else if (e.key === "End") {
94
+ if (!u(L)) return;
95
+ e.preventDefault(), m(R, y.options.length - 1), Y();
96
+ } else if (e.key === "Enter") {
97
+ if (e.preventDefault(), !u(L)) {
98
+ K();
99
+ return;
100
+ }
101
+ let t = y.options[u(R)];
102
+ t ? G(t) : A() && (J(), y.onCommit?.());
103
+ } else if (e.key === " " && u(L)) {
104
+ e.preventDefault();
105
+ let t = y.options[u(R)];
106
+ t && G(t);
107
+ } else e.key === "Tab" && (u(L) && J(), y.onCommit?.());
108
+ }
109
+ function Y() {
110
+ queueMicrotask(() => {
111
+ u(V) && u(V).querySelector(`[data-opt-idx="${u(R)}"]`)?.scrollIntoView({ block: "nearest" });
112
+ });
113
+ }
114
+ function De(e) {
115
+ let t = e.relatedTarget;
116
+ t && u(z)?.contains(t) || (u(L) && J(), y.onCommit?.());
117
+ }
118
+ function Oe(e, t) {
119
+ t.preventDefault(), t.stopPropagation();
120
+ let n = u(U).filter((t) => String(t) !== String(e));
121
+ y.onChange?.(A() ? n : n[0] ?? null);
122
+ }
123
+ function ke(e) {
124
+ xe() && (e.focus(), K());
125
+ }
126
+ d(() => {
127
+ if (!u(L)) return;
128
+ let e = (e) => {
129
+ let t = e.target;
130
+ t && (u(z)?.contains(t) || u(V)?.contains(t) || (J(), y.onCommit?.()));
131
+ };
132
+ return document.addEventListener("pointerdown", e, !0), () => document.removeEventListener("pointerdown", e, !0);
133
+ });
134
+ function X(e) {
135
+ return `background: color-mix(in srgb, ${e} 22%, transparent);border-color: color-mix(in srgb, ${e} 45%, transparent);color: color-mix(in srgb, ${e} 80%, var(--sg-fg, #0f172a));`;
136
+ }
137
+ var Z = ve();
138
+ let Ae;
139
+ var Q = C(Z);
140
+ let $;
141
+ var je = C(Q), Me = (e) => {
142
+ var t = oe();
143
+ D(t, 21, () => u(U), (e) => String(e), (e, t) => {
144
+ let n = g(() => y.options.find((e) => String(e.value) === String(u(t))));
145
+ var a = ae(), o = C(a), s = p(o);
146
+ _(s, "tabindex", -1), v(a), r((e, t, n) => {
147
+ E(a, e), c(o, `${t ?? ""} `), _(s, "aria-label", `Remove ${n ?? ""}`);
148
+ }, [
149
+ () => u(n)?.color ? X(u(n).color) : "",
150
+ () => u(n) ? u(n).label : String(u(t)),
151
+ () => u(n) ? u(n).label : String(u(t))
152
+ ]), i("mousedown", s, (e) => e.preventDefault()), i("click", s, (e) => Oe(u(t), e)), b(e, a);
153
+ }), v(t), b(e, t);
154
+ }, Ne = (e) => {
155
+ var t = se(), n = C(t, !0);
156
+ v(t), r((e) => {
157
+ E(t, e), c(n, u(we));
158
+ }, [() => X(u(Te))]), b(e, t);
159
+ }, Pe = (e) => {
160
+ var t = ce(), n = C(t, !0);
161
+ v(t), r(() => c(n, u(we))), b(e, t);
162
+ };
163
+ t(je, (e) => {
164
+ j() && u(U).length > 0 ? e(Me) : !A() && u(U).length === 1 && u(Te) ? e(Ne, 1) : e(Pe, -1);
165
+ }), w(2), v(Q), h(Q, (e) => m(B, e), () => u(B)), O(Q, (e) => ke?.(e));
166
+ var Fe = p(Q, 2), Ie = (n) => {
167
+ let s = g(() => y.options.length > 10), l = g(() => Math.min(u(s) ? 10 * u(P) + (A() ? 40 : 0) + 8 : Infinity, u(H).availHeight));
168
+ var d = _e();
169
+ let f, x;
170
+ var S = C(d), w = (e) => {
171
+ var t = le();
172
+ ee(t), i("mousedown", t, (e) => e.stopPropagation()), i("click", t, (e) => e.stopPropagation()), i("keydown", t, (e) => {
173
+ e.key === "Escape" && (e.preventDefault(), m(L, !1), y.onCancel?.());
174
+ }), te(t, () => u(F), (e) => m(F, e)), b(e, t);
175
+ };
176
+ t(S, (e) => {
177
+ M() && e(w);
178
+ });
179
+ var T = p(S, 2), ie = (e) => {
180
+ var t = ue();
181
+ b(e, t);
182
+ }, ae = (e) => {
183
+ var t = de(), n = C(t, !0);
184
+ v(t), r(() => c(n, M() && u(F) ? `No matches for "${u(F)}"` : "No options")), b(e, t);
185
+ }, oe = (n) => {
186
+ var s = e(), l = a(s);
187
+ D(l, 19, () => u(I), (e) => String(e.value), (e, n, a) => {
188
+ let s = g(() => W(u(n)));
189
+ var l = he();
190
+ let d;
191
+ var f = C(l), h = (e) => {
192
+ var t = fe(), n = C(t, !0);
193
+ v(t), r(() => c(n, u(s) ? "✓" : "")), b(e, t);
194
+ };
195
+ t(f, (e) => {
196
+ A() && e(h);
197
+ });
198
+ var ee = p(f, 2), y = (e) => {
199
+ var t = pe(), i = C(t, !0);
200
+ v(t), r((e) => {
201
+ E(t, e), c(i, u(n).label);
202
+ }, [() => X(u(n).color)]), b(e, t);
203
+ }, x = (e) => {
204
+ var t = me(), i = C(t, !0);
205
+ v(t), r(() => c(i, u(n).label)), b(e, t);
206
+ };
207
+ t(ee, (e) => {
208
+ u(n).color ? e(y) : e(x, -1);
209
+ }), v(l), r((e) => {
210
+ d = k(l, 1, "sv-grid-dropdown-option", null, d, {
211
+ "sv-grid-dropdown-option-selected": u(s),
212
+ "sv-grid-dropdown-option-highlighted": u(a) === u(R)
213
+ }), _(l, "id", e), _(l, "aria-selected", u(s)), _(l, "data-opt-idx", u(a));
214
+ }, [() => N(u(a))]), i("mousedown", l, (e) => {
215
+ e.preventDefault(), G(u(n));
216
+ }), o("mouseenter", l, () => m(R, u(a), !0)), b(e, l);
217
+ }), b(n, s);
218
+ };
219
+ t(T, (e) => {
220
+ Se() && u(I).length === 0 ? e(ie) : u(I).length === 0 ? e(ae, 1) : e(oe, -1);
221
+ });
222
+ var se = p(T, 2), ce = (e) => {
223
+ var t = ge(), n = C(t);
224
+ v(t), i("mousedown", n, (e) => e.preventDefault()), i("click", n, () => {
225
+ J(), y.onCommit?.();
226
+ }), b(e, t);
227
+ };
228
+ t(se, (e) => {
229
+ A() && e(ce);
230
+ }), v(d), h(d, (e) => m(V, e), () => u(V)), O(d, (e) => re?.(e)), O(d, (e, t) => ne?.(e, t), () => ({ up: u(H).openUpward })), r(() => {
231
+ f = k(d, 1, "sv-grid-dropdown-panel", null, f, { "sv-grid-dropdown-panel-fits": !u(s) }), _(d, "aria-multiselectable", A()), x = E(d, "", x, {
232
+ position: "fixed",
233
+ top: u(H).openUpward ? null : `${u(H).top}px`,
234
+ bottom: u(H).openUpward ? `${u(H).bottom}px` : null,
235
+ left: `${u(H).left}px`,
236
+ width: `${u(H).width}px`,
237
+ "max-height": u(l) === null ? null : `${u(l)}px`,
238
+ "z-index": "2147483647"
239
+ });
240
+ }), i("pointerdown", d, (e) => e.stopPropagation()), i("mousedown", d, (e) => e.stopPropagation()), i("click", d, (e) => e.stopPropagation()), b(n, d);
241
+ };
242
+ t(Fe, (e) => {
243
+ u(L) && e(Ie);
244
+ }), v(Z), h(Z, (e) => m(z, e), () => u(z)), r((e) => {
245
+ Ae = k(Z, 1, "sv-grid-dropdown svelte-r4kmto", null, Ae, { "sv-grid-dropdown-open": u(L) }), _(Q, "id", y.id), $ = k(Q, 1, "sv-grid-dropdown-trigger svelte-r4kmto", null, $, { "sv-grid-dropdown-trigger-chips": j() && u(U).length > 0 }), _(Q, "aria-expanded", u(L)), _(Q, "aria-label", y.ariaLabel), _(Q, "aria-invalid", Ce() || void 0), _(Q, "aria-describedby", y.describedBy), _(Q, "aria-activedescendant", e);
246
+ }, [() => u(L) ? N(u(R)) : void 0]), i("focusout", Z, De), i("click", Z, (e) => e.stopPropagation()), i("dblclick", Z, (e) => e.stopPropagation()), i("pointerdown", Z, (e) => e.stopPropagation()), i("mousedown", Z, (e) => e.stopPropagation()), i("click", Q, () => u(L) ? J() : K()), i("keydown", Q, Ee), b(n, Z), T();
247
+ }
248
+ n([
249
+ "focusout",
250
+ "click",
251
+ "dblclick",
252
+ "pointerdown",
253
+ "mousedown",
254
+ "keydown"
255
+ ]);
256
+ //#endregion
257
+ export { ye as default };
@@ -54,7 +54,7 @@ function e(e, t) {
54
54
  }
55
55
  var t = /* @__PURE__ */ new Map();
56
56
  function n(e, n) {
57
- let r = (Array.isArray(e) ? e.join(",") : e ?? "") + "|" + (n.style ?? "") + "|" + (n.currency ?? "") + "|" + (n.minimumFractionDigits ?? "") + "|" + (n.maximumFractionDigits ?? "") + "|" + (n.useGrouping ?? "") + "|" + (n.currencyDisplay ?? "") + "|" + (n.notation ?? ""), i = t.get(r);
57
+ let r = (Array.isArray(e) ? e.join(",") : e ?? "") + "|" + (n.style ?? "") + "|" + (n.currency ?? "") + "|" + (n.minimumFractionDigits ?? "") + "|" + (n.maximumFractionDigits ?? "") + "|" + (n.useGrouping ?? "") + "|" + (n.currencyDisplay ?? "") + "|" + (n.notation ?? "") + "|" + (n.signDisplay ?? "") + "|" + (n.minimumIntegerDigits ?? "") + "|" + (n.compactDisplay ?? "") + "|" + (n.unit ?? "") + "|" + (n.unitDisplay ?? "") + "|" + (n.minimumSignificantDigits ?? "") + "|" + (n.maximumSignificantDigits ?? ""), i = t.get(r);
58
58
  return i || (i = new Intl.NumberFormat(e, n), t.set(r, i)), i;
59
59
  }
60
60
  var r = /* @__PURE__ */ new Map();