@sylwellsoftware/fray 0.1.0-alpha.1 → 0.2.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 (44) hide show
  1. package/README.md +246 -11
  2. package/colors/README.md +15 -0
  3. package/colors/gray/colors.css +29 -0
  4. package/colors/green/colors.css +29 -0
  5. package/colors/iceblue/colors.css +29 -0
  6. package/colors/ocean/colors.css +29 -0
  7. package/colors/orange/colors.css +29 -0
  8. package/colors/purple/colors.css +29 -0
  9. package/colors/red/colors.css +29 -0
  10. package/colors/yellow/colors.css +29 -0
  11. package/dist/Components/data/table/DataTable.d.ts.map +1 -1
  12. package/dist/Components/data/table/TableHeaderCell.d.ts.map +1 -1
  13. package/dist/Components/dialog/dialog.d.ts.map +1 -1
  14. package/dist/Components/layout/panel.d.ts.map +1 -1
  15. package/dist/Components/layout/tabpanel/tabline.d.ts.map +1 -1
  16. package/dist/Components/lineinputs/checkbox/Checkbox.d.ts.map +1 -1
  17. package/dist/Components/lineinputs/toggle.d.ts.map +1 -1
  18. package/dist/Components/status/progressBar.d.ts.map +1 -1
  19. package/dist/Components/theme/stylesheetPicker.d.ts +40 -0
  20. package/dist/Components/theme/stylesheetPicker.d.ts.map +1 -0
  21. package/dist/{button-BRDkmR1C.js → button-CqDGmkBt.js} +87 -78
  22. package/dist/{button-BRDkmR1C.js.map → button-CqDGmkBt.js.map} +1 -1
  23. package/dist/experimental.js +104 -66
  24. package/dist/experimental.js.map +1 -1
  25. package/dist/index.d.ts +2 -0
  26. package/dist/index.d.ts.map +1 -1
  27. package/dist/index.js +801 -503
  28. package/dist/index.js.map +1 -1
  29. package/dist/{jsx-dev-runtime-CarwHDyL.js → jsx-dev-runtime-DukiDpV9.js} +202 -214
  30. package/dist/jsx-dev-runtime-DukiDpV9.js.map +1 -0
  31. package/dist/jsx-dev-runtime.js +1 -1
  32. package/dist/jsx-runtime.js +1 -1
  33. package/dist/styling/baseStyleDefinitions.d.ts +3 -0
  34. package/dist/styling/baseStyleDefinitions.d.ts.map +1 -1
  35. package/dist/styling/styleRegistry.d.ts.map +1 -1
  36. package/dist/styling/theme.d.ts +27 -0
  37. package/dist/styling/theme.d.ts.map +1 -0
  38. package/package.json +13 -5
  39. package/styles/structural.css +916 -0
  40. package/themes/README.md +84 -30
  41. package/themes/java/theme.css +140 -0
  42. package/themes/minimal/theme.css +128 -0
  43. package/themes/shiny/theme.css +314 -0
  44. package/dist/jsx-dev-runtime-CarwHDyL.js.map +0 -1
@@ -1,10 +1,10 @@
1
1
  var ie = Object.defineProperty;
2
2
  var ne = (t, r, e) => r in t ? ie(t, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[r] = e;
3
3
  var o = (t, r, e) => ne(t, typeof r != "symbol" ? r + "" : r, e);
4
- import { C as b, j as c, c as x, a as w, i as U } from "./jsx-dev-runtime-CarwHDyL.js";
5
- import { Emitter as y, FetchState as m, DerivedEmitter as oe, QueryArg as V, LiveQuery as ae, RestQueryHandler as le } from "@sylwellsoftware/glue";
6
- import { c as I, C as F, F as K, i as W, a as de, b as ce, B as Q } from "./button-BRDkmR1C.js";
7
- class E extends b {
4
+ import { C as w, j as c, c as x, a as b, i as U } from "./jsx-dev-runtime-DukiDpV9.js";
5
+ import { Emitter as g, FetchState as m, DerivedEmitter as oe, QueryArg as V, LiveQuery as ae, RestQueryHandler as le } from "@sylwellsoftware/glue";
6
+ import { c as I, C as F, F as K, i as W, a as de, b as ce, B as Q } from "./button-CqDGmkBt.js";
7
+ class E extends w {
8
8
  render() {
9
9
  const r = he(this.props.width ?? 65), e = this.Host;
10
10
  return /* @__PURE__ */ c(e, { style: { width: `${r}%` }, "aria-hidden": "true" });
@@ -62,7 +62,7 @@ class J {
62
62
  throw new TypeError("Selection handler getItems must be a function");
63
63
  if (typeof e != "function")
64
64
  throw new TypeError("Selection handler getKey must be a function");
65
- this.getItems = r, this.getKey = e, this.ownedSelectedItemsEmitter = s == null ? new y([], { owner: i, purpose: "selected items" }) : null, this.selectedItemsEmitter = s ?? this.ownedSelectedItemsEmitter, this.selectedItems$ = this.selectedItemsEmitter, this.ownsSelectedItemsEmitter = this.ownedSelectedItemsEmitter != null;
65
+ this.getItems = r, this.getKey = e, this.ownedSelectedItemsEmitter = s == null ? new g([], { owner: i, purpose: "selected items" }) : null, this.selectedItemsEmitter = s ?? this.ownedSelectedItemsEmitter, this.selectedItems$ = this.selectedItemsEmitter, this.ownsSelectedItemsEmitter = this.ownedSelectedItemsEmitter != null;
66
66
  }
67
67
  rowsUpdated(r) {
68
68
  this.destroyed || (this.releaseRows(), this.rows = Array.from(r ?? []), this.rows.forEach((e, s) => this.wireRow(e, s)), this.activeIndex = fe(this.activeIndex, this.rows.length), this.reconcileSelectedItems(), this.syncRows());
@@ -214,7 +214,7 @@ function P(t, r, e) {
214
214
  }
215
215
  return s;
216
216
  }
217
- class D extends b {
217
+ class D extends w {
218
218
  constructor(e = {}) {
219
219
  super(e);
220
220
  o(this, "itemsEmitter");
@@ -225,10 +225,10 @@ class D extends b {
225
225
  o(this, "selectionHandler");
226
226
  o(this, "ownedItemsEmitter");
227
227
  o(this, "ownedSelectedItemsEmitter");
228
- ge(e.items) ? (this.itemsEmitter = e.items, this.ownedItemsEmitter = null) : (this.ownedItemsEmitter = new y(e.items ?? [], {
228
+ ye(e.items) ? (this.itemsEmitter = e.items, this.ownedItemsEmitter = null) : (this.ownedItemsEmitter = new g(e.items ?? [], {
229
229
  owner: this,
230
230
  purpose: "list items"
231
- }), this.itemsEmitter = this.ownedItemsEmitter), this.items$ = this.itemsEmitter, this.ownedSelectedItemsEmitter = e.selectedItemsEmitter == null ? new y([], { owner: this, purpose: "selected list items" }) : null, this.selectedItemsEmitter = e.selectedItemsEmitter ?? this.ownedSelectedItemsEmitter, this.selectedItems$ = this.selectedItemsEmitter, this.getItemKey = me(e.itemKey), this.selectionHandler = Y({
231
+ }), this.itemsEmitter = this.ownedItemsEmitter), this.items$ = this.itemsEmitter, this.ownedSelectedItemsEmitter = e.selectedItemsEmitter == null ? new g([], { owner: this, purpose: "selected list items" }) : null, this.selectedItemsEmitter = e.selectedItemsEmitter ?? this.ownedSelectedItemsEmitter, this.selectedItems$ = this.selectedItemsEmitter, this.getItemKey = me(e.itemKey), this.selectionHandler = Y({
232
232
  owner: this,
233
233
  multiSelect: e.multiSelect ?? !1,
234
234
  selectedItemsEmitter: this.selectedItemsEmitter,
@@ -243,13 +243,13 @@ class D extends b {
243
243
  const e = this.itemsEmitter.get();
244
244
  if (!Array.isArray(e)) throw new TypeError("ListView items must be an array");
245
245
  const s = this.itemsEmitter.getFetchState(), i = this.itemsEmitter.getError(), n = s === m.Initial || s === m.Loading, a = new Set(this.selectedItemsEmitter.get().map((d, h) => this.getItemKey(d, h))), l = this.Host;
246
- return /* @__PURE__ */ w(
246
+ return /* @__PURE__ */ b(
247
247
  l,
248
248
  {
249
249
  className: I(this.props) || null,
250
250
  children: [
251
- s === m.Error ? /* @__PURE__ */ c("p", { role: "alert", "data-part": "error", children: be(i, "Unable to load items") }) : null,
252
- n && e.length === 0 ? /* @__PURE__ */ w("div", { role: "status", "data-part": "loading", children: [
251
+ s === m.Error ? /* @__PURE__ */ c("p", { role: "alert", "data-part": "error", children: we(i, "Unable to load items") }) : null,
252
+ n && e.length === 0 ? /* @__PURE__ */ b("div", { role: "status", "data-part": "loading", children: [
253
253
  /* @__PURE__ */ c("span", { children: "Loading items…" }),
254
254
  Array.from({ length: this.props.placeholderCount ?? 5 }, (d, h) => /* @__PURE__ */ c("div", { "data-part": "placeholder-row", children: /* @__PURE__ */ c(E, { width: 45 + h * 7 }) }, `placeholder-${h}`))
255
255
  ] }) : null,
@@ -263,7 +263,7 @@ class D extends b {
263
263
  "aria-busy": n ? "true" : null,
264
264
  "aria-multiselectable": this.props.multiSelect ? "true" : null,
265
265
  children: e.map((d, h) => {
266
- const u = this.getItemKey(d, h), f = a.has(u), p = this.props.renderItem ? this.props.renderItem(d, h) : ye(d);
266
+ const u = this.getItemKey(d, h), f = a.has(u), p = this.props.renderItem ? this.props.renderItem(d, h) : ge(d);
267
267
  return /* @__PURE__ */ c(
268
268
  "div",
269
269
  {
@@ -357,27 +357,27 @@ function me(t) {
357
357
  };
358
358
  throw new TypeError("ListView itemKey must be a function or property name");
359
359
  }
360
- function ge(t) {
360
+ function ye(t) {
361
361
  return t != null && (typeof t == "object" || typeof t == "function") && typeof Reflect.get(t, "get") == "function" && typeof Reflect.get(t, "subscribe") == "function";
362
362
  }
363
- function ye(t) {
363
+ function ge(t) {
364
364
  if (t != null && (typeof t == "object" || typeof t == "function")) {
365
365
  const r = Reflect.get(t, "label");
366
- if (we(r)) return r;
366
+ if (be(r)) return r;
367
367
  }
368
368
  return String(t);
369
369
  }
370
- function we(t) {
370
+ function be(t) {
371
371
  return t == null || typeof t == "string" || typeof t == "number";
372
372
  }
373
- function be(t, r) {
373
+ function we(t, r) {
374
374
  return t instanceof Error ? t.message : t == null ? r : String(t);
375
375
  }
376
- class T extends b {
376
+ class T extends w {
377
377
  constructor(e = {}) {
378
378
  super(e);
379
379
  o(this, "optionsEmitter");
380
- this.optionsEmitter = ke(e.options) ? e.options : null;
380
+ this.optionsEmitter = ve(e.options) ? e.options : null;
381
381
  }
382
382
  initialize() {
383
383
  this.optionsEmitter && this.watch(this.optionsEmitter);
@@ -394,7 +394,7 @@ class T extends b {
394
394
  className: I(this.props) || null,
395
395
  role: "alert",
396
396
  "data-state": "error",
397
- children: ve(i, "Unable to load filter options")
397
+ children: ke(i, "Unable to load filter options")
398
398
  }
399
399
  ) : (s === m.Initial || s === m.Loading) && e.length === 0 ? /* @__PURE__ */ c(
400
400
  d,
@@ -411,21 +411,21 @@ class T extends b {
411
411
  role: "group",
412
412
  "aria-label": this.props.label ?? "Filter options",
413
413
  children: e.length === 0 ? /* @__PURE__ */ c("span", { children: "No filter options" }) : e.map((p) => {
414
- const g = X(p), S = Ie(p), C = n.get(g) ?? l;
414
+ const y = X(p), S = Ie(p), C = n.get(y) ?? l;
415
415
  return /* @__PURE__ */ c(
416
416
  Ee,
417
417
  {
418
418
  label: S,
419
419
  defaultValue: C,
420
420
  symbols: a,
421
- onChange: (q, k) => {
421
+ onChange: (q, v) => {
422
422
  var R, M;
423
- k == null || k.stopPropagation();
424
- const v = new Map(n);
425
- q === K.Neutral ? v.delete(g) : v.set(g, q), (M = (R = this.props).onChange) == null || M.call(R, v, k);
423
+ v == null || v.stopPropagation();
424
+ const k = new Map(n);
425
+ q === K.Neutral ? k.delete(y) : k.set(y, q), (M = (R = this.props).onChange) == null || M.call(R, k, v);
426
426
  }
427
427
  },
428
- `${String(g)}:${String(C)}`
428
+ `${String(y)}:${String(C)}`
429
429
  );
430
430
  })
431
431
  }
@@ -475,13 +475,13 @@ function Ie(t) {
475
475
  function xe(t) {
476
476
  return typeof t == "string" || typeof t == "number";
477
477
  }
478
- function ke(t) {
478
+ function ve(t) {
479
479
  return t != null && (typeof t == "object" || typeof t == "function") && typeof Reflect.get(t, "get") == "function" && typeof Reflect.get(t, "subscribe") == "function";
480
480
  }
481
- function ve(t, r) {
481
+ function ke(t, r) {
482
482
  return t instanceof Error ? t.message : t == null ? r : String(t);
483
483
  }
484
- class N extends b {
484
+ class N extends w {
485
485
  constructor() {
486
486
  super(...arguments);
487
487
  o(this, "filterVisible", !1);
@@ -522,14 +522,14 @@ class N extends b {
522
522
  ...this.props.defaultSemanticState == null ? {} : { defaultSemanticState: this.props.defaultSemanticState }
523
523
  },
524
524
  "filter-panel"
525
- )), /* @__PURE__ */ w(
525
+ )), /* @__PURE__ */ b(
526
526
  "th",
527
527
  {
528
528
  scope: "col",
529
529
  "data-fray-component": "table-header-cell",
530
530
  "aria-sort": s === "asc" ? "ascending" : s === "desc" ? "descending" : "none",
531
531
  children: [
532
- this.props.sortable ? /* @__PURE__ */ w(
532
+ this.props.sortable ? /* @__PURE__ */ b(
533
533
  "button",
534
534
  {
535
535
  type: "button",
@@ -566,12 +566,27 @@ o(N, "dependencies", [T]), o(N, "baseStyles", [
566
566
  th[data-fray-component="table-header-cell"] {
567
567
  position: relative;
568
568
  text-align: start;
569
+ color: var(
570
+ --fray-table-header-color,
571
+ var(--fray-section-header-color, var(--fray-header-color))
572
+ );
573
+ background: var(
574
+ --fray-table-header-background,
575
+ var(--fray-section-header-background, var(--fray-header-background))
576
+ );
577
+ border-block-end: var(--fray-section-header-border, var(--fray-header-border));
578
+ box-shadow: var(--fray-section-header-shadow, var(--fray-header-shadow));
569
579
  }
570
580
 
571
581
  th[data-fray-component="table-header-cell"] > [data-part="sort"],
572
582
  th[data-fray-component="table-header-cell"] > [data-part="filter-toggle"] {
573
583
  width: auto;
574
584
  font-family: inherit;
585
+ color: inherit;
586
+ background: var(
587
+ --fray-table-header-button-background,
588
+ var(--fray-button-background)
589
+ );
575
590
  }
576
591
 
577
592
  th[data-fray-component="table-header-cell"] > [data-part="filter-toggle"] {
@@ -582,7 +597,7 @@ o(N, "dependencies", [T]), o(N, "baseStyles", [
582
597
  function Te(t) {
583
598
  return typeof t[0] == "string" || typeof t[0] == "number";
584
599
  }
585
- class H extends b {
600
+ class H extends w {
586
601
  render() {
587
602
  return /* @__PURE__ */ c("thead", { "data-fray-component": "table-header", children: /* @__PURE__ */ c("tr", { children: this.props.columns.map((r) => /* @__PURE__ */ c(
588
603
  N,
@@ -658,7 +673,7 @@ function qe(t) {
658
673
  if (r == null || typeof Reflect.get(r, "set") != "function" || typeof Reflect.get(r, "append") != "function")
659
674
  throw new TypeError("Table serializer requires URL search parameters");
660
675
  }
661
- class j extends b {
676
+ class j extends w {
662
677
  constructor(e) {
663
678
  super(e);
664
679
  o(this, "columns");
@@ -675,13 +690,13 @@ class j extends b {
675
690
  o(this, "queryArgs", []);
676
691
  if (e.mode !== "local" && e.mode !== "remote")
677
692
  throw new TypeError("DataTable mode must be local or remote");
678
- this.columns = Oe(e.columns), this.rowKey = je(e.rowKey), this.sortEmitter = new y(null, {
693
+ this.columns = Oe(e.columns), this.rowKey = je(e.rowKey), this.sortEmitter = new g(null, {
679
694
  owner: this,
680
695
  purpose: "table sort"
681
- }), this.filtersEmitter = new y({}, {
696
+ }), this.filtersEmitter = new g({}, {
682
697
  owner: this,
683
698
  purpose: "table filters"
684
- }), this.ownedSelectedItemsEmitter = e.selectedItemsEmitter == null ? new y([], { owner: this, purpose: "selected table rows" }) : null, this.selectedItemsEmitter = e.selectedItemsEmitter ?? this.ownedSelectedItemsEmitter, this.selectionHandler = Y({
699
+ }), this.ownedSelectedItemsEmitter = e.selectedItemsEmitter == null ? new g([], { owner: this, purpose: "selected table rows" }) : null, this.selectedItemsEmitter = e.selectedItemsEmitter ?? this.ownedSelectedItemsEmitter, this.selectionHandler = Y({
685
700
  owner: this,
686
701
  multiSelect: e.multiSelect ?? !1,
687
702
  selectedItemsEmitter: this.selectedItemsEmitter,
@@ -698,7 +713,7 @@ class j extends b {
698
713
  createLocalQuery() {
699
714
  const e = this.props.data ?? [];
700
715
  let s;
701
- return ee(e) ? s = e : (this.ownedDataSource = new y(e, {
716
+ return ee(e) ? s = e : (this.ownedDataSource = new g(e, {
702
717
  owner: this,
703
718
  purpose: "local table data"
704
719
  }), s = this.ownedDataSource), this.dataSource = s, this.ownsQuery = !0, new oe(
@@ -743,9 +758,9 @@ class j extends b {
743
758
  const e = ((d = this.query) == null ? void 0 : d.get()) ?? [];
744
759
  if (!Array.isArray(e)) throw new TypeError("DataTable query value must be an array");
745
760
  const s = ((h = this.query) == null ? void 0 : h.getFetchState()) ?? m.Initial, i = (u = this.query) == null ? void 0 : u.getError(), n = s === m.Initial || s === m.Loading, a = new Set(
746
- this.selectedItemsEmitter.get().map((p, g) => this.rowKey(p, g))
761
+ this.selectedItemsEmitter.get().map((p, y) => this.rowKey(p, y))
747
762
  ), l = this.Host;
748
- return /* @__PURE__ */ w(
763
+ return /* @__PURE__ */ b(
749
764
  l,
750
765
  {
751
766
  className: I(this.props) || null,
@@ -753,21 +768,21 @@ class j extends b {
753
768
  "data-error": s === m.Error ? "" : null,
754
769
  children: [
755
770
  n ? /* @__PURE__ */ c("p", { role: "status", "data-part": "status", children: "Loading rows…" }) : null,
756
- s === m.Error ? /* @__PURE__ */ w("div", { "data-part": "error", role: "alert", children: [
771
+ s === m.Error ? /* @__PURE__ */ b("div", { "data-part": "error", role: "alert", children: [
757
772
  /* @__PURE__ */ c("span", { children: Fe(i, "Unable to load rows") }),
758
773
  typeof ((f = this.query) == null ? void 0 : f.retry) == "function" ? /* @__PURE__ */ c(
759
774
  "button",
760
775
  {
761
776
  type: "button",
762
777
  onClick: () => {
763
- var p, g;
764
- return (g = (p = this.query) == null ? void 0 : p.retry) == null ? void 0 : g.call(p, "table retry");
778
+ var p, y;
779
+ return (y = (p = this.query) == null ? void 0 : p.retry) == null ? void 0 : y.call(p, "table retry");
765
780
  },
766
781
  children: "Retry"
767
782
  }
768
783
  ) : null
769
784
  ] }) : null,
770
- /* @__PURE__ */ w("table", { "data-part": "table", "aria-busy": n ? "true" : null, children: [
785
+ /* @__PURE__ */ b("table", { "data-part": "table", "aria-busy": n ? "true" : null, children: [
771
786
  this.props.caption == null ? null : /* @__PURE__ */ c("caption", { children: this.props.caption }),
772
787
  /* @__PURE__ */ c(
773
788
  H,
@@ -781,7 +796,7 @@ class j extends b {
781
796
  },
782
797
  "header"
783
798
  ),
784
- /* @__PURE__ */ c("tbody", { children: e.length > 0 ? e.map((p, g) => this.renderRow(p, g, a)) : n ? this.renderPlaceholders() : s === m.Error ? null : /* @__PURE__ */ c("tr", { children: /* @__PURE__ */ c("td", { colSpan: this.columns.length, children: this.props.emptyMessage ?? "No rows" }) }, "empty") })
799
+ /* @__PURE__ */ c("tbody", { children: e.length > 0 ? e.map((p, y) => this.renderRow(p, y, a)) : n ? this.renderPlaceholders() : s === m.Error ? null : /* @__PURE__ */ c("tr", { children: /* @__PURE__ */ c("td", { colSpan: this.columns.length, children: this.props.emptyMessage ?? "No rows" }) }, "empty") })
785
800
  ] })
786
801
  ]
787
802
  }
@@ -849,14 +864,26 @@ o(j, "dependencies", [E, H]), o(j, "hostName", "data-table"), o(j, "standaloneHo
849
864
  user-select: none;
850
865
  }
851
866
 
867
+ & tbody tr:nth-child(odd) {
868
+ background: var(--fray-table-row-background, transparent);
869
+ }
870
+
871
+ & tbody tr:nth-child(even) {
872
+ background: var(--fray-table-row-alt-background, transparent);
873
+ }
874
+
875
+ & tbody tr[data-fray-selectable-row]:hover {
876
+ background: var(--fray-row-hover-background, var(--button-background-hover));
877
+ }
878
+
852
879
  & tbody tr[data-fray-selectable-row]:focus-visible {
853
- outline: 2px solid var(--ui-accent-color);
880
+ outline: 2px solid var(--fray-color-focus, var(--ui-accent-color));
854
881
  outline-offset: -2px;
855
882
  }
856
883
 
857
884
  & tbody tr[data-fray-selectable-row][aria-selected="true"] {
858
- color: var(--toggle-selected-text);
859
- background: var(--toggle-selected-bg);
885
+ color: var(--fray-selection-color, var(--toggle-selected-text));
886
+ background: var(--fray-selection-background, var(--toggle-selected-bg));
860
887
  }
861
888
 
862
889
  & > [data-part="error"] {
@@ -906,12 +933,12 @@ function Le(t) {
906
933
  function Fe(t, r) {
907
934
  return t instanceof Error ? t.message : t == null ? r : String(t);
908
935
  }
909
- class te extends b {
936
+ class te extends w {
910
937
  render() {
911
938
  return this.props.children ?? [];
912
939
  }
913
940
  }
914
- class A extends b {
941
+ class A extends w {
915
942
  constructor(e) {
916
943
  super(e);
917
944
  o(this, "nodesEmitter");
@@ -927,12 +954,12 @@ class A extends b {
927
954
  this.nodesEmitter = e.nodes, this.ownedNodesEmitter = null;
928
955
  else {
929
956
  const s = e.nodes ?? re(e.children);
930
- this.ownedNodesEmitter = new y(s, {
957
+ this.ownedNodesEmitter = new g(s, {
931
958
  owner: this,
932
959
  purpose: "tree nodes"
933
960
  }), this.nodesEmitter = this.ownedNodesEmitter;
934
961
  }
935
- this.ownedSelectedEmitter = e.selectedKeyEmitter == null ? new y(null, { owner: this, purpose: "selected tree key" }) : null, this.selectedKeyEmitter = e.selectedKeyEmitter ?? this.ownedSelectedEmitter, this.ownedExpandedEmitter = e.expandedKeysEmitter == null ? new y([], { owner: this, purpose: "expanded tree keys" }) : null, this.expandedKeysEmitter = e.expandedKeysEmitter ?? this.ownedExpandedEmitter;
962
+ this.ownedSelectedEmitter = e.selectedKeyEmitter == null ? new g(null, { owner: this, purpose: "selected tree key" }) : null, this.selectedKeyEmitter = e.selectedKeyEmitter ?? this.ownedSelectedEmitter, this.ownedExpandedEmitter = e.expandedKeysEmitter == null ? new g([], { owner: this, purpose: "expanded tree keys" }) : null, this.expandedKeysEmitter = e.expandedKeysEmitter ?? this.ownedExpandedEmitter;
936
963
  }
937
964
  initialize() {
938
965
  this.reconcile(this.nodesEmitter.get()), this.watch(this.nodesEmitter, this.selectedKeyEmitter, this.expandedKeysEmitter), this.onCleanup(this.nodesEmitter.subscribe(({ value: e }) => this.reconcile(e), {
@@ -946,9 +973,9 @@ class A extends b {
946
973
  this.focusedKey = (a == null ? void 0 : a.node.id) ?? null;
947
974
  const l = this.Host;
948
975
  return /* @__PURE__ */ c(l, { className: I(this.props) || null, children: i.length === 0 ? /* @__PURE__ */ c("p", { role: "status", "data-part": "empty", children: "No tree items" }) : /* @__PURE__ */ c("div", { role: "tree", "aria-label": this.props.label, "data-part": "tree", children: i.map((d, h) => {
949
- var v, R, M;
950
- const { node: u, depth: f, position: p, setSize: g } = d, S = (((v = u.children) == null ? void 0 : v.length) ?? 0) > 0, C = S && s.has(u.id), q = Object.is(u.id, n), k = ((M = (R = this.props).renderItem) == null ? void 0 : M.call(R, u, f)) ?? u.label;
951
- return /* @__PURE__ */ w(
976
+ var k, R, M;
977
+ const { node: u, depth: f, position: p, setSize: y } = d, S = (((k = u.children) == null ? void 0 : k.length) ?? 0) > 0, C = S && s.has(u.id), q = Object.is(u.id, n), v = ((M = (R = this.props).renderItem) == null ? void 0 : M.call(R, u, f)) ?? u.label;
978
+ return /* @__PURE__ */ b(
952
979
  "div",
953
980
  {
954
981
  role: "treeitem",
@@ -957,7 +984,7 @@ class A extends b {
957
984
  "data-depth": f,
958
985
  "aria-level": f + 1,
959
986
  "aria-posinset": p,
960
- "aria-setsize": g,
987
+ "aria-setsize": y,
961
988
  "aria-expanded": S ? String(C) : null,
962
989
  "aria-selected": String(q),
963
990
  tabIndex: Object.is(u.id, a == null ? void 0 : a.node.id) ? 0 : -1,
@@ -981,7 +1008,7 @@ class A extends b {
981
1008
  children: S ? C ? "▾" : "▸" : "•"
982
1009
  }
983
1010
  ),
984
- /* @__PURE__ */ c("span", { "data-part": "label", children: k })
1011
+ /* @__PURE__ */ c("span", { "data-part": "label", children: v })
985
1012
  ]
986
1013
  },
987
1014
  u.id
@@ -1175,7 +1202,7 @@ function ze(t) {
1175
1202
  function Ue(t) {
1176
1203
  return t instanceof Element && t.closest('[data-part="expander"]') != null;
1177
1204
  }
1178
- class G extends b {
1205
+ class G extends w {
1179
1206
  constructor(e) {
1180
1207
  super(e);
1181
1208
  o(this, "openEmitter");
@@ -1199,7 +1226,7 @@ class G extends b {
1199
1226
  showCloseButton: a = !0,
1200
1227
  children: l = []
1201
1228
  } = this.props;
1202
- return /* @__PURE__ */ w(
1229
+ return /* @__PURE__ */ b(
1203
1230
  "dialog",
1204
1231
  {
1205
1232
  id: this.dialogId,
@@ -1213,7 +1240,7 @@ class G extends b {
1213
1240
  /* @__PURE__ */ c("header", { "data-part": "header", children: /* @__PURE__ */ c("h2", { id: this.titleId, children: e }) }),
1214
1241
  s == null ? null : /* @__PURE__ */ c("p", { id: this.descriptionId, "data-part": "description", children: s }),
1215
1242
  /* @__PURE__ */ c("div", { "data-part": "content", children: l }),
1216
- i == null && !a ? null : /* @__PURE__ */ w("footer", { "data-part": "actions", children: [
1243
+ i == null && !a ? null : /* @__PURE__ */ b("footer", { "data-part": "actions", children: [
1217
1244
  i,
1218
1245
  a ? /* @__PURE__ */ c(
1219
1246
  Q,
@@ -1271,15 +1298,15 @@ o(G, "dependencies", [Q]), o(G, "css", x`
1271
1298
  width: min(38rem, calc(100vw - 2rem));
1272
1299
  max-height: min(42rem, calc(100dvh - 2rem));
1273
1300
  padding: 0;
1274
- color: var(--ui-text-color);
1275
- background: var(--panel-bg);
1276
- border: 1px solid var(--ui-border-color);
1277
- border-radius: var(--panel-radius, var(--ui-border-radius));
1278
- box-shadow: 0 1.25rem 4rem rgb(0 0 0 / 35%);
1301
+ color: var(--fray-panel-color, var(--ui-text-color));
1302
+ background: var(--fray-panel-background, var(--panel-bg));
1303
+ border: var(--fray-panel-border, var(--panel-border));
1304
+ border-radius: var(--fray-panel-radius, var(--panel-radius));
1305
+ box-shadow: var(--fray-dialog-shadow, var(--fray-panel-shadow));
1279
1306
  }
1280
1307
 
1281
1308
  dialog[data-fray-component="dialog"]::backdrop {
1282
- background: rgb(0 0 0 / 55%);
1309
+ background: var(--fray-dialog-backdrop-background);
1283
1310
  }
1284
1311
 
1285
1312
  dialog[data-fray-component="dialog"] > [data-part] {
@@ -1287,7 +1314,18 @@ o(G, "dependencies", [Q]), o(G, "css", x`
1287
1314
  }
1288
1315
 
1289
1316
  dialog[data-fray-component="dialog"] > [data-part="header"] {
1290
- border-block-end: 1px solid var(--ui-border-color);
1317
+ color: var(
1318
+ --fray-dialog-header-color,
1319
+ var(--fray-section-header-color, var(--fray-header-color))
1320
+ );
1321
+ background: var(
1322
+ --fray-dialog-header-background,
1323
+ var(--fray-section-header-background, var(--fray-header-background))
1324
+ );
1325
+ border-block-end: var(
1326
+ --fray-section-header-border,
1327
+ var(--fray-header-border)
1328
+ );
1291
1329
  }
1292
1330
 
1293
1331
  dialog[data-fray-component="dialog"] > [data-part="header"] h2,