@rebilly/revel 13.6.10 → 13.8.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,5 @@
1
- ## 13.6.10 (2026-10-26)
1
+ ## 13.8.0 (2026-10-27)
2
2
 
3
- ### 🧱 Updated Dependencies
3
+ ### Features
4
4
 
5
- - Updated eslint-config to 4.32.14
5
+ - **recomm, revel:** Update accepted file types for Replay media ([#30474](https://github.com/Rebilly/rebilly/pull/30474))
@@ -9,6 +9,7 @@ function e(e) {
9
9
  "image/png": "PNG",
10
10
  "image/gif": "GIF",
11
11
  "image/webp": "WEBP",
12
+ "image/svg+xml": "SVG",
12
13
  "application/pdf": "PDF",
13
14
  "application/zip": "ZIP",
14
15
  "application/msword": "DOC",
@@ -50,11 +50,23 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
50
50
  type: BooleanConstructor;
51
51
  default: boolean;
52
52
  };
53
+ /**
54
+ * Pin the tab list to the top of the nearest scroll parent once it
55
+ * scrolls out of view. When that scroll parent has a header child,
56
+ * the tab list sits below the header.
57
+ */
58
+ sticky: {
59
+ type: BooleanConstructor;
60
+ default: boolean;
61
+ };
53
62
  }>, {
54
63
  tabItemLinkRefs: import("vue").Ref<HTMLElement[], HTMLElement[]>;
55
64
  tablistRef: import("vue").Ref<HTMLElement | null, HTMLElement | null>;
65
+ stickyHostRef: import("vue").Ref<HTMLElement | null, HTMLElement | null>;
66
+ stickySentinelRef: import("vue").Ref<HTMLElement | null, HTMLElement | null>;
56
67
  layoutVersion: import("vue").Ref<number, number>;
57
68
  recomputeIndicator: () => void;
69
+ isStuck: import("vue").Ref<boolean, boolean>;
58
70
  }, State, {
59
71
  visibleTabs(): {
60
72
  tabId: string;
@@ -136,11 +148,21 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
136
148
  type: BooleanConstructor;
137
149
  default: boolean;
138
150
  };
151
+ /**
152
+ * Pin the tab list to the top of the nearest scroll parent once it
153
+ * scrolls out of view. When that scroll parent has a header child,
154
+ * the tab list sits below the header.
155
+ */
156
+ sticky: {
157
+ type: BooleanConstructor;
158
+ default: boolean;
159
+ };
139
160
  }>> & Readonly<{
140
161
  "onTab-selected"?: ((...args: any[]) => any) | undefined;
141
162
  }>, {
142
163
  lazy: boolean;
143
164
  showValidateMessages: boolean;
165
+ sticky: boolean;
144
166
  divided: boolean;
145
167
  menuClass: string;
146
168
  contentClass: string;
@@ -1,72 +1,90 @@
1
1
  import e from "../../_virtual/_plugin-vue_export-helper.mjs";
2
2
  import t from "./r-tabs.vue_vue_type_script_lang.mjs";
3
3
  /* empty css */
4
- import { Fragment as n, createElementBlock as r, createElementVNode as i, createTextVNode as a, normalizeClass as o, normalizeStyle as s, openBlock as c, renderList as l, renderSlot as u, resolveDirective as d, toDisplayString as f, vShow as p, withDirectives as m } from "vue";
4
+ import { Fragment as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createTextVNode as o, normalizeClass as s, normalizeStyle as c, openBlock as l, renderList as u, renderSlot as d, resolveDirective as f, toDisplayString as p, vShow as m, withDirectives as h } from "vue";
5
5
  //#region src/components/r-tabs/r-tabs.vue
6
- var h = [
6
+ var g = {
7
+ key: 0,
8
+ ref: "stickySentinelRef",
9
+ class: "r-tab-sticky-sentinel",
10
+ "aria-hidden": "true"
11
+ }, _ = [
7
12
  "id",
8
13
  "to",
9
14
  "aria-selected",
10
15
  "aria-controls",
11
16
  "onClick"
12
- ], g = [
17
+ ], v = [
13
18
  "id",
14
19
  "aria-selected",
15
20
  "aria-controls",
16
21
  "onClick"
17
22
  ];
18
- function _(e, t, _, v, y, b) {
19
- let x = d("tooltip");
20
- return c(), r("div", null, [i("div", {
21
- ref: "tablistRef",
22
- class: o(["r-tab", [{ "r-tab-divided": e.divided }, e.menuClass]]),
23
- role: "tablist"
24
- }, [(c(!0), r(n, null, l(e.visibleTabs, (t, n) => m((c(), r("div", {
25
- key: t.tabId,
26
- class: "r-tab-item"
27
- }, [t.to ? (c(), r("button", {
28
- key: 0,
29
- id: t.tabId,
30
- ref_for: !0,
31
- ref: "tabItemLinkRefs",
32
- to: t.to,
33
- role: "tab",
34
- "aria-selected": t.isActive,
35
- "aria-controls": t.tabPanelId,
36
- class: o(["r-tab-item-link", {
37
- "r-is-active": t.isActive,
38
- "r-is-error": t.isInvalid,
39
- "r-has-error": t.isInvalid
40
- }]),
41
- onClick: (r) => e.selectTab(t, n)
42
- }, [u(e.$slots, "label", {
43
- tab: t,
44
- index: n
45
- }, () => [a(f(e.getTabName(t, n)), 1)])], 10, h)) : (c(), r("button", {
46
- key: 1,
47
- id: t.tabId,
48
- ref_for: !0,
49
- ref: "tabItemLinkRefs",
50
- role: "tab",
51
- "aria-selected": t.isActive,
52
- "aria-controls": t.tabPanelId,
53
- class: o(["r-tab-item-link", {
54
- "r-is-active": t.isActive,
55
- "r-is-error": t.isInvalid,
56
- "r-has-error": t.isInvalid
57
- }]),
58
- onClick: (r) => e.selectTab(t, n)
59
- }, [u(e.$slots, "label", {
60
- tab: t,
61
- index: n
62
- }, () => [a(f(e.getTabName(t, n)), 1)])], 10, g))])), [[x, { text: t.isInvalid && e.showValidateMessages ? t.validateErrorMessages.join("\n") : null }]])), 128)), m(i("div", {
63
- class: o(["r-tab-item-indicator", { "r-is-error": e.isInvalidTab }]),
64
- style: s({
65
- width: e.visibleTabIndicatorWidth + "px",
66
- left: e.visibleTabIndicatorPosition + "px"
67
- })
68
- }, null, 6), [[p, e.isIndicatorReady]])], 2), i("div", { class: o(["r-tab-content", e.contentClass]) }, [u(e.$slots, "default")], 2)]);
23
+ function y(e, t, y, b, x, S) {
24
+ let C = f("tooltip");
25
+ return l(), i("div", null, [
26
+ e.sticky ? (l(), i("div", g, null, 512)) : r("", !0),
27
+ a("div", {
28
+ ref: "stickyHostRef",
29
+ class: s(["r-tab-sticky-host", {
30
+ "r-is-sticky": e.sticky,
31
+ "r-is-stuck": e.isStuck
32
+ }])
33
+ }, [a("div", {
34
+ ref: "tablistRef",
35
+ class: s(["r-tab", [{
36
+ "r-tab-divided": e.divided,
37
+ "r-is-sticky": e.sticky
38
+ }, e.menuClass]]),
39
+ role: "tablist"
40
+ }, [(l(!0), i(n, null, u(e.visibleTabs, (t, n) => h((l(), i("div", {
41
+ key: t.tabId,
42
+ class: "r-tab-item"
43
+ }, [t.to ? (l(), i("button", {
44
+ key: 0,
45
+ id: t.tabId,
46
+ ref_for: !0,
47
+ ref: "tabItemLinkRefs",
48
+ to: t.to,
49
+ role: "tab",
50
+ "aria-selected": t.isActive,
51
+ "aria-controls": t.tabPanelId,
52
+ class: s(["r-tab-item-link", {
53
+ "r-is-active": t.isActive,
54
+ "r-is-error": t.isInvalid,
55
+ "r-has-error": t.isInvalid
56
+ }]),
57
+ onClick: (r) => e.selectTab(t, n)
58
+ }, [d(e.$slots, "label", {
59
+ tab: t,
60
+ index: n
61
+ }, () => [o(p(e.getTabName(t, n)), 1)])], 10, _)) : (l(), i("button", {
62
+ key: 1,
63
+ id: t.tabId,
64
+ ref_for: !0,
65
+ ref: "tabItemLinkRefs",
66
+ role: "tab",
67
+ "aria-selected": t.isActive,
68
+ "aria-controls": t.tabPanelId,
69
+ class: s(["r-tab-item-link", {
70
+ "r-is-active": t.isActive,
71
+ "r-is-error": t.isInvalid,
72
+ "r-has-error": t.isInvalid
73
+ }]),
74
+ onClick: (r) => e.selectTab(t, n)
75
+ }, [d(e.$slots, "label", {
76
+ tab: t,
77
+ index: n
78
+ }, () => [o(p(e.getTabName(t, n)), 1)])], 10, v))])), [[C, { text: t.isInvalid && e.showValidateMessages ? t.validateErrorMessages.join("\n") : null }]])), 128)), h(a("div", {
79
+ class: s(["r-tab-item-indicator", { "r-is-error": e.isInvalidTab }]),
80
+ style: c({
81
+ width: e.visibleTabIndicatorWidth + "px",
82
+ left: e.visibleTabIndicatorPosition + "px"
83
+ })
84
+ }, null, 6), [[m, e.isIndicatorReady]])], 2)], 2),
85
+ a("div", { class: s(["r-tab-content", e.contentClass]) }, [d(e.$slots, "default")], 2)
86
+ ]);
69
87
  }
70
- var v = /*#__PURE__*/ e(t, [["render", _]]);
88
+ var b = /*#__PURE__*/ e(t, [["render", y]]);
71
89
  //#endregion
72
- export { v as default };
90
+ export { b as default };
@@ -2,9 +2,22 @@ import { capitalizeFirstLetter as e } from "../../common/helpers/capitalize-firs
2
2
  import { debounce as t } from "../../vendor/es-toolkit/dist/compat/function/debounce.mjs";
3
3
  import { isKebabCase as n } from "../../common/helpers/is-kebab-case.mjs";
4
4
  import { RTooltipDirective as r } from "../../directives/r-tooltip/r-tooltip.mjs";
5
- import { computed as i, defineComponent as a, onBeforeUnmount as o, onMounted as s, ref as c } from "vue";
5
+ import { computed as i, defineComponent as a, nextTick as o, onBeforeUnmount as s, onMounted as c, ref as l, watch as u } from "vue";
6
6
  //#region src/components/r-tabs/r-tabs.vue?vue&type=script&lang.ts
7
- var l = a({
7
+ function d(e) {
8
+ let t = e?.parentElement ?? null;
9
+ for (; t;) {
10
+ let { overflowY: e } = window.getComputedStyle(t);
11
+ if (e === "auto" || e === "scroll" || e === "overlay") return t;
12
+ t = t.parentElement;
13
+ }
14
+ return null;
15
+ }
16
+ function f(e) {
17
+ let t = Array.from(e.children).find((e) => e instanceof HTMLElement && e.tagName === "HEADER");
18
+ return t instanceof HTMLElement ? t : null;
19
+ }
20
+ var p = a({
8
21
  name: "RTabs",
9
22
  components: {},
10
23
  directives: { tooltip: r },
@@ -40,22 +53,59 @@ var l = a({
40
53
  lazy: {
41
54
  type: Boolean,
42
55
  default: !0
56
+ },
57
+ sticky: {
58
+ type: Boolean,
59
+ default: !1
43
60
  }
44
61
  },
45
62
  emits: ["tab-selected"],
46
- setup() {
47
- let e = c([]), n = c(null), r = c(0), i = () => {
48
- r.value += 1;
49
- }, a = t(i, 100);
50
- return s(() => {
51
- window.addEventListener("resize", a);
52
- }), o(() => {
53
- window.removeEventListener("resize", a), a.cancel?.();
63
+ setup(e) {
64
+ let n = l([]), r = l(null), i = l(null), a = l(null), p = l(0), m = l(!1), h = null, g = null, _ = !1, v = () => {
65
+ p.value += 1;
66
+ }, y = t(v, 100);
67
+ function b() {
68
+ h?.disconnect(), h = null, g?.disconnect(), g = null, m.value = !1, i.value?.style.removeProperty("--r-tabs-sticky-offset");
69
+ }
70
+ function x(e, t) {
71
+ g?.disconnect(), g = null;
72
+ let n = a.value;
73
+ if (!n || typeof IntersectionObserver > "u") return;
74
+ let r = e === document.documentElement ? null : e, i = new IntersectionObserver(([e]) => {
75
+ if (g !== i) return;
76
+ let t = e?.rootBounds?.top;
77
+ m.value = !!(e && !e.isIntersecting && t != null && e.boundingClientRect.bottom <= t);
78
+ }, {
79
+ root: r,
80
+ rootMargin: `-${Math.round(t)}px 0px 0px 0px`,
81
+ threshold: 0
82
+ });
83
+ g = i, i.observe(n);
84
+ }
85
+ function S() {
86
+ if (b(), !e.sticky) return;
87
+ let t = i.value;
88
+ if (!t) return;
89
+ let n = d(t) ?? document.documentElement, r = f(n), a = () => {
90
+ let e = r ? r.getBoundingClientRect().height : 0;
91
+ t.style.setProperty("--r-tabs-sticky-offset", `${e}px`), x(n, e);
92
+ };
93
+ a(), r && typeof ResizeObserver < "u" && (h = new ResizeObserver(() => a()), h.observe(r));
94
+ }
95
+ return c(() => {
96
+ window.addEventListener("resize", y), _ = !0, S();
97
+ }), s(() => {
98
+ window.removeEventListener("resize", y), y.cancel?.(), _ = !1, b();
99
+ }), u(() => e.sticky, () => {
100
+ _ && o(() => S());
54
101
  }), {
55
- tabItemLinkRefs: e,
56
- tablistRef: n,
57
- layoutVersion: r,
58
- recomputeIndicator: i
102
+ tabItemLinkRefs: n,
103
+ tablistRef: r,
104
+ stickyHostRef: i,
105
+ stickySentinelRef: a,
106
+ layoutVersion: p,
107
+ recomputeIndicator: v,
108
+ isStuck: m
59
109
  };
60
110
  },
61
111
  data: () => ({
@@ -137,4 +187,4 @@ var l = a({
137
187
  }
138
188
  });
139
189
  //#endregion
140
- export { l as default };
190
+ export { p as default };