@fluid-app/fluid-cli-theme-dev 0.1.172 → 0.1.173
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/dist-cli-preview/.vite/manifest.json +583 -181
- package/dist/dist-cli-preview/account-screens.css +1 -0
- package/dist/dist-cli-preview/account-screens.js +1 -1
- package/dist/dist-cli-preview/chunks/{Breadcrumb-BQKo8hPc.js → Breadcrumb-8-7shsB6.js} +1 -1
- package/dist/dist-cli-preview/chunks/Combobox-m3vSk0_A.js +521 -0
- package/dist/dist-cli-preview/chunks/{ContactsScreen-IsIZ_lQ0.js → ContactsScreen-CBjQOWmH.js} +1523 -1854
- package/dist/dist-cli-preview/chunks/MediaScreen-1akMnH12.js +17379 -0
- package/dist/dist-cli-preview/chunks/{MemberManagementProviders-DiQkiWzc.js → MemberManagementProviders-WSjb3a8B.js} +189 -199
- package/dist/dist-cli-preview/chunks/{MessagingScreen-B8ZxAE0L.js → MessagingScreen-By-jZq6v.js} +27645 -30195
- package/dist/dist-cli-preview/chunks/{MobileActionSheet-DMeTsLlK.js → MobileActionSheet-ERpw3qUF.js} +644 -589
- package/dist/dist-cli-preview/chunks/MySiteScreen-JAGvVMx-.js +1706 -0
- package/dist/dist-cli-preview/chunks/OrdersScreen-B1HQVMZC.js +9 -0
- package/dist/dist-cli-preview/chunks/{OrdersScreen-DrZ3SwEu.js → OrdersScreen-Cb32bBjd.js} +35 -35
- package/dist/dist-cli-preview/chunks/PortalTenantClientProvider-CguU_uRG.js +15 -0
- package/dist/dist-cli-preview/chunks/{ProfileScreen-Dxspc-6p.js → ProfileScreen-CCWM6TBs.js} +454 -463
- package/dist/dist-cli-preview/chunks/Select-5fzq5MB-.js +940 -0
- package/dist/dist-cli-preview/chunks/{SubscriptionsScreen-Be0C29uw.js → SubscriptionsScreen-DLdsaVJK.js} +3 -3
- package/dist/dist-cli-preview/chunks/Textarea-xoKqLVgY.js +330 -0
- package/dist/dist-cli-preview/chunks/{account-screen-runtime-DYMunv0A.js → account-screen-runtime-CCBl8DXt.js} +866 -860
- package/dist/dist-cli-preview/chunks/ar-D6LJV1_E.js +679 -0
- package/dist/dist-cli-preview/chunks/{arrow-left-Bd7dJtIV.js → arrow-left-CTYaRdTX.js} +1 -1
- package/dist/dist-cli-preview/chunks/bg-C5Ldmily.js +679 -0
- package/dist/dist-cli-preview/chunks/bn-kfMPWNR6.js +679 -0
- package/dist/dist-cli-preview/chunks/{cli-preview-C7Db08Ij.js → cli-preview-HAt0Lt-9.js} +20 -13
- package/dist/dist-cli-preview/chunks/{client.gen-Ck6Pm2jV.js → client.gen-B7RMYGYu.js} +1 -1
- package/dist/dist-cli-preview/chunks/copy-DHN1DxE_.js +14 -0
- package/dist/dist-cli-preview/chunks/{countries-api-adapter-InKUzF1q.js → countries-api-adapter-B4TefdRP.js} +2 -2
- package/dist/dist-cli-preview/chunks/{create-card-entry-container-C9z7JILL.js → create-card-entry-container-5NqOQ4D_.js} +3612 -3932
- package/dist/dist-cli-preview/chunks/cs-DqEgtV8D.js +679 -0
- package/dist/dist-cli-preview/chunks/da-BbuvL7Gx.js +679 -0
- package/dist/dist-cli-preview/chunks/de-BfJ7rQig.js +679 -0
- package/dist/dist-cli-preview/chunks/el-BO0rLq6D.js +679 -0
- package/dist/dist-cli-preview/chunks/es-BEVtEUXk.js +679 -0
- package/dist/dist-cli-preview/chunks/eye-qMoMW7-Z.js +20 -0
- package/dist/dist-cli-preview/chunks/fi-DjISV3UN.js +679 -0
- package/dist/dist-cli-preview/chunks/fr-1fFd-aKy.js +679 -0
- package/dist/dist-cli-preview/chunks/he-CaT9bwVp.js +679 -0
- package/dist/dist-cli-preview/chunks/{hey-api-client-DGRBsZ7Y.js → hey-api-client-JMNyZwcF.js} +79 -39
- package/dist/dist-cli-preview/chunks/hi-DkzEm57l.js +679 -0
- package/dist/dist-cli-preview/chunks/hr-DqM5N_bj.js +679 -0
- package/dist/dist-cli-preview/chunks/hu-DiLqjo5c.js +679 -0
- package/dist/dist-cli-preview/chunks/id-DA1KmwgX.js +679 -0
- package/dist/dist-cli-preview/chunks/index-BS4PnEcu.js +353 -0
- package/dist/dist-cli-preview/chunks/index-BhMjUmAr.js +2572 -0
- package/dist/dist-cli-preview/chunks/{screen-route-slug-utils-BDjSpDoe.js → index-Dor8vM2o.js} +2417 -3035
- package/dist/dist-cli-preview/chunks/it-CTEVWCRz.js +679 -0
- package/dist/dist-cli-preview/chunks/ja-fxqg1hhg.js +679 -0
- package/dist/dist-cli-preview/chunks/ko-Btp1_5YS.js +679 -0
- package/dist/dist-cli-preview/chunks/lock-DQTMeEw0.js +14 -0
- package/dist/dist-cli-preview/chunks/{log-out-CSPZjXTK.js → log-out-DUdRJX4l.js} +1 -1
- package/dist/dist-cli-preview/chunks/{map-pin-B2ScoijR.js → map-pin-DyIkpqP0.js} +1 -1
- package/dist/dist-cli-preview/chunks/media-vkLeBb90.js +4 -0
- package/dist/dist-cli-preview/chunks/member-permissions-ndhNmlOk.js +19 -0
- package/dist/dist-cli-preview/chunks/{mount-account-screen-5thBUz3X.js → mount-account-screen--gdc5WO_.js} +1869 -1884
- package/dist/dist-cli-preview/chunks/ms-DqRbmHx8.js +679 -0
- package/dist/dist-cli-preview/chunks/navigate-account-screen-AVNopuIP.js +38 -0
- package/dist/dist-cli-preview/chunks/nl-CkPNddxO.js +679 -0
- package/dist/dist-cli-preview/chunks/no-ftcy0RcQ.js +679 -0
- package/dist/dist-cli-preview/chunks/pl-wyJLqfip.js +679 -0
- package/dist/dist-cli-preview/chunks/{plus-CocoE5gC.js → plus-DZjrp536.js} +1 -1
- package/dist/dist-cli-preview/chunks/pt-7uHLacuI.js +679 -0
- package/dist/dist-cli-preview/chunks/ro-Dh12ghww.js +679 -0
- package/dist/dist-cli-preview/chunks/ru-DFM7xWFz.js +679 -0
- package/dist/dist-cli-preview/chunks/{schemas-D94nZk5x.js → schemas-BTblatUV.js} +1107 -1062
- package/dist/dist-cli-preview/chunks/screen-route-slug-utils-DozJp-uc.js +620 -0
- package/dist/dist-cli-preview/chunks/{sheet-haptics-context-iOjKcNDj.js → sheet-haptics-context-CYrEaGtf.js} +3 -3
- package/dist/dist-cli-preview/chunks/sidebar-9qopXeR1.js +598 -0
- package/dist/dist-cli-preview/chunks/sk-CsuNYa1k.js +679 -0
- package/dist/dist-cli-preview/chunks/sortable.esm-Dlen88Fc.js +3283 -0
- package/dist/dist-cli-preview/chunks/{store-api-context-B96Ip2FB.js → store-api-context-B9pW_xao.js} +1 -1
- package/dist/dist-cli-preview/chunks/sv-DVrPaJbh.js +679 -0
- package/dist/dist-cli-preview/chunks/th-BEkMpcVW.js +679 -0
- package/dist/dist-cli-preview/chunks/tl-CqwwplQC.js +679 -0
- package/dist/dist-cli-preview/chunks/tr-XEp4ekrM.js +679 -0
- package/dist/dist-cli-preview/chunks/{trash-2-wVweQZMw.js → trash-2-ClRyi9iY.js} +12 -12
- package/dist/dist-cli-preview/chunks/uk-DWdZFWBl.js +679 -0
- package/dist/dist-cli-preview/chunks/use-mobile-srOt50VV.js +254 -0
- package/dist/dist-cli-preview/chunks/{use-optional-store-lZUz976C.js → use-optional-store-BgrOjfZJ.js} +2 -2
- package/dist/dist-cli-preview/chunks/{use-store-DVmgsDXy.js → use-store-CUSQx1E-.js} +25 -36
- package/dist/dist-cli-preview/chunks/{useInfiniteQuery-Dtzov9uh.js → useInfiniteQuery-DGc8fotv.js} +1 -1
- package/dist/dist-cli-preview/chunks/user-Ca2sKJ-h.js +14 -0
- package/dist/dist-cli-preview/chunks/users-Dh7zTrKY.js +16 -0
- package/dist/dist-cli-preview/chunks/vi-H__PaPsC.js +679 -0
- package/dist/dist-cli-preview/chunks/zh_CN-B62j_w_1.js +679 -0
- package/dist/dist-cli-preview/chunks/zh_TW-CYUIGBvP.js +679 -0
- package/package.json +1 -1
- package/dist/dist-cli-preview/chunks/Combobox-cf11L_T-.js +0 -1455
- package/dist/dist-cli-preview/chunks/MySiteScreen-Dtw1rsF9.js +0 -4950
- package/dist/dist-cli-preview/chunks/OrdersScreen-DkltVCtr.js +0 -9
- package/dist/dist-cli-preview/chunks/sidebar-Ckzom4Xc.js +0 -848
- package/dist/dist-cli-preview/chunks/user-B81IrSgp.js +0 -31
- package/dist/dist-cli-preview/chunks/users-BXTjoCUz.js +0 -27
|
@@ -1,848 +0,0 @@
|
|
|
1
|
-
var T = (t) => {
|
|
2
|
-
throw TypeError(t);
|
|
3
|
-
};
|
|
4
|
-
var A = (t, e, a) => e.has(t) || T("Cannot " + a);
|
|
5
|
-
var d = (t, e, a) => (A(t, e, "read from private field"), a ? a.call(t) : e.get(t)), S = (t, e, a) => e.has(t) ? T("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, a), N = (t, e, a, s) => (A(t, e, "write to private field"), s ? s.call(t, a) : e.set(t, a), a), m = (t, e, a) => (A(t, e, "access private method"), a);
|
|
6
|
-
import { bJ as J, bK as Y, n as Q, l as r, j as i, aL as X, aM as Z, bL as k, ac as ee } from "./account-screen-runtime-DYMunv0A.js";
|
|
7
|
-
var C, f, c, v, h, g, K, _e = (K = class extends J {
|
|
8
|
-
constructor(e) {
|
|
9
|
-
super();
|
|
10
|
-
S(this, h);
|
|
11
|
-
S(this, C);
|
|
12
|
-
S(this, f);
|
|
13
|
-
S(this, c);
|
|
14
|
-
S(this, v);
|
|
15
|
-
N(this, C, e.client), this.mutationId = e.mutationId, N(this, c, e.mutationCache), N(this, f, []), this.state = e.state || te(), this.setOptions(e.options), this.scheduleGc();
|
|
16
|
-
}
|
|
17
|
-
setOptions(e) {
|
|
18
|
-
this.options = e, this.updateGcTime(this.options.gcTime);
|
|
19
|
-
}
|
|
20
|
-
get meta() {
|
|
21
|
-
return this.options.meta;
|
|
22
|
-
}
|
|
23
|
-
addObserver(e) {
|
|
24
|
-
d(this, f).includes(e) || (d(this, f).push(e), this.clearGcTimeout(), d(this, c).notify({
|
|
25
|
-
type: "observerAdded",
|
|
26
|
-
mutation: this,
|
|
27
|
-
observer: e
|
|
28
|
-
}));
|
|
29
|
-
}
|
|
30
|
-
removeObserver(e) {
|
|
31
|
-
N(this, f, d(this, f).filter((a) => a !== e)), this.scheduleGc(), d(this, c).notify({
|
|
32
|
-
type: "observerRemoved",
|
|
33
|
-
mutation: this,
|
|
34
|
-
observer: e
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
optionalRemove() {
|
|
38
|
-
d(this, f).length || (this.state.status === "pending" ? this.scheduleGc() : d(this, c).remove(this));
|
|
39
|
-
}
|
|
40
|
-
continue() {
|
|
41
|
-
return d(this, v)?.continue() ?? // continuing a mutation assumes that variables are set, mutation must have been dehydrated before
|
|
42
|
-
this.execute(this.state.variables);
|
|
43
|
-
}
|
|
44
|
-
async execute(e) {
|
|
45
|
-
const a = () => {
|
|
46
|
-
m(this, h, g).call(this, { type: "continue" });
|
|
47
|
-
}, s = {
|
|
48
|
-
client: d(this, C),
|
|
49
|
-
meta: this.options.meta,
|
|
50
|
-
mutationKey: this.options.mutationKey
|
|
51
|
-
};
|
|
52
|
-
N(this, v, Y({
|
|
53
|
-
fn: () => this.options.mutationFn ? this.options.mutationFn(e, s) : Promise.reject(new Error("No mutationFn found")),
|
|
54
|
-
onFail: (n, u) => {
|
|
55
|
-
m(this, h, g).call(this, { type: "failed", failureCount: n, error: u });
|
|
56
|
-
},
|
|
57
|
-
onPause: () => {
|
|
58
|
-
m(this, h, g).call(this, { type: "pause" });
|
|
59
|
-
},
|
|
60
|
-
onContinue: a,
|
|
61
|
-
retry: this.options.retry ?? 0,
|
|
62
|
-
retryDelay: this.options.retryDelay,
|
|
63
|
-
networkMode: this.options.networkMode,
|
|
64
|
-
canRun: () => d(this, c).canRun(this)
|
|
65
|
-
}));
|
|
66
|
-
const l = this.state.status === "pending", b = !d(this, v).canStart();
|
|
67
|
-
try {
|
|
68
|
-
if (l)
|
|
69
|
-
a();
|
|
70
|
-
else {
|
|
71
|
-
m(this, h, g).call(this, { type: "pending", variables: e, isPaused: b }), d(this, c).config.onMutate && await d(this, c).config.onMutate(
|
|
72
|
-
e,
|
|
73
|
-
this,
|
|
74
|
-
s
|
|
75
|
-
);
|
|
76
|
-
const u = await this.options.onMutate?.(
|
|
77
|
-
e,
|
|
78
|
-
s
|
|
79
|
-
);
|
|
80
|
-
u !== this.state.context && m(this, h, g).call(this, {
|
|
81
|
-
type: "pending",
|
|
82
|
-
context: u,
|
|
83
|
-
variables: e,
|
|
84
|
-
isPaused: b
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
const n = await d(this, v).start();
|
|
88
|
-
return await d(this, c).config.onSuccess?.(
|
|
89
|
-
n,
|
|
90
|
-
e,
|
|
91
|
-
this.state.context,
|
|
92
|
-
this,
|
|
93
|
-
s
|
|
94
|
-
), await this.options.onSuccess?.(
|
|
95
|
-
n,
|
|
96
|
-
e,
|
|
97
|
-
this.state.context,
|
|
98
|
-
s
|
|
99
|
-
), await d(this, c).config.onSettled?.(
|
|
100
|
-
n,
|
|
101
|
-
null,
|
|
102
|
-
this.state.variables,
|
|
103
|
-
this.state.context,
|
|
104
|
-
this,
|
|
105
|
-
s
|
|
106
|
-
), await this.options.onSettled?.(
|
|
107
|
-
n,
|
|
108
|
-
null,
|
|
109
|
-
e,
|
|
110
|
-
this.state.context,
|
|
111
|
-
s
|
|
112
|
-
), m(this, h, g).call(this, { type: "success", data: n }), n;
|
|
113
|
-
} catch (n) {
|
|
114
|
-
try {
|
|
115
|
-
await d(this, c).config.onError?.(
|
|
116
|
-
n,
|
|
117
|
-
e,
|
|
118
|
-
this.state.context,
|
|
119
|
-
this,
|
|
120
|
-
s
|
|
121
|
-
);
|
|
122
|
-
} catch (u) {
|
|
123
|
-
Promise.reject(u);
|
|
124
|
-
}
|
|
125
|
-
try {
|
|
126
|
-
await this.options.onError?.(
|
|
127
|
-
n,
|
|
128
|
-
e,
|
|
129
|
-
this.state.context,
|
|
130
|
-
s
|
|
131
|
-
);
|
|
132
|
-
} catch (u) {
|
|
133
|
-
Promise.reject(u);
|
|
134
|
-
}
|
|
135
|
-
try {
|
|
136
|
-
await d(this, c).config.onSettled?.(
|
|
137
|
-
void 0,
|
|
138
|
-
n,
|
|
139
|
-
this.state.variables,
|
|
140
|
-
this.state.context,
|
|
141
|
-
this,
|
|
142
|
-
s
|
|
143
|
-
);
|
|
144
|
-
} catch (u) {
|
|
145
|
-
Promise.reject(u);
|
|
146
|
-
}
|
|
147
|
-
try {
|
|
148
|
-
await this.options.onSettled?.(
|
|
149
|
-
void 0,
|
|
150
|
-
n,
|
|
151
|
-
e,
|
|
152
|
-
this.state.context,
|
|
153
|
-
s
|
|
154
|
-
);
|
|
155
|
-
} catch (u) {
|
|
156
|
-
Promise.reject(u);
|
|
157
|
-
}
|
|
158
|
-
throw m(this, h, g).call(this, { type: "error", error: n }), n;
|
|
159
|
-
} finally {
|
|
160
|
-
d(this, c).runNext(this);
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
}, C = new WeakMap(), f = new WeakMap(), c = new WeakMap(), v = new WeakMap(), h = new WeakSet(), g = function(e) {
|
|
164
|
-
const a = (s) => {
|
|
165
|
-
switch (e.type) {
|
|
166
|
-
case "failed":
|
|
167
|
-
return {
|
|
168
|
-
...s,
|
|
169
|
-
failureCount: e.failureCount,
|
|
170
|
-
failureReason: e.error
|
|
171
|
-
};
|
|
172
|
-
case "pause":
|
|
173
|
-
return {
|
|
174
|
-
...s,
|
|
175
|
-
isPaused: !0
|
|
176
|
-
};
|
|
177
|
-
case "continue":
|
|
178
|
-
return {
|
|
179
|
-
...s,
|
|
180
|
-
isPaused: !1
|
|
181
|
-
};
|
|
182
|
-
case "pending":
|
|
183
|
-
return {
|
|
184
|
-
...s,
|
|
185
|
-
context: e.context,
|
|
186
|
-
data: void 0,
|
|
187
|
-
failureCount: 0,
|
|
188
|
-
failureReason: null,
|
|
189
|
-
error: null,
|
|
190
|
-
isPaused: e.isPaused,
|
|
191
|
-
status: "pending",
|
|
192
|
-
variables: e.variables,
|
|
193
|
-
submittedAt: Date.now()
|
|
194
|
-
};
|
|
195
|
-
case "success":
|
|
196
|
-
return {
|
|
197
|
-
...s,
|
|
198
|
-
data: e.data,
|
|
199
|
-
failureCount: 0,
|
|
200
|
-
failureReason: null,
|
|
201
|
-
error: null,
|
|
202
|
-
status: "success",
|
|
203
|
-
isPaused: !1
|
|
204
|
-
};
|
|
205
|
-
case "error":
|
|
206
|
-
return {
|
|
207
|
-
...s,
|
|
208
|
-
data: void 0,
|
|
209
|
-
error: e.error,
|
|
210
|
-
failureCount: s.failureCount + 1,
|
|
211
|
-
failureReason: e.error,
|
|
212
|
-
isPaused: !1,
|
|
213
|
-
status: "error"
|
|
214
|
-
};
|
|
215
|
-
}
|
|
216
|
-
};
|
|
217
|
-
this.state = a(this.state), Q.batch(() => {
|
|
218
|
-
d(this, f).forEach((s) => {
|
|
219
|
-
s.onMutationUpdate(e);
|
|
220
|
-
}), d(this, c).notify({
|
|
221
|
-
mutation: this,
|
|
222
|
-
type: "updated",
|
|
223
|
-
action: e
|
|
224
|
-
});
|
|
225
|
-
});
|
|
226
|
-
}, K);
|
|
227
|
-
function te() {
|
|
228
|
-
return {
|
|
229
|
-
context: void 0,
|
|
230
|
-
data: void 0,
|
|
231
|
-
error: null,
|
|
232
|
-
failureCount: 0,
|
|
233
|
-
failureReason: null,
|
|
234
|
-
isPaused: !1,
|
|
235
|
-
status: "idle",
|
|
236
|
-
variables: void 0,
|
|
237
|
-
submittedAt: 0
|
|
238
|
-
};
|
|
239
|
-
}
|
|
240
|
-
const G = 768;
|
|
241
|
-
function ae() {
|
|
242
|
-
const [t, e] = r.useState(!1);
|
|
243
|
-
return r.useEffect(() => {
|
|
244
|
-
const a = window.matchMedia(`(max-width: ${G - 1}px)`), s = () => {
|
|
245
|
-
e(window.innerWidth < G);
|
|
246
|
-
};
|
|
247
|
-
return a.addEventListener("change", s), e(window.innerWidth < G), () => a.removeEventListener("change", s);
|
|
248
|
-
}, []), t;
|
|
249
|
-
}
|
|
250
|
-
function o(...t) {
|
|
251
|
-
return X(Z(t));
|
|
252
|
-
}
|
|
253
|
-
function se({
|
|
254
|
-
className: t,
|
|
255
|
-
orientation: e = "horizontal",
|
|
256
|
-
...a
|
|
257
|
-
}) {
|
|
258
|
-
return /* @__PURE__ */ i.jsx(
|
|
259
|
-
"div",
|
|
260
|
-
{
|
|
261
|
-
role: "separator",
|
|
262
|
-
"aria-orientation": e,
|
|
263
|
-
className: o(
|
|
264
|
-
"bg-border shrink-0",
|
|
265
|
-
e === "horizontal" ? "h-px w-full" : "h-full w-px",
|
|
266
|
-
t
|
|
267
|
-
),
|
|
268
|
-
...a
|
|
269
|
-
}
|
|
270
|
-
);
|
|
271
|
-
}
|
|
272
|
-
function F({
|
|
273
|
-
className: t,
|
|
274
|
-
...e
|
|
275
|
-
}) {
|
|
276
|
-
return /* @__PURE__ */ i.jsx(
|
|
277
|
-
"div",
|
|
278
|
-
{
|
|
279
|
-
className: o("bg-muted animate-pulse rounded-md", t),
|
|
280
|
-
...e
|
|
281
|
-
}
|
|
282
|
-
);
|
|
283
|
-
}
|
|
284
|
-
const H = "13rem", ie = "18rem", W = "3rem", re = "b", q = r.createContext(null);
|
|
285
|
-
function O() {
|
|
286
|
-
const t = r.useContext(q);
|
|
287
|
-
if (!t)
|
|
288
|
-
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
289
|
-
return t;
|
|
290
|
-
}
|
|
291
|
-
const oe = r.forwardRef(
|
|
292
|
-
({
|
|
293
|
-
defaultOpen: t = !0,
|
|
294
|
-
open: e,
|
|
295
|
-
onOpenChange: a,
|
|
296
|
-
viewportWidth: s,
|
|
297
|
-
previewMode: l,
|
|
298
|
-
useBottomNav: b = !1,
|
|
299
|
-
className: n,
|
|
300
|
-
style: u,
|
|
301
|
-
children: w,
|
|
302
|
-
...I
|
|
303
|
-
}, B) => {
|
|
304
|
-
const M = ae(), y = s !== void 0 ? s < 768 : M, z = s !== void 0 || !!l, [j, E] = r.useState(!1), [V, U] = r.useState(t), R = e ?? V, _ = r.useCallback(
|
|
305
|
-
(p) => {
|
|
306
|
-
const x = typeof p == "function" ? p(R) : p;
|
|
307
|
-
a ? a(x) : U(x);
|
|
308
|
-
},
|
|
309
|
-
[a, R]
|
|
310
|
-
), P = r.useCallback(() => y ? E((p) => !p) : _((p) => !p), [y, _, E]);
|
|
311
|
-
r.useEffect(() => {
|
|
312
|
-
const p = (x) => {
|
|
313
|
-
if (x.key === re && (x.metaKey || x.ctrlKey)) {
|
|
314
|
-
const D = document.activeElement;
|
|
315
|
-
if (D?.closest(".group\\/composer") || D?.closest("[data-toolbar]") || D?.classList.contains("ProseMirror"))
|
|
316
|
-
return;
|
|
317
|
-
x.preventDefault(), P();
|
|
318
|
-
}
|
|
319
|
-
};
|
|
320
|
-
return window.addEventListener("keydown", p), () => window.removeEventListener("keydown", p);
|
|
321
|
-
}, [P]);
|
|
322
|
-
const L = R ? "expanded" : "collapsed", $ = r.useMemo(
|
|
323
|
-
() => ({
|
|
324
|
-
state: L,
|
|
325
|
-
open: R,
|
|
326
|
-
setOpen: _,
|
|
327
|
-
isMobile: y,
|
|
328
|
-
openMobile: j,
|
|
329
|
-
setOpenMobile: E,
|
|
330
|
-
toggleSidebar: P,
|
|
331
|
-
isPreviewMode: z,
|
|
332
|
-
useBottomNav: b
|
|
333
|
-
}),
|
|
334
|
-
[
|
|
335
|
-
L,
|
|
336
|
-
R,
|
|
337
|
-
_,
|
|
338
|
-
y,
|
|
339
|
-
j,
|
|
340
|
-
E,
|
|
341
|
-
P,
|
|
342
|
-
z,
|
|
343
|
-
b
|
|
344
|
-
]
|
|
345
|
-
);
|
|
346
|
-
return /* @__PURE__ */ i.jsx(q.Provider, { value: $, children: /* @__PURE__ */ i.jsx(
|
|
347
|
-
"div",
|
|
348
|
-
{
|
|
349
|
-
style: {
|
|
350
|
-
"--sidebar-width": H,
|
|
351
|
-
"--sidebar-width-icon": W,
|
|
352
|
-
...u
|
|
353
|
-
},
|
|
354
|
-
className: o(
|
|
355
|
-
"group/sidebar-wrapper flex min-h-0 w-full flex-1",
|
|
356
|
-
n
|
|
357
|
-
),
|
|
358
|
-
ref: B,
|
|
359
|
-
...I,
|
|
360
|
-
children: w
|
|
361
|
-
}
|
|
362
|
-
) });
|
|
363
|
-
}
|
|
364
|
-
);
|
|
365
|
-
oe.displayName = "SidebarProvider";
|
|
366
|
-
const ne = r.forwardRef(
|
|
367
|
-
({
|
|
368
|
-
side: t = "left",
|
|
369
|
-
variant: e = "sidebar",
|
|
370
|
-
collapsible: a = "offcanvas",
|
|
371
|
-
className: s,
|
|
372
|
-
children: l,
|
|
373
|
-
...b
|
|
374
|
-
}, n) => {
|
|
375
|
-
const {
|
|
376
|
-
isMobile: u,
|
|
377
|
-
state: w,
|
|
378
|
-
openMobile: I,
|
|
379
|
-
setOpenMobile: B,
|
|
380
|
-
isPreviewMode: M,
|
|
381
|
-
useBottomNav: y
|
|
382
|
-
} = O(), z = w === "expanded" ? H : W;
|
|
383
|
-
if (y && u)
|
|
384
|
-
return null;
|
|
385
|
-
if (a === "none")
|
|
386
|
-
return /* @__PURE__ */ i.jsx(
|
|
387
|
-
"div",
|
|
388
|
-
{
|
|
389
|
-
className: o(
|
|
390
|
-
"bg-sidebar text-sidebar-foreground flex w-(--sidebar-width) flex-col rounded-tl-lg",
|
|
391
|
-
M ? "h-full" : "h-[97vh]",
|
|
392
|
-
s
|
|
393
|
-
),
|
|
394
|
-
ref: n,
|
|
395
|
-
...b,
|
|
396
|
-
children: l
|
|
397
|
-
}
|
|
398
|
-
);
|
|
399
|
-
if (u) {
|
|
400
|
-
const j = M ? "absolute" : "fixed";
|
|
401
|
-
return /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
402
|
-
I && /* @__PURE__ */ i.jsx(
|
|
403
|
-
"div",
|
|
404
|
-
{
|
|
405
|
-
className: o(j, "inset-0 z-40 bg-black/50"),
|
|
406
|
-
onClick: () => B(!1),
|
|
407
|
-
"aria-hidden": "true"
|
|
408
|
-
}
|
|
409
|
-
),
|
|
410
|
-
/* @__PURE__ */ i.jsx(
|
|
411
|
-
"div",
|
|
412
|
-
{
|
|
413
|
-
"data-sidebar": "sidebar",
|
|
414
|
-
"data-mobile": "true",
|
|
415
|
-
className: o(
|
|
416
|
-
j,
|
|
417
|
-
"bg-sidebar text-sidebar-foreground top-0 left-0 z-50 h-full w-[--sidebar-width] p-0 transition-transform duration-300 ease-in-out",
|
|
418
|
-
I ? "translate-x-0" : "-translate-x-full",
|
|
419
|
-
s
|
|
420
|
-
),
|
|
421
|
-
style: {
|
|
422
|
-
"--sidebar-width": ie
|
|
423
|
-
},
|
|
424
|
-
ref: n,
|
|
425
|
-
...b,
|
|
426
|
-
children: /* @__PURE__ */ i.jsx("div", { className: "flex h-full w-full flex-col", children: l })
|
|
427
|
-
}
|
|
428
|
-
)
|
|
429
|
-
] });
|
|
430
|
-
}
|
|
431
|
-
return /* @__PURE__ */ i.jsxs(
|
|
432
|
-
"div",
|
|
433
|
-
{
|
|
434
|
-
ref: n,
|
|
435
|
-
className: "group peer bg-sidebar text-sidebar-foreground hidden md:block",
|
|
436
|
-
"data-state": w,
|
|
437
|
-
"data-collapsible": w === "collapsed" ? a : "",
|
|
438
|
-
"data-variant": e,
|
|
439
|
-
"data-side": t,
|
|
440
|
-
style: {
|
|
441
|
-
"--sidebar-width": z
|
|
442
|
-
},
|
|
443
|
-
children: [
|
|
444
|
-
/* @__PURE__ */ i.jsx(
|
|
445
|
-
"div",
|
|
446
|
-
{
|
|
447
|
-
className: o(
|
|
448
|
-
"relative bg-transparent transition-[width] duration-200 ease-linear",
|
|
449
|
-
"group-data-[collapsible=offcanvas]:w-0",
|
|
450
|
-
"group-data-[side=right]:rotate-180",
|
|
451
|
-
e === "floating" || e === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon)"
|
|
452
|
-
)
|
|
453
|
-
}
|
|
454
|
-
),
|
|
455
|
-
/* @__PURE__ */ i.jsx(
|
|
456
|
-
"div",
|
|
457
|
-
{
|
|
458
|
-
className: o(
|
|
459
|
-
"relative inset-y-0 z-[20] hidden w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",
|
|
460
|
-
M ? "h-full" : "h-svh",
|
|
461
|
-
t === "left" ? "left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]" : "right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",
|
|
462
|
-
// Adjust the padding for floating and inset variants.
|
|
463
|
-
e === "floating" || e === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=right]:border-l",
|
|
464
|
-
s
|
|
465
|
-
),
|
|
466
|
-
...b,
|
|
467
|
-
children: /* @__PURE__ */ i.jsx(
|
|
468
|
-
"div",
|
|
469
|
-
{
|
|
470
|
-
"data-sidebar": "sidebar",
|
|
471
|
-
className: "group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",
|
|
472
|
-
children: l
|
|
473
|
-
}
|
|
474
|
-
)
|
|
475
|
-
}
|
|
476
|
-
)
|
|
477
|
-
]
|
|
478
|
-
}
|
|
479
|
-
);
|
|
480
|
-
}
|
|
481
|
-
);
|
|
482
|
-
ne.displayName = "Sidebar";
|
|
483
|
-
const de = r.forwardRef(
|
|
484
|
-
({ className: t, ...e }, a) => {
|
|
485
|
-
const { toggleSidebar: s } = O();
|
|
486
|
-
return /* @__PURE__ */ i.jsx(
|
|
487
|
-
"button",
|
|
488
|
-
{
|
|
489
|
-
ref: a,
|
|
490
|
-
"data-sidebar": "rail",
|
|
491
|
-
"aria-label": "Toggle Sidebar",
|
|
492
|
-
tabIndex: -1,
|
|
493
|
-
onClick: s,
|
|
494
|
-
title: "Toggle Sidebar",
|
|
495
|
-
className: o(
|
|
496
|
-
"hover:after:bg-sidebar-border absolute inset-y-0 z-[10] hidden w-4 -translate-x-full transition-all ease-linear group-data-[side=left]:-right-[1.375rem] group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] sm:flex",
|
|
497
|
-
"in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize",
|
|
498
|
-
"[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize",
|
|
499
|
-
"hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full",
|
|
500
|
-
"[[data-side=left][data-collapsible=offcanvas]_&]:-right-2",
|
|
501
|
-
"[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",
|
|
502
|
-
t
|
|
503
|
-
),
|
|
504
|
-
...e
|
|
505
|
-
}
|
|
506
|
-
);
|
|
507
|
-
}
|
|
508
|
-
);
|
|
509
|
-
de.displayName = "SidebarRail";
|
|
510
|
-
const le = r.forwardRef(
|
|
511
|
-
({ className: t, ...e }, a) => {
|
|
512
|
-
const { isPreviewMode: s } = O();
|
|
513
|
-
return /* @__PURE__ */ i.jsx(
|
|
514
|
-
"main",
|
|
515
|
-
{
|
|
516
|
-
ref: a,
|
|
517
|
-
className: o(
|
|
518
|
-
"relative flex flex-1 flex-col",
|
|
519
|
-
s ? "max-h-[calc(100svh-(--spacing(4)))]" : "min-h-svh peer-data-[variant=inset]:min-h-[calc(100svh-(--spacing(4)))]",
|
|
520
|
-
"md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",
|
|
521
|
-
t
|
|
522
|
-
),
|
|
523
|
-
...e
|
|
524
|
-
}
|
|
525
|
-
);
|
|
526
|
-
}
|
|
527
|
-
);
|
|
528
|
-
le.displayName = "SidebarInset";
|
|
529
|
-
const ue = r.forwardRef(
|
|
530
|
-
({ className: t, ...e }, a) => /* @__PURE__ */ i.jsx(
|
|
531
|
-
"input",
|
|
532
|
-
{
|
|
533
|
-
ref: a,
|
|
534
|
-
"data-sidebar": "input",
|
|
535
|
-
className: o(
|
|
536
|
-
"bg-background focus-visible:ring-sidebar-ring h-8 w-full rounded-md border px-3 text-sm shadow-none focus-visible:ring-2 focus-visible:outline-none",
|
|
537
|
-
t
|
|
538
|
-
),
|
|
539
|
-
...e
|
|
540
|
-
}
|
|
541
|
-
)
|
|
542
|
-
);
|
|
543
|
-
ue.displayName = "SidebarInput";
|
|
544
|
-
const ce = r.forwardRef(
|
|
545
|
-
({ className: t, ...e }, a) => /* @__PURE__ */ i.jsx(
|
|
546
|
-
"div",
|
|
547
|
-
{
|
|
548
|
-
ref: a,
|
|
549
|
-
"data-sidebar": "header",
|
|
550
|
-
className: o("flex flex-col gap-2 p-2", t),
|
|
551
|
-
...e
|
|
552
|
-
}
|
|
553
|
-
)
|
|
554
|
-
);
|
|
555
|
-
ce.displayName = "SidebarHeader";
|
|
556
|
-
const be = r.forwardRef(
|
|
557
|
-
({ className: t, ...e }, a) => /* @__PURE__ */ i.jsx(
|
|
558
|
-
"div",
|
|
559
|
-
{
|
|
560
|
-
ref: a,
|
|
561
|
-
"data-sidebar": "footer",
|
|
562
|
-
className: o("flex flex-col gap-2 p-2", t),
|
|
563
|
-
...e
|
|
564
|
-
}
|
|
565
|
-
)
|
|
566
|
-
);
|
|
567
|
-
be.displayName = "SidebarFooter";
|
|
568
|
-
const pe = r.forwardRef(({ className: t, ...e }, a) => /* @__PURE__ */ i.jsx(
|
|
569
|
-
se,
|
|
570
|
-
{
|
|
571
|
-
ref: a,
|
|
572
|
-
"data-sidebar": "separator",
|
|
573
|
-
className: o("bg-sidebar-border mx-2 w-auto", t),
|
|
574
|
-
...e
|
|
575
|
-
}
|
|
576
|
-
));
|
|
577
|
-
pe.displayName = "SidebarSeparator";
|
|
578
|
-
const fe = r.forwardRef(
|
|
579
|
-
({ className: t, ...e }, a) => /* @__PURE__ */ i.jsx(
|
|
580
|
-
"div",
|
|
581
|
-
{
|
|
582
|
-
ref: a,
|
|
583
|
-
"data-sidebar": "content",
|
|
584
|
-
className: o(
|
|
585
|
-
"scrollbar-none flex min-h-0 flex-1 flex-col gap-2 overflow-auto rounded group-data-[collapsible=icon]:gap-0 group-data-[collapsible=icon]:overflow-hidden group-data-[collapsible=icon]:pt-3",
|
|
586
|
-
t
|
|
587
|
-
),
|
|
588
|
-
...e
|
|
589
|
-
}
|
|
590
|
-
)
|
|
591
|
-
);
|
|
592
|
-
fe.displayName = "SidebarContent";
|
|
593
|
-
const he = r.forwardRef(
|
|
594
|
-
({ className: t, ...e }, a) => /* @__PURE__ */ i.jsx(
|
|
595
|
-
"div",
|
|
596
|
-
{
|
|
597
|
-
ref: a,
|
|
598
|
-
"data-sidebar": "group",
|
|
599
|
-
className: o(
|
|
600
|
-
"relative flex w-full min-w-0 flex-col p-2 group-data-[collapsible=icon]:py-0 group-data-[collapsible=icon]:pt-4",
|
|
601
|
-
t
|
|
602
|
-
),
|
|
603
|
-
...e
|
|
604
|
-
}
|
|
605
|
-
)
|
|
606
|
-
);
|
|
607
|
-
he.displayName = "SidebarGroup";
|
|
608
|
-
const me = r.forwardRef(({ className: t, asChild: e = !1, ...a }, s) => {
|
|
609
|
-
const l = e ? k : "div";
|
|
610
|
-
return /* @__PURE__ */ i.jsx(
|
|
611
|
-
l,
|
|
612
|
-
{
|
|
613
|
-
ref: s,
|
|
614
|
-
"data-sidebar": "group-label",
|
|
615
|
-
className: o(
|
|
616
|
-
// Whisper-style section divider: small, uppercase, tracking, muted.
|
|
617
|
-
"text-sidebar-foreground/50 ring-sidebar-ring flex shrink-0 items-center px-2 pt-4 pb-1.5 text-[11px] font-medium tracking-wider uppercase outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-3.5 [&>svg]:shrink-0",
|
|
618
|
-
"group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:hidden",
|
|
619
|
-
t
|
|
620
|
-
),
|
|
621
|
-
...a
|
|
622
|
-
}
|
|
623
|
-
);
|
|
624
|
-
});
|
|
625
|
-
me.displayName = "SidebarGroupLabel";
|
|
626
|
-
const ge = r.forwardRef(({ className: t, asChild: e = !1, ...a }, s) => {
|
|
627
|
-
const l = e ? k : "button";
|
|
628
|
-
return /* @__PURE__ */ i.jsx(
|
|
629
|
-
l,
|
|
630
|
-
{
|
|
631
|
-
ref: s,
|
|
632
|
-
"data-sidebar": "group-action",
|
|
633
|
-
className: o(
|
|
634
|
-
"text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
635
|
-
// Increases the hit area of the button on mobile.
|
|
636
|
-
"after:absolute after:-inset-2 md:after:hidden",
|
|
637
|
-
"group-data-[collapsible=icon]:hidden",
|
|
638
|
-
t
|
|
639
|
-
),
|
|
640
|
-
...a
|
|
641
|
-
}
|
|
642
|
-
);
|
|
643
|
-
});
|
|
644
|
-
ge.displayName = "SidebarGroupAction";
|
|
645
|
-
const xe = r.forwardRef(
|
|
646
|
-
({ className: t, ...e }, a) => /* @__PURE__ */ i.jsx(
|
|
647
|
-
"div",
|
|
648
|
-
{
|
|
649
|
-
ref: a,
|
|
650
|
-
"data-sidebar": "group-content",
|
|
651
|
-
className: o("w-full text-sm", t),
|
|
652
|
-
...e
|
|
653
|
-
}
|
|
654
|
-
)
|
|
655
|
-
);
|
|
656
|
-
xe.displayName = "SidebarGroupContent";
|
|
657
|
-
const ve = r.forwardRef(
|
|
658
|
-
({ className: t, ...e }, a) => /* @__PURE__ */ i.jsx(
|
|
659
|
-
"ul",
|
|
660
|
-
{
|
|
661
|
-
ref: a,
|
|
662
|
-
"data-sidebar": "menu",
|
|
663
|
-
className: o("flex w-full min-w-0 flex-col gap-1", t),
|
|
664
|
-
...e
|
|
665
|
-
}
|
|
666
|
-
)
|
|
667
|
-
);
|
|
668
|
-
ve.displayName = "SidebarMenu";
|
|
669
|
-
const we = r.forwardRef(
|
|
670
|
-
({ className: t, ...e }, a) => /* @__PURE__ */ i.jsx(
|
|
671
|
-
"li",
|
|
672
|
-
{
|
|
673
|
-
ref: a,
|
|
674
|
-
"data-sidebar": "menu-item",
|
|
675
|
-
className: o("group/menu-item relative", t),
|
|
676
|
-
...e
|
|
677
|
-
}
|
|
678
|
-
)
|
|
679
|
-
);
|
|
680
|
-
we.displayName = "SidebarMenuItem";
|
|
681
|
-
const ye = ee(
|
|
682
|
-
"peer/menu-button ring-sidebar-ring hover:bg-sidebar-foreground/5 active:bg-sidebar-foreground/5 data-[state=open]:hover:bg-sidebar-foreground/5 data-[active=true]:text-foreground flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:font-bold [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",
|
|
683
|
-
{
|
|
684
|
-
variants: {
|
|
685
|
-
variant: {
|
|
686
|
-
default: "",
|
|
687
|
-
outline: "shadow-[0_0_0_1px_var(--sidebar-border)] hover:shadow-[0_0_0_1px_var(--sidebar-primary)]"
|
|
688
|
-
},
|
|
689
|
-
size: {
|
|
690
|
-
default: "h-8 text-sm",
|
|
691
|
-
sm: "h-7 text-xs",
|
|
692
|
-
lg: "h-12 text-sm group-data-[collapsible=icon]:p-0!"
|
|
693
|
-
}
|
|
694
|
-
},
|
|
695
|
-
defaultVariants: {
|
|
696
|
-
variant: "default",
|
|
697
|
-
size: "default"
|
|
698
|
-
}
|
|
699
|
-
}
|
|
700
|
-
), Se = r.forwardRef(
|
|
701
|
-
({
|
|
702
|
-
asChild: t = !1,
|
|
703
|
-
isActive: e = !1,
|
|
704
|
-
variant: a = "default",
|
|
705
|
-
size: s = "default",
|
|
706
|
-
className: l,
|
|
707
|
-
...b
|
|
708
|
-
}, n) => {
|
|
709
|
-
const u = t ? k : "button";
|
|
710
|
-
return /* @__PURE__ */ i.jsx(
|
|
711
|
-
u,
|
|
712
|
-
{
|
|
713
|
-
ref: n,
|
|
714
|
-
"data-sidebar": "menu-button",
|
|
715
|
-
"data-size": s,
|
|
716
|
-
"data-active": e,
|
|
717
|
-
className: o(ye({ variant: a, size: s }), l),
|
|
718
|
-
...b
|
|
719
|
-
}
|
|
720
|
-
);
|
|
721
|
-
}
|
|
722
|
-
);
|
|
723
|
-
Se.displayName = "SidebarMenuButton";
|
|
724
|
-
const Ne = r.forwardRef(({ className: t, asChild: e = !1, showOnHover: a = !1, ...s }, l) => {
|
|
725
|
-
const b = e ? k : "button";
|
|
726
|
-
return /* @__PURE__ */ i.jsx(
|
|
727
|
-
b,
|
|
728
|
-
{
|
|
729
|
-
ref: l,
|
|
730
|
-
"data-sidebar": "menu-action",
|
|
731
|
-
className: o(
|
|
732
|
-
"text-sidebar-foreground ring-sidebar-ring peer-hover/menu-button:text-sidebar-accent-foreground hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
733
|
-
// Increases the hit area of the button on mobile.
|
|
734
|
-
"after:absolute after:-inset-2 md:after:hidden",
|
|
735
|
-
"peer-data-[size=sm]/menu-button:top-1",
|
|
736
|
-
"peer-data-[size=default]/menu-button:top-1.5",
|
|
737
|
-
"peer-data-[size=lg]/menu-button:top-2.5",
|
|
738
|
-
"group-data-[collapsible=icon]:hidden",
|
|
739
|
-
a && "peer-data-[active=true]/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 md:opacity-0",
|
|
740
|
-
t
|
|
741
|
-
),
|
|
742
|
-
...s
|
|
743
|
-
}
|
|
744
|
-
);
|
|
745
|
-
});
|
|
746
|
-
Ne.displayName = "SidebarMenuAction";
|
|
747
|
-
const Me = r.forwardRef(
|
|
748
|
-
({ className: t, ...e }, a) => /* @__PURE__ */ i.jsx(
|
|
749
|
-
"div",
|
|
750
|
-
{
|
|
751
|
-
ref: a,
|
|
752
|
-
"data-sidebar": "menu-badge",
|
|
753
|
-
className: o(
|
|
754
|
-
"text-sidebar-foreground pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums select-none",
|
|
755
|
-
"peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground",
|
|
756
|
-
"peer-data-[size=sm]/menu-button:top-1",
|
|
757
|
-
"peer-data-[size=default]/menu-button:top-1.5",
|
|
758
|
-
"peer-data-[size=lg]/menu-button:top-2.5",
|
|
759
|
-
"group-data-[collapsible=icon]:hidden",
|
|
760
|
-
t
|
|
761
|
-
),
|
|
762
|
-
...e
|
|
763
|
-
}
|
|
764
|
-
)
|
|
765
|
-
);
|
|
766
|
-
Me.displayName = "SidebarMenuBadge";
|
|
767
|
-
const je = r.forwardRef(({ className: t, showIcon: e = !1, ...a }, s) => {
|
|
768
|
-
const l = r.useMemo(() => `${Math.floor(Math.random() * 40) + 50}%`, []);
|
|
769
|
-
return /* @__PURE__ */ i.jsxs(
|
|
770
|
-
"div",
|
|
771
|
-
{
|
|
772
|
-
ref: s,
|
|
773
|
-
"data-sidebar": "menu-skeleton",
|
|
774
|
-
className: o("flex h-8 items-center gap-2 rounded-md px-2", t),
|
|
775
|
-
...a,
|
|
776
|
-
children: [
|
|
777
|
-
e && /* @__PURE__ */ i.jsx(
|
|
778
|
-
F,
|
|
779
|
-
{
|
|
780
|
-
className: "size-4 rounded-md",
|
|
781
|
-
"data-sidebar": "menu-skeleton-icon"
|
|
782
|
-
}
|
|
783
|
-
),
|
|
784
|
-
/* @__PURE__ */ i.jsx(
|
|
785
|
-
F,
|
|
786
|
-
{
|
|
787
|
-
className: "h-4 max-w-(--skeleton-width) flex-1",
|
|
788
|
-
"data-sidebar": "menu-skeleton-text",
|
|
789
|
-
style: {
|
|
790
|
-
"--skeleton-width": l
|
|
791
|
-
}
|
|
792
|
-
}
|
|
793
|
-
)
|
|
794
|
-
]
|
|
795
|
-
}
|
|
796
|
-
);
|
|
797
|
-
});
|
|
798
|
-
je.displayName = "SidebarMenuSkeleton";
|
|
799
|
-
const Re = r.forwardRef(
|
|
800
|
-
({ className: t, ...e }, a) => /* @__PURE__ */ i.jsx(
|
|
801
|
-
"ul",
|
|
802
|
-
{
|
|
803
|
-
ref: a,
|
|
804
|
-
"data-sidebar": "menu-sub",
|
|
805
|
-
className: o(
|
|
806
|
-
"border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5",
|
|
807
|
-
"group-data-[collapsible=icon]:hidden",
|
|
808
|
-
t
|
|
809
|
-
),
|
|
810
|
-
...e
|
|
811
|
-
}
|
|
812
|
-
)
|
|
813
|
-
);
|
|
814
|
-
Re.displayName = "SidebarMenuSub";
|
|
815
|
-
const Ce = r.forwardRef(
|
|
816
|
-
({ ...t }, e) => /* @__PURE__ */ i.jsx("li", { ref: e, ...t })
|
|
817
|
-
);
|
|
818
|
-
Ce.displayName = "SidebarMenuSubItem";
|
|
819
|
-
const ke = r.forwardRef(({ asChild: t = !1, size: e = "md", isActive: a, className: s, ...l }, b) => {
|
|
820
|
-
const n = t ? k : "a";
|
|
821
|
-
return /* @__PURE__ */ i.jsx(
|
|
822
|
-
n,
|
|
823
|
-
{
|
|
824
|
-
ref: b,
|
|
825
|
-
"data-sidebar": "menu-sub-button",
|
|
826
|
-
"data-size": e,
|
|
827
|
-
"data-active": a,
|
|
828
|
-
className: o(
|
|
829
|
-
"text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-hidden focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",
|
|
830
|
-
"data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",
|
|
831
|
-
e === "sm" && "text-xs",
|
|
832
|
-
e === "md" && "text-sm",
|
|
833
|
-
"group-data-[collapsible=icon]:hidden",
|
|
834
|
-
s
|
|
835
|
-
),
|
|
836
|
-
...l
|
|
837
|
-
}
|
|
838
|
-
);
|
|
839
|
-
});
|
|
840
|
-
ke.displayName = "SidebarMenuSubButton";
|
|
841
|
-
export {
|
|
842
|
-
_e as M,
|
|
843
|
-
oe as S,
|
|
844
|
-
q as a,
|
|
845
|
-
ae as b,
|
|
846
|
-
te as g,
|
|
847
|
-
O as u
|
|
848
|
-
};
|