fiboui 2.6.4 → 2.7.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/README.md +16 -6
- package/dist/cli/bin.js +3 -4
- package/dist/cli/commands/generate/component.js +21 -33
- package/dist/cli/commands/generate/index.js +3 -3
- package/dist/cli/commands/generate/module.js +21 -24
- package/dist/cli/commands/generate/plugin.js +18 -34
- package/dist/cli/commands/init.js +5 -25
- package/dist/cli/config.js +118 -0
- package/dist/cli/names.js +35 -0
- package/dist/cli/templates.js +76 -0
- package/dist/client-CGjHCx8F.js +17621 -0
- package/dist/content.d.ts +1 -0
- package/dist/content.js +14 -14
- package/dist/core.d.ts +2 -0
- package/dist/core.js +65 -59
- package/dist/effects-BxvduC-G.js +14 -0
- package/dist/icons-GEqYd2M9.js +383 -0
- package/dist/index-7bieEGAP.js +944 -0
- package/dist/index-C4qvvr03.js +1474 -0
- package/dist/index-D-ljLuf8.js +839 -0
- package/dist/index-DVApKYWt.js +217 -0
- package/dist/index-Db8lVjta.js +150 -0
- package/dist/index.d.ts +73156 -505
- package/dist/index.js +4419 -2238
- package/dist/interactive.d.ts +2 -0
- package/dist/interactive.js +22 -9
- package/dist/layout.d.ts +1 -0
- package/dist/layout.js +14 -13
- package/dist/metadata-3YYH1uiS.js +147 -0
- package/dist/navigation.d.ts +1 -0
- package/dist/navigation.js +15 -9
- package/dist/page-CYqQOLXe.js +266 -0
- package/dist/server.d.ts +2 -0
- package/dist/server.js +5001 -1777
- package/dist/structure.d.ts +1 -0
- package/dist/structure.js +13 -9
- package/dist/style.css +1 -1
- package/dist/theme.d.ts +2 -0
- package/dist/theme.js +8 -8
- package/package.json +9 -2
- package/dist/Link-YjcbA4af.js +0 -50
- package/dist/PluginManager-BRjgOLVa.js +0 -110
- package/dist/client-DzQ13khL.js +0 -10605
- package/dist/effects-D16XdB_d.js +0 -10
- package/dist/index-B-cCNvV4.js +0 -455
- package/dist/index-Bj-IMHC8.js +0 -119
- package/dist/index-CWyBsVAL.js +0 -608
- package/dist/index-CYisDyI8.js +0 -602
- package/dist/index-Dil2ZG0X.js +0 -1028
- package/dist/mount-CDwiTTXM.js +0 -135
package/dist/index-CYisDyI8.js
DELETED
|
@@ -1,602 +0,0 @@
|
|
|
1
|
-
var V = Object.defineProperty;
|
|
2
|
-
var Z = (r, s, e) => s in r ? V(r, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[s] = e;
|
|
3
|
-
var o = (r, s, e) => Z(r, typeof s != "symbol" ? s + "" : s, e);
|
|
4
|
-
import i from "react";
|
|
5
|
-
import { at as u, au as m, aA as X, av as q, P as G, as as J, $ as K } from "./client-DzQ13khL.js";
|
|
6
|
-
import { P as M } from "./PluginManager-BRjgOLVa.js";
|
|
7
|
-
import { R as Q, I as U } from "./index-Bj-IMHC8.js";
|
|
8
|
-
import { L as ee } from "./Link-YjcbA4af.js";
|
|
9
|
-
class te extends m {
|
|
10
|
-
build() {
|
|
11
|
-
const e = [
|
|
12
|
-
"fibo-center",
|
|
13
|
-
"flex",
|
|
14
|
-
"items-center",
|
|
15
|
-
"justify-center",
|
|
16
|
-
...this._classNames
|
|
17
|
-
].filter(Boolean).join(" "), t = this.getStyle(), n = this.processChildren();
|
|
18
|
-
return i.createElement(
|
|
19
|
-
"div",
|
|
20
|
-
{
|
|
21
|
-
className: e,
|
|
22
|
-
style: t,
|
|
23
|
-
...this._props
|
|
24
|
-
},
|
|
25
|
-
...n
|
|
26
|
-
);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
const ve = u(te);
|
|
30
|
-
class ie extends m {
|
|
31
|
-
constructor() {
|
|
32
|
-
super(...arguments);
|
|
33
|
-
o(this, "_mainAxisAlignment", "start");
|
|
34
|
-
// Flutter Column / SwiftUI VStack default: center. Stretch is opt-in.
|
|
35
|
-
o(this, "_crossAxisAlignment", "center");
|
|
36
|
-
o(this, "_spacing");
|
|
37
|
-
o(this, "_size");
|
|
38
|
-
}
|
|
39
|
-
mainAxisAlignment(e) {
|
|
40
|
-
return this._mainAxisAlignment = e, this;
|
|
41
|
-
}
|
|
42
|
-
crossAxisAlignment(e) {
|
|
43
|
-
return this._crossAxisAlignment = e, this;
|
|
44
|
-
}
|
|
45
|
-
spacing(e) {
|
|
46
|
-
return this._spacing = e, this;
|
|
47
|
-
}
|
|
48
|
-
size(e) {
|
|
49
|
-
return this._size = e, this;
|
|
50
|
-
}
|
|
51
|
-
build() {
|
|
52
|
-
const e = {
|
|
53
|
-
start: "justify-start",
|
|
54
|
-
center: "justify-center",
|
|
55
|
-
end: "justify-end",
|
|
56
|
-
spaceBetween: "justify-between",
|
|
57
|
-
spaceAround: "justify-around",
|
|
58
|
-
spaceEvenly: "justify-evenly"
|
|
59
|
-
}, t = {
|
|
60
|
-
start: "items-start",
|
|
61
|
-
center: "items-center",
|
|
62
|
-
end: "items-end",
|
|
63
|
-
stretch: "items-stretch"
|
|
64
|
-
}, n = {
|
|
65
|
-
small: "flex-[0.3]",
|
|
66
|
-
medium: "flex-1",
|
|
67
|
-
large: "flex-[1.5]"
|
|
68
|
-
}, l = [
|
|
69
|
-
"fibo-column",
|
|
70
|
-
"flex",
|
|
71
|
-
"flex-col",
|
|
72
|
-
// min-w-0: allow shrink inside flex/grid so wide children (tables, nowrap) don't blow the track
|
|
73
|
-
this.isHug() ? "w-auto self-auto" : "w-full min-w-0",
|
|
74
|
-
e[this._mainAxisAlignment],
|
|
75
|
-
t[this._crossAxisAlignment],
|
|
76
|
-
this._size ? n[this._size] : "",
|
|
77
|
-
...this._classNames
|
|
78
|
-
], a = this.getStyle();
|
|
79
|
-
this._spacing && (typeof this._spacing == "number" ? a.gap = `${this._spacing}px` : isNaN(Number(this._spacing)) ? a.gap = this._spacing : a.gap = `${Number(this._spacing) * 4}px`);
|
|
80
|
-
const c = l.filter(Boolean).join(" "), h = this.processChildren();
|
|
81
|
-
return i.createElement(
|
|
82
|
-
"div",
|
|
83
|
-
{
|
|
84
|
-
className: c,
|
|
85
|
-
style: a,
|
|
86
|
-
...this._props
|
|
87
|
-
},
|
|
88
|
-
...h
|
|
89
|
-
);
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
const we = u(ie);
|
|
93
|
-
class se extends m {
|
|
94
|
-
build() {
|
|
95
|
-
const s = this.getClassName(), e = this.getStyle(), t = this.processChildren();
|
|
96
|
-
return i.createElement(
|
|
97
|
-
"div",
|
|
98
|
-
{
|
|
99
|
-
className: `fibo-container ${s}`,
|
|
100
|
-
style: e,
|
|
101
|
-
...this._props
|
|
102
|
-
},
|
|
103
|
-
...t
|
|
104
|
-
);
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
const Be = u(se);
|
|
108
|
-
function W(r) {
|
|
109
|
-
return typeof r == "number" ? `${r}px` : r;
|
|
110
|
-
}
|
|
111
|
-
class re extends m {
|
|
112
|
-
constructor() {
|
|
113
|
-
super(...arguments);
|
|
114
|
-
o(this, "_height");
|
|
115
|
-
o(this, "_width");
|
|
116
|
-
o(this, "_grow");
|
|
117
|
-
o(this, "_expand");
|
|
118
|
-
}
|
|
119
|
-
height(e) {
|
|
120
|
-
return this._height = e, this;
|
|
121
|
-
}
|
|
122
|
-
width(e) {
|
|
123
|
-
return this._width = e, this;
|
|
124
|
-
}
|
|
125
|
-
vertical() {
|
|
126
|
-
return this._expand = !0, this;
|
|
127
|
-
}
|
|
128
|
-
horizontal() {
|
|
129
|
-
return this._expand = !0, this;
|
|
130
|
-
}
|
|
131
|
-
/** Grow factor inside a Row or Column. Does not turn the spacer into a flex container. */
|
|
132
|
-
flex(e = 1) {
|
|
133
|
-
const t = typeof e == "number" ? e : Number(e);
|
|
134
|
-
return this._grow = Number.isFinite(t) ? t : 1, this._expand = !0, this;
|
|
135
|
-
}
|
|
136
|
-
build() {
|
|
137
|
-
const e = this.getStyle(), t = this._height != null || this._width != null, n = this._expand ?? !t;
|
|
138
|
-
this._height != null && (e.height = W(this._height)), this._width != null && (e.width = W(this._width)), n ? (e.flex = `${this._grow ?? 1} 1 0%`, e.alignSelf = e.alignSelf ?? "stretch", e.minWidth = 0, e.minHeight = 0) : e.flex = "0 0 auto";
|
|
139
|
-
const l = this.getClassName();
|
|
140
|
-
return i.createElement("div", {
|
|
141
|
-
className: `fibo-spacer ${l}`,
|
|
142
|
-
style: e,
|
|
143
|
-
...this._props
|
|
144
|
-
});
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
const ke = u(re), oe = i.memo((r) => {
|
|
148
|
-
const {
|
|
149
|
-
theme: s,
|
|
150
|
-
locale: e,
|
|
151
|
-
providers: t = {},
|
|
152
|
-
className: n,
|
|
153
|
-
style: l,
|
|
154
|
-
children: a,
|
|
155
|
-
overlays: c = []
|
|
156
|
-
} = r, h = /* @__PURE__ */ new Map();
|
|
157
|
-
s && h.set("theme", s), e && h.set("locale", e), Object.entries(t).forEach(([g, p]) => {
|
|
158
|
-
h.set(g, p);
|
|
159
|
-
});
|
|
160
|
-
const f = i.createElement(
|
|
161
|
-
"div",
|
|
162
|
-
{
|
|
163
|
-
className: `fibo-scaffold ${n || ""}`,
|
|
164
|
-
style: {
|
|
165
|
-
height: "100vh",
|
|
166
|
-
overflow: "hidden",
|
|
167
|
-
display: "flex",
|
|
168
|
-
flexDirection: "column",
|
|
169
|
-
position: "relative",
|
|
170
|
-
// Ensure relative positioning for overlays
|
|
171
|
-
...l
|
|
172
|
-
}
|
|
173
|
-
},
|
|
174
|
-
[a, ...c]
|
|
175
|
-
);
|
|
176
|
-
return h.size > 0 ? i.createElement(
|
|
177
|
-
G,
|
|
178
|
-
{
|
|
179
|
-
providers: h,
|
|
180
|
-
children: f
|
|
181
|
-
}
|
|
182
|
-
) : f;
|
|
183
|
-
});
|
|
184
|
-
class ne extends m {
|
|
185
|
-
constructor() {
|
|
186
|
-
super(...arguments);
|
|
187
|
-
o(this, "_locale");
|
|
188
|
-
o(this, "_customProviders", {});
|
|
189
|
-
o(this, "_structure", {});
|
|
190
|
-
o(this, "_headerBar");
|
|
191
|
-
o(this, "_footerBar");
|
|
192
|
-
o(this, "_sideBarLeft");
|
|
193
|
-
o(this, "_sideBarRight");
|
|
194
|
-
}
|
|
195
|
-
locale(e) {
|
|
196
|
-
return this._locale = e, this;
|
|
197
|
-
}
|
|
198
|
-
providers(e) {
|
|
199
|
-
return this._customProviders = { ...this._customProviders, ...e }, this;
|
|
200
|
-
}
|
|
201
|
-
provider(e, t) {
|
|
202
|
-
return this._customProviders[e] = t, this;
|
|
203
|
-
}
|
|
204
|
-
structure(e) {
|
|
205
|
-
return this._structure = { ...this._structure, ...e }, this;
|
|
206
|
-
}
|
|
207
|
-
headerBar(e) {
|
|
208
|
-
return this._headerBar = this._normalizeBar(e), this;
|
|
209
|
-
}
|
|
210
|
-
footerBar(e) {
|
|
211
|
-
return this._footerBar = this._normalizeBar(e), this;
|
|
212
|
-
}
|
|
213
|
-
sideBarLeft(e) {
|
|
214
|
-
return this._sideBarLeft = this._normalizeBar(e), this;
|
|
215
|
-
}
|
|
216
|
-
sideBarRight(e) {
|
|
217
|
-
return this._sideBarRight = this._normalizeBar(e), this;
|
|
218
|
-
}
|
|
219
|
-
_normalizeBar(e) {
|
|
220
|
-
return this._isLayoutBarConfig(e) ? {
|
|
221
|
-
content: i.createElement(i.Fragment, null, ...X(e.children)),
|
|
222
|
-
fixed: e.fixed ?? !1
|
|
223
|
-
} : {
|
|
224
|
-
content: q(e),
|
|
225
|
-
fixed: !1
|
|
226
|
-
};
|
|
227
|
-
}
|
|
228
|
-
_isLayoutBarConfig(e) {
|
|
229
|
-
return !e || typeof e != "object" || i.isValidElement(e) || "build" in e && typeof e.build == "function" ? !1 : "children" in e && !("type" in e);
|
|
230
|
-
}
|
|
231
|
-
build() {
|
|
232
|
-
var y, x, v, w, B, k, N, C, S, z, E, L, R, A, j, I, $, H, O, P, F, D;
|
|
233
|
-
const e = this.processChildren(), t = this._structure, n = this._headerBar && ((y = t.header) == null ? void 0 : y.visible) !== !1, l = this._footerBar && ((x = t.footer) == null ? void 0 : x.visible) !== !1, a = this._sideBarLeft && ((v = t.sidebarLeft) == null ? void 0 : v.visible) !== !1, c = this._sideBarRight && ((w = t.sidebarRight) == null ? void 0 : w.visible) !== !1, h = a && ((B = t.sidebarLeft) == null ? void 0 : B.fullHeight), f = c && ((k = t.sidebarRight) == null ? void 0 : k.fullHeight), g = i.createElement(
|
|
234
|
-
"div",
|
|
235
|
-
{
|
|
236
|
-
key: "scaffold-middle",
|
|
237
|
-
style: {
|
|
238
|
-
flex: 1,
|
|
239
|
-
display: "flex",
|
|
240
|
-
flexDirection: "row",
|
|
241
|
-
overflow: "hidden",
|
|
242
|
-
position: "relative"
|
|
243
|
-
}
|
|
244
|
-
},
|
|
245
|
-
[
|
|
246
|
-
a && !h && i.createElement("div", {
|
|
247
|
-
key: "sidebar-left",
|
|
248
|
-
className: "z-20",
|
|
249
|
-
style: {
|
|
250
|
-
width: (N = t.sidebarLeft) == null ? void 0 : N.width,
|
|
251
|
-
position: ((C = t.sidebarLeft) == null ? void 0 : C.mode) === "over" ? "absolute" : ((S = t.sidebarLeft) == null ? void 0 : S.behavior) === "fixed" || this._sideBarLeft.fixed ? "sticky" : void 0,
|
|
252
|
-
top: ((z = t.sidebarLeft) == null ? void 0 : z.behavior) === "fixed" || this._sideBarLeft.fixed ? 0 : void 0,
|
|
253
|
-
height: ((E = t.sidebarLeft) == null ? void 0 : E.behavior) === "fixed" || this._sideBarLeft.fixed ? "100%" : void 0,
|
|
254
|
-
overflowY: "auto",
|
|
255
|
-
borderRight: "1px solid var(--fibo-outline, #e0e0e0)",
|
|
256
|
-
backgroundColor: "var(--fibo-surface, #ffffff)"
|
|
257
|
-
}
|
|
258
|
-
}, this._sideBarLeft.content),
|
|
259
|
-
i.createElement("main", {
|
|
260
|
-
key: "scaffold-body",
|
|
261
|
-
style: {
|
|
262
|
-
flex: 1,
|
|
263
|
-
display: "flex",
|
|
264
|
-
flexDirection: "column",
|
|
265
|
-
overflow: "auto",
|
|
266
|
-
position: "relative"
|
|
267
|
-
}
|
|
268
|
-
}, e),
|
|
269
|
-
c && !f && i.createElement("div", {
|
|
270
|
-
key: "sidebar-right",
|
|
271
|
-
className: "z-20",
|
|
272
|
-
style: {
|
|
273
|
-
width: (L = t.sidebarRight) == null ? void 0 : L.width,
|
|
274
|
-
position: ((R = t.sidebarRight) == null ? void 0 : R.mode) === "over" ? "absolute" : ((A = t.sidebarRight) == null ? void 0 : A.behavior) === "fixed" || this._sideBarRight.fixed ? "sticky" : void 0,
|
|
275
|
-
top: ((j = t.sidebarRight) == null ? void 0 : j.behavior) === "fixed" || this._sideBarRight.fixed ? 0 : void 0,
|
|
276
|
-
height: ((I = t.sidebarRight) == null ? void 0 : I.behavior) === "fixed" || this._sideBarRight.fixed ? "100%" : void 0,
|
|
277
|
-
overflowY: "auto",
|
|
278
|
-
borderLeft: "1px solid var(--fibo-outline, #e0e0e0)",
|
|
279
|
-
backgroundColor: "var(--fibo-surface, #ffffff)"
|
|
280
|
-
}
|
|
281
|
-
}, this._sideBarRight.content)
|
|
282
|
-
].filter(Boolean)
|
|
283
|
-
), p = i.createElement(i.Fragment, null, [
|
|
284
|
-
n && i.createElement("div", {
|
|
285
|
-
key: "header-bar",
|
|
286
|
-
className: "z-30",
|
|
287
|
-
style: {
|
|
288
|
-
height: ($ = t.header) == null ? void 0 : $.height,
|
|
289
|
-
position: ((H = t.header) == null ? void 0 : H.position) || (this._headerBar.fixed ? "sticky" : "static"),
|
|
290
|
-
top: 0,
|
|
291
|
-
backgroundColor: "var(--fibo-surface, #ffffff)",
|
|
292
|
-
zIndex: 30,
|
|
293
|
-
borderBottom: "1px solid var(--fibo-outline, #e0e0e0)"
|
|
294
|
-
}
|
|
295
|
-
}, this._headerBar.content),
|
|
296
|
-
g,
|
|
297
|
-
l && i.createElement("div", {
|
|
298
|
-
key: "footer-bar",
|
|
299
|
-
className: "z-30",
|
|
300
|
-
style: {
|
|
301
|
-
height: (O = t.footer) == null ? void 0 : O.height,
|
|
302
|
-
position: ((P = t.footer) == null ? void 0 : P.position) || (this._footerBar.fixed ? "sticky" : "static"),
|
|
303
|
-
bottom: 0,
|
|
304
|
-
backgroundColor: "var(--fibo-surface, #ffffff)",
|
|
305
|
-
zIndex: 30,
|
|
306
|
-
borderTop: "1px solid var(--fibo-outline, #e0e0e0)"
|
|
307
|
-
}
|
|
308
|
-
}, this._footerBar.content)
|
|
309
|
-
].filter(Boolean));
|
|
310
|
-
let d = i.createElement("div", {
|
|
311
|
-
key: "vertical-stack",
|
|
312
|
-
style: {
|
|
313
|
-
display: "flex",
|
|
314
|
-
flexDirection: "column",
|
|
315
|
-
flex: 1,
|
|
316
|
-
minHeight: "100%",
|
|
317
|
-
height: "100%",
|
|
318
|
-
overflow: "hidden"
|
|
319
|
-
}
|
|
320
|
-
}, p);
|
|
321
|
-
h && (d = i.createElement("div", {
|
|
322
|
-
key: "full-height-left-wrapper",
|
|
323
|
-
style: { display: "flex", flexDirection: "row", flex: 1, height: "100%", overflow: "hidden" }
|
|
324
|
-
}, [
|
|
325
|
-
i.createElement("div", {
|
|
326
|
-
key: "sidebar-left-full",
|
|
327
|
-
style: {
|
|
328
|
-
width: (F = t.sidebarLeft) == null ? void 0 : F.width,
|
|
329
|
-
overflowY: "auto",
|
|
330
|
-
borderRight: "1px solid var(--fibo-outline, #e0e0e0)",
|
|
331
|
-
backgroundColor: "var(--fibo-surface, #ffffff)",
|
|
332
|
-
zIndex: 40
|
|
333
|
-
}
|
|
334
|
-
}, this._sideBarLeft.content),
|
|
335
|
-
d
|
|
336
|
-
])), f && (d = i.createElement("div", {
|
|
337
|
-
key: "full-height-right-wrapper",
|
|
338
|
-
style: { display: "flex", flexDirection: "row", flex: 1, height: "100%", overflow: "hidden" }
|
|
339
|
-
}, [
|
|
340
|
-
d,
|
|
341
|
-
i.createElement("div", {
|
|
342
|
-
key: "sidebar-right-full",
|
|
343
|
-
style: {
|
|
344
|
-
width: (D = t.sidebarRight) == null ? void 0 : D.width,
|
|
345
|
-
overflowY: "auto",
|
|
346
|
-
borderLeft: "1px solid var(--fibo-outline, #e0e0e0)",
|
|
347
|
-
backgroundColor: "var(--fibo-surface, #ffffff)",
|
|
348
|
-
zIndex: 40
|
|
349
|
-
}
|
|
350
|
-
}, this._sideBarRight.content)
|
|
351
|
-
]));
|
|
352
|
-
const _ = M.getInstance().getOverlays().map((T) => T().build()), Y = {
|
|
353
|
-
theme: this._theme,
|
|
354
|
-
locale: this._locale,
|
|
355
|
-
providers: this._customProviders,
|
|
356
|
-
className: this.getClassName(),
|
|
357
|
-
style: this.getStyle(),
|
|
358
|
-
children: d,
|
|
359
|
-
overlays: _
|
|
360
|
-
};
|
|
361
|
-
return i.createElement(oe, Y);
|
|
362
|
-
}
|
|
363
|
-
}
|
|
364
|
-
const Ne = u(ne), le = i.memo((r) => {
|
|
365
|
-
const { height: s = 64, sticky: e, className: t, style: n, children: l, ...a } = r;
|
|
366
|
-
return i.createElement(
|
|
367
|
-
"header",
|
|
368
|
-
{
|
|
369
|
-
className: `flex items-center px-6 border-b border-gray-200 bg-white/80 backdrop-blur-md z-10 w-full ${e ? "sticky top-0" : ""} ${t || ""}`,
|
|
370
|
-
style: { height: s, minHeight: s, ...n },
|
|
371
|
-
...a
|
|
372
|
-
},
|
|
373
|
-
l
|
|
374
|
-
);
|
|
375
|
-
});
|
|
376
|
-
class ae extends m {
|
|
377
|
-
constructor() {
|
|
378
|
-
super(...arguments);
|
|
379
|
-
o(this, "_height", 64);
|
|
380
|
-
o(this, "_sticky", !1);
|
|
381
|
-
}
|
|
382
|
-
height(e) {
|
|
383
|
-
return this._height = e, this._sticky && this.syncStickyOffset(!0), this;
|
|
384
|
-
}
|
|
385
|
-
sticky(e = !0) {
|
|
386
|
-
if (e === !1)
|
|
387
|
-
return this._sticky = !1, this;
|
|
388
|
-
this._sticky = !0;
|
|
389
|
-
const t = e === !0 ? 0 : e;
|
|
390
|
-
return super.sticky(t), this.syncStickyOffset(e), this;
|
|
391
|
-
}
|
|
392
|
-
syncStickyOffset(e) {
|
|
393
|
-
const t = e === !0 || e === !1 ? 0 : e;
|
|
394
|
-
if (typeof t == "number" && typeof this._height == "number") {
|
|
395
|
-
this.publishStickyOffset(t + this._height);
|
|
396
|
-
return;
|
|
397
|
-
}
|
|
398
|
-
if (t === 0 || t === "0" || t === "0px") {
|
|
399
|
-
this.publishStickyOffset(this._height);
|
|
400
|
-
return;
|
|
401
|
-
}
|
|
402
|
-
const n = typeof t == "number" ? `${t}px` : t, l = typeof this._height == "number" ? `${this._height}px` : this._height;
|
|
403
|
-
this.publishStickyOffset(`calc(${n} + ${l})`);
|
|
404
|
-
}
|
|
405
|
-
build() {
|
|
406
|
-
const e = {
|
|
407
|
-
height: this._height,
|
|
408
|
-
sticky: this._sticky,
|
|
409
|
-
className: this.getClassName(),
|
|
410
|
-
style: this.getStyle(),
|
|
411
|
-
children: this.processChildren(),
|
|
412
|
-
...this._props
|
|
413
|
-
};
|
|
414
|
-
return i.createElement(le, e);
|
|
415
|
-
}
|
|
416
|
-
}
|
|
417
|
-
const Ce = u(ae), he = i.memo((r) => {
|
|
418
|
-
const { width: s = 260, collapsed: e, className: t, style: n, children: l, ...a } = r, c = J(), h = (c == null ? void 0 : c.currentPath) ?? "", f = e ? 80 : s, p = M.getInstance().getSidebarItems().map((d, b) => {
|
|
419
|
-
const _ = h === d.path;
|
|
420
|
-
return i.createElement(ee, {
|
|
421
|
-
key: `plugin-item-${d.path || b}`,
|
|
422
|
-
to: d.path,
|
|
423
|
-
className: "no-underline block mb-1",
|
|
424
|
-
children: Q().padding(12).alignItems("center").gap(12).className(`
|
|
425
|
-
transition-colors duration-200 rounded-lg mx-2
|
|
426
|
-
${_ ? "bg-primary/10 text-primary" : "text-gray-600 hover:bg-gray-100"}
|
|
427
|
-
`).children([
|
|
428
|
-
d.icon ? U(d.icon).size(20).build() : null,
|
|
429
|
-
e ? null : K(d.label).style({ fontSize: 14 }).weight(500).build()
|
|
430
|
-
].filter(Boolean)).build()
|
|
431
|
-
});
|
|
432
|
-
});
|
|
433
|
-
return i.createElement(
|
|
434
|
-
"aside",
|
|
435
|
-
{
|
|
436
|
-
className: `flex flex-col border-r border-gray-200 bg-white transition-all duration-300 h-full ${t || ""}`,
|
|
437
|
-
style: { width: f, minWidth: f, ...n },
|
|
438
|
-
...a
|
|
439
|
-
},
|
|
440
|
-
l,
|
|
441
|
-
p
|
|
442
|
-
);
|
|
443
|
-
});
|
|
444
|
-
class ce extends m {
|
|
445
|
-
constructor() {
|
|
446
|
-
super(...arguments);
|
|
447
|
-
o(this, "_width", 260);
|
|
448
|
-
o(this, "_collapsed", !1);
|
|
449
|
-
}
|
|
450
|
-
width(e) {
|
|
451
|
-
return this._width = e, this;
|
|
452
|
-
}
|
|
453
|
-
collapsible(e = !1) {
|
|
454
|
-
return this._collapsed = e, this;
|
|
455
|
-
}
|
|
456
|
-
build() {
|
|
457
|
-
const e = {
|
|
458
|
-
width: this._width,
|
|
459
|
-
collapsed: this._collapsed,
|
|
460
|
-
className: this.getClassName(),
|
|
461
|
-
style: this.getStyle(),
|
|
462
|
-
children: this.processChildren(),
|
|
463
|
-
...this._props
|
|
464
|
-
};
|
|
465
|
-
return i.createElement(he, e);
|
|
466
|
-
}
|
|
467
|
-
}
|
|
468
|
-
const Se = u(ce);
|
|
469
|
-
class de extends m {
|
|
470
|
-
constructor() {
|
|
471
|
-
super(...arguments);
|
|
472
|
-
o(this, "_alignment", "center");
|
|
473
|
-
}
|
|
474
|
-
alignment(e) {
|
|
475
|
-
return this._alignment = e, this;
|
|
476
|
-
}
|
|
477
|
-
build() {
|
|
478
|
-
const n = [
|
|
479
|
-
"grid",
|
|
480
|
-
"grid-cols-1",
|
|
481
|
-
"grid-rows-1",
|
|
482
|
-
"[&>*]:col-start-1",
|
|
483
|
-
"[&>*]:row-start-1",
|
|
484
|
-
{
|
|
485
|
-
center: "place-items-center",
|
|
486
|
-
top: "place-items-start justify-items-center",
|
|
487
|
-
bottom: "place-items-end justify-items-center",
|
|
488
|
-
left: "place-items-start content-center",
|
|
489
|
-
right: "place-items-end content-center",
|
|
490
|
-
topLeft: "place-items-start",
|
|
491
|
-
topRight: "justify-items-end items-start",
|
|
492
|
-
bottomLeft: "justify-items-start items-end",
|
|
493
|
-
bottomRight: "place-items-end"
|
|
494
|
-
}[this._alignment] || "place-items-center",
|
|
495
|
-
...this._classNames
|
|
496
|
-
].filter(Boolean).join(" "), l = this.getStyle(), a = this.processChildren();
|
|
497
|
-
return i.createElement(
|
|
498
|
-
"div",
|
|
499
|
-
{
|
|
500
|
-
className: n,
|
|
501
|
-
style: l,
|
|
502
|
-
...this._props
|
|
503
|
-
},
|
|
504
|
-
...a
|
|
505
|
-
);
|
|
506
|
-
}
|
|
507
|
-
}
|
|
508
|
-
const ze = u(de);
|
|
509
|
-
class fe extends m {
|
|
510
|
-
constructor() {
|
|
511
|
-
super(...arguments);
|
|
512
|
-
o(this, "_sizeHeight");
|
|
513
|
-
}
|
|
514
|
-
sizeHeight(e) {
|
|
515
|
-
return this._sizeHeight = e, this;
|
|
516
|
-
}
|
|
517
|
-
build() {
|
|
518
|
-
const t = ["fibo-line", "flex", "flex-row", ...this._classNames].filter(Boolean).join(" "), n = this.getStyle();
|
|
519
|
-
this._sizeHeight && (n.height = this._sizeHeight);
|
|
520
|
-
const l = this.processChildren();
|
|
521
|
-
return i.createElement(
|
|
522
|
-
"div",
|
|
523
|
-
{
|
|
524
|
-
className: t,
|
|
525
|
-
style: n,
|
|
526
|
-
...this._props
|
|
527
|
-
},
|
|
528
|
-
...l
|
|
529
|
-
);
|
|
530
|
-
}
|
|
531
|
-
}
|
|
532
|
-
const Ee = u(fe);
|
|
533
|
-
function ue(...r) {
|
|
534
|
-
return (s) => {
|
|
535
|
-
for (const e of r)
|
|
536
|
-
e && (typeof e == "function" ? e(s) : e.current = s);
|
|
537
|
-
};
|
|
538
|
-
}
|
|
539
|
-
class me extends m {
|
|
540
|
-
constructor() {
|
|
541
|
-
super(...arguments);
|
|
542
|
-
o(this, "_direction", "vertical");
|
|
543
|
-
o(this, "_scrollbar", "auto");
|
|
544
|
-
o(this, "_controller");
|
|
545
|
-
}
|
|
546
|
-
direction(e) {
|
|
547
|
-
return this._direction = e, this;
|
|
548
|
-
}
|
|
549
|
-
horizontal() {
|
|
550
|
-
return this._direction = "horizontal", this;
|
|
551
|
-
}
|
|
552
|
-
vertical() {
|
|
553
|
-
return this._direction = "vertical", this;
|
|
554
|
-
}
|
|
555
|
-
scrollbar(e) {
|
|
556
|
-
return this._scrollbar = e, this;
|
|
557
|
-
}
|
|
558
|
-
/** Attach a ScrollController for programmatic scroll (carousel prev/next). */
|
|
559
|
-
controller(e) {
|
|
560
|
-
return this._controller = e, this;
|
|
561
|
-
}
|
|
562
|
-
build() {
|
|
563
|
-
const e = {
|
|
564
|
-
overflowX: this._direction === "horizontal" || this._direction === "both" ? "auto" : "hidden",
|
|
565
|
-
overflowY: this._direction === "vertical" || this._direction === "both" ? "auto" : "hidden",
|
|
566
|
-
WebkitOverflowScrolling: "touch",
|
|
567
|
-
display: "flex",
|
|
568
|
-
flexDirection: this._direction === "horizontal" ? "row" : "column",
|
|
569
|
-
...this.getStyle()
|
|
570
|
-
}, t = [...this.getClassName().split(" ").filter(Boolean)];
|
|
571
|
-
this._scrollbar === "hidden" && (t.push("scrollbar-hide"), e.scrollbarWidth = "none", e.msOverflowStyle = "none");
|
|
572
|
-
const n = this._controller, l = this._props.ref, { ref: a, ...c } = this._props, h = ue(
|
|
573
|
-
(f) => {
|
|
574
|
-
n == null || n.attach(f);
|
|
575
|
-
},
|
|
576
|
-
l
|
|
577
|
-
);
|
|
578
|
-
return i.createElement(
|
|
579
|
-
"div",
|
|
580
|
-
{
|
|
581
|
-
className: t.join(" "),
|
|
582
|
-
style: e,
|
|
583
|
-
ref: h,
|
|
584
|
-
...c
|
|
585
|
-
},
|
|
586
|
-
...this.processChildren()
|
|
587
|
-
);
|
|
588
|
-
}
|
|
589
|
-
}
|
|
590
|
-
const Le = u(me);
|
|
591
|
-
export {
|
|
592
|
-
ve as C,
|
|
593
|
-
Ce as H,
|
|
594
|
-
Ee as L,
|
|
595
|
-
ke as S,
|
|
596
|
-
ze as Z,
|
|
597
|
-
we as a,
|
|
598
|
-
Be as b,
|
|
599
|
-
Ne as c,
|
|
600
|
-
Se as d,
|
|
601
|
-
Le as e
|
|
602
|
-
};
|