@db-ux/v-core-components 5.6.0 → 5.6.1

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # @db-ux/v-core-components
2
2
 
3
+ ## 5.6.1
4
+
5
+ ### Patch Changes
6
+
7
+ - fix(DBControlPanel): open drilldown with a transition instead of a clip-path - [see commit b4165ee](https://github.com/db-ux-design-system/core-web/commit/b4165ee83c5c8ae14bfd3b4755c48d8b99bae1a6):
8
+ - open the navigation drilldown with a transition instead of a `clip-path`
9
+ - pin the drilldown overlay to the scroll viewport so it is not shifted up by an existing scroll offset
10
+ - restore the flat-icon navigation indicator and the drilldown group icons
11
+ - recompute the navigation variant on viewport resize so it no longer sticks to popover after switching from drilldown
12
+ - reduce the navigation item and expand button gap to fix wrong icon spacing
13
+ - move `data-icon` / `data-show-icon` for a navigation item group from the group `<li>` to its expand button (CSS-only consumers who hand-write the markup have to move these attributes onto the `.db-control-panel-navigation-item-group-expand-button`)
14
+ - fix(DBPopover): a controlled `open` no longer freezes the page in Angular - [see commit 2f14f69](https://github.com/db-ux-design-system/core-web/commit/2f14f69919bd57853661e90edc8f36915974e306)
15
+ - fix(DBFooterMeta): remove double space before the copyright holder in Angular - [see commit bc83f12](https://github.com/db-ux-design-system/core-web/commit/bc83f1280911791ff8c4a7ab611589825109f332):
16
+ - The copyright sign and its non-breaking space were a text node next to the `copyright` interpolation. For Angular that generated `©&nbsp; {{copyright()}}`, and Angular does not collapse whitespace next to a `&nbsp;`, so the Angular output rendered the line about 3px wider than React and Vue. Sign and space are now part of the interpolated expression, so every target renders the same text.
17
+ - docs(DBIcon): document that the icon is always decorative - [see commit 6d48a36](https://github.com/db-ux-design-system/core-web/commit/6d48a366bf7078e52e029e73103d686a36198bb8):
18
+ - The usage examples showed `<DBIcon icon="x_placeholder">Icon</DBIcon>`, which suggests the child text is rendered somewhere. It is not: the component renders `aria-hidden="true"` and `font-size: 0`, so `text` and children are hidden both visually and from the accessibility tree, and `role` / `aria-label` on the component have no effect either. The examples now show the icon without content, and a new accessibility page explains how to label an informative icon (named wrapper, the parent component's `icon` property, or the `data-icon` attribute).
19
+ - fix(DBShell): stop reserving an empty sub-navigation row on mobile - [see commit bc83f12](https://github.com/db-ux-design-system/core-web/commit/bc83f1280911791ff8c4a7ab611589825109f332):
20
+ - The mobile grid templates declared the `sub-navigation` row unconditionally, while the desktop templates guard it with `:has()`. Without a sub-navigation the empty row captured any unplaced child of `DBShell` -- a `DBFooter` added as a direct child was rendered between the control panel and the content instead of below it. The mobile templates now add the row only when a sub-navigation is present, matching desktop.
21
+ - Also documents the supported composition: a footer belongs in the `endSlot` of `DBShellContent`, not in `DBShell`.
22
+ - fix(DBShell): prevent logo position jump between expanded and collapsed state - [see commit 2fe98a8](https://github.com/db-ux-design-system/core-web/commit/2fe98a82a6a52f40f41593bd437945795f30a7b8)
23
+ - style(Dialog & Drawer): corrected the headlines `font-family` (regular, instead of heading) - [see commit 2938761](https://github.com/db-ux-design-system/core-web/commit/29387612c7834664dbd93102dc09141c021fa159)
24
+
3
25
  ## 5.6.0
4
26
 
5
27
  ### Minor Changes
package/agent/Icon.md CHANGED
@@ -5,19 +5,20 @@
5
5
  ```vue
6
6
  <template>
7
7
  <h1>DBIcon Documentation Examples</h1>
8
- <h2>1. Default Icon</h2>
9
- <DBIcon>Default Icon</DBIcon>
10
- <h2>2. Icon Variants</h2>
11
- <DBIcon icon="user">User Icon</DBIcon>
12
- <DBIcon icon="settings">Settings Icon</DBIcon>
13
- <h2>3. Icon Weights</h2>
14
- <DBIcon weight="16">16px Icon</DBIcon>
15
- <DBIcon weight="24">24px Icon</DBIcon>
16
- <DBIcon weight="32">32px Icon</DBIcon>
17
- <h2>4. Custom Class</h2>
18
- <DBIcon>Custom Class Icon</DBIcon>
19
- <h2>5. Text Content</h2>
20
- <DBIcon text="Icon with Text">Icon with Text</DBIcon>
8
+ <h2>1. Icon Variants</h2>
9
+ <DBIcon icon="user"></DBIcon>
10
+ <DBIcon icon="settings"></DBIcon>
11
+ <h2>2. Icon Weights</h2>
12
+ <DBIcon icon="user" weight="16"></DBIcon>
13
+ <DBIcon icon="user" weight="24"></DBIcon>
14
+ <DBIcon icon="user" weight="32"></DBIcon>
15
+ <h2>3. Custom Class</h2>
16
+ <DBIcon icon="user"></DBIcon>
17
+ <h2>
18
+ 4. Informative icon: DBIcon always renders aria-hidden, so the accessible
19
+ name goes on a wrapper
20
+ </h2>
21
+ <span role="img" aria-label="Coach"><DBIcon icon="coach"></DBIcon></span>
21
22
  </template>
22
23
 
23
24
  <script setup lang="ts">
@@ -38,5 +38,30 @@ export type DBControlPanelNavigationItemGroupDefaultState = {
38
38
  _handleMouseEnter: () => void;
39
39
  _handleMouseLeave: () => void;
40
40
  _setSiblingsInert: (inert: boolean) => void;
41
+ /**
42
+ * The overlay is position: absolute; inset: 0 and anchors to the
43
+ * nearest positioned scroll owner. Which element scrolls depends on
44
+ * the layout (desktop scroll container, mobile drawer scroll
45
+ * container, or the left sub-navigation) and, for a nested level,
46
+ * it is the parent drilldown overlay menu. Rather than guess the
47
+ * owner per layout, walk up from this group and reset the scrollTop
48
+ * of every ancestor that currently has one. That clears the offset
49
+ * on whichever ancestor actually scrolled so the inset:0 overlay
50
+ * aligns with the visible scrollport.
51
+ *
52
+ * The walk stops at the outermost element for the current layout:
53
+ * - desktop main panel: the desktop scroll container
54
+ * - mobile drawer: the mobile drawer scroll container
55
+ * - left sub-navigation: the shell-sub-navigation wrapper, which
56
+ * sits directly above the scroll owner
57
+ * (.db-control-panel-navigation)
58
+ *
59
+ * .db-control-panel-navigation is intentionally NOT a boundary: in
60
+ * the desktop/mobile layouts it is only a descendant of the real
61
+ * scroll container, so stopping there would miss the element that
62
+ * actually scrolled. The document body is the hard backstop and is
63
+ * never itself reset, so the walk can never touch page-level scroll.
64
+ */
65
+ _resetScrollOwner: () => void;
41
66
  };
42
67
  export type DBControlPanelNavigationItemGroupState = DBControlPanelNavigationItemGroupDefaultState & ClickEventState<HTMLButtonElement> & GlobalState & NavigationBehaviorState & InitializedState;
package/dist/db-ux.es.js CHANGED
@@ -1914,7 +1914,7 @@ var S = () => {
1914
1914
  h.value
1915
1915
  ], () => {
1916
1916
  if (T.value && E.value && h.value && (requestAnimationFrame(() => {
1917
- M(), y.value ||= new $().observe(E.value, () => {
1917
+ M(), y.value ||= new $().observe(T.value, () => {
1918
1918
  M();
1919
1919
  });
1920
1920
  }), !C.value)) {
@@ -2294,14 +2294,14 @@ var S = () => {
2294
2294
  }), kn = [
2295
2295
  "id",
2296
2296
  "role",
2297
- "data-icon",
2298
- "data-show-icon",
2299
2297
  "data-active",
2300
2298
  "aria-disabled"
2301
2299
  ], An = [
2302
2300
  "aria-haspopup",
2303
2301
  "aria-controls",
2304
2302
  "aria-expanded",
2303
+ "data-icon",
2304
+ "data-show-icon",
2305
2305
  "disabled"
2306
2306
  ], jn = { class: "db-control-panel-navigation-item-group-expand-button-end-slot-container" }, Mn = [
2307
2307
  "data-initialized",
@@ -2351,7 +2351,7 @@ var S = () => {
2351
2351
  u(() => {
2352
2352
  h.value = !0;
2353
2353
  }), d(() => {
2354
- U(), V(!1), C.value?.disconnect(), C.value = void 0, T.value?.disconnect(), T.value = void 0;
2354
+ W(), V(!1), C.value?.disconnect(), C.value = void 0, T.value?.disconnect(), T.value = void 0;
2355
2355
  }), b(() => [N.value, h.value], () => {
2356
2356
  if (!h.value || !N.value || C.value) return;
2357
2357
  let e = N.value.getAttribute("role") ?? void 0;
@@ -2410,7 +2410,7 @@ var S = () => {
2410
2410
  if (!e || !e.hasAttribute("data-variant")) return;
2411
2411
  let t = e.getAttribute("data-variant"), n = t === "popover";
2412
2412
  if (t === "drilldown" && s.value) {
2413
- if (V(!0), P.value) {
2413
+ if (V(!0), H(), P.value) {
2414
2414
  let e = P.value.querySelector(".db-control-panel-navigation-item a");
2415
2415
  e && e.focus();
2416
2416
  }
@@ -2418,7 +2418,7 @@ var S = () => {
2418
2418
  Yt({
2419
2419
  element: P.value,
2420
2420
  isPopover: n
2421
- }), f.value !== t && (f.value = t, n ? H() : U());
2421
+ }), f.value !== t && (f.value = t, n ? U() : W());
2422
2422
  }
2423
2423
  function L() {
2424
2424
  s.value = !0;
@@ -2455,9 +2455,18 @@ var S = () => {
2455
2455
  }
2456
2456
  }
2457
2457
  function H() {
2458
+ if (!N.value) return;
2459
+ let e = [
2460
+ "db-control-panel-desktop-scroll-container",
2461
+ "db-control-panel-mobile-drawer-scroll-container",
2462
+ "db-shell-sub-navigation"
2463
+ ], t = N.value;
2464
+ for (; t && t !== document.body && (t.scrollTop > 0 && (t.scrollTop = 0), !e.some((e) => t.classList.contains(e)));) t = t.parentElement;
2465
+ }
2466
+ function U() {
2458
2467
  if (O.value || !N.value) return;
2459
2468
  A.value ||= new qt(N.value, P.value), D.value ||= new Nt().observe(F.value, (e) => {
2460
- e.isIntersecting || G();
2469
+ e.isIntersecting || te();
2461
2470
  });
2462
2471
  let e = () => {
2463
2472
  z();
@@ -2475,36 +2484,36 @@ var S = () => {
2475
2484
  focusOut: r
2476
2485
  }, N.value.addEventListener("mouseenter", e), N.value.addEventListener("mouseleave", t), N.value.addEventListener("focusin", n), N.value.addEventListener("focusout", r), O.value = !0;
2477
2486
  }
2478
- function U() {
2487
+ function W() {
2479
2488
  if (!O.value || !N.value) return;
2480
2489
  let e = N.value.__popoverListeners;
2481
2490
  e && (N.value.removeEventListener("mouseenter", e.mouseEnter), N.value.removeEventListener("mouseleave", e.mouseLeave), N.value.removeEventListener("focusin", e.focusIn), N.value.removeEventListener("focusout", e.focusOut), N.value.__popoverListeners = void 0), s.value = !1, O.value = !1, A.value = void 0, D.value &&= (new Nt().unobserve(D.value), void 0);
2482
2491
  }
2483
- function W() {
2492
+ function ee() {
2484
2493
  P.value && I();
2485
2494
  }
2486
- function ee(e) {
2487
- e?.target?.nodeName === "A" && G();
2495
+ function G(e) {
2496
+ e?.target?.nodeName === "A" && te();
2488
2497
  }
2489
- function G() {
2498
+ function te() {
2490
2499
  l.value = !0, k(() => {
2491
2500
  l.value = !1;
2492
2501
  }, 300);
2493
2502
  }
2494
- function te(e) {
2503
+ function ne(e) {
2495
2504
  if (f.value !== "popover" && (s.value = !s.value), F.value && F.value.dataset.isCollapsing === "true") {
2496
2505
  F.value.removeAttribute("data-is-collapsing"), e.stopPropagation();
2497
2506
  return;
2498
2507
  }
2499
2508
  n.onClick && (e.stopPropagation(), n.onClick(e));
2500
2509
  }
2501
- function ne(e) {
2510
+ function K(e) {
2502
2511
  e.stopPropagation(), s.value = !1, k(() => {
2503
2512
  F.value && F.value.focus();
2504
2513
  }, 1);
2505
2514
  }
2506
- function K(e) {
2507
- (!e || e.key === "Escape") && (e?.stopPropagation(), s.value = !1, G(), k(() => {
2515
+ function re(e) {
2516
+ (!e || e.key === "Escape") && (e?.stopPropagation(), s.value = !1, te(), k(() => {
2508
2517
  F.value && F.value.focus();
2509
2518
  }, 1));
2510
2519
  }
@@ -2516,10 +2525,8 @@ var S = () => {
2516
2525
  onMouseover: u[3] ||= async (e) => A.value?.enableFollow(),
2517
2526
  onMouseleave: u[4] ||= async (e) => A.value?.disableFollow(),
2518
2527
  onMousemove: u[5] ||= async (e) => A.value?.followByMouseEvent(e),
2519
- onKeydown: u[6] ||= async (e) => K(e),
2528
+ onKeydown: u[6] ||= async (e) => re(e),
2520
2529
  class: c(v(w)("db-control-panel-navigation-item-group", n.class)),
2521
- "data-icon": e.icon,
2522
- "data-show-icon": v(j)(e.showIcon, "showIcon"),
2523
2530
  "data-active": v(j)(e.active, "active"),
2524
2531
  "aria-disabled": v(j)(e.disabled, "disabled")
2525
2532
  }, [i("button", {
@@ -2530,8 +2537,10 @@ var S = () => {
2530
2537
  "aria-haspopup": v(j)(f.value === "popover" || void 0),
2531
2538
  "aria-controls": e.menuId ?? E.value,
2532
2539
  "aria-expanded": v(j)(s.value),
2540
+ "data-icon": e.icon,
2541
+ "data-show-icon": v(j)(e.showIcon, "showIcon"),
2533
2542
  disabled: v(M)(e.disabled, "disabled"),
2534
- onClick: u[0] ||= async (e) => te(e)
2543
+ onClick: u[0] ||= async (e) => ne(e)
2535
2544
  }, [a(_(e.text) + " ", 1), i("div", jn, [g(t.$slots, "end-slot")])], 8, An), i("menu", {
2536
2545
  class: "db-control-panel-navigation-item-group-menu",
2537
2546
  ref_key: "_menuRef",
@@ -2539,14 +2548,14 @@ var S = () => {
2539
2548
  "data-initialized": v(j)(h.value),
2540
2549
  "data-force-close": v(j)(l.value),
2541
2550
  id: e.menuId ?? E.value,
2542
- onScroll: u[1] ||= async (e) => W(),
2543
- onClick: u[2] ||= async (e) => ee(e)
2551
+ onScroll: u[1] ||= async (e) => ee(),
2552
+ onClick: u[2] ||= async (e) => G(e)
2544
2553
  }, [i("li", Nn, [o(Xe, {
2545
2554
  icon: "arrow_left",
2546
2555
  variant: "ghost",
2547
2556
  id: e.backButtonId,
2548
2557
  noText: !0,
2549
- onClick: (e) => ne(e)
2558
+ onClick: (e) => K(e)
2550
2559
  }, {
2551
2560
  default: x(() => [a(_(e.backButtonText ?? v("Back")), 1), o(Ft, {
2552
2561
  placement: "bottom-start",
@@ -4425,7 +4434,7 @@ var S = () => {
4425
4434
  ref: a,
4426
4435
  id: e.id ?? e.propOverrides?.id,
4427
4436
  class: c(v(w)("db-footer-meta", t.class))
4428
- }, [i("div", si, [e.copyright ? (p(), r("p", ci, "©\xA0" + _(e.copyright), 1)) : n("", !0), i("div", li, [g(o.$slots, "default")])])], 10, oi));
4437
+ }, [i("div", si, [e.copyright ? (p(), r("p", ci, _("©\xA0" + e.copyright), 1)) : n("", !0), i("div", li, [g(o.$slots, "default")])])], 10, oi));
4429
4438
  }
4430
4439
  }), di = [
4431
4440
  "id",
@@ -5607,7 +5616,11 @@ var S = () => {
5607
5616
  immediate: !0,
5608
5617
  flush: "post"
5609
5618
  }), b(() => [t.open], () => {
5610
- t.open != null && (M(t.open, "open") ? x(void 0, !0) : S(void 0, !0));
5619
+ if (t.open == null) return;
5620
+ let e = M(t.open, "open");
5621
+ k(() => {
5622
+ e ? x(void 0, !0) : S(void 0, !0);
5623
+ }, 1);
5611
5624
  }, {
5612
5625
  immediate: !0,
5613
5626
  flush: "post"