@svgrid/grid-wc 3.0.0 → 3.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/README.md +130 -110
  2. package/dist/GridMenus-B1mC1aPp.js +1077 -0
  3. package/dist/SvChartMenu-CBMKm7Xb.js +413 -0
  4. package/dist/SvDateRangeInput-BrYTQEMM.js +197 -0
  5. package/dist/SvDateTimePicker-CnLlqNDQ.js +766 -0
  6. package/dist/SvField-Bmzp3ObZ.js +147 -0
  7. package/dist/SvGridCellEditor-B005dmV1.js +560 -0
  8. package/dist/SvGridChart-4TcL9Rj2.js +3702 -0
  9. package/dist/SvGridChartBuilder-C4OL4XYx.js +1165 -0
  10. package/dist/SvGridChartPanel-CfHA8Ioq.js +1743 -0
  11. package/dist/SvGridChartView-Ci-9_EJ0.js +45 -0
  12. package/dist/SvGridDropdown-BlA6iw9m.js +257 -0
  13. package/dist/angular/fesm2022/svgrid-grid-wc-angular.mjs +178 -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 +77 -2
  16. package/dist/{shadow/cell-formatting-C0OsDmi_.js → cell-formatting-Eypm-id0.js} +1 -1
  17. package/dist/chart/SvChartMenu-C-sbGNk8.js +586 -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-B86RFA3M.js +137 -0
  21. package/dist/chart/chart-trend-DP6DSsBa.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-DoqdUoGg.js +4398 -0
  27. package/dist/chart-export-pdf-BirUdchl.js +104 -0
  28. package/dist/chart-summary-BP9i-v8M.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/{export-format-B6FUgOll.js → export-format-uGayRKWM.js} +3 -3
  34. package/dist/focus-trap-DvlOlOGM.js +65 -0
  35. package/dist/list-option-DrRyivWp.js +82 -0
  36. package/dist/react/chart.d.ts +99 -0
  37. package/dist/react/chart.js +49 -0
  38. package/dist/react/index.d.ts +28 -0
  39. package/dist/react/index.js +4 -1
  40. package/dist/{row-resize-D-8s3cqT.js → row-resize-Cf8qPLbi.js} +44 -36
  41. package/dist/shadow/GridMenus-B1mC1aPp.js +1077 -0
  42. package/dist/shadow/SvChartMenu-CBMKm7Xb.js +413 -0
  43. package/dist/shadow/SvDateRangeInput-BrYTQEMM.js +197 -0
  44. package/dist/shadow/SvDateTimePicker-CnLlqNDQ.js +766 -0
  45. package/dist/shadow/SvField-Bmzp3ObZ.js +147 -0
  46. package/dist/shadow/SvGridCellEditor-B005dmV1.js +560 -0
  47. package/dist/shadow/SvGridChart-4TcL9Rj2.js +3702 -0
  48. package/dist/shadow/SvGridChartBuilder-C4OL4XYx.js +1165 -0
  49. package/dist/shadow/SvGridChartPanel-CfHA8Ioq.js +1743 -0
  50. package/dist/shadow/SvGridChartView-Ci-9_EJ0.js +45 -0
  51. package/dist/shadow/SvGridDropdown-BlA6iw9m.js +257 -0
  52. package/dist/{cell-formatting-C0OsDmi_.js → shadow/cell-formatting-Eypm-id0.js} +1 -1
  53. package/dist/shadow/chart-DoqdUoGg.js +4398 -0
  54. package/dist/shadow/chart-export-pdf-BirUdchl.js +104 -0
  55. package/dist/shadow/chart-summary-BP9i-v8M.js +137 -0
  56. package/dist/shadow/chart-validate-CD6ptiwg.js +180 -0
  57. package/dist/{client-DjwUji8D.js → shadow/client-DEF0GRjE.js} +1 -1
  58. package/dist/{column-resize-DvCRUrN3.js → shadow/column-resize-DUPgynvc.js} +3 -3
  59. package/dist/shadow/date-format-DMTwV8NC.js +1128 -0
  60. package/dist/shadow/{export-format-C8kZGZfz.js → export-format-DhdZREP1.js} +3 -3
  61. package/dist/shadow/focus-trap-DvlOlOGM.js +65 -0
  62. package/dist/shadow/list-option-DrRyivWp.js +82 -0
  63. package/dist/shadow/{row-resize-D-8s3cqT.js → row-resize-Cf8qPLbi.js} +44 -36
  64. package/dist/shadow/sv-grid-shadow-element.d.ts +15 -0
  65. package/dist/shadow/sv-grid-shadow-element.js +4853 -3626
  66. package/dist/shadow/{svelte-virtualizer.svelte-DZ9UcyfT.js → svelte-virtualizer.svelte-CnGhFGDc.js} +37 -34
  67. package/dist/sv-grid-element.d.ts +15 -0
  68. package/dist/sv-grid-element.js +4809 -3612
  69. package/dist/{svelte-virtualizer.svelte-DZ9UcyfT.js → svelte-virtualizer.svelte-CnGhFGDc.js} +37 -34
  70. package/dist/vue/chart.d.ts +64 -0
  71. package/dist/vue/chart.js +41 -0
  72. package/dist/vue/index.d.ts +11 -2
  73. package/dist/vue/index.js +4 -1
  74. package/package.json +18 -5
  75. package/dist/GridMenus-DpmS1pzo.js +0 -1121
  76. package/dist/SvDateRangeInput-u4ibte8S.js +0 -196
  77. package/dist/SvDateTimePicker-DVFiDxUq.js +0 -765
  78. package/dist/SvField-ChCI-O2O.js +0 -146
  79. package/dist/SvGridCellEditor-DvsQyE9a.js +0 -550
  80. package/dist/SvGridChart-yK5Zv85y.js +0 -1199
  81. package/dist/SvGridChartPanel-B38_VjXM.js +0 -584
  82. package/dist/SvGridChartView-ScXTF6t-.js +0 -50
  83. package/dist/SvGridDropdown-DnAESFDu.js +0 -256
  84. package/dist/chart-uvs3sFJA.js +0 -1220
  85. package/dist/date-format-CPHqTHN6.js +0 -1127
  86. package/dist/shadow/GridMenus-DpmS1pzo.js +0 -1121
  87. package/dist/shadow/SvDateRangeInput-u4ibte8S.js +0 -196
  88. package/dist/shadow/SvDateTimePicker-DVFiDxUq.js +0 -765
  89. package/dist/shadow/SvField-ChCI-O2O.js +0 -146
  90. package/dist/shadow/SvGridCellEditor-DvsQyE9a.js +0 -550
  91. package/dist/shadow/SvGridChart-yK5Zv85y.js +0 -1199
  92. package/dist/shadow/SvGridChartPanel-B38_VjXM.js +0 -584
  93. package/dist/shadow/SvGridChartView-ScXTF6t-.js +0 -50
  94. package/dist/shadow/SvGridDropdown-DnAESFDu.js +0 -256
  95. package/dist/shadow/chart-uvs3sFJA.js +0 -1220
  96. package/dist/shadow/date-format-CPHqTHN6.js +0 -1127
@@ -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-DoqdUoGg.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-4TcL9Rj2.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 te, s as ne, tt as w, v as T, w as re, x as E, y as D } from "./client-DEF0GRjE.js";
3
+ import { n as ie, r as ae, t as O } from "./popover-WsGlvtQv.js";
4
+ //#region ../grid/dist/SvGridDropdown.svelte
5
+ var k = y("<span class=\"sv-grid-chip sv-grid-chip-removable svelte-r4kmto\"> <span class=\"sv-grid-chip-remove svelte-r4kmto\" role=\"button\">×</span></span>"), A = y("<span class=\"sv-grid-dropdown-chips svelte-r4kmto\"></span>"), oe = y("<span class=\"sv-grid-chip svelte-r4kmto\"> </span>"), j = y("<span class=\"sv-grid-dropdown-label svelte-r4kmto\"> </span>"), se = y("<input type=\"search\" class=\"sv-grid-dropdown-search\" placeholder=\"Search…\"/>"), ce = y("<div class=\"sv-grid-dropdown-empty\" role=\"status\" aria-live=\"polite\">Loading…</div>"), le = y("<div class=\"sv-grid-dropdown-empty\"> </div>"), ue = y("<span class=\"sv-grid-dropdown-check\" aria-hidden=\"true\"> </span>"), de = y("<span class=\"sv-grid-dropdown-option-chip\"> </span>"), fe = y("<span class=\"sv-grid-dropdown-option-label\"> </span>"), pe = y("<div role=\"option\"><!> <!></div>"), me = y("<div class=\"sv-grid-dropdown-footer\"><button type=\"button\" class=\"sv-grid-dropdown-done\">Done</button></div>"), he = y("<div role=\"listbox\"><!> <!> <!></div>"), ge = y("<div><button type=\"button\" aria-haspopup=\"listbox\"><!> <span class=\"sv-grid-dropdown-caret svelte-r4kmto\" aria-hidden=\"true\">▾</span></button> <!></div>");
6
+ function M(n, y) {
7
+ let M = s();
8
+ S(y, !0);
9
+ let N = x(y, "multiple", 3, !1), _e = x(y, "placeholder", 3, "Select…"), ve = x(y, "renderChipsInTrigger", 3, !1), P = x(y, "searchable", 3, !1), ye = x(y, "autoOpen", 3, !0), be = x(y, "loading", 3, !1);
10
+ function xe(e) {
11
+ return e >= 0 && e < u(L).length ? `${M}-opt-${e}` : void 0;
12
+ }
13
+ let F = g(() => y.options.some((e) => e.color) ? 40 : 32), I = l(""), L = g(() => !P() || !u(I).trim() ? y.options : (() => {
14
+ let e = u(I).trim().toLowerCase();
15
+ return y.options.filter((t) => t.label.toLowerCase().includes(e));
16
+ })()), R = l(!1), z = l(-1), B = l(null), V = l(null), H = l(null), U = l(f({
17
+ top: 0,
18
+ left: 0,
19
+ width: 0,
20
+ openUpward: !1,
21
+ maxHeight: 0,
22
+ availHeight: 0
23
+ })), W = g(() => Array.isArray(y.value) ? y.value : y.value == null || y.value === "" ? [] : [y.value]), Se = g(() => {
24
+ if (u(W).length === 0) return _e();
25
+ if (!N()) {
26
+ let e = u(W)[0], t = y.options.find((t) => String(t.value) === String(e));
27
+ return t ? t.label : String(e);
28
+ }
29
+ return `${u(W).length} selected`;
30
+ }), Ce = g(() => {
31
+ if (N() || u(W).length !== 1) return;
32
+ let e = u(W)[0];
33
+ return y.options.find((t) => String(t.value) === String(e))?.color;
34
+ });
35
+ function G(e) {
36
+ return u(W).some((t) => String(t) === String(e.value));
37
+ }
38
+ function K(e) {
39
+ if (N()) {
40
+ let t = G(e) ? u(W).filter((t) => String(t) !== String(e.value)) : [...u(W), e.value];
41
+ y.onChange?.(t);
42
+ } else y.onChange?.(e.value), m(R, !1), y.onCommit?.();
43
+ }
44
+ function q() {
45
+ if (!u(R)) {
46
+ if (m(R, !0), u(z) < 0) {
47
+ let e = y.options.findIndex((e) => G(e));
48
+ m(z, e >= 0 ? e : 0, !0);
49
+ }
50
+ J();
51
+ }
52
+ }
53
+ function J() {
54
+ if (!u(V)) return;
55
+ let e = Math.min(u(L).length, 10), t = P() ? 38 : 0, n = e * u(F) + (N() ? 40 : 0) + t + 8;
56
+ m(U, O(u(V).getBoundingClientRect(), {
57
+ estimatedHeight: n,
58
+ clampHorizontal: !1
59
+ }), !0);
60
+ }
61
+ d(() => {
62
+ if (!u(R)) return;
63
+ let e = () => J();
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(R) && (u(L).length, u(F), J());
69
+ });
70
+ function Y() {
71
+ m(R, !1), m(z, -1);
72
+ }
73
+ function we(e) {
74
+ if (e.stopPropagation(), e.key === "Escape") {
75
+ e.preventDefault(), Y(), y.onCancel?.();
76
+ return;
77
+ }
78
+ if (e.key === "ArrowDown") {
79
+ if (e.preventDefault(), !u(R)) {
80
+ q();
81
+ return;
82
+ }
83
+ m(z, Math.min(u(z) + 1, y.options.length - 1), !0), X();
84
+ } else if (e.key === "ArrowUp") {
85
+ if (e.preventDefault(), !u(R)) {
86
+ q();
87
+ return;
88
+ }
89
+ m(z, Math.max(u(z) - 1, 0), !0), X();
90
+ } else if (e.key === "Home") {
91
+ if (!u(R)) return;
92
+ e.preventDefault(), m(z, 0), X();
93
+ } else if (e.key === "End") {
94
+ if (!u(R)) return;
95
+ e.preventDefault(), m(z, y.options.length - 1), X();
96
+ } else if (e.key === "Enter") {
97
+ if (e.preventDefault(), !u(R)) {
98
+ q();
99
+ return;
100
+ }
101
+ let t = y.options[u(z)];
102
+ t ? K(t) : N() && (Y(), y.onCommit?.());
103
+ } else if (e.key === " " && u(R)) {
104
+ e.preventDefault();
105
+ let t = y.options[u(z)];
106
+ t && K(t);
107
+ } else e.key === "Tab" && (u(R) && Y(), y.onCommit?.());
108
+ }
109
+ function X() {
110
+ queueMicrotask(() => {
111
+ u(H) && u(H).querySelector(`[data-opt-idx="${u(z)}"]`)?.scrollIntoView({ block: "nearest" });
112
+ });
113
+ }
114
+ function Te(e) {
115
+ let t = e.relatedTarget;
116
+ t && u(B)?.contains(t) || (u(R) && Y(), y.onCommit?.());
117
+ }
118
+ function Ee(e, t) {
119
+ t.preventDefault(), t.stopPropagation();
120
+ let n = u(W).filter((t) => String(t) !== String(e));
121
+ y.onChange?.(N() ? n : n[0] ?? null);
122
+ }
123
+ function De(e) {
124
+ ye() && (e.focus(), q());
125
+ }
126
+ d(() => {
127
+ if (!u(R)) return;
128
+ let e = (e) => {
129
+ let t = e.target;
130
+ t && (u(B)?.contains(t) || u(H)?.contains(t) || (Y(), y.onCommit?.()));
131
+ };
132
+ return document.addEventListener("pointerdown", e, !0), () => document.removeEventListener("pointerdown", e, !0);
133
+ });
134
+ function Z(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 Q = ge();
138
+ let Oe;
139
+ var $ = C(Q);
140
+ let ke;
141
+ var Ae = C($), je = (e) => {
142
+ var t = A();
143
+ re(t, 21, () => u(W), (e) => String(e), (e, t) => {
144
+ let n = g(() => y.options.find((e) => String(e.value) === String(u(t))));
145
+ var a = k(), o = C(a), s = p(o);
146
+ _(s, "tabindex", -1), v(a), r((e, t, n) => {
147
+ T(a, e), c(o, `${t ?? ""} `), _(s, "aria-label", `Remove ${n ?? ""}`);
148
+ }, [
149
+ () => u(n)?.color ? Z(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) => Ee(u(t), e)), b(e, a);
153
+ }), v(t), b(e, t);
154
+ }, Me = (e) => {
155
+ var t = oe(), n = C(t, !0);
156
+ v(t), r((e) => {
157
+ T(t, e), c(n, u(Se));
158
+ }, [() => Z(u(Ce))]), b(e, t);
159
+ }, Ne = (e) => {
160
+ var t = j(), n = C(t, !0);
161
+ v(t), r(() => c(n, u(Se))), b(e, t);
162
+ };
163
+ t(Ae, (e) => {
164
+ ve() && u(W).length > 0 ? e(je) : !N() && u(W).length === 1 && u(Ce) ? e(Me, 1) : e(Ne, -1);
165
+ }), te(2), v($), h($, (e) => m(V, e), () => u(V)), E($, (e) => De?.(e));
166
+ var Pe = p($, 2), Fe = (n) => {
167
+ let s = g(() => y.options.length > 10), l = g(() => Math.min(u(s) ? 10 * u(F) + (N() ? 40 : 0) + 8 : Infinity, u(U).availHeight));
168
+ var d = he();
169
+ let f, x;
170
+ var S = C(d), te = (e) => {
171
+ var t = se();
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(R, !1), y.onCancel?.());
174
+ }), ne(t, () => u(I), (e) => m(I, e)), b(e, t);
175
+ };
176
+ t(S, (e) => {
177
+ P() && e(te);
178
+ });
179
+ var w = p(S, 2), O = (e) => {
180
+ var t = ce();
181
+ b(e, t);
182
+ }, k = (e) => {
183
+ var t = le(), n = C(t, !0);
184
+ v(t), r(() => c(n, P() && u(I) ? `No matches for "${u(I)}"` : "No options")), b(e, t);
185
+ }, A = (n) => {
186
+ var s = e(), l = a(s);
187
+ re(l, 19, () => u(L), (e) => String(e.value), (e, n, a) => {
188
+ let s = g(() => G(u(n)));
189
+ var l = pe();
190
+ let d;
191
+ var f = C(l), h = (e) => {
192
+ var t = ue(), n = C(t, !0);
193
+ v(t), r(() => c(n, u(s) ? "✓" : "")), b(e, t);
194
+ };
195
+ t(f, (e) => {
196
+ N() && e(h);
197
+ });
198
+ var ee = p(f, 2), y = (e) => {
199
+ var t = de(), i = C(t, !0);
200
+ v(t), r((e) => {
201
+ T(t, e), c(i, u(n).label);
202
+ }, [() => Z(u(n).color)]), b(e, t);
203
+ }, x = (e) => {
204
+ var t = fe(), 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 = D(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(z)
213
+ }), _(l, "id", e), _(l, "aria-selected", u(s)), _(l, "data-opt-idx", u(a));
214
+ }, [() => xe(u(a))]), i("mousedown", l, (e) => {
215
+ e.preventDefault(), K(u(n));
216
+ }), o("mouseenter", l, () => m(z, u(a), !0)), b(e, l);
217
+ }), b(n, s);
218
+ };
219
+ t(w, (e) => {
220
+ be() && u(L).length === 0 ? e(O) : u(L).length === 0 ? e(k, 1) : e(A, -1);
221
+ });
222
+ var oe = p(w, 2), j = (e) => {
223
+ var t = me(), n = C(t);
224
+ v(t), i("mousedown", n, (e) => e.preventDefault()), i("click", n, () => {
225
+ Y(), y.onCommit?.();
226
+ }), b(e, t);
227
+ };
228
+ t(oe, (e) => {
229
+ N() && e(j);
230
+ }), v(d), h(d, (e) => m(H, e), () => u(H)), E(d, (e) => ae?.(e)), E(d, (e, t) => ie?.(e, t), () => ({ up: u(U).openUpward })), r(() => {
231
+ f = D(d, 1, "sv-grid-dropdown-panel", null, f, { "sv-grid-dropdown-panel-fits": !u(s) }), _(d, "aria-multiselectable", N()), x = T(d, "", x, {
232
+ position: "fixed",
233
+ top: u(U).openUpward ? null : `${u(U).top}px`,
234
+ bottom: u(U).openUpward ? `${u(U).bottom}px` : null,
235
+ left: `${u(U).left}px`,
236
+ width: `${u(U).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(Pe, (e) => {
243
+ u(R) && e(Fe);
244
+ }), v(Q), h(Q, (e) => m(B, e), () => u(B)), r((e) => {
245
+ Oe = D(Q, 1, "sv-grid-dropdown svelte-r4kmto", null, Oe, { "sv-grid-dropdown-open": u(R) }), ke = D($, 1, "sv-grid-dropdown-trigger svelte-r4kmto", null, ke, { "sv-grid-dropdown-trigger-chips": ve() && u(W).length > 0 }), _($, "aria-expanded", u(R)), _($, "aria-activedescendant", e);
246
+ }, [() => u(R) ? xe(u(z)) : void 0]), i("focusout", Q, Te), i("click", Q, (e) => e.stopPropagation()), i("dblclick", Q, (e) => e.stopPropagation()), i("pointerdown", Q, (e) => e.stopPropagation()), i("mousedown", Q, (e) => e.stopPropagation()), i("click", $, () => u(R) ? Y() : q()), i("keydown", $, we), b(n, Q), w();
247
+ }
248
+ n([
249
+ "focusout",
250
+ "click",
251
+ "dblclick",
252
+ "pointerdown",
253
+ "mousedown",
254
+ "keydown"
255
+ ]);
256
+ //#endregion
257
+ export { M as default };
@@ -83,4 +83,4 @@ function a(e, t) {
83
83
  return n(i, t.options ?? {}).format(r);
84
84
  }
85
85
  //#endregion
86
- export { i as n, e as r, a as t };
86
+ export { e as i, i as n, n as r, a as t };