@floegence/floe-webapp-core 0.87.4 → 0.88.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/dist/components/icons/ActivityRailGlyph.d.ts +18 -0
- package/dist/components/icons/ActivityRailGlyph.js +76 -0
- package/dist/components/icons/ActivityRailIcons.d.ts +21 -14
- package/dist/components/icons/ActivityRailIcons.js +104 -65
- package/dist/components/icons/index.d.ts +1 -1
- package/dist/components/layout/ActivityBar.d.ts +1 -0
- package/dist/components/layout/ActivityBar.js +62 -59
- package/dist/components/layout/MobileTabBar.d.ts +1 -0
- package/dist/components/layout/MobileTabBar.js +43 -40
- package/dist/full.js +747 -737
- package/dist/icons.js +128 -118
- package/dist/language.css +21 -0
- package/dist/styles.css +1 -1
- package/package.json +1 -1
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
import { use as R, insert as
|
|
2
|
-
import { createSignal as E, onMount as z, onCleanup as D, Show as
|
|
3
|
-
import { cn as
|
|
1
|
+
import { use as R, insert as u, createComponent as d, effect as _, className as A, setAttribute as v, template as m, Dynamic as j, memo as q, delegateEvents as B } from "solid-js/web";
|
|
2
|
+
import { createSignal as E, onMount as z, onCleanup as D, Show as $, For as F } from "solid-js";
|
|
3
|
+
import { cn as S } from "../../utils/cn.js";
|
|
4
4
|
import { deferNonBlocking as W } from "../../utils/defer.js";
|
|
5
5
|
var H = /* @__PURE__ */ m('<div class="absolute left-0 top-0 bottom-0 w-8 bg-gradient-to-r from-background to-transparent z-10 pointer-events-none">'), N = /* @__PURE__ */ m('<div class="absolute right-0 top-0 bottom-0 w-8 bg-gradient-to-l from-background to-transparent z-10 pointer-events-none">'), T = /* @__PURE__ */ m('<div data-floe-mobile-navigation-actions class="flex shrink-0 border-l border-[var(--floe-line)]">'), P = /* @__PURE__ */ m('<nav data-floe-shell-slot=mobile-tab-bar style=border-top-color:var(--bottom-bar-border)><div class="relative flex h-14"><div class="relative min-w-0 flex-1"><div class="h-full flex items-center overflow-x-auto scrollbar-hide snap-x snap-mandatory"role=tablist aria-orientation=horizontal style=-webkit-overflow-scrolling:touch>'), U = /* @__PURE__ */ m("<span>"), V = /* @__PURE__ */ m('<div class="absolute bottom-0 left-1/2 -translate-x-1/2 w-8 h-0.5 bg-primary rounded-t">'), G = /* @__PURE__ */ m("<button type=button><div></div><span>");
|
|
6
6
|
function Y(e) {
|
|
7
7
|
let a;
|
|
8
|
-
const [
|
|
9
|
-
let
|
|
8
|
+
const [w, b] = E(!1), [i, h] = E(!1);
|
|
9
|
+
let f = null;
|
|
10
10
|
const g = () => {
|
|
11
11
|
a && (b(a.scrollLeft > 0), h(a.scrollLeft < a.scrollWidth - a.clientWidth - 1));
|
|
12
12
|
}, t = () => {
|
|
13
|
-
if (
|
|
13
|
+
if (f === null) {
|
|
14
14
|
if (typeof requestAnimationFrame > "u") {
|
|
15
15
|
g();
|
|
16
16
|
return;
|
|
17
17
|
}
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
f = requestAnimationFrame(() => {
|
|
19
|
+
f = null, g();
|
|
20
20
|
});
|
|
21
21
|
}
|
|
22
|
-
}, o = () => e.items, I = (
|
|
23
|
-
const
|
|
24
|
-
if (
|
|
25
|
-
if (
|
|
26
|
-
W(() =>
|
|
22
|
+
}, o = () => e.items, I = (r) => {
|
|
23
|
+
const l = o()[r];
|
|
24
|
+
if (l) {
|
|
25
|
+
if (l.onClick) {
|
|
26
|
+
W(() => l.onClick());
|
|
27
27
|
return;
|
|
28
28
|
}
|
|
29
|
-
e.onSelect(
|
|
29
|
+
e.onSelect(l.id);
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
32
|
return z(() => {
|
|
33
33
|
g();
|
|
34
|
-
const
|
|
35
|
-
if (
|
|
36
|
-
const
|
|
37
|
-
a.scrollLeft = Math.max(0,
|
|
34
|
+
const r = e.items.findIndex((l) => l.id === e.activeId);
|
|
35
|
+
if (r > 0 && a) {
|
|
36
|
+
const l = a.scrollWidth / e.items.length;
|
|
37
|
+
a.scrollLeft = Math.max(0, l * r - a.clientWidth / 2 + l / 2);
|
|
38
38
|
}
|
|
39
39
|
}), D(() => {
|
|
40
|
-
|
|
40
|
+
f !== null && typeof cancelAnimationFrame < "u" && (cancelAnimationFrame(f), f = null);
|
|
41
41
|
}), (() => {
|
|
42
|
-
var
|
|
43
|
-
typeof
|
|
42
|
+
var r = P(), l = r.firstChild, x = l.firstChild, s = x.firstChild, C = e.ref;
|
|
43
|
+
typeof C == "function" ? R(C, r) : e.ref = r, u(x, d($, {
|
|
44
44
|
get when() {
|
|
45
|
-
return
|
|
45
|
+
return w();
|
|
46
46
|
},
|
|
47
47
|
get children() {
|
|
48
48
|
return H();
|
|
49
49
|
}
|
|
50
|
-
}), s),
|
|
50
|
+
}), s), u(x, d($, {
|
|
51
51
|
get when() {
|
|
52
52
|
return i();
|
|
53
53
|
},
|
|
@@ -55,8 +55,8 @@ function Y(e) {
|
|
|
55
55
|
return N();
|
|
56
56
|
}
|
|
57
57
|
}), s), s.addEventListener("scroll", t);
|
|
58
|
-
var
|
|
59
|
-
return typeof
|
|
58
|
+
var y = a;
|
|
59
|
+
return typeof y == "function" ? R(y, s) : a = s, u(s, d(F, {
|
|
60
60
|
get each() {
|
|
61
61
|
return e.items;
|
|
62
62
|
},
|
|
@@ -78,13 +78,13 @@ function Y(e) {
|
|
|
78
78
|
},
|
|
79
79
|
onKeyboardSelect: (k) => I(k)
|
|
80
80
|
})
|
|
81
|
-
})),
|
|
81
|
+
})), u(l, d($, {
|
|
82
82
|
get when() {
|
|
83
83
|
return e.actions?.length;
|
|
84
84
|
},
|
|
85
85
|
get children() {
|
|
86
86
|
var n = T();
|
|
87
|
-
return
|
|
87
|
+
return u(n, d(F, {
|
|
88
88
|
get each() {
|
|
89
89
|
return e.actions;
|
|
90
90
|
},
|
|
@@ -101,27 +101,27 @@ function Y(e) {
|
|
|
101
101
|
})), n;
|
|
102
102
|
}
|
|
103
103
|
}), null), _((n) => {
|
|
104
|
-
var c = e.hidden, k =
|
|
104
|
+
var c = e.hidden, k = S(
|
|
105
105
|
// Same safe-area rule as TopBar: keep the visual bar height stable, and
|
|
106
106
|
// add safe-area padding on an outer wrapper (avoid squeezing content).
|
|
107
107
|
"relative shrink-0 bg-background border-t border-[var(--floe-line)] safe-bottom safe-left safe-right",
|
|
108
108
|
e.class
|
|
109
109
|
), L = e.ariaLabel;
|
|
110
|
-
return c !== n.e && (
|
|
110
|
+
return c !== n.e && (r.hidden = n.e = c), k !== n.t && A(r, n.t = k), L !== n.a && v(r, "aria-label", n.a = L), n;
|
|
111
111
|
}, {
|
|
112
112
|
e: void 0,
|
|
113
113
|
t: void 0,
|
|
114
114
|
a: void 0
|
|
115
|
-
}),
|
|
115
|
+
}), r;
|
|
116
116
|
})();
|
|
117
117
|
}
|
|
118
118
|
function M(e) {
|
|
119
119
|
let a;
|
|
120
|
-
const
|
|
120
|
+
const w = () => typeof e.item.ariaExpanded == "function" ? e.item.ariaExpanded() : e.item.ariaExpanded;
|
|
121
121
|
z(() => e.item.buttonRef?.(a ?? null)), D(() => e.item.buttonRef?.(null));
|
|
122
122
|
const b = () => typeof e.item.badge == "function" ? e.item.badge() : e.item.badge;
|
|
123
123
|
return (() => {
|
|
124
|
-
var i = G(), h = i.firstChild,
|
|
124
|
+
var i = G(), h = i.firstChild, f = h.nextSibling;
|
|
125
125
|
i.$$keydown = (t) => {
|
|
126
126
|
if (e.action) return;
|
|
127
127
|
let o = null;
|
|
@@ -146,23 +146,26 @@ function M(e) {
|
|
|
146
146
|
t.preventDefault(), e.onKeyboardSelect(o);
|
|
147
147
|
}, i.$$click = () => e.onClick();
|
|
148
148
|
var g = a;
|
|
149
|
-
return typeof g == "function" ? R(g, i) : a = i,
|
|
149
|
+
return typeof g == "function" ? R(g, i) : a = i, u(h, d(j, {
|
|
150
150
|
get component() {
|
|
151
151
|
return e.item.icon;
|
|
152
152
|
},
|
|
153
|
-
class: "w-6 h-6"
|
|
154
|
-
|
|
153
|
+
class: "w-6 h-6",
|
|
154
|
+
get active() {
|
|
155
|
+
return e.isActive || w() === !0;
|
|
156
|
+
}
|
|
157
|
+
}), null), u(h, d($, {
|
|
155
158
|
get when() {
|
|
156
159
|
return b();
|
|
157
160
|
},
|
|
158
161
|
get children() {
|
|
159
162
|
var t = U();
|
|
160
|
-
return
|
|
163
|
+
return u(t, (() => {
|
|
161
164
|
var o = q(() => typeof b() == "number" && b() > 99);
|
|
162
165
|
return () => o() ? "99+" : b();
|
|
163
|
-
})()), _(() =>
|
|
166
|
+
})()), _(() => A(t, S("absolute -top-1 -right-2 min-w-4 h-4 px-1", "flex items-center justify-center", "text-caption font-medium rounded-full", "bg-primary text-primary-foreground"))), t;
|
|
164
167
|
}
|
|
165
|
-
}), null), f
|
|
168
|
+
}), null), u(f, () => e.item.label), u(i, d($, {
|
|
166
169
|
get when() {
|
|
167
170
|
return e.isActive;
|
|
168
171
|
},
|
|
@@ -170,8 +173,8 @@ function M(e) {
|
|
|
170
173
|
return V();
|
|
171
174
|
}
|
|
172
175
|
}), null), _((t) => {
|
|
173
|
-
var o =
|
|
174
|
-
return o !== t.e &&
|
|
176
|
+
var o = S("relative flex-shrink-0 flex flex-col items-center justify-center", "min-w-16 h-full px-4 snap-center", "transition-[color,background-color] duration-[var(--floe-duration-fast)] ease-[var(--floe-ease-out)]", "hover:bg-[var(--floe-state-hover)] focus:outline-none focus-visible:bg-[var(--floe-state-press)]", e.action && "w-16 px-1", w() && "bg-[var(--floe-state-selected)] text-foreground", e.isActive ? "text-[var(--floe-accent-ink)]" : "text-[var(--floe-ink-soft)] active:text-foreground"), I = e.item.label, r = e.action ? void 0 : e.isActive, l = w(), x = e.item.ariaControls, s = e.item.ariaHasPopup, C = e.action ? void 0 : "tab", y = e.action || e.isActive ? 0 : -1, n = S("relative transition-transform duration-[var(--floe-duration-fast)]", e.isActive && "scale-110"), c = S("mt-1 text-caption font-medium truncate max-w-full", e.isActive && "font-semibold");
|
|
177
|
+
return o !== t.e && A(i, t.e = o), I !== t.t && v(i, "aria-label", t.t = I), r !== t.a && v(i, "aria-selected", t.a = r), l !== t.o && v(i, "aria-expanded", t.o = l), x !== t.i && v(i, "aria-controls", t.i = x), s !== t.n && v(i, "aria-haspopup", t.n = s), C !== t.s && v(i, "role", t.s = C), y !== t.h && v(i, "tabindex", t.h = y), n !== t.r && A(h, t.r = n), c !== t.d && A(f, t.d = c), t;
|
|
175
178
|
}, {
|
|
176
179
|
e: void 0,
|
|
177
180
|
t: void 0,
|