@starasia/admin 14.31.0 → 14.32.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.cjs.js +1 -1
- package/dist/index.es.js +24 -21
- package/dist/index.umd.js +1 -1
- package/dist/types/menu.d.ts +7 -0
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -424,28 +424,29 @@ const jo = "4.5rem", Zo = "var(--app-header-height, 4rem)", Mi = (t) => t ? jo :
|
|
|
424
424
|
function Hn({
|
|
425
425
|
icon: t,
|
|
426
426
|
label: r,
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
427
|
+
tooltip: n = r,
|
|
428
|
+
active: o = !1,
|
|
429
|
+
badge: i,
|
|
430
|
+
showLabel: l = !0,
|
|
431
|
+
onClick: c
|
|
431
432
|
}) {
|
|
432
|
-
const [
|
|
433
|
-
return /* @__PURE__ */ e(Te, { fluid: !0, label:
|
|
433
|
+
const [s, a] = B(!1);
|
|
434
|
+
return /* @__PURE__ */ e(Te, { fluid: !0, label: n, position: "right", children: /* @__PURE__ */ u(
|
|
434
435
|
h,
|
|
435
436
|
{
|
|
436
437
|
as: "button",
|
|
437
|
-
onClick:
|
|
438
|
-
onMouseEnter: () =>
|
|
439
|
-
onMouseLeave: () =>
|
|
440
|
-
"aria-label":
|
|
441
|
-
"aria-current":
|
|
438
|
+
onClick: c,
|
|
439
|
+
onMouseEnter: () => a(!0),
|
|
440
|
+
onMouseLeave: () => a(!1),
|
|
441
|
+
"aria-label": n,
|
|
442
|
+
"aria-current": o ? "page" : void 0,
|
|
442
443
|
fullWidth: !0,
|
|
443
444
|
direction: "column",
|
|
444
445
|
align: "center",
|
|
445
446
|
gap: "spacing-2",
|
|
446
447
|
paddingBlock: "xs",
|
|
447
448
|
style: {
|
|
448
|
-
color:
|
|
449
|
+
color: o ? "var(--sa-text-primary, #292a2e)" : "var(--sa-text-subtle, #505258)"
|
|
449
450
|
},
|
|
450
451
|
children: [
|
|
451
452
|
/* @__PURE__ */ u(
|
|
@@ -457,17 +458,17 @@ function Hn({
|
|
|
457
458
|
justify: "center",
|
|
458
459
|
width: "width-32",
|
|
459
460
|
height: "height-32",
|
|
460
|
-
borderRadius:
|
|
461
|
+
borderRadius: o ? "rounded-sm" : "rounded-md",
|
|
461
462
|
borderWidth: "border",
|
|
462
463
|
borderStyle: "border-solid",
|
|
463
|
-
bg:
|
|
464
|
+
bg: o ? "white" : s ? "neutral" : void 0,
|
|
464
465
|
style: {
|
|
465
466
|
// Selalu ditulis — lihat catatan borderColor di baris menu AppLayout.
|
|
466
|
-
borderColor:
|
|
467
|
+
borderColor: o ? "var(--sa-border-subtle, #0b120e24)" : "transparent"
|
|
467
468
|
},
|
|
468
469
|
children: [
|
|
469
470
|
/* @__PURE__ */ e(F, { name: t, size: "sm" }),
|
|
470
|
-
|
|
471
|
+
i && !l && // Rail compact hanya 44px — badge angka akan keluar dari rail,
|
|
471
472
|
// jadi diganti dot (nilai lengkap tetap di badge item panel).
|
|
472
473
|
/* @__PURE__ */ e(
|
|
473
474
|
h,
|
|
@@ -484,7 +485,7 @@ function Hn({
|
|
|
484
485
|
children: /* @__PURE__ */ e(gi, { tone: "error", variant: "solid", size: "xs" })
|
|
485
486
|
}
|
|
486
487
|
),
|
|
487
|
-
|
|
488
|
+
i && l && /* @__PURE__ */ e(
|
|
488
489
|
h,
|
|
489
490
|
{
|
|
490
491
|
position: "absolute",
|
|
@@ -493,8 +494,8 @@ function Hn({
|
|
|
493
494
|
children: /* @__PURE__ */ e(
|
|
494
495
|
Zt,
|
|
495
496
|
{
|
|
496
|
-
text: String(
|
|
497
|
-
variant:
|
|
497
|
+
text: String(i.value),
|
|
498
|
+
variant: i.variant ?? "info",
|
|
498
499
|
size: "xs",
|
|
499
500
|
border: !0
|
|
500
501
|
}
|
|
@@ -504,12 +505,12 @@ function Hn({
|
|
|
504
505
|
]
|
|
505
506
|
}
|
|
506
507
|
),
|
|
507
|
-
|
|
508
|
+
l && /* @__PURE__ */ e(
|
|
508
509
|
w,
|
|
509
510
|
{
|
|
510
511
|
as: "span",
|
|
511
512
|
fontSize: "xs",
|
|
512
|
-
fontWeight:
|
|
513
|
+
fontWeight: o ? "medium" : "normal",
|
|
513
514
|
textAlign: "center",
|
|
514
515
|
truncate: !0,
|
|
515
516
|
style: { display: "block", maxWidth: "100%", color: "inherit" },
|
|
@@ -616,6 +617,7 @@ function Go({
|
|
|
616
617
|
{
|
|
617
618
|
icon: g.icon,
|
|
618
619
|
label: g.label,
|
|
620
|
+
tooltip: g.tooltip,
|
|
619
621
|
badge: g.badge,
|
|
620
622
|
showLabel: a,
|
|
621
623
|
active: g.key === n,
|
|
@@ -640,6 +642,7 @@ function Go({
|
|
|
640
642
|
{
|
|
641
643
|
icon: g.icon,
|
|
642
644
|
label: g.label,
|
|
645
|
+
tooltip: g.tooltip,
|
|
643
646
|
badge: g.badge,
|
|
644
647
|
showLabel: a,
|
|
645
648
|
onClick: () => i(g)
|