@ai-matrx/design-system 0.86.333 → 0.86.334
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/CHANGELOG.md +27 -2
- package/dist/{chunk-NNETFHGX.js → chunk-677JS6TX.js} +17 -3
- package/dist/chunk-677JS6TX.js.map +1 -0
- package/dist/index.cjs +574 -385
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +115 -3
- package/dist/index.d.ts +115 -3
- package/dist/index.js +431 -262
- package/dist/index.js.map +1 -1
- package/dist/item.cjs +33 -17
- package/dist/item.cjs.map +1 -1
- package/dist/item.d.cts +7 -1
- package/dist/item.d.ts +7 -1
- package/dist/item.js +18 -16
- package/dist/item.js.map +1 -1
- package/dist/record-list.cjs +16 -2
- package/dist/record-list.cjs.map +1 -1
- package/dist/record-list.d.cts +7 -1
- package/dist/record-list.d.ts +7 -1
- package/dist/record-list.js +1 -1
- package/package.json +2 -2
- package/dist/chunk-NNETFHGX.js.map +0 -1
package/dist/item.cjs
CHANGED
|
@@ -2469,6 +2469,8 @@ var SIZE = {
|
|
|
2469
2469
|
lg: { row: "h-10", text: "text-sm", kebab: "h-7 w-7", icon: "h-4 w-4" }
|
|
2470
2470
|
};
|
|
2471
2471
|
var DISCLOSURE_RESERVE = { xs: 32, sm: 32, md: 36, lg: 40 };
|
|
2472
|
+
var REVEAL_OPACITY = "group-hover/item:opacity-100 group-has-[:focus-visible]/item:opacity-100 group-has-[[data-state=open]]/item:opacity-100 [@media(pointer:coarse)]:opacity-100";
|
|
2473
|
+
var REVEAL_DISPLAY = "group-hover/item:inline group-has-[:focus-visible]/item:inline group-has-[[data-state=open]]/item:inline [@media(pointer:coarse)]:inline";
|
|
2472
2474
|
function mapRenameIntent(config, requestRename) {
|
|
2473
2475
|
const mapEntry = (entry) => {
|
|
2474
2476
|
if (isSubmenu(entry)) {
|
|
@@ -2496,6 +2498,7 @@ function ItemRow({
|
|
|
2496
2498
|
reserveDisclosure = false,
|
|
2497
2499
|
leading,
|
|
2498
2500
|
trailing,
|
|
2501
|
+
trailingOnHover,
|
|
2499
2502
|
active = false,
|
|
2500
2503
|
disabled = false,
|
|
2501
2504
|
href,
|
|
@@ -2570,7 +2573,10 @@ function ItemRow({
|
|
|
2570
2573
|
children: secondaryLabel
|
|
2571
2574
|
}
|
|
2572
2575
|
),
|
|
2573
|
-
trailing != null && /* @__PURE__ */ (0, import_jsx_runtime18.
|
|
2576
|
+
(trailing != null || trailingOnHover != null) && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("span", { className: "item-shift flex shrink-0 items-center gap-1 pr-0.5", children: [
|
|
2577
|
+
trailing,
|
|
2578
|
+
trailingOnHover != null && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: cn("hidden", REVEAL_DISPLAY), "data-item-trailing-hover": "", children: trailingOnHover })
|
|
2579
|
+
] })
|
|
2574
2580
|
] });
|
|
2575
2581
|
const twoLine = subtitle != null && !editing;
|
|
2576
2582
|
const sideBySide = actions != null || leadingControl != null;
|
|
@@ -2663,7 +2669,15 @@ function ItemRow({
|
|
|
2663
2669
|
icon: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(MoreHorizontalIcon, { className: sz.icon }),
|
|
2664
2670
|
"aria-haspopup": "menu",
|
|
2665
2671
|
onClick: (e) => e.stopPropagation(),
|
|
2666
|
-
|
|
2672
|
+
"data-item-kebab": "",
|
|
2673
|
+
className: cn(
|
|
2674
|
+
"shrink-0",
|
|
2675
|
+
!sideBySide && "absolute right-1 top-1/2 -translate-y-1/2",
|
|
2676
|
+
// Hidden at rest (it would sit on the trailing meta); shown on hover, keyboard focus,
|
|
2677
|
+
// while its menu is open, and always on touch.
|
|
2678
|
+
"opacity-0 transition-opacity data-[state=open]:opacity-100 focus-visible:opacity-100",
|
|
2679
|
+
REVEAL_OPACITY
|
|
2680
|
+
)
|
|
2667
2681
|
}
|
|
2668
2682
|
)
|
|
2669
2683
|
}
|
|
@@ -3530,20 +3544,7 @@ function ProductSidebarTop({
|
|
|
3530
3544
|
};
|
|
3531
3545
|
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { "data-product-sidebar-top": "", className: cn("flex shrink-0 flex-col gap-1 px-2 pb-1 pt-2", className), children: [
|
|
3532
3546
|
status,
|
|
3533
|
-
|
|
3534
|
-
InputWithPrefix,
|
|
3535
|
-
{
|
|
3536
|
-
prefix: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(SearchIcon, { className: "size-4" }),
|
|
3537
|
-
prefixInset: "edge",
|
|
3538
|
-
value: search.value,
|
|
3539
|
-
onChange: (e) => search.onChange(e.target.value),
|
|
3540
|
-
onKeyDown: onSearchKeyDown,
|
|
3541
|
-
placeholder: search.placeholder ?? "Search",
|
|
3542
|
-
"aria-label": search.ariaLabel,
|
|
3543
|
-
className: "h-8"
|
|
3544
|
-
}
|
|
3545
|
-
) : null,
|
|
3546
|
-
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: cn("flex flex-col", search && "pt-1"), children: [
|
|
3547
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex flex-col", children: [
|
|
3547
3548
|
newItem ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
3548
3549
|
ItemRow,
|
|
3549
3550
|
{
|
|
@@ -3583,7 +3584,22 @@ function ProductSidebarTop({
|
|
|
3583
3584
|
] })
|
|
3584
3585
|
] }) : null
|
|
3585
3586
|
] }),
|
|
3586
|
-
children
|
|
3587
|
+
children,
|
|
3588
|
+
search ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
3589
|
+
InputWithPrefix,
|
|
3590
|
+
{
|
|
3591
|
+
prefix: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(SearchIcon, { className: "size-4" }),
|
|
3592
|
+
prefixInset: "edge",
|
|
3593
|
+
value: search.value,
|
|
3594
|
+
onChange: (e) => search.onChange(e.target.value),
|
|
3595
|
+
onKeyDown: onSearchKeyDown,
|
|
3596
|
+
placeholder: search.placeholder ?? "Search",
|
|
3597
|
+
"aria-label": search.ariaLabel,
|
|
3598
|
+
className: "h-8",
|
|
3599
|
+
wrapperClassName: "mt-1",
|
|
3600
|
+
"data-product-sidebar-search": ""
|
|
3601
|
+
}
|
|
3602
|
+
) : null
|
|
3587
3603
|
] });
|
|
3588
3604
|
}
|
|
3589
3605
|
function PlaceRow({
|