@beweco/aurora-ui 0.1.57 → 0.1.58

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 CHANGED
@@ -2109,13 +2109,15 @@ var MenuNavList = React.forwardRef(function (_a, ref) {
2109
2109
  }
2110
2110
  }, [onSelect]);
2111
2111
  // Renders a sub-item (text-only, hierarchy line, pill selected state).
2112
- // Aplicamos estilos de selección por key porque el Listbox anidado puede no inyectar data-selected.
2112
+ // Estilos de selección aplicados por isSelected en classNames (no solo por CSS externo) para que
2113
+ // funcionen igual con el paquete publicado en npm: evita que el CSS de la app pise o que el
2114
+ // build no incluya la regla .menu-nav-list__sub-item[data-menu-subitem-selected="true"].
2113
2115
  var renderSubItem = React.useCallback(function (item, parentKey) {
2114
2116
  var _a;
2115
2117
  item.href; var itemProps = __rest(item, ["href"]);
2116
2118
  var isSelected = item.key === selectedKey;
2117
2119
  return (React.createElement(react.ListboxItem, __assign({}, itemProps, { key: item.key, textValue: item.title, title: item.title, startContent: null, endContent: (_a = item.endContent) !== null && _a !== void 0 ? _a : null, "aria-selected": isSelected, "data-menu-subitem-selected": isSelected ? "true" : "false", classNames: {
2118
- base: react.cn("min-h-9 rounded-large px-3 py-2 menu-nav-list__sub-item", "text-default-500 data-[hover=true]:text-default-700", "data-[selected=true]:bg-default-100 data-[selected=true]:text-foreground data-[selected=true]:font-semibold"),
2120
+ base: react.cn("min-h-9 rounded-large px-3 py-2 menu-nav-list__sub-item", "text-default-500 data-[hover=true]:text-default-700", "data-[selected=true]:bg-default-100 data-[selected=true]:text-foreground data-[selected=true]:font-semibold", isSelected && "bg-primary-100 font-semibold text-primary"),
2119
2121
  }, onPress: function () { return handleItemPress(item); } })));
2120
2122
  }, [handleItemPress, selectedKey]);
2121
2123
  // Renders the item displayed inside the Popover when the menu is collapsed.
package/dist/index.esm.js CHANGED
@@ -2110,13 +2110,15 @@ var MenuNavList = React.forwardRef(function (_a, ref) {
2110
2110
  }
2111
2111
  }, [onSelect]);
2112
2112
  // Renders a sub-item (text-only, hierarchy line, pill selected state).
2113
- // Aplicamos estilos de selección por key porque el Listbox anidado puede no inyectar data-selected.
2113
+ // Estilos de selección aplicados por isSelected en classNames (no solo por CSS externo) para que
2114
+ // funcionen igual con el paquete publicado en npm: evita que el CSS de la app pise o que el
2115
+ // build no incluya la regla .menu-nav-list__sub-item[data-menu-subitem-selected="true"].
2114
2116
  var renderSubItem = React.useCallback(function (item, parentKey) {
2115
2117
  var _a;
2116
2118
  item.href; var itemProps = __rest(item, ["href"]);
2117
2119
  var isSelected = item.key === selectedKey;
2118
2120
  return (createElement(ListboxItem, __assign({}, itemProps, { key: item.key, textValue: item.title, title: item.title, startContent: null, endContent: (_a = item.endContent) !== null && _a !== void 0 ? _a : null, "aria-selected": isSelected, "data-menu-subitem-selected": isSelected ? "true" : "false", classNames: {
2119
- base: cn("min-h-9 rounded-large px-3 py-2 menu-nav-list__sub-item", "text-default-500 data-[hover=true]:text-default-700", "data-[selected=true]:bg-default-100 data-[selected=true]:text-foreground data-[selected=true]:font-semibold"),
2121
+ base: cn("min-h-9 rounded-large px-3 py-2 menu-nav-list__sub-item", "text-default-500 data-[hover=true]:text-default-700", "data-[selected=true]:bg-default-100 data-[selected=true]:text-foreground data-[selected=true]:font-semibold", isSelected && "bg-primary-100 font-semibold text-primary"),
2120
2122
  }, onPress: function () { return handleItemPress(item); } })));
2121
2123
  }, [handleItemPress, selectedKey]);
2122
2124
  // Renders the item displayed inside the Popover when the menu is collapsed.
@@ -1 +1 @@
1
- {"version":3,"file":"MenuNavList.d.ts","sourceRoot":"","sources":["../../../../../../src/components/menu/_internal/menu-nav-list/MenuNavList.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAG5D;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,WAAW,mGA2ZvB,CAAC"}
1
+ {"version":3,"file":"MenuNavList.d.ts","sourceRoot":"","sources":["../../../../../../src/components/menu/_internal/menu-nav-list/MenuNavList.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAG5D;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,WAAW,mGA6ZvB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@beweco/aurora-ui",
3
- "version": "0.1.57",
3
+ "version": "0.1.58",
4
4
  "description": "Bewe Aurora UI Component Library",
5
5
  "main": "./dist/index.cjs.js",
6
6
  "module": "./dist/index.esm.js",