@forgeroute/ui 0.4.22 → 0.4.23

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.
@@ -371,7 +371,7 @@ var SearchInputComponent = class SearchInputComponent {
371
371
  </div>
372
372
  `,
373
373
  isInline: true,
374
- styles: [":host{display:block;flex:0 1 325px;min-width:0}.search-bar{position:relative;display:flex;align-items:center;width:100%}.search-icon{position:absolute;left:10px;color:#94a3b8;pointer-events:none}.search-input{width:100%;padding:9px 10px 9px 34px;border:1px solid #e2e8f0;border-radius:8px;font-size:.875rem;background:#fff;color:#1e293b;outline:none;min-width:0;font-family:inherit;transition:border-color .15s,box-shadow .15s}.search-input:focus{border-color:#3b82f6;box-shadow:0 0 0 3px #3b82f61f}.search-input::placeholder{color:#94a3b8}.search-input-loading{padding-right:34px}.search-input-loading::-webkit-search-cancel-button{display:none}.search-spinner{position:absolute;right:10px;top:50%;margin-top:-8px;width:16px;height:16px;pointer-events:none}.search-spinner-ring{display:block;width:16px;height:16px;box-sizing:border-box;border:2px solid #e2e8f0;border-top-color:#64748b;border-radius:50%;animation:search-spin .6s linear infinite}.search-sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}@keyframes search-spin{to{transform:rotate(360deg)}}@media(pointer:coarse),(max-width:480px){.search-input{min-height:44px}}@media(max-width:1024px){:host{flex:0 1 280px}}@media(max-width:768px){:host{flex:0 1 240px}}@media(max-width:640px){:host{flex:1 1 auto}.search-input{font-size:16px}}\n"],
374
+ styles: [":host{display:block;flex:0 1 var(--ui-search-width, 325px);min-width:0}.search-bar{position:relative;display:flex;align-items:center;width:100%}.search-icon{position:absolute;left:10px;color:#94a3b8;pointer-events:none}.search-input{width:100%;padding:9px 10px 9px 34px;border:1px solid #e2e8f0;border-radius:8px;font-size:.875rem;background:#fff;color:#1e293b;outline:none;min-width:0;font-family:inherit;transition:border-color .15s,box-shadow .15s}.search-input:focus{border-color:#3b82f6;box-shadow:0 0 0 3px #3b82f61f}.search-input::placeholder{color:#94a3b8}.search-input-loading{padding-right:34px}.search-input-loading::-webkit-search-cancel-button{display:none}.search-spinner{position:absolute;right:10px;top:50%;margin-top:-8px;width:16px;height:16px;pointer-events:none}.search-spinner-ring{display:block;width:16px;height:16px;box-sizing:border-box;border:2px solid #e2e8f0;border-top-color:#64748b;border-radius:50%;animation:search-spin .6s linear infinite}.search-sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}@keyframes search-spin{to{transform:rotate(360deg)}}@media(pointer:coarse),(max-width:480px){.search-input{min-height:44px}}@media(max-width:1024px){:host{flex:0 1 280px}}@media(max-width:768px){:host{flex:0 1 240px}}@media(max-width:640px){:host{flex:1 1 auto}.search-input{font-size:16px}}\n"],
375
375
  changeDetection: i0.ChangeDetectionStrategy.OnPush
376
376
  });
377
377
  }
@@ -424,7 +424,7 @@ i0.ɵɵngDeclareClassMetadata({
424
424
  }
425
425
  </div>
426
426
  `,
427
- styles: [":host{display:block;flex:0 1 325px;min-width:0}.search-bar{position:relative;display:flex;align-items:center;width:100%}.search-icon{position:absolute;left:10px;color:#94a3b8;pointer-events:none}.search-input{width:100%;padding:9px 10px 9px 34px;border:1px solid #e2e8f0;border-radius:8px;font-size:.875rem;background:#fff;color:#1e293b;outline:none;min-width:0;font-family:inherit;transition:border-color .15s,box-shadow .15s}.search-input:focus{border-color:#3b82f6;box-shadow:0 0 0 3px #3b82f61f}.search-input::placeholder{color:#94a3b8}.search-input-loading{padding-right:34px}.search-input-loading::-webkit-search-cancel-button{display:none}.search-spinner{position:absolute;right:10px;top:50%;margin-top:-8px;width:16px;height:16px;pointer-events:none}.search-spinner-ring{display:block;width:16px;height:16px;box-sizing:border-box;border:2px solid #e2e8f0;border-top-color:#64748b;border-radius:50%;animation:search-spin .6s linear infinite}.search-sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}@keyframes search-spin{to{transform:rotate(360deg)}}@media(pointer:coarse),(max-width:480px){.search-input{min-height:44px}}@media(max-width:1024px){:host{flex:0 1 280px}}@media(max-width:768px){:host{flex:0 1 240px}}@media(max-width:640px){:host{flex:1 1 auto}.search-input{font-size:16px}}\n"]
427
+ styles: [":host{display:block;flex:0 1 var(--ui-search-width, 325px);min-width:0}.search-bar{position:relative;display:flex;align-items:center;width:100%}.search-icon{position:absolute;left:10px;color:#94a3b8;pointer-events:none}.search-input{width:100%;padding:9px 10px 9px 34px;border:1px solid #e2e8f0;border-radius:8px;font-size:.875rem;background:#fff;color:#1e293b;outline:none;min-width:0;font-family:inherit;transition:border-color .15s,box-shadow .15s}.search-input:focus{border-color:#3b82f6;box-shadow:0 0 0 3px #3b82f61f}.search-input::placeholder{color:#94a3b8}.search-input-loading{padding-right:34px}.search-input-loading::-webkit-search-cancel-button{display:none}.search-spinner{position:absolute;right:10px;top:50%;margin-top:-8px;width:16px;height:16px;pointer-events:none}.search-spinner-ring{display:block;width:16px;height:16px;box-sizing:border-box;border:2px solid #e2e8f0;border-top-color:#64748b;border-radius:50%;animation:search-spin .6s linear infinite}.search-sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}@keyframes search-spin{to{transform:rotate(360deg)}}@media(pointer:coarse),(max-width:480px){.search-input{min-height:44px}}@media(max-width:1024px){:host{flex:0 1 280px}}@media(max-width:768px){:host{flex:0 1 240px}}@media(max-width:640px){:host{flex:1 1 auto}.search-input{font-size:16px}}\n"]
428
428
  }]
429
429
  }],
430
430
  ctorParameters: () => [],
@@ -4497,6 +4497,7 @@ const EXTRA_ICONS = {
4497
4497
  "refund": "M3 10h10a8 8 0 0 1 8 8v2 M3 10l6 6 M3 10l6-6",
4498
4498
  "link": "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71 M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",
4499
4499
  "chart": "M18 20V10 M12 20V4 M6 20v-6",
4500
+ "clipboard": "M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2 M9 2h6a1 1 0 0 1 1 1v2a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1z",
4500
4501
  "save": "M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z M17 21v-8H7v8 M7 3v5h8",
4501
4502
  "bank": "M3 21h18 M3 10h18 M5 6l7-3 7 3 M4 10v11 M20 10v11 M8 14v3 M12 14v3 M16 14v3"
4502
4503
  };
@@ -5762,7 +5763,7 @@ var TableToolbarComponent = class TableToolbarComponent {
5762
5763
  this.saveNameModalOpen = signal(false, ...ngDevMode ? [{ debugName: "saveNameModalOpen" }] : /* istanbul ignore next */ []);
5763
5764
  this._saveViewName = "";
5764
5765
  this._pendingCols = signal([], ...ngDevMode ? [{ debugName: "_pendingCols" }] : /* istanbul ignore next */ []);
5765
- this._allowedButtons = computed(() => this.readOnly() ? this.tableButtons().filter((b) => b.type === "export") : this.tableButtons(), ...ngDevMode ? [{ debugName: "_allowedButtons" }] : /* istanbul ignore next */ []);
5766
+ this._allowedButtons = computed(() => this.readOnly() ? this.tableButtons().filter((b) => b.type === "export" || b.allowReadOnly && b.type !== "import") : this.tableButtons(), ...ngDevMode ? [{ debugName: "_allowedButtons" }] : /* istanbul ignore next */ []);
5766
5767
  this.standaloneButtons = computed(() => this._allowedButtons().filter((b) => (b.variant === "primary" || b.variant === "secondary") && !b.hidden).sort((a, b) => {
5767
5768
  if (a.variant === b.variant) return 0;
5768
5769
  return a.variant === "primary" ? -1 : 1;
@@ -10351,7 +10352,7 @@ var DataTableComponent = class DataTableComponent {
10351
10352
  }, ...ngDevMode ? [{ debugName: "_exportParams" }] : /* istanbul ignore next */ []);
10352
10353
  this._effectiveButtons = computed(() => {
10353
10354
  const canEdit = this._canEdit();
10354
- const buttons = canEdit ? this.tableButtons() : [];
10355
+ const buttons = canEdit ? this.tableButtons() : this.tableButtons().filter((b) => b.allowReadOnly);
10355
10356
  const cfg = this.importExportConfig();
10356
10357
  if (!cfg) return buttons;
10357
10358
  return [
@@ -35375,6 +35376,8 @@ i0.ɵɵngDeclareClassMetadata({
35375
35376
  }]
35376
35377
  }] }
35377
35378
  });
35379
+ const MOVE_PREFIX = "ub-move:";
35380
+ const MOVE_ICON = "M4 12h12m0 0l-4-4m4 4l-4 4M20 5v14";
35378
35381
  let nextBoardId = 0;
35379
35382
  const DOT_COLORS = {
35380
35383
  blue: "#3b82f6",
@@ -35413,6 +35416,7 @@ var BoardComponent = class BoardComponent {
35413
35416
  this.itemKey = input.required(...ngDevMode ? [{ debugName: "itemKey" }] : /* istanbul ignore next */ []);
35414
35417
  this.itemLabel = input.required(...ngDevMode ? [{ debugName: "itemLabel" }] : /* istanbul ignore next */ []);
35415
35418
  this.cardActions = input([], ...ngDevMode ? [{ debugName: "cardActions" }] : /* istanbul ignore next */ []);
35419
+ this.moveMenu = input(true, ...ngDevMode ? [{ debugName: "moveMenu" }] : /* istanbul ignore next */ []);
35416
35420
  this.loading = input(false, ...ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []);
35417
35421
  this.error = input(null, ...ngDevMode ? [{ debugName: "error" }] : /* istanbul ignore next */ []);
35418
35422
  this.readOnly = input(false, ...ngDevMode ? [{ debugName: "readOnly" }] : /* istanbul ignore next */ []);
@@ -35454,6 +35458,27 @@ var BoardComponent = class BoardComponent {
35454
35458
  this.drag = null;
35455
35459
  this.skeletonColumns = computed(() => Array.from({ length: Math.max(this.columns().length, 4) }, (_, i) => i), ...ngDevMode ? [{ debugName: "skeletonColumns" }] : /* istanbul ignore next */ []);
35456
35460
  this.canDrag = computed(() => !this.readOnly() && !this.moveDisabled(), ...ngDevMode ? [{ debugName: "canDrag" }] : /* istanbul ignore next */ []);
35461
+ this.menuActions = computed(() => {
35462
+ const out = /* @__PURE__ */ new Map();
35463
+ const own = this.cardActions();
35464
+ if (!this.moveMenu() || !this.canDrag()) return out;
35465
+ const cols = this.cols();
35466
+ const shared = /* @__PURE__ */ new Map();
35467
+ for (const from of cols) for (const item of from.items) {
35468
+ let list = this.canMove() ? void 0 : shared.get(from.key);
35469
+ if (!list) {
35470
+ const moves = cols.filter((to) => this.accepts(item, from.key, to)).map((to) => ({
35471
+ type: MOVE_PREFIX + to.key,
35472
+ label: `Move to ${to.label}`,
35473
+ icon: MOVE_ICON
35474
+ }));
35475
+ list = moves.length ? [...own, ...moves] : own;
35476
+ if (!this.canMove()) shared.set(from.key, list);
35477
+ }
35478
+ out.set(this.itemKey()(item), list);
35479
+ }
35480
+ return out;
35481
+ }, ...ngDevMode ? [{ debugName: "menuActions" }] : /* istanbul ignore next */ []);
35457
35482
  effect(() => {
35458
35483
  if (this.loading()) {
35459
35484
  this.drawn.set({});
@@ -35518,13 +35543,32 @@ var BoardComponent = class BoardComponent {
35518
35543
  for (let i = cols.findIndex((c) => c.key === col.key) + step; i >= 0 && i < cols.length; i += step) if (this.accepts(item, col.key, cols[i])) {
35519
35544
  this.move(item, col.key, cols[i].key);
35520
35545
  this.announcement.set(`${this.itemLabel()(item)} moved to ${cols[i].label}`);
35521
- const key = this.itemKey()(item);
35522
- setTimeout(() => {
35523
- const cards = this.host.nativeElement.querySelectorAll(".ub-card");
35524
- Array.from(cards).find((c) => c.dataset["boardKey"] === key)?.focus();
35546
+ this.focusCard(item);
35547
+ return;
35548
+ }
35549
+ }
35550
+ onMenuAction(type, item) {
35551
+ if (!type.startsWith(MOVE_PREFIX)) {
35552
+ this.cardAction.emit({
35553
+ type,
35554
+ item
35525
35555
  });
35526
35556
  return;
35527
35557
  }
35558
+ const key = this.itemKey()(item);
35559
+ const from = this.cols().find((c) => c.items.some((i) => this.itemKey()(i) === key));
35560
+ const to = this.cols().find((c) => c.key === type.slice(8));
35561
+ if (!from || !to || !this.accepts(item, from.key, to)) return;
35562
+ this.move(item, from.key, to.key);
35563
+ this.announcement.set(`${this.itemLabel()(item)} moved to ${to.label}`);
35564
+ this.focusCard(item);
35565
+ }
35566
+ focusCard(item) {
35567
+ const key = this.itemKey()(item);
35568
+ setTimeout(() => {
35569
+ const cards = this.host.nativeElement.querySelectorAll(".ub-card");
35570
+ Array.from(cards).find((c) => c.dataset["boardKey"] === key)?.focus();
35571
+ });
35528
35572
  }
35529
35573
  accepts(item, from, to) {
35530
35574
  if (from === to.key || to.dropDisabled || this.moveDisabled() || this.readOnly()) return false;
@@ -35605,6 +35649,13 @@ var BoardComponent = class BoardComponent {
35605
35649
  isRequired: false,
35606
35650
  transformFunction: null
35607
35651
  },
35652
+ moveMenu: {
35653
+ classPropertyName: "moveMenu",
35654
+ publicName: "moveMenu",
35655
+ isSignal: true,
35656
+ isRequired: false,
35657
+ transformFunction: null
35658
+ },
35608
35659
  loading: {
35609
35660
  classPropertyName: "loading",
35610
35661
  publicName: "loading",
@@ -35707,10 +35758,11 @@ var BoardComponent = class BoardComponent {
35707
35758
  template: `
35708
35759
  <!-- The card's "⋮" menu. Place it in the card's top row: <ng-container [ngTemplateOutlet]="menu" [ngTemplateOutletContext]="{ $implicit: item }" /> -->
35709
35760
  <ng-template #menuTpl let-item>
35710
- @if (cardActions().length) {
35761
+ @let actions = menuActions().get(itemKey()(item)) ?? cardActions();
35762
+ @if (actions.length) {
35711
35763
  <div class="ub-card__top-right" (click)="$event.stopPropagation()" (keydown)="$event.stopPropagation()">
35712
- <ui-more-menu [actions]="cardActions()" [ariaLabel]="'Actions for ' + itemLabel()(item)"
35713
- (actionClick)="cardAction.emit({ type: $event, item })" />
35764
+ <ui-more-menu [actions]="actions" [ariaLabel]="'Actions for ' + itemLabel()(item)"
35765
+ (actionClick)="onMenuAction($event, item)" />
35714
35766
  </div>
35715
35767
  }
35716
35768
  </ng-template>
@@ -35869,10 +35921,11 @@ i0.ɵɵngDeclareClassMetadata({
35869
35921
  template: `
35870
35922
  <!-- The card's "⋮" menu. Place it in the card's top row: <ng-container [ngTemplateOutlet]="menu" [ngTemplateOutletContext]="{ $implicit: item }" /> -->
35871
35923
  <ng-template #menuTpl let-item>
35872
- @if (cardActions().length) {
35924
+ @let actions = menuActions().get(itemKey()(item)) ?? cardActions();
35925
+ @if (actions.length) {
35873
35926
  <div class="ub-card__top-right" (click)="$event.stopPropagation()" (keydown)="$event.stopPropagation()">
35874
- <ui-more-menu [actions]="cardActions()" [ariaLabel]="'Actions for ' + itemLabel()(item)"
35875
- (actionClick)="cardAction.emit({ type: $event, item })" />
35927
+ <ui-more-menu [actions]="actions" [ariaLabel]="'Actions for ' + itemLabel()(item)"
35928
+ (actionClick)="onMenuAction($event, item)" />
35876
35929
  </div>
35877
35930
  }
35878
35931
  </ng-template>
@@ -35992,6 +36045,14 @@ i0.ɵɵngDeclareClassMetadata({
35992
36045
  required: false
35993
36046
  }]
35994
36047
  }],
36048
+ moveMenu: [{
36049
+ type: i0.Input,
36050
+ args: [{
36051
+ isSignal: true,
36052
+ alias: "moveMenu",
36053
+ required: false
36054
+ }]
36055
+ }],
35995
36056
  loading: [{
35996
36057
  type: i0.Input,
35997
36058
  args: [{
@@ -37502,7 +37563,17 @@ i0.ɵɵngDeclareClassMetadata({
37502
37563
  }]
37503
37564
  }
37504
37565
  });
37505
- const CSS_LENGTH = /^(?:0|-?(?:\d+\.?\d*|\.\d+)(?:px|rem|em|%|vh|vw|ch)|(?:calc|var)\([^;{}]*\))$/i;
37566
+ const CSS_LENGTH = /^(?:0|(?:\d+\.?\d*|\.\d+)(?:px|rem|em|%|vh|vw|ch)|(?:calc|var)\([^;{}]*\))$/i;
37567
+ const BREAKPOINT_PX = {
37568
+ sm: 640,
37569
+ md: 900,
37570
+ lg: 1200
37571
+ };
37572
+ function lengthOr(v, fallback) {
37573
+ const t = String(v ?? "").trim();
37574
+ if (!t || !CSS_LENGTH.test(t)) return fallback;
37575
+ return t === "0" ? "0px" : t;
37576
+ }
37506
37577
  function px(v, fallback) {
37507
37578
  if (v === null || v === void 0 || v === "") return fallback;
37508
37579
  const n = Number(v);
@@ -37518,24 +37589,55 @@ var SidebarLayoutComponent = class SidebarLayoutComponent {
37518
37589
  this.stickyOffset = input(32, ...ngDevMode ? [{ debugName: "stickyOffset" }] : /* istanbul ignore next */ []);
37519
37590
  this.collapseAt = input("md", ...ngDevMode ? [{ debugName: "collapseAt" }] : /* istanbul ignore next */ []);
37520
37591
  this.sideFirstWhenCollapsed = input(true, ...ngDevMode ? [{ debugName: "sideFirstWhenCollapsed" }] : /* istanbul ignore next */ []);
37592
+ this.sideFirstInDom = input(false, ...ngDevMode ? [{ debugName: "sideFirstInDom" }] : /* istanbul ignore next */ []);
37593
+ this.sideBleed = input("4px", ...ngDevMode ? [{ debugName: "sideBleed" }] : /* istanbul ignore next */ []);
37594
+ this.collapsed = signal(false, ...ngDevMode ? [{ debugName: "collapsed" }] : /* istanbul ignore next */ []);
37521
37595
  this.position = computed(() => this.sidePosition() === "start" ? "start" : "end", ...ngDevMode ? [{ debugName: "position" }] : /* istanbul ignore next */ []);
37522
- this.sideCss = computed(() => {
37523
- const v = String(this.sideWidth() ?? "").trim();
37524
- return v && CSS_LENGTH.test(v) ? v : "320px";
37525
- }, ...ngDevMode ? [{ debugName: "sideCss" }] : /* istanbul ignore next */ []);
37526
- this.gapCss = computed(() => resolveLayoutGap(this.gap(), "md"), ...ngDevMode ? [{ debugName: "gapCss" }] : /* istanbul ignore next */ []);
37596
+ this.collapseKey = computed(() => {
37597
+ const c = this.collapseAt();
37598
+ return c === "never" || c === "sm" || c === "lg" ? c : "md";
37599
+ }, ...ngDevMode ? [{ debugName: "collapseKey" }] : /* istanbul ignore next */ []);
37600
+ this.domSideFirst = computed(() => this.sideFirstInDom() && this.sideFirstWhenCollapsed() && this.collapsed(), ...ngDevMode ? [{ debugName: "domSideFirst" }] : /* istanbul ignore next */ []);
37601
+ this.domOrder = computed(() => this.domSideFirst() ? "side-first" : "main-first", ...ngDevMode ? [{ debugName: "domOrder" }] : /* istanbul ignore next */ []);
37602
+ this.sideCss = computed(() => lengthOr(this.sideWidth(), "320px"), ...ngDevMode ? [{ debugName: "sideCss" }] : /* istanbul ignore next */ []);
37603
+ this.bleedCss = computed(() => lengthOr(this.sideBleed(), "4px"), ...ngDevMode ? [{ debugName: "bleedCss" }] : /* istanbul ignore next */ []);
37604
+ this.gapCss = computed(() => {
37605
+ const g = resolveLayoutGap(this.gap(), "md");
37606
+ if (g.startsWith("-")) return "16px";
37607
+ return g === "0" ? "0px" : g;
37608
+ }, ...ngDevMode ? [{ debugName: "gapCss" }] : /* istanbul ignore next */ []);
37527
37609
  this.topCss = computed(() => `${px(this.stickyTop(), 16)}px`, ...ngDevMode ? [{ debugName: "topCss" }] : /* istanbul ignore next */ []);
37528
37610
  this.offCss = computed(() => `${px(this.stickyOffset(), 32)}px`, ...ngDevMode ? [{ debugName: "offCss" }] : /* istanbul ignore next */ []);
37529
37611
  this.rootClass = computed(() => {
37530
- const c = this.collapseAt();
37531
- const collapse = c === "never" ? "" : c === "sm" || c === "lg" ? `sl-c-${c}` : "sl-c-md";
37612
+ const key = this.collapseKey();
37613
+ const collapse = key === "never" ? "" : `sl-c-${key}`;
37614
+ const domFirst = this.domSideFirst();
37532
37615
  return [
37533
37616
  this.position() === "start" ? "sl-start" : "",
37534
37617
  this.stickySide() ? "sl-sticky" : "",
37535
37618
  collapse,
37536
- collapse && this.sideFirstWhenCollapsed() ? "sl-first" : ""
37619
+ collapse && this.sideFirstWhenCollapsed() && !domFirst ? "sl-first" : "",
37620
+ domFirst ? "sl-dom-first" : ""
37537
37621
  ].filter(Boolean).join(" ");
37538
37622
  }, ...ngDevMode ? [{ debugName: "rootClass" }] : /* istanbul ignore next */ []);
37623
+ effect((onCleanup) => {
37624
+ const key = this.collapseKey();
37625
+ if (!this.sideFirstInDom() || key === "never" || typeof window === "undefined" || typeof window.matchMedia !== "function") {
37626
+ this.collapsed.set(false);
37627
+ return;
37628
+ }
37629
+ const mql = window.matchMedia(`(max-width: ${BREAKPOINT_PX[key]}px)`);
37630
+ this.collapsed.set(mql.matches);
37631
+ const onChange = (e) => this.collapsed.set(e.matches);
37632
+ if (typeof mql.addEventListener === "function") {
37633
+ mql.addEventListener("change", onChange);
37634
+ onCleanup(() => mql.removeEventListener("change", onChange));
37635
+ } else {
37636
+ const legacy = mql;
37637
+ legacy.addListener(onChange);
37638
+ onCleanup(() => legacy.removeListener(onChange));
37639
+ }
37640
+ });
37539
37641
  }
37540
37642
  static {
37541
37643
  this.ɵfac = i0.ɵɵngDeclareFactory({
@@ -37549,7 +37651,7 @@ var SidebarLayoutComponent = class SidebarLayoutComponent {
37549
37651
  }
37550
37652
  static {
37551
37653
  this.ɵcmp = i0.ɵɵngDeclareComponent({
37552
- minVersion: "17.1.0",
37654
+ minVersion: "17.0.0",
37553
37655
  version: "22.2.2",
37554
37656
  type: SidebarLayoutComponent,
37555
37657
  isStandalone: true,
@@ -37610,13 +37712,37 @@ var SidebarLayoutComponent = class SidebarLayoutComponent {
37610
37712
  isSignal: true,
37611
37713
  isRequired: false,
37612
37714
  transformFunction: null
37715
+ },
37716
+ sideFirstInDom: {
37717
+ classPropertyName: "sideFirstInDom",
37718
+ publicName: "sideFirstInDom",
37719
+ isSignal: true,
37720
+ isRequired: false,
37721
+ transformFunction: null
37722
+ },
37723
+ sideBleed: {
37724
+ classPropertyName: "sideBleed",
37725
+ publicName: "sideBleed",
37726
+ isSignal: true,
37727
+ isRequired: false,
37728
+ transformFunction: null
37613
37729
  }
37614
37730
  },
37615
37731
  host: { properties: { "attr.data-side-position": "position()" } },
37616
37732
  ngImport: i0,
37617
- template: `<div class="sl" [class]="rootClass()" [style.--sl-side-w]="sideCss()" [style.--sl-gap]="gapCss()" [style.--sl-top]="topCss()" [style.--sl-off]="offCss()" [style.row-gap]="gapCss()"><div class="sl-main"><ng-content select="[layout-main]" /></div><div class="sl-side"><ng-content select="[layout-side]" /></div></div>`,
37733
+ template: `<div class="sl" [class]="rootClass()" [attr.data-dom-order]="domOrder()" [style.--sl-side-w]="sideCss()" [style.--sl-gap]="gapCss()" [style.--sl-top]="topCss()" [style.--sl-off]="offCss()" [style.--sl-bleed]="bleedCss()" [style.row-gap]="gapCss()">@if (domSideFirst()) {<ng-container [ngTemplateOutlet]="sideTpl" /><ng-container [ngTemplateOutlet]="mainTpl" />} @else {<ng-container [ngTemplateOutlet]="mainTpl" /><ng-container [ngTemplateOutlet]="sideTpl" />}</div><ng-template #mainTpl><div class="sl-main"><ng-content select="[layout-main]" /></div></ng-template><ng-template #sideTpl><div class="sl-side"><ng-content select="[layout-side]" /></div></ng-template>`,
37618
37734
  isInline: true,
37619
- styles: [":host{display:block}.sl{display:grid;grid-template-columns:minmax(0,1fr) auto}.sl-main{grid-column:1;grid-row:1;min-width:0}.sl-side{grid-column:2;grid-row:1;box-sizing:border-box;width:var(--sl-side-w, 320px);max-width:100%;min-width:0;margin-inline-start:var(--sl-gap, 16px)}.sl-side:empty{display:none}.sl.sl-start{grid-template-columns:auto minmax(0,1fr)}.sl.sl-start .sl-main{grid-column:2}.sl.sl-start .sl-side{grid-column:1;margin-inline-start:0;margin-inline-end:var(--sl-gap, 16px)}.sl.sl-sticky .sl-side{position:-webkit-sticky;position:sticky;top:var(--sl-top, 16px);align-self:start;max-height:calc(100vh - (var(--sl-top, 16px) + var(--sl-off, 32px)));max-height:calc(100dvh - (var(--sl-top, 16px) + var(--sl-off, 32px)));overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}@media(max-width:640px){.sl.sl-c-sm{grid-template-columns:minmax(0,1fr)}.sl.sl-c-sm .sl-main{grid-column:1;grid-row:auto}.sl.sl-c-sm .sl-side{grid-column:1;grid-row:auto;width:auto;margin-inline-start:0;margin-inline-end:0;position:static;top:auto;align-self:auto;max-height:none;overflow-y:visible}.sl.sl-c-sm.sl-first .sl-side{order:-1}}@media(max-width:900px){.sl.sl-c-md{grid-template-columns:minmax(0,1fr)}.sl.sl-c-md .sl-main{grid-column:1;grid-row:auto}.sl.sl-c-md .sl-side{grid-column:1;grid-row:auto;width:auto;margin-inline-start:0;margin-inline-end:0;position:static;top:auto;align-self:auto;max-height:none;overflow-y:visible}.sl.sl-c-md.sl-first .sl-side{order:-1}}@media(max-width:1200px){.sl.sl-c-lg{grid-template-columns:minmax(0,1fr)}.sl.sl-c-lg .sl-main{grid-column:1;grid-row:auto}.sl.sl-c-lg .sl-side{grid-column:1;grid-row:auto;width:auto;margin-inline-start:0;margin-inline-end:0;position:static;top:auto;align-self:auto;max-height:none;overflow-y:visible}.sl.sl-c-lg.sl-first .sl-side{order:-1}}\n"],
37735
+ styles: [":host{display:block}.sl{display:grid;grid-template-columns:minmax(0,1fr) auto;--sl-mis: var(--sl-gap, 16px);--sl-mie: 0px}.sl-main{grid-column:1;grid-row:1;min-width:0}.sl-side{grid-column:2;grid-row:1;box-sizing:border-box;width:var(--sl-side-w, 320px);min-width:0;margin-inline-start:var(--sl-mis);margin-inline-end:var(--sl-mie)}.sl-side:empty{display:none}.sl.sl-start{grid-template-columns:auto minmax(0,1fr);--sl-mis: 0px;--sl-mie: var(--sl-gap, 16px)}.sl.sl-start .sl-main{grid-column:2}.sl.sl-start .sl-side{grid-column:1}.sl.sl-sticky{--sl-bin: min(var(--sl-bleed, 4px), var(--sl-gap, 16px));--sl-mis: calc(var(--sl-gap, 16px) - var(--sl-bin));--sl-mie: calc(-1 * var(--sl-bleed, 4px));--sl-pis: var(--sl-bin);--sl-pie: var(--sl-bleed, 4px)}.sl.sl-sticky.sl-start{--sl-mis: calc(-1 * var(--sl-bleed, 4px));--sl-mie: calc(var(--sl-gap, 16px) - var(--sl-bin));--sl-pis: var(--sl-bleed, 4px);--sl-pie: var(--sl-bin)}.sl.sl-sticky .sl-side{position:-webkit-sticky;position:sticky;top:calc(var(--sl-top, 16px) - var(--sl-bleed, 4px));align-self:start;width:calc(var(--sl-side-w, 320px) + var(--sl-bleed, 4px) + var(--sl-bin));padding-block:var(--sl-bleed, 4px);padding-inline-start:var(--sl-pis);padding-inline-end:var(--sl-pie);margin-block-start:calc(-1 * var(--sl-bleed, 4px));margin-block-end:calc(-1 * var(--sl-bleed, 4px));max-height:calc(100vh - (var(--sl-top, 16px) + var(--sl-off, 32px)) + 2 * var(--sl-bleed, 4px));max-height:calc(100dvh - (var(--sl-top, 16px) + var(--sl-off, 32px)) + 2 * var(--sl-bleed, 4px));overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}@media(max-width:640px){.sl.sl-c-sm{grid-template-columns:minmax(0,1fr)}.sl.sl-c-sm .sl-main{grid-column:1;grid-row:auto}.sl.sl-c-sm .sl-side{grid-column:1;grid-row:auto;width:auto;padding:0;margin-inline-start:0;margin-inline-end:0;margin-block-start:0;margin-block-end:0;position:static;top:auto;align-self:auto;max-height:none;overflow-y:visible}.sl.sl-c-sm.sl-first .sl-side{order:-1}}@media(max-width:900px){.sl.sl-c-md{grid-template-columns:minmax(0,1fr)}.sl.sl-c-md .sl-main{grid-column:1;grid-row:auto}.sl.sl-c-md .sl-side{grid-column:1;grid-row:auto;width:auto;padding:0;margin-inline-start:0;margin-inline-end:0;margin-block-start:0;margin-block-end:0;position:static;top:auto;align-self:auto;max-height:none;overflow-y:visible}.sl.sl-c-md.sl-first .sl-side{order:-1}}@media(max-width:1200px){.sl.sl-c-lg{grid-template-columns:minmax(0,1fr)}.sl.sl-c-lg .sl-main{grid-column:1;grid-row:auto}.sl.sl-c-lg .sl-side{grid-column:1;grid-row:auto;width:auto;padding:0;margin-inline-start:0;margin-inline-end:0;margin-block-start:0;margin-block-end:0;position:static;top:auto;align-self:auto;max-height:none;overflow-y:visible}.sl.sl-c-lg.sl-first .sl-side{order:-1}}\n"],
37736
+ dependencies: [{
37737
+ kind: "directive",
37738
+ type: NgTemplateOutlet,
37739
+ selector: "[ngTemplateOutlet]",
37740
+ inputs: [
37741
+ "ngTemplateOutletContext",
37742
+ "ngTemplateOutlet",
37743
+ "ngTemplateOutletInjector"
37744
+ ]
37745
+ }],
37620
37746
  changeDetection: i0.ChangeDetectionStrategy.OnPush
37621
37747
  });
37622
37748
  }
@@ -37632,11 +37758,13 @@ i0.ɵɵngDeclareClassMetadata({
37632
37758
  selector: "ui-sidebar-layout",
37633
37759
  standalone: true,
37634
37760
  changeDetection: ChangeDetectionStrategy.OnPush,
37761
+ imports: [NgTemplateOutlet],
37635
37762
  host: { "[attr.data-side-position]": "position()" },
37636
- template: `<div class="sl" [class]="rootClass()" [style.--sl-side-w]="sideCss()" [style.--sl-gap]="gapCss()" [style.--sl-top]="topCss()" [style.--sl-off]="offCss()" [style.row-gap]="gapCss()"><div class="sl-main"><ng-content select="[layout-main]" /></div><div class="sl-side"><ng-content select="[layout-side]" /></div></div>`,
37637
- styles: [":host{display:block}.sl{display:grid;grid-template-columns:minmax(0,1fr) auto}.sl-main{grid-column:1;grid-row:1;min-width:0}.sl-side{grid-column:2;grid-row:1;box-sizing:border-box;width:var(--sl-side-w, 320px);max-width:100%;min-width:0;margin-inline-start:var(--sl-gap, 16px)}.sl-side:empty{display:none}.sl.sl-start{grid-template-columns:auto minmax(0,1fr)}.sl.sl-start .sl-main{grid-column:2}.sl.sl-start .sl-side{grid-column:1;margin-inline-start:0;margin-inline-end:var(--sl-gap, 16px)}.sl.sl-sticky .sl-side{position:-webkit-sticky;position:sticky;top:var(--sl-top, 16px);align-self:start;max-height:calc(100vh - (var(--sl-top, 16px) + var(--sl-off, 32px)));max-height:calc(100dvh - (var(--sl-top, 16px) + var(--sl-off, 32px)));overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}@media(max-width:640px){.sl.sl-c-sm{grid-template-columns:minmax(0,1fr)}.sl.sl-c-sm .sl-main{grid-column:1;grid-row:auto}.sl.sl-c-sm .sl-side{grid-column:1;grid-row:auto;width:auto;margin-inline-start:0;margin-inline-end:0;position:static;top:auto;align-self:auto;max-height:none;overflow-y:visible}.sl.sl-c-sm.sl-first .sl-side{order:-1}}@media(max-width:900px){.sl.sl-c-md{grid-template-columns:minmax(0,1fr)}.sl.sl-c-md .sl-main{grid-column:1;grid-row:auto}.sl.sl-c-md .sl-side{grid-column:1;grid-row:auto;width:auto;margin-inline-start:0;margin-inline-end:0;position:static;top:auto;align-self:auto;max-height:none;overflow-y:visible}.sl.sl-c-md.sl-first .sl-side{order:-1}}@media(max-width:1200px){.sl.sl-c-lg{grid-template-columns:minmax(0,1fr)}.sl.sl-c-lg .sl-main{grid-column:1;grid-row:auto}.sl.sl-c-lg .sl-side{grid-column:1;grid-row:auto;width:auto;margin-inline-start:0;margin-inline-end:0;position:static;top:auto;align-self:auto;max-height:none;overflow-y:visible}.sl.sl-c-lg.sl-first .sl-side{order:-1}}\n"]
37763
+ template: `<div class="sl" [class]="rootClass()" [attr.data-dom-order]="domOrder()" [style.--sl-side-w]="sideCss()" [style.--sl-gap]="gapCss()" [style.--sl-top]="topCss()" [style.--sl-off]="offCss()" [style.--sl-bleed]="bleedCss()" [style.row-gap]="gapCss()">@if (domSideFirst()) {<ng-container [ngTemplateOutlet]="sideTpl" /><ng-container [ngTemplateOutlet]="mainTpl" />} @else {<ng-container [ngTemplateOutlet]="mainTpl" /><ng-container [ngTemplateOutlet]="sideTpl" />}</div><ng-template #mainTpl><div class="sl-main"><ng-content select="[layout-main]" /></div></ng-template><ng-template #sideTpl><div class="sl-side"><ng-content select="[layout-side]" /></div></ng-template>`,
37764
+ styles: [":host{display:block}.sl{display:grid;grid-template-columns:minmax(0,1fr) auto;--sl-mis: var(--sl-gap, 16px);--sl-mie: 0px}.sl-main{grid-column:1;grid-row:1;min-width:0}.sl-side{grid-column:2;grid-row:1;box-sizing:border-box;width:var(--sl-side-w, 320px);min-width:0;margin-inline-start:var(--sl-mis);margin-inline-end:var(--sl-mie)}.sl-side:empty{display:none}.sl.sl-start{grid-template-columns:auto minmax(0,1fr);--sl-mis: 0px;--sl-mie: var(--sl-gap, 16px)}.sl.sl-start .sl-main{grid-column:2}.sl.sl-start .sl-side{grid-column:1}.sl.sl-sticky{--sl-bin: min(var(--sl-bleed, 4px), var(--sl-gap, 16px));--sl-mis: calc(var(--sl-gap, 16px) - var(--sl-bin));--sl-mie: calc(-1 * var(--sl-bleed, 4px));--sl-pis: var(--sl-bin);--sl-pie: var(--sl-bleed, 4px)}.sl.sl-sticky.sl-start{--sl-mis: calc(-1 * var(--sl-bleed, 4px));--sl-mie: calc(var(--sl-gap, 16px) - var(--sl-bin));--sl-pis: var(--sl-bleed, 4px);--sl-pie: var(--sl-bin)}.sl.sl-sticky .sl-side{position:-webkit-sticky;position:sticky;top:calc(var(--sl-top, 16px) - var(--sl-bleed, 4px));align-self:start;width:calc(var(--sl-side-w, 320px) + var(--sl-bleed, 4px) + var(--sl-bin));padding-block:var(--sl-bleed, 4px);padding-inline-start:var(--sl-pis);padding-inline-end:var(--sl-pie);margin-block-start:calc(-1 * var(--sl-bleed, 4px));margin-block-end:calc(-1 * var(--sl-bleed, 4px));max-height:calc(100vh - (var(--sl-top, 16px) + var(--sl-off, 32px)) + 2 * var(--sl-bleed, 4px));max-height:calc(100dvh - (var(--sl-top, 16px) + var(--sl-off, 32px)) + 2 * var(--sl-bleed, 4px));overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}@media(max-width:640px){.sl.sl-c-sm{grid-template-columns:minmax(0,1fr)}.sl.sl-c-sm .sl-main{grid-column:1;grid-row:auto}.sl.sl-c-sm .sl-side{grid-column:1;grid-row:auto;width:auto;padding:0;margin-inline-start:0;margin-inline-end:0;margin-block-start:0;margin-block-end:0;position:static;top:auto;align-self:auto;max-height:none;overflow-y:visible}.sl.sl-c-sm.sl-first .sl-side{order:-1}}@media(max-width:900px){.sl.sl-c-md{grid-template-columns:minmax(0,1fr)}.sl.sl-c-md .sl-main{grid-column:1;grid-row:auto}.sl.sl-c-md .sl-side{grid-column:1;grid-row:auto;width:auto;padding:0;margin-inline-start:0;margin-inline-end:0;margin-block-start:0;margin-block-end:0;position:static;top:auto;align-self:auto;max-height:none;overflow-y:visible}.sl.sl-c-md.sl-first .sl-side{order:-1}}@media(max-width:1200px){.sl.sl-c-lg{grid-template-columns:minmax(0,1fr)}.sl.sl-c-lg .sl-main{grid-column:1;grid-row:auto}.sl.sl-c-lg .sl-side{grid-column:1;grid-row:auto;width:auto;padding:0;margin-inline-start:0;margin-inline-end:0;margin-block-start:0;margin-block-end:0;position:static;top:auto;align-self:auto;max-height:none;overflow-y:visible}.sl.sl-c-lg.sl-first .sl-side{order:-1}}\n"]
37638
37765
  }]
37639
37766
  }],
37767
+ ctorParameters: () => [],
37640
37768
  propDecorators: {
37641
37769
  sideWidth: [{
37642
37770
  type: i0.Input,
@@ -37701,6 +37829,22 @@ i0.ɵɵngDeclareClassMetadata({
37701
37829
  alias: "sideFirstWhenCollapsed",
37702
37830
  required: false
37703
37831
  }]
37832
+ }],
37833
+ sideFirstInDom: [{
37834
+ type: i0.Input,
37835
+ args: [{
37836
+ isSignal: true,
37837
+ alias: "sideFirstInDom",
37838
+ required: false
37839
+ }]
37840
+ }],
37841
+ sideBleed: [{
37842
+ type: i0.Input,
37843
+ args: [{
37844
+ isSignal: true,
37845
+ alias: "sideBleed",
37846
+ required: false
37847
+ }]
37704
37848
  }]
37705
37849
  }
37706
37850
  });