@moneyforward/mfui-components 3.28.0 → 3.28.1

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.
@@ -50,5 +50,5 @@ type = 'button', href, customLinkComponent, ...props }, ref) => {
50
50
  ...props,
51
51
  };
52
52
  }, [isButton, classes.root, className, href, isDisabled, type, props, ref]);
53
- return (_jsx(FocusIndicator, { children: _jsxs(Tag, { ...tagProps, children: [leftIcon ? _jsx("div", { className: cx(classes.leftIcon, 'mfui-Button__leftIcon'), children: leftIcon }) : null, loading ? (_jsx(ProgressIndicator, { className: cx(classes.loadingIndicator, 'mfui-Button__loadingIndicator') })) : null, typeof children === 'string' ? _jsx(Typography, { variant: typographyVariant, children: children }) : children, rightIcon ? _jsx("div", { className: cx(classes.rightIcon, 'mfui-Button__rightIcon'), children: rightIcon }) : null, isDropdownTrigger ? _jsx(Dropdown, { className: cx(classes.dropdownIcon, 'mfui-Button__dropdownIcon') }) : null] }) }));
53
+ return (_jsx(FocusIndicator, { children: _jsxs(Tag, { ...tagProps, children: [leftIcon ? _jsx("div", { className: cx(classes.leftIcon, 'mfui-Button__leftIcon'), children: leftIcon }) : null, loading ? (_jsx(ProgressIndicator, { className: cx(classes.loadingIndicator, 'mfui-Button__loadingIndicator') })) : null, typeof children === 'string' ? _jsx(Typography, { variant: typographyVariant, children: children }) : children, rightIcon ? _jsx("div", { className: cx(classes.rightIcon, 'mfui-Button__rightIcon'), children: rightIcon }) : null, isDropdownTrigger ? (_jsx(Dropdown, { "aria-hidden": "true", className: cx(classes.dropdownIcon, 'mfui-Button__dropdownIcon') })) : null] }) }));
54
54
  });
@@ -41,5 +41,5 @@ export const CheckboxGroup = forwardRef(({ className, defaultValues, values, dis
41
41
  values: values ?? localValues,
42
42
  onChange: handleOnChange,
43
43
  }), [disabled, handleOnChange, localValues, name, values]);
44
- return (_jsx("div", { ref: ref, ...props, className: cx(classes.root, 'mfui-CheckboxGroup__root', className), children: _jsx(CheckboxGroupContext.Provider, { value: contextValue, children: children }) }));
44
+ return (_jsx("div", { ref: ref, ...props, className: cx(classes.root, 'mfui-CheckboxGroup__root', className), role: "group", children: _jsx(CheckboxGroupContext.Provider, { value: contextValue, children: children }) }));
45
45
  });
@@ -64,9 +64,9 @@ function DisclosureIcon({ disclosureIconProps, classes, }) {
64
64
  }
65
65
  const disclosureIcon = (() => {
66
66
  if (disclosureIconProps.type === 'basic') {
67
- return disclosureIconProps.isOpen ? _jsx(DisclosureBasicExpanded, {}) : _jsx(DisclosureBasicCollapsed, {});
67
+ return disclosureIconProps.isOpen ? (_jsx(DisclosureBasicExpanded, { "aria-hidden": "true" })) : (_jsx(DisclosureBasicCollapsed, { "aria-hidden": "true" }));
68
68
  }
69
- return disclosureIconProps.isOpen ? _jsx(DisclosureNestedExpanded, {}) : _jsx(DisclosureNestedCollapsed, {});
69
+ return disclosureIconProps.isOpen ? (_jsx(DisclosureNestedExpanded, { "aria-hidden": "true" })) : (_jsx(DisclosureNestedCollapsed, { "aria-hidden": "true" }));
70
70
  })();
71
71
  return (_jsx("div", { className: cx(classes.disclosureIconWrapper, 'mfui-DataTableCell__disclosureIconWrapper',
72
72
  /* TODO: Remove in v5.0.0 */ 'mfui-DataGridCell__disclosureIconWrapper'), children: disclosureIcon }));
@@ -47,7 +47,7 @@ const Trigger = forwardRef(({ targetId, children, className, onClick, ...props }
47
47
  toggle();
48
48
  onClick?.(event);
49
49
  }, [onClick, toggle]);
50
- return (_jsx(FocusIndicator, { children: _jsxs("button", { ref: ref, className: cx(classes.trigger, 'mfui-Disclosure__trigger', className), "aria-expanded": isOpen, "aria-controls": targetId, onClick: handleClick, ...props, children: [_jsx(Typography, { variant: "controlLabel", children: children }), isOpen ? _jsx(DisclosureBasicExpanded, {}) : _jsx(DisclosureBasicCollapsed, {})] }) }));
50
+ return (_jsx(FocusIndicator, { children: _jsxs("button", { ref: ref, className: cx(classes.trigger, 'mfui-Disclosure__trigger', className), "aria-expanded": isOpen, "aria-controls": targetId, onClick: handleClick, ...props, children: [_jsx(Typography, { variant: "controlLabel", children: children }), isOpen ? _jsx(DisclosureBasicExpanded, { "aria-hidden": "true" }) : _jsx(DisclosureBasicCollapsed, { "aria-hidden": "true" })] }) }));
51
51
  });
52
52
  /**
53
53
  * The target component for the Disclosure.
@@ -13,6 +13,6 @@ import { filterTriggerSlotRecipe } from '../../styled-system/recipes';
13
13
  export const FilterTrigger = forwardRef(({ label, value, inputProps, className, enableClearButton = false, clearButtonProps, ...props }, ref) => {
14
14
  const classes = filterTriggerSlotRecipe();
15
15
  const displayContent = value ? (_jsxs(Typography, { variant: "strongBody", children: [_jsx("span", { "data-mfui-content": "filter-trigger-label", children: `${label}:` }), _jsx("span", { "data-mfui-content": "filter-trigger-value", children: value })] })) : (_jsx(Typography, { variant: "controlLabel", children: _jsx("span", { "data-mfui-content": "filter-trigger-label", children: label }) }));
16
- return (_jsxs("div", { className: cx(classes.wrapper, 'mfui-FilterTrigger__wrapper'), children: [_jsx(FocusIndicator, { children: _jsxs("button", { ref: ref, type: "button", className: cx(classes.trigger, 'mfui-FilterTrigger__trigger', className), "data-selected": !!value, "data-mfui-has-clear-button": enableClearButton ? !!value : false, ...props, children: [_jsx("span", { className: cx(classes.content, 'mfui-FilterTrigger__content'), "data-mfui-content": "filter-trigger-display-value", children: displayContent }), _jsx("span", { className: cx(classes.dropdownIcon, 'mfui-FilterTrigger__dropdownIcon'), children: _jsx(DropdownIcon, {}) })] }) }), _jsx("input", { type: "hidden", ...inputProps, value: value }), enableClearButton && value ? (_jsx("div", { className: cx(classes.clearButtonWrapper, 'mfui-FilterTrigger__clearButtonWrapper'), children: _jsx(ClearButton, { "aria-label": clearButtonProps?.['aria-label'] ?? '値をクリアする', "data-mfui-content": "filter-trigger-clear-button", onClick: clearButtonProps?.onClick }) })) : null] }));
16
+ return (_jsxs("div", { className: cx(classes.wrapper, 'mfui-FilterTrigger__wrapper'), children: [_jsx(FocusIndicator, { children: _jsxs("button", { ref: ref, type: "button", className: cx(classes.trigger, 'mfui-FilterTrigger__trigger', className), "data-selected": !!value, "data-mfui-has-clear-button": enableClearButton ? !!value : false, ...props, children: [_jsx("span", { className: cx(classes.content, 'mfui-FilterTrigger__content'), "data-mfui-content": "filter-trigger-display-value", children: displayContent }), _jsx("span", { className: cx(classes.dropdownIcon, 'mfui-FilterTrigger__dropdownIcon'), children: _jsx(DropdownIcon, { "aria-hidden": "true" }) })] }) }), _jsx("input", { type: "hidden", ...inputProps, value: value }), enableClearButton && value ? (_jsx("div", { className: cx(classes.clearButtonWrapper, 'mfui-FilterTrigger__clearButtonWrapper'), children: _jsx(ClearButton, { "aria-label": clearButtonProps?.['aria-label'] ?? '値をクリアする', "data-mfui-content": "filter-trigger-clear-button", onClick: clearButtonProps?.onClick }) })) : null] }));
17
17
  });
18
18
  FilterTrigger.displayName = 'FilterTrigger';
@@ -8,8 +8,12 @@ type IconButtonCommonProps = {
8
8
  */
9
9
  outlined?: IconButtonSlotRecipeVariant['outlined'];
10
10
  /**
11
- * Icon element to be rendered inside the button
12
- * Only one element allowed
11
+ * Icon element to be rendered inside the button.
12
+ * Only one element (typically an SVG icon) is expected.
13
+ *
14
+ * The icon is not hidden from assistive technologies automatically.
15
+ * If the icon is decorative, hide it yourself (e.g. `aria-hidden="true"`)
16
+ * and provide an `aria-label` on IconButton itself to expose the accessible name.
13
17
  */
14
18
  children: React.ReactNode;
15
19
  /**
@@ -38,7 +38,7 @@ export function BaseMainNavigation({ className, featureShortcut, navigationItems
38
38
  if (navigation.children) {
39
39
  return (_jsx(NestedNavigationItemRenderer, { navigation: navigation, originalIndex: index, classes: classes, InternalLinkTag: InternalLinkTag, isCollapsed: isCollapsed, openPopoverIndex: openPopoverIndex, setOpenPopoverIndex: setOpenPopoverIndex }, index));
40
40
  }
41
- return (_jsx("li", { className: cx(classes.listItem, 'mfui-BaseMainNavigation__listItem'), children: _jsx(Tooltip, { className: cx(classes.listItemTooltip, 'mfui-BaseMainNavigation__listItemTooltip'), content: navigation.label, disabled: !isCollapsed, placement: "right", children: _jsx(FocusIndicator, { position: "inside", children: _jsx(NavigationLink, { tag: InternalLinkTag, isExternal: navigation.isExternal, href: navigation.href, className: cx(classes.listItemAnchor, 'mfui-BaseMainNavigation__listItemAnchor'), "aria-label": isCollapsed ? navigation.label : undefined, "aria-current": navigation.isCurrent ? 'page' : undefined, children: _jsxs("div", { className: cx(classes.labelGroup, 'mfui-BaseMainNavigation__labelGroup'), children: [_jsxs("div", { className: cx(classes.iconAndLabel, 'mfui-BaseMainNavigation__iconAndLabel'), children: [_jsx("div", { className: cx(classes.listItemAnchorIcon, 'mfui-BaseMainNavigation__listItemAnchorIcon'), children: navigation.icon }), isCollapsed ? null : _jsx(Typography, { variant: "controlLabel", children: navigation.label })] }), navigation.locked ? (_jsx(Lock, { className: cx(classes.lockIcon, 'mfui-BaseMainNavigation__lockIcon'), "aria-label": navigation.lockIconProps?.['aria-label'] ?? 'ロックされています' })) : null, !isCollapsed && navigation.statusSlot && navigation.locked !== true
41
+ return (_jsx("li", { className: cx(classes.listItem, 'mfui-BaseMainNavigation__listItem'), children: _jsx(Tooltip, { className: cx(classes.listItemTooltip, 'mfui-BaseMainNavigation__listItemTooltip'), content: navigation.label, disabled: !isCollapsed, placement: "right", children: _jsx(FocusIndicator, { position: "inside", children: _jsx(NavigationLink, { tag: InternalLinkTag, isExternal: navigation.isExternal, href: navigation.href, className: cx(classes.listItemAnchor, 'mfui-BaseMainNavigation__listItemAnchor'), "aria-label": isCollapsed ? navigation.label : undefined, "aria-current": navigation.isCurrent ? 'page' : undefined, children: _jsxs("div", { className: cx(classes.labelGroup, 'mfui-BaseMainNavigation__labelGroup'), children: [_jsxs("div", { className: cx(classes.iconAndLabel, 'mfui-BaseMainNavigation__iconAndLabel'), children: [_jsx("div", { "aria-hidden": "true", className: cx(classes.listItemAnchorIcon, 'mfui-BaseMainNavigation__listItemAnchorIcon'), children: navigation.icon }), isCollapsed ? null : _jsx(Typography, { variant: "controlLabel", children: navigation.label })] }), navigation.locked ? (_jsx(Lock, { className: cx(classes.lockIcon, 'mfui-BaseMainNavigation__lockIcon'), "aria-label": navigation.lockIconProps?.['aria-label'] ?? 'ロックされています' })) : null, !isCollapsed && navigation.statusSlot && navigation.locked !== true
42
42
  ? navigation.statusSlot
43
43
  : null] }) }) }) }) }, index));
44
44
  }) }), navigationItems.some((navigation) => 'isGroupMenu' in navigation && navigation.isGroupMenu) && (_jsx("ul", { className: cx(classes.groupMenuList, 'mfui-BaseMainNavigation__groupMenuList'), children: navigationItems.map((navigation, index) => {
@@ -53,7 +53,7 @@ export function BaseMainNavigation({ className, featureShortcut, navigationItems
53
53
  return null;
54
54
  }
55
55
  const groupLabelId = `${navId}-group-label-${String(index)}`;
56
- return (_jsxs("div", { className: cx(classes.groupLabelSection, 'mfui-BaseMainNavigation__groupLabelSection'), children: [_jsx("div", { className: cx(classes.groupLabel, 'mfui-BaseMainNavigation__groupLabel'), children: _jsx(Typography, { id: groupLabelId, variant: "condensedControlLabel", className: cx(classes.groupLabelText, 'mfui-BaseMainNavigation__groupLabelText'), children: navigation.label }) }), _jsx("ul", { "aria-labelledby": groupLabelId, className: cx(classes.childrenList, 'mfui-BaseMainNavigation__childrenList'), children: navigation.children.map((child, childIndex) => (_jsx("li", { className: cx(classes.childrenListItem, 'mfui-BaseMainNavigation__childrenListItem'), children: _jsx(FocusIndicator, { position: "inside", children: _jsx(NavigationLink, { tag: InternalLinkTag, isExternal: child.isExternal, href: child.href, className: cx(classes.listItemAnchor, 'mfui-BaseMainNavigation__listItemAnchor'), "aria-current": child.isCurrent ? 'page' : undefined, children: _jsxs("div", { className: cx(classes.labelGroup, 'mfui-BaseMainNavigation__labelGroup'), children: [_jsxs("div", { className: cx(classes.iconAndLabel, 'mfui-BaseMainNavigation__iconAndLabel'), children: [_jsx("div", { className: cx(classes.listItemAnchorIcon, 'mfui-BaseMainNavigation__listItemAnchorIcon'), children: child.icon }), _jsx(Typography, { variant: "controlLabel", children: child.label })] }), child.locked ? (_jsx(Lock, { className: cx(classes.lockIcon, 'mfui-BaseMainNavigation__lockIcon'), "aria-label": child.lockIconProps?.['aria-label'] ?? 'ロックされています' })) : null, child.statusSlot && child.locked !== true ? child.statusSlot : null] }) }) }) }, childIndex))) })] }, index));
56
+ return (_jsxs("div", { className: cx(classes.groupLabelSection, 'mfui-BaseMainNavigation__groupLabelSection'), children: [_jsx("div", { className: cx(classes.groupLabel, 'mfui-BaseMainNavigation__groupLabel'), children: _jsx(Typography, { id: groupLabelId, variant: "condensedControlLabel", className: cx(classes.groupLabelText, 'mfui-BaseMainNavigation__groupLabelText'), children: navigation.label }) }), _jsx("ul", { "aria-labelledby": groupLabelId, className: cx(classes.childrenList, 'mfui-BaseMainNavigation__childrenList'), children: navigation.children.map((child, childIndex) => (_jsx("li", { className: cx(classes.childrenListItem, 'mfui-BaseMainNavigation__childrenListItem'), children: _jsx(FocusIndicator, { position: "inside", children: _jsx(NavigationLink, { tag: InternalLinkTag, isExternal: child.isExternal, href: child.href, className: cx(classes.listItemAnchor, 'mfui-BaseMainNavigation__listItemAnchor'), "aria-current": child.isCurrent ? 'page' : undefined, children: _jsxs("div", { className: cx(classes.labelGroup, 'mfui-BaseMainNavigation__labelGroup'), children: [_jsxs("div", { className: cx(classes.iconAndLabel, 'mfui-BaseMainNavigation__iconAndLabel'), children: [_jsx("div", { "aria-hidden": "true", className: cx(classes.listItemAnchorIcon, 'mfui-BaseMainNavigation__listItemAnchorIcon'), children: child.icon }), _jsx(Typography, { variant: "controlLabel", children: child.label })] }), child.locked ? (_jsx(Lock, { className: cx(classes.lockIcon, 'mfui-BaseMainNavigation__lockIcon'), "aria-label": child.lockIconProps?.['aria-label'] ?? 'ロックされています' })) : null, child.statusSlot && child.locked !== true ? child.statusSlot : null] }) }) }) }, childIndex))) })] }, index));
57
57
  })] }), enableCollapsible ? (_jsx("div", { className: cx(classes.footer, 'mfui-BaseMainNavigation__footer'), children: _jsx(Tooltip, { content: toggleButtonLabel, placement: "right", children: _jsx(ToggleButton, { className: cx(classes.toggleButton, 'mfui-BaseMainNavigation__toggleButton'), iconClassName: cx(classes.toggleButtonIcon, 'mfui-BaseMainNavigation__toggleButtonIcon'), isCollapsed: isCollapsed, "aria-label": toggleButtonLabel, targetId: navId, handleClickToggleButton: handleClickToggleButton }) }) })) : null] }));
58
58
  }
59
59
  /**
@@ -66,7 +66,7 @@ function NestedNavigationItemRenderer({ navigation, originalIndex, classes, Inte
66
66
  const hasCurrentChildren = navigation.children.some((child) => child.isCurrent);
67
67
  return (_jsx("li", { className: cx(classes.listItem, 'mfui-BaseMainNavigation__listItem'), "data-mfui-popover-portal-target-id": popoverPortalTargetId, children: isCollapsed ? (_jsx(CollapsedNestedNavigationItem, { navigation: navigation, classes: classes, InternalLinkTag: InternalLinkTag, hasCurrentChildren: hasCurrentChildren, popoverPortalTargetId: popoverPortalTargetId, isOpen: openPopoverIndex === originalIndex, onOpenChange: (isOpen) => {
68
68
  setOpenPopoverIndex(isOpen ? originalIndex : null);
69
- } })) : (_jsxs("details", { open: ('isOpenByDefault' in navigation && navigation.isOpenByDefault) || hasCurrentChildren, className: cx(classes.parentDetails, 'mfui-BaseMainNavigation__parentDetails'), children: [_jsx(FocusIndicator, { position: "inside", children: _jsxs("summary", { className: cx(classes.parentSummary, 'mfui-BaseMainNavigation__parentSummary'), children: [_jsx("div", { className: cx(classes.parentSummaryIcon, 'mfui-BaseMainNavigation__parentSummaryIcon'), children: navigation.icon }), _jsx(Typography, { variant: "controlLabel", children: navigation.label }), _jsx(DisclosureBasicCollapsed, { className: "mfui-BaseMainNavigation__icon_collapsed", "aria-hidden": "true", "data-mfui-content": "main-navigation-icon-collapsed" }), _jsx(DisclosureBasicExpanded, { className: "mfui-BaseMainNavigation__icon_expanded", "aria-hidden": "true", "data-mfui-content": "main-navigation-icon-expanded" })] }) }), _jsx("ul", { className: cx(classes.childrenList, 'mfui-BaseMainNavigation__childrenList'), children: navigation.children.map((child, childIndex) => (_jsx("li", { className: cx(classes.childrenListItem, 'mfui-BaseMainNavigation__childrenListItem'), children: _jsx(FocusIndicator, { position: "inside", children: _jsx(NavigationLink, { tag: InternalLinkTag, isExternal: child.isExternal, href: child.href, className: cx(classes.childrenListItemAnchor, 'mfui-BaseMainNavigation__childrenListItemAnchor'), "aria-current": child.isCurrent ? 'page' : undefined, children: _jsx(Typography, { variant: "controlLabel", children: child.label }) }) }) }, childIndex))) })] })) }));
69
+ } })) : (_jsxs("details", { open: ('isOpenByDefault' in navigation && navigation.isOpenByDefault) || hasCurrentChildren, className: cx(classes.parentDetails, 'mfui-BaseMainNavigation__parentDetails'), children: [_jsx(FocusIndicator, { position: "inside", children: _jsxs("summary", { className: cx(classes.parentSummary, 'mfui-BaseMainNavigation__parentSummary'), children: [_jsx("div", { "aria-hidden": "true", className: cx(classes.parentSummaryIcon, 'mfui-BaseMainNavigation__parentSummaryIcon'), children: navigation.icon }), _jsx(Typography, { variant: "controlLabel", children: navigation.label }), _jsx(DisclosureBasicCollapsed, { className: "mfui-BaseMainNavigation__icon_collapsed", "aria-hidden": "true", "data-mfui-content": "main-navigation-icon-collapsed" }), _jsx(DisclosureBasicExpanded, { className: "mfui-BaseMainNavigation__icon_expanded", "aria-hidden": "true", "data-mfui-content": "main-navigation-icon-expanded" })] }) }), _jsx("ul", { className: cx(classes.childrenList, 'mfui-BaseMainNavigation__childrenList'), children: navigation.children.map((child, childIndex) => (_jsx("li", { className: cx(classes.childrenListItem, 'mfui-BaseMainNavigation__childrenListItem'), children: _jsx(FocusIndicator, { position: "inside", children: _jsx(NavigationLink, { tag: InternalLinkTag, isExternal: child.isExternal, href: child.href, className: cx(classes.childrenListItemAnchor, 'mfui-BaseMainNavigation__childrenListItemAnchor'), "aria-current": child.isCurrent ? 'page' : undefined, children: _jsx(Typography, { variant: "controlLabel", children: child.label }) }) }) }, childIndex))) })] })) }));
70
70
  }
71
71
  /**
72
72
  * The component for displaying nested navigation in collapsed state with popover.
@@ -87,7 +87,7 @@ function CollapsedNestedNavigationItem({ navigation, classes, InternalLinkTag, h
87
87
  };
88
88
  return (_jsx(Popover, { enableAutoFocusOnPopover: false, enableAutoFocusOnTrigger: false, open: isOpen, targetDOMNode: document.querySelector(`[data-mfui-popover-portal-target-id="${popoverPortalTargetId}"]`), allowedPlacements: ['right-start', 'right', 'right-end'], contentProps: {
89
89
  tabIndex: -1,
90
- }, renderTrigger: ({ setTriggerRef }) => (_jsx(Tooltip, { className: cx(classes.listItemTooltip, 'mfui-BaseMainNavigation__listItemTooltip'), content: navigation.label, disabled: isOpen, placement: "right", children: _jsx(FocusIndicator, { position: "inside", children: _jsx("button", { ref: setTriggerRef, type: "button", className: cx(classes.listItemAnchor, 'mfui-BaseMainNavigation__listItemAnchor'), "data-mfui-current": hasCurrentChildren ? 'page' : undefined, "aria-current": hasCurrentChildren ? true : undefined, "aria-label": navigation.label, onClick: handleClick, onKeyDown: handleKeyDown, children: _jsx("div", { className: cx(classes.labelGroup, 'mfui-BaseMainNavigation__labelGroup'), children: _jsx("div", { className: cx(classes.iconAndLabel, 'mfui-BaseMainNavigation__iconAndLabel'), children: _jsx("div", { className: cx(classes.listItemAnchorIcon, 'mfui-BaseMainNavigation__listItemAnchorIcon'), children: navigation.icon }) }) }) }) }) })), renderContent: () => (_jsx("div", { ref: popoverContentRef, className: cx(classes.popoverChildrenList, 'mfui-BaseMainNavigation__popoverChildrenList'), tabIndex: -1, children: navigation.children.map((child, childIndex) => (_jsx("div", { className: cx(classes.childrenListItem, 'mfui-BaseMainNavigation__childrenListItem'), children: _jsx(FocusIndicator, { position: "inside", children: _jsx(NavigationLink, { tag: InternalLinkTag, isExternal: child.isExternal, href: child.href, className: cx(classes.childrenListItemAnchor, 'mfui-BaseMainNavigation__childrenListItemAnchor'), "aria-current": child.isCurrent ? 'page' : undefined, onClick: () => {
90
+ }, renderTrigger: ({ setTriggerRef }) => (_jsx(Tooltip, { className: cx(classes.listItemTooltip, 'mfui-BaseMainNavigation__listItemTooltip'), content: navigation.label, disabled: isOpen, placement: "right", children: _jsx(FocusIndicator, { position: "inside", children: _jsx("button", { ref: setTriggerRef, type: "button", className: cx(classes.listItemAnchor, 'mfui-BaseMainNavigation__listItemAnchor'), "data-mfui-current": hasCurrentChildren ? 'page' : undefined, "aria-current": hasCurrentChildren ? true : undefined, "aria-label": navigation.label, onClick: handleClick, onKeyDown: handleKeyDown, children: _jsx("div", { className: cx(classes.labelGroup, 'mfui-BaseMainNavigation__labelGroup'), children: _jsx("div", { className: cx(classes.iconAndLabel, 'mfui-BaseMainNavigation__iconAndLabel'), children: _jsx("div", { "aria-hidden": "true", className: cx(classes.listItemAnchorIcon, 'mfui-BaseMainNavigation__listItemAnchorIcon'), children: navigation.icon }) }) }) }) }) })), renderContent: () => (_jsx("div", { ref: popoverContentRef, className: cx(classes.popoverChildrenList, 'mfui-BaseMainNavigation__popoverChildrenList'), tabIndex: -1, children: navigation.children.map((child, childIndex) => (_jsx("div", { className: cx(classes.childrenListItem, 'mfui-BaseMainNavigation__childrenListItem'), children: _jsx(FocusIndicator, { position: "inside", children: _jsx(NavigationLink, { tag: InternalLinkTag, isExternal: child.isExternal, href: child.href, className: cx(classes.childrenListItemAnchor, 'mfui-BaseMainNavigation__childrenListItemAnchor'), "aria-current": child.isCurrent ? 'page' : undefined, onClick: () => {
91
91
  onOpenChange(false);
92
92
  }, children: _jsx(Typography, { variant: "controlLabel", children: child.label }) }) }) }, childIndex))) })), onOpenStateChanged: onOpenChange }));
93
93
  }
@@ -54,13 +54,13 @@ export const NarrowViewportMainNavigation = forwardRef(({ className, featureShor
54
54
  return null;
55
55
  }
56
56
  return (_jsx("li", { className: cx(classes.listItem, 'mfui-NarrowViewportMainNavigation__listItem'), children: navigation.children ? (_jsxs("details", { open: ('isOpenByDefault' in navigation && navigation.isOpenByDefault) ||
57
- hasCurrentNavigationInChildren(navigation.children), className: cx(classes.parentDetails, 'mfui-NarrowViewportMainNavigation__parentDetails'), children: [_jsx(FocusIndicator, { position: "inside", children: _jsxs("summary", { className: cx(classes.parentSummary, 'mfui-NarrowViewportMainNavigation__parentSummary'), children: [_jsx("div", { className: cx(classes.parentSummaryIcon, 'mfui-NarrowViewportMainNavigation__parentSummaryIcon'), children: navigation.icon }), _jsx(Typography, { variant: "controlLabel", children: navigation.label }), _jsx(DisclosureBasicCollapsed, { className: "mfui-NarrowViewportMainNavigation__icon_collapsed", "aria-hidden": "true", "data-mfui-content": "main-navigation-icon-collapsed" }), _jsx(DisclosureBasicExpanded, { className: "mfui-NarrowViewportMainNavigation__icon_expanded", "aria-hidden": "true", "data-mfui-content": "main-navigation-icon-expanded" })] }) }), _jsx("ul", { className: cx(classes.childrenList, 'mfui-NarrowViewportMainNavigation__childrenList'), children: navigation.children.map((child, childIndex) => (_jsx("li", { className: cx(classes.childrenListItem, 'mfui-NarrowViewportMainNavigation__childrenListItem'), children: _jsx(FocusIndicator, { position: "inside", children: _jsx(NavigationLink, { tag: InternalLinkTag, isExternal: child.isExternal, href: child.href, className: cx(classes.childrenListItemAnchor, 'mfui-NarrowViewportMainNavigation__childrenListItemAnchor'), "aria-current": child.isCurrent ? 'page' : undefined, onClick: handleCloseMainNavigation, children: _jsx(Typography, { variant: "controlLabel", children: child.label }) }) }) }, childIndex))) })] })) : (_jsx(FocusIndicator, { position: "inside", children: _jsx(NavigationLink, { tag: InternalLinkTag, isExternal: navigation.isExternal, href: navigation.href, className: cx(classes.listItemAnchor, 'mfui-NarrowViewportMainNavigation__listItemAnchor'), "aria-current": navigation.isCurrent ? 'page' : undefined, onClick: handleCloseMainNavigation, children: _jsxs("div", { className: cx(classes.labelGroup, 'mfui-NarrowViewportMainNavigation__labelGroup'), children: [_jsxs("div", { className: cx(classes.iconAndLabel, 'mfui-NarrowViewportMainNavigation__iconAndLabel'), children: [_jsx("div", { className: cx(classes.listItemAnchorIcon, 'mfui-NarrowViewportMainNavigation__listItemAnchorIcon'), children: navigation.icon }), _jsx(Typography, { variant: "controlLabel", children: navigation.label })] }), navigation.locked ? (_jsx(Lock, { className: cx(classes.lockIcon, 'mfui-NarrowViewportMainNavigation__lockIcon'), "aria-label": navigation.lockIconProps?.['aria-label'] ?? 'ロックされています' })) : null] }) }) })) }, index));
57
+ hasCurrentNavigationInChildren(navigation.children), className: cx(classes.parentDetails, 'mfui-NarrowViewportMainNavigation__parentDetails'), children: [_jsx(FocusIndicator, { position: "inside", children: _jsxs("summary", { className: cx(classes.parentSummary, 'mfui-NarrowViewportMainNavigation__parentSummary'), children: [_jsx("div", { "aria-hidden": "true", className: cx(classes.parentSummaryIcon, 'mfui-NarrowViewportMainNavigation__parentSummaryIcon'), children: navigation.icon }), _jsx(Typography, { variant: "controlLabel", children: navigation.label }), _jsx(DisclosureBasicCollapsed, { className: "mfui-NarrowViewportMainNavigation__icon_collapsed", "aria-hidden": "true", "data-mfui-content": "main-navigation-icon-collapsed" }), _jsx(DisclosureBasicExpanded, { className: "mfui-NarrowViewportMainNavigation__icon_expanded", "aria-hidden": "true", "data-mfui-content": "main-navigation-icon-expanded" })] }) }), _jsx("ul", { className: cx(classes.childrenList, 'mfui-NarrowViewportMainNavigation__childrenList'), children: navigation.children.map((child, childIndex) => (_jsx("li", { className: cx(classes.childrenListItem, 'mfui-NarrowViewportMainNavigation__childrenListItem'), children: _jsx(FocusIndicator, { position: "inside", children: _jsx(NavigationLink, { tag: InternalLinkTag, isExternal: child.isExternal, href: child.href, className: cx(classes.childrenListItemAnchor, 'mfui-NarrowViewportMainNavigation__childrenListItemAnchor'), "aria-current": child.isCurrent ? 'page' : undefined, onClick: handleCloseMainNavigation, children: _jsx(Typography, { variant: "controlLabel", children: child.label }) }) }) }, childIndex))) })] })) : (_jsx(FocusIndicator, { position: "inside", children: _jsx(NavigationLink, { tag: InternalLinkTag, isExternal: navigation.isExternal, href: navigation.href, className: cx(classes.listItemAnchor, 'mfui-NarrowViewportMainNavigation__listItemAnchor'), "aria-current": navigation.isCurrent ? 'page' : undefined, onClick: handleCloseMainNavigation, children: _jsxs("div", { className: cx(classes.labelGroup, 'mfui-NarrowViewportMainNavigation__labelGroup'), children: [_jsxs("div", { className: cx(classes.iconAndLabel, 'mfui-NarrowViewportMainNavigation__iconAndLabel'), children: [_jsx("div", { "aria-hidden": "true", className: cx(classes.listItemAnchorIcon, 'mfui-NarrowViewportMainNavigation__listItemAnchorIcon'), children: navigation.icon }), _jsx(Typography, { variant: "controlLabel", children: navigation.label })] }), navigation.locked ? (_jsx(Lock, { className: cx(classes.lockIcon, 'mfui-NarrowViewportMainNavigation__lockIcon'), "aria-label": navigation.lockIconProps?.['aria-label'] ?? 'ロックされています' })) : null] }) }) })) }, index));
58
58
  }) }), navigationItems.map((navigation, index) => {
59
59
  const isGroupLabel = navigation.children && 'isGroupLabel' in navigation && navigation.isGroupLabel;
60
60
  if (!isGroupLabel) {
61
61
  return null;
62
62
  }
63
63
  const groupLabelId = `${navId}-group-label-${String(index)}`;
64
- return (_jsxs("div", { className: cx(classes.groupLabelSection, 'mfui-NarrowViewportMainNavigation__groupLabelSection'), children: [_jsx("div", { className: cx(classes.groupLabel, 'mfui-NarrowViewportMainNavigation__groupLabel'), children: _jsx(Typography, { id: groupLabelId, variant: "condensedControlLabel", className: cx(classes.groupLabelText, 'mfui-NarrowViewportMainNavigation__groupLabelText'), children: navigation.label }) }), _jsx("ul", { "aria-labelledby": groupLabelId, className: cx(classes.childrenList, 'mfui-NarrowViewportMainNavigation__childrenList'), children: navigation.children.map((child, childIndex) => (_jsx("li", { className: cx(classes.childrenListItem, 'mfui-NarrowViewportMainNavigation__childrenListItem'), children: _jsx(FocusIndicator, { position: "inside", children: _jsx(NavigationLink, { tag: InternalLinkTag, isExternal: child.isExternal, href: child.href, className: cx(classes.listItemAnchor, 'mfui-NarrowViewportMainNavigation__listItemAnchor'), "aria-current": child.isCurrent ? 'page' : undefined, onClick: handleCloseMainNavigation, children: _jsxs("div", { className: cx(classes.labelGroup, 'mfui-NarrowViewportMainNavigation__labelGroup'), children: [_jsxs("div", { className: cx(classes.iconAndLabel, 'mfui-NarrowViewportMainNavigation__iconAndLabel'), children: [_jsx("div", { className: cx(classes.listItemAnchorIcon, 'mfui-NarrowViewportMainNavigation__listItemAnchorIcon'), children: child.icon }), _jsx(Typography, { variant: "controlLabel", children: child.label })] }), child.locked ? (_jsx(Lock, { className: cx(classes.lockIcon, 'mfui-NarrowViewportMainNavigation__lockIcon'), "aria-label": child.lockIconProps?.['aria-label'] ?? 'ロックされています' })) : null, child.statusSlot && child.locked !== true ? child.statusSlot : null] }) }) }) }, childIndex))) })] }, index));
64
+ return (_jsxs("div", { className: cx(classes.groupLabelSection, 'mfui-NarrowViewportMainNavigation__groupLabelSection'), children: [_jsx("div", { className: cx(classes.groupLabel, 'mfui-NarrowViewportMainNavigation__groupLabel'), children: _jsx(Typography, { id: groupLabelId, variant: "condensedControlLabel", className: cx(classes.groupLabelText, 'mfui-NarrowViewportMainNavigation__groupLabelText'), children: navigation.label }) }), _jsx("ul", { "aria-labelledby": groupLabelId, className: cx(classes.childrenList, 'mfui-NarrowViewportMainNavigation__childrenList'), children: navigation.children.map((child, childIndex) => (_jsx("li", { className: cx(classes.childrenListItem, 'mfui-NarrowViewportMainNavigation__childrenListItem'), children: _jsx(FocusIndicator, { position: "inside", children: _jsx(NavigationLink, { tag: InternalLinkTag, isExternal: child.isExternal, href: child.href, className: cx(classes.listItemAnchor, 'mfui-NarrowViewportMainNavigation__listItemAnchor'), "aria-current": child.isCurrent ? 'page' : undefined, onClick: handleCloseMainNavigation, children: _jsxs("div", { className: cx(classes.labelGroup, 'mfui-NarrowViewportMainNavigation__labelGroup'), children: [_jsxs("div", { className: cx(classes.iconAndLabel, 'mfui-NarrowViewportMainNavigation__iconAndLabel'), children: [_jsx("div", { "aria-hidden": "true", className: cx(classes.listItemAnchorIcon, 'mfui-NarrowViewportMainNavigation__listItemAnchorIcon'), children: child.icon }), _jsx(Typography, { variant: "controlLabel", children: child.label })] }), child.locked ? (_jsx(Lock, { className: cx(classes.lockIcon, 'mfui-NarrowViewportMainNavigation__lockIcon'), "aria-label": child.lockIconProps?.['aria-label'] ?? 'ロックされています' })) : null, child.statusSlot && child.locked !== true ? child.statusSlot : null] }) }) }) }, childIndex))) })] }, index));
65
65
  })] })] })] }) }));
66
66
  });
@@ -48,6 +48,6 @@ placeholder, renderDisplayValue, updateSelectedValues, clearButtonProps, disable
48
48
  .map((option) => option.value)
49
49
  .filter((v) => v != null)
50
50
  .map(String);
51
- return (_jsx(FocusIndicator, { children: _jsxs("div", { ref: wrapperRef, className: cx(classes.wrapper, 'mfui-MultipleSelectBoxTrigger__wrapper', triggerWrapperProps?.className), children: [_jsx("button", { ref: mergeRefs(ref, triggerRef), type: "button", role: "combobox", "aria-controls": listBoxId, "aria-expanded": isOptionPanelOpen, "aria-haspopup": "listbox", "aria-invalid": invalid, value: selectedValues, disabled: disabled, onKeyDown: onKeyDown, onBlur: onBlur, ...rest, ...triggerProps, className: cx(classes.trigger, 'mfui-MultipleSelectBoxTrigger__trigger', triggerProps?.className) }), _jsx("input", { type: "hidden", name: name, value: selectedValues }), _jsx("div", { className: cx(classes.displayValues, 'mfui-MultipleSelectBoxTrigger__displayValues'), "data-mfui-content": "multiple-select-box-trigger-display-values", children: renderer() }), selectedOptions.length > 0 && !disabled && !disableClearButton ? (_jsx("div", { className: cx(classes.clearButtonContainer, 'mfui-MultipleSelectBoxTrigger__clearButtonContainer'), children: _jsx(ClearButton, { size: size === 'small' ? 'small' : 'default', className: cx(classes.clearButton, 'mfui-MultipleSelectBoxTrigger__clearButton'), "aria-label": clearButtonProps?.['aria-label'] ?? '値をクリアする', "data-mfui-content": "multiple-select-box-clear-button", onClick: handleClearValue }) })) : null, _jsx("div", { className: cx(classes.dropdownIconContainer, 'mfui-MultipleSelectBoxTrigger__dropdownIconContainer'), children: _jsx(DropdownIcon, { className: cx(classes.dropdownIcon, 'mfui-MultipleSelectBoxTrigger__dropdownIcon') }) })] }) }));
51
+ return (_jsx(FocusIndicator, { children: _jsxs("div", { ref: wrapperRef, className: cx(classes.wrapper, 'mfui-MultipleSelectBoxTrigger__wrapper', triggerWrapperProps?.className), children: [_jsx("button", { ref: mergeRefs(ref, triggerRef), type: "button", role: "combobox", "aria-controls": listBoxId, "aria-expanded": isOptionPanelOpen, "aria-haspopup": "listbox", "aria-invalid": invalid, value: selectedValues, disabled: disabled, onKeyDown: onKeyDown, onBlur: onBlur, ...rest, ...triggerProps, className: cx(classes.trigger, 'mfui-MultipleSelectBoxTrigger__trigger', triggerProps?.className) }), _jsx("input", { type: "hidden", name: name, value: selectedValues }), _jsx("div", { className: cx(classes.displayValues, 'mfui-MultipleSelectBoxTrigger__displayValues'), "data-mfui-content": "multiple-select-box-trigger-display-values", children: renderer() }), selectedOptions.length > 0 && !disabled && !disableClearButton ? (_jsx("div", { className: cx(classes.clearButtonContainer, 'mfui-MultipleSelectBoxTrigger__clearButtonContainer'), children: _jsx(ClearButton, { size: size === 'small' ? 'small' : 'default', className: cx(classes.clearButton, 'mfui-MultipleSelectBoxTrigger__clearButton'), "aria-label": clearButtonProps?.['aria-label'] ?? '値をクリアする', "data-mfui-content": "multiple-select-box-clear-button", onClick: handleClearValue }) })) : null, _jsx("div", { className: cx(classes.dropdownIconContainer, 'mfui-MultipleSelectBoxTrigger__dropdownIconContainer'), children: _jsx(DropdownIcon, { "aria-hidden": "true", className: cx(classes.dropdownIcon, 'mfui-MultipleSelectBoxTrigger__dropdownIcon') }) })] }) }));
52
52
  }
53
53
  export const MultipleSelectBoxTrigger = forwardRef(MultipleSelectBoxTriggerInner);
@@ -12,7 +12,7 @@ export function PagePicker({ currentPageNumber, totalPages, prevButtonProps, pag
12
12
  const classes = pagePickerSlotRecipe();
13
13
  return (_jsxs("div", { className: cx(classes.root, 'mfui-PagePicker__root'), children: [_jsx(IconButton, { className: cx(classes.prevButton, 'mfui-PagePicker__prevButton'), disabled: currentPageNumber === 1, "aria-label": prevButtonProps?.['aria-label'] ?? '前のページへ戻る', onClick: () => {
14
14
  onPageChange?.(currentPageNumber - 1);
15
- }, children: _jsx(PickerBefore, {}) }), _jsx("div", { className: cx(classes.pageSelect, 'mfui-PagePicker__pageSelect'), children: _jsx(SelectBox, { size: "small", triggerProps: {
15
+ }, children: _jsx(PickerBefore, { "aria-hidden": "true" }) }), _jsx("div", { className: cx(classes.pageSelect, 'mfui-PagePicker__pageSelect'), children: _jsx(SelectBox, { size: "small", triggerProps: {
16
16
  'aria-label': pageSelectBoxProps?.['aria-label'] ?? 'ページを選択する',
17
17
  }, value: { value: currentPageNumber.toString(), label: currentPageNumber.toString() }, options: Array.from({ length: totalPages }).map((_, index) => ({
18
18
  value: (index + 1).toString(),
@@ -21,5 +21,5 @@ export function PagePicker({ currentPageNumber, totalPages, prevButtonProps, pag
21
21
  onPageChange?.(Number(option?.value));
22
22
  } }) }), _jsx(Typography, { className: cx(classes.separator, 'mfui-PagePicker__separator'), children: "/" }), _jsxs(Typography, { className: cx(classes.totalPages, 'mfui-PagePicker__totalPages'), children: [totalPages, pageSuffixLabel] }), _jsx(IconButton, { className: cx(classes.nextButton, 'mfui-PagePicker__nextButton'), "aria-label": nextButtonProps?.['aria-label'] ?? '次のページへ進む', disabled: currentPageNumber === totalPages, onClick: () => {
23
23
  onPageChange?.(currentPageNumber + 1);
24
- }, children: _jsx(PickerAfter, {}) })] }));
24
+ }, children: _jsx(PickerAfter, { "aria-hidden": "true" }) })] }));
25
25
  }
@@ -18,5 +18,5 @@ export const SearchBox = forwardRef(({ className, normalizeFullWidth: shouldNorm
18
18
  }
19
19
  onChange?.(event);
20
20
  }, [shouldNormalizeFullWidth, onChange]);
21
- return (_jsx(TextBox, { ref: ref, prefixSlot: _jsx(Search, {}), className: cx('mfui-SearchBox__root', className), onChange: handleChange, ...rest }));
21
+ return (_jsx(TextBox, { ref: ref, prefixSlot: _jsx(Search, { "aria-hidden": "true" }), className: cx('mfui-SearchBox__root', className), onChange: handleChange, ...rest }));
22
22
  });
@@ -17,7 +17,7 @@ declare function SidebarBase({ className, logoSlot, mainNavigationItems, extraNa
17
17
  * The following composition components are provided as sub-components:
18
18
  * - `Sidebar.NavigationItem` — a single navigation item; `mainNavigationItems` renders these for you,
19
19
  * but it can also be used directly inside `extraNavigationSlot`.
20
- * - `Sidebar.ServiceMenu` — the footer service menu trigger, intended to wrap a list of services.
20
+ * - `Sidebar.ServiceMenu` — the header service menu trigger, intended to wrap a list of services.
21
21
  * - `Sidebar.TenantMenu` — the footer tenant (business) name and its menu.
22
22
  * - `Sidebar.UserMenu` — the footer user (account) name and its menu.
23
23
  *
@@ -15,12 +15,12 @@ function SidebarBase({ className, logoSlot, mainNavigationItems, extraNavigation
15
15
  defaultWidth,
16
16
  onWidthChange,
17
17
  });
18
- return (_jsxs("div", { ref: rootRef, className: cx(classes.root, 'mfui-Sidebar__root', className), style: { width: `${String(width)}px` }, "data-mfui-dragging": isDragging ? true : undefined, children: [_jsx("header", { className: cx(classes.header, 'mfui-Sidebar__header'), children: _jsx("div", { className: cx(classes.leftPane, 'mfui-Sidebar__leftPane'), children: _jsx("div", { className: cx(classes.logo, 'mfui-Sidebar__logo'), children: logoSlot }) }) }), _jsxs("div", { className: cx(classes.navigationWrapper, 'mfui-Sidebar__navigationWrapper'), children: [mainNavigationItems && mainNavigationItems.length > 0 ? (_jsx("nav", { "aria-label": mainNavigationLabel, className: cx(classes.mainNavigation, 'mfui-Sidebar__mainNavigation'), children: _jsx("ul", { className: cx(classes.navigationList, 'mfui-Sidebar__navigationList'), children: mainNavigationItems.map((item, index) => {
18
+ return (_jsxs("div", { ref: rootRef, className: cx(classes.root, 'mfui-Sidebar__root', className), style: { width: `${String(width)}px` }, "data-mfui-dragging": isDragging ? true : undefined, children: [_jsx("header", { className: cx(classes.header, 'mfui-Sidebar__header'), children: _jsxs("div", { className: cx(classes.leftPane, 'mfui-Sidebar__leftPane'), children: [serviceMenuSlot ? (_jsx("div", { className: cx(classes.serviceMenu, 'mfui-Sidebar__serviceMenu'), children: serviceMenuSlot })) : null, _jsx("div", { className: cx(classes.logo, 'mfui-Sidebar__logo'), children: logoSlot })] }) }), _jsxs("div", { className: cx(classes.navigationWrapper, 'mfui-Sidebar__navigationWrapper'), children: [mainNavigationItems && mainNavigationItems.length > 0 ? (_jsx("nav", { "aria-label": mainNavigationLabel, className: cx(classes.mainNavigation, 'mfui-Sidebar__mainNavigation'), children: _jsx("ul", { className: cx(classes.navigationList, 'mfui-Sidebar__navigationList'), children: mainNavigationItems.map((item, index) => {
19
19
  if ('type' in item) {
20
20
  return (_jsx("li", { "aria-hidden": "true", className: cx(classes.navigationDivider, 'mfui-Sidebar__navigationDivider') }, index));
21
21
  }
22
22
  return _jsx(SidebarNavigationItem, { ...item }, index);
23
- }) }) })) : null, extraNavigationSlot ? (_jsx("nav", { "aria-label": extraNavigationLabel, className: cx(classes.extraNavigation, 'mfui-Sidebar__extraNavigation'), children: extraNavigationSlot })) : null] }), _jsxs("div", { className: cx(classes.footer, 'mfui-Sidebar__footer'), children: [footerSlot ? _jsx("div", { className: cx(classes.footerSlot, 'mfui-Sidebar__footerSlot'), children: footerSlot }) : null, serviceMenuSlot ? (_jsx("div", { className: cx(classes.serviceMenu, 'mfui-Sidebar__serviceMenu'), children: serviceMenuSlot })) : null, _jsx("div", { className: cx(classes.footerIconMenu, 'mfui-Sidebar__footerIconMenu'), children: footerIconMenuSlot }), tenantSlot || userSlot ? (_jsxs("div", { className: cx(classes.footerUserIdMenu, 'mfui-Sidebar__footerUserIdMenu'), children: [tenantSlot ? (_jsx("div", { className: cx(classes.footerUserIdMenuItem, 'mfui-Sidebar__footerUserIdMenuItem'), children: tenantSlot })) : null, userSlot ? (_jsx("div", { className: cx(classes.footerUserIdMenuItem, 'mfui-Sidebar__footerUserIdMenuItem'), children: userSlot })) : null] })) : null] }), _jsx("div", { "data-mfui-handle": true, "data-mfui-dragging": isDragging ? true : undefined, role: "separator", "aria-orientation": "vertical", "aria-label": resizeHandleLabel, "aria-valuenow": width, "aria-valuemin": resolvedMinWidth, "aria-valuemax": resolvedMaxWidth,
23
+ }) }) })) : null, extraNavigationSlot ? (_jsx("nav", { "aria-label": extraNavigationLabel, className: cx(classes.extraNavigation, 'mfui-Sidebar__extraNavigation'), children: extraNavigationSlot })) : null] }), _jsxs("div", { className: cx(classes.footer, 'mfui-Sidebar__footer'), children: [footerSlot ? _jsx("div", { className: cx(classes.footerSlot, 'mfui-Sidebar__footerSlot'), children: footerSlot }) : null, _jsx("div", { className: cx(classes.footerIconMenu, 'mfui-Sidebar__footerIconMenu'), children: footerIconMenuSlot }), tenantSlot || userSlot ? (_jsxs("div", { className: cx(classes.footerUserIdMenu, 'mfui-Sidebar__footerUserIdMenu'), children: [tenantSlot ? (_jsx("div", { className: cx(classes.footerUserIdMenuItem, 'mfui-Sidebar__footerUserIdMenuItem'), children: tenantSlot })) : null, userSlot ? (_jsx("div", { className: cx(classes.footerUserIdMenuItem, 'mfui-Sidebar__footerUserIdMenuItem'), children: userSlot })) : null] })) : null] }), _jsx("div", { "data-mfui-handle": true, "data-mfui-dragging": isDragging ? true : undefined, role: "separator", "aria-orientation": "vertical", "aria-label": resizeHandleLabel, "aria-valuenow": width, "aria-valuemin": resolvedMinWidth, "aria-valuemax": resolvedMaxWidth,
24
24
  // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex
25
25
  tabIndex: 0, className: cx(classes.handle, 'mfui-Sidebar__handle'), onPointerDown: handlePointerDown, onKeyDown: handleKeyDown })] }));
26
26
  }
@@ -37,7 +37,7 @@ function SidebarBase({ className, logoSlot, mainNavigationItems, extraNavigation
37
37
  * The following composition components are provided as sub-components:
38
38
  * - `Sidebar.NavigationItem` — a single navigation item; `mainNavigationItems` renders these for you,
39
39
  * but it can also be used directly inside `extraNavigationSlot`.
40
- * - `Sidebar.ServiceMenu` — the footer service menu trigger, intended to wrap a list of services.
40
+ * - `Sidebar.ServiceMenu` — the header service menu trigger, intended to wrap a list of services.
41
41
  * - `Sidebar.TenantMenu` — the footer tenant (business) name and its menu.
42
42
  * - `Sidebar.UserMenu` — the footer user (account) name and its menu.
43
43
  *
@@ -74,12 +74,12 @@ export type SidebarProps = {
74
74
  */
75
75
  extraNavigationSlot?: ReactNode;
76
76
  /**
77
- * Elements to be displayed above the service menu in the footer.
77
+ * Elements to be displayed above the footer icon menu.
78
78
  * This slot accepts any content.
79
79
  */
80
80
  footerSlot?: ReactNode;
81
81
  /**
82
- * Elements to be displayed as the service menu in the footer.
82
+ * Elements to be displayed as the service menu in the header, to the left of the logo.
83
83
  * Intended for a dropdown menu listing available services.
84
84
  */
85
85
  serviceMenuSlot: ReactNode;
@@ -14,10 +14,9 @@ export type SidebarServiceMenuProps = {
14
14
  children: ReactNode;
15
15
  };
16
16
  /**
17
- * The service switcher menu shown in the Sidebar footer.
17
+ * The service switcher menu shown in the Sidebar header.
18
18
  *
19
- * It renders a navigation-link styled trigger (matching the sidebar navigation items) that opens a
20
- * dropdown of services. The trigger design and accessibility are fixed; pass the label, icon, and
21
- * menu items only.
19
+ * It renders an icon-only trigger with a tooltip that opens a dropdown of services.
20
+ * The trigger design and accessibility are fixed; pass the label, icon, and menu items only.
22
21
  */
23
22
  export declare function SidebarServiceMenu({ label, icon, children }: SidebarServiceMenuProps): import("react/jsx-runtime").JSX.Element;
@@ -1,20 +1,13 @@
1
1
  'use client';
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import { DropdownMenu } from '../DropdownMenu';
4
+ import { Tooltip } from '../Tooltip';
4
5
  /**
5
- * The service switcher menu shown in the Sidebar footer.
6
+ * The service switcher menu shown in the Sidebar header.
6
7
  *
7
- * It renders a navigation-link styled trigger (matching the sidebar navigation items) that opens a
8
- * dropdown of services. The trigger design and accessibility are fixed; pass the label, icon, and
9
- * menu items only.
8
+ * It renders an icon-only trigger with a tooltip that opens a dropdown of services.
9
+ * The trigger design and accessibility are fixed; pass the label, icon, and menu items only.
10
10
  */
11
11
  export function SidebarServiceMenu({ label, icon, children }) {
12
- return (_jsx(DropdownMenu, { label: label, triggerProps: {
13
- priority: 'tertiary',
14
- size: 'small',
15
- isDropdownTrigger: false,
16
- leftIcon: icon,
17
- // Styled via the `serviceMenu` slot's `& .mfui-Sidebar__serviceTrigger` descendant selector.
18
- className: 'mfui-Sidebar__serviceTrigger',
19
- }, menuPopoverProps: { allowedPlacements: ['top-start'] }, children: children }));
12
+ return (_jsx(Tooltip, { content: label, placement: "bottom", children: _jsx(DropdownMenu, { label: label, icon: icon, menuPopoverProps: { allowedPlacements: ['bottom-start'] }, children: children }) }));
20
13
  }
@@ -42,7 +42,7 @@ const renderNavigationItem = (navigationItem, customLinkComponent, classes, nest
42
42
  return (_jsxs(_Fragment, { children: [_jsx(NavigationLink, { navigationItem: navigationItem, customLinkComponent: customLinkComponent, classes: classes, renderNavigationLabel: renderNavigationLabel }), _jsx(NestedNavigationList, { summarySlot: _jsx("div", { "data-mfui-content": "sub-navigation-disclosure-icon", className: cx(classes.disclosureIcon, 'mfui-SubNavigation__disclosureIcon'), children: _jsx(DisclosureBasicCollapsed, { "aria-label": label }) }), nestedNavigationItems: children, customLinkComponent: customLinkComponent, classes: classes, nestLevel: nestLevel + 1, renderNavigationLabel: renderNavigationLabel })] }));
43
43
  }
44
44
  // The the parent item will be rendered as a disclosure button with an icon.
45
- return (_jsx(NestedNavigationList, { summarySlot: _jsxs(_Fragment, { children: [_jsx(NavigationLabelGroup, { label, labelIcon, locked, lockIconProps, statusSlot, classes, renderNavigationLabel }), _jsx("div", { "data-mfui-content": "sub-navigation-disclosure-icon", className: cx(classes.disclosureIcon, 'mfui-SubNavigation__disclosureIcon'), children: _jsx(DisclosureBasicCollapsed, { "aria-label": "" }) })] }), nestedNavigationItems: children, customLinkComponent: customLinkComponent, classes: classes, nestLevel: nestLevel + 1, renderNavigationLabel: renderNavigationLabel }));
45
+ return (_jsx(NestedNavigationList, { summarySlot: _jsxs(_Fragment, { children: [_jsx(NavigationLabelGroup, { label, labelIcon, locked, lockIconProps, statusSlot, classes, renderNavigationLabel }), _jsx("div", { "data-mfui-content": "sub-navigation-disclosure-icon", className: cx(classes.disclosureIcon, 'mfui-SubNavigation__disclosureIcon'), children: _jsx(DisclosureBasicCollapsed, { "aria-hidden": "true" }) })] }), nestedNavigationItems: children, customLinkComponent: customLinkComponent, classes: classes, nestLevel: nestLevel + 1, renderNavigationLabel: renderNavigationLabel }));
46
46
  };
47
47
  /**
48
48
  * This is a group of a text label, an optional icon, and a status.
@@ -59,7 +59,7 @@ function NavigationLabelGroup({ label, labelIcon, locked, lockIconProps, statusS
59
59
  }
60
60
  return null;
61
61
  };
62
- return (_jsxs(_Fragment, { children: [labelIcon ? _jsx("div", { className: cx(classes.labelIcon, 'mfui-SubNavigation__labelIcon'), children: labelIcon }) : null, renderNavigationLabel ? (renderNavigationLabel(label)) : (_jsx(Typography, { variant: "strongControlLabel", className: cx(classes.label, 'mfui-SubNavigation__label'), children: label })), renderStatus()] }));
62
+ return (_jsxs(_Fragment, { children: [labelIcon ? (_jsx("div", { "aria-hidden": "true", className: cx(classes.labelIcon, 'mfui-SubNavigation__labelIcon'), children: labelIcon })) : null, renderNavigationLabel ? (renderNavigationLabel(label)) : (_jsx(Typography, { variant: "strongControlLabel", className: cx(classes.label, 'mfui-SubNavigation__label'), children: label })), renderStatus()] }));
63
63
  }
64
64
  /**
65
65
  * This is a link that has NavigationLabelGroup.
package/dist/styles.css CHANGED
@@ -5937,9 +5937,19 @@ li:last-child > .mfui-cXGJls {
5937
5937
  justify-content: space-between;
5938
5938
  }
5939
5939
 
5940
- .mfui-dXVlzk,.mfui-iaZfLW {
5940
+ .mfui-dXVlzk {
5941
+ flex: 1 0 0;
5942
+ gap: 7px;
5941
5943
  display: inline-flex;
5942
5944
  align-items: center;
5945
+ min-width: 1px;
5946
+ }
5947
+
5948
+ .mfui-iaZfLW {
5949
+ overflow: hidden;
5950
+ display: inline-flex;
5951
+ align-items: center;
5952
+ flex-shrink: 0;
5943
5953
  }
5944
5954
 
5945
5955
  .mfui-eCoQhk {
@@ -6083,56 +6093,9 @@ li:last-child > .mfui-cXGJls {
6083
6093
  }
6084
6094
 
6085
6095
  .mfui-dsYgTD {
6086
- padding-inline: 14px;
6087
- padding-block: 3px;
6088
- }
6089
-
6090
- .mfui-dsYgTD.mfui-Sidebar__serviceMenu .mfui-Sidebar__serviceTrigger {
6091
- padding: 4px 7px;
6092
- margin: 0;
6093
- border: none;
6094
- gap: 7px;
6095
- border-radius: 6px;
6096
- display: flex;
6096
+ display: inline-flex;
6097
6097
  align-items: center;
6098
- justify-content: flex-start;
6099
- appearance: none;
6100
- -webkit-appearance: none;
6101
- text-align: start;
6102
- background-color: transparent;
6103
- color: var(--mfui-colors-mfui\.color\.base\.content\.none);
6104
- width: 100%;
6105
- min-width: 0;
6106
- height: auto;
6107
- }
6108
-
6109
- .mfui-dsYgTD.mfui-Sidebar__serviceMenu .mfui-Sidebar__serviceTrigger .mfui-Typography__root {
6110
- flex: 1 0 0;
6111
- overflow: hidden;
6112
- text-overflow: ellipsis;
6113
- white-space: nowrap;
6114
- min-width: 1px;
6115
- }
6116
-
6117
- .mfui-dsYgTD.mfui-Sidebar__serviceMenu .mfui-Sidebar__serviceTrigger:is(:hover, [data-hover]),.mfui-dsYgTD.mfui-Sidebar__serviceMenu .mfui-Sidebar__serviceTrigger:is(:focus-visible, [data-focus-visible]) {
6118
- background-color: var(--mfui-colors-mfui\.color\.neutral\.thin-background\.hovered);
6119
- color: var(--mfui-colors-mfui\.color\.base\.content\.hovered);
6120
- }
6121
-
6122
- .mfui-dsYgTD.mfui-Sidebar__serviceMenu .mfui-Sidebar__serviceTrigger:is(:active, [data-active]),.mfui-dsYgTD.mfui-Sidebar__serviceMenu .mfui-Sidebar__serviceTrigger:is([aria-expanded=true], [data-expanded], [data-state="expanded"]) {
6123
- background-color: var(--mfui-colors-mfui\.color\.neutral\.thin-background\.pressed);
6124
- color: var(--mfui-colors-mfui\.color\.base\.content\.pressed);
6125
- }
6126
-
6127
- .mfui-dsYgTD.mfui-Sidebar__serviceMenu .mfui-Sidebar__serviceTrigger:is([aria-expanded=true], [data-expanded], [data-state="expanded"]):is(:hover, [data-hover]) {
6128
- background-color: var(--mfui-colors-mfui\.color\.neutral\.thin-background\.hovered);
6129
- color: var(--mfui-colors-mfui\.color\.base\.content\.hovered);
6130
- }
6131
-
6132
- .mfui-dsYgTD.mfui-Sidebar__serviceMenu .mfui-Sidebar__serviceTrigger .mfui-Button__leftIcon {
6133
- font-size: 18px;
6134
6098
  flex-shrink: 0;
6135
- color: var(--mfui-colors-mfui\.color\.neutral\.content\.none);
6136
6099
  }
6137
6100
 
6138
6101
  .mfui-SeHWc {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moneyforward/mfui-components",
3
- "version": "3.28.0",
3
+ "version": "3.28.1",
4
4
  "description": "React UI Component Library for all Money Forward products",
5
5
  "repository": {
6
6
  "type": "git",
@@ -63,8 +63,8 @@
63
63
  "@floating-ui/react-dom": "^2.1.2",
64
64
  "@tanstack/react-virtual": "^3.13.18",
65
65
  "dayjs": "^1.11.13",
66
- "@moneyforward/mfui-icons-react": "^3.5.1",
67
- "@moneyforward/mfui-design-tokens": "^3.2.1"
66
+ "@moneyforward/mfui-design-tokens": "^3.2.1",
67
+ "@moneyforward/mfui-icons-react": "^3.6.0"
68
68
  },
69
69
  "scripts": {
70
70
  "prepare:panda": "panda codegen",