@danxbot/ui 15.3.0 → 15.4.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/index.js +49 -47
- package/dist/index.js.map +1 -1
- package/dist/types/components/AppShell.d.ts +9 -1
- package/dist/types/components/rbac/Brand.d.ts +8 -0
- package/dist/types/components/rbac/DangerZone.d.ts +8 -0
- package/dist/types/components/rbac/TeamSettingsForm.d.ts +20 -0
- package/dist/types/components/rbac/index.d.ts +3 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -30206,45 +30206,46 @@ function oB(e) {
|
|
|
30206
30206
|
const sB = (e) => typeof e == "boolean";
|
|
30207
30207
|
function iK({
|
|
30208
30208
|
brand: e,
|
|
30209
|
-
|
|
30210
|
-
|
|
30211
|
-
|
|
30212
|
-
|
|
30213
|
-
|
|
30214
|
-
|
|
30215
|
-
|
|
30216
|
-
|
|
30217
|
-
|
|
30218
|
-
|
|
30219
|
-
|
|
30209
|
+
brandCollapsed: t,
|
|
30210
|
+
sections: n,
|
|
30211
|
+
activeId: r,
|
|
30212
|
+
sidebarFooter: o,
|
|
30213
|
+
header: s,
|
|
30214
|
+
contentLandmark: i = "main",
|
|
30215
|
+
navLabel: a = "Main",
|
|
30216
|
+
scroll: l = "content",
|
|
30217
|
+
scrollResetKey: c,
|
|
30218
|
+
persistId: u = "app-shell-sidebar",
|
|
30219
|
+
children: p,
|
|
30220
|
+
className: d
|
|
30220
30221
|
}) {
|
|
30221
|
-
const
|
|
30222
|
-
|
|
30222
|
+
const h = i === "main" ? "main" : "div", m = l === "content", [g, b] = Fk(
|
|
30223
|
+
u === !1 ? void 0 : u,
|
|
30223
30224
|
!1,
|
|
30224
30225
|
{ isValid: sB }
|
|
30225
|
-
),
|
|
30226
|
+
), x = ye(null);
|
|
30226
30227
|
$e(() => {
|
|
30227
|
-
|
|
30228
|
-
}, [
|
|
30229
|
-
const [
|
|
30228
|
+
c !== void 0 && x.current?.scrollTo({ top: 0, behavior: "instant" });
|
|
30229
|
+
}, [c]);
|
|
30230
|
+
const [w, v] = he(!1), E = /* @__PURE__ */ f(
|
|
30230
30231
|
Ry,
|
|
30231
30232
|
{
|
|
30232
|
-
sections:
|
|
30233
|
-
activeId:
|
|
30234
|
-
collapsed:
|
|
30235
|
-
label:
|
|
30236
|
-
onNavigate: () =>
|
|
30233
|
+
sections: n,
|
|
30234
|
+
activeId: r,
|
|
30235
|
+
collapsed: g,
|
|
30236
|
+
label: a,
|
|
30237
|
+
onNavigate: () => v(!1)
|
|
30237
30238
|
}
|
|
30238
30239
|
);
|
|
30239
30240
|
return (
|
|
30240
30241
|
/* THE ONE VIEWPORT UNIT. Everything below it is `flex-1` and `min-h-0`,
|
|
30241
30242
|
so no descendant — here or in a consumer's screen — ever has a reason to
|
|
30242
30243
|
name `dvh` or subtract a token from it. */
|
|
30243
|
-
/* @__PURE__ */ P("div", { className: U("flex bg-canvas",
|
|
30244
|
+
/* @__PURE__ */ P("div", { className: U("flex bg-canvas", m ? "h-dvh" : "min-h-dvh", d), children: [
|
|
30244
30245
|
/* @__PURE__ */ P(
|
|
30245
30246
|
"aside",
|
|
30246
30247
|
{
|
|
30247
|
-
"data-collapsed":
|
|
30248
|
+
"data-collapsed": g || void 0,
|
|
30248
30249
|
className: U(
|
|
30249
30250
|
"group/sidebar hidden shrink-0 flex-col border-r border-border-subtle bg-surface lg:flex",
|
|
30250
30251
|
/* Bounded: nothing. A flex item in a row of a fixed height is
|
|
@@ -30254,36 +30255,37 @@ function iK({
|
|
|
30254
30255
|
so the aside has to state the viewport itself and stay put while
|
|
30255
30256
|
the page scrolls past it — the ONE place a second viewport unit is
|
|
30256
30257
|
unavoidable, and the reason it lives behind an opt-out. */
|
|
30257
|
-
!
|
|
30258
|
+
!m && "sticky top-0 h-dvh",
|
|
30258
30259
|
"transition-[var(--tx-colors),width] duration-(--dur-slow) ease-emphasis",
|
|
30259
|
-
|
|
30260
|
+
g ? "w-14" : "w-60"
|
|
30260
30261
|
),
|
|
30261
30262
|
children: [
|
|
30262
|
-
/* @__PURE__ */ P("div", { className: U("flex h-control-xl shrink-0 items-center gap-2 px-3",
|
|
30263
|
-
!
|
|
30263
|
+
/* @__PURE__ */ P("div", { className: U("flex h-control-xl shrink-0 items-center gap-2 px-3", g && "justify-center"), children: [
|
|
30264
|
+
!g && /* @__PURE__ */ f("div", { className: "min-w-0 flex-1", children: e }),
|
|
30264
30265
|
/* @__PURE__ */ f(
|
|
30265
30266
|
gt,
|
|
30266
30267
|
{
|
|
30267
|
-
label:
|
|
30268
|
+
label: g ? "Expand sidebar" : "Collapse sidebar",
|
|
30268
30269
|
tooltipSide: "right",
|
|
30269
|
-
onClick: () =>
|
|
30270
|
+
onClick: () => b((C) => !C),
|
|
30270
30271
|
icon: /* @__PURE__ */ f(
|
|
30271
30272
|
de,
|
|
30272
30273
|
{
|
|
30273
30274
|
name: "panel-left",
|
|
30274
30275
|
size: "sm",
|
|
30275
|
-
className: U("transition-[var(--tx-colors),transform,translate,scale,rotate] duration-(--dur-base)",
|
|
30276
|
+
className: U("transition-[var(--tx-colors),transform,translate,scale,rotate] duration-(--dur-base)", g && "rotate-180")
|
|
30276
30277
|
}
|
|
30277
30278
|
)
|
|
30278
30279
|
}
|
|
30279
30280
|
)
|
|
30280
30281
|
] }),
|
|
30281
|
-
/* @__PURE__ */ f("div", { className: "
|
|
30282
|
-
|
|
30282
|
+
g && t && /* @__PURE__ */ f("div", { className: "flex shrink-0 items-center justify-center px-3 pb-2", children: t }),
|
|
30283
|
+
/* @__PURE__ */ f("div", { className: "relative min-h-0 flex-1 overflow-y-auto px-2 py-2", children: E }),
|
|
30284
|
+
o && /* @__PURE__ */ f("div", { className: "shrink-0 border-t border-border-subtle p-2", children: o })
|
|
30283
30285
|
]
|
|
30284
30286
|
}
|
|
30285
30287
|
),
|
|
30286
|
-
/* @__PURE__ */ P("div", { className: U("flex min-w-0 flex-1 flex-col",
|
|
30288
|
+
/* @__PURE__ */ P("div", { className: U("flex min-w-0 flex-1 flex-col", m && "min-h-0"), children: [
|
|
30287
30289
|
/* @__PURE__ */ P(
|
|
30288
30290
|
"header",
|
|
30289
30291
|
{
|
|
@@ -30294,10 +30296,10 @@ function iK({
|
|
|
30294
30296
|
OUTSIDE the scroller, so there is nothing for it to stick to.
|
|
30295
30297
|
`sticky top-0` there would be a declaration that reads as intent
|
|
30296
30298
|
and does nothing. */
|
|
30297
|
-
!
|
|
30299
|
+
!m && "sticky top-0"
|
|
30298
30300
|
),
|
|
30299
30301
|
children: [
|
|
30300
|
-
/* @__PURE__ */ P(_m, { open:
|
|
30302
|
+
/* @__PURE__ */ P(_m, { open: w, onOpenChange: v, children: [
|
|
30301
30303
|
/* @__PURE__ */ f(
|
|
30302
30304
|
Yu,
|
|
30303
30305
|
{
|
|
@@ -30353,34 +30355,34 @@ function iK({
|
|
|
30353
30355
|
/* @__PURE__ */ f("div", { className: "relative min-h-0 flex-1 overflow-y-auto px-2 py-2", children: /* @__PURE__ */ f(
|
|
30354
30356
|
Ry,
|
|
30355
30357
|
{
|
|
30356
|
-
sections:
|
|
30357
|
-
activeId:
|
|
30358
|
+
sections: n,
|
|
30359
|
+
activeId: r,
|
|
30358
30360
|
collapsed: !1,
|
|
30359
|
-
label:
|
|
30360
|
-
onNavigate: () =>
|
|
30361
|
+
label: a,
|
|
30362
|
+
onNavigate: () => v(!1)
|
|
30361
30363
|
}
|
|
30362
30364
|
) }),
|
|
30363
|
-
|
|
30365
|
+
o && /* @__PURE__ */ f("div", { className: "shrink-0 border-t border-border-subtle p-2", children: o })
|
|
30364
30366
|
]
|
|
30365
30367
|
}
|
|
30366
30368
|
)
|
|
30367
30369
|
] })
|
|
30368
30370
|
] }),
|
|
30369
|
-
|
|
30371
|
+
s
|
|
30370
30372
|
]
|
|
30371
30373
|
}
|
|
30372
30374
|
),
|
|
30373
30375
|
/* @__PURE__ */ f(
|
|
30374
|
-
|
|
30376
|
+
h,
|
|
30375
30377
|
{
|
|
30376
|
-
ref:
|
|
30378
|
+
ref: x,
|
|
30377
30379
|
"data-app-shell-content": "",
|
|
30378
|
-
tabIndex:
|
|
30380
|
+
tabIndex: m ? 0 : -1,
|
|
30379
30381
|
className: U(
|
|
30380
30382
|
"flex min-w-0 flex-1 flex-col outline-none",
|
|
30381
|
-
|
|
30383
|
+
m && "relative min-h-0 overflow-y-auto focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-accent-border"
|
|
30382
30384
|
),
|
|
30383
|
-
children:
|
|
30385
|
+
children: p
|
|
30384
30386
|
}
|
|
30385
30387
|
)
|
|
30386
30388
|
] })
|