@dskripchenko/ui 1.10.0 → 1.11.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.
@@ -10,10 +10,32 @@ export interface UidBreadcrumbProps {
10
10
  collapse?: boolean;
11
11
  /** `collapse` mode: the "…" is a button that opens a menu of the collapsed crumbs. Set `false` for a plain "…". */
12
12
  collapseMenu?: boolean;
13
+ /**
14
+ * `collapse` mode: when even "first › … › current" does not fit, the first
15
+ * crumb collapses into the "…" as well, leaving "… › current". The current
16
+ * crumb stays visible and truncates with an ellipsis.
17
+ */
18
+ collapseFirst?: boolean;
19
+ /**
20
+ * `collapse` mode: an extra element whose width changes re-measure the trail.
21
+ * The trail always watches its own `<nav>` and its parent element; pass an
22
+ * ancestor here when the parent is itself sized by its content (e.g. a flex
23
+ * item without `flex-grow` in a toolbar), so the trail expands again when the
24
+ * room around it grows. A string is a CSS selector matched with `closest()`
25
+ * from the `<nav>`.
26
+ */
27
+ container?: HTMLElement | string | null;
13
28
  }
14
29
  /**
15
30
  * Lay every crumb out at its natural width, then hide middle crumbs (second
16
- * one first) until the rest plus the "…" fits the list.
31
+ * one first) until the rest plus the "…" fits the list. With `collapseFirst`
32
+ * the first crumb goes too when "first › … › current" still does not fit.
33
+ *
34
+ * While measuring nothing in the trail shrinks, so the list gets the room its
35
+ * container can give a full trail: the measured width is the available one
36
+ * even when the trail's parent is sized by its content. Siblings that shrink
37
+ * to make room for a full trail take that room back once it collapses, so the
38
+ * collapsed trail is checked once more and folds further while it overflows.
17
39
  */
18
40
  declare function recompute(): Promise<void>;
19
41
  declare function __VLS_template(): {
@@ -40,6 +62,8 @@ declare const __VLS_component: import('vue').DefineComponent<UidBreadcrumbProps,
40
62
  nowrap: boolean;
41
63
  collapse: boolean;
42
64
  collapseMenu: boolean;
65
+ collapseFirst: boolean;
66
+ container: HTMLElement | string | null;
43
67
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
44
68
  navRef: HTMLElement;
45
69
  listRef: HTMLOListElement;