@motor-hero/ui-kit 0.39.0 → 0.40.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 CHANGED
@@ -2090,7 +2090,7 @@ function ResponsiveDataView({
2090
2090
 
2091
2091
  // src/components/row-actions-menu.tsx
2092
2092
  import * as DropdownMenu3 from "@radix-ui/react-dropdown-menu";
2093
- import { MoreVertical } from "lucide-react";
2093
+ import { ChevronRight as ChevronRight3, MoreVertical } from "lucide-react";
2094
2094
  import { useState as useState11 } from "react";
2095
2095
  import { Drawer as DrawerPrimitive6 } from "vaul";
2096
2096
  import { Fragment as Fragment6, jsx as jsx26, jsxs as jsxs23 } from "react/jsx-runtime";
@@ -2131,6 +2131,45 @@ function RowActionsMenu({
2131
2131
  itemClass2,
2132
2132
  action.destructive && "text-destructive focus:bg-destructive/10"
2133
2133
  );
2134
+ if (action.children?.length) {
2135
+ return /* @__PURE__ */ jsxs23(DropdownMenu3.Sub, { children: [
2136
+ /* @__PURE__ */ jsxs23(
2137
+ DropdownMenu3.SubTrigger,
2138
+ {
2139
+ className: cls,
2140
+ disabled: action.disabled,
2141
+ children: [
2142
+ action.icon,
2143
+ action.label,
2144
+ /* @__PURE__ */ jsx26(ChevronRight3, { className: "ml-auto h-4 w-4 text-muted-foreground" })
2145
+ ]
2146
+ }
2147
+ ),
2148
+ /* @__PURE__ */ jsx26(DropdownMenu3.Portal, { children: /* @__PURE__ */ jsx26(
2149
+ DropdownMenu3.SubContent,
2150
+ {
2151
+ sideOffset: 4,
2152
+ className: "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95",
2153
+ children: action.children.map((child) => /* @__PURE__ */ jsxs23(
2154
+ DropdownMenu3.Item,
2155
+ {
2156
+ className: cn(
2157
+ itemClass2,
2158
+ child.destructive && "text-destructive focus:bg-destructive/10"
2159
+ ),
2160
+ disabled: child.disabled,
2161
+ onClick: child.onClick,
2162
+ children: [
2163
+ child.icon,
2164
+ child.label
2165
+ ]
2166
+ },
2167
+ child.label
2168
+ ))
2169
+ }
2170
+ ) })
2171
+ ] }, action.label);
2172
+ }
2134
2173
  return action.href ? /* @__PURE__ */ jsx26(
2135
2174
  DropdownMenu3.Item,
2136
2175
  {
@@ -2180,6 +2219,36 @@ function RowActionsMenu({
2180
2219
  action.icon,
2181
2220
  action.label
2182
2221
  ] });
2222
+ if (action.children?.length) {
2223
+ return /* @__PURE__ */ jsxs23("div", { children: [
2224
+ /* @__PURE__ */ jsx26("div", { className: "mx-3 my-1 h-px bg-border" }),
2225
+ /* @__PURE__ */ jsxs23("div", { className: "flex items-center gap-3 px-3 pb-1 pt-2 text-xs font-medium uppercase tracking-wide text-muted-foreground", children: [
2226
+ action.icon,
2227
+ action.label
2228
+ ] }),
2229
+ action.children.map((child) => /* @__PURE__ */ jsxs23(
2230
+ "button",
2231
+ {
2232
+ type: "button",
2233
+ disabled: child.disabled,
2234
+ className: cn(
2235
+ sheetItemClass2,
2236
+ child.destructive && "text-destructive"
2237
+ ),
2238
+ onClick: () => {
2239
+ child.onClick?.();
2240
+ setOpen(false);
2241
+ },
2242
+ children: [
2243
+ child.icon,
2244
+ child.label
2245
+ ]
2246
+ },
2247
+ child.label
2248
+ )),
2249
+ /* @__PURE__ */ jsx26("div", { className: "mx-3 my-1 h-px bg-border" })
2250
+ ] }, action.label);
2251
+ }
2183
2252
  return action.href ? /* @__PURE__ */ jsx26(
2184
2253
  "span",
2185
2254
  {