@cjlapao/ui-kit 0.2.16 → 0.2.17

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 CHANGED
@@ -73880,6 +73880,14 @@ function MenuPopup({ anchor, placement, width, children }) {
73880
73880
 
73881
73881
  // src/components/Menu/Menu.tsx
73882
73882
  var import_jsx_runtime336 = require("react/jsx-runtime");
73883
+ var menuPadding = {
73884
+ none: "p-0",
73885
+ xs: "p-1 sm:p-1.5",
73886
+ sm: "p-2 sm:p-2.5",
73887
+ md: "p-3 sm:p-4",
73888
+ lg: "p-4 sm:p-5",
73889
+ xl: "p-5 sm:p-6"
73890
+ };
73883
73891
  var rowSizes = { xs: "px-2 py-1 text-xs", sm: "px-2.5 py-1.5 text-xs", md: "px-3 py-2 text-sm", lg: "px-4 py-2.5 text-base", xl: "px-5 py-3 text-lg" };
73884
73892
  var text = (item) => item.textValue ?? (typeof item.label === "string" ? item.label : item.id);
73885
73893
  function MenuList({ items, state, depth = 0, parentLabel, onBack, focusOnMount = false, grouped = false }) {
@@ -74029,7 +74037,7 @@ function MenuRow({ item, state, depth }) {
74029
74037
  tabIndex: -1,
74030
74038
  className: (0, import_classnames142.default)(
74031
74039
  "flex w-full items-center gap-2 text-left font-medium outline-none transition-colors",
74032
- itemPadding === void 0 ? rowSizes[props.size ?? "md"] : [rowSizes[props.size ?? "md"].split(" ").filter((token) => token.startsWith("text-")), getSurfacePaddingClass(itemPadding)],
74040
+ itemPadding === void 0 ? rowSizes[props.size ?? "md"] : [rowSizes[props.size ?? "md"].split(" ").filter((token) => token.startsWith("text-")), menuPadding[itemPadding]],
74033
74041
  getSurfaceCornerClass(item.corner ?? props.itemCorner ?? "rounded-sm"),
74034
74042
  getSurfaceTriggerTokens(itemTone2).focusRing,
74035
74043
  item.disabled ? "cursor-not-allowed opacity-40" : item.danger ? "text-rose-700 hover:bg-rose-50 dark:text-rose-300 dark:hover:bg-rose-500/10" : [tokens.hoverBg, tokens.hoverText],
@@ -74073,13 +74081,13 @@ function MenuRow({ item, state, depth }) {
74073
74081
  }
74074
74082
  function MenuSurface({ state, children, root = false }) {
74075
74083
  const { props } = state;
74076
- return /* @__PURE__ */ (0, import_jsx_runtime336.jsx)("div", { "data-menu-owner": state.owner, onMouseEnter: state.cancelLeave, onMouseLeave: state.scheduleLeave, children: /* @__PURE__ */ (0, import_jsx_runtime336.jsxs)(
74084
+ return /* @__PURE__ */ (0, import_jsx_runtime336.jsx)("div", { "data-menu-owner": state.owner, onMouseEnter: state.cancelLeave, onMouseLeave: state.scheduleLeave, children: /* @__PURE__ */ (0, import_jsx_runtime336.jsx)(
74077
74085
  Panel_default,
74078
74086
  {
74079
74087
  variant: props.variant ?? "outlined",
74080
74088
  tone: props.tone ?? "neutral",
74081
74089
  corner: props.corner,
74082
- padding: props.padding ?? "xs",
74090
+ padding: "none",
74083
74091
  glassOpacity: props.glassOpacity,
74084
74092
  vibrancy: props.vibrancy,
74085
74093
  specularMode: props.specularMode,
@@ -74087,11 +74095,11 @@ function MenuSurface({ state, children, root = false }) {
74087
74095
  root ? props.className : void 0,
74088
74096
  (!root || props.popup || props.trigger || props.anchorRef) && "backdrop-blur-xl"
74089
74097
  ),
74090
- children: [
74098
+ children: /* @__PURE__ */ (0, import_jsx_runtime336.jsxs)("div", { "data-menu-padding": true, className: menuPadding[props.padding ?? "xs"], children: [
74091
74099
  root && props.header && /* @__PURE__ */ (0, import_jsx_runtime336.jsx)("div", { className: "mb-2 border-b border-neutral-200 pb-2 dark:border-white/10", children: props.header }),
74092
74100
  /* @__PURE__ */ (0, import_jsx_runtime336.jsx)("div", { className: (0, import_classnames142.default)("overflow-auto", THIN_SCROLLBAR), style: { maxHeight: `min(${props.maxHeight ?? 400}px, calc(100dvh - 32px))` }, children }),
74093
74101
  root && props.footer && /* @__PURE__ */ (0, import_jsx_runtime336.jsx)("div", { className: "mt-2 border-t border-neutral-200 pt-2 dark:border-white/10", children: props.footer })
74094
- ]
74102
+ ] })
74095
74103
  }
74096
74104
  ) });
74097
74105
  }