tc-dazzle-ui 1.6.0 → 1.8.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.esm.js CHANGED
@@ -388,7 +388,7 @@ const HeaderMenu = ({ items, onItemClick, onDropdownItemClick, className = '', }
388
388
  return (jsx("div", { ref: menuRef, className: `tc-header-menu ${className}`.trim(), children: items.map((item) => {
389
389
  const isOpen = openMenuId === item.id;
390
390
  const hasDropdown = item.dropdownItems && item.dropdownItems.length > 0;
391
- return (jsxs("div", { className: "tc-header-menu__item-wrapper", children: [jsxs("button", { className: `tc-header-menu__item ${isOpen ? 'tc-header-menu__item--active' : ''}`, onClick: () => handleItemClick(item), type: "button", "aria-expanded": hasDropdown ? isOpen : undefined, "aria-haspopup": hasDropdown ? 'menu' : undefined, children: [jsx("span", { className: "tc-header-menu__icon", children: item.icon || defaultIcons[item.id.toLowerCase()] || jsx(BookmarkIcon, {}) }), jsx("span", { className: "tc-header-menu__label", children: item.label })] }), hasDropdown && isOpen && (jsx("div", { className: "tc-header-menu__dropdown", children: jsx(DropdownMenu, { items: item.dropdownItems, onItemClick: (dropdownItem) => handleDropdownItemClick(item, dropdownItem), showIcons: false }) }))] }, item.id));
391
+ return (jsxs("div", { className: "tc-header-menu__item-wrapper", children: [jsxs("button", { className: `tc-header-menu__item ${isOpen ? 'tc-header-menu__item--active' : ''}`, onClick: () => handleItemClick(item), type: "button", title: item.label, "aria-label": item.label, "aria-expanded": hasDropdown ? isOpen : undefined, "aria-haspopup": hasDropdown ? 'menu' : undefined, children: [jsx("span", { className: "tc-header-menu__icon", children: item.icon || defaultIcons[item.id.toLowerCase()] || jsx(BookmarkIcon, {}) }), jsx("span", { className: "tc-header-menu__label", children: item.label })] }), hasDropdown && isOpen && (jsx("div", { className: "tc-header-menu__dropdown", children: jsx(DropdownMenu, { items: item.dropdownItems, onItemClick: (dropdownItem) => handleDropdownItemClick(item, dropdownItem), showIcons: false }) }))] }, item.id));
392
392
  }) }));
393
393
  };
394
394
 
@@ -456,9 +456,7 @@ const Sidebar = ({ sections, activeItemId, onItemClick, onSettingsClick, onExpan
456
456
  const [expandedSections, setExpandedSections] = useState(() => {
457
457
  const initialExpanded = new Set();
458
458
  sections.forEach((section) => {
459
- if (section.defaultExpanded !== false) {
460
- initialExpanded.add(section.id);
461
- }
459
+ initialExpanded.add(section.id);
462
460
  });
463
461
  return initialExpanded;
464
462
  });