canny-ui-react 6.5.0 → 6.6.2
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
CHANGED
|
@@ -7307,17 +7307,18 @@ const Tk = V(function({
|
|
|
7307
7307
|
children: d
|
|
7308
7308
|
}
|
|
7309
7309
|
);
|
|
7310
|
-
}), Ik = V(function({ solid: e = !1,
|
|
7311
|
-
const { className:
|
|
7310
|
+
}), Ik = V(function({ solid: e = !1, surface: n = "base", className: r, style: o, sx: i, children: s, ...a }, c) {
|
|
7311
|
+
const { className: l, style: u, styleTag: d } = se(
|
|
7312
|
+
i,
|
|
7312
7313
|
o,
|
|
7313
|
-
r,
|
|
7314
7314
|
"cny-navbar",
|
|
7315
7315
|
e && "solid",
|
|
7316
|
-
n
|
|
7316
|
+
n === "raised" && "raised",
|
|
7317
|
+
r
|
|
7317
7318
|
);
|
|
7318
|
-
return /* @__PURE__ */ D("header", { ref:
|
|
7319
|
-
|
|
7320
|
-
|
|
7319
|
+
return /* @__PURE__ */ D("header", { ref: c, className: l, style: u, ...a, children: [
|
|
7320
|
+
d,
|
|
7321
|
+
s
|
|
7321
7322
|
] });
|
|
7322
7323
|
}), kk = V(function({ mark: e = !0, className: n, children: r, ...o }, i) {
|
|
7323
7324
|
return /* @__PURE__ */ D("a", { ref: i, className: H("cny-navbar-brand", n), ...o, children: [
|
|
@@ -7359,43 +7360,45 @@ const Tk = V(function({
|
|
|
7359
7360
|
responsive: o = !1,
|
|
7360
7361
|
mobileOpen: i = !1,
|
|
7361
7362
|
onMobileOpenChange: s,
|
|
7362
|
-
|
|
7363
|
-
|
|
7364
|
-
|
|
7365
|
-
|
|
7366
|
-
|
|
7367
|
-
|
|
7368
|
-
|
|
7363
|
+
surface: a = "base",
|
|
7364
|
+
className: c,
|
|
7365
|
+
style: l,
|
|
7366
|
+
sx: u,
|
|
7367
|
+
children: d,
|
|
7368
|
+
...f
|
|
7369
|
+
}, m) {
|
|
7370
|
+
const g = o && !!s, y = g && i, v = de(null);
|
|
7369
7371
|
He(() => {
|
|
7370
|
-
var
|
|
7371
|
-
if (!
|
|
7372
|
+
var P;
|
|
7373
|
+
if (!y) return;
|
|
7372
7374
|
if (typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia(u1).matches) {
|
|
7373
|
-
const
|
|
7374
|
-
|
|
7375
|
+
const R = ((P = v.current) == null ? void 0 : P.querySelector('[data-cny-sidebar-item][tabindex="0"]')) ?? v.current;
|
|
7376
|
+
R == null || R.focus();
|
|
7375
7377
|
}
|
|
7376
|
-
const
|
|
7377
|
-
|
|
7378
|
+
const S = (R) => {
|
|
7379
|
+
R.key === "Escape" && (s == null || s(!1));
|
|
7378
7380
|
};
|
|
7379
|
-
return document.addEventListener("keydown",
|
|
7380
|
-
}, [
|
|
7381
|
-
const { className:
|
|
7381
|
+
return document.addEventListener("keydown", S), () => document.removeEventListener("keydown", S);
|
|
7382
|
+
}, [y, s]);
|
|
7383
|
+
const { className: b, style: x, styleTag: w } = se(
|
|
7384
|
+
u,
|
|
7382
7385
|
l,
|
|
7383
|
-
c,
|
|
7384
7386
|
"cny-sidebar",
|
|
7385
7387
|
e !== "default" && e,
|
|
7386
7388
|
n && "sticky",
|
|
7387
7389
|
// An open drawer always shows labels, whatever the docked state is.
|
|
7388
|
-
r && !
|
|
7390
|
+
r && !y && "collapsed",
|
|
7389
7391
|
o && "responsive",
|
|
7390
|
-
|
|
7391
|
-
g && "mobile-
|
|
7392
|
-
|
|
7392
|
+
a === "raised" && "raised",
|
|
7393
|
+
g && "mobile-drawer",
|
|
7394
|
+
y && "mobile-open",
|
|
7395
|
+
c
|
|
7393
7396
|
);
|
|
7394
7397
|
return /* @__PURE__ */ D(xe, { children: [
|
|
7395
|
-
|
|
7398
|
+
g && /* @__PURE__ */ h(
|
|
7396
7399
|
"div",
|
|
7397
7400
|
{
|
|
7398
|
-
className: H("cny-sidebar-backdrop",
|
|
7401
|
+
className: H("cny-sidebar-backdrop", y && "open"),
|
|
7399
7402
|
"aria-hidden": "true",
|
|
7400
7403
|
onClick: () => s == null ? void 0 : s(!1)
|
|
7401
7404
|
}
|
|
@@ -7403,16 +7406,16 @@ const Tk = V(function({
|
|
|
7403
7406
|
/* @__PURE__ */ D(
|
|
7404
7407
|
"aside",
|
|
7405
7408
|
{
|
|
7406
|
-
ref: (
|
|
7407
|
-
|
|
7409
|
+
ref: (C) => {
|
|
7410
|
+
v.current = C, typeof m == "function" ? m(C) : m && (m.current = C);
|
|
7408
7411
|
},
|
|
7409
|
-
tabIndex:
|
|
7410
|
-
className:
|
|
7411
|
-
style:
|
|
7412
|
-
...
|
|
7412
|
+
tabIndex: g ? -1 : void 0,
|
|
7413
|
+
className: b,
|
|
7414
|
+
style: x,
|
|
7415
|
+
...f,
|
|
7413
7416
|
children: [
|
|
7414
|
-
|
|
7415
|
-
|
|
7417
|
+
w,
|
|
7418
|
+
d
|
|
7416
7419
|
]
|
|
7417
7420
|
}
|
|
7418
7421
|
)
|
|
@@ -15855,7 +15858,7 @@ const t2 = $D, n2 = V(function({
|
|
|
15855
15858
|
sx: d,
|
|
15856
15859
|
...f
|
|
15857
15860
|
}, m) {
|
|
15858
|
-
const g = typeof e == "number", y = g && e > r ? `${r}+` : e, b = !n && g
|
|
15861
|
+
const g = typeof e == "number", y = g && e > r ? `${r}+` : e, b = !n && (!g || e === 0 && !o) ? null : /* @__PURE__ */ h(
|
|
15859
15862
|
"span",
|
|
15860
15863
|
{
|
|
15861
15864
|
className: H(
|
|
@@ -15871,7 +15874,6 @@ const t2 = $D, n2 = V(function({
|
|
|
15871
15874
|
const { className: S, style: P, styleTag: R } = se(
|
|
15872
15875
|
d,
|
|
15873
15876
|
u,
|
|
15874
|
-
"cny-badge",
|
|
15875
15877
|
"cny-badge-standalone",
|
|
15876
15878
|
l
|
|
15877
15879
|
);
|
|
@@ -15883,7 +15885,7 @@ const t2 = $D, n2 = V(function({
|
|
|
15883
15885
|
const { className: x, style: w, styleTag: C } = se(
|
|
15884
15886
|
d,
|
|
15885
15887
|
u,
|
|
15886
|
-
"cny-badge",
|
|
15888
|
+
"cny-badge-anchor",
|
|
15887
15889
|
l
|
|
15888
15890
|
);
|
|
15889
15891
|
return /* @__PURE__ */ D("span", { ref: m, className: x, style: w, ...f, children: [
|