@sken-ds/primitives 0.5.0 → 0.6.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 (47) hide show
  1. package/dist/catalog-y40FMic1-DY2BFupW.js +153 -0
  2. package/dist/catalog-y40FMic1-DY2BFupW.js.map +1 -0
  3. package/dist/{decorate-D4FKzyDw.js → decorate-C1e2sg49.js} +1 -1
  4. package/dist/index.js +9 -5
  5. package/dist/ix-bridge.css +53 -191
  6. package/dist/primitives.css +2 -0
  7. package/dist/sken-button.js +1 -1
  8. package/dist/sken-button.js.map +1 -1
  9. package/dist/sken-checkbox.js +14 -4
  10. package/dist/sken-checkbox.js.map +1 -1
  11. package/dist/sken-combobox-group.js +1 -1
  12. package/dist/sken-combobox-group.js.map +1 -1
  13. package/dist/sken-combobox-item.js +1 -1
  14. package/dist/sken-combobox-item.js.map +1 -1
  15. package/dist/sken-combobox.js +66 -36
  16. package/dist/sken-combobox.js.map +1 -1
  17. package/dist/{sken-datatable-jx_jh1Fu.js → sken-datatable-DSXSyrNf.js} +163 -135
  18. package/dist/sken-datatable-DSXSyrNf.js.map +1 -0
  19. package/dist/sken-datatable.js +1 -1
  20. package/dist/sken-date-picker.js +1 -1
  21. package/dist/sken-date-picker.js.map +1 -1
  22. package/dist/sken-dialog.js +62 -52
  23. package/dist/sken-dialog.js.map +1 -1
  24. package/dist/sken-filter-chip.js +1 -1
  25. package/dist/sken-filter-chip.js.map +1 -1
  26. package/dist/sken-input.js +67 -42
  27. package/dist/sken-input.js.map +1 -1
  28. package/dist/sken-layout-region.js +1 -1
  29. package/dist/sken-layout-region.js.map +1 -1
  30. package/dist/sken-layout.js +34 -31
  31. package/dist/sken-layout.js.map +1 -1
  32. package/dist/sken-nav-group.js +306 -0
  33. package/dist/sken-nav-group.js.map +1 -0
  34. package/dist/sken-nav-item.js +224 -0
  35. package/dist/sken-nav-item.js.map +1 -0
  36. package/dist/sken-nav.js +233 -0
  37. package/dist/sken-nav.js.map +1 -0
  38. package/dist/sken-number-input.js +10 -5
  39. package/dist/sken-number-input.js.map +1 -1
  40. package/dist/sken-switch.js +27 -7
  41. package/dist/sken-switch.js.map +1 -1
  42. package/dist/sken-textarea.js +107 -51
  43. package/dist/sken-textarea.js.map +1 -1
  44. package/dist/sken-tooltip.js +70 -0
  45. package/dist/sken-tooltip.js.map +1 -0
  46. package/package.json +33 -15
  47. package/dist/sken-datatable-jx_jh1Fu.js.map +0 -1
@@ -1,11 +1,11 @@
1
1
  import { n as e, t } from "./rolldown-runtime-BRfZIaNm.js";
2
- import { t as n } from "./decorate-D4FKzyDw.js";
2
+ import { t as n } from "./decorate-C1e2sg49.js";
3
3
  import { LitElement as r, css as i, html as a, noChange as o, nothing as s } from "lit";
4
4
  import { customElement as c, property as l } from "lit/decorators.js";
5
5
  import { constructTable as u, createColumnHelper as d } from "@tanstack/table-core";
6
6
  import * as f from "@tanstack/table-core/static-functions";
7
7
  import { table_publishExternalState as ee, table_setOptions as te } from "@tanstack/table-core/static-functions";
8
- //#region ../../node_modules/.pnpm/@tanstack+lit-table@9.0.0_@lit+context@1.1.6_lit@3.3.3/node_modules/@tanstack/lit-table/dist/flexRender.js
8
+ //#region ../../node_modules/.bun/@tanstack+lit-table@9.2.4+c942255c76ff9cce/node_modules/@tanstack/lit-table/dist/flexRender.js
9
9
  function p(e, t) {
10
10
  return e == null ? null : typeof e == "function" ? e(t) : e;
11
11
  }
@@ -17,7 +17,7 @@ function m(e) {
17
17
  return "header" in e && e.header ? p(e.header.column.columnDef.header, e.header.getContext()) : "footer" in e && e.footer ? p(e.footer.column.columnDef.footer, e.footer.getContext()) : null;
18
18
  }
19
19
  //#endregion
20
- //#region ../../node_modules/.pnpm/@tanstack+lit-store@0.14.0_lit@3.3.3/node_modules/@tanstack/lit-store/dist/tan-stack-store-selector.js
20
+ //#region ../../node_modules/.bun/@tanstack+lit-store@0.14.1+4cd43f0816a0c334/node_modules/@tanstack/lit-store/dist/tan-stack-store-selector.js
21
21
  function ne(e, t) {
22
22
  return e === t;
23
23
  }
@@ -55,9 +55,9 @@ var g = class {
55
55
  hostDisconnected() {
56
56
  this.#i?.(), this.#i = void 0, this.#a = void 0, this.#o = !1, this.#s = void 0;
57
57
  }
58
- }, _ = /* @__PURE__ */ function(e) {
59
- return e[e.None = 0] = "None", e[e.Mutable = 1] = "Mutable", e[e.Watching = 2] = "Watching", e[e.RecursedCheck = 4] = "RecursedCheck", e[e.Recursed = 8] = "Recursed", e[e.Dirty = 16] = "Dirty", e[e.Pending = 32] = "Pending", e;
60
- }({});
58
+ };
59
+ //#endregion
60
+ //#region ../../node_modules/.bun/@tanstack+store@0.11.1/node_modules/@tanstack/store/dist/alien.js
61
61
  /* @__NO_SIDE_EFFECTS__ */
62
62
  function re({ update: e, notify: t, unwatched: n }) {
63
63
  return {
@@ -96,7 +96,7 @@ function re({ update: e, notify: t, unwatched: n }) {
96
96
  let n = e.nextSub, r;
97
97
  top: do {
98
98
  let i = e.sub, a = i.flags;
99
- if (a & (_.RecursedCheck | _.Recursed | _.Dirty | _.Pending) ? a & (_.RecursedCheck | _.Recursed) ? a & _.RecursedCheck ? !(a & (_.Dirty | _.Pending)) && c(e, i) ? (i.flags = a | (_.Recursed | _.Pending), a &= _.Mutable) : a = _.None : i.flags = a & ~_.Recursed | _.Pending : a = _.None : i.flags = a | _.Pending, a & _.Watching && t(i), a & _.Mutable) {
99
+ if (a & 60 ? a & 12 ? a & 4 ? !(a & 48) && c(e, i) ? (i.flags = a | 40, a &= 1) : a = 0 : i.flags = a & -9 | 32 : a = 0 : i.flags = a | 32, a & 2 && t(i), a & 1) {
100
100
  let t = i.subs;
101
101
  if (t !== void 0) {
102
102
  let i = (e = t).nextSub;
@@ -122,13 +122,13 @@ function re({ update: e, notify: t, unwatched: n }) {
122
122
  let r, i = 0, a = !1;
123
123
  top: do {
124
124
  let o = t.dep, c = o.flags;
125
- if (n.flags & _.Dirty) a = !0;
126
- else if ((c & (_.Mutable | _.Dirty)) === (_.Mutable | _.Dirty)) {
125
+ if (n.flags & 16) a = !0;
126
+ else if ((c & 17) == 17) {
127
127
  if (e(o)) {
128
128
  let e = o.subs;
129
129
  e.nextSub !== void 0 && s(e), a = !0;
130
130
  }
131
- } else if ((c & (_.Mutable | _.Pending)) === (_.Mutable | _.Pending)) {
131
+ } else if ((c & 33) == 33) {
132
132
  (t.nextSub !== void 0 || t.prevSub !== void 0) && (r = {
133
133
  value: t,
134
134
  prev: r
@@ -150,7 +150,7 @@ function re({ update: e, notify: t, unwatched: n }) {
150
150
  continue;
151
151
  }
152
152
  a = !1;
153
- } else n.flags &= ~_.Pending;
153
+ } else n.flags &= -33;
154
154
  n = t.sub;
155
155
  let c = t.nextDep;
156
156
  if (c !== void 0) {
@@ -164,7 +164,7 @@ function re({ update: e, notify: t, unwatched: n }) {
164
164
  function s(e) {
165
165
  do {
166
166
  let n = e.sub, r = n.flags;
167
- (r & (_.Pending | _.Dirty)) === _.Pending && (n.flags = r | _.Dirty, (r & (_.Watching | _.RecursedCheck)) === _.Watching && t(n));
167
+ (r & 48) == 32 && (n.flags = r | 16, (r & 6) == 2 && t(n));
168
168
  } while ((e = e.nextSub) !== void 0);
169
169
  }
170
170
  function c(e, t) {
@@ -177,8 +177,8 @@ function re({ update: e, notify: t, unwatched: n }) {
177
177
  }
178
178
  }
179
179
  //#endregion
180
- //#region ../../node_modules/.pnpm/@tanstack+store@0.11.0/node_modules/@tanstack/store/dist/atom.js
181
- function v(e, t, n) {
180
+ //#region ../../node_modules/.bun/@tanstack+store@0.11.1/node_modules/@tanstack/store/dist/atom.js
181
+ function _(e, t, n) {
182
182
  let r = typeof e == "object", i = r ? e : void 0;
183
183
  return {
184
184
  next: (r ? e.next : e)?.bind(i),
@@ -186,50 +186,50 @@ function v(e, t, n) {
186
186
  complete: (r ? e.complete : n)?.bind(i)
187
187
  };
188
188
  }
189
- var y = [], b = 0, { link: x, unlink: S, propagate: C, checkDirty: w, shallowPropagate: T } = /* @__PURE__ */ re({
189
+ var v = [], y = 0, { link: b, unlink: x, propagate: ie, checkDirty: S, shallowPropagate: C } = /* @__PURE__ */ re({
190
190
  update(e) {
191
191
  return e._update();
192
192
  },
193
193
  notify(e) {
194
- y[D++] = e, e.flags &= ~_.Watching;
194
+ v[T++] = e, e.flags &= -3;
195
195
  },
196
196
  unwatched(e) {
197
- e.depsTail !== void 0 && (e.depsTail = void 0, e.flags = _.Mutable | _.Dirty, A(e));
197
+ e.depsTail !== void 0 && (e.depsTail = void 0, e.flags = 17, O(e));
198
198
  }
199
- }), E = 0, D = 0, O, k = 0;
200
- function ie(e) {
199
+ }), w = 0, T = 0, E, D = 0;
200
+ function ae(e) {
201
201
  try {
202
- ++k, e();
202
+ ++D, e();
203
203
  } finally {
204
- --k || j();
204
+ --D || k();
205
205
  }
206
206
  }
207
- function A(e) {
207
+ function O(e) {
208
208
  let t = e.depsTail, n = t === void 0 ? e.deps : t.nextDep;
209
- for (; n !== void 0;) n = S(n, e);
209
+ for (; n !== void 0;) n = x(n, e);
210
210
  }
211
- function j() {
212
- if (!(k > 0)) {
213
- for (; E < D;) {
214
- let e = y[E];
215
- y[E++] = void 0, e.notify();
211
+ function k() {
212
+ if (!(D > 0)) {
213
+ for (; w < T;) {
214
+ let e = v[w];
215
+ v[w++] = void 0, e.notify();
216
216
  }
217
- E = 0, D = 0;
217
+ w = 0, T = 0;
218
218
  }
219
219
  }
220
- function M(e, t) {
220
+ function A(e, t) {
221
221
  let n = typeof e == "function", r = e, i = {
222
222
  _snapshot: n ? void 0 : e,
223
223
  subs: void 0,
224
224
  subsTail: void 0,
225
225
  deps: void 0,
226
226
  depsTail: void 0,
227
- flags: n ? _.None : _.Mutable,
227
+ flags: +!n,
228
228
  get() {
229
- return O !== void 0 && x(i, O, b), i._snapshot;
229
+ return E !== void 0 && b(i, E, y), i._snapshot;
230
230
  },
231
231
  subscribe(e) {
232
- let t = v(e), n = { current: !1 }, r = N(() => {
232
+ let t = _(e), n = { current: !1 }, r = j(() => {
233
233
  i.get(), n.current ? t.next?.(i._snapshot) : n.current = !0;
234
234
  });
235
235
  return { unsubscribe: () => {
@@ -237,62 +237,62 @@ function M(e, t) {
237
237
  } };
238
238
  },
239
239
  _update(e) {
240
- let a = O, o = t?.compare ?? Object.is;
241
- if (n) O = i, ++b, i.depsTail = void 0;
240
+ let a = E, o = t?.compare ?? Object.is;
241
+ if (n) E = i, ++y, i.depsTail = void 0;
242
242
  else if (e === void 0) return !1;
243
- n && (i.flags = _.Mutable | _.RecursedCheck);
243
+ n && (i.flags = 5);
244
244
  try {
245
245
  let t = i._snapshot, a = typeof e == "function" ? e(t) : e === void 0 && n ? r(t) : e;
246
246
  return t === void 0 || !o(t, a) ? (i._snapshot = a, !0) : !1;
247
247
  } finally {
248
- O = a, n && (i.flags &= ~_.RecursedCheck), A(i);
248
+ E = a, n && (i.flags &= -5), O(i);
249
249
  }
250
250
  }
251
251
  };
252
- return n ? (i.flags = _.Mutable | _.Dirty, i.get = function() {
252
+ return n ? (i.flags = 17, i.get = function() {
253
253
  let e = i.flags;
254
- if (e & _.Dirty || e & _.Pending && w(i.deps, i)) {
254
+ if (e & 16 || e & 32 && S(i.deps, i)) {
255
255
  if (i._update()) {
256
256
  let e = i.subs;
257
- e !== void 0 && T(e);
257
+ e !== void 0 && C(e);
258
258
  }
259
- } else e & _.Pending && (i.flags = e & ~_.Pending);
260
- return O !== void 0 && x(i, O, b), i._snapshot;
259
+ } else e & 32 && (i.flags = e & -33);
260
+ return E !== void 0 && b(i, E, y), i._snapshot;
261
261
  }) : i.set = function(e) {
262
262
  if (i._update(e)) {
263
263
  let e = i.subs;
264
- e !== void 0 && (C(e), T(e), j());
264
+ e !== void 0 && (ie(e), C(e), k());
265
265
  }
266
266
  }, i;
267
267
  }
268
- function N(e) {
268
+ function j(e) {
269
269
  let t = () => {
270
- let t = O;
271
- O = n, ++b, n.depsTail = void 0, n.flags = _.Watching | _.RecursedCheck;
270
+ let t = E;
271
+ E = n, ++y, n.depsTail = void 0, n.flags = 6;
272
272
  try {
273
273
  return e();
274
274
  } finally {
275
- O = t, n.flags &= ~_.RecursedCheck, A(n);
275
+ E = t, n.flags &= -5, O(n);
276
276
  }
277
277
  }, n = {
278
278
  deps: void 0,
279
279
  depsTail: void 0,
280
280
  subs: void 0,
281
281
  subsTail: void 0,
282
- flags: _.Watching | _.RecursedCheck,
282
+ flags: 6,
283
283
  notify() {
284
284
  let e = this.flags;
285
- e & _.Dirty || e & _.Pending && w(this.deps, this) ? t() : this.flags = _.Watching;
285
+ e & 16 || e & 32 && S(this.deps, this) ? t() : this.flags = 2;
286
286
  },
287
287
  stop() {
288
- this.flags = _.None, this.depsTail = void 0, A(this);
288
+ this.flags = 0, this.depsTail = void 0, O(this);
289
289
  }
290
290
  };
291
291
  return t(), n;
292
292
  }
293
293
  //#endregion
294
- //#region ../../node_modules/.pnpm/@tanstack+store@0.11.0/node_modules/@tanstack/store/dist/shallow.js
295
- function P(e, t) {
294
+ //#region ../../node_modules/.bun/@tanstack+store@0.11.1/node_modules/@tanstack/store/dist/shallow.js
295
+ function M(e, t) {
296
296
  if (Object.is(e, t)) return !0;
297
297
  if (typeof e != "object" || !e || typeof t != "object" || !t) return !1;
298
298
  if (e instanceof Map && t instanceof Map) {
@@ -306,22 +306,22 @@ function P(e, t) {
306
306
  return !0;
307
307
  }
308
308
  if (e instanceof Date && t instanceof Date) return e.getTime() === t.getTime();
309
- let n = F(e);
310
- if (n.length !== F(t).length) return !1;
309
+ let n = N(e);
310
+ if (n.length !== N(t).length) return !1;
311
311
  for (let r = 0; r < n.length; r++) if (!Object.prototype.hasOwnProperty.call(t, n[r]) || !Object.is(e[n[r]], t[n[r]])) return !1;
312
312
  return !0;
313
313
  }
314
- function F(e) {
314
+ function N(e) {
315
315
  return Object.keys(e).concat(Object.getOwnPropertySymbols(e));
316
316
  }
317
317
  //#endregion
318
- //#region ../../node_modules/.pnpm/lit@3.3.3/node_modules/lit/async-directive.js
319
- var I = /* @__PURE__ */ t({});
320
- import * as ae from "lit-html/async-directive.js";
321
- e(I, ae);
318
+ //#region ../../node_modules/.bun/lit@3.3.3/node_modules/lit/async-directive.js
319
+ var P = /* @__PURE__ */ t({});
320
+ import * as oe from "lit-html/async-directive.js";
321
+ e(P, oe);
322
322
  //#endregion
323
- //#region ../../node_modules/.pnpm/@tanstack+lit-table@9.0.0_@lit+context@1.1.6_lit@3.3.3/node_modules/@tanstack/lit-table/dist/subscribe-directive.js
324
- var oe = (e) => e, L = class extends I.AsyncDirective {
323
+ //#region ../../node_modules/.bun/@tanstack+lit-table@9.2.4+c942255c76ff9cce/node_modules/@tanstack/lit-table/dist/subscribe-directive.js
324
+ var se = (e) => e, F = class extends P.AsyncDirective {
325
325
  controller;
326
326
  latestSource;
327
327
  latestSelector;
@@ -331,7 +331,7 @@ var oe = (e) => e, L = class extends I.AsyncDirective {
331
331
  return o;
332
332
  }
333
333
  update(e, t) {
334
- let [n, r, i] = t, a = i === void 0, o = a ? oe : r, s = a ? r : i, c = this.latestSource !== n, l = this.latestSelector !== o, u = !this.initialized || c || l;
334
+ let [n, r, i] = t, a = i === void 0, o = a ? se : r, s = a ? r : i, c = this.latestSource !== n, l = this.latestSelector !== o, u = !this.initialized || c || l;
335
335
  return this.resolvedTemplate = s, u && (this.initialized && (this.controller?.hostDisconnected(), this.controller = void 0), this.latestSource = n, this.latestSelector = o, this.controller ||= new g(this.createFakeHost(), () => this.latestSource, (e) => this.latestSelector?.(e)), this.controller.hostUpdate(), this.initialized = !0), this.resolvedTemplate?.(this.latestSelector(this.latestSource.get()));
336
336
  }
337
337
  disconnected() {
@@ -352,10 +352,10 @@ var oe = (e) => e, L = class extends I.AsyncDirective {
352
352
  }
353
353
  };
354
354
  }
355
- }, R = (0, I.directive)(L);
355
+ }, I = (0, P.directive)(F);
356
356
  //#endregion
357
- //#region ../../node_modules/.pnpm/@tanstack+table-core@9.0.0/node_modules/@tanstack/table-core/dist/core/reactivity/renderPhaseReactivity.js
358
- function z(e) {
357
+ //#region ../../node_modules/.bun/@tanstack+table-core@9.2.4/node_modules/@tanstack/table-core/dist/core/reactivity/renderPhaseReactivity.js
358
+ function L(e) {
359
359
  let { createAtom: t, batch: n } = e, r = t(0);
360
360
  return {
361
361
  createOptionsStore: !1,
@@ -385,7 +385,7 @@ function z(e) {
385
385
  }
386
386
  };
387
387
  }
388
- function B(e, t = Object.is) {
388
+ function R(e, t = Object.is) {
389
389
  let n = !1, r;
390
390
  return {
391
391
  get: e.get,
@@ -398,16 +398,16 @@ function B(e, t = Object.is) {
398
398
  };
399
399
  }
400
400
  //#endregion
401
- //#region ../../node_modules/.pnpm/@tanstack+lit-table@9.0.0_@lit+context@1.1.6_lit@3.3.3/node_modules/@tanstack/lit-table/dist/reactivity.js
402
- function V() {
403
- return z({
404
- createAtom: M,
405
- batch: ie
401
+ //#region ../../node_modules/.bun/@tanstack+lit-table@9.2.4+c942255c76ff9cce/node_modules/@tanstack/lit-table/dist/reactivity.js
402
+ function z() {
403
+ return L({
404
+ createAtom: A,
405
+ batch: ae
406
406
  });
407
407
  }
408
408
  //#endregion
409
- //#region ../../node_modules/.pnpm/@tanstack+lit-table@9.0.0_@lit+context@1.1.6_lit@3.3.3/node_modules/@tanstack/lit-table/dist/TableController.js
410
- var H = class {
409
+ //#region ../../node_modules/.bun/@tanstack+lit-table@9.2.4+c942255c76ff9cce/node_modules/@tanstack/lit-table/dist/TableController.js
410
+ var B = class {
411
411
  host;
412
412
  _table = null;
413
413
  _rootSource;
@@ -425,7 +425,7 @@ var H = class {
425
425
  let t = {
426
426
  ...e,
427
427
  features: {
428
- coreReactivityFeature: V(),
428
+ coreReactivityFeature: z(),
429
429
  ...e.features
430
430
  },
431
431
  mergeOptions: (e, t) => ({
@@ -433,7 +433,7 @@ var H = class {
433
433
  ...t
434
434
  })
435
435
  };
436
- this._table = u(t), this._rootSource = B(this._table.store, P), this._setupSubscriptions();
436
+ this._table = u(t), this._rootSource = R(this._table.store, M), this._setupSubscriptions();
437
437
  }
438
438
  te(this._table, (t) => ({
439
439
  ...t,
@@ -442,7 +442,7 @@ var H = class {
442
442
  let n = this._rootSource.get();
443
443
  return this._capturedSnapshot = n, this._hasSelector = t !== void 0, this._latestSelector = t, this._lastSelected = t ? t(n) : n, {
444
444
  ...this._table,
445
- subscribe: R,
445
+ subscribe: I,
446
446
  FlexRender: m,
447
447
  get state() {
448
448
  return t?.(n) ?? n;
@@ -453,7 +453,7 @@ var H = class {
453
453
  this._table && !this._storeSubscription && (this._storeSubscription = this._rootSource.subscribe((e) => {
454
454
  if (this._hasSelector) {
455
455
  let t = this._latestSelector(e);
456
- if (P(this._lastSelected, t)) return;
456
+ if (M(this._lastSelected, t)) return;
457
457
  this._lastSelected = t;
458
458
  }
459
459
  this.host.requestUpdate();
@@ -463,12 +463,12 @@ var H = class {
463
463
  this._setupSubscriptions(), this._table && this.host.requestUpdate();
464
464
  }
465
465
  hostUpdated() {
466
- this._table && (this._rootSource.markCommitted(this._capturedSnapshot), ee(this._table, this._capturedState ?? null, P));
466
+ this._table && (this._rootSource.markCommitted(this._capturedSnapshot), ee(this._table, this._capturedState ?? null, M));
467
467
  }
468
468
  hostDisconnected() {
469
469
  this._storeSubscription?.unsubscribe(), this._storeSubscription = void 0;
470
470
  }
471
- }, U = class extends Event {
471
+ }, V = class extends Event {
472
472
  constructor(e, t, n, r) {
473
473
  super("context-request", {
474
474
  bubbles: !0,
@@ -477,13 +477,13 @@ var H = class {
477
477
  }
478
478
  };
479
479
  //#endregion
480
- //#region ../../node_modules/.pnpm/@lit+context@1.1.6/node_modules/@lit/context/lib/create-context.js
481
- function W(e) {
480
+ //#region ../../node_modules/.bun/@lit+context@1.1.6/node_modules/@lit/context/lib/create-context.js
481
+ function H(e) {
482
482
  return e;
483
483
  }
484
484
  //#endregion
485
- //#region ../../node_modules/.pnpm/@lit+context@1.1.6/node_modules/@lit/context/lib/controllers/context-consumer.js
486
- var G = class {
485
+ //#region ../../node_modules/.bun/@lit+context@1.1.6/node_modules/@lit/context/lib/controllers/context-consumer.js
486
+ var U = class {
487
487
  constructor(e, t, n, r) {
488
488
  if (this.subscribe = !1, this.provided = !1, this.value = void 0, this.t = (e, t) => {
489
489
  this.unsubscribe && (this.unsubscribe !== t && (this.provided = !1, this.unsubscribe()), this.subscribe || this.unsubscribe()), this.value = e, this.host.requestUpdate(), this.provided && !this.subscribe || (this.provided = !0, this.callback && this.callback(e, t)), this.unsubscribe = t;
@@ -500,9 +500,9 @@ var G = class {
500
500
  this.unsubscribe &&= (this.unsubscribe(), void 0);
501
501
  }
502
502
  dispatchRequest() {
503
- this.host.dispatchEvent(new U(this.context, this.host, this.t, this.subscribe));
503
+ this.host.dispatchEvent(new V(this.context, this.host, this.t, this.subscribe));
504
504
  }
505
- }, K = class {
505
+ }, W = class {
506
506
  get value() {
507
507
  return this.o;
508
508
  }
@@ -532,14 +532,14 @@ var G = class {
532
532
  clearCallbacks() {
533
533
  this.subscriptions.clear();
534
534
  }
535
- }, se = class extends Event {
535
+ }, G = class extends Event {
536
536
  constructor(e, t) {
537
537
  super("context-provider", {
538
538
  bubbles: !0,
539
539
  composed: !0
540
540
  }), this.context = e, this.contextTarget = t;
541
541
  }
542
- }, ce = class extends K {
542
+ }, ce = class extends W {
543
543
  constructor(e, t, n) {
544
544
  super(t.context === void 0 ? n : t.initialValue), this.onContextRequest = (e) => {
545
545
  if (e.context !== this.context) return;
@@ -548,7 +548,7 @@ var G = class {
548
548
  }, this.onProviderRequest = (e) => {
549
549
  if (e.context !== this.context || (e.contextTarget ?? e.composedPath()[0]) === this.host) return;
550
550
  let t = /* @__PURE__ */ new Set();
551
- for (let [e, { consumerHost: n }] of this.subscriptions) t.has(e) || (t.add(e), n.dispatchEvent(new U(this.context, n, e, !0)));
551
+ for (let [e, { consumerHost: n }] of this.subscriptions) t.has(e) || (t.add(e), n.dispatchEvent(new V(this.context, n, e, !0)));
552
552
  e.stopPropagation();
553
553
  }, this.host = e, this.context = t.context === void 0 ? t : t.context, this.attachListeners(), this.host.addController?.(this);
554
554
  }
@@ -556,36 +556,36 @@ var G = class {
556
556
  this.host.addEventListener("context-request", this.onContextRequest), this.host.addEventListener("context-provider", this.onProviderRequest);
557
557
  }
558
558
  hostConnected() {
559
- this.host.dispatchEvent(new se(this.context, this.host));
559
+ this.host.dispatchEvent(new G(this.context, this.host));
560
560
  }
561
561
  };
562
562
  //#endregion
563
- //#region ../../node_modules/.pnpm/@tanstack+lit-table@9.0.0_@lit+context@1.1.6_lit@3.3.3/node_modules/@tanstack/lit-table/dist/createTableHook.js
563
+ //#region ../../node_modules/.bun/@tanstack+lit-table@9.2.4+c942255c76ff9cce/node_modules/@tanstack/lit-table/dist/createTableHook.js
564
564
  function le({ tableComponents: e, cellComponents: t, headerComponents: n, ...r }) {
565
- let i = W(Symbol("tanstack-table")), a = W(Symbol("tanstack-cell")), o = W(Symbol("tanstack-header"));
565
+ let i = H(Symbol("tanstack-table")), a = H(Symbol("tanstack-cell")), o = H(Symbol("tanstack-header"));
566
566
  function s() {
567
567
  return d();
568
568
  }
569
569
  function c(e) {
570
- return new G(e, {
570
+ return new U(e, {
571
571
  context: i,
572
572
  subscribe: !0
573
573
  });
574
574
  }
575
575
  function l(e) {
576
- return new G(e, {
576
+ return new U(e, {
577
577
  context: a,
578
578
  subscribe: !0
579
579
  });
580
580
  }
581
581
  function u(e) {
582
- return new G(e, {
582
+ return new U(e, {
583
583
  context: o,
584
584
  subscribe: !0
585
585
  });
586
586
  }
587
587
  function f(a, o, s) {
588
- let c = new H(a), l = new ce(a, { context: i });
588
+ let c = new B(a), l = new ce(a, { context: i });
589
589
  return { table() {
590
590
  let i = {
591
591
  ...r,
@@ -635,20 +635,20 @@ function le({ tableComponents: e, cellComponents: t, headerComponents: n, ...r }
635
635
  };
636
636
  }
637
637
  //#endregion
638
- //#region ../../node_modules/.pnpm/@tanstack+lit-table@9.0.0_@lit+context@1.1.6_lit@3.3.3/node_modules/@tanstack/lit-table/dist/index.js
639
- var q = /* @__PURE__ */ t({
638
+ //#region ../../node_modules/.bun/@tanstack+lit-table@9.2.4+c942255c76ff9cce/node_modules/@tanstack/lit-table/dist/index.js
639
+ var K = /* @__PURE__ */ t({
640
640
  FlexRender: () => m,
641
- SubscribeDirective: () => L,
642
- TableController: () => H,
641
+ SubscribeDirective: () => F,
642
+ TableController: () => B,
643
643
  createTableHook: () => le,
644
644
  flexRender: () => p,
645
- subscribe: () => R
645
+ subscribe: () => I
646
646
  });
647
647
  import * as ue from "@tanstack/table-core";
648
- e(q, ue);
648
+ e(K, ue);
649
649
  //#endregion
650
- //#region ../../node_modules/.pnpm/@tanstack+match-sorter-utils@9.0.0/node_modules/@tanstack/match-sorter-utils/dist/remove-accents.js
651
- var J = {
650
+ //#region ../../node_modules/.bun/@tanstack+match-sorter-utils@9.1.2/node_modules/@tanstack/match-sorter-utils/dist/remove-accents.js
651
+ var q = {
652
652
  À: "A",
653
653
  Á: "A",
654
654
  Â: "A",
@@ -1048,13 +1048,13 @@ var J = {
1048
1048
  x̧: "x",
1049
1049
  Z̧: "Z",
1050
1050
  z̧: "z"
1051
- }, de = Object.keys(J).join("|"), fe = new RegExp(de, "g");
1051
+ }, de = Object.keys(q).join("|"), fe = new RegExp(de, "g");
1052
1052
  function pe(e) {
1053
- return e.replace(fe, (e) => J[e]);
1053
+ return e.replace(fe, (e) => q[e]);
1054
1054
  }
1055
1055
  //#endregion
1056
- //#region ../../node_modules/.pnpm/@tanstack+match-sorter-utils@9.0.0/node_modules/@tanstack/match-sorter-utils/dist/index.js
1057
- var Y = {
1056
+ //#region ../../node_modules/.bun/@tanstack+match-sorter-utils@9.1.2/node_modules/@tanstack/match-sorter-utils/dist/index.js
1057
+ var J = {
1058
1058
  CASE_SENSITIVE_EQUAL: 7,
1059
1059
  EQUAL: 6,
1060
1060
  STARTS_WITH: 5,
@@ -1065,8 +1065,8 @@ var Y = {
1065
1065
  NO_MATCH: 0
1066
1066
  };
1067
1067
  function me(e, t, n) {
1068
- if (n ||= {}, n.threshold = n.threshold ?? Y.MATCHES, !n.accessors) {
1069
- let r = X(e, t, n);
1068
+ if (n ||= {}, n.threshold = n.threshold ?? J.MATCHES, !n.accessors) {
1069
+ let r = Y(e, t, n);
1070
1070
  return {
1071
1071
  rankedValue: e,
1072
1072
  rank: r,
@@ -1075,23 +1075,23 @@ function me(e, t, n) {
1075
1075
  passed: r >= n.threshold
1076
1076
  };
1077
1077
  }
1078
- let r = ve(e, n.accessors), i = {
1078
+ let r = _e(e, n.accessors), i = {
1079
1079
  rankedValue: e,
1080
- rank: Y.NO_MATCH,
1080
+ rank: J.NO_MATCH,
1081
1081
  accessorIndex: -1,
1082
1082
  accessorThreshold: n.threshold,
1083
1083
  passed: !1
1084
1084
  };
1085
1085
  for (let e = 0; e < r.length; e++) {
1086
- let a = r[e], o = X(a.itemValue, t, n), { minRanking: s, maxRanking: c, threshold: l = n.threshold } = a.attributes;
1087
- o < s && o >= Y.MATCHES ? o = s : o > c && (o = c), o = Math.min(o, c), o >= l && o > i.rank && (i.rank = o, i.passed = !0, i.accessorIndex = e, i.accessorThreshold = l, i.rankedValue = a.itemValue);
1086
+ let a = r[e], o = Y(a.itemValue, t, n), { minRanking: s, maxRanking: c, threshold: l = n.threshold } = a.attributes;
1087
+ o < s && o >= J.MATCHES ? o = s : o > c && (o = c), o = Math.min(o, c), o >= l && o > i.rank && (i.rank = o, i.passed = !0, i.accessorIndex = e, i.accessorThreshold = l, i.rankedValue = a.itemValue);
1088
1088
  }
1089
1089
  return i;
1090
1090
  }
1091
- function X(e, t, n) {
1092
- return e = Z(e, n), t = Z(t, n), t.length > e.length ? Y.NO_MATCH : e === t ? Y.CASE_SENSITIVE_EQUAL : (e = e.toLowerCase(), t = t.toLowerCase(), e === t ? Y.EQUAL : e.startsWith(t) ? Y.STARTS_WITH : e.includes(` ${t}`) ? Y.WORD_STARTS_WITH : e.includes(t) ? Y.CONTAINS : t.length === 1 ? Y.NO_MATCH : he(e).includes(t) ? Y.ACRONYM : ge(e, t));
1091
+ function Y(e, t, n) {
1092
+ return e = Z(e, n), t = Z(t, n), t.length > e.length ? J.NO_MATCH : e === t ? J.CASE_SENSITIVE_EQUAL : (e = e.toLowerCase(), t = t.toLowerCase(), e === t ? J.EQUAL : e.startsWith(t) ? J.STARTS_WITH : e.includes(` ${t}`) ? J.WORD_STARTS_WITH : e.includes(t) ? J.CONTAINS : t.length === 1 ? J.NO_MATCH : X(e).includes(t) ? J.ACRONYM : he(e, t));
1093
1093
  }
1094
- function he(e) {
1094
+ function X(e) {
1095
1095
  let t = "";
1096
1096
  return e.split(" ").forEach((e) => {
1097
1097
  e.split("-").forEach((e) => {
@@ -1099,7 +1099,7 @@ function he(e) {
1099
1099
  });
1100
1100
  }), t;
1101
1101
  }
1102
- function ge(e, t) {
1102
+ function he(e, t) {
1103
1103
  let n = 0, r = 0;
1104
1104
  function i(e, t, r) {
1105
1105
  for (let i = r, a = t.length; i < a; i++) if (t[i] === e) return n += 1, i + 1;
@@ -1107,30 +1107,30 @@ function ge(e, t) {
1107
1107
  }
1108
1108
  function a(e) {
1109
1109
  let r = 1 / e, i = n / t.length;
1110
- return Y.MATCHES + i * r;
1110
+ return J.MATCHES + i * r;
1111
1111
  }
1112
1112
  let o = i(t[0], e, 0);
1113
- if (o < 0) return Y.NO_MATCH;
1113
+ if (o < 0) return J.NO_MATCH;
1114
1114
  r = o;
1115
1115
  for (let n = 1, a = t.length; n < a; n++) {
1116
1116
  let a = t[n];
1117
- if (r = i(a, e, r), !(r > -1)) return Y.NO_MATCH;
1117
+ if (r = i(a, e, r), !(r > -1)) return J.NO_MATCH;
1118
1118
  }
1119
1119
  return a(r - o);
1120
1120
  }
1121
1121
  function Z(e, { keepDiacritics: t }) {
1122
1122
  return e = `${e}`, t || (e = pe(e)), e;
1123
1123
  }
1124
- function _e(e, t) {
1124
+ function ge(e, t) {
1125
1125
  let n = t;
1126
1126
  typeof t == "object" && (n = t.accessor);
1127
1127
  let r = n(e);
1128
1128
  return r == null ? [] : Array.isArray(r) ? r : [String(r)];
1129
1129
  }
1130
- function ve(e, t) {
1130
+ function _e(e, t) {
1131
1131
  let n = [];
1132
1132
  for (let r = 0, i = t.length; r < i; r++) {
1133
- let i = t[r], a = ye(i), o = _e(e, i);
1133
+ let i = t[r], a = ve(i), o = ge(e, i);
1134
1134
  for (let e = 0, t = o.length; e < t; e++) n.push({
1135
1135
  itemValue: o[e],
1136
1136
  attributes: a
@@ -1142,7 +1142,7 @@ var Q = {
1142
1142
  maxRanking: Infinity,
1143
1143
  minRanking: -Infinity
1144
1144
  };
1145
- function ye(e) {
1145
+ function ve(e) {
1146
1146
  return typeof e == "function" ? Q : {
1147
1147
  ...Q,
1148
1148
  ...e
@@ -1155,14 +1155,14 @@ var $ = class extends r {
1155
1155
  super(...e), this.rows = [], this.columns = [], this.getRowId = void 0, this.loading = !1, this.empty = void 0, this.sorting = void 0, this.globalFilter = void 0, this.filterPlaceholder = "Filter…", this.pagination = void 0, this.defaultPageSize = 10, this.#e = [], this.#t = "", this.#n = {
1156
1156
  pageIndex: 0,
1157
1157
  pageSize: 10
1158
- }, this.#r = (0, q.tableFeatures)({
1159
- rowSortingFeature: q.rowSortingFeature,
1160
- sortedRowModel: (0, q.createSortedRowModel)(),
1161
- columnFilteringFeature: q.columnFilteringFeature,
1162
- filteredRowModel: (0, q.createFilteredRowModel)(),
1163
- globalFilteringFeature: q.globalFilteringFeature,
1164
- rowPaginationFeature: q.rowPaginationFeature,
1165
- paginatedRowModel: (0, q.createPaginatedRowModel)()
1158
+ }, this.#r = (0, K.tableFeatures)({
1159
+ rowSortingFeature: K.rowSortingFeature,
1160
+ sortedRowModel: (0, K.createSortedRowModel)(),
1161
+ columnFilteringFeature: K.columnFilteringFeature,
1162
+ filteredRowModel: (0, K.createFilteredRowModel)(),
1163
+ globalFilteringFeature: K.globalFilteringFeature,
1164
+ rowPaginationFeature: K.rowPaginationFeature,
1165
+ paginatedRowModel: (0, K.createPaginatedRowModel)()
1166
1166
  }), this.#i = void 0, this.#o = (e, t, n) => me(Object.values(e.original ?? {}).map((e) => e == null ? "" : String(e)).join(" "), String(n ?? "")).passed;
1167
1167
  }
1168
1168
  #e;
@@ -1171,7 +1171,7 @@ var $ = class extends r {
1171
1171
  #r;
1172
1172
  #i;
1173
1173
  #a() {
1174
- return this.#i === void 0 && (this.#i = new H(this)), this.#i;
1174
+ return this.#i === void 0 && (this.#i = new B(this)), this.#i;
1175
1175
  }
1176
1176
  #o;
1177
1177
  #s() {
@@ -1191,7 +1191,17 @@ var $ = class extends r {
1191
1191
  `;
1192
1192
  if (this.rows.length === 0) return this.#c();
1193
1193
  let e = {}, t = {};
1194
- this.sorting !== void 0 && this.sorting.length > 0 && (e.sorting = this.sorting, t.sorting = this.sorting), this.globalFilter !== void 0 && (e.globalFilter = this.globalFilter, t.globalFilter = this.globalFilter), this.pagination === void 0 ? t.pagination = this.#n : (e.pagination = this.pagination, t.pagination = this.pagination);
1194
+ if (this.sorting !== void 0 && this.sorting.length > 0) e.sorting = this.sorting, t.sorting = this.sorting;
1195
+ else {
1196
+ let n = this.#e;
1197
+ n.length > 0 && (e.sorting = n, t.sorting = n);
1198
+ }
1199
+ if (this.globalFilter !== void 0) e.globalFilter = this.globalFilter, t.globalFilter = this.globalFilter;
1200
+ else {
1201
+ let n = this.#t;
1202
+ e.globalFilter = n, t.globalFilter = n;
1203
+ }
1204
+ this.pagination === void 0 ? t.pagination = this.#n : (e.pagination = this.pagination, t.pagination = this.pagination);
1195
1205
  let n = this.#a().table({
1196
1206
  data: this.rows,
1197
1207
  columns: this.columns,
@@ -1257,8 +1267,13 @@ var $ = class extends r {
1257
1267
  part="header-cell"
1258
1268
  data-column-id=${e.column.id}
1259
1269
  class=${r ? "sortable" : ""}
1270
+ role=${r ? "button" : s}
1271
+ tabindex=${r ? "0" : s}
1260
1272
  aria-sort=${i === "asc" ? "ascending" : i === "desc" ? "descending" : "none"}
1261
1273
  @click=${r && c ? c : null}
1274
+ @keydown=${r && c ? (e) => {
1275
+ (e.key === "Enter" || e.key === " ") && (e.preventDefault(), c(e));
1276
+ } : null}
1262
1277
  >
1263
1278
  <span class="header-text">${n}</span>
1264
1279
  ${r ? a`<span
@@ -1373,6 +1388,19 @@ var $ = class extends r {
1373
1388
  background: var(--sken-muted);
1374
1389
  }
1375
1390
 
1391
+ /* Keyboard focus indicator. Use :focus-visible (not :focus) so
1392
+ * the outline only appears for keyboard navigation, not for
1393
+ * mouse clicks. Matches the WAI-ARIA Authoring Practices
1394
+ * recommendation for sortable column headers. The outline
1395
+ * uses the brand token so it is consistent with the rest of
1396
+ * the design system; outline-offset keeps it off the cell
1397
+ * border so it stays legible against the header background.
1398
+ */
1399
+ th.sortable:focus-visible {
1400
+ outline: 2px solid var(--sken-primary);
1401
+ outline-offset: -2px;
1402
+ }
1403
+
1376
1404
  th .header-text {
1377
1405
  margin-inline-end: 0.25rem;
1378
1406
  }
@@ -1498,4 +1526,4 @@ n([l({ attribute: !1 })], $.prototype, "rows", void 0), n([l({ attribute: !1 })]
1498
1526
  //#endregion
1499
1527
  export { $ as t };
1500
1528
 
1501
- //# sourceMappingURL=sken-datatable-jx_jh1Fu.js.map
1529
+ //# sourceMappingURL=sken-datatable-DSXSyrNf.js.map