@poadio/ui-angular 0.16.0 → 0.17.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.
@@ -1,6 +1,6 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { model, input, booleanAttribute, signal, computed, Directive, InjectionToken, makeEnvironmentProviders, inject, Injectable, Optional, Inject, numberAttribute, ViewEncapsulation, ChangeDetectionStrategy, Component, ElementRef, output, contentChildren, effect, HostAttributeToken, contentChild, forwardRef, viewChild, HostListener, TemplateRef, Injector, afterNextRender, afterRenderEffect, PLATFORM_ID, DestroyRef, ComponentRef, ViewContainerRef, untracked, ViewChild, viewChildren, ChangeDetectorRef, Renderer2, NgZone } from '@angular/core';
3
- import { UI_EN, uiTranslate, uiText, uiFormat, createIconRegistry, iconHostProps, iconSvgProps, iconRootClasses, iconTransform, buttonClasses, buttonProps, buttonGroupRootClasses, buttonGroupPressed, buttonGroupPick, inputControlProps, textareaAutosizeHeight, fieldRootClasses, fieldMessage, fieldControlProps, numberControlProps, numberRootClasses, numberButtons, numberDisplay, numberHandlesKey, numberTransition, passwordInputProps, passwordToggleProps, passwordMeter, passwordRootClasses, passwordTransition, sliderValues, sliderLabelId, sliderHandleProps, sliderMarks, sliderRootClasses, sliderFill, sliderPosition, sliderFillSize, sliderPercent, sliderFormat, sliderBubbleVisible, elementIsRtl, sliderApply, sliderValueAt, sliderNearest, sliderCompose, sliderValueOf, SLIDER_KEYS, sliderKeyTarget, colorParse, colorHslToRgb, colorRgbToHsv, colorHsvToRgb, colorRgbToHsl, colorFormat, COLOR_PRESETS, colorpickerHsv, colorpickerView, colorpickerRootClasses, colorpickerTriggerProps, COLORPICKER_PLACEMENTS, floatingConnection, colorpickerPresetSelected, colorpickerCanOpen, colorpickerDismiss, colorpickerWrite, colorpickerFromPreset, colorpickerFromHex, colorpickerFromChannel, colorpickerFromAlpha, colorpickerFraction, colorpickerPoint, colorpickerKey, colorpickerFromEyedropper, ratingControlProps, ratingRootClasses, ratingStars, ratingIconSize, ratingColor, ratingText, ratingShown, ratingFill, ratingStarClasses, ratingFirstHalf, ratingInteractive, RATING_KEYS, ratingTransition, MASK_PRESETS, maskApply, maskUnmask, maskResolve, maskPlaceholder, maskInputMode, maskWrite, maskInput, maskFirstSlot, keyFilterValid, keyFilterBlocks, keyFilterPaste, inplaceRootClasses, INPLACE_FOCUS_SELECTOR, inplaceTransition, switchControlProps, switchLabelProps, switchRootClasses, switchTransition, checkboxControlProps, checkboxLabelProps, checkboxRootClasses, checkboxMark, checkboxTransition, radioGroupClasses, radioKeydown, radioSelect, radioControlProps, radioLabelProps, radioRootClasses, segmentedOptionProps, segmentedRootClasses, segmentedIsOn, segmentedPick, segmentedKeydown, toggleButtonView, toggleButtonTransition, FOCUS_AUTOFOCUS_ATTR, FOCUSABLE_SELECTOR, focusTrapTab, focusTrapInitial, SHEET_ANIM_MS, sheetDragTransform, sheetHeightClass, sheetHeightCss, sheetDragStarts, sheetDragOffset, sheetRelease, selectListboxProps, selectEmptyMessage, selectOptionProps, selectScrollTop, SELECT_PLACEMENTS, selectUseSheet, selectItems, selectFilterItems, selectOptionsOf, selectActiveDescendant, selectOptionLabel, selectOptionValue, selectOptionDisabled, selectEquals, selectFindOption, selectTransition, selectSheetTitle, selectFallbackLabel, selectRootClasses, selectTriggerProps, selectFilterProps, multiselectValues, multiselectLimitReached, multiselectShows, multiselectCountLabel, multiselectAllState, multiselectAllProps, multiselectRootClasses, multiselectToggle, multiselectRemove, multiselectToggleAll, tableCompare, tableSortRows, tableMatch, tableRowPredicate, tableFilterRows, tableColumnId, tableColumnSortField, tableColumnAlign, paginatorPageCount, paginatorPage, paginatorVisible, paginatorReport, paginatorLinks, paginatorGoTo, paginatorChangeRows, paginatorEvent, dialogMobileMode, dialogSheetHeight, dialogContainerClass, dialogContainerProps, dialogMaximizeButton, dialogWidth, dialogHeight, dialogMaxWidth, dialogDragTransform, dialogDragStarts, dialogDragOffset, DIALOG_ANIM_MS, dialogShouldClose, dialogPlacement, dialogHasBackdrop, dialogBlocksScroll, confirmCanAccept, confirmAcceptSeverity, confirmIcon, confirmClasses, confirmDialogConfig, TOOLTIP_INITIAL, tooltipTransition, tooltipCandidates, TOOLTIP_OFFSET, TOOLTIP_MARGIN, tooltipAnchorProps, floatingArrow, TOOLTIP_ARROW, popoverProps, popoverOpen, popoverUseSheet, popoverCandidates, POPOVER_MARGIN, popoverDismiss, popoverRestoreFocus, popoverToggle, popoverTriggerProps, POPOVER_ARROW, uiFirstDayOfWeek, uiUses12Hours, startOfDay, sheetUse, startOfMonth, DATEPICKER_PLACEMENTS, DATEPICKER_OFFSET, datepickerSelected, datepickerHasTime, datepickerEffectiveMode, datepickerFormat, datepickerDisplay, datepickerMonths, datepickerMonthLabel, datepickerWeekdays, datepickerDecadeStart, datepickerYears, datepickerHourDisplay, datepickerNavLabels, datepickerInputProps, datepickerDisabledKeys, toDate, datepickerRows, datepickerDayProps, isSameDay, datepickerInitialView, datepickerParse, datepickerNavigate, datepickerMonthDisabled, datepickerYearDisabled, datepickerHoverInRange, datepickerPickDay, datepickerShouldClose, datepickerWithTime, datepickerDayDisabled, datepickerValue, datepickerBumpTime, datepickerTimeFromInput, datepickerGridKey, datepickerFollow, isoOf, splitterClasses, splitterTemplate, splitterInitial, splitterPlacement, splitterPanelTrack, splitterGutterProps, splitterGutterTrack, splitterParseSaved, SPLITTER_STORAGE_PREFIX, splitterNormalize, splitterResize, splitterDragDelta, splitterKey, tableToggleRow, tableTreeToggleRow, tableSelectSingle, tableSelectRange, tableSelectOnly, tableToggleAll, tableToggleRows, tableClearSelection, TableNodes, tableIsGroupKey, tableAggregate, tableFilterOperatorLabel, TABLE_FILTER_OPERATORS, tableFilterKind, tableFilterDefaultMode, tableFilterOperator, tableFilterValueForOperator, tabsActiveIndex, classNames, tabsRootClasses, tabsTabProps, tabsPanelProps, tabsPanelRendered, tabsSelect, tabsKeydown, tabsScrollBy, tabsOverflow, stepperRootClasses, stepperItemProps, stepperStateOf, stepperCanGo, stepperReachable, accordionHeaderProps, accordionRegionProps, accordionIsOpen, accordionSet, accordionKeydown, breadcrumbEntries, breadcrumbLinkKind, breadcrumbClickable, MENU_PLACEMENTS, MENU_OFFSET, MENU_INITIAL, menuVisible, menuHasIcons, menuItemProps, menuSheetFocusIndex, menuSubIcon, menuUseSheet, menuOpen, menuKeydown, menuActivate, menuHover, menuSubHover, splitButtonIconSize, splitButtonToggleProps, speedDialTooltipSide, speedDialClasses, speedDialItemsProps, speedDialItemProps, speedDialFabProps, speedDialItemStyle, speedDialKeyTarget, tableHasExpandColumn, tableDetailPaddingLeft, tableSortMetas, tableCollator, tableGlobalFields, tableView, tableBodyState, tableHeaderRowProps, tableRootProps, tableActiveIndex, tableRowProps, tableFilterActiveCount, tableRowCountParts, tableCounts, paginatorClampFirst, tableFormatCell, tableThClasses, tableTdClasses, tableRowClasses, tableTreeRowClasses, tableSkeletonWidth, tableTreeGuides, tableTreeToggleProps, tableSortIndex, tableSortOrderOf, tableSortIcon, tableAriaSort, tableSortToggle, tableSortState, tableFilterDelay, tableFilterSet, tableTreeNodeState, TABLE_ROW_CLICK_IGNORE, tableRowClickAction, tableTreeKey, tableGridKey, tableCanExpand, tableExpandToggle, tableExpandAllKeys, tableTreeIsExpanded, tableTreeToggle, tableTreeNeedsLoad, tableTreeExpandKeys, tableGroupToggle, tableSortTo, tableFilterIsActive, tableFilterValues, tableFilterPart, tableFilterSetOperator, tableFilterRangePart, tableFilterToggleValue, tableFilterClear, tablePanelOperatorOptions, TABLE_PANEL_TABS, tablePanelTabProps, tablePanelBodyProps, tablePanelTabKey, tablePanelTabClick, tablePanelColumnMatches, tablePanelAllState, tablePanelGroupCandidates, tablePanelKind, tablePanelDraftInit, tablePanelDraftSync, tablePanelIsActive, tablePanelDraftFilter, tablePanelDraftToggle, skeletonBars, skeletonRootClasses, comboValues, comboInputProps, comboRootClasses, comboOptionProps, comboLabel, comboIsSelected, comboTextOf, comboBlur, comboInput, comboFilter, comboResults, comboPick, comboKeydown, toastMessage, TOAST_OUT_MS, toastRootClass, toastForKey, toastSync, toastLife, toastSeverity, toastIcon, toastItemProps, toastPause, toastResume, messageClasses, messageIcon, messageIconSize, avatarInitials, avatarIconSize, avatarContent, avatarColors, avatarRootClasses, avatarLabel, chipClasses, chipProps, chipShowRemove, chipIconSize, chipClickAction, chipKeyAction, tagClasses, tagIconSize, badgeClasses, badgeProps, badgeContent, badgeOverlayVisible, badgeText, progressClasses, progressShowHead, progressShowValue, progressTrackProps, progressBarWidth, progressPercent, spinnerClasses, cardClasses, cardPadding, cardHasHead, dividerClasses, dividerProps, fieldsetRegionId, fieldsetClasses, collapsibleButtonProps, collapsibleRegionProps, collapsibleToggle, panelClasses, panelHeadless, panelIds, avatarGroupHidden, avatarGroupHiddenTitle, avatarGroupMoreText, avatarGroupOverflow, meterTotal, meterRemaining, meterSegments, meterRootClasses, meterBarProps, meterValueText, meterPercentText, timelineActiveIndex, timelineClasses, timelineEventClasses, timelineMarkerColor, timelineIcon, timelineText, carouselResponsiveVisible, carouselStep, carouselPageCount, carouselPages, carouselOffset, carouselTransform, carouselClasses, carouselLive, carouselRotating, carouselPlayLabelKey, carouselPrevDisabled, carouselNextDisabled, carouselItemVisible, carouselItemProps, REDUCED_MOTION_QUERY, carouselTick, CAROUSEL_TICK_MS, carouselGoTo, carouselFocusPause, carouselKey, carouselKeyTarget, carouselSwipe, IMAGE_VIEW_INITIAL, imageSource, imageClasses, imageViewerProps, imageTransform, imageZoom, imageViewStep, imageWheelDelta, imageViewerKey, scrollTopClasses, scrollTopButtonProps, scrollTopVisible, scrollTopBehavior, blockOverlayProps, blockOverlayClasses, blockSpinnerSize, blockHostProps, blockContentProps, listboxFilterItems, listboxSameValue, listboxValues, listboxAllState, listboxAllChecked, listboxClasses, listboxListProps, listboxSelected, listboxOptionClasses, listboxFocusActive, listboxPick, listboxRange, listboxToggleAll, listboxKeyAction, listboxTypeaheadQuery, listboxTypeahead, uploadFormatSize, UPLOAD_LIVE_PROPS, uploadPending, uploadClasses, uploadZoneProps, uploadInputProps, uploadIconFor, uploadItemClasses, uploadIsError, uploadStatusIcon, uploadZoneKey, uploadAdd, uploadRejectionText, uploadAnnouncement, uploadRemove, uploadFocusAfterRemove, uploadPatch, uploadComplete, addDays, isValidDate, addYears, addMonths, isoWeek, formatDate, POAD_ICONS } from '@poadio/ui-core';
3
+ import { UI_EN, uiTranslate, uiText, uiFormat, createIconRegistry, iconHostProps, iconSvgProps, iconRootClasses, iconTransform, buttonClasses, buttonProps, buttonGroupRootClasses, buttonGroupPressed, buttonGroupPick, inputControlProps, textareaAutosizeHeight, fieldRootClasses, fieldMessage, fieldControlProps, numberControlProps, numberRootClasses, numberButtons, numberDisplay, numberHandlesKey, numberTransition, passwordInputProps, passwordToggleProps, passwordMeter, passwordRootClasses, passwordTransition, sliderValues, sliderLabelId, sliderHandleProps, sliderMarks, sliderRootClasses, sliderFill, sliderPosition, sliderFillSize, sliderPercent, sliderFormat, sliderBubbleVisible, elementIsRtl, sliderApply, sliderValueAt, sliderNearest, sliderCompose, sliderValueOf, SLIDER_KEYS, sliderKeyTarget, colorParse, colorHslToRgb, colorRgbToHsv, colorHsvToRgb, colorRgbToHsl, colorFormat, COLOR_PRESETS, colorpickerHsv, colorpickerView, colorpickerRootClasses, colorpickerTriggerProps, COLORPICKER_PLACEMENTS, floatingConnection, colorpickerPresetSelected, colorpickerCanOpen, colorpickerDismiss, colorpickerWrite, colorpickerFromPreset, colorpickerFromHex, colorpickerFromChannel, colorpickerFromAlpha, colorpickerFraction, colorpickerPoint, colorpickerKey, colorpickerFromEyedropper, ratingControlProps, ratingRootClasses, ratingStars, ratingIconSize, ratingColor, ratingText, ratingShown, ratingFill, ratingStarClasses, ratingFirstHalf, ratingInteractive, RATING_KEYS, ratingTransition, MASK_PRESETS, maskApply, maskUnmask, maskResolve, maskPlaceholder, maskInputMode, maskWrite, maskInput, maskFirstSlot, keyFilterValid, keyFilterBlocks, keyFilterPaste, inplaceRootClasses, INPLACE_FOCUS_SELECTOR, inplaceTransition, switchControlProps, switchLabelProps, switchRootClasses, switchTransition, checkboxControlProps, checkboxLabelProps, checkboxRootClasses, checkboxMark, checkboxTransition, radioGroupClasses, radioKeydown, radioSelect, radioControlProps, radioLabelProps, radioRootClasses, segmentedOptionProps, segmentedRootClasses, segmentedIsOn, segmentedPick, segmentedKeydown, toggleButtonView, toggleButtonTransition, BREAKPOINTS, BREAKPOINT_SERVER_WIDTH, BREAKPOINT_TOUCH_QUERY, breakpointState, breakpointUp, breakpointDown, breakpointBetween, breakpointMatches, responsiveParse, responsiveResolve, FOCUS_AUTOFOCUS_ATTR, FOCUSABLE_SELECTOR, focusTrapTab, focusTrapInitial, SHEET_ANIM_MS, sheetDragTransform, sheetHeightClass, sheetHeightCss, sheetDragStarts, sheetDragOffset, sheetRelease, selectListboxProps, selectEmptyMessage, selectOptionProps, selectScrollTop, SELECT_PLACEMENTS, selectUseSheet, selectItems, selectFilterItems, selectOptionsOf, selectActiveDescendant, selectOptionLabel, selectOptionValue, selectOptionDisabled, selectEquals, selectFindOption, selectTransition, selectSheetTitle, selectFallbackLabel, selectRootClasses, selectTriggerProps, selectFilterProps, multiselectValues, multiselectLimitReached, multiselectShows, multiselectCountLabel, multiselectAllState, multiselectAllProps, multiselectRootClasses, multiselectToggle, multiselectRemove, multiselectToggleAll, tableCompare, tableSortRows, tableMatch, tableRowPredicate, tableFilterRows, tableColumnId, tableColumnSortField, tableColumnAlign, paginatorPageCount, paginatorPage, paginatorVisible, paginatorReport, paginatorLinks, paginatorGoTo, paginatorChangeRows, paginatorEvent, dialogMobileMode, dialogSheetHeight, dialogContainerClass, dialogContainerProps, dialogMaximizeButton, dialogWidth, dialogHeight, dialogMaxWidth, dialogDragTransform, dialogDragStarts, dialogDragOffset, DIALOG_ANIM_MS, dialogShouldClose, dialogPlacement, dialogHasBackdrop, dialogBlocksScroll, confirmCanAccept, confirmAcceptSeverity, confirmIcon, confirmClasses, confirmDialogConfig, TOOLTIP_INITIAL, tooltipTransition, tooltipCandidates, TOOLTIP_OFFSET, TOOLTIP_MARGIN, tooltipAnchorProps, floatingArrow, TOOLTIP_ARROW, popoverProps, popoverOpen, popoverUseSheet, popoverCandidates, POPOVER_MARGIN, popoverDismiss, popoverRestoreFocus, popoverToggle, popoverTriggerProps, POPOVER_ARROW, uiFirstDayOfWeek, uiUses12Hours, startOfDay, sheetUse, startOfMonth, DATEPICKER_PLACEMENTS, DATEPICKER_OFFSET, datepickerSelected, datepickerHasTime, datepickerEffectiveMode, datepickerFormat, datepickerDisplay, datepickerMonths, datepickerMonthLabel, datepickerWeekdays, datepickerDecadeStart, datepickerYears, datepickerHourDisplay, datepickerNavLabels, datepickerInputProps, datepickerDisabledKeys, toDate, datepickerRows, datepickerDayProps, isSameDay, datepickerInitialView, datepickerParse, datepickerNavigate, datepickerMonthDisabled, datepickerYearDisabled, datepickerHoverInRange, datepickerPickDay, datepickerShouldClose, datepickerWithTime, datepickerDayDisabled, datepickerValue, datepickerBumpTime, datepickerTimeFromInput, datepickerGridKey, datepickerFollow, isoOf, layoutGap, responsiveValue, breakpointShows, stackStyle, clusterStyle, gridStyle, gridColumn, splitStyle, sidebarCollapsed, sidebarStyle, centerStyle, containerStyle, spacerStyle, splitterClasses, splitterTemplate, splitterInitial, splitterPlacement, splitterPanelTrack, splitterGutterProps, splitterGutterTrack, splitterParseSaved, SPLITTER_STORAGE_PREFIX, splitterNormalize, splitterResize, splitterDragDelta, splitterKey, APP_SHELL_NO_METRICS, appShellStyle, appShellCompact, appShellMeasure, appShellMetrics, tableToggleRow, tableTreeToggleRow, tableSelectSingle, tableSelectRange, tableSelectOnly, tableToggleAll, tableToggleRows, tableClearSelection, TableNodes, tableIsGroupKey, tableAggregate, tableFilterOperatorLabel, TABLE_FILTER_OPERATORS, tableFilterKind, tableFilterDefaultMode, tableFilterOperator, tableFilterValueForOperator, tabsActiveIndex, classNames, tabsRootClasses, tabsTabProps, tabsPanelProps, tabsPanelRendered, tabsSelect, tabsKeydown, tabsScrollBy, tabsOverflow, stepperRootClasses, stepperItemProps, stepperStateOf, stepperCanGo, stepperReachable, accordionHeaderProps, accordionRegionProps, accordionIsOpen, accordionSet, accordionKeydown, breadcrumbEntries, breadcrumbLinkKind, breadcrumbClickable, MENU_PLACEMENTS, MENU_OFFSET, MENU_INITIAL, menuVisible, menuHasIcons, menuItemProps, menuSheetFocusIndex, menuSubIcon, menuUseSheet, menuOpen, menuKeydown, menuActivate, menuHover, menuSubHover, MENUBAR_PLACEMENTS, MENUBAR_OFFSET, menubarVisible, menubarCollapsed, MENUBAR_INITIAL, menubarIsMega, menubarPanelItems, menubarColumns, menubarMobileRows, menubarClose, menubarHasPanel, menubarRootProps, menubarIsCurrent, menubarMobileIndent, menubarToggle, menubarPointerMoved, menubarHover, MENUBAR_CLOSE_DELAY, menubarRootKeydown, menubarPanelFrom, menubarPanelKeydown, menubarMobileToggle, menubarMobileKeyTarget, splitButtonIconSize, splitButtonToggleProps, speedDialTooltipSide, speedDialClasses, speedDialItemsProps, speedDialItemProps, speedDialFabProps, speedDialItemStyle, speedDialKeyTarget, BOTTOM_NAV_MAX, bottomNavShown, bottomNavVisible, bottomNavShowLabel, bottomNavBadge, bottomNavItemProps, bottomNavIcon, bottomNavPick, navDrawerMode, navDrawerModal, navDrawerClasses, navDrawerPanelProps, navDrawerRows, lockDocumentScroll, navDrawerItemProps, navDrawerBadge, navDrawerSectionCount, navDrawerToggle, navDrawerIsActive, navDrawerShouldClose, navDrawerKeydown, navDrawerFocusable, navDrawerPick, tableHasExpandColumn, tableDetailPaddingLeft, tableSortMetas, tableCollator, tableGlobalFields, tableView, tableBodyState, tableHeaderRowProps, tableRootProps, tableActiveIndex, tableRowProps, tableFilterActiveCount, tableRowCountParts, tableCounts, paginatorClampFirst, tableFormatCell, tableThClasses, tableTdClasses, tableRowClasses, tableTreeRowClasses, tableSkeletonWidth, tableTreeGuides, tableTreeToggleProps, tableSortIndex, tableSortOrderOf, tableSortIcon, tableAriaSort, tableSortToggle, tableSortState, tableFilterDelay, tableFilterSet, tableTreeNodeState, TABLE_ROW_CLICK_IGNORE, tableRowClickAction, tableTreeKey, tableGridKey, tableCanExpand, tableExpandToggle, tableExpandAllKeys, tableTreeIsExpanded, tableTreeToggle, tableTreeNeedsLoad, tableTreeExpandKeys, tableGroupToggle, tableSortTo, tableFilterIsActive, tableFilterValues, tableFilterPart, tableFilterSetOperator, tableFilterRangePart, tableFilterToggleValue, tableFilterClear, tablePanelOperatorOptions, TABLE_PANEL_TABS, tablePanelTabProps, tablePanelBodyProps, tablePanelTabKey, tablePanelTabClick, tablePanelColumnMatches, tablePanelAllState, tablePanelGroupCandidates, tablePanelKind, tablePanelDraftInit, tablePanelDraftSync, tablePanelIsActive, tablePanelDraftFilter, tablePanelDraftToggle, skeletonBars, skeletonRootClasses, comboValues, comboInputProps, comboRootClasses, comboOptionProps, comboLabel, comboIsSelected, comboTextOf, comboBlur, comboInput, comboFilter, comboResults, comboPick, comboKeydown, toastMessage, TOAST_OUT_MS, toastRootClass, toastForKey, toastSync, toastLife, toastSeverity, toastIcon, toastItemProps, toastPause, toastResume, messageClasses, messageIcon, messageIconSize, avatarInitials, avatarIconSize, avatarContent, avatarColors, avatarRootClasses, avatarLabel, chipClasses, chipProps, chipShowRemove, chipIconSize, chipClickAction, chipKeyAction, tagClasses, tagIconSize, badgeClasses, badgeProps, badgeContent, badgeOverlayVisible, badgeText, progressClasses, progressShowHead, progressShowValue, progressTrackProps, progressBarWidth, progressPercent, spinnerClasses, cardClasses, cardPadding, cardHasHead, dividerClasses, dividerProps, fieldsetRegionId, fieldsetClasses, collapsibleButtonProps, collapsibleRegionProps, collapsibleToggle, panelClasses, panelHeadless, panelIds, avatarGroupHidden, avatarGroupHiddenTitle, avatarGroupMoreText, avatarGroupOverflow, meterTotal, meterRemaining, meterSegments, meterRootClasses, meterBarProps, meterValueText, meterPercentText, timelineActiveIndex, timelineClasses, timelineEventClasses, timelineMarkerColor, timelineIcon, timelineText, carouselResponsiveVisible, carouselStep, carouselPageCount, carouselPages, carouselOffset, carouselTransform, carouselClasses, carouselLive, carouselRotating, carouselPlayLabelKey, carouselPrevDisabled, carouselNextDisabled, carouselItemVisible, carouselItemProps, REDUCED_MOTION_QUERY, carouselTick, CAROUSEL_TICK_MS, carouselGoTo, carouselFocusPause, carouselKey, carouselKeyTarget, carouselSwipe, IMAGE_VIEW_INITIAL, imageSource, imageClasses, imageViewerProps, imageTransform, imageZoom, imageViewStep, imageWheelDelta, imageViewerKey, scrollTopClasses, scrollTopButtonProps, scrollTopVisible, scrollTopBehavior, blockOverlayProps, blockOverlayClasses, blockSpinnerSize, blockHostProps, blockContentProps, listboxFilterItems, listboxSameValue, listboxValues, listboxAllState, listboxAllChecked, listboxClasses, listboxListProps, listboxSelected, listboxOptionClasses, listboxFocusActive, listboxPick, listboxRange, listboxToggleAll, listboxKeyAction, listboxTypeaheadQuery, listboxTypeahead, uploadFormatSize, UPLOAD_LIVE_PROPS, uploadPending, uploadClasses, uploadZoneProps, uploadInputProps, uploadIconFor, uploadItemClasses, uploadIsError, uploadStatusIcon, uploadZoneKey, uploadAdd, uploadRejectionText, uploadAnnouncement, uploadRemove, uploadFocusAfterRemove, uploadPatch, uploadComplete, addDays, isValidDate, addYears, addMonths, isoWeek, formatDate, POAD_ICONS } from '@poadio/ui-core';
4
4
  export { POAD_ICONS, POAD_ICONS_CEREMA, POAD_ICONS_CORE, POAD_ICONS_DATA, POAD_ICONS_FILES, POAD_ICONS_GEO, POAD_ICONS_UI, POAD_ICON_ALIASES, POAD_ICON_CATEGORIES, UI_EN, UI_FR, addDays, addMonths, addYears, compareDay, daysInMonth, endOfMonth, formatDate, isBetweenDay, isSameDay, isSameMonth, isValidDate, isoOf, isoWeek, localeDateFormat, monthNames, pad2, parseIso, parseWithFormat, startOfDay, startOfMonth, toDate, uiFirstDayOfWeek, uiFormat, uiInterpolate, uiPickForm, uiPlaceholders, uiUses12Hours, weekdayNames } from '@poadio/ui-core';
5
5
  import { DomSanitizer } from '@angular/platform-browser';
6
6
  import * as i1$2 from '@angular/forms';
@@ -2133,31 +2133,40 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImpo
2133
2133
  args: [{ selector: '[poadSelectFooter]', standalone: true }]
2134
2134
  }] });
2135
2135
 
2136
- const POAD_BREAKPOINTS = { sm: 640, md: 768, lg: 1024, xl: 1280, '2xl': 1536 };
2137
- const ORDER = ['xs', 'sm', 'md', 'lg', 'xl', '2xl'];
2136
+ /** Largeur minimale (px) de chaque point de rupture (`BREAKPOINTS` d'ui-core). */
2137
+ const POAD_BREAKPOINTS = BREAKPOINTS;
2138
2138
  /** Seuil « mobile » global : en dessous, les overlays passent en feuille basse / plein écran (défaut 'md'). */
2139
2139
  const POAD_MOBILE_BREAKPOINT = new InjectionToken('POAD_MOBILE_BREAKPOINT', { providedIn: 'root', factory: () => 'md' });
2140
2140
  /** Densité tactile : 'auto' = classe `poad-touch` sur <html> quand `pointer: coarse` ; 'on' / 'off' forcent. */
2141
2141
  const POAD_TOUCH_DENSITY = new InjectionToken('POAD_TOUCH_DENSITY', { providedIn: 'root', factory: () => 'auto' });
2142
2142
  /**
2143
- * Breakpoints de la FENÊTRE (nommage Tailwind : xs<640, sm≥640, md≥768, lg≥1024, xl≥1280, 2xl≥1536).
2143
+ * Breakpoints de la FENÊTRE (nommage Tailwind : xs<640, sm≥640, md≥768, lg≥1024, xl≥1280, 2xl≥1536), sur le module
2144
+ * `breakpoint` d'ui-core (`breakpointState`, `breakpointMatches`) — les mêmes décisions que `useBreakpoint` (React, Vue)
2145
+ * et `<poad-if>` (composants web).
2144
2146
  * Signals : `current()`, `width()`, `up('md')`, `down('lg')`, `between('sm','lg')`, `isMobile()` (<md), `isTouch()` (pointer: coarse).
2145
2147
  * Pour qu'un composant s'adapte à SON conteneur (et non à la fenêtre), utiliser les container queries / ResizeObserver
2146
2148
  * (cf. poad-table `responsive`), ce service sert aux décisions de page (sidebar, layout global, overlays mobiles).
2147
2149
  * `isMobile()` = sous POAD_MOBILE_BREAKPOINT ('md') ; `sheetPreferred()` = les overlays doivent passer en feuille basse.
2148
2150
  * Densité tactile : pose la classe `poad-touch` sur <html> (POAD_TOUCH_DENSITY : auto | on | off) → tokens 40 px.
2151
+ * Sans fenêtre (rendu serveur) : largeur `BREAKPOINT_SERVER_WIDTH` (1280, `xl`).
2149
2152
  */
2150
2153
  class PoadBreakpointService {
2151
2154
  isBrowser = isPlatformBrowser(inject(PLATFORM_ID));
2152
- _width = signal(this.isBrowser ? window.innerWidth : 1280, ...(ngDevMode ? [{ debugName: "_width" }] : /* istanbul ignore next */ []));
2153
- _touch = signal(this.isBrowser && typeof window.matchMedia === 'function' ? window.matchMedia('(pointer: coarse)').matches : false, ...(ngDevMode ? [{ debugName: "_touch" }] : /* istanbul ignore next */ []));
2154
- width = this._width.asReadonly();
2155
- current = computed(() => { const w = this._width(); return w >= 1536 ? '2xl' : w >= 1280 ? 'xl' : w >= 1024 ? 'lg' : w >= 768 ? 'md' : w >= 640 ? 'sm' : 'xs'; }, ...(ngDevMode ? [{ debugName: "current" }] : /* istanbul ignore next */ []));
2155
+ _width = signal(this.isBrowser ? window.innerWidth : BREAKPOINT_SERVER_WIDTH, ...(ngDevMode ? [{ debugName: "_width" }] : /* istanbul ignore next */ []));
2156
+ _touch = signal(this.isBrowser && typeof window.matchMedia === 'function' ? window.matchMedia(BREAKPOINT_TOUCH_QUERY).matches : false, ...(ngDevMode ? [{ debugName: "_touch" }] : /* istanbul ignore next */ []));
2156
2157
  mobileBp = inject(POAD_MOBILE_BREAKPOINT);
2157
2158
  touchDensity = inject(POAD_TOUCH_DENSITY);
2158
- isMobile = computed(() => ORDER.indexOf(this.current()) < ORDER.indexOf(this.mobileBp), ...(ngDevMode ? [{ debugName: "isMobile" }] : /* istanbul ignore next */ []));
2159
+ /** État complet (largeur, point de rupture, seuil mobile, pointeur grossier) : `breakpointState` d'ui-core. */
2160
+ state = computed(() => breakpointState(this._width(), this._touch(), this.mobileBp), ...(ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []));
2161
+ /** Largeur de la fenêtre (px). */
2162
+ width = this._width.asReadonly();
2163
+ /** Point de rupture courant. */
2164
+ current = computed(() => this.state().current, ...(ngDevMode ? [{ debugName: "current" }] : /* istanbul ignore next */ []));
2165
+ /** Sous le seuil mobile (`POAD_MOBILE_BREAKPOINT`). */
2166
+ isMobile = computed(() => this.state().isMobile, ...(ngDevMode ? [{ debugName: "isMobile" }] : /* istanbul ignore next */ []));
2159
2167
  /** Les overlays (select, date, menu, confirm…) doivent-ils passer en feuille basse ? (= isMobile) */
2160
2168
  sheetPreferred = computed(() => this.isMobile(), ...(ngDevMode ? [{ debugName: "sheetPreferred" }] : /* istanbul ignore next */ []));
2169
+ /** Pointeur grossier (`pointer: coarse`). */
2161
2170
  isTouch = this._touch.asReadonly();
2162
2171
  /** Densité tactile effective (classe `poad-touch` sur <html>). */
2163
2172
  touchDense = computed(() => this.touchDensity === 'on' || (this.touchDensity === 'auto' && this.isTouch()), ...(ngDevMode ? [{ debugName: "touchDense" }] : /* istanbul ignore next */ []));
@@ -2167,30 +2176,24 @@ class PoadBreakpointService {
2167
2176
  effect(() => { document.documentElement.classList.toggle('poad-touch', this.touchDense()); });
2168
2177
  const onResize = () => this._width.set(window.innerWidth);
2169
2178
  window.addEventListener('resize', onResize, { passive: true });
2170
- const mq = typeof window.matchMedia === 'function' ? window.matchMedia('(pointer: coarse)') : null;
2179
+ const mq = typeof window.matchMedia === 'function' ? window.matchMedia(BREAKPOINT_TOUCH_QUERY) : null;
2171
2180
  const onMq = () => this._touch.set(!!mq?.matches);
2172
2181
  mq?.addEventListener('change', onMq);
2173
2182
  inject(DestroyRef).onDestroy(() => { window.removeEventListener('resize', onResize); mq?.removeEventListener('change', onMq); });
2174
2183
  }
2175
2184
  /** ≥ bp */
2176
- up(bp) { return ORDER.indexOf(this.current()) >= ORDER.indexOf(bp); }
2185
+ up(bp) { return breakpointUp(this.current(), bp); }
2177
2186
  /** < bp */
2178
- down(bp) { return ORDER.indexOf(this.current()) < ORDER.indexOf(bp); }
2179
- between(from, to) { return this.up(from) && this.down(to); }
2180
- /** Évalue une expression : `'md+'` (≥md), `'lg-'` (<lg… inclus : ≤lg), `'sm..lg'`, `'xs'`, `'md,xl'`. */
2187
+ down(bp) { return breakpointDown(this.current(), bp); }
2188
+ /** `from` ≤ courant < `to`. */
2189
+ between(from, to) { return breakpointBetween(this.current(), from, to); }
2190
+ /**
2191
+ * Évalue une expression : `'md+'` (≥md), `'lg-'` (≤lg), `'sm..lg'`, `'xs'`, `'md,xl'`, et les mots `'mobile'`,
2192
+ * `'desktop'`, `'touch'` (`breakpointMatches` d'ui-core).
2193
+ */
2181
2194
  matches(expr) {
2182
- return expr.split(',').some(part => {
2183
- const p = part.trim();
2184
- if (p.endsWith('+'))
2185
- return this.up(p.slice(0, -1));
2186
- if (p.endsWith('-'))
2187
- return ORDER.indexOf(this.current()) <= ORDER.indexOf(p.slice(0, -1));
2188
- if (p.includes('..')) {
2189
- const [a, b] = p.split('..');
2190
- return this.up(a) && ORDER.indexOf(this.current()) <= ORDER.indexOf(b);
2191
- }
2192
- return this.current() === p;
2193
- });
2195
+ const s = this.state();
2196
+ return breakpointMatches(expr, { current: s.current, mobile: s.mobile, touch: s.touch });
2194
2197
  }
2195
2198
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: PoadBreakpointService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2196
2199
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: PoadBreakpointService, providedIn: 'root' });
@@ -2199,25 +2202,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImpo
2199
2202
  type: Injectable,
2200
2203
  args: [{ providedIn: 'root' }]
2201
2204
  }], ctorParameters: () => [] });
2202
- /** Parse une prop responsive `"1 sm:2 lg:4"` → { xs:'1', sm:'2', lg:'4' }. */
2205
+ /** Parse une prop responsive `"1 sm:2 lg:4"` → { xs:'1', sm:'2', lg:'4' } (`responsiveParse` d'ui-core). */
2203
2206
  function poadParseResponsive(v) {
2204
- const out = {};
2205
- if (v == null || v === '')
2206
- return out;
2207
- String(v).trim().split(/\s+/).forEach(tok => { const m = /^(?:(xs|sm|md|lg|xl|2xl):)?(.+)$/.exec(tok); if (m)
2208
- out[m[1] || 'xs'] = m[2]; });
2209
- return out;
2207
+ return responsiveParse(v);
2210
2208
  }
2211
- /** Résout la valeur applicable au breakpoint courant (cascade mobile-first). */
2209
+ /** Résout la valeur applicable au breakpoint courant (cascade mobile-first ; `responsiveResolve` d'ui-core). */
2212
2210
  function poadResolveResponsive(map, bp) {
2213
- let val;
2214
- for (const b of ORDER) {
2215
- if (map[b] !== undefined)
2216
- val = map[b];
2217
- if (b === bp)
2218
- break;
2219
- }
2220
- return val;
2211
+ return responsiveResolve(map, bp);
2221
2212
  }
2222
2213
 
2223
2214
  /** Focus initial demandé : l'attribut d'ui-core, ou `cdkFocusInitial` (celui du piège du CDK, que les applications posaient). */
@@ -5476,97 +5467,108 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImpo
5476
5467
  `, encapsulation: ViewEncapsulation.None, styles: [".poad-datepicker{display:inline-block;width:100%;font-family:var(--poad-font);font-size:var(--poad-font-size);color:var(--poad-fg)}.poad-datepicker.is-inline{width:auto}.poad-datepicker .poad-dp__box{display:flex;align-items:stretch;height:var(--poad-control-h);background:var(--poad-input-bg);border:1px solid var(--poad-input-border);border-radius:var(--poad-radius);transition:border-color var(--poad-dur),box-shadow var(--poad-dur);cursor:text}.poad-datepicker.size-sm .poad-dp__box{height:var(--poad-control-h-sm);font-size:var(--poad-font-size-sm);border-radius:var(--poad-radius-sm)}.poad-datepicker.size-lg .poad-dp__box{height:var(--poad-control-h-lg);font-size:var(--poad-font-size-lg)}.poad-datepicker .poad-dp__box:focus-within,.poad-datepicker.is-open .poad-dp__box{border-color:var(--poad-accent);box-shadow:0 0 0 3px var(--poad-ring)}.poad-datepicker.is-invalid .poad-dp__box{border-color:var(--poad-danger)}.poad-datepicker.is-invalid .poad-dp__box:focus-within{box-shadow:0 0 0 3px var(--poad-danger-soft)}.poad-datepicker.is-disabled .poad-dp__box{opacity:.6;background:var(--poad-bg-subtle);cursor:not-allowed}.poad-datepicker .poad-dp__input{flex:1 1 0;width:0;min-width:0;border:0;outline:0;background:transparent;color:inherit;font:inherit;padding:0 var(--poad-control-px);font-variant-numeric:tabular-nums;cursor:inherit}.poad-datepicker .poad-dp__input::placeholder{color:var(--poad-fg-muted)}.poad-datepicker .poad-dp__btn{border:0;background:transparent;color:var(--poad-fg-muted);cursor:pointer;padding:0 8px;display:grid;place-items:center}.poad-datepicker .poad-dp__btn:hover{color:var(--poad-fg)}.poad-datepicker .poad-dp__cal{padding-inline-end:10px}.poad-dp__panel{background:var(--poad-overlay);--poad-hover: var(--poad-overlay-hover);border:1px solid var(--poad-border);border-radius:10px;box-shadow:var(--poad-shadow-lg);padding:10px;width:272px;box-sizing:border-box;-webkit-user-select:none;user-select:none}.poad-dp__panel.is-inline{box-shadow:none;background:var(--poad-surface)}.poad-dp__panel .poad-dp__head{display:flex;align-items:center;justify-content:space-between;margin-bottom:6px}.poad-dp__panel .poad-dp__nav{width:26px;height:26px;border:0;border-radius:6px;background:transparent;color:var(--poad-fg-secondary);cursor:pointer;display:grid;place-items:center}.poad-dp__panel .poad-dp__nav:hover{background:var(--poad-hover);color:var(--poad-fg)}.poad-dp__panel .poad-dp__title{display:inline-flex;gap:4px;font-weight:600;text-transform:capitalize}.poad-dp__panel .poad-dp__title button{border:0;background:transparent;color:inherit;font:inherit;font-weight:600;padding:3px 6px;border-radius:6px;cursor:pointer;text-transform:capitalize}.poad-dp__panel .poad-dp__title button:hover{background:var(--poad-hover)}.poad-dp__panel .poad-dp__grid{display:grid;gap:2px}.poad-dp__panel .poad-dp__row{display:grid;grid-template-columns:repeat(7,1fr);gap:2px}.poad-dp__panel .has-week .poad-dp__row{grid-template-columns:22px repeat(7,1fr)}.poad-dp__panel .poad-dp__weekdays span{font-size:10.5px;font-weight:600;text-transform:uppercase;letter-spacing:.04em;color:var(--poad-fg-muted);text-align:center;height:22px;line-height:22px}.poad-dp__panel .poad-dp__wk{font:10px var(--poad-font-mono);color:var(--poad-fg-muted);text-align:center;align-self:center}.poad-dp__panel .poad-dp__day{position:relative;height:32px;border:0;border-radius:7px;background:transparent;color:var(--poad-fg);font:inherit;font-size:12.5px;cursor:pointer;font-variant-numeric:tabular-nums}.poad-dp__panel .poad-dp__day:hover:not([disabled]){background:var(--poad-hover)}.poad-dp__panel .poad-dp__day:focus-visible{outline:2px solid var(--poad-ring);outline-offset:-1px}.poad-dp__panel .poad-dp__day.is-out{color:var(--poad-fg-muted);opacity:.7}.poad-dp__panel .poad-dp__day.is-today:after{content:\"\";position:absolute;left:50%;bottom:4px;width:4px;height:4px;margin-inline-start:-2px;border-radius:50%;background:var(--poad-accent)}.poad-dp__panel .poad-dp__day.in-range,.poad-dp__panel .poad-dp__day.is-hover-range{background:var(--poad-accent-soft);border-radius:0;color:var(--poad-fg)}.poad-dp__panel .poad-dp__day.range-start{border-radius:7px 0 0 7px}.poad-dp__panel .poad-dp__day.range-end{border-radius:0 7px 7px 0}.poad-dp__panel .poad-dp__day.range-start.range-end{border-radius:7px}.poad-dp__panel .poad-dp__day.is-sel{background:var(--poad-accent);color:var(--poad-fg-on-accent);font-weight:600}.poad-dp__panel .poad-dp__day.is-sel.is-today:after{background:var(--poad-fg-on-accent)}.poad-dp__panel .poad-dp__day[disabled]{color:var(--poad-fg-muted);opacity:.45;cursor:not-allowed;text-decoration:line-through}.poad-dp__panel .poad-dp__cells{display:grid;grid-template-columns:repeat(3,1fr);gap:4px}.poad-dp__panel .poad-dp__cells button{height:36px;border:0;border-radius:7px;background:transparent;color:var(--poad-fg);font:inherit;cursor:pointer;text-transform:capitalize}.poad-dp__panel .poad-dp__cells button:hover:not([disabled]){background:var(--poad-hover)}.poad-dp__panel .poad-dp__cells button.is-now{color:var(--poad-accent);font-weight:600}.poad-dp__panel .poad-dp__cells button.is-sel{background:var(--poad-accent);color:var(--poad-fg-on-accent);font-weight:600}.poad-dp__panel .poad-dp__cells button[disabled]{opacity:.45;cursor:not-allowed}.poad-dp__panel .poad-dp__time{display:flex;align-items:center;justify-content:center;gap:4px;padding-top:8px}.poad-dp__panel .poad-dp__time.has-border{border-top:1px solid var(--poad-border);margin-top:8px}.poad-dp__panel .poad-dp__spin{display:flex;flex-direction:column;align-items:center}.poad-dp__panel .poad-dp__spin button{width:28px;height:20px;border:0;background:transparent;color:var(--poad-fg-muted);cursor:pointer;display:grid;place-items:center;border-radius:5px}.poad-dp__panel .poad-dp__spin button:hover{background:var(--poad-hover);color:var(--poad-fg)}.poad-dp__panel .poad-dp__spin input{width:36px;height:28px;text-align:center;border:1px solid var(--poad-input-border);border-radius:6px;background:var(--poad-input-bg);color:var(--poad-fg);font:500 14px var(--poad-font-mono);outline:0}.poad-dp__panel .poad-dp__spin input:focus{border-color:var(--poad-accent);box-shadow:0 0 0 3px var(--poad-ring)}.poad-dp__panel .poad-dp__colon{font-weight:600;color:var(--poad-fg-muted)}.poad-dp__panel .poad-dp__ampm{margin-inline-start:6px;height:28px;padding:0 8px;border:1px solid var(--poad-input-border);border-radius:6px;background:transparent;color:var(--poad-fg);font:600 11px var(--poad-font);cursor:pointer}.poad-dp__panel .poad-dp__bar{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:8px;padding-top:8px;border-top:1px solid var(--poad-border)}.poad-dp__panel .poad-dp__bar button{border:0;background:transparent;color:var(--poad-accent);font:500 12px var(--poad-font);padding:4px 8px;border-radius:6px;cursor:pointer}.poad-dp__panel .poad-dp__bar button:hover{background:var(--poad-accent-soft)}.poad-dp__panel .poad-dp__bar button.is-muted{color:var(--poad-fg-secondary)}.poad-dp__panel .poad-dp__bar button.is-muted:hover{background:var(--poad-hover)}.poad-dp__panel .poad-dp__bar button.is-ok{margin-inline-start:auto;background:var(--poad-accent);color:var(--poad-fg-on-accent);padding:8px 18px;font-size:var(--poad-font-size)}.poad-dp__panel .poad-dp__bar button.is-ok:hover{background:var(--poad-accent-hover)}.poad-dp__panel.is-sheet .poad-dp__bar button{min-height:40px}.poad-dp__panel .poad-dp__count{font-size:11px;color:var(--poad-fg-muted)}\n"] }]
5477
5468
  }], ctorParameters: () => [], propDecorators: { mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], selectionMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionMode", required: false }] }], dataType: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataType", required: false }] }], format: [{ type: i0.Input, args: [{ isSignal: true, alias: "format", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], disabledDates: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabledDates", required: false }] }], disabledDays: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabledDays", required: false }] }], showIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "showIcon", required: false }] }], inline: [{ type: i0.Input, args: [{ isSignal: true, alias: "inline", required: false }] }], showTime: [{ type: i0.Input, args: [{ isSignal: true, alias: "showTime", required: false }] }], hourFormat: [{ type: i0.Input, args: [{ isSignal: true, alias: "hourFormat", required: false }] }], stepMinute: [{ type: i0.Input, args: [{ isSignal: true, alias: "stepMinute", required: false }] }], showSeconds: [{ type: i0.Input, args: [{ isSignal: true, alias: "showSeconds", required: false }] }], showButtonBar: [{ type: i0.Input, args: [{ isSignal: true, alias: "showButtonBar", required: false }] }], showWeek: [{ type: i0.Input, args: [{ isSignal: true, alias: "showWeek", required: false }] }], firstDayOfWeek: [{ type: i0.Input, args: [{ isSignal: true, alias: "firstDayOfWeek", required: false }] }], locale: [{ type: i0.Input, args: [{ isSignal: true, alias: "locale", required: false }] }], readonlyInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonlyInput", required: false }] }], manualInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "manualInput", required: false }] }], clearable: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearable", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], closeOnSelect: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnSelect", required: false }] }], mobile: [{ type: i0.Input, args: [{ isSignal: true, alias: "mobile", required: false }] }], changed: [{ type: i0.Output, args: ["changed"] }], opened: [{ type: i0.Output, args: ["opened"] }], closed: [{ type: i0.Output, args: ["closed"] }], monthChange: [{ type: i0.Output, args: ["monthChange"] }], yearChange: [{ type: i0.Output, args: ["yearChange"] }], cleared: [{ type: i0.Output, args: ["cleared"] }], todayClick: [{ type: i0.Output, args: ["todayClick"] }], panelTpl: [{ type: i0.ViewChild, args: ['panelTpl', { isSignal: true }] }], inp: [{ type: i0.ViewChild, args: ['inp', { isSignal: true }] }] } });
5478
5469
 
5479
- /** 'sm' → var(--poad-gap-sm) ; '12px' → 12px ; 'none' → 0. */
5470
+ /** 'sm' → var(--poad-gap-sm) ; '12px' → 12px ; 'none' → 0 (`layoutGap` d'ui-core). */
5480
5471
  function poadGap(g) {
5481
- if (g == null || g === '')
5482
- return 'var(--poad-gap-md)';
5483
- if (g === 'none' || g === '0')
5484
- return '0';
5485
- return ['xs', 'sm', 'md', 'lg', 'xl'].includes(g) ? `var(--poad-gap-${g})` : g;
5472
+ return layoutGap(g);
5486
5473
  }
5487
5474
  /** Signal résolvant une prop responsive ("1 sm:2 lg:4") selon le breakpoint fenêtre courant. */
5488
5475
  function poadResponsive(src) {
5489
5476
  const bp = inject(PoadBreakpointService);
5490
- return computed(() => poadResolveResponsive(poadParseResponsive(src()), bp.current()));
5477
+ return computed(() => responsiveValue(src(), bp.current()));
5491
5478
  }
5492
5479
 
5493
5480
  /**
5494
- * `*poadIf="'md+'"` — rend le template seulement quand le breakpoint FENÊTRE correspond.
5495
- * Expressions : 'md+' (≥md), 'sm-' (≤sm), 'sm..lg', 'xs', 'md,xl', 'mobile' (<md), 'desktop' (≥md), 'touch'.
5481
+ * `*poadIf="'md+'"` — rend le template seulement quand le point de rupture de la FENÊTRE correspond, et le retire
5482
+ * sinon (pas seulement masqué) ; suit le redimensionnement. Décision : `breakpointShows` d'ui-core, la même que
5483
+ * `<PoadIf when>` (React, Vue) et `<poad-if when>` (composants web).
5484
+ * Expressions : 'md+' (≥md), 'sm-' (≤sm), 'sm..lg', 'xs', 'md,xl', 'mobile' (sous `POAD_MOBILE_BREAKPOINT`),
5485
+ * 'desktop' (au-dessus), 'touch' (pointeur grossier). Expression vide : toujours rendu.
5486
+ * `*poadIf="'md+'; else court"` rend le gabarit `<ng-template #court>` quand l'expression ne correspond pas.
5496
5487
  */
5497
5488
  class PoadIfDirective {
5498
5489
  bp = inject(PoadBreakpointService);
5499
5490
  tpl = inject((TemplateRef));
5500
5491
  vcr = inject(ViewContainerRef);
5492
+ /** Expression de point de rupture : `'md+'`, `'sm-'`, `'sm..lg'`, `'md,xl'`, `'mobile'`, `'desktop'`, `'touch'`. */
5501
5493
  poadIf = input.required(...(ngDevMode ? [{ debugName: "poadIf" }] : /* istanbul ignore next */ []));
5502
- shown = false;
5494
+ /** Gabarit rendu à la place quand l'expression ne correspond pas. */
5495
+ poadIfElse = input(null, ...(ngDevMode ? [{ debugName: "poadIfElse" }] : /* istanbul ignore next */ []));
5496
+ shown = null;
5503
5497
  constructor() {
5504
5498
  effect(() => {
5505
- const e = this.poadIf();
5506
- const ok = e === 'mobile' ? this.bp.isMobile() : e === 'desktop' ? !this.bp.isMobile() : e === 'touch' ? this.bp.isTouch() : this.bp.matches(e);
5507
- if (ok && !this.shown) {
5508
- this.vcr.createEmbeddedView(this.tpl);
5509
- this.shown = true;
5510
- }
5511
- else if (!ok && this.shown) {
5512
- this.vcr.clear();
5513
- this.shown = false;
5514
- }
5499
+ const next = breakpointShows(this.poadIf(), this.bp.state()) ? this.tpl : this.poadIfElse();
5500
+ if (next === this.shown)
5501
+ return;
5502
+ this.vcr.clear();
5503
+ if (next)
5504
+ this.vcr.createEmbeddedView(next);
5505
+ this.shown = next;
5515
5506
  });
5516
5507
  }
5517
5508
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: PoadIfDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
5518
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.20", type: PoadIfDirective, isStandalone: true, selector: "[poadIf]", inputs: { poadIf: { classPropertyName: "poadIf", publicName: "poadIf", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0 });
5509
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.20", type: PoadIfDirective, isStandalone: true, selector: "[poadIf]", inputs: { poadIf: { classPropertyName: "poadIf", publicName: "poadIf", isSignal: true, isRequired: true, transformFunction: null }, poadIfElse: { classPropertyName: "poadIfElse", publicName: "poadIfElse", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 });
5519
5510
  }
5520
5511
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: PoadIfDirective, decorators: [{
5521
5512
  type: Directive,
5522
5513
  args: [{ selector: '[poadIf]', standalone: true }]
5523
- }], ctorParameters: () => [], propDecorators: { poadIf: [{ type: i0.Input, args: [{ isSignal: true, alias: "poadIf", required: true }] }] } });
5514
+ }], ctorParameters: () => [], propDecorators: { poadIf: [{ type: i0.Input, args: [{ isSignal: true, alias: "poadIf", required: true }] }], poadIfElse: [{ type: i0.Input, args: [{ isSignal: true, alias: "poadIfElse", required: false }] }] } });
5524
5515
 
5525
- const J = { start: 'flex-start', center: 'center', end: 'flex-end', between: 'space-between', around: 'space-around', evenly: 'space-evenly' };
5526
- const A$1 = { stretch: 'stretch', start: 'flex-start', center: 'center', end: 'flex-end', baseline: 'baseline' };
5516
+ // Style partagé avec les autres rendus : source unique dans le socle (`@poadio/ui-core/layout.css`), encapsulation
5517
+ // désactivée ; les valeurs en ligne viennent du module `layout` d'ui-core.
5518
+ const SHEET = '../../../../../../ui-core/layout.css';
5527
5519
  /**
5528
5520
  * Pile verticale : `<poad-stack gap="sm" align="stretch">` — les enfants s'empilent avec un gap uniforme (jamais de marges).
5521
+ * Style : `@poadio/ui-core/layout.css` ; valeurs de `stackStyle` (ui-core).
5522
+ * @slot default Les enfants empilés.
5529
5523
  * @atelier icone=rows conteneur=flux largeur=4 hauteur=5
5530
5524
  */
5531
5525
  class PoadStackComponent {
5526
+ /** Écart entre les enfants : `xs` … `xl`, `none`, ou une longueur CSS. */
5532
5527
  gap = input('md', ...(ngDevMode ? [{ debugName: "gap" }] : /* istanbul ignore next */ []));
5528
+ /** Alignement des enfants sur l'axe horizontal. */
5533
5529
  align = input('stretch', ...(ngDevMode ? [{ debugName: "align" }] : /* istanbul ignore next */ []));
5530
+ /** Répartition des enfants sur l'axe vertical. */
5534
5531
  justify = input('start', ...(ngDevMode ? [{ debugName: "justify" }] : /* istanbul ignore next */ []));
5532
+ /** En ligne (`inline-flex`) plutôt qu'en bloc. */
5535
5533
  inline = input(false, { ...(ngDevMode ? { debugName: "inline" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
5536
- g = computed(() => poadGap(this.gap()), ...(ngDevMode ? [{ debugName: "g" }] : /* istanbul ignore next */ []));
5537
- a = computed(() => A$1[this.align()], ...(ngDevMode ? [{ debugName: "a" }] : /* istanbul ignore next */ []));
5538
- j = computed(() => J[this.justify()], ...(ngDevMode ? [{ debugName: "j" }] : /* istanbul ignore next */ []));
5534
+ s = computed(() => stackStyle({ gap: this.gap(), align: this.align(), justify: this.justify() }), ...(ngDevMode ? [{ debugName: "s" }] : /* istanbul ignore next */ []));
5539
5535
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: PoadStackComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
5540
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.20", type: PoadStackComponent, isStandalone: true, selector: "poad-stack", inputs: { gap: { classPropertyName: "gap", publicName: "gap", isSignal: true, isRequired: false, transformFunction: null }, align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null }, justify: { classPropertyName: "justify", publicName: "justify", isSignal: true, isRequired: false, transformFunction: null }, inline: { classPropertyName: "inline", publicName: "inline", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.gap": "g()", "style.align-items": "a()", "style.justify-content": "j()", "class.is-inline": "inline()" }, classAttribute: "poad-stack" }, ngImport: i0, template: `<ng-content />`, isInline: true, styles: [":host{display:flex;flex-direction:column;min-width:0}:host(.is-inline){display:inline-flex}:host ::ng-deep>*{min-width:0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
5536
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.20", type: PoadStackComponent, isStandalone: true, selector: "poad-stack", inputs: { gap: { classPropertyName: "gap", publicName: "gap", isSignal: true, isRequired: false, transformFunction: null }, align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null }, justify: { classPropertyName: "justify", publicName: "justify", isSignal: true, isRequired: false, transformFunction: null }, inline: { classPropertyName: "inline", publicName: "inline", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.gap": "s().gap", "style.align-items": "s().alignItems", "style.justify-content": "s().justifyContent", "class.is-inline": "inline()" }, classAttribute: "poad-stack" }, ngImport: i0, template: `<ng-content />`, isInline: true, styles: [".poad-stack{display:flex;flex-direction:column;min-width:0}.poad-stack.is-inline{display:inline-flex}.poad-stack>*{min-width:0}.poad-cluster{display:flex;min-width:0}.poad-cluster.is-inline{display:inline-flex}.poad-grid{display:grid;min-width:0}.poad-grid>*{min-width:0}.poad-split{display:grid;min-width:0}.poad-split>*{min-width:0}.poad-sidebar{display:flex;flex-wrap:wrap;min-width:0}.poad-sidebar>*{flex-basis:0;flex-grow:999;min-inline-size:var(--poad-sb-min, 60%);min-width:0}.poad-sidebar>.poad-sidebar__panel{flex-basis:var(--poad-sb-w, 280px);flex-grow:1;min-inline-size:0}.poad-sidebar.side-left>.poad-sidebar__panel{order:-1}.poad-sidebar.is-collapsed>*{flex-basis:100%!important;min-inline-size:0!important}.poad-center{display:block;box-sizing:content-box;margin-inline:auto;min-width:0}.poad-center.and-text{text-align:center}.poad-center.is-intrinsic{display:flex;flex-direction:column;align-items:center}.poad-container{display:block;margin-inline:auto;width:100%;box-sizing:border-box;min-width:0}.poad-spacer{display:block}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
5541
5537
  }
5542
5538
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: PoadStackComponent, decorators: [{
5543
5539
  type: Component,
5544
- args: [{ selector: 'poad-stack', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'poad-stack', '[style.gap]': 'g()', '[style.align-items]': 'a()', '[style.justify-content]': 'j()', '[class.is-inline]': 'inline()' }, template: `<ng-content />`, styles: [":host{display:flex;flex-direction:column;min-width:0}:host(.is-inline){display:inline-flex}:host ::ng-deep>*{min-width:0}\n"] }]
5540
+ args: [{ selector: 'poad-stack', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'poad-stack', '[style.gap]': 's().gap', '[style.align-items]': 's().alignItems', '[style.justify-content]': 's().justifyContent', '[class.is-inline]': 'inline()' }, template: `<ng-content />`, encapsulation: ViewEncapsulation.None, styles: [".poad-stack{display:flex;flex-direction:column;min-width:0}.poad-stack.is-inline{display:inline-flex}.poad-stack>*{min-width:0}.poad-cluster{display:flex;min-width:0}.poad-cluster.is-inline{display:inline-flex}.poad-grid{display:grid;min-width:0}.poad-grid>*{min-width:0}.poad-split{display:grid;min-width:0}.poad-split>*{min-width:0}.poad-sidebar{display:flex;flex-wrap:wrap;min-width:0}.poad-sidebar>*{flex-basis:0;flex-grow:999;min-inline-size:var(--poad-sb-min, 60%);min-width:0}.poad-sidebar>.poad-sidebar__panel{flex-basis:var(--poad-sb-w, 280px);flex-grow:1;min-inline-size:0}.poad-sidebar.side-left>.poad-sidebar__panel{order:-1}.poad-sidebar.is-collapsed>*{flex-basis:100%!important;min-inline-size:0!important}.poad-center{display:block;box-sizing:content-box;margin-inline:auto;min-width:0}.poad-center.and-text{text-align:center}.poad-center.is-intrinsic{display:flex;flex-direction:column;align-items:center}.poad-container{display:block;margin-inline:auto;width:100%;box-sizing:border-box;min-width:0}.poad-spacer{display:block}\n"] }]
5545
5541
  }], propDecorators: { gap: [{ type: i0.Input, args: [{ isSignal: true, alias: "gap", required: false }] }], align: [{ type: i0.Input, args: [{ isSignal: true, alias: "align", required: false }] }], justify: [{ type: i0.Input, args: [{ isSignal: true, alias: "justify", required: false }] }], inline: [{ type: i0.Input, args: [{ isSignal: true, alias: "inline", required: false }] }] } });
5546
5542
  /**
5547
5543
  * Groupe horizontal qui replie : `<poad-cluster gap="sm" justify="between" align="center">` (boutons, chips, méta).
5544
+ * Style : `@poadio/ui-core/layout.css` ; valeurs de `clusterStyle` (ui-core).
5545
+ * @slot default Les enfants du groupe.
5548
5546
  * @atelier icone=boxes conteneur=flux largeur=6 hauteur=3
5549
5547
  */
5550
5548
  class PoadClusterComponent {
5549
+ /** Écart entre les enfants : `xs` … `xl`, `none`, ou une longueur CSS. */
5551
5550
  gap = input('sm', ...(ngDevMode ? [{ debugName: "gap" }] : /* istanbul ignore next */ []));
5551
+ /** Alignement des enfants sur l'axe vertical. */
5552
5552
  align = input('center', ...(ngDevMode ? [{ debugName: "align" }] : /* istanbul ignore next */ []));
5553
+ /** Répartition des enfants sur l'axe horizontal. */
5553
5554
  justify = input('start', ...(ngDevMode ? [{ debugName: "justify" }] : /* istanbul ignore next */ []));
5555
+ /** Passe à la ligne quand la place manque. */
5554
5556
  wrap = input(true, { ...(ngDevMode ? { debugName: "wrap" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
5557
+ /** En ligne (`inline-flex`) plutôt qu'en bloc. */
5555
5558
  inline = input(false, { ...(ngDevMode ? { debugName: "inline" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
5556
- g = computed(() => poadGap(this.gap()), ...(ngDevMode ? [{ debugName: "g" }] : /* istanbul ignore next */ []));
5557
- a = computed(() => A$1[this.align()], ...(ngDevMode ? [{ debugName: "a" }] : /* istanbul ignore next */ []));
5558
- j = computed(() => J[this.justify()], ...(ngDevMode ? [{ debugName: "j" }] : /* istanbul ignore next */ []));
5559
+ s = computed(() => clusterStyle({ gap: this.gap(), align: this.align(), justify: this.justify(), wrap: this.wrap() }), ...(ngDevMode ? [{ debugName: "s" }] : /* istanbul ignore next */ []));
5559
5560
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: PoadClusterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
5560
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.20", type: PoadClusterComponent, isStandalone: true, selector: "poad-cluster", inputs: { gap: { classPropertyName: "gap", publicName: "gap", isSignal: true, isRequired: false, transformFunction: null }, align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null }, justify: { classPropertyName: "justify", publicName: "justify", isSignal: true, isRequired: false, transformFunction: null }, wrap: { classPropertyName: "wrap", publicName: "wrap", isSignal: true, isRequired: false, transformFunction: null }, inline: { classPropertyName: "inline", publicName: "inline", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.gap": "g()", "style.align-items": "a()", "style.justify-content": "j()", "style.flex-wrap": "wrap() ? \"wrap\" : \"nowrap\"", "class.is-inline": "inline()" }, classAttribute: "poad-cluster" }, ngImport: i0, template: `<ng-content />`, isInline: true, styles: [":host{display:flex;min-width:0}:host(.is-inline){display:inline-flex}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
5561
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.20", type: PoadClusterComponent, isStandalone: true, selector: "poad-cluster", inputs: { gap: { classPropertyName: "gap", publicName: "gap", isSignal: true, isRequired: false, transformFunction: null }, align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null }, justify: { classPropertyName: "justify", publicName: "justify", isSignal: true, isRequired: false, transformFunction: null }, wrap: { classPropertyName: "wrap", publicName: "wrap", isSignal: true, isRequired: false, transformFunction: null }, inline: { classPropertyName: "inline", publicName: "inline", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.gap": "s().gap", "style.align-items": "s().alignItems", "style.justify-content": "s().justifyContent", "style.flex-wrap": "s().flexWrap", "class.is-inline": "inline()" }, classAttribute: "poad-cluster" }, ngImport: i0, template: `<ng-content />`, isInline: true, styles: [".poad-stack{display:flex;flex-direction:column;min-width:0}.poad-stack.is-inline{display:inline-flex}.poad-stack>*{min-width:0}.poad-cluster{display:flex;min-width:0}.poad-cluster.is-inline{display:inline-flex}.poad-grid{display:grid;min-width:0}.poad-grid>*{min-width:0}.poad-split{display:grid;min-width:0}.poad-split>*{min-width:0}.poad-sidebar{display:flex;flex-wrap:wrap;min-width:0}.poad-sidebar>*{flex-basis:0;flex-grow:999;min-inline-size:var(--poad-sb-min, 60%);min-width:0}.poad-sidebar>.poad-sidebar__panel{flex-basis:var(--poad-sb-w, 280px);flex-grow:1;min-inline-size:0}.poad-sidebar.side-left>.poad-sidebar__panel{order:-1}.poad-sidebar.is-collapsed>*{flex-basis:100%!important;min-inline-size:0!important}.poad-center{display:block;box-sizing:content-box;margin-inline:auto;min-width:0}.poad-center.and-text{text-align:center}.poad-center.is-intrinsic{display:flex;flex-direction:column;align-items:center}.poad-container{display:block;margin-inline:auto;width:100%;box-sizing:border-box;min-width:0}.poad-spacer{display:block}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
5561
5562
  }
5562
5563
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: PoadClusterComponent, decorators: [{
5563
5564
  type: Component,
5564
- args: [{ selector: 'poad-cluster', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'poad-cluster', '[style.gap]': 'g()', '[style.align-items]': 'a()', '[style.justify-content]': 'j()', '[style.flex-wrap]': 'wrap() ? "wrap" : "nowrap"', '[class.is-inline]': 'inline()' }, template: `<ng-content />`, styles: [":host{display:flex;min-width:0}:host(.is-inline){display:inline-flex}\n"] }]
5565
+ args: [{ selector: 'poad-cluster', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'poad-cluster', '[style.gap]': 's().gap', '[style.align-items]': 's().alignItems', '[style.justify-content]': 's().justifyContent', '[style.flex-wrap]': 's().flexWrap', '[class.is-inline]': 'inline()' }, template: `<ng-content />`, encapsulation: ViewEncapsulation.None, styles: [".poad-stack{display:flex;flex-direction:column;min-width:0}.poad-stack.is-inline{display:inline-flex}.poad-stack>*{min-width:0}.poad-cluster{display:flex;min-width:0}.poad-cluster.is-inline{display:inline-flex}.poad-grid{display:grid;min-width:0}.poad-grid>*{min-width:0}.poad-split{display:grid;min-width:0}.poad-split>*{min-width:0}.poad-sidebar{display:flex;flex-wrap:wrap;min-width:0}.poad-sidebar>*{flex-basis:0;flex-grow:999;min-inline-size:var(--poad-sb-min, 60%);min-width:0}.poad-sidebar>.poad-sidebar__panel{flex-basis:var(--poad-sb-w, 280px);flex-grow:1;min-inline-size:0}.poad-sidebar.side-left>.poad-sidebar__panel{order:-1}.poad-sidebar.is-collapsed>*{flex-basis:100%!important;min-inline-size:0!important}.poad-center{display:block;box-sizing:content-box;margin-inline:auto;min-width:0}.poad-center.and-text{text-align:center}.poad-center.is-intrinsic{display:flex;flex-direction:column;align-items:center}.poad-container{display:block;margin-inline:auto;width:100%;box-sizing:border-box;min-width:0}.poad-spacer{display:block}\n"] }]
5565
5566
  }], propDecorators: { gap: [{ type: i0.Input, args: [{ isSignal: true, alias: "gap", required: false }] }], align: [{ type: i0.Input, args: [{ isSignal: true, alias: "align", required: false }] }], justify: [{ type: i0.Input, args: [{ isSignal: true, alias: "justify", required: false }] }], wrap: [{ type: i0.Input, args: [{ isSignal: true, alias: "wrap", required: false }] }], inline: [{ type: i0.Input, args: [{ isSignal: true, alias: "inline", required: false }] }] } });
5566
5567
  /**
5567
5568
  * Grille responsive : `<poad-grid cols="1 sm:2 lg:4" gap="md">` (breakpoints FENÊTRE, mobile-first)
5568
5569
  * ou `<poad-grid min="220px">` (auto-fit : autant de colonnes que le CONTENEUR en accepte — préférer pour les composants).
5569
5570
  * Enfant : `<div poadCol="2">` / `poadCol="1 md:2"` = span, `poadCol="full"` = toute la largeur.
5571
+ * Style : `@poadio/ui-core/layout.css` ; valeurs de `gridStyle` / `gridColumn` (ui-core).
5570
5572
  *
5571
5573
  * CONTENEUR D'ATELIER en régime `direct`, et non `flux` (27/08) : en flux, l'atelier
5572
5574
  * envelopperait les enfants dans SA propre grille 12 colonnes, la grille posée n'aurait
@@ -5575,31 +5577,38 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImpo
5575
5577
  * bien `cols` / `min` qui les place, ce qu'on vient chercher en posant une grille.
5576
5578
  * Aucune trappe d'accueil n'est nécessaire ici : `poad-grid` ne fait ni requête de
5577
5579
  * contenu ni injection depuis ses enfants, il ne les REGARDE pas, il les dispose.
5580
+ * @slot default Les cellules (`poadCol` pour en occuper plusieurs).
5578
5581
  * @atelier icone=grid conteneur=direct largeur=12 hauteur=4
5579
5582
  */
5583
+ // `row-gap` toujours posé (à `gap` sans `rowGap`) : le retirer après `gap` effacerait la moitié du raccourci.
5580
5584
  class PoadGridComponent {
5585
+ bp = inject(PoadBreakpointService);
5586
+ /** Nombre de colonnes, responsive au point de rupture de la fenêtre : `"1 sm:2 lg:4"`. */
5581
5587
  cols = input('1', ...(ngDevMode ? [{ debugName: "cols" }] : /* istanbul ignore next */ []));
5588
+ /** Largeur minimale d'une colonne : grille « auto-fit » à la largeur du conteneur (`cols` ignoré). */
5582
5589
  min = input('', ...(ngDevMode ? [{ debugName: "min" }] : /* istanbul ignore next */ []));
5590
+ /** Écart entre les cellules : `xs` … `xl`, `none`, ou une longueur CSS. */
5583
5591
  gap = input('md', ...(ngDevMode ? [{ debugName: "gap" }] : /* istanbul ignore next */ []));
5592
+ /** Écart entre les lignes, s'il diffère de `gap`. */
5584
5593
  rowGap = input('', ...(ngDevMode ? [{ debugName: "rowGap" }] : /* istanbul ignore next */ []));
5594
+ /** Alignement vertical des cellules. */
5585
5595
  align = input('stretch', ...(ngDevMode ? [{ debugName: "align" }] : /* istanbul ignore next */ []));
5596
+ /** Remplissage « dense » : les cellules suivantes comblent les trous. */
5586
5597
  dense = input(false, { ...(ngDevMode ? { debugName: "dense" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
5587
- c = poadResponsive(this.cols);
5588
- tpl = computed(() => this.min() ? `repeat(auto-fit, minmax(min(${this.min()}, 100%), 1fr))` : `repeat(${this.c() ?? 1}, minmax(0, 1fr))`, ...(ngDevMode ? [{ debugName: "tpl" }] : /* istanbul ignore next */ []));
5589
- g = computed(() => poadGap(this.gap()), ...(ngDevMode ? [{ debugName: "g" }] : /* istanbul ignore next */ []));
5590
- rg = computed(() => this.rowGap() ? poadGap(this.rowGap()) : null, ...(ngDevMode ? [{ debugName: "rg" }] : /* istanbul ignore next */ []));
5591
- a = computed(() => A$1[this.align()], ...(ngDevMode ? [{ debugName: "a" }] : /* istanbul ignore next */ []));
5598
+ s = computed(() => gridStyle({ cols: this.cols(), min: this.min(), gap: this.gap(), rowGap: this.rowGap(), align: this.align(), dense: this.dense() }, this.bp.current()), ...(ngDevMode ? [{ debugName: "s" }] : /* istanbul ignore next */ []));
5592
5599
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: PoadGridComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
5593
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.20", type: PoadGridComponent, isStandalone: true, selector: "poad-grid", inputs: { cols: { classPropertyName: "cols", publicName: "cols", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, gap: { classPropertyName: "gap", publicName: "gap", isSignal: true, isRequired: false, transformFunction: null }, rowGap: { classPropertyName: "rowGap", publicName: "rowGap", isSignal: true, isRequired: false, transformFunction: null }, align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null }, dense: { classPropertyName: "dense", publicName: "dense", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.grid-template-columns": "tpl()", "style.gap": "g()", "style.row-gap": "rg()", "style.align-items": "a()", "style.grid-auto-flow": "dense() ? \"row dense\" : null" }, classAttribute: "poad-grid" }, ngImport: i0, template: `<ng-content />`, isInline: true, styles: [":host{display:grid;min-width:0}:host ::ng-deep>*{min-width:0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
5600
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.20", type: PoadGridComponent, isStandalone: true, selector: "poad-grid", inputs: { cols: { classPropertyName: "cols", publicName: "cols", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, gap: { classPropertyName: "gap", publicName: "gap", isSignal: true, isRequired: false, transformFunction: null }, rowGap: { classPropertyName: "rowGap", publicName: "rowGap", isSignal: true, isRequired: false, transformFunction: null }, align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null }, dense: { classPropertyName: "dense", publicName: "dense", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.grid-template-columns": "s().gridTemplateColumns", "style.gap": "s().gap", "style.row-gap": "s().rowGap ?? s().gap", "style.align-items": "s().alignItems", "style.grid-auto-flow": "s().gridAutoFlow ?? null" }, classAttribute: "poad-grid" }, ngImport: i0, template: `<ng-content />`, isInline: true, styles: [".poad-stack{display:flex;flex-direction:column;min-width:0}.poad-stack.is-inline{display:inline-flex}.poad-stack>*{min-width:0}.poad-cluster{display:flex;min-width:0}.poad-cluster.is-inline{display:inline-flex}.poad-grid{display:grid;min-width:0}.poad-grid>*{min-width:0}.poad-split{display:grid;min-width:0}.poad-split>*{min-width:0}.poad-sidebar{display:flex;flex-wrap:wrap;min-width:0}.poad-sidebar>*{flex-basis:0;flex-grow:999;min-inline-size:var(--poad-sb-min, 60%);min-width:0}.poad-sidebar>.poad-sidebar__panel{flex-basis:var(--poad-sb-w, 280px);flex-grow:1;min-inline-size:0}.poad-sidebar.side-left>.poad-sidebar__panel{order:-1}.poad-sidebar.is-collapsed>*{flex-basis:100%!important;min-inline-size:0!important}.poad-center{display:block;box-sizing:content-box;margin-inline:auto;min-width:0}.poad-center.and-text{text-align:center}.poad-center.is-intrinsic{display:flex;flex-direction:column;align-items:center}.poad-container{display:block;margin-inline:auto;width:100%;box-sizing:border-box;min-width:0}.poad-spacer{display:block}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
5594
5601
  }
5595
5602
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: PoadGridComponent, decorators: [{
5596
5603
  type: Component,
5597
- args: [{ selector: 'poad-grid', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'poad-grid', '[style.grid-template-columns]': 'tpl()', '[style.gap]': 'g()', '[style.row-gap]': 'rg()', '[style.align-items]': 'a()', '[style.grid-auto-flow]': 'dense() ? "row dense" : null' }, template: `<ng-content />`, styles: [":host{display:grid;min-width:0}:host ::ng-deep>*{min-width:0}\n"] }]
5604
+ args: [{ selector: 'poad-grid', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'poad-grid', '[style.grid-template-columns]': 's().gridTemplateColumns', '[style.gap]': 's().gap', '[style.row-gap]': 's().rowGap ?? s().gap', '[style.align-items]': 's().alignItems', '[style.grid-auto-flow]': 's().gridAutoFlow ?? null' }, template: `<ng-content />`, encapsulation: ViewEncapsulation.None, styles: [".poad-stack{display:flex;flex-direction:column;min-width:0}.poad-stack.is-inline{display:inline-flex}.poad-stack>*{min-width:0}.poad-cluster{display:flex;min-width:0}.poad-cluster.is-inline{display:inline-flex}.poad-grid{display:grid;min-width:0}.poad-grid>*{min-width:0}.poad-split{display:grid;min-width:0}.poad-split>*{min-width:0}.poad-sidebar{display:flex;flex-wrap:wrap;min-width:0}.poad-sidebar>*{flex-basis:0;flex-grow:999;min-inline-size:var(--poad-sb-min, 60%);min-width:0}.poad-sidebar>.poad-sidebar__panel{flex-basis:var(--poad-sb-w, 280px);flex-grow:1;min-inline-size:0}.poad-sidebar.side-left>.poad-sidebar__panel{order:-1}.poad-sidebar.is-collapsed>*{flex-basis:100%!important;min-inline-size:0!important}.poad-center{display:block;box-sizing:content-box;margin-inline:auto;min-width:0}.poad-center.and-text{text-align:center}.poad-center.is-intrinsic{display:flex;flex-direction:column;align-items:center}.poad-container{display:block;margin-inline:auto;width:100%;box-sizing:border-box;min-width:0}.poad-spacer{display:block}\n"] }]
5598
5605
  }], propDecorators: { cols: [{ type: i0.Input, args: [{ isSignal: true, alias: "cols", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], gap: [{ type: i0.Input, args: [{ isSignal: true, alias: "gap", required: false }] }], rowGap: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowGap", required: false }] }], align: [{ type: i0.Input, args: [{ isSignal: true, alias: "align", required: false }] }], dense: [{ type: i0.Input, args: [{ isSignal: true, alias: "dense", required: false }] }] } });
5606
+ /** Colonne d'une grille : `<div poadCol="2">`, `poadCol="1 md:2"` (responsive), `poadCol="full"` (toute la largeur). */
5599
5607
  class PoadColDirective {
5608
+ bp = inject(PoadBreakpointService);
5609
+ /** Colonnes occupées : un nombre, `full`, responsive (`"1 md:2"`), ou une valeur `grid-column` sans espace (`2/4`). */
5600
5610
  poadCol = input('1', ...(ngDevMode ? [{ debugName: "poadCol" }] : /* istanbul ignore next */ []));
5601
- v = poadResponsive(this.poadCol);
5602
- span = computed(() => { const s = this.v() ?? '1'; return s === 'full' ? '1 / -1' : /^\d+$/.test(s) ? `span ${s}` : s; }, ...(ngDevMode ? [{ debugName: "span" }] : /* istanbul ignore next */ []));
5611
+ span = computed(() => gridColumn(this.poadCol(), this.bp.current()), ...(ngDevMode ? [{ debugName: "span" }] : /* istanbul ignore next */ []));
5603
5612
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: PoadColDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
5604
5613
  static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.20", type: PoadColDirective, isStandalone: true, selector: "[poadCol]", inputs: { poadCol: { classPropertyName: "poadCol", publicName: "poadCol", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.grid-column": "span()" } }, ngImport: i0 });
5605
5614
  }
@@ -5609,24 +5618,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImpo
5609
5618
  }], propDecorators: { poadCol: [{ type: i0.Input, args: [{ isSignal: true, alias: "poadCol", required: false }] }] } });
5610
5619
  /**
5611
5620
  * Deux zones : `<poad-split ratio="1fr auto" gap="md" stackAt="md">` — sous `stackAt`, empilé.
5621
+ * Style : `@poadio/ui-core/layout.css` ; valeurs de `splitStyle` (ui-core).
5622
+ * @slot default Les deux zones.
5612
5623
  * @atelier icone=split-square-horizontal
5613
5624
  */
5614
5625
  class PoadSplitComponent {
5615
5626
  bp = inject(PoadBreakpointService);
5627
+ /** Gabarit des deux colonnes (`grid-template-columns`). */
5616
5628
  ratio = input('1fr 1fr', ...(ngDevMode ? [{ debugName: "ratio" }] : /* istanbul ignore next */ []));
5629
+ /** Écart entre les zones : `xs` … `xl`, `none`, ou une longueur CSS. */
5617
5630
  gap = input('md', ...(ngDevMode ? [{ debugName: "gap" }] : /* istanbul ignore next */ []));
5631
+ /** Alignement vertical des zones. */
5618
5632
  align = input('stretch', ...(ngDevMode ? [{ debugName: "align" }] : /* istanbul ignore next */ []));
5619
5633
  /** En dessous de ce breakpoint fenêtre, une seule colonne ('' = jamais). */
5620
5634
  stackAt = input('sm', ...(ngDevMode ? [{ debugName: "stackAt" }] : /* istanbul ignore next */ []));
5621
- tpl = computed(() => (this.stackAt() && this.bp.down(this.stackAt())) ? '1fr' : this.ratio(), ...(ngDevMode ? [{ debugName: "tpl" }] : /* istanbul ignore next */ []));
5622
- g = computed(() => poadGap(this.gap()), ...(ngDevMode ? [{ debugName: "g" }] : /* istanbul ignore next */ []));
5623
- a = computed(() => A$1[this.align()], ...(ngDevMode ? [{ debugName: "a" }] : /* istanbul ignore next */ []));
5635
+ s = computed(() => splitStyle({ ratio: this.ratio(), gap: this.gap(), align: this.align(), stackAt: this.stackAt() }, this.bp.current()), ...(ngDevMode ? [{ debugName: "s" }] : /* istanbul ignore next */ []));
5624
5636
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: PoadSplitComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
5625
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.20", type: PoadSplitComponent, isStandalone: true, selector: "poad-split", inputs: { ratio: { classPropertyName: "ratio", publicName: "ratio", isSignal: true, isRequired: false, transformFunction: null }, gap: { classPropertyName: "gap", publicName: "gap", isSignal: true, isRequired: false, transformFunction: null }, align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null }, stackAt: { classPropertyName: "stackAt", publicName: "stackAt", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.grid-template-columns": "tpl()", "style.gap": "g()", "style.align-items": "a()" }, classAttribute: "poad-split" }, ngImport: i0, template: `<ng-content />`, isInline: true, styles: [":host{display:grid;min-width:0}:host ::ng-deep>*{min-width:0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
5637
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.20", type: PoadSplitComponent, isStandalone: true, selector: "poad-split", inputs: { ratio: { classPropertyName: "ratio", publicName: "ratio", isSignal: true, isRequired: false, transformFunction: null }, gap: { classPropertyName: "gap", publicName: "gap", isSignal: true, isRequired: false, transformFunction: null }, align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null }, stackAt: { classPropertyName: "stackAt", publicName: "stackAt", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.grid-template-columns": "s().gridTemplateColumns", "style.gap": "s().gap", "style.align-items": "s().alignItems" }, classAttribute: "poad-split" }, ngImport: i0, template: `<ng-content />`, isInline: true, styles: [".poad-stack{display:flex;flex-direction:column;min-width:0}.poad-stack.is-inline{display:inline-flex}.poad-stack>*{min-width:0}.poad-cluster{display:flex;min-width:0}.poad-cluster.is-inline{display:inline-flex}.poad-grid{display:grid;min-width:0}.poad-grid>*{min-width:0}.poad-split{display:grid;min-width:0}.poad-split>*{min-width:0}.poad-sidebar{display:flex;flex-wrap:wrap;min-width:0}.poad-sidebar>*{flex-basis:0;flex-grow:999;min-inline-size:var(--poad-sb-min, 60%);min-width:0}.poad-sidebar>.poad-sidebar__panel{flex-basis:var(--poad-sb-w, 280px);flex-grow:1;min-inline-size:0}.poad-sidebar.side-left>.poad-sidebar__panel{order:-1}.poad-sidebar.is-collapsed>*{flex-basis:100%!important;min-inline-size:0!important}.poad-center{display:block;box-sizing:content-box;margin-inline:auto;min-width:0}.poad-center.and-text{text-align:center}.poad-center.is-intrinsic{display:flex;flex-direction:column;align-items:center}.poad-container{display:block;margin-inline:auto;width:100%;box-sizing:border-box;min-width:0}.poad-spacer{display:block}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
5626
5638
  }
5627
5639
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: PoadSplitComponent, decorators: [{
5628
5640
  type: Component,
5629
- args: [{ selector: 'poad-split', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'poad-split', '[style.grid-template-columns]': 'tpl()', '[style.gap]': 'g()', '[style.align-items]': 'a()' }, template: `<ng-content />`, styles: [":host{display:grid;min-width:0}:host ::ng-deep>*{min-width:0}\n"] }]
5641
+ args: [{ selector: 'poad-split', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'poad-split', '[style.grid-template-columns]': 's().gridTemplateColumns', '[style.gap]': 's().gap', '[style.align-items]': 's().alignItems' }, template: `<ng-content />`, encapsulation: ViewEncapsulation.None, styles: [".poad-stack{display:flex;flex-direction:column;min-width:0}.poad-stack.is-inline{display:inline-flex}.poad-stack>*{min-width:0}.poad-cluster{display:flex;min-width:0}.poad-cluster.is-inline{display:inline-flex}.poad-grid{display:grid;min-width:0}.poad-grid>*{min-width:0}.poad-split{display:grid;min-width:0}.poad-split>*{min-width:0}.poad-sidebar{display:flex;flex-wrap:wrap;min-width:0}.poad-sidebar>*{flex-basis:0;flex-grow:999;min-inline-size:var(--poad-sb-min, 60%);min-width:0}.poad-sidebar>.poad-sidebar__panel{flex-basis:var(--poad-sb-w, 280px);flex-grow:1;min-inline-size:0}.poad-sidebar.side-left>.poad-sidebar__panel{order:-1}.poad-sidebar.is-collapsed>*{flex-basis:100%!important;min-inline-size:0!important}.poad-center{display:block;box-sizing:content-box;margin-inline:auto;min-width:0}.poad-center.and-text{text-align:center}.poad-center.is-intrinsic{display:flex;flex-direction:column;align-items:center}.poad-container{display:block;margin-inline:auto;width:100%;box-sizing:border-box;min-width:0}.poad-spacer{display:block}\n"] }]
5630
5642
  }], propDecorators: { ratio: [{ type: i0.Input, args: [{ isSignal: true, alias: "ratio", required: false }] }], gap: [{ type: i0.Input, args: [{ isSignal: true, alias: "gap", required: false }] }], align: [{ type: i0.Input, args: [{ isSignal: true, alias: "align", required: false }] }], stackAt: [{ type: i0.Input, args: [{ isSignal: true, alias: "stackAt", required: false }] }] } });
5631
5643
  /**
5632
5644
  * Contenu + panneau latéral : `<poad-sidebar side="right" width="280px" contentMin="60%" collapseAt="md">
@@ -5641,56 +5653,79 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImpo
5641
5653
  type: Directive,
5642
5654
  args: [{ selector: '[poadSidebarPanel]', standalone: true, host: { class: 'poad-sidebar__panel' } }]
5643
5655
  }] });
5644
- /** @atelier icone=panel-left */
5656
+ /**
5657
+ * Contenu et panneau latéral (le panneau : `[poadSidebarPanel]`). Style : `@poadio/ui-core/layout.css` ; valeurs de
5658
+ * `sidebarStyle` / `sidebarCollapsed` (ui-core).
5659
+ * @slot default Le contenu et le panneau.
5660
+ * @atelier icone=panel-left
5661
+ */
5645
5662
  class PoadSidebarComponent {
5646
5663
  bp = inject(PoadBreakpointService);
5664
+ /** Côté du panneau. */
5647
5665
  side = input('right', ...(ngDevMode ? [{ debugName: "side" }] : /* istanbul ignore next */ []));
5666
+ /** Largeur du panneau. */
5648
5667
  width = input('280px', ...(ngDevMode ? [{ debugName: "width" }] : /* istanbul ignore next */ []));
5668
+ /** Largeur minimale du contenu : en dessous, le panneau passe dessous. */
5649
5669
  contentMin = input('60%', ...(ngDevMode ? [{ debugName: "contentMin" }] : /* istanbul ignore next */ []));
5670
+ /** Écart entre le contenu et le panneau : `xs` … `xl`, `none`, ou une longueur CSS. */
5650
5671
  gap = input('md', ...(ngDevMode ? [{ debugName: "gap" }] : /* istanbul ignore next */ []));
5672
+ /** Alignement vertical du contenu et du panneau. */
5651
5673
  align = input('stretch', ...(ngDevMode ? [{ debugName: "align" }] : /* istanbul ignore next */ []));
5674
+ /** En dessous de ce breakpoint fenêtre, toujours empilés ('' = seulement faute de place). */
5652
5675
  collapseAt = input('', ...(ngDevMode ? [{ debugName: "collapseAt" }] : /* istanbul ignore next */ []));
5653
- collapsed = computed(() => !!this.collapseAt() && this.bp.down(this.collapseAt()), ...(ngDevMode ? [{ debugName: "collapsed" }] : /* istanbul ignore next */ []));
5654
- g = computed(() => poadGap(this.gap()), ...(ngDevMode ? [{ debugName: "g" }] : /* istanbul ignore next */ []));
5655
- a = computed(() => A$1[this.align()], ...(ngDevMode ? [{ debugName: "a" }] : /* istanbul ignore next */ []));
5676
+ collapsed = computed(() => sidebarCollapsed(this.collapseAt(), this.bp.current()), ...(ngDevMode ? [{ debugName: "collapsed" }] : /* istanbul ignore next */ []));
5677
+ s = computed(() => sidebarStyle({ width: this.width(), contentMin: this.contentMin(), gap: this.gap(), align: this.align() }), ...(ngDevMode ? [{ debugName: "s" }] : /* istanbul ignore next */ []));
5656
5678
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: PoadSidebarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
5657
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.20", type: PoadSidebarComponent, isStandalone: true, selector: "poad-sidebar", inputs: { side: { classPropertyName: "side", publicName: "side", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, contentMin: { classPropertyName: "contentMin", publicName: "contentMin", isSignal: true, isRequired: false, transformFunction: null }, gap: { classPropertyName: "gap", publicName: "gap", isSignal: true, isRequired: false, transformFunction: null }, align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null }, collapseAt: { classPropertyName: "collapseAt", publicName: "collapseAt", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.gap": "g()", "class.side-left": "side() === \"left\"", "class.is-collapsed": "collapsed()", "style.--poad-sb-w": "width()", "style.--poad-sb-min": "contentMin()", "style.align-items": "a()" }, classAttribute: "poad-sidebar" }, ngImport: i0, template: `<ng-content />`, isInline: true, styles: [":host{display:flex;flex-wrap:wrap;min-width:0}:host ::ng-deep>*{flex-basis:0;flex-grow:999;min-inline-size:var(--poad-sb-min, 60%);min-width:0}:host ::ng-deep>.poad-sidebar__panel{flex-basis:var(--poad-sb-w, 280px);flex-grow:1;min-inline-size:0}:host(.side-left) ::ng-deep>.poad-sidebar__panel{order:-1}:host(.is-collapsed) ::ng-deep>*{flex-basis:100%!important;min-inline-size:0!important}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
5679
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.20", type: PoadSidebarComponent, isStandalone: true, selector: "poad-sidebar", inputs: { side: { classPropertyName: "side", publicName: "side", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, contentMin: { classPropertyName: "contentMin", publicName: "contentMin", isSignal: true, isRequired: false, transformFunction: null }, gap: { classPropertyName: "gap", publicName: "gap", isSignal: true, isRequired: false, transformFunction: null }, align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null }, collapseAt: { classPropertyName: "collapseAt", publicName: "collapseAt", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.gap": "s().gap", "class.side-left": "side() === \"left\"", "class.is-collapsed": "collapsed()", "style.--poad-sb-w": "s()[\"--poad-sb-w\"]", "style.--poad-sb-min": "s()[\"--poad-sb-min\"]", "style.align-items": "s().alignItems" }, classAttribute: "poad-sidebar" }, ngImport: i0, template: `<ng-content />`, isInline: true, styles: [".poad-stack{display:flex;flex-direction:column;min-width:0}.poad-stack.is-inline{display:inline-flex}.poad-stack>*{min-width:0}.poad-cluster{display:flex;min-width:0}.poad-cluster.is-inline{display:inline-flex}.poad-grid{display:grid;min-width:0}.poad-grid>*{min-width:0}.poad-split{display:grid;min-width:0}.poad-split>*{min-width:0}.poad-sidebar{display:flex;flex-wrap:wrap;min-width:0}.poad-sidebar>*{flex-basis:0;flex-grow:999;min-inline-size:var(--poad-sb-min, 60%);min-width:0}.poad-sidebar>.poad-sidebar__panel{flex-basis:var(--poad-sb-w, 280px);flex-grow:1;min-inline-size:0}.poad-sidebar.side-left>.poad-sidebar__panel{order:-1}.poad-sidebar.is-collapsed>*{flex-basis:100%!important;min-inline-size:0!important}.poad-center{display:block;box-sizing:content-box;margin-inline:auto;min-width:0}.poad-center.and-text{text-align:center}.poad-center.is-intrinsic{display:flex;flex-direction:column;align-items:center}.poad-container{display:block;margin-inline:auto;width:100%;box-sizing:border-box;min-width:0}.poad-spacer{display:block}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
5658
5680
  }
5659
5681
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: PoadSidebarComponent, decorators: [{
5660
5682
  type: Component,
5661
- args: [{ selector: 'poad-sidebar', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'poad-sidebar', '[style.gap]': 'g()', '[class.side-left]': 'side() === "left"', '[class.is-collapsed]': 'collapsed()', '[style.--poad-sb-w]': 'width()', '[style.--poad-sb-min]': 'contentMin()', '[style.align-items]': 'a()' }, template: `<ng-content />`, styles: [":host{display:flex;flex-wrap:wrap;min-width:0}:host ::ng-deep>*{flex-basis:0;flex-grow:999;min-inline-size:var(--poad-sb-min, 60%);min-width:0}:host ::ng-deep>.poad-sidebar__panel{flex-basis:var(--poad-sb-w, 280px);flex-grow:1;min-inline-size:0}:host(.side-left) ::ng-deep>.poad-sidebar__panel{order:-1}:host(.is-collapsed) ::ng-deep>*{flex-basis:100%!important;min-inline-size:0!important}\n"] }]
5683
+ args: [{ selector: 'poad-sidebar', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, host: {
5684
+ class: 'poad-sidebar', '[style.gap]': 's().gap', '[class.side-left]': 'side() === "left"', '[class.is-collapsed]': 'collapsed()',
5685
+ '[style.--poad-sb-w]': 's()["--poad-sb-w"]', '[style.--poad-sb-min]': 's()["--poad-sb-min"]', '[style.align-items]': 's().alignItems',
5686
+ }, template: `<ng-content />`, encapsulation: ViewEncapsulation.None, styles: [".poad-stack{display:flex;flex-direction:column;min-width:0}.poad-stack.is-inline{display:inline-flex}.poad-stack>*{min-width:0}.poad-cluster{display:flex;min-width:0}.poad-cluster.is-inline{display:inline-flex}.poad-grid{display:grid;min-width:0}.poad-grid>*{min-width:0}.poad-split{display:grid;min-width:0}.poad-split>*{min-width:0}.poad-sidebar{display:flex;flex-wrap:wrap;min-width:0}.poad-sidebar>*{flex-basis:0;flex-grow:999;min-inline-size:var(--poad-sb-min, 60%);min-width:0}.poad-sidebar>.poad-sidebar__panel{flex-basis:var(--poad-sb-w, 280px);flex-grow:1;min-inline-size:0}.poad-sidebar.side-left>.poad-sidebar__panel{order:-1}.poad-sidebar.is-collapsed>*{flex-basis:100%!important;min-inline-size:0!important}.poad-center{display:block;box-sizing:content-box;margin-inline:auto;min-width:0}.poad-center.and-text{text-align:center}.poad-center.is-intrinsic{display:flex;flex-direction:column;align-items:center}.poad-container{display:block;margin-inline:auto;width:100%;box-sizing:border-box;min-width:0}.poad-spacer{display:block}\n"] }]
5662
5687
  }], propDecorators: { side: [{ type: i0.Input, args: [{ isSignal: true, alias: "side", required: false }] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: false }] }], contentMin: [{ type: i0.Input, args: [{ isSignal: true, alias: "contentMin", required: false }] }], gap: [{ type: i0.Input, args: [{ isSignal: true, alias: "gap", required: false }] }], align: [{ type: i0.Input, args: [{ isSignal: true, alias: "align", required: false }] }], collapseAt: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapseAt", required: false }] }] } });
5663
5688
  /**
5664
5689
  * Centre horizontalement avec largeur max : `<poad-center maxWidth="60ch" [gutters]="'16px'" andText>`
5690
+ * Style : `@poadio/ui-core/layout.css` ; valeurs de `centerStyle` (ui-core).
5691
+ * @slot default Le contenu centré.
5665
5692
  * @atelier icone=crosshair
5666
5693
  */
5667
5694
  class PoadCenterComponent {
5695
+ /** Largeur maximale du contenu. */
5668
5696
  maxWidth = input('60ch', ...(ngDevMode ? [{ debugName: "maxWidth" }] : /* istanbul ignore next */ []));
5697
+ /** Marges intérieures latérales (longueur CSS). */
5669
5698
  gutters = input('', ...(ngDevMode ? [{ debugName: "gutters" }] : /* istanbul ignore next */ []));
5699
+ /** Centre aussi le texte. */
5670
5700
  andText = input(false, { ...(ngDevMode ? { debugName: "andText" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
5701
+ /** Centre les enfants à leur largeur propre (colonne flex centrée). */
5671
5702
  intrinsic = input(false, { ...(ngDevMode ? { debugName: "intrinsic" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
5703
+ s = computed(() => centerStyle({ maxWidth: this.maxWidth(), gutters: this.gutters() }), ...(ngDevMode ? [{ debugName: "s" }] : /* istanbul ignore next */ []));
5672
5704
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: PoadCenterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
5673
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.20", type: PoadCenterComponent, isStandalone: true, selector: "poad-center", inputs: { maxWidth: { classPropertyName: "maxWidth", publicName: "maxWidth", isSignal: true, isRequired: false, transformFunction: null }, gutters: { classPropertyName: "gutters", publicName: "gutters", isSignal: true, isRequired: false, transformFunction: null }, andText: { classPropertyName: "andText", publicName: "andText", isSignal: true, isRequired: false, transformFunction: null }, intrinsic: { classPropertyName: "intrinsic", publicName: "intrinsic", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.max-inline-size": "maxWidth()", "style.padding-inline": "gutters() || null", "class.and-text": "andText()", "class.is-intrinsic": "intrinsic()" }, classAttribute: "poad-center" }, ngImport: i0, template: `<ng-content />`, isInline: true, styles: [":host{display:block;box-sizing:content-box;margin-inline:auto;min-width:0}:host(.and-text){text-align:center}:host(.is-intrinsic){display:flex;flex-direction:column;align-items:center}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
5705
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.20", type: PoadCenterComponent, isStandalone: true, selector: "poad-center", inputs: { maxWidth: { classPropertyName: "maxWidth", publicName: "maxWidth", isSignal: true, isRequired: false, transformFunction: null }, gutters: { classPropertyName: "gutters", publicName: "gutters", isSignal: true, isRequired: false, transformFunction: null }, andText: { classPropertyName: "andText", publicName: "andText", isSignal: true, isRequired: false, transformFunction: null }, intrinsic: { classPropertyName: "intrinsic", publicName: "intrinsic", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.max-inline-size": "s().maxInlineSize", "style.padding-inline": "s().paddingInline ?? null", "class.and-text": "andText()", "class.is-intrinsic": "intrinsic()" }, classAttribute: "poad-center" }, ngImport: i0, template: `<ng-content />`, isInline: true, styles: [".poad-stack{display:flex;flex-direction:column;min-width:0}.poad-stack.is-inline{display:inline-flex}.poad-stack>*{min-width:0}.poad-cluster{display:flex;min-width:0}.poad-cluster.is-inline{display:inline-flex}.poad-grid{display:grid;min-width:0}.poad-grid>*{min-width:0}.poad-split{display:grid;min-width:0}.poad-split>*{min-width:0}.poad-sidebar{display:flex;flex-wrap:wrap;min-width:0}.poad-sidebar>*{flex-basis:0;flex-grow:999;min-inline-size:var(--poad-sb-min, 60%);min-width:0}.poad-sidebar>.poad-sidebar__panel{flex-basis:var(--poad-sb-w, 280px);flex-grow:1;min-inline-size:0}.poad-sidebar.side-left>.poad-sidebar__panel{order:-1}.poad-sidebar.is-collapsed>*{flex-basis:100%!important;min-inline-size:0!important}.poad-center{display:block;box-sizing:content-box;margin-inline:auto;min-width:0}.poad-center.and-text{text-align:center}.poad-center.is-intrinsic{display:flex;flex-direction:column;align-items:center}.poad-container{display:block;margin-inline:auto;width:100%;box-sizing:border-box;min-width:0}.poad-spacer{display:block}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
5674
5706
  }
5675
5707
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: PoadCenterComponent, decorators: [{
5676
5708
  type: Component,
5677
- args: [{ selector: 'poad-center', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'poad-center', '[style.max-inline-size]': 'maxWidth()', '[style.padding-inline]': 'gutters() || null', '[class.and-text]': 'andText()', '[class.is-intrinsic]': 'intrinsic()' }, template: `<ng-content />`, styles: [":host{display:block;box-sizing:content-box;margin-inline:auto;min-width:0}:host(.and-text){text-align:center}:host(.is-intrinsic){display:flex;flex-direction:column;align-items:center}\n"] }]
5709
+ args: [{ selector: 'poad-center', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'poad-center', '[style.max-inline-size]': 's().maxInlineSize', '[style.padding-inline]': 's().paddingInline ?? null', '[class.and-text]': 'andText()', '[class.is-intrinsic]': 'intrinsic()' }, template: `<ng-content />`, encapsulation: ViewEncapsulation.None, styles: [".poad-stack{display:flex;flex-direction:column;min-width:0}.poad-stack.is-inline{display:inline-flex}.poad-stack>*{min-width:0}.poad-cluster{display:flex;min-width:0}.poad-cluster.is-inline{display:inline-flex}.poad-grid{display:grid;min-width:0}.poad-grid>*{min-width:0}.poad-split{display:grid;min-width:0}.poad-split>*{min-width:0}.poad-sidebar{display:flex;flex-wrap:wrap;min-width:0}.poad-sidebar>*{flex-basis:0;flex-grow:999;min-inline-size:var(--poad-sb-min, 60%);min-width:0}.poad-sidebar>.poad-sidebar__panel{flex-basis:var(--poad-sb-w, 280px);flex-grow:1;min-inline-size:0}.poad-sidebar.side-left>.poad-sidebar__panel{order:-1}.poad-sidebar.is-collapsed>*{flex-basis:100%!important;min-inline-size:0!important}.poad-center{display:block;box-sizing:content-box;margin-inline:auto;min-width:0}.poad-center.and-text{text-align:center}.poad-center.is-intrinsic{display:flex;flex-direction:column;align-items:center}.poad-container{display:block;margin-inline:auto;width:100%;box-sizing:border-box;min-width:0}.poad-spacer{display:block}\n"] }]
5678
5710
  }], propDecorators: { maxWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxWidth", required: false }] }], gutters: [{ type: i0.Input, args: [{ isSignal: true, alias: "gutters", required: false }] }], andText: [{ type: i0.Input, args: [{ isSignal: true, alias: "andText", required: false }] }], intrinsic: [{ type: i0.Input, args: [{ isSignal: true, alias: "intrinsic", required: false }] }] } });
5679
5711
  /**
5680
5712
  * Conteneur de page : `<poad-container size="lg" padding="md">` — largeur max par taille (sm 640, md 768, lg 1024, xl 1280, 2xl 1536, full = --poad-container-max), centré.
5713
+ * Style : `@poadio/ui-core/layout.css` ; valeurs de `containerStyle` (ui-core).
5714
+ * @slot default Le contenu de la page.
5681
5715
  * @atelier icone=box conteneur=flux largeur=6 hauteur=5
5682
5716
  */
5683
5717
  class PoadContainerComponent {
5718
+ /** Largeur maximale : un point de rupture, ou `full` (`--poad-container-max`). */
5684
5719
  size = input('full', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
5720
+ /** Marges intérieures latérales : `xs` … `xl`, `none`, ou une longueur CSS. */
5685
5721
  padding = input('lg', ...(ngDevMode ? [{ debugName: "padding" }] : /* istanbul ignore next */ []));
5686
- mw = computed(() => this.size() === 'full' ? 'var(--poad-container-max)' : `var(--poad-bp-${this.size()})`, ...(ngDevMode ? [{ debugName: "mw" }] : /* istanbul ignore next */ []));
5687
- p = computed(() => poadGap(this.padding()), ...(ngDevMode ? [{ debugName: "p" }] : /* istanbul ignore next */ []));
5722
+ s = computed(() => containerStyle({ size: this.size(), padding: this.padding() }), ...(ngDevMode ? [{ debugName: "s" }] : /* istanbul ignore next */ []));
5688
5723
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: PoadContainerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
5689
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.20", type: PoadContainerComponent, isStandalone: true, selector: "poad-container", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, padding: { classPropertyName: "padding", publicName: "padding", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.max-width": "mw()", "style.padding-inline": "p()" }, classAttribute: "poad-container" }, ngImport: i0, template: `<ng-content />`, isInline: true, styles: [":host{display:block;margin-inline:auto;width:100%;box-sizing:border-box;min-width:0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
5724
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.20", type: PoadContainerComponent, isStandalone: true, selector: "poad-container", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, padding: { classPropertyName: "padding", publicName: "padding", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.max-width": "s().maxWidth", "style.padding-inline": "s().paddingInline" }, classAttribute: "poad-container" }, ngImport: i0, template: `<ng-content />`, isInline: true, styles: [".poad-stack{display:flex;flex-direction:column;min-width:0}.poad-stack.is-inline{display:inline-flex}.poad-stack>*{min-width:0}.poad-cluster{display:flex;min-width:0}.poad-cluster.is-inline{display:inline-flex}.poad-grid{display:grid;min-width:0}.poad-grid>*{min-width:0}.poad-split{display:grid;min-width:0}.poad-split>*{min-width:0}.poad-sidebar{display:flex;flex-wrap:wrap;min-width:0}.poad-sidebar>*{flex-basis:0;flex-grow:999;min-inline-size:var(--poad-sb-min, 60%);min-width:0}.poad-sidebar>.poad-sidebar__panel{flex-basis:var(--poad-sb-w, 280px);flex-grow:1;min-inline-size:0}.poad-sidebar.side-left>.poad-sidebar__panel{order:-1}.poad-sidebar.is-collapsed>*{flex-basis:100%!important;min-inline-size:0!important}.poad-center{display:block;box-sizing:content-box;margin-inline:auto;min-width:0}.poad-center.and-text{text-align:center}.poad-center.is-intrinsic{display:flex;flex-direction:column;align-items:center}.poad-container{display:block;margin-inline:auto;width:100%;box-sizing:border-box;min-width:0}.poad-spacer{display:block}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
5690
5725
  }
5691
5726
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: PoadContainerComponent, decorators: [{
5692
5727
  type: Component,
5693
- args: [{ selector: 'poad-container', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'poad-container', '[style.max-width]': 'mw()', '[style.padding-inline]': 'p()' }, template: `<ng-content />`, styles: [":host{display:block;margin-inline:auto;width:100%;box-sizing:border-box;min-width:0}\n"] }]
5728
+ args: [{ selector: 'poad-container', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'poad-container', '[style.max-width]': 's().maxWidth', '[style.padding-inline]': 's().paddingInline' }, template: `<ng-content />`, encapsulation: ViewEncapsulation.None, styles: [".poad-stack{display:flex;flex-direction:column;min-width:0}.poad-stack.is-inline{display:inline-flex}.poad-stack>*{min-width:0}.poad-cluster{display:flex;min-width:0}.poad-cluster.is-inline{display:inline-flex}.poad-grid{display:grid;min-width:0}.poad-grid>*{min-width:0}.poad-split{display:grid;min-width:0}.poad-split>*{min-width:0}.poad-sidebar{display:flex;flex-wrap:wrap;min-width:0}.poad-sidebar>*{flex-basis:0;flex-grow:999;min-inline-size:var(--poad-sb-min, 60%);min-width:0}.poad-sidebar>.poad-sidebar__panel{flex-basis:var(--poad-sb-w, 280px);flex-grow:1;min-inline-size:0}.poad-sidebar.side-left>.poad-sidebar__panel{order:-1}.poad-sidebar.is-collapsed>*{flex-basis:100%!important;min-inline-size:0!important}.poad-center{display:block;box-sizing:content-box;margin-inline:auto;min-width:0}.poad-center.and-text{text-align:center}.poad-center.is-intrinsic{display:flex;flex-direction:column;align-items:center}.poad-container{display:block;margin-inline:auto;width:100%;box-sizing:border-box;min-width:0}.poad-spacer{display:block}\n"] }]
5694
5729
  }], propDecorators: { size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], padding: [{ type: i0.Input, args: [{ isSignal: true, alias: "padding", required: false }] }] } });
5695
5730
  /**
5696
5731
  * Espace flexible (pousse ce qui suit) ou fixe : `<poad-spacer/>` · `<poad-spacer size="lg"/>`
@@ -5702,14 +5737,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImpo
5702
5737
  * @atelier icone=move-horizontal surface=aucune
5703
5738
  */
5704
5739
  class PoadSpacerComponent {
5740
+ /** Taille fixe (`xs` … `xl` ou longueur CSS) ; vide : flexible, pousse ce qui suit. */
5705
5741
  size = input('', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
5706
- poadGap = poadGap;
5742
+ s = computed(() => spacerStyle(this.size()), ...(ngDevMode ? [{ debugName: "s" }] : /* istanbul ignore next */ []));
5707
5743
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: PoadSpacerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
5708
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.20", type: PoadSpacerComponent, isStandalone: true, selector: "poad-spacer", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.flex": "size() ? \"none\" : \"1 1 auto\"", "style.width": "size() ? poadGap(size()) : null", "style.height": "size() ? poadGap(size()) : null" }, classAttribute: "poad-spacer" }, ngImport: i0, template: ``, isInline: true, styles: [":host{display:block}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
5744
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.20", type: PoadSpacerComponent, isStandalone: true, selector: "poad-spacer", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.flex": "s().flex", "style.width": "s().width ?? null", "style.height": "s().height ?? null" }, classAttribute: "poad-spacer" }, ngImport: i0, template: ``, isInline: true, styles: [".poad-stack{display:flex;flex-direction:column;min-width:0}.poad-stack.is-inline{display:inline-flex}.poad-stack>*{min-width:0}.poad-cluster{display:flex;min-width:0}.poad-cluster.is-inline{display:inline-flex}.poad-grid{display:grid;min-width:0}.poad-grid>*{min-width:0}.poad-split{display:grid;min-width:0}.poad-split>*{min-width:0}.poad-sidebar{display:flex;flex-wrap:wrap;min-width:0}.poad-sidebar>*{flex-basis:0;flex-grow:999;min-inline-size:var(--poad-sb-min, 60%);min-width:0}.poad-sidebar>.poad-sidebar__panel{flex-basis:var(--poad-sb-w, 280px);flex-grow:1;min-inline-size:0}.poad-sidebar.side-left>.poad-sidebar__panel{order:-1}.poad-sidebar.is-collapsed>*{flex-basis:100%!important;min-inline-size:0!important}.poad-center{display:block;box-sizing:content-box;margin-inline:auto;min-width:0}.poad-center.and-text{text-align:center}.poad-center.is-intrinsic{display:flex;flex-direction:column;align-items:center}.poad-container{display:block;margin-inline:auto;width:100%;box-sizing:border-box;min-width:0}.poad-spacer{display:block}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
5709
5745
  }
5710
5746
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: PoadSpacerComponent, decorators: [{
5711
5747
  type: Component,
5712
- args: [{ selector: 'poad-spacer', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'poad-spacer', '[style.flex]': 'size() ? "none" : "1 1 auto"', '[style.width]': 'size() ? poadGap(size()) : null', '[style.height]': 'size() ? poadGap(size()) : null' }, template: ``, styles: [":host{display:block}\n"] }]
5748
+ args: [{ selector: 'poad-spacer', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'poad-spacer', '[style.flex]': 's().flex', '[style.width]': 's().width ?? null', '[style.height]': 's().height ?? null' }, template: ``, encapsulation: ViewEncapsulation.None, styles: [".poad-stack{display:flex;flex-direction:column;min-width:0}.poad-stack.is-inline{display:inline-flex}.poad-stack>*{min-width:0}.poad-cluster{display:flex;min-width:0}.poad-cluster.is-inline{display:inline-flex}.poad-grid{display:grid;min-width:0}.poad-grid>*{min-width:0}.poad-split{display:grid;min-width:0}.poad-split>*{min-width:0}.poad-sidebar{display:flex;flex-wrap:wrap;min-width:0}.poad-sidebar>*{flex-basis:0;flex-grow:999;min-inline-size:var(--poad-sb-min, 60%);min-width:0}.poad-sidebar>.poad-sidebar__panel{flex-basis:var(--poad-sb-w, 280px);flex-grow:1;min-inline-size:0}.poad-sidebar.side-left>.poad-sidebar__panel{order:-1}.poad-sidebar.is-collapsed>*{flex-basis:100%!important;min-inline-size:0!important}.poad-center{display:block;box-sizing:content-box;margin-inline:auto;min-width:0}.poad-center.and-text{text-align:center}.poad-center.is-intrinsic{display:flex;flex-direction:column;align-items:center}.poad-container{display:block;margin-inline:auto;width:100%;box-sizing:border-box;min-width:0}.poad-spacer{display:block}\n"] }]
5713
5749
  }], propDecorators: { size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }] } });
5714
5750
 
5715
5751
  /**
@@ -5915,20 +5951,26 @@ const POAD_SHELL = new InjectionToken('POAD_SHELL');
5915
5951
  * </poad-app-shell>
5916
5952
  * ```
5917
5953
  *
5918
- * ⚠️ N'ENVELOPPEZ JAMAIS UN EMPLACEMENT DANS UN `@if` (ni `@for`, ni `<ng-template>`).
5954
+ * EMPLACEMENT DANS UN BLOC `@if` / `@for` : UN SEUL ÉLÉMENT RACINE.
5919
5955
  *
5920
5956
  * La projection de contenu est STATIQUE : Angular apparie les nœuds aux sélecteurs de
5921
- * `ng-content` sur la structure déclarée. Un `<header poadShellBar>` placé dans un bloc de
5922
- * flux de contrôle n'est jamais apparié — il tombe dans l'emplacement PAR DÉFAUT, donc dans
5923
- * la zone de CONTENU. Rien ne le signale : ça compile, ça s'affiche, et la barre se met à
5924
- * défiler avec le contenu — exactement le défaut que cette coquille existe pour empêcher.
5925
- * Constaté au navigateur le 22/08/2026 sur le showcase (`.poad-shell__bar` mesurait 0×0).
5957
+ * `ng-content` sur la structure déclarée. Un bloc de flux de contrôle dont l'UNIQUE racine est
5958
+ * l'élément de l'emplacement est apparié comme cet élément (`@if (x) { <header poadShellBar>…</header> }`
5959
+ * va bien dans la barre). Dès que le bloc contient AUTRE CHOSE — un second élément, du texte, un
5960
+ * commentaire HTML —, il n'est plus apparié et tombe dans l'emplacement PAR DÉFAUT, donc dans la
5961
+ * zone de CONTENU. Rien ne le signale : ça compile, ça s'affiche, et la barre se met à défiler
5962
+ * avec le contenu — exactement le défaut que cette coquille existe pour empêcher. Constaté au
5963
+ * navigateur le 22/08/2026 sur le showcase (`.poad-shell__bar` mesurait 0×0). Les deux cas sont
5964
+ * couverts par `poad-app-shell.spec.ts`.
5926
5965
  *
5927
5966
  * ```html
5928
- * <!-- FAUX : la barre atterrit dans le contenu -->
5967
+ * <!-- JUSTE : un seul élément racine dans le bloc -->
5929
5968
  * @if (connecte()) { <header poadShellBar>…</header> }
5930
5969
  *
5931
- * <!-- JUSTE : l'emplacement est toujours rendu, c'est son CONTENU qui varie -->
5970
+ * <!-- FAUX : deux racines, la barre atterrit dans le contenu -->
5971
+ * @if (connecte()) { <header poadShellBar>…</header> <hr /> }
5972
+ *
5973
+ * <!-- LE PLUS SÛR : l'emplacement est toujours rendu, c'est son CONTENU qui varie -->
5932
5974
  * <header poadShellBar [class.est-masque]="!connecte()">…</header>
5933
5975
  * ```
5934
5976
  *
@@ -5952,27 +5994,35 @@ const POAD_SHELL = new InjectionToken('POAD_SHELL');
5952
5994
  * En application autonome (ajoutée à l'écran d'accueil), la page ne passe pas sous la bande
5953
5995
  * d'état : `viewport-fit=cover` n'y suffit pas et c'est `<meta name="theme-color">`, tenu à
5954
5996
  * jour avec le thème, qui donne la continuité.
5997
+ *
5998
+ * Décisions (mode compact, mesures, propriétés CSS) : module `app-shell` de @poadio/ui-core ; style partagé :
5999
+ * `@poadio/ui-core/app-shell.css` (encapsulation désactivée ; hauteur `--poad-shell-height`, `100dvh` par défaut).
6000
+ * @slot [poadShellBar] Barre haute, sur toute la largeur (barre de menus…).
6001
+ * @slot [poadShellNav] Menu, colonne de gauche (tiroir de navigation).
6002
+ * @slot default Le contenu : le seul élément qui défile.
6003
+ * @slot [poadShellBottom] Barre basse, sur toute la largeur (barre de navigation basse).
5955
6004
  * @atelier icone=layout-dashboard
5956
6005
  */
5957
6006
  class PoadAppShellComponent {
5958
6007
  bp = inject(PoadBreakpointService);
5959
- /** Surcharge locale du seuil. Par defaut : celui de la bibliotheque (POAD_MOBILE_BREAKPOINT). */
6008
+ /** Surcharge locale du seuil, en px. Par défaut : celui de la bibliothèque (`POAD_MOBILE_BREAKPOINT`). */
5960
6009
  compactAt = input(null, ...(ngDevMode ? [{ debugName: "compactAt" }] : /* istanbul ignore next */ []));
5961
- /** Un enfant a demande le menu (bouton hamburger de la barre, par exemple). */
6010
+ /** Un enfant a demandé le menu (bouton « menu » de la barre, par exemple). */
5962
6011
  navRequested = output();
5963
6012
  barRef = viewChild.required('bar');
5964
6013
  navRef = viewChild.required('nav');
5965
6014
  bottomRef = viewChild.required('bottom');
5966
- _top = signal(0, ...(ngDevMode ? [{ debugName: "_top" }] : /* istanbul ignore next */ []));
5967
- _bottom = signal(0, ...(ngDevMode ? [{ debugName: "_bottom" }] : /* istanbul ignore next */ []));
5968
- _nav = signal(0, ...(ngDevMode ? [{ debugName: "_nav" }] : /* istanbul ignore next */ []));
5969
- topHeight = this._top.asReadonly();
5970
- bottomHeight = this._bottom.asReadonly();
5971
- navWidth = this._nav.asReadonly();
5972
- compact = computed(() => {
5973
- const seuil = this.compactAt();
5974
- return seuil == null ? this.bp.isMobile() : this.bp.width() < seuil;
5975
- }, ...(ngDevMode ? [{ debugName: "compact" }] : /* istanbul ignore next */ []));
6015
+ metrics = signal(APP_SHELL_NO_METRICS, ...(ngDevMode ? [{ debugName: "metrics" }] : /* istanbul ignore next */ []));
6016
+ /** Hauteur mesurée de la barre haute, en px. */
6017
+ topHeight = computed(() => this.metrics().top, ...(ngDevMode ? [{ debugName: "topHeight" }] : /* istanbul ignore next */ []));
6018
+ /** Hauteur mesurée de la barre basse, en px. */
6019
+ bottomHeight = computed(() => this.metrics().bottom, ...(ngDevMode ? [{ debugName: "bottomHeight" }] : /* istanbul ignore next */ []));
6020
+ /** Largeur mesurée du menu, en px. */
6021
+ navWidth = computed(() => this.metrics().nav, ...(ngDevMode ? [{ debugName: "navWidth" }] : /* istanbul ignore next */ []));
6022
+ /** @internal — propriétés CSS publiées sur l'hôte. */
6023
+ style = computed(() => appShellStyle(this.metrics()), ...(ngDevMode ? [{ debugName: "style" }] : /* istanbul ignore next */ []));
6024
+ /** Sous le seuil mobile (ou sous `compactAt`). */
6025
+ compact = computed(() => appShellCompact(this.bp.state(), this.compactAt()), ...(ngDevMode ? [{ debugName: "compact" }] : /* istanbul ignore next */ []));
5976
6026
  constructor() {
5977
6027
  // Les hauteurs sont MESURÉES, jamais déclarées : une barre dont le contenu grandit
5978
6028
  // (deux lignes de titre, un bandeau d'alerte) doit rester juste sans que personne
@@ -5980,46 +6030,40 @@ class PoadAppShellComponent {
5980
6030
  effect((onCleanup) => {
5981
6031
  if (typeof ResizeObserver === 'undefined')
5982
6032
  return;
5983
- const cibles = [
5984
- [this.barRef().nativeElement, (n) => this._top.set(n), 'h'],
5985
- [this.bottomRef().nativeElement, (n) => this._bottom.set(n), 'h'],
5986
- [this.navRef().nativeElement, (n) => this._nav.set(n), 'w'],
5987
- ];
6033
+ const zones = [['bar', this.barRef().nativeElement], ['bottom', this.bottomRef().nativeElement], ['nav', this.navRef().nativeElement]];
5988
6034
  const ro = new ResizeObserver(() => {
5989
- for (const [el, set, axe] of cibles) {
5990
- const r = el.getBoundingClientRect();
5991
- set(Math.round(axe === 'h' ? r.height : r.width));
5992
- }
6035
+ const [top, bottom, nav] = zones.map(([z, el]) => appShellMeasure(z, el.getBoundingClientRect()));
6036
+ this.metrics.set(appShellMetrics(this.metrics(), { top, bottom, nav }));
5993
6037
  });
5994
- for (const [el] of cibles)
6038
+ for (const [, el] of zones)
5995
6039
  ro.observe(el);
5996
6040
  onCleanup(() => ro.disconnect());
5997
6041
  });
5998
- inject(DestroyRef).onDestroy(() => { });
5999
6042
  }
6043
+ /** Demande l'ouverture du menu : émet `navRequested` (l'hôte ouvre son tiroir). */
6000
6044
  openNav() { this.navRequested.emit(); }
6001
6045
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: PoadAppShellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
6002
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.20", type: PoadAppShellComponent, isStandalone: true, selector: "poad-app-shell", inputs: { compactAt: { classPropertyName: "compactAt", publicName: "compactAt", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { navRequested: "navRequested" }, host: { properties: { "class.is-compact": "compact()", "style.--poad-shell-top.px": "topHeight()", "style.--poad-shell-bottom.px": "bottomHeight()", "style.--poad-shell-nav.px": "navWidth()" }, classAttribute: "poad-app-shell" }, providers: [{ provide: POAD_SHELL, useExisting: PoadAppShellComponent }], viewQueries: [{ propertyName: "barRef", first: true, predicate: ["bar"], descendants: true, isSignal: true }, { propertyName: "navRef", first: true, predicate: ["nav"], descendants: true, isSignal: true }, { propertyName: "bottomRef", first: true, predicate: ["bottom"], descendants: true, isSignal: true }], ngImport: i0, template: `
6046
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.20", type: PoadAppShellComponent, isStandalone: true, selector: "poad-app-shell", inputs: { compactAt: { classPropertyName: "compactAt", publicName: "compactAt", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { navRequested: "navRequested" }, host: { properties: { "class.is-compact": "compact()", "style.--poad-shell-top": "style()[\"--poad-shell-top\"]", "style.--poad-shell-bottom": "style()[\"--poad-shell-bottom\"]", "style.--poad-shell-nav": "style()[\"--poad-shell-nav\"]" }, classAttribute: "poad-app-shell" }, providers: [{ provide: POAD_SHELL, useExisting: PoadAppShellComponent }], viewQueries: [{ propertyName: "barRef", first: true, predicate: ["bar"], descendants: true, isSignal: true }, { propertyName: "navRef", first: true, predicate: ["nav"], descendants: true, isSignal: true }, { propertyName: "bottomRef", first: true, predicate: ["bottom"], descendants: true, isSignal: true }], ngImport: i0, template: `
6003
6047
  <div class="poad-shell__bar" #bar><ng-content select="[poadShellBar]" /></div>
6004
6048
  <div class="poad-shell__nav" #nav><ng-content select="[poadShellNav]" /></div>
6005
6049
  <div class="poad-shell__main" #main><ng-content /></div>
6006
6050
  <div class="poad-shell__bottom" #bottom><ng-content select="[poadShellBottom]" /></div>
6007
- `, isInline: true, styles: [":host{display:grid;height:100dvh;overflow:hidden;grid-template-columns:auto minmax(0,1fr);grid-template-rows:auto minmax(0,1fr) auto;background:var(--poad-bg);color:var(--poad-fg);font-family:var(--poad-font);font-size:var(--poad-font-size)}.poad-shell__bar{grid-column:1 / -1;grid-row:1;min-width:0}.poad-shell__nav{grid-column:1;grid-row:2;min-height:0;display:flex}.poad-shell__main{grid-column:2;grid-row:2;min-width:0;min-height:0;overflow-y:auto;overscroll-behavior:contain}.poad-shell__bottom{grid-column:1 / -1;grid-row:3;min-width:0}.poad-shell__bar:empty,.poad-shell__nav:empty,.poad-shell__bottom:empty{display:none}:host(.is-compact) .poad-shell__nav{width:0;overflow:visible}:host(.is-compact) .poad-shell__main{grid-column:1 / -1}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
6051
+ `, isInline: true, styles: [".poad-app-shell{display:grid;height:var(--poad-shell-height, 100dvh);overflow:hidden;box-sizing:border-box;grid-template-columns:auto minmax(0,1fr);grid-template-rows:auto minmax(0,1fr) auto;background:var(--poad-bg);color:var(--poad-fg);font-family:var(--poad-font);font-size:var(--poad-font-size)}.poad-app-shell>.poad-shell__bar{grid-column:1 / -1;grid-row:1;min-width:0}.poad-app-shell>.poad-shell__nav{grid-column:1;grid-row:2;min-height:0;display:flex}.poad-app-shell>.poad-shell__main{grid-column:2;grid-row:2;min-width:0;min-height:0;overflow-y:auto;overscroll-behavior:contain}.poad-app-shell>.poad-shell__bottom{grid-column:1 / -1;grid-row:3;min-width:0}.poad-app-shell>.poad-shell__bar:empty,.poad-app-shell>.poad-shell__nav:empty,.poad-app-shell>.poad-shell__bottom:empty{display:none}.poad-app-shell.is-compact>.poad-shell__nav{width:0;overflow:visible}.poad-app-shell.is-compact>.poad-shell__main{grid-column:1 / -1}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
6008
6052
  }
6009
6053
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: PoadAppShellComponent, decorators: [{
6010
6054
  type: Component,
6011
6055
  args: [{ selector: 'poad-app-shell', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, providers: [{ provide: POAD_SHELL, useExisting: PoadAppShellComponent }], host: {
6012
6056
  class: 'poad-app-shell',
6013
6057
  '[class.is-compact]': 'compact()',
6014
- '[style.--poad-shell-top.px]': 'topHeight()',
6015
- '[style.--poad-shell-bottom.px]': 'bottomHeight()',
6016
- '[style.--poad-shell-nav.px]': 'navWidth()',
6058
+ '[style.--poad-shell-top]': 'style()["--poad-shell-top"]',
6059
+ '[style.--poad-shell-bottom]': 'style()["--poad-shell-bottom"]',
6060
+ '[style.--poad-shell-nav]': 'style()["--poad-shell-nav"]',
6017
6061
  }, template: `
6018
6062
  <div class="poad-shell__bar" #bar><ng-content select="[poadShellBar]" /></div>
6019
6063
  <div class="poad-shell__nav" #nav><ng-content select="[poadShellNav]" /></div>
6020
6064
  <div class="poad-shell__main" #main><ng-content /></div>
6021
6065
  <div class="poad-shell__bottom" #bottom><ng-content select="[poadShellBottom]" /></div>
6022
- `, styles: [":host{display:grid;height:100dvh;overflow:hidden;grid-template-columns:auto minmax(0,1fr);grid-template-rows:auto minmax(0,1fr) auto;background:var(--poad-bg);color:var(--poad-fg);font-family:var(--poad-font);font-size:var(--poad-font-size)}.poad-shell__bar{grid-column:1 / -1;grid-row:1;min-width:0}.poad-shell__nav{grid-column:1;grid-row:2;min-height:0;display:flex}.poad-shell__main{grid-column:2;grid-row:2;min-width:0;min-height:0;overflow-y:auto;overscroll-behavior:contain}.poad-shell__bottom{grid-column:1 / -1;grid-row:3;min-width:0}.poad-shell__bar:empty,.poad-shell__nav:empty,.poad-shell__bottom:empty{display:none}:host(.is-compact) .poad-shell__nav{width:0;overflow:visible}:host(.is-compact) .poad-shell__main{grid-column:1 / -1}\n"] }]
6066
+ `, encapsulation: ViewEncapsulation.None, styles: [".poad-app-shell{display:grid;height:var(--poad-shell-height, 100dvh);overflow:hidden;box-sizing:border-box;grid-template-columns:auto minmax(0,1fr);grid-template-rows:auto minmax(0,1fr) auto;background:var(--poad-bg);color:var(--poad-fg);font-family:var(--poad-font);font-size:var(--poad-font-size)}.poad-app-shell>.poad-shell__bar{grid-column:1 / -1;grid-row:1;min-width:0}.poad-app-shell>.poad-shell__nav{grid-column:1;grid-row:2;min-height:0;display:flex}.poad-app-shell>.poad-shell__main{grid-column:2;grid-row:2;min-width:0;min-height:0;overflow-y:auto;overscroll-behavior:contain}.poad-app-shell>.poad-shell__bottom{grid-column:1 / -1;grid-row:3;min-width:0}.poad-app-shell>.poad-shell__bar:empty,.poad-app-shell>.poad-shell__nav:empty,.poad-app-shell>.poad-shell__bottom:empty{display:none}.poad-app-shell.is-compact>.poad-shell__nav{width:0;overflow:visible}.poad-app-shell.is-compact>.poad-shell__main{grid-column:1 / -1}\n"] }]
6023
6067
  }], ctorParameters: () => [], propDecorators: { compactAt: [{ type: i0.Input, args: [{ isSignal: true, alias: "compactAt", required: false }] }], navRequested: [{ type: i0.Output, args: ["navRequested"] }], barRef: [{ type: i0.ViewChild, args: ['bar', { isSignal: true }] }], navRef: [{ type: i0.ViewChild, args: ['nav', { isSignal: true }] }], bottomRef: [{ type: i0.ViewChild, args: ['bottom', { isSignal: true }] }] } });
6024
6068
 
6025
6069
  /**
@@ -7798,7 +7842,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImpo
7798
7842
  }], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], home: [{ type: i0.Input, args: [{ isSignal: true, alias: "home", required: false }] }], separatorIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "separatorIcon", required: false }] }], maxItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxItems", required: false }] }], itemClick: [{ type: i0.Output, args: ["itemClick"] }], itemTpl: [{ type: i0.ContentChild, args: [i0.forwardRef(() => PoadBreadcrumbItemDirective), { isSignal: true }] }] } });
7799
7843
 
7800
7844
  /** Positions de l'overlay du CDK : celles du socle (`MENU_PLACEMENTS`), dans le même ordre, à 4 px de la cible. */
7801
- const POSITIONS = MENU_PLACEMENTS.map(({ side, align }) => ({
7845
+ const POSITIONS$1 = MENU_PLACEMENTS.map(({ side, align }) => ({
7802
7846
  originX: align, originY: side, overlayX: align, overlayY: side === 'bottom' ? 'top' : 'bottom', offsetY: side === 'bottom' ? MENU_OFFSET : -MENU_OFFSET,
7803
7847
  }));
7804
7848
  /**
@@ -7892,11 +7936,11 @@ class PoadMenuComponent {
7892
7936
  const el = target instanceof ElementRef ? target.nativeElement : target instanceof HTMLElement ? target : target.currentTarget;
7893
7937
  this.target = el;
7894
7938
  if (el && !contextual)
7895
- strategy = this.overlay.position().flexibleConnectedTo(el).withPositions(POSITIONS).withPush(true);
7939
+ strategy = this.overlay.position().flexibleConnectedTo(el).withPositions(POSITIONS$1).withPush(true);
7896
7940
  else {
7897
7941
  const me = target;
7898
7942
  me.preventDefault?.();
7899
- strategy = this.overlay.position().flexibleConnectedTo({ x: me.clientX, y: me.clientY }).withPositions(POSITIONS).withPush(true);
7943
+ strategy = this.overlay.position().flexibleConnectedTo({ x: me.clientX, y: me.clientY }).withPositions(POSITIONS$1).withPush(true);
7900
7944
  }
7901
7945
  this.ref = this.overlay.create({ positionStrategy: strategy, scrollStrategy: this.overlay.scrollStrategies.reposition(), hasBackdrop: true, backdropClass: 'poad-menu-backdrop', panelClass: 'poad-overlay-pane' });
7902
7946
  this.ref.attach(new TemplatePortal(this.panelTpl(), this.vcr));
@@ -8079,13 +8123,35 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImpo
8079
8123
  `, encapsulation: ViewEncapsulation.None, styles: [".poad-menu-host{display:contents}.poad-menu-host.is-inline{display:block}.poad-menu[role=menu]{background:var(--poad-overlay);--poad-hover: var(--poad-overlay-hover);border:1px solid var(--poad-border);border-radius:9px;box-shadow:var(--poad-shadow-lg);padding:4px;min-width:180px;font-family:var(--poad-font);font-size:var(--poad-font-size);color:var(--poad-fg);box-sizing:border-box}.poad-menu-host.is-inline>.poad-menu{box-shadow:none}.poad-menu .poad-menu__wrap{position:relative}.poad-menu .poad-menu__item{all:unset;box-sizing:border-box;display:flex;align-items:center;gap:8px;width:100%;padding:6px 8px;border-radius:6px;cursor:pointer;white-space:nowrap}.poad-menu .poad-menu__item:hover:not([disabled]),.poad-menu .poad-menu__item.is-active:not([disabled]){background:var(--poad-hover)}.poad-menu .poad-menu__item:focus-visible{outline:2px solid var(--poad-ring);outline-offset:-2px}.poad-menu .poad-menu__item[disabled]{opacity:.5;cursor:not-allowed}.poad-menu .poad-menu__item.sev-danger{color:var(--poad-danger)}.poad-menu .poad-menu__item.sev-danger:hover:not([disabled]){background:var(--poad-danger-soft)}.poad-menu .poad-menu__ph{width:14px;flex:none}.poad-menu .poad-menu__label{flex:1}.poad-menu .poad-menu__kbd{font:11px var(--poad-font-mono);color:var(--poad-fg-muted);margin-inline-start:16px}.poad-menu .poad-menu__badge{font:500 10.5px var(--poad-font-mono);padding:1px 6px;border-radius:999px;background:var(--poad-accent-soft);color:var(--poad-accent)}.poad-menu .poad-menu__sub-ic{color:var(--poad-fg-muted);margin-inline-start:8px}.poad-menu .poad-menu__sep{height:1px;background:var(--poad-border);margin:4px 6px}.poad-menu .poad-menu--sub{position:absolute;top:-5px;inset-inline-start:calc(100% + 2px);z-index:1}.poad-split-button{display:inline-flex;align-items:stretch;vertical-align:middle}.poad-split-button .poad-split-button__main{border-start-end-radius:0!important;border-end-end-radius:0!important}.poad-split-button .poad-split-button__toggle{border-start-start-radius:0!important;border-end-start-radius:0!important;margin-inline-start:-1px;box-shadow:inset 1px 0 #ffffff47}.poad-split-button .var-outline.poad-split-button__toggle,.poad-split-button .var-text.poad-split-button__toggle{box-shadow:none;border-inline-start-color:transparent}\n"] }]
8080
8124
  }], ctorParameters: () => [], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], popup: [{ type: i0.Input, args: [{ isSignal: true, alias: "popup", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], minWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "minWidth", required: false }] }], closeOnSelect: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnSelect", required: false }] }], mobile: [{ type: i0.Input, args: [{ isSignal: true, alias: "mobile", required: false }] }], sheetTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "sheetTitle", required: false }] }], itemClick: [{ type: i0.Output, args: ["itemClick"] }], shown: [{ type: i0.Output, args: ["shown"] }], hidden: [{ type: i0.Output, args: ["hidden"] }], panelTpl: [{ type: i0.ViewChild, args: ['panel', { isSignal: true }] }] } });
8081
8125
 
8126
+ /**
8127
+ * Focus sur un élément d'un panneau qui vient d'être attaché : la couche du CDK n'est montrée (et placée) qu'à l'image
8128
+ * suivante, le navigateur refuse le focus d'ici là — réessayer à l'image suivante.
8129
+ */
8130
+ function focusShown(el) {
8131
+ if (!el)
8132
+ return;
8133
+ el.focus();
8134
+ if (el.ownerDocument.activeElement !== el)
8135
+ requestAnimationFrame(() => el.focus());
8136
+ }
8137
+ /** Positions de l'overlay du CDK : celles du socle (`MENUBAR_PLACEMENTS`), à 6 px de la racine. */
8138
+ const POSITIONS = MENUBAR_PLACEMENTS.map(({ align }) => ({ originX: align, originY: 'bottom', overlayX: align, overlayY: 'top', offsetY: MENUBAR_OFFSET }));
8082
8139
  /**
8083
8140
  * <poad-menubar [items]="items" breakpoint="md" (itemClick)>
8084
8141
  * <img poadMenubarStart …/> <poad-map-search poadMenubarEnd/>
8085
8142
  * </poad-menubar>
8086
- * Barre horizontale : racines (routerLink actif souligné), sous-menus en overlay CDK (`poad-menu` popup, 2 niveaux) au clic ou au survol,
8087
- * méga-menu multi-colonnes (`columns`), clavier ←→ entre racines, ↓/Entrée ouvre, Échap ferme, `role=menubar`.
8088
- * Sous `breakpoint` (fenêtre) : bouton hamburger + menu vertical déplié en accordéon.
8143
+ * Barre de menus horizontale (`role="menubar"`, un seul arrêt de tabulation) : racines liens (`routerLink`, ou `url`
8144
+ * en `<a href>` ; la page courante soulignée par `routerLinkActive` ou `current`) ou boutons qui ouvrent un panneau
8145
+ * flottant (overlay du CDK) — une liste (`items`, un niveau de sous-menu) ou un méga-menu en colonnes (`columns`).
8146
+ * Clavier : ← → entre racines, ↓ ↑ ouvrent et entrent dans le panneau, ← → y passent au panneau voisin, Échap ferme et
8147
+ * rend le focus à la racine. Au survol, une fois un panneau ouvert, celui de la racine survolée le remplace.
8148
+ * Sous `breakpoint` (fenêtre) : bouton « Menu » et liste verticale dont les groupes se déplient sur place.
8149
+ *
8150
+ * Décisions (arrêt de tabulation, clavier des racines et du panneau, survol, repli, lignes du repli, attributs) :
8151
+ * machines `menubar` et `menu` de @poadio/ui-core ; restent ici l'overlay du CDK, le routeur et le focus. Style
8152
+ * partagé : `@poadio/ui-core/menubar.css` et `menu.css` (encapsulation désactivée).
8153
+ * @slot [poadMenubarStart] Contenu avant les racines (logo…).
8154
+ * @slot [poadMenubarEnd] Contenu après les racines, poussé à la fin (recherche, compte…).
8089
8155
  * @atelier icone=menu
8090
8156
  * @atelier-exemple items [{"label":"Fichier","items":[{"label":"Nouveau"},{"label":"Ouvrir"}]},{"label":"Édition","items":[{"label":"Annuler"},{"label":"Rétablir"}]},{"label":"Affichage"}]
8091
8157
  */
@@ -8093,261 +8159,521 @@ class PoadMenubarComponent {
8093
8159
  i18n = inject(UiI18n);
8094
8160
  overlay = inject(Overlay);
8095
8161
  vcr = inject(ViewContainerRef);
8096
- router = inject(Router, { optional: true });
8162
+ injector = inject(Injector);
8163
+ host = inject(ElementRef).nativeElement;
8097
8164
  bp = inject(PoadBreakpointService);
8165
+ /** Les racines de la barre. */
8098
8166
  items = input([], ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
8167
+ /** Nom accessible de la barre. */
8099
8168
  ariaLabel = input('', ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
8100
- /** Sous ce breakpoint fenêtre : hamburger + menu vertical ('' = jamais). */
8169
+ /** Sous ce point de rupture de la fenêtre : bouton « Menu » et liste verticale (`''` : jamais). */
8101
8170
  breakpoint = input('md', ...(ngDevMode ? [{ debugName: "breakpoint" }] : /* istanbul ignore next */ []));
8171
+ /** Une fois un panneau ouvert, survoler une autre racine ouvre le sien ; quitter la barre et le panneau le ferme. */
8102
8172
  openOnHover = input(true, { ...(ngDevMode ? { debugName: "openOnHover" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
8173
+ /** Adresse de la page courante : la racine (ou l'élément) dont `url` est égale est marquée (`aria-current="page"`). */
8174
+ current = input(null, ...(ngDevMode ? [{ debugName: "current" }] : /* istanbul ignore next */ []));
8175
+ /** Un élément (racine sans panneau, élément d'un panneau, ligne du repli) est choisi, après sa `command`. */
8103
8176
  itemClick = output();
8177
+ /** Le panneau d'une racine s'ouvre. */
8104
8178
  opened = output();
8179
+ /** Le panneau se ferme. */
8105
8180
  closed = output();
8106
8181
  panelTpl = viewChild.required('panel');
8182
+ /** @internal */
8107
8183
  id = poadId('poad-menubar');
8108
- visible = computed(() => this.items().filter(i => i.visible !== false), ...(ngDevMode ? [{ debugName: "visible" }] : /* istanbul ignore next */ []));
8109
- mobile = computed(() => !!this.breakpoint() && this.bp.down(this.breakpoint()), ...(ngDevMode ? [{ debugName: "mobile" }] : /* istanbul ignore next */ []));
8184
+ /** @internal */
8185
+ roots = computed(() => menubarVisible(this.items()), ...(ngDevMode ? [{ debugName: "roots" }] : /* istanbul ignore next */ []));
8186
+ /** @internal */
8187
+ collapsed = computed(() => menubarCollapsed(this.bp.state().current, this.breakpoint()), ...(ngDevMode ? [{ debugName: "collapsed" }] : /* istanbul ignore next */ []));
8188
+ /** @internal */
8189
+ state = signal(MENUBAR_INITIAL, ...(ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []));
8190
+ /** @internal État du panneau ouvert (machine `menu`). */
8191
+ pstate = signal(MENU_INITIAL, ...(ngDevMode ? [{ debugName: "pstate" }] : /* istanbul ignore next */ []));
8192
+ /** @internal */
8193
+ openItem = computed(() => { const i = this.state().open; return i == null ? null : this.roots()[i] ?? null; }, ...(ngDevMode ? [{ debugName: "openItem" }] : /* istanbul ignore next */ []));
8194
+ /** @internal */
8195
+ mega = computed(() => menubarIsMega(this.openItem() ?? undefined), ...(ngDevMode ? [{ debugName: "mega" }] : /* istanbul ignore next */ []));
8196
+ /** @internal */
8197
+ panelItems = computed(() => menubarPanelItems(this.openItem() ?? undefined), ...(ngDevMode ? [{ debugName: "panelItems" }] : /* istanbul ignore next */ []));
8198
+ /** @internal */
8199
+ columns = computed(() => menubarColumns(this.openItem()?.columns), ...(ngDevMode ? [{ debugName: "columns" }] : /* istanbul ignore next */ []));
8200
+ /** @internal */
8110
8201
  mobileOpen = signal(false, ...(ngDevMode ? [{ debugName: "mobileOpen" }] : /* istanbul ignore next */ []));
8111
- mExpanded = signal(new Set(), ...(ngDevMode ? [{ debugName: "mExpanded" }] : /* istanbul ignore next */ []));
8112
- openIdx = signal(null, ...(ngDevMode ? [{ debugName: "openIdx" }] : /* istanbul ignore next */ []));
8113
- openItem = computed(() => { const i = this.openIdx(); return i == null ? null : this.visible()[i] ?? null; }, ...(ngDevMode ? [{ debugName: "openItem" }] : /* istanbul ignore next */ []));
8114
- focusIdx = signal(0, ...(ngDevMode ? [{ debugName: "focusIdx" }] : /* istanbul ignore next */ []));
8202
+ expanded = signal(new Set(), ...(ngDevMode ? [{ debugName: "expanded" }] : /* istanbul ignore next */ []));
8203
+ /** @internal */
8204
+ mobileRows = computed(() => menubarMobileRows(this.roots(), this.expanded()), ...(ngDevMode ? [{ debugName: "mobileRows" }] : /* istanbul ignore next */ []));
8115
8205
  ref = null;
8206
+ refFor = null;
8116
8207
  closeTimer = null;
8117
- constructor() { inject(DestroyRef).onDestroy(() => this.closeAll()); }
8118
- hasChildren(it) { return !!(it.items?.length || it.columns?.length); }
8119
- childrenOf(it) { return it.items?.length ? it.items : (it.columns ?? []).flatMap(c => c.items); }
8120
- clickRoot(it, ev, i, el) {
8121
- this.focusIdx.set(i);
8122
- if (this.hasChildren(it)) {
8123
- ev.preventDefault();
8124
- this.openIdx() === i ? this.closeAll() : this.open(i, el);
8125
- return;
8208
+ pointer = { x: NaN, y: NaN };
8209
+ constructor() {
8210
+ inject(DestroyRef).onDestroy(() => { this.cancelClose(); this.ref?.dispose(); });
8211
+ // repliée (ou dépliée) : panneau fermé, liste mobile refermée
8212
+ effect(() => { this.collapsed(); untracked(() => { this.set(menubarClose(this.state())); this.mobileOpen.set(false); }); });
8213
+ }
8214
+ /** @internal */
8215
+ hasPanel(it) { return menubarHasPanel(it); }
8216
+ /** @internal */
8217
+ rootAttrs(it, i) { return menubarRootProps(it, i, this.state(), this.roots(), this.current()); }
8218
+ /** @internal */
8219
+ itemAttrs(it, j) { return menuItemProps(it, { active: this.pstate().active === j, expanded: this.pstate().sub === j }); }
8220
+ /** @internal */
8221
+ subItems(it) { return menuVisible(it.items); }
8222
+ /** @internal */
8223
+ isCurrent(it) { return menubarIsCurrent(it, this.current()); }
8224
+ /** @internal */
8225
+ indent(level) { return menubarMobileIndent(level); }
8226
+ rtl() { return elementIsRtl(this.host); }
8227
+ /** Ferme le panneau ouvert (`refocus` : le focus revient à sa racine). */
8228
+ close(refocus = false) { this.apply(menubarClose(this.state(), refocus)); }
8229
+ set(step) {
8230
+ const before = this.state();
8231
+ const next = step.state;
8232
+ if (next.open !== before.open)
8233
+ this.pstate.set(MENU_INITIAL);
8234
+ this.state.set(next);
8235
+ this.syncOverlay();
8236
+ if (next.open !== before.open) {
8237
+ if (before.open !== null)
8238
+ this.closed.emit();
8239
+ const it = this.openItem();
8240
+ if (it)
8241
+ this.opened.emit(it);
8126
8242
  }
8127
- this.activate(it, ev);
8128
8243
  }
8129
- hoverOpen(i, it, ev) { this.cancelClose(); if (!this.openOnHover() || !this.hasChildren(it))
8130
- return; const el = ev.currentTarget.querySelector('.poad-menubar__root'); if (el && (this.openIdx() !== null || this.ref) && this.openIdx() !== i)
8131
- this.open(i, el); }
8132
- scheduleClose(_i) { this.cancelClose(); this.closeTimer = setTimeout(() => this.closeAll(), 250); }
8133
- cancelClose() { if (this.closeTimer) {
8134
- clearTimeout(this.closeTimer);
8135
- this.closeTimer = null;
8136
- } }
8137
- open(i, el) {
8138
- this.closeAll();
8139
- const it = this.visible()[i];
8140
- if (!it || !this.hasChildren(it))
8141
- return;
8142
- this.openIdx.set(i);
8143
- const pos = this.overlay.position().flexibleConnectedTo(el).withPositions([{ originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top', offsetY: 6 }, { originX: 'end', originY: 'bottom', overlayX: 'end', overlayY: 'top', offsetY: 6 }]).withPush(true);
8144
- this.ref = this.overlay.create({ positionStrategy: pos, scrollStrategy: this.overlay.scrollStrategies.reposition(), hasBackdrop: true, backdropClass: 'cdk-overlay-transparent-backdrop', panelClass: 'poad-overlay-pane' });
8145
- this.ref.attach(new TemplatePortal(this.panelTpl(), this.vcr));
8146
- this.ref.backdropClick().subscribe(() => this.closeAll());
8147
- this.ref.keydownEvents().subscribe(e => { if (e.key === 'Escape')
8148
- this.closeAll(true); });
8149
- this.opened.emit(it);
8244
+ apply(step) {
8245
+ this.set(step);
8246
+ this.focus(step.focus);
8150
8247
  }
8151
- closeAll(refocus = false) {
8152
- this.cancelClose();
8153
- const wasOpen = this.openIdx() !== null;
8248
+ rootEl(i) { return this.host.querySelector(`.poad-menubar__list > li > [data-idx="${i}"]`); }
8249
+ paneEl() { return this.ref?.overlayElement ?? null; }
8250
+ focus(f) {
8251
+ if (!f)
8252
+ return;
8253
+ if ('root' in f) {
8254
+ this.rootEl(f.root)?.focus();
8255
+ return;
8256
+ }
8257
+ const items = this.panelItems();
8258
+ let s = menuOpen(items).state;
8259
+ if (f.panel === 'last') {
8260
+ const last = menuKeydown(s, items, 'End');
8261
+ s = last.state;
8262
+ }
8263
+ this.pstate.set(s);
8264
+ const idx = s.active;
8265
+ afterNextRender(() => focusShown(this.paneEl()?.querySelector(`[data-idx="${idx}"]`)), { injector: this.injector });
8266
+ }
8267
+ syncOverlay() {
8268
+ const open = this.state().open;
8269
+ if (open === this.refFor && (open === null || this.ref))
8270
+ return;
8154
8271
  this.ref?.dispose();
8155
8272
  this.ref = null;
8156
- this.openIdx.set(null);
8157
- if (wasOpen)
8158
- this.closed.emit();
8159
- if (refocus)
8160
- this.focusRoot(this.focusIdx());
8273
+ this.refFor = null;
8274
+ const anchor = open === null ? null : this.rootEl(open);
8275
+ if (open === null || !anchor)
8276
+ return;
8277
+ const pos = this.overlay.position().flexibleConnectedTo(anchor).withPositions(POSITIONS).withPush(true);
8278
+ this.ref = this.overlay.create({ positionStrategy: pos, scrollStrategy: this.overlay.scrollStrategies.reposition(), panelClass: 'poad-overlay-pane' });
8279
+ this.refFor = open;
8280
+ this.ref.attach(new TemplatePortal(this.panelTpl(), this.vcr));
8281
+ // appui hors de la barre et du panneau : fermé
8282
+ this.ref.outsidePointerEvents().subscribe((e) => { if (!this.host.contains(e.target))
8283
+ this.close(); });
8161
8284
  }
8162
- activate(it, ev) {
8163
- if (it.disabled)
8285
+ /** @internal */
8286
+ clickRoot(it, ev, i) {
8287
+ if (it.disabled) {
8288
+ ev.preventDefault();
8164
8289
  return;
8290
+ }
8291
+ if (!menubarHasPanel(it)) {
8292
+ this.chooseRoot(it, ev, i);
8293
+ return;
8294
+ }
8295
+ this.apply(menubarToggle(this.state(), this.roots(), i));
8296
+ }
8297
+ /** @internal */
8298
+ chooseRoot(it, ev, i) {
8299
+ this.set({ state: { focus: i, open: null }, focus: null, preventDefault: false });
8300
+ this.choose(it, ev);
8301
+ }
8302
+ choose(it, ev) {
8165
8303
  it.command?.({ item: it, originalEvent: ev });
8166
8304
  this.itemClick.emit({ item: it, originalEvent: ev });
8167
- if (it.routerLink && this.router)
8168
- this.router.navigate(Array.isArray(it.routerLink) ? it.routerLink : [it.routerLink], { queryParams: it.queryParams });
8169
- else if (it.url)
8170
- window.open(it.url, it.target ?? '_self');
8171
- this.closeAll();
8172
- this.mobileOpen.set(false);
8173
8305
  }
8174
- mobileClick(it, ev) {
8175
- if (this.hasChildren(it)) {
8176
- this.mExpanded.update(s => { const n = new Set(s); n.has(it) ? n.delete(it) : n.add(it); return n; });
8306
+ /** @internal */
8307
+ hover(i, e) {
8308
+ if (!menubarPointerMoved(this.pointer, e.clientX, e.clientY))
8177
8309
  return;
8178
- }
8179
- this.activate(it, ev);
8310
+ this.cancelClose();
8311
+ if (!this.openOnHover())
8312
+ return;
8313
+ const next = menubarHover(this.state(), this.roots(), i);
8314
+ if (next !== this.state())
8315
+ this.set({ state: next, focus: null, preventDefault: false });
8180
8316
  }
8181
- focusRoot(i) { const el = this.vcr.element.nativeElement.parentElement?.querySelector(`[data-idx="${i}"]`); el?.focus(); }
8182
- onKey(e) {
8183
- const n = this.visible().length;
8184
- if (!n)
8317
+ /** @internal */
8318
+ scheduleClose(e) {
8319
+ // une sortie due à la page qui change sous un pointeur immobile (panneau placé) ne compte pas
8320
+ if (!this.openOnHover() || this.state().open === null || !menubarPointerMoved(this.pointer, e.clientX, e.clientY))
8321
+ return;
8322
+ this.cancelClose();
8323
+ this.closeTimer = setTimeout(() => this.close(), MENUBAR_CLOSE_DELAY);
8324
+ }
8325
+ /** @internal */
8326
+ cancelClose() { if (this.closeTimer) {
8327
+ clearTimeout(this.closeTimer);
8328
+ this.closeTimer = null;
8329
+ } }
8330
+ /** @internal */
8331
+ onRootKey(e) {
8332
+ const step = menubarRootKeydown(this.state(), this.roots(), e.key, { rtl: this.rtl() });
8333
+ if (step.preventDefault)
8334
+ e.preventDefault();
8335
+ this.apply(step);
8336
+ }
8337
+ /** @internal */
8338
+ onPanelKey(e) {
8339
+ const inSub = !!e.target.closest('.poad-menu--sub');
8340
+ const items = this.panelItems();
8341
+ const before = menubarPanelFrom(this.pstate(), e.target, inSub);
8342
+ const m = menuKeydown(before, items, e.key, { inSub });
8343
+ if (m.preventDefault || m.state !== before) {
8344
+ if (m.preventDefault)
8345
+ e.preventDefault();
8346
+ if (m.stopPropagation)
8347
+ e.stopPropagation();
8348
+ this.pstate.set(m.state);
8349
+ const f = m.focus;
8350
+ if (!f)
8351
+ return;
8352
+ // élément déjà rendu (même niveau) : focus tout de suite ; sous-menu qui s'ouvre : après le rendu
8353
+ const find = () => this.paneEl()?.querySelector(f.level === 'root' ? `[data-idx="${f.index}"]` : `.poad-menu--sub > [data-sub-idx="${f.index}"]`);
8354
+ const el = find();
8355
+ if (el)
8356
+ el.focus();
8357
+ else
8358
+ afterNextRender(() => focusShown(find()), { injector: this.injector });
8185
8359
  return;
8186
- let i = this.focusIdx();
8187
- if (e.key === 'ArrowRight') {
8188
- i = (i + 1) % n;
8189
- }
8190
- else if (e.key === 'ArrowLeft') {
8191
- i = (i - 1 + n) % n;
8192
8360
  }
8193
- else if (e.key === 'Home') {
8194
- i = 0;
8361
+ const step = menubarPanelKeydown(this.state(), this.roots(), e.key, { rtl: this.rtl() });
8362
+ if (step.preventDefault) {
8363
+ e.preventDefault();
8364
+ e.stopPropagation();
8195
8365
  }
8196
- else if (e.key === 'End') {
8197
- i = n - 1;
8366
+ this.apply(step);
8367
+ }
8368
+ /** @internal */
8369
+ panelHover(j) { const next = menuHover(this.pstate(), this.panelItems(), j); if (next !== this.pstate())
8370
+ this.pstate.set(next); }
8371
+ /** @internal */
8372
+ subHover(k) { const next = menuSubHover(this.pstate(), k); if (next !== this.pstate())
8373
+ this.pstate.set(next); }
8374
+ /** @internal */
8375
+ activate(it, ev, index, parent) {
8376
+ const r = menuActivate(this.pstate(), this.panelItems(), { index, parent: parent ?? undefined });
8377
+ if (r.action === 'none') {
8378
+ ev.preventDefault();
8379
+ return;
8198
8380
  }
8199
- else if (e.key === 'ArrowDown' || e.key === 'Enter' || e.key === ' ') {
8200
- const it = this.visible()[i];
8201
- if (this.hasChildren(it)) {
8202
- e.preventDefault();
8203
- const el = e.currentTarget.querySelector(`[data-idx="${i}"]`);
8204
- if (el)
8205
- this.open(i, el);
8206
- }
8381
+ this.pstate.set(r.state);
8382
+ if (r.action === 'toggle-sub')
8383
+ return;
8384
+ this.choose(it, ev);
8385
+ this.close(true);
8386
+ }
8387
+ /** @internal */
8388
+ toggleMobile() { this.mobileOpen.update((o) => !o); }
8389
+ /** @internal */
8390
+ toggleGroup(key) { this.expanded.update((e) => menubarMobileToggle(e, key)); }
8391
+ /** @internal */
8392
+ chooseMobile(it, ev) {
8393
+ if (it.disabled) {
8394
+ ev.preventDefault();
8207
8395
  return;
8208
8396
  }
8209
- else if (e.key === 'Escape') {
8210
- this.closeAll(true);
8397
+ this.choose(it, ev);
8398
+ this.mobileOpen.set(false);
8399
+ this.host.querySelector('.poad-menubar__burger')?.focus();
8400
+ }
8401
+ /** @internal */
8402
+ onMobileKey(e) {
8403
+ if (e.key === 'Escape') {
8404
+ e.preventDefault();
8405
+ this.mobileOpen.set(false);
8406
+ this.host.querySelector('.poad-menubar__burger')?.focus();
8211
8407
  return;
8212
8408
  }
8213
- else
8409
+ const els = [...e.currentTarget.querySelectorAll('.poad-menubar__mitem')];
8410
+ const to = menubarMobileKeyTarget(els.map((el) => el.disabled === true), els.indexOf(e.target), e.key);
8411
+ if (to === null)
8214
8412
  return;
8215
8413
  e.preventDefault();
8216
- this.focusIdx.set(i);
8217
- this.focusRoot(i);
8218
- if (this.openIdx() !== null) {
8219
- const el = e.currentTarget.querySelector(`[data-idx="${i}"]`);
8220
- if (el && this.hasChildren(this.visible()[i]))
8221
- this.open(i, el);
8222
- else
8223
- this.closeAll();
8224
- }
8414
+ els[to]?.focus();
8225
8415
  }
8226
8416
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: PoadMenubarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
8227
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.20", type: PoadMenubarComponent, isStandalone: true, selector: "poad-menubar", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, breakpoint: { classPropertyName: "breakpoint", publicName: "breakpoint", isSignal: true, isRequired: false, transformFunction: null }, openOnHover: { classPropertyName: "openOnHover", publicName: "openOnHover", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemClick: "itemClick", opened: "opened", closed: "closed" }, host: { properties: { "class.is-mobile": "mobile()", "class.is-open": "mobileOpen()" }, classAttribute: "poad-menubar" }, viewQueries: [{ propertyName: "panelTpl", first: true, predicate: ["panel"], descendants: true, isSignal: true }], ngImport: i0, template: `
8417
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.20", type: PoadMenubarComponent, isStandalone: true, selector: "poad-menubar", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, breakpoint: { classPropertyName: "breakpoint", publicName: "breakpoint", isSignal: true, isRequired: false, transformFunction: null }, openOnHover: { classPropertyName: "openOnHover", publicName: "openOnHover", isSignal: true, isRequired: false, transformFunction: null }, current: { classPropertyName: "current", publicName: "current", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemClick: "itemClick", opened: "opened", closed: "closed" }, host: { properties: { "class.is-mobile": "collapsed()", "class.is-open": "mobileOpen()" }, classAttribute: "poad-menubar" }, viewQueries: [{ propertyName: "panelTpl", first: true, predicate: ["panel"], descendants: true, isSignal: true }], ngImport: i0, template: `
8228
8418
  <div class="poad-menubar__start"><ng-content select="[poadMenubarStart]"/></div>
8229
- @if (!mobile()) {
8230
- <ul class="poad-menubar__list" role="menubar" [attr.aria-label]="ariaLabel() || null" (keydown)="onKey($event)">
8231
- @for (it of visible(); track $index; let i = $index) {
8232
- <li role="none" (mouseenter)="hoverOpen(i, it, $event)" (mouseleave)="scheduleClose(i)">
8233
- @if (it.routerLink && !hasChildren(it)) {
8234
- <a #root class="poad-menubar__root" role="menuitem" [routerLink]="it.routerLink" [queryParams]="it.queryParams" routerLinkActive="is-active" [class.is-disabled]="it.disabled" [attr.tabindex]="focusIdx() === i ? 0 : -1" [attr.data-idx]="i" (click)="clickRoot(it, $event, i, root)">
8235
- @if (it.icon) {<poad-icon [name]="it.icon" [size]="15"/>}<span>{{ it.label }}</span>@if (it.badge != null) {<span class="poad-menubar__badge">{{ it.badge }}</span>}
8419
+ @if (!collapsed()) {
8420
+ <ul class="poad-menubar__list" role="menubar" [attr.aria-label]="ariaLabel() || null" (keydown)="onRootKey($event)">
8421
+ @for (it of roots(); track $index; let i = $index) {
8422
+ @let a = rootAttrs(it, i);
8423
+ <li role="none" (mousemove)="hover(i, $event)" (mouseleave)="scheduleClose($event)">
8424
+ @if (!hasPanel(it) && !it.disabled && it.routerLink) {
8425
+ <a class="poad-menubar__root" [class.is-active]="a.classes['is-active']" role="menuitem" [routerLink]="it.routerLink" [queryParams]="it.queryParams" routerLinkActive="is-active"
8426
+ [attr.aria-current]="a['aria-current']" [attr.tabindex]="a.tabindex" [attr.data-idx]="i" [attr.title]="it.title || null" (click)="chooseRoot(it, $event, i)">
8427
+ <ng-container *ngTemplateOutlet="rootInner; context: { $implicit: it }"/>
8428
+ </a>
8429
+ } @else if (!hasPanel(it) && !it.disabled && it.url) {
8430
+ <a class="poad-menubar__root" [class.is-active]="a.classes['is-active']" role="menuitem" [href]="it.url" [attr.target]="it.target || null"
8431
+ [attr.aria-current]="a['aria-current']" [attr.tabindex]="a.tabindex" [attr.data-idx]="i" [attr.title]="it.title || null" (click)="chooseRoot(it, $event, i)">
8432
+ <ng-container *ngTemplateOutlet="rootInner; context: { $implicit: it }"/>
8236
8433
  </a>
8237
8434
  } @else {
8238
- <button #root type="button" class="poad-menubar__root" role="menuitem" [class.is-open]="openIdx() === i" [disabled]="it.disabled" [attr.aria-haspopup]="hasChildren(it) ? 'menu' : null" [attr.aria-expanded]="hasChildren(it) ? openIdx() === i : null" [attr.tabindex]="focusIdx() === i ? 0 : -1" [attr.data-idx]="i" (click)="clickRoot(it, $event, i, root)">
8239
- @if (it.icon) {<poad-icon [name]="it.icon" [size]="15"/>}<span>{{ it.label }}</span>@if (it.badge != null) {<span class="poad-menubar__badge">{{ it.badge }}</span>}
8240
- @if (hasChildren(it)) {<poad-icon class="poad-menubar__chev" name="chevron-down" [size]="12"/>}
8435
+ <button type="button" class="poad-menubar__root" [class.is-open]="a.classes['is-open']" [class.is-active]="a.classes['is-active']" [class.is-disabled]="a.classes['is-disabled']"
8436
+ role="menuitem" [attr.aria-haspopup]="a['aria-haspopup']" [attr.aria-expanded]="a['aria-expanded']" [attr.aria-disabled]="a['aria-disabled']" [attr.tabindex]="a.tabindex"
8437
+ [attr.data-idx]="i" [attr.title]="it.title || null" (click)="clickRoot(it, $event, i)">
8438
+ <ng-container *ngTemplateOutlet="rootInner; context: { $implicit: it }"/>
8439
+ @if (hasPanel(it)) {<poad-icon class="poad-menubar__chev" name="chevron-down" [size]="12"/>}
8241
8440
  </button>
8242
8441
  }
8243
8442
  </li>
8244
8443
  }
8245
8444
  </ul>
8246
8445
  } @else {
8247
- <button type="button" class="poad-menubar__burger" [attr.aria-label]="i18n.t('nav.menu')" [attr.aria-expanded]="mobileOpen()" (click)="mobileOpen.set(!mobileOpen())"><poad-icon [name]="mobileOpen() ? 'x' : 'menu'" [size]="18"/></button>
8446
+ <button type="button" class="poad-menubar__burger" [attr.aria-label]="i18n.t('nav.menu')" [attr.aria-expanded]="mobileOpen()" [attr.aria-controls]="id + '-mobile'"
8447
+ (click)="toggleMobile()"><poad-icon [name]="mobileOpen() ? 'x' : 'menu'" [size]="18"/></button>
8248
8448
  }
8249
8449
  <div class="poad-menubar__end"><ng-content select="[poadMenubarEnd]"/></div>
8250
- @if (mobile() && mobileOpen()) {
8251
- <div class="poad-menubar__mobile" role="menu">
8252
- @for (it of visible(); track $index; let i = $index) { <ng-container *ngTemplateOutlet="mobileItem; context: { $implicit: it, level: 0 }"/> }
8450
+ @if (collapsed() && mobileOpen()) {
8451
+ <div class="poad-menubar__mobile" [id]="id + '-mobile'" (keydown)="onMobileKey($event)">
8452
+ @for (r of mobileRows(); track r.key) {
8453
+ @if (r.separator) { <div class="poad-menubar__sep"></div> }
8454
+ @else if (r.group) {
8455
+ <button type="button" class="poad-menubar__mitem" [style.padding-inline-start.px]="indent(r.level)" [disabled]="r.item.disabled" [attr.aria-expanded]="r.expanded"
8456
+ (click)="toggleGroup(r.key)">
8457
+ @if (r.item.icon) {<poad-icon [name]="r.item.icon" [size]="15"/>}<span class="poad-menubar__mlabel">{{ r.item.label }}</span>
8458
+ <poad-icon [name]="r.expanded ? 'chevron-up' : 'chevron-down'" [size]="13"/>
8459
+ </button>
8460
+ } @else if (!r.item.disabled && r.item.routerLink) {
8461
+ <a class="poad-menubar__mitem" [class.is-active]="isCurrent(r.item)" [style.padding-inline-start.px]="indent(r.level)" [routerLink]="r.item.routerLink" [queryParams]="r.item.queryParams"
8462
+ routerLinkActive="is-active" (click)="chooseMobile(r.item, $event)"><ng-container *ngTemplateOutlet="mobileInner; context: { $implicit: r.item }"/></a>
8463
+ } @else if (!r.item.disabled && r.item.url) {
8464
+ <a class="poad-menubar__mitem" [class.is-active]="isCurrent(r.item)" [attr.aria-current]="isCurrent(r.item) ? 'page' : null" [style.padding-inline-start.px]="indent(r.level)"
8465
+ [href]="r.item.url" [attr.target]="r.item.target || null" (click)="chooseMobile(r.item, $event)"><ng-container *ngTemplateOutlet="mobileInner; context: { $implicit: r.item }"/></a>
8466
+ } @else {
8467
+ <button type="button" class="poad-menubar__mitem" [style.padding-inline-start.px]="indent(r.level)" [disabled]="r.item.disabled" (click)="chooseMobile(r.item, $event)">
8468
+ <ng-container *ngTemplateOutlet="mobileInner; context: { $implicit: r.item }"/>
8469
+ </button>
8470
+ }
8471
+ }
8253
8472
  </div>
8254
8473
  }
8255
- <ng-template #mobileItem let-it let-level="level">
8256
- @if (it.separator) { <div class="poad-menubar__sep"></div> }
8257
- @else {
8258
- <button type="button" class="poad-menubar__mitem" role="menuitem" [style.padding-left.px]="12 + level * 16" [disabled]="it.disabled" [attr.aria-expanded]="hasChildren(it) ? mExpanded().has(it) : null" (click)="mobileClick(it, $event)">
8259
- @if (it.icon) {<poad-icon [name]="it.icon" [size]="15"/>}<span class="poad-menubar__mlabel">{{ it.label }}</span>
8260
- @if (hasChildren(it)) {<poad-icon [name]="mExpanded().has(it) ? 'chevron-up' : 'chevron-down'" [size]="13"/>}
8261
- </button>
8262
- @if (hasChildren(it) && mExpanded().has(it)) {
8263
- @for (s of childrenOf(it); track $index) { <ng-container *ngTemplateOutlet="mobileItem; context: { $implicit: s, level: level + 1 }"/> }
8264
- }
8265
- }
8474
+ <ng-template #rootInner let-it>
8475
+ @if (it.icon) {<poad-icon [name]="it.icon" [size]="15"/>}<span>{{ it.label }}</span>@if (it.badge != null) {<span class="poad-menubar__badge">{{ it.badge }}</span>}
8266
8476
  </ng-template>
8267
- <!-- sous-menu (overlay) : poad-menu popup ou méga-menu -->
8477
+ <ng-template #mobileInner let-it>
8478
+ @if (it.icon) {<poad-icon [name]="it.icon" [size]="15"/>}<span class="poad-menubar__mlabel">{{ it.label }}</span>@if (it.badge != null) {<span class="poad-menubar__badge">{{ it.badge }}</span>}
8479
+ </ng-template>
8480
+ <!-- panneau (overlay du CDK) : liste ou méga-menu -->
8268
8481
  <ng-template #panel>
8269
8482
  @if (openItem(); as it) {
8270
- @if (it.columns?.length) {
8271
- <div class="poad-menubar__mega poad-overlay-pane" role="menu" (mouseenter)="cancelClose()" (mouseleave)="scheduleClose(openIdx()!)" (keydown.escape)="closeAll(true)">
8272
- @for (col of it.columns; track $index) {
8273
- <div class="poad-menubar__col">
8274
- @if (col.header) {<div class="poad-menubar__colh">{{ col.header }}</div>}
8275
- @for (s of col.items; track $index) {
8276
- <button type="button" class="poad-menubar__citem" role="menuitem" [disabled]="s.disabled" (click)="activate(s, $event)">@if (s.icon) {<poad-icon [name]="s.icon" [size]="14"/>}<span>{{ s.label }}</span>@if (s.badge != null) {<span class="poad-menubar__badge">{{ s.badge }}</span>}</button>
8483
+ @if (mega()) {
8484
+ <div class="poad-menubar__mega" role="menu" [attr.aria-label]="it.label || null" (keydown)="onPanelKey($event)" (mouseenter)="cancelClose()" (mouseleave)="scheduleClose($event)">
8485
+ @for (col of columns(); track $index) {
8486
+ <div class="poad-menubar__col" role="group" [attr.aria-label]="col.header || null">
8487
+ @if (col.header) {<div class="poad-menubar__colh" aria-hidden="true">{{ col.header }}</div>}
8488
+ @for (c of col.items; track c.index) {
8489
+ <ng-container *ngTemplateOutlet="entry; context: { $implicit: c.item, index: c.index, cls: 'poad-menubar__citem', tabindex: pstate().active === c.index ? 0 : -1 }"/>
8277
8490
  }
8278
8491
  </div>
8279
8492
  }
8280
8493
  </div>
8281
8494
  } @else {
8282
- <div (mouseenter)="cancelClose()" (mouseleave)="scheduleClose(openIdx()!)"><poad-menu [items]="it.items ?? []" [minWidth]="200" (itemClick)="activate($event.item, $event.originalEvent)"/></div>
8495
+ <div class="poad-menu poad-menubar__panel" role="menu" [attr.aria-label]="it.label || null" (keydown)="onPanelKey($event)" (mouseenter)="cancelClose()" (mouseleave)="scheduleClose($event)">
8496
+ @for (s of panelItems(); track $index; let j = $index) {
8497
+ @if (s.separator) { <div class="poad-menu__sep" role="separator"></div> }
8498
+ @else {
8499
+ @let b = itemAttrs(s, j);
8500
+ <div class="poad-menu__wrap" (mouseenter)="panelHover(j)">
8501
+ @if (b['aria-haspopup']) {
8502
+ <button type="button" class="poad-menu__item" [class.is-active]="b.classes['is-active']" role="menuitem" aria-haspopup="menu" [attr.aria-expanded]="b['aria-expanded']"
8503
+ [disabled]="b.disabled" [attr.tabindex]="b.tabindex" [attr.data-idx]="j" [attr.title]="s.title || null" (click)="activate(s, $event, j)">
8504
+ @if (s.icon) {<poad-icon [name]="s.icon" [size]="14"/>}<span class="poad-menu__label">{{ s.label }}</span>
8505
+ <poad-icon class="poad-menu__sub-ic" name="chevron-right" [size]="12"/>
8506
+ </button>
8507
+ @if (pstate().sub === j) {
8508
+ <div class="poad-menu poad-menu--sub" role="menu">
8509
+ @for (x of subItems(s); track $index; let k = $index) {
8510
+ @if (x.separator) { <div class="poad-menu__sep" role="separator"></div> }
8511
+ @else { <ng-container *ngTemplateOutlet="entry; context: { $implicit: x, index: k, parent: j, cls: 'poad-menu__item', tabindex: -1 }"/> }
8512
+ }
8513
+ </div>
8514
+ }
8515
+ } @else {
8516
+ <ng-container *ngTemplateOutlet="entry; context: { $implicit: s, index: j, cls: 'poad-menu__item', tabindex: b.tabindex, active: b.classes['is-active'] }"/>
8517
+ }
8518
+ </div>
8519
+ }
8520
+ }
8521
+ </div>
8283
8522
  }
8284
8523
  }
8285
8524
  </ng-template>
8286
- `, isInline: true, styles: [":host{display:flex;align-items:center;gap:8px;min-height:48px;padding:0 12px;background:var(--poad-surface);border-bottom:1px solid var(--poad-border);font-family:var(--poad-font);font-size:var(--poad-font-size);position:relative}.poad-menubar__start,.poad-menubar__end{display:flex;align-items:center;gap:8px}.poad-menubar__end{margin-inline-start:auto}.poad-menubar__list{display:flex;align-items:center;gap:2px;list-style:none;margin:0;padding:0}.poad-menubar__root{all:unset;box-sizing:border-box;display:inline-flex;align-items:center;gap:6px;height:34px;padding:0 10px;border-radius:7px;color:var(--poad-fg-secondary);font-weight:500;cursor:pointer;position:relative;white-space:nowrap}.poad-menubar__root:hover,.poad-menubar__root.is-open{background:var(--poad-hover);color:var(--poad-fg)}.poad-menubar__root:focus-visible{outline:2px solid var(--poad-ring)}.poad-menubar__root.is-active{color:var(--poad-accent)}.poad-menubar__root.is-active:after{content:\"\";position:absolute;inset-inline-start:10px;inset-inline-end:10px;bottom:-8px;height:2px;border-radius:2px;background:var(--poad-accent)}.poad-menubar__root[disabled],.poad-menubar__root.is-disabled{opacity:.5;cursor:default}.poad-menubar__chev{color:var(--poad-fg-muted);transition:transform var(--poad-dur)}.is-open .poad-menubar__chev{transform:rotate(180deg)}.poad-menubar__badge{font:500 10.5px var(--poad-font-mono);padding:1px 6px;border-radius:999px;background:var(--poad-accent-soft);color:var(--poad-accent)}.poad-menubar__burger{all:unset;display:grid;place-items:center;width:36px;height:36px;border-radius:8px;color:var(--poad-fg-secondary);cursor:pointer}.poad-menubar__burger:hover{background:var(--poad-hover);color:var(--poad-fg)}.poad-menubar__mobile{position:absolute;inset-inline-start:0;inset-inline-end:0;top:100%;z-index:20;background:var(--poad-surface);border-bottom:1px solid var(--poad-border);box-shadow:var(--poad-shadow-lg);padding:6px 0;max-height:70vh;overflow:auto}.poad-menubar__mitem{all:unset;box-sizing:border-box;display:flex;align-items:center;gap:10px;width:100%;min-height:44px;padding:0 12px;color:var(--poad-fg);cursor:pointer}.poad-menubar__mitem:hover{background:var(--poad-hover)}.poad-menubar__mitem[disabled]{opacity:.5}.poad-menubar__mlabel{flex:1}.poad-menubar__sep{height:1px;background:var(--poad-border);margin:4px 12px}.poad-menubar__mega{display:flex;gap:22px;padding:14px 16px;background:var(--poad-overlay);--poad-hover: var(--poad-overlay-hover);border:1px solid var(--poad-border);border-radius:10px;box-shadow:var(--poad-shadow-lg)}.poad-menubar__col{display:flex;flex-direction:column;gap:2px;min-width:160px}.poad-menubar__colh{font:600 10.5px/1 var(--poad-font-mono);letter-spacing:.08em;text-transform:uppercase;color:var(--poad-fg-muted);padding:4px 8px 8px}.poad-menubar__citem{all:unset;box-sizing:border-box;display:flex;align-items:center;gap:8px;padding:7px 8px;border-radius:6px;color:var(--poad-fg);cursor:pointer;font-size:var(--poad-font-size)}.poad-menubar__citem:hover{background:var(--poad-hover)}.poad-menubar__citem:focus-visible{outline:2px solid var(--poad-ring)}.poad-menubar__citem[disabled]{opacity:.5}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "component", type: PoadIconComponent, selector: "poad-icon", inputs: ["name", "size", "strokeWidth", "label", "title", "spin", "filled", "flip", "rotate"] }, { kind: "component", type: PoadMenuComponent, selector: "poad-menu", inputs: ["items", "popup", "ariaLabel", "minWidth", "closeOnSelect", "mobile", "sheetTitle"], outputs: ["itemClick", "shown", "hidden"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
8525
+ <!-- un élément du panneau : lien routé, lien, ou bouton -->
8526
+ <ng-template #entry let-it let-index="index" let-parent="parent" let-cls="cls" let-tabindex="tabindex" let-active="active">
8527
+ @if (!it.disabled && it.routerLink) {
8528
+ <a [class]="cls" [class.is-active]="active" [class.sev-danger]="it.severity === 'danger'" role="menuitem" [routerLink]="it.routerLink" [queryParams]="it.queryParams" [attr.tabindex]="tabindex"
8529
+ [attr.data-idx]="parent == null ? index : null" [attr.data-sub-idx]="parent == null ? null : index" [attr.title]="it.title || null"
8530
+ (mouseenter)="parent == null ? null : subHover(index)" (click)="activate(it, $event, index, parent)"><ng-container *ngTemplateOutlet="entryInner; context: { $implicit: it }"/></a>
8531
+ } @else if (!it.disabled && it.url) {
8532
+ <a [class]="cls" [class.is-active]="active" [class.sev-danger]="it.severity === 'danger'" role="menuitem" [href]="it.url" [attr.target]="it.target || null"
8533
+ [attr.aria-current]="isCurrent(it) ? 'page' : null" [attr.tabindex]="tabindex" [attr.data-idx]="parent == null ? index : null" [attr.data-sub-idx]="parent == null ? null : index"
8534
+ [attr.title]="it.title || null" (mouseenter)="parent == null ? null : subHover(index)" (click)="activate(it, $event, index, parent)"><ng-container *ngTemplateOutlet="entryInner; context: { $implicit: it }"/></a>
8535
+ } @else {
8536
+ <button type="button" [class]="cls" [class.is-active]="active" [class.sev-danger]="it.severity === 'danger'" role="menuitem" [disabled]="it.disabled" [attr.tabindex]="tabindex"
8537
+ [attr.data-idx]="parent == null ? index : null" [attr.data-sub-idx]="parent == null ? null : index" [attr.title]="it.title || null"
8538
+ (mouseenter)="parent == null ? null : subHover(index)" (click)="activate(it, $event, index, parent)"><ng-container *ngTemplateOutlet="entryInner; context: { $implicit: it }"/></button>
8539
+ }
8540
+ </ng-template>
8541
+ <ng-template #entryInner let-it>
8542
+ @if (it.icon) {<poad-icon [name]="it.icon" [size]="14"/>}<span class="poad-menu__label">{{ it.label }}</span>@if (it.badge != null) {<span class="poad-menubar__badge">{{ it.badge }}</span>}
8543
+ </ng-template>
8544
+ `, isInline: true, styles: [".poad-menubar{display:flex;align-items:center;gap:8px;min-height:48px;padding:0 12px;background:var(--poad-surface);border-bottom:1px solid var(--poad-border);font-family:var(--poad-font);font-size:var(--poad-font-size);color:var(--poad-fg);position:relative;box-sizing:border-box}.poad-menubar .poad-menubar__start,.poad-menubar .poad-menubar__end{display:flex;align-items:center;gap:8px}.poad-menubar .poad-menubar__start:empty,.poad-menubar .poad-menubar__end:empty{display:none}.poad-menubar .poad-menubar__end{margin-inline-start:auto}.poad-menubar.is-mobile .poad-menubar__start{flex:1 1 auto}.poad-menubar .poad-menubar__list{display:flex;align-items:center;gap:2px;list-style:none;margin:0;padding:0;min-width:0}.poad-menubar .poad-menubar__list>li{display:flex}.poad-menubar .poad-menubar__root{all:unset;box-sizing:border-box;display:inline-flex;align-items:center;gap:6px;height:34px;padding:0 10px;border-radius:7px;color:var(--poad-fg-secondary);font-weight:500;cursor:pointer;position:relative;white-space:nowrap}.poad-menubar .poad-menubar__root:hover,.poad-menubar .poad-menubar__root.is-open{background:var(--poad-hover);color:var(--poad-fg)}.poad-menubar .poad-menubar__root:focus-visible{outline:2px solid var(--poad-ring);outline-offset:-2px}.poad-menubar .poad-menubar__root.is-active{color:var(--poad-accent)}.poad-menubar .poad-menubar__root.is-active:after{content:\"\";position:absolute;inset-inline-start:10px;inset-inline-end:10px;bottom:-7px;height:2px;border-radius:2px;background:var(--poad-accent)}.poad-menubar .poad-menubar__root.is-disabled{opacity:.5;cursor:default}.poad-menubar .poad-menubar__root.is-disabled:hover{background:none;color:var(--poad-fg-secondary)}.poad-menubar .poad-menubar__chev{color:var(--poad-fg-muted);transition:transform var(--poad-dur)}.poad-menubar .poad-menubar__root.is-open .poad-menubar__chev{transform:rotate(180deg)}.poad-menubar .poad-menubar__badge,.poad-menubar__mega .poad-menubar__badge{font:500 10.5px var(--poad-font-mono);padding:1px 6px;border-radius:999px;background:var(--poad-accent-soft);color:var(--poad-accent)}.poad-menubar .poad-menubar__burger{all:unset;box-sizing:border-box;display:grid;place-items:center;width:36px;height:36px;border-radius:8px;color:var(--poad-fg-secondary);cursor:pointer}.poad-menubar .poad-menubar__burger:hover{background:var(--poad-hover);color:var(--poad-fg)}.poad-menubar .poad-menubar__burger:focus-visible{outline:2px solid var(--poad-ring);outline-offset:-2px}.poad-menubar .poad-menubar__mobile{position:absolute;inset-inline-start:0;inset-inline-end:0;top:100%;z-index:20;background:var(--poad-surface);border-bottom:1px solid var(--poad-border);box-shadow:var(--poad-shadow-lg);padding:6px 0;max-height:70vh;overflow:auto}.poad-menubar .poad-menubar__mitem{all:unset;box-sizing:border-box;display:flex;align-items:center;gap:10px;width:100%;min-height:44px;padding-inline-end:12px;color:var(--poad-fg);cursor:pointer}.poad-menubar .poad-menubar__mitem:hover{background:var(--poad-hover)}.poad-menubar .poad-menubar__mitem:focus-visible{outline:2px solid var(--poad-ring);outline-offset:-2px}.poad-menubar .poad-menubar__mitem.is-active{color:var(--poad-accent);font-weight:500}.poad-menubar .poad-menubar__mitem[disabled],.poad-menubar .poad-menubar__mitem[aria-disabled=true]{opacity:.5;cursor:default}.poad-menubar .poad-menubar__mlabel{flex:1}.poad-menubar .poad-menubar__sep{height:1px;background:var(--poad-border);margin:4px 12px}.poad-menu.poad-menubar__panel{min-width:200px}.poad-menu.poad-menubar__panel a.poad-menu__item{color:inherit;text-decoration:none}.poad-menubar__mega[role=menu]{display:flex;gap:22px;padding:14px 16px;background:var(--poad-overlay);--poad-hover: var(--poad-overlay-hover);border:1px solid var(--poad-border);border-radius:10px;box-shadow:var(--poad-shadow-lg);font-family:var(--poad-font);font-size:var(--poad-font-size);color:var(--poad-fg);box-sizing:border-box}.poad-menubar__mega .poad-menubar__col{display:flex;flex-direction:column;gap:2px;min-width:160px}.poad-menubar__mega .poad-menubar__colh{font:600 10.5px/1 var(--poad-font-mono);letter-spacing:.08em;text-transform:uppercase;color:var(--poad-fg-muted);padding:4px 8px 8px}.poad-menubar__mega .poad-menubar__citem{all:unset;box-sizing:border-box;display:flex;align-items:center;gap:8px;padding:7px 8px;border-radius:6px;color:var(--poad-fg);cursor:pointer;font-size:var(--poad-font-size)}.poad-menubar__mega .poad-menubar__citem:hover:not([disabled]){background:var(--poad-hover)}.poad-menubar__mega .poad-menubar__citem:focus-visible{outline:2px solid var(--poad-ring);outline-offset:-2px}.poad-menubar__mega .poad-menubar__citem[disabled]{opacity:.5;cursor:not-allowed}\n", ".poad-menu-host{display:contents}.poad-menu-host.is-inline{display:block}.poad-menu[role=menu]{background:var(--poad-overlay);--poad-hover: var(--poad-overlay-hover);border:1px solid var(--poad-border);border-radius:9px;box-shadow:var(--poad-shadow-lg);padding:4px;min-width:180px;font-family:var(--poad-font);font-size:var(--poad-font-size);color:var(--poad-fg);box-sizing:border-box}.poad-menu-host.is-inline>.poad-menu{box-shadow:none}.poad-menu .poad-menu__wrap{position:relative}.poad-menu .poad-menu__item{all:unset;box-sizing:border-box;display:flex;align-items:center;gap:8px;width:100%;padding:6px 8px;border-radius:6px;cursor:pointer;white-space:nowrap}.poad-menu .poad-menu__item:hover:not([disabled]),.poad-menu .poad-menu__item.is-active:not([disabled]){background:var(--poad-hover)}.poad-menu .poad-menu__item:focus-visible{outline:2px solid var(--poad-ring);outline-offset:-2px}.poad-menu .poad-menu__item[disabled]{opacity:.5;cursor:not-allowed}.poad-menu .poad-menu__item.sev-danger{color:var(--poad-danger)}.poad-menu .poad-menu__item.sev-danger:hover:not([disabled]){background:var(--poad-danger-soft)}.poad-menu .poad-menu__ph{width:14px;flex:none}.poad-menu .poad-menu__label{flex:1}.poad-menu .poad-menu__kbd{font:11px var(--poad-font-mono);color:var(--poad-fg-muted);margin-inline-start:16px}.poad-menu .poad-menu__badge{font:500 10.5px var(--poad-font-mono);padding:1px 6px;border-radius:999px;background:var(--poad-accent-soft);color:var(--poad-accent)}.poad-menu .poad-menu__sub-ic{color:var(--poad-fg-muted);margin-inline-start:8px}.poad-menu .poad-menu__sep{height:1px;background:var(--poad-border);margin:4px 6px}.poad-menu .poad-menu--sub{position:absolute;top:-5px;inset-inline-start:calc(100% + 2px);z-index:1}.poad-split-button{display:inline-flex;align-items:stretch;vertical-align:middle}.poad-split-button .poad-split-button__main{border-start-end-radius:0!important;border-end-end-radius:0!important}.poad-split-button .poad-split-button__toggle{border-start-start-radius:0!important;border-end-start-radius:0!important;margin-inline-start:-1px;box-shadow:inset 1px 0 #ffffff47}.poad-split-button .var-outline.poad-split-button__toggle,.poad-split-button .var-text.poad-split-button__toggle{box-shadow:none;border-inline-start-color:transparent}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "component", type: PoadIconComponent, selector: "poad-icon", inputs: ["name", "size", "strokeWidth", "label", "title", "spin", "filled", "flip", "rotate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
8287
8545
  }
8288
8546
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: PoadMenubarComponent, decorators: [{
8289
8547
  type: Component,
8290
- args: [{ selector: 'poad-menubar', standalone: true, imports: [NgTemplateOutlet, RouterLink, RouterLinkActive, PoadIconComponent, PoadMenuComponent], changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'poad-menubar', '[class.is-mobile]': 'mobile()', '[class.is-open]': 'mobileOpen()' }, template: `
8548
+ args: [{ selector: 'poad-menubar', standalone: true, imports: [NgTemplateOutlet, RouterLink, RouterLinkActive, PoadIconComponent], changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'poad-menubar', '[class.is-mobile]': 'collapsed()', '[class.is-open]': 'mobileOpen()' }, template: `
8291
8549
  <div class="poad-menubar__start"><ng-content select="[poadMenubarStart]"/></div>
8292
- @if (!mobile()) {
8293
- <ul class="poad-menubar__list" role="menubar" [attr.aria-label]="ariaLabel() || null" (keydown)="onKey($event)">
8294
- @for (it of visible(); track $index; let i = $index) {
8295
- <li role="none" (mouseenter)="hoverOpen(i, it, $event)" (mouseleave)="scheduleClose(i)">
8296
- @if (it.routerLink && !hasChildren(it)) {
8297
- <a #root class="poad-menubar__root" role="menuitem" [routerLink]="it.routerLink" [queryParams]="it.queryParams" routerLinkActive="is-active" [class.is-disabled]="it.disabled" [attr.tabindex]="focusIdx() === i ? 0 : -1" [attr.data-idx]="i" (click)="clickRoot(it, $event, i, root)">
8298
- @if (it.icon) {<poad-icon [name]="it.icon" [size]="15"/>}<span>{{ it.label }}</span>@if (it.badge != null) {<span class="poad-menubar__badge">{{ it.badge }}</span>}
8550
+ @if (!collapsed()) {
8551
+ <ul class="poad-menubar__list" role="menubar" [attr.aria-label]="ariaLabel() || null" (keydown)="onRootKey($event)">
8552
+ @for (it of roots(); track $index; let i = $index) {
8553
+ @let a = rootAttrs(it, i);
8554
+ <li role="none" (mousemove)="hover(i, $event)" (mouseleave)="scheduleClose($event)">
8555
+ @if (!hasPanel(it) && !it.disabled && it.routerLink) {
8556
+ <a class="poad-menubar__root" [class.is-active]="a.classes['is-active']" role="menuitem" [routerLink]="it.routerLink" [queryParams]="it.queryParams" routerLinkActive="is-active"
8557
+ [attr.aria-current]="a['aria-current']" [attr.tabindex]="a.tabindex" [attr.data-idx]="i" [attr.title]="it.title || null" (click)="chooseRoot(it, $event, i)">
8558
+ <ng-container *ngTemplateOutlet="rootInner; context: { $implicit: it }"/>
8559
+ </a>
8560
+ } @else if (!hasPanel(it) && !it.disabled && it.url) {
8561
+ <a class="poad-menubar__root" [class.is-active]="a.classes['is-active']" role="menuitem" [href]="it.url" [attr.target]="it.target || null"
8562
+ [attr.aria-current]="a['aria-current']" [attr.tabindex]="a.tabindex" [attr.data-idx]="i" [attr.title]="it.title || null" (click)="chooseRoot(it, $event, i)">
8563
+ <ng-container *ngTemplateOutlet="rootInner; context: { $implicit: it }"/>
8299
8564
  </a>
8300
8565
  } @else {
8301
- <button #root type="button" class="poad-menubar__root" role="menuitem" [class.is-open]="openIdx() === i" [disabled]="it.disabled" [attr.aria-haspopup]="hasChildren(it) ? 'menu' : null" [attr.aria-expanded]="hasChildren(it) ? openIdx() === i : null" [attr.tabindex]="focusIdx() === i ? 0 : -1" [attr.data-idx]="i" (click)="clickRoot(it, $event, i, root)">
8302
- @if (it.icon) {<poad-icon [name]="it.icon" [size]="15"/>}<span>{{ it.label }}</span>@if (it.badge != null) {<span class="poad-menubar__badge">{{ it.badge }}</span>}
8303
- @if (hasChildren(it)) {<poad-icon class="poad-menubar__chev" name="chevron-down" [size]="12"/>}
8566
+ <button type="button" class="poad-menubar__root" [class.is-open]="a.classes['is-open']" [class.is-active]="a.classes['is-active']" [class.is-disabled]="a.classes['is-disabled']"
8567
+ role="menuitem" [attr.aria-haspopup]="a['aria-haspopup']" [attr.aria-expanded]="a['aria-expanded']" [attr.aria-disabled]="a['aria-disabled']" [attr.tabindex]="a.tabindex"
8568
+ [attr.data-idx]="i" [attr.title]="it.title || null" (click)="clickRoot(it, $event, i)">
8569
+ <ng-container *ngTemplateOutlet="rootInner; context: { $implicit: it }"/>
8570
+ @if (hasPanel(it)) {<poad-icon class="poad-menubar__chev" name="chevron-down" [size]="12"/>}
8304
8571
  </button>
8305
8572
  }
8306
8573
  </li>
8307
8574
  }
8308
8575
  </ul>
8309
8576
  } @else {
8310
- <button type="button" class="poad-menubar__burger" [attr.aria-label]="i18n.t('nav.menu')" [attr.aria-expanded]="mobileOpen()" (click)="mobileOpen.set(!mobileOpen())"><poad-icon [name]="mobileOpen() ? 'x' : 'menu'" [size]="18"/></button>
8577
+ <button type="button" class="poad-menubar__burger" [attr.aria-label]="i18n.t('nav.menu')" [attr.aria-expanded]="mobileOpen()" [attr.aria-controls]="id + '-mobile'"
8578
+ (click)="toggleMobile()"><poad-icon [name]="mobileOpen() ? 'x' : 'menu'" [size]="18"/></button>
8311
8579
  }
8312
8580
  <div class="poad-menubar__end"><ng-content select="[poadMenubarEnd]"/></div>
8313
- @if (mobile() && mobileOpen()) {
8314
- <div class="poad-menubar__mobile" role="menu">
8315
- @for (it of visible(); track $index; let i = $index) { <ng-container *ngTemplateOutlet="mobileItem; context: { $implicit: it, level: 0 }"/> }
8581
+ @if (collapsed() && mobileOpen()) {
8582
+ <div class="poad-menubar__mobile" [id]="id + '-mobile'" (keydown)="onMobileKey($event)">
8583
+ @for (r of mobileRows(); track r.key) {
8584
+ @if (r.separator) { <div class="poad-menubar__sep"></div> }
8585
+ @else if (r.group) {
8586
+ <button type="button" class="poad-menubar__mitem" [style.padding-inline-start.px]="indent(r.level)" [disabled]="r.item.disabled" [attr.aria-expanded]="r.expanded"
8587
+ (click)="toggleGroup(r.key)">
8588
+ @if (r.item.icon) {<poad-icon [name]="r.item.icon" [size]="15"/>}<span class="poad-menubar__mlabel">{{ r.item.label }}</span>
8589
+ <poad-icon [name]="r.expanded ? 'chevron-up' : 'chevron-down'" [size]="13"/>
8590
+ </button>
8591
+ } @else if (!r.item.disabled && r.item.routerLink) {
8592
+ <a class="poad-menubar__mitem" [class.is-active]="isCurrent(r.item)" [style.padding-inline-start.px]="indent(r.level)" [routerLink]="r.item.routerLink" [queryParams]="r.item.queryParams"
8593
+ routerLinkActive="is-active" (click)="chooseMobile(r.item, $event)"><ng-container *ngTemplateOutlet="mobileInner; context: { $implicit: r.item }"/></a>
8594
+ } @else if (!r.item.disabled && r.item.url) {
8595
+ <a class="poad-menubar__mitem" [class.is-active]="isCurrent(r.item)" [attr.aria-current]="isCurrent(r.item) ? 'page' : null" [style.padding-inline-start.px]="indent(r.level)"
8596
+ [href]="r.item.url" [attr.target]="r.item.target || null" (click)="chooseMobile(r.item, $event)"><ng-container *ngTemplateOutlet="mobileInner; context: { $implicit: r.item }"/></a>
8597
+ } @else {
8598
+ <button type="button" class="poad-menubar__mitem" [style.padding-inline-start.px]="indent(r.level)" [disabled]="r.item.disabled" (click)="chooseMobile(r.item, $event)">
8599
+ <ng-container *ngTemplateOutlet="mobileInner; context: { $implicit: r.item }"/>
8600
+ </button>
8601
+ }
8602
+ }
8316
8603
  </div>
8317
8604
  }
8318
- <ng-template #mobileItem let-it let-level="level">
8319
- @if (it.separator) { <div class="poad-menubar__sep"></div> }
8320
- @else {
8321
- <button type="button" class="poad-menubar__mitem" role="menuitem" [style.padding-left.px]="12 + level * 16" [disabled]="it.disabled" [attr.aria-expanded]="hasChildren(it) ? mExpanded().has(it) : null" (click)="mobileClick(it, $event)">
8322
- @if (it.icon) {<poad-icon [name]="it.icon" [size]="15"/>}<span class="poad-menubar__mlabel">{{ it.label }}</span>
8323
- @if (hasChildren(it)) {<poad-icon [name]="mExpanded().has(it) ? 'chevron-up' : 'chevron-down'" [size]="13"/>}
8324
- </button>
8325
- @if (hasChildren(it) && mExpanded().has(it)) {
8326
- @for (s of childrenOf(it); track $index) { <ng-container *ngTemplateOutlet="mobileItem; context: { $implicit: s, level: level + 1 }"/> }
8327
- }
8328
- }
8605
+ <ng-template #rootInner let-it>
8606
+ @if (it.icon) {<poad-icon [name]="it.icon" [size]="15"/>}<span>{{ it.label }}</span>@if (it.badge != null) {<span class="poad-menubar__badge">{{ it.badge }}</span>}
8607
+ </ng-template>
8608
+ <ng-template #mobileInner let-it>
8609
+ @if (it.icon) {<poad-icon [name]="it.icon" [size]="15"/>}<span class="poad-menubar__mlabel">{{ it.label }}</span>@if (it.badge != null) {<span class="poad-menubar__badge">{{ it.badge }}</span>}
8329
8610
  </ng-template>
8330
- <!-- sous-menu (overlay) : poad-menu popup ou méga-menu -->
8611
+ <!-- panneau (overlay du CDK) : liste ou méga-menu -->
8331
8612
  <ng-template #panel>
8332
8613
  @if (openItem(); as it) {
8333
- @if (it.columns?.length) {
8334
- <div class="poad-menubar__mega poad-overlay-pane" role="menu" (mouseenter)="cancelClose()" (mouseleave)="scheduleClose(openIdx()!)" (keydown.escape)="closeAll(true)">
8335
- @for (col of it.columns; track $index) {
8336
- <div class="poad-menubar__col">
8337
- @if (col.header) {<div class="poad-menubar__colh">{{ col.header }}</div>}
8338
- @for (s of col.items; track $index) {
8339
- <button type="button" class="poad-menubar__citem" role="menuitem" [disabled]="s.disabled" (click)="activate(s, $event)">@if (s.icon) {<poad-icon [name]="s.icon" [size]="14"/>}<span>{{ s.label }}</span>@if (s.badge != null) {<span class="poad-menubar__badge">{{ s.badge }}</span>}</button>
8614
+ @if (mega()) {
8615
+ <div class="poad-menubar__mega" role="menu" [attr.aria-label]="it.label || null" (keydown)="onPanelKey($event)" (mouseenter)="cancelClose()" (mouseleave)="scheduleClose($event)">
8616
+ @for (col of columns(); track $index) {
8617
+ <div class="poad-menubar__col" role="group" [attr.aria-label]="col.header || null">
8618
+ @if (col.header) {<div class="poad-menubar__colh" aria-hidden="true">{{ col.header }}</div>}
8619
+ @for (c of col.items; track c.index) {
8620
+ <ng-container *ngTemplateOutlet="entry; context: { $implicit: c.item, index: c.index, cls: 'poad-menubar__citem', tabindex: pstate().active === c.index ? 0 : -1 }"/>
8340
8621
  }
8341
8622
  </div>
8342
8623
  }
8343
8624
  </div>
8344
8625
  } @else {
8345
- <div (mouseenter)="cancelClose()" (mouseleave)="scheduleClose(openIdx()!)"><poad-menu [items]="it.items ?? []" [minWidth]="200" (itemClick)="activate($event.item, $event.originalEvent)"/></div>
8626
+ <div class="poad-menu poad-menubar__panel" role="menu" [attr.aria-label]="it.label || null" (keydown)="onPanelKey($event)" (mouseenter)="cancelClose()" (mouseleave)="scheduleClose($event)">
8627
+ @for (s of panelItems(); track $index; let j = $index) {
8628
+ @if (s.separator) { <div class="poad-menu__sep" role="separator"></div> }
8629
+ @else {
8630
+ @let b = itemAttrs(s, j);
8631
+ <div class="poad-menu__wrap" (mouseenter)="panelHover(j)">
8632
+ @if (b['aria-haspopup']) {
8633
+ <button type="button" class="poad-menu__item" [class.is-active]="b.classes['is-active']" role="menuitem" aria-haspopup="menu" [attr.aria-expanded]="b['aria-expanded']"
8634
+ [disabled]="b.disabled" [attr.tabindex]="b.tabindex" [attr.data-idx]="j" [attr.title]="s.title || null" (click)="activate(s, $event, j)">
8635
+ @if (s.icon) {<poad-icon [name]="s.icon" [size]="14"/>}<span class="poad-menu__label">{{ s.label }}</span>
8636
+ <poad-icon class="poad-menu__sub-ic" name="chevron-right" [size]="12"/>
8637
+ </button>
8638
+ @if (pstate().sub === j) {
8639
+ <div class="poad-menu poad-menu--sub" role="menu">
8640
+ @for (x of subItems(s); track $index; let k = $index) {
8641
+ @if (x.separator) { <div class="poad-menu__sep" role="separator"></div> }
8642
+ @else { <ng-container *ngTemplateOutlet="entry; context: { $implicit: x, index: k, parent: j, cls: 'poad-menu__item', tabindex: -1 }"/> }
8643
+ }
8644
+ </div>
8645
+ }
8646
+ } @else {
8647
+ <ng-container *ngTemplateOutlet="entry; context: { $implicit: s, index: j, cls: 'poad-menu__item', tabindex: b.tabindex, active: b.classes['is-active'] }"/>
8648
+ }
8649
+ </div>
8650
+ }
8651
+ }
8652
+ </div>
8346
8653
  }
8347
8654
  }
8348
8655
  </ng-template>
8349
- `, styles: [":host{display:flex;align-items:center;gap:8px;min-height:48px;padding:0 12px;background:var(--poad-surface);border-bottom:1px solid var(--poad-border);font-family:var(--poad-font);font-size:var(--poad-font-size);position:relative}.poad-menubar__start,.poad-menubar__end{display:flex;align-items:center;gap:8px}.poad-menubar__end{margin-inline-start:auto}.poad-menubar__list{display:flex;align-items:center;gap:2px;list-style:none;margin:0;padding:0}.poad-menubar__root{all:unset;box-sizing:border-box;display:inline-flex;align-items:center;gap:6px;height:34px;padding:0 10px;border-radius:7px;color:var(--poad-fg-secondary);font-weight:500;cursor:pointer;position:relative;white-space:nowrap}.poad-menubar__root:hover,.poad-menubar__root.is-open{background:var(--poad-hover);color:var(--poad-fg)}.poad-menubar__root:focus-visible{outline:2px solid var(--poad-ring)}.poad-menubar__root.is-active{color:var(--poad-accent)}.poad-menubar__root.is-active:after{content:\"\";position:absolute;inset-inline-start:10px;inset-inline-end:10px;bottom:-8px;height:2px;border-radius:2px;background:var(--poad-accent)}.poad-menubar__root[disabled],.poad-menubar__root.is-disabled{opacity:.5;cursor:default}.poad-menubar__chev{color:var(--poad-fg-muted);transition:transform var(--poad-dur)}.is-open .poad-menubar__chev{transform:rotate(180deg)}.poad-menubar__badge{font:500 10.5px var(--poad-font-mono);padding:1px 6px;border-radius:999px;background:var(--poad-accent-soft);color:var(--poad-accent)}.poad-menubar__burger{all:unset;display:grid;place-items:center;width:36px;height:36px;border-radius:8px;color:var(--poad-fg-secondary);cursor:pointer}.poad-menubar__burger:hover{background:var(--poad-hover);color:var(--poad-fg)}.poad-menubar__mobile{position:absolute;inset-inline-start:0;inset-inline-end:0;top:100%;z-index:20;background:var(--poad-surface);border-bottom:1px solid var(--poad-border);box-shadow:var(--poad-shadow-lg);padding:6px 0;max-height:70vh;overflow:auto}.poad-menubar__mitem{all:unset;box-sizing:border-box;display:flex;align-items:center;gap:10px;width:100%;min-height:44px;padding:0 12px;color:var(--poad-fg);cursor:pointer}.poad-menubar__mitem:hover{background:var(--poad-hover)}.poad-menubar__mitem[disabled]{opacity:.5}.poad-menubar__mlabel{flex:1}.poad-menubar__sep{height:1px;background:var(--poad-border);margin:4px 12px}.poad-menubar__mega{display:flex;gap:22px;padding:14px 16px;background:var(--poad-overlay);--poad-hover: var(--poad-overlay-hover);border:1px solid var(--poad-border);border-radius:10px;box-shadow:var(--poad-shadow-lg)}.poad-menubar__col{display:flex;flex-direction:column;gap:2px;min-width:160px}.poad-menubar__colh{font:600 10.5px/1 var(--poad-font-mono);letter-spacing:.08em;text-transform:uppercase;color:var(--poad-fg-muted);padding:4px 8px 8px}.poad-menubar__citem{all:unset;box-sizing:border-box;display:flex;align-items:center;gap:8px;padding:7px 8px;border-radius:6px;color:var(--poad-fg);cursor:pointer;font-size:var(--poad-font-size)}.poad-menubar__citem:hover{background:var(--poad-hover)}.poad-menubar__citem:focus-visible{outline:2px solid var(--poad-ring)}.poad-menubar__citem[disabled]{opacity:.5}\n"] }]
8350
- }], ctorParameters: () => [], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], breakpoint: [{ type: i0.Input, args: [{ isSignal: true, alias: "breakpoint", required: false }] }], openOnHover: [{ type: i0.Input, args: [{ isSignal: true, alias: "openOnHover", required: false }] }], itemClick: [{ type: i0.Output, args: ["itemClick"] }], opened: [{ type: i0.Output, args: ["opened"] }], closed: [{ type: i0.Output, args: ["closed"] }], panelTpl: [{ type: i0.ViewChild, args: ['panel', { isSignal: true }] }] } });
8656
+ <!-- un élément du panneau : lien routé, lien, ou bouton -->
8657
+ <ng-template #entry let-it let-index="index" let-parent="parent" let-cls="cls" let-tabindex="tabindex" let-active="active">
8658
+ @if (!it.disabled && it.routerLink) {
8659
+ <a [class]="cls" [class.is-active]="active" [class.sev-danger]="it.severity === 'danger'" role="menuitem" [routerLink]="it.routerLink" [queryParams]="it.queryParams" [attr.tabindex]="tabindex"
8660
+ [attr.data-idx]="parent == null ? index : null" [attr.data-sub-idx]="parent == null ? null : index" [attr.title]="it.title || null"
8661
+ (mouseenter)="parent == null ? null : subHover(index)" (click)="activate(it, $event, index, parent)"><ng-container *ngTemplateOutlet="entryInner; context: { $implicit: it }"/></a>
8662
+ } @else if (!it.disabled && it.url) {
8663
+ <a [class]="cls" [class.is-active]="active" [class.sev-danger]="it.severity === 'danger'" role="menuitem" [href]="it.url" [attr.target]="it.target || null"
8664
+ [attr.aria-current]="isCurrent(it) ? 'page' : null" [attr.tabindex]="tabindex" [attr.data-idx]="parent == null ? index : null" [attr.data-sub-idx]="parent == null ? null : index"
8665
+ [attr.title]="it.title || null" (mouseenter)="parent == null ? null : subHover(index)" (click)="activate(it, $event, index, parent)"><ng-container *ngTemplateOutlet="entryInner; context: { $implicit: it }"/></a>
8666
+ } @else {
8667
+ <button type="button" [class]="cls" [class.is-active]="active" [class.sev-danger]="it.severity === 'danger'" role="menuitem" [disabled]="it.disabled" [attr.tabindex]="tabindex"
8668
+ [attr.data-idx]="parent == null ? index : null" [attr.data-sub-idx]="parent == null ? null : index" [attr.title]="it.title || null"
8669
+ (mouseenter)="parent == null ? null : subHover(index)" (click)="activate(it, $event, index, parent)"><ng-container *ngTemplateOutlet="entryInner; context: { $implicit: it }"/></button>
8670
+ }
8671
+ </ng-template>
8672
+ <ng-template #entryInner let-it>
8673
+ @if (it.icon) {<poad-icon [name]="it.icon" [size]="14"/>}<span class="poad-menu__label">{{ it.label }}</span>@if (it.badge != null) {<span class="poad-menubar__badge">{{ it.badge }}</span>}
8674
+ </ng-template>
8675
+ `, encapsulation: ViewEncapsulation.None, styles: [".poad-menubar{display:flex;align-items:center;gap:8px;min-height:48px;padding:0 12px;background:var(--poad-surface);border-bottom:1px solid var(--poad-border);font-family:var(--poad-font);font-size:var(--poad-font-size);color:var(--poad-fg);position:relative;box-sizing:border-box}.poad-menubar .poad-menubar__start,.poad-menubar .poad-menubar__end{display:flex;align-items:center;gap:8px}.poad-menubar .poad-menubar__start:empty,.poad-menubar .poad-menubar__end:empty{display:none}.poad-menubar .poad-menubar__end{margin-inline-start:auto}.poad-menubar.is-mobile .poad-menubar__start{flex:1 1 auto}.poad-menubar .poad-menubar__list{display:flex;align-items:center;gap:2px;list-style:none;margin:0;padding:0;min-width:0}.poad-menubar .poad-menubar__list>li{display:flex}.poad-menubar .poad-menubar__root{all:unset;box-sizing:border-box;display:inline-flex;align-items:center;gap:6px;height:34px;padding:0 10px;border-radius:7px;color:var(--poad-fg-secondary);font-weight:500;cursor:pointer;position:relative;white-space:nowrap}.poad-menubar .poad-menubar__root:hover,.poad-menubar .poad-menubar__root.is-open{background:var(--poad-hover);color:var(--poad-fg)}.poad-menubar .poad-menubar__root:focus-visible{outline:2px solid var(--poad-ring);outline-offset:-2px}.poad-menubar .poad-menubar__root.is-active{color:var(--poad-accent)}.poad-menubar .poad-menubar__root.is-active:after{content:\"\";position:absolute;inset-inline-start:10px;inset-inline-end:10px;bottom:-7px;height:2px;border-radius:2px;background:var(--poad-accent)}.poad-menubar .poad-menubar__root.is-disabled{opacity:.5;cursor:default}.poad-menubar .poad-menubar__root.is-disabled:hover{background:none;color:var(--poad-fg-secondary)}.poad-menubar .poad-menubar__chev{color:var(--poad-fg-muted);transition:transform var(--poad-dur)}.poad-menubar .poad-menubar__root.is-open .poad-menubar__chev{transform:rotate(180deg)}.poad-menubar .poad-menubar__badge,.poad-menubar__mega .poad-menubar__badge{font:500 10.5px var(--poad-font-mono);padding:1px 6px;border-radius:999px;background:var(--poad-accent-soft);color:var(--poad-accent)}.poad-menubar .poad-menubar__burger{all:unset;box-sizing:border-box;display:grid;place-items:center;width:36px;height:36px;border-radius:8px;color:var(--poad-fg-secondary);cursor:pointer}.poad-menubar .poad-menubar__burger:hover{background:var(--poad-hover);color:var(--poad-fg)}.poad-menubar .poad-menubar__burger:focus-visible{outline:2px solid var(--poad-ring);outline-offset:-2px}.poad-menubar .poad-menubar__mobile{position:absolute;inset-inline-start:0;inset-inline-end:0;top:100%;z-index:20;background:var(--poad-surface);border-bottom:1px solid var(--poad-border);box-shadow:var(--poad-shadow-lg);padding:6px 0;max-height:70vh;overflow:auto}.poad-menubar .poad-menubar__mitem{all:unset;box-sizing:border-box;display:flex;align-items:center;gap:10px;width:100%;min-height:44px;padding-inline-end:12px;color:var(--poad-fg);cursor:pointer}.poad-menubar .poad-menubar__mitem:hover{background:var(--poad-hover)}.poad-menubar .poad-menubar__mitem:focus-visible{outline:2px solid var(--poad-ring);outline-offset:-2px}.poad-menubar .poad-menubar__mitem.is-active{color:var(--poad-accent);font-weight:500}.poad-menubar .poad-menubar__mitem[disabled],.poad-menubar .poad-menubar__mitem[aria-disabled=true]{opacity:.5;cursor:default}.poad-menubar .poad-menubar__mlabel{flex:1}.poad-menubar .poad-menubar__sep{height:1px;background:var(--poad-border);margin:4px 12px}.poad-menu.poad-menubar__panel{min-width:200px}.poad-menu.poad-menubar__panel a.poad-menu__item{color:inherit;text-decoration:none}.poad-menubar__mega[role=menu]{display:flex;gap:22px;padding:14px 16px;background:var(--poad-overlay);--poad-hover: var(--poad-overlay-hover);border:1px solid var(--poad-border);border-radius:10px;box-shadow:var(--poad-shadow-lg);font-family:var(--poad-font);font-size:var(--poad-font-size);color:var(--poad-fg);box-sizing:border-box}.poad-menubar__mega .poad-menubar__col{display:flex;flex-direction:column;gap:2px;min-width:160px}.poad-menubar__mega .poad-menubar__colh{font:600 10.5px/1 var(--poad-font-mono);letter-spacing:.08em;text-transform:uppercase;color:var(--poad-fg-muted);padding:4px 8px 8px}.poad-menubar__mega .poad-menubar__citem{all:unset;box-sizing:border-box;display:flex;align-items:center;gap:8px;padding:7px 8px;border-radius:6px;color:var(--poad-fg);cursor:pointer;font-size:var(--poad-font-size)}.poad-menubar__mega .poad-menubar__citem:hover:not([disabled]){background:var(--poad-hover)}.poad-menubar__mega .poad-menubar__citem:focus-visible{outline:2px solid var(--poad-ring);outline-offset:-2px}.poad-menubar__mega .poad-menubar__citem[disabled]{opacity:.5;cursor:not-allowed}\n", ".poad-menu-host{display:contents}.poad-menu-host.is-inline{display:block}.poad-menu[role=menu]{background:var(--poad-overlay);--poad-hover: var(--poad-overlay-hover);border:1px solid var(--poad-border);border-radius:9px;box-shadow:var(--poad-shadow-lg);padding:4px;min-width:180px;font-family:var(--poad-font);font-size:var(--poad-font-size);color:var(--poad-fg);box-sizing:border-box}.poad-menu-host.is-inline>.poad-menu{box-shadow:none}.poad-menu .poad-menu__wrap{position:relative}.poad-menu .poad-menu__item{all:unset;box-sizing:border-box;display:flex;align-items:center;gap:8px;width:100%;padding:6px 8px;border-radius:6px;cursor:pointer;white-space:nowrap}.poad-menu .poad-menu__item:hover:not([disabled]),.poad-menu .poad-menu__item.is-active:not([disabled]){background:var(--poad-hover)}.poad-menu .poad-menu__item:focus-visible{outline:2px solid var(--poad-ring);outline-offset:-2px}.poad-menu .poad-menu__item[disabled]{opacity:.5;cursor:not-allowed}.poad-menu .poad-menu__item.sev-danger{color:var(--poad-danger)}.poad-menu .poad-menu__item.sev-danger:hover:not([disabled]){background:var(--poad-danger-soft)}.poad-menu .poad-menu__ph{width:14px;flex:none}.poad-menu .poad-menu__label{flex:1}.poad-menu .poad-menu__kbd{font:11px var(--poad-font-mono);color:var(--poad-fg-muted);margin-inline-start:16px}.poad-menu .poad-menu__badge{font:500 10.5px var(--poad-font-mono);padding:1px 6px;border-radius:999px;background:var(--poad-accent-soft);color:var(--poad-accent)}.poad-menu .poad-menu__sub-ic{color:var(--poad-fg-muted);margin-inline-start:8px}.poad-menu .poad-menu__sep{height:1px;background:var(--poad-border);margin:4px 6px}.poad-menu .poad-menu--sub{position:absolute;top:-5px;inset-inline-start:calc(100% + 2px);z-index:1}.poad-split-button{display:inline-flex;align-items:stretch;vertical-align:middle}.poad-split-button .poad-split-button__main{border-start-end-radius:0!important;border-end-end-radius:0!important}.poad-split-button .poad-split-button__toggle{border-start-start-radius:0!important;border-end-start-radius:0!important;margin-inline-start:-1px;box-shadow:inset 1px 0 #ffffff47}.poad-split-button .var-outline.poad-split-button__toggle,.poad-split-button .var-text.poad-split-button__toggle{box-shadow:none;border-inline-start-color:transparent}\n"] }]
8676
+ }], ctorParameters: () => [], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], breakpoint: [{ type: i0.Input, args: [{ isSignal: true, alias: "breakpoint", required: false }] }], openOnHover: [{ type: i0.Input, args: [{ isSignal: true, alias: "openOnHover", required: false }] }], current: [{ type: i0.Input, args: [{ isSignal: true, alias: "current", required: false }] }], itemClick: [{ type: i0.Output, args: ["itemClick"] }], opened: [{ type: i0.Output, args: ["opened"] }], closed: [{ type: i0.Output, args: ["closed"] }], panelTpl: [{ type: i0.ViewChild, args: ['panel', { isSignal: true }] }] } });
8351
8677
 
8352
8678
  /**
8353
8679
  * <poad-split-button label="Enregistrer" icon="save" [items]="[{label:'Enregistrer et fermer'},…]" (clicked)="save()" (itemClick)="…"/>
@@ -8564,7 +8890,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImpo
8564
8890
  * ACCESSIBILITÉ — la destination courante est marquée par une pastille pleine EN PLUS de la
8565
8891
  * couleur : la couleur seule disparaît pour une personne daltonienne. Les cibles font 44 px de
8566
8892
  * haut au minimum, et la barre réserve la zone sûre des téléphones à encoche
8567
- * (`env(safe-area-inset-bottom)`), sans quoi la dernière rangée passe sous la barre d'accueil.
8893
+ * (`env(safe-area-inset-bottom)`, ou `--poad-safe-bottom` si le contexte la déclare), sans quoi la dernière rangée
8894
+ * passe sous la barre d'accueil.
8895
+ *
8896
+ * Décisions (plafond, visibilité, libellés, pastille de comptage, attributs, choix) : module `bottom-nav` de
8897
+ * @poadio/ui-core ; style partagé : `@poadio/ui-core/bottom-nav.css` (encapsulation désactivée).
8568
8898
  * @atelier icone=panel-bottom
8569
8899
  * @atelier-exemple items [{"value":"carte","label":"Carte","icon":"map"},{"value":"releves","label":"Relevés","icon":"clipboard-list"},{"value":"alertes","label":"Alertes","icon":"bell"},{"value":"profil","label":"Profil","icon":"user-round"}]
8570
8900
  * @atelier-exemple value "carte"
@@ -8572,48 +8902,59 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImpo
8572
8902
  class PoadBottomNavComponent {
8573
8903
  i18n = inject(UiI18n);
8574
8904
  bp = inject(PoadBreakpointService);
8905
+ /** Les destinations (3 à 5). */
8575
8906
  items = input([], ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
8576
8907
  /** Destination courante. Bidirectionnel. */
8577
8908
  value = model(null, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
8578
- /** Quand afficher le libellé sous l'icône. */
8909
+ /** Quand afficher le libellé sous l'icône : toujours, sur la destination courante, jamais. */
8579
8910
  labels = input('always', ...(ngDevMode ? [{ debugName: "labels" }] : /* istanbul ignore next */ []));
8580
8911
  /**
8581
8912
  * Au-delà, les destinations en trop ne sont PAS affichées : cinq est la limite tenable
8582
8913
  * en largeur, et tronquer silencieusement vaut mieux que rendre la barre illisible.
8583
8914
  * Prévoir une destination « Plus » qui ouvre le reste en feuille.
8584
8915
  */
8585
- maxItems = input(5, { ...(ngDevMode ? { debugName: "maxItems" } : /* istanbul ignore next */ {}), transform: numberAttribute });
8916
+ maxItems = input(BOTTOM_NAV_MAX, { ...(ngDevMode ? { debugName: "maxItems" } : /* istanbul ignore next */ {}), transform: numberAttribute });
8586
8917
  /** Seuil au-delà duquel la barre disparaît : elle n'a de sens que sur petit écran. */
8587
8918
  breakpoint = input('md', ...(ngDevMode ? [{ debugName: "breakpoint" }] : /* istanbul ignore next */ []));
8588
8919
  /** Force l'affichage quel que soit le seuil — utile en démonstration. */
8589
8920
  alwaysShow = input(false, { ...(ngDevMode ? { debugName: "alwaysShow" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
8590
8921
  /** Nom accessible ; par défaut le message `nav.mainNavigation` du catalogue. */
8591
8922
  ariaLabel = input(...(ngDevMode ? [undefined, { debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
8923
+ /** La destination courante change (la nouvelle destination). */
8592
8924
  changed = output();
8925
+ /** Une destination est choisie, même déjà courante ; pas une destination désactivée. */
8593
8926
  itemClick = output();
8594
8927
  /** Les entrées au-delà de `maxItems` sont écartées, jamais compressées. */
8595
- shown = computed(() => this.items().slice(0, Math.max(1, this.maxItems())), ...(ngDevMode ? [{ debugName: "shown" }] : /* istanbul ignore next */ []));
8596
- visible = computed(() => this.alwaysShow() || this.bp.down(this.breakpoint()), ...(ngDevMode ? [{ debugName: "visible" }] : /* istanbul ignore next */ []));
8928
+ shown = computed(() => bottomNavShown(this.items(), this.maxItems()), ...(ngDevMode ? [{ debugName: "shown" }] : /* istanbul ignore next */ []));
8929
+ /** La barre est rendue (sous `breakpoint`, ou `alwaysShow`). */
8930
+ visible = computed(() => bottomNavVisible(this.bp.state().current, this.breakpoint(), this.alwaysShow()), ...(ngDevMode ? [{ debugName: "visible" }] : /* istanbul ignore next */ []));
8931
+ /** La destination est la destination courante. */
8597
8932
  isActive(it) {
8598
8933
  return this.value() === it.value;
8599
8934
  }
8935
+ /** Le libellé de la destination est affiché. */
8600
8936
  showLabel(it) {
8601
- const mode = this.labels();
8602
- return mode === 'always' || (mode === 'selected' && this.isActive(it));
8937
+ return bottomNavShowLabel(this.labels(), this.isActive(it));
8603
8938
  }
8604
8939
  /** « 99+ » plutôt qu'un nombre qui ferait déborder la pastille. */
8605
8940
  cap(badge) {
8606
- if (typeof badge === 'number')
8607
- return badge > 99 ? '99+' : String(badge);
8608
- return String(badge);
8941
+ return bottomNavBadge(badge).text;
8609
8942
  }
8943
+ /** @internal */
8944
+ attrs(it) { return bottomNavItemProps(it, this.isActive(it)); }
8945
+ /** @internal */
8946
+ badge(it) { return bottomNavBadge(it.badge); }
8947
+ /** @internal */
8948
+ icon(it) { return bottomNavIcon(it, this.isActive(it)); }
8949
+ /** Choisit une destination (clic) : `itemClick`, puis la valeur change si elle est nouvelle. */
8610
8950
  pick(it, ev) {
8611
- if (it.disabled) {
8951
+ const action = bottomNavPick(this.value(), it);
8952
+ if (action === 'none') {
8612
8953
  ev.preventDefault();
8613
8954
  return;
8614
8955
  }
8615
8956
  this.itemClick.emit({ item: it, originalEvent: ev });
8616
- if (this.value() === it.value)
8957
+ if (action === 'click')
8617
8958
  return;
8618
8959
  this.value.set(it.value);
8619
8960
  this.changed.emit(it);
@@ -8623,38 +8964,21 @@ class PoadBottomNavComponent {
8623
8964
  @if (visible()) {
8624
8965
  <ul class="poad-bottom-nav__list" role="list">
8625
8966
  @for (it of shown(); track it.value) {
8967
+ @let a = attrs(it);
8626
8968
  <li>
8627
- @if (it.routerLink) {
8628
- <a
8629
- class="poad-bottom-nav__item"
8630
- [class.is-active]="isActive(it)"
8631
- [class.is-disabled]="it.disabled"
8632
- [routerLink]="it.routerLink"
8633
- [queryParams]="it.queryParams"
8634
- routerLinkActive="is-route-active"
8635
- [attr.aria-current]="isActive(it) ? 'page' : null"
8636
- [attr.aria-disabled]="it.disabled || null"
8637
- [attr.aria-label]="it.ariaLabel || null"
8638
- (click)="pick(it, $event)"
8639
- >
8969
+ @if (it.routerLink && !it.disabled) {
8970
+ <a class="poad-bottom-nav__item" [class.is-active]="a.classes['is-active']" [routerLink]="it.routerLink" [queryParams]="it.queryParams" routerLinkActive="is-route-active"
8971
+ [attr.aria-current]="a['aria-current']" [attr.aria-label]="a['aria-label']" (click)="pick(it, $event)">
8640
8972
  <ng-container *ngTemplateOutlet="body; context: { $implicit: it }"/>
8641
8973
  </a>
8642
- } @else if (it.url) {
8643
- <a class="poad-bottom-nav__item" [class.is-active]="isActive(it)" [class.is-disabled]="it.disabled"
8644
- [href]="it.url" [attr.aria-current]="isActive(it) ? 'page' : null" [attr.aria-label]="it.ariaLabel || null"
8645
- (click)="pick(it, $event)">
8974
+ } @else if (it.url && !it.disabled) {
8975
+ <a class="poad-bottom-nav__item" [class.is-active]="a.classes['is-active']" [href]="it.url" [attr.aria-current]="a['aria-current']" [attr.aria-label]="a['aria-label']"
8976
+ (click)="pick(it, $event)">
8646
8977
  <ng-container *ngTemplateOutlet="body; context: { $implicit: it }"/>
8647
8978
  </a>
8648
8979
  } @else {
8649
- <button
8650
- type="button"
8651
- class="poad-bottom-nav__item"
8652
- [class.is-active]="isActive(it)"
8653
- [disabled]="it.disabled"
8654
- [attr.aria-current]="isActive(it) ? 'page' : null"
8655
- [attr.aria-label]="it.ariaLabel || null"
8656
- (click)="pick(it, $event)"
8657
- >
8980
+ <button type="button" class="poad-bottom-nav__item" [class.is-active]="a.classes['is-active']" [class.is-disabled]="a.classes['is-disabled']" [disabled]="it.disabled"
8981
+ [attr.aria-current]="a['aria-current']" [attr.aria-label]="a['aria-label']" (click)="pick(it, $event)">
8658
8982
  <ng-container *ngTemplateOutlet="body; context: { $implicit: it }"/>
8659
8983
  </button>
8660
8984
  }
@@ -8664,19 +8988,16 @@ class PoadBottomNavComponent {
8664
8988
  }
8665
8989
 
8666
8990
  <ng-template #body let-it>
8991
+ @let b = badge(it);
8667
8992
  <span class="poad-bottom-nav__icon">
8668
8993
  <!-- La pastille est un élément à part : c'est elle qui porte l'état actif, pas la couleur. -->
8669
8994
  <span class="poad-bottom-nav__pill" aria-hidden="true"></span>
8670
- <poad-icon [name]="(isActive(it) && it.activeIcon) || it.icon" [size]="22"/>
8671
- @if (it.badge !== undefined && it.badge !== false && it.badge !== null) {
8672
- <span class="poad-bottom-nav__badge" [class.is-dot]="it.badge === true">
8673
- @if (it.badge !== true) {{{ cap(it.badge) }}}
8674
- </span>
8675
- }
8995
+ <poad-icon [name]="icon(it)" [size]="22"/>
8996
+ @if (b.show) {<span class="poad-bottom-nav__badge" [class.is-dot]="b.dot">{{ b.text }}</span>}
8676
8997
  </span>
8677
8998
  @if (showLabel(it)) {<span class="poad-bottom-nav__label">{{ it.label }}</span>}
8678
8999
  </ng-template>
8679
- `, isInline: true, styles: [":host{display:block;position:sticky;bottom:0;z-index:20;background:var(--poad-overlay);--poad-hover: var(--poad-overlay-hover);border-top:1px solid var(--poad-border);padding-bottom:var(--poad-safe-bottom, env(safe-area-inset-bottom, 0px))}:host(.is-hidden){display:none}.poad-bottom-nav__list{display:flex;margin:0;padding:4px 4px 2px;list-style:none}.poad-bottom-nav__list>li{flex:1;min-width:0;display:flex}.poad-bottom-nav__item{all:unset;box-sizing:border-box;flex:1;min-width:0;cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-height:44px;padding:5px 2px 6px;color:var(--poad-fg-muted);font:10px var(--poad-font);text-align:center;text-decoration:none;border-radius:var(--poad-radius);position:relative}.poad-bottom-nav__item:hover{color:var(--poad-fg-secondary)}.poad-bottom-nav__item:focus-visible{outline:2px solid var(--poad-accent);outline-offset:-2px}.poad-bottom-nav__item.is-active{color:var(--poad-accent)}.poad-bottom-nav__item.is-disabled,.poad-bottom-nav__item:disabled{opacity:.45;cursor:not-allowed}.poad-bottom-nav__icon{position:relative;display:grid;place-items:center;width:100%;height:26px}.poad-bottom-nav__pill{position:absolute;width:38px;height:26px;border-radius:var(--poad-radius-pill);background:transparent;transition:background var(--poad-dur) var(--poad-ease)}.poad-bottom-nav__item.is-active .poad-bottom-nav__pill{background:var(--poad-accent-soft)}.poad-bottom-nav__icon poad-icon{position:relative;z-index:1}.poad-bottom-nav__label{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.3;position:relative;z-index:1}.poad-bottom-nav__item.is-active .poad-bottom-nav__label{font-weight:500}.poad-bottom-nav__badge{position:absolute;top:-2px;left:50%;margin-inline-start:6px;z-index:2;min-width:15px;height:15px;padding:0 4px;border-radius:var(--poad-radius-pill);background:var(--poad-danger, #f85149);color:#fff;font-size:9px;font-weight:600;line-height:15px;text-align:center;border:2px solid var(--poad-overlay);box-sizing:content-box}.poad-bottom-nav__badge.is-dot{min-width:8px;height:8px;padding:0;margin-inline-start:8px}:host-context(.poad-touch) .poad-bottom-nav__item{min-height:52px}@media(prefers-reduced-motion:reduce){.poad-bottom-nav__pill{transition:none}}\n"], dependencies: [{ kind: "component", type: PoadIconComponent, selector: "poad-icon", inputs: ["name", "size", "strokeWidth", "label", "title", "spin", "filled", "flip", "rotate"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
9000
+ `, isInline: true, styles: [".poad-bottom-nav{display:block;position:sticky;bottom:0;z-index:20;background:var(--poad-overlay);--poad-hover: var(--poad-overlay-hover);border-top:1px solid var(--poad-border);padding-bottom:var(--poad-safe-bottom, env(safe-area-inset-bottom, 0px))}.poad-bottom-nav.is-hidden{display:none}.poad-bottom-nav .poad-bottom-nav__list{display:flex;margin:0;padding:4px 4px 2px;list-style:none}.poad-bottom-nav .poad-bottom-nav__list>li{flex:1;min-width:0;display:flex}.poad-bottom-nav .poad-bottom-nav__item{all:unset;box-sizing:border-box;flex:1;min-width:0;cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-height:44px;padding:5px 2px 6px;color:var(--poad-fg-muted);font:10px var(--poad-font);text-align:center;text-decoration:none;border-radius:var(--poad-radius);position:relative}.poad-bottom-nav .poad-bottom-nav__item:hover{color:var(--poad-fg-secondary)}.poad-bottom-nav .poad-bottom-nav__list .poad-bottom-nav__item:focus-visible{outline:2px solid var(--poad-accent);outline-offset:-2px}.poad-bottom-nav .poad-bottom-nav__item.is-active{color:var(--poad-accent)}.poad-bottom-nav .poad-bottom-nav__item.is-disabled,.poad-bottom-nav .poad-bottom-nav__item:disabled{opacity:.45;cursor:not-allowed}.poad-bottom-nav .poad-bottom-nav__icon{position:relative;display:grid;place-items:center;width:100%;height:26px}.poad-bottom-nav .poad-bottom-nav__pill{position:absolute;width:38px;height:26px;border-radius:var(--poad-radius-pill);background:transparent;transition:background var(--poad-dur) var(--poad-ease)}.poad-bottom-nav .poad-bottom-nav__item.is-active .poad-bottom-nav__pill{background:var(--poad-accent-soft)}.poad-bottom-nav .poad-bottom-nav__icon>:not(.poad-bottom-nav__pill):not(.poad-bottom-nav__badge){position:relative;z-index:1}.poad-bottom-nav .poad-bottom-nav__label{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.3;position:relative;z-index:1}.poad-bottom-nav .poad-bottom-nav__item.is-active .poad-bottom-nav__label{font-weight:500}.poad-bottom-nav .poad-bottom-nav__badge{position:absolute;top:-2px;left:50%;margin-inline-start:6px;z-index:2;min-width:15px;height:15px;padding:0 4px;border-radius:var(--poad-radius-pill);background:var(--poad-danger, #f85149);color:#fff;font-size:9px;font-weight:600;line-height:15px;text-align:center;border:2px solid var(--poad-overlay);box-sizing:content-box}.poad-bottom-nav .poad-bottom-nav__badge.is-dot{min-width:8px;height:8px;padding:0;margin-inline-start:8px}.poad-touch .poad-bottom-nav .poad-bottom-nav__item{min-height:52px}@media(prefers-reduced-motion:reduce){.poad-bottom-nav .poad-bottom-nav__pill{transition:none}}\n"], dependencies: [{ kind: "component", type: PoadIconComponent, selector: "poad-icon", inputs: ["name", "size", "strokeWidth", "label", "title", "spin", "filled", "flip", "rotate"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
8680
9001
  }
8681
9002
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: PoadBottomNavComponent, decorators: [{
8682
9003
  type: Component,
@@ -8689,38 +9010,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImpo
8689
9010
  @if (visible()) {
8690
9011
  <ul class="poad-bottom-nav__list" role="list">
8691
9012
  @for (it of shown(); track it.value) {
9013
+ @let a = attrs(it);
8692
9014
  <li>
8693
- @if (it.routerLink) {
8694
- <a
8695
- class="poad-bottom-nav__item"
8696
- [class.is-active]="isActive(it)"
8697
- [class.is-disabled]="it.disabled"
8698
- [routerLink]="it.routerLink"
8699
- [queryParams]="it.queryParams"
8700
- routerLinkActive="is-route-active"
8701
- [attr.aria-current]="isActive(it) ? 'page' : null"
8702
- [attr.aria-disabled]="it.disabled || null"
8703
- [attr.aria-label]="it.ariaLabel || null"
8704
- (click)="pick(it, $event)"
8705
- >
9015
+ @if (it.routerLink && !it.disabled) {
9016
+ <a class="poad-bottom-nav__item" [class.is-active]="a.classes['is-active']" [routerLink]="it.routerLink" [queryParams]="it.queryParams" routerLinkActive="is-route-active"
9017
+ [attr.aria-current]="a['aria-current']" [attr.aria-label]="a['aria-label']" (click)="pick(it, $event)">
8706
9018
  <ng-container *ngTemplateOutlet="body; context: { $implicit: it }"/>
8707
9019
  </a>
8708
- } @else if (it.url) {
8709
- <a class="poad-bottom-nav__item" [class.is-active]="isActive(it)" [class.is-disabled]="it.disabled"
8710
- [href]="it.url" [attr.aria-current]="isActive(it) ? 'page' : null" [attr.aria-label]="it.ariaLabel || null"
8711
- (click)="pick(it, $event)">
9020
+ } @else if (it.url && !it.disabled) {
9021
+ <a class="poad-bottom-nav__item" [class.is-active]="a.classes['is-active']" [href]="it.url" [attr.aria-current]="a['aria-current']" [attr.aria-label]="a['aria-label']"
9022
+ (click)="pick(it, $event)">
8712
9023
  <ng-container *ngTemplateOutlet="body; context: { $implicit: it }"/>
8713
9024
  </a>
8714
9025
  } @else {
8715
- <button
8716
- type="button"
8717
- class="poad-bottom-nav__item"
8718
- [class.is-active]="isActive(it)"
8719
- [disabled]="it.disabled"
8720
- [attr.aria-current]="isActive(it) ? 'page' : null"
8721
- [attr.aria-label]="it.ariaLabel || null"
8722
- (click)="pick(it, $event)"
8723
- >
9026
+ <button type="button" class="poad-bottom-nav__item" [class.is-active]="a.classes['is-active']" [class.is-disabled]="a.classes['is-disabled']" [disabled]="it.disabled"
9027
+ [attr.aria-current]="a['aria-current']" [attr.aria-label]="a['aria-label']" (click)="pick(it, $event)">
8724
9028
  <ng-container *ngTemplateOutlet="body; context: { $implicit: it }"/>
8725
9029
  </button>
8726
9030
  }
@@ -8730,19 +9034,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImpo
8730
9034
  }
8731
9035
 
8732
9036
  <ng-template #body let-it>
9037
+ @let b = badge(it);
8733
9038
  <span class="poad-bottom-nav__icon">
8734
9039
  <!-- La pastille est un élément à part : c'est elle qui porte l'état actif, pas la couleur. -->
8735
9040
  <span class="poad-bottom-nav__pill" aria-hidden="true"></span>
8736
- <poad-icon [name]="(isActive(it) && it.activeIcon) || it.icon" [size]="22"/>
8737
- @if (it.badge !== undefined && it.badge !== false && it.badge !== null) {
8738
- <span class="poad-bottom-nav__badge" [class.is-dot]="it.badge === true">
8739
- @if (it.badge !== true) {{{ cap(it.badge) }}}
8740
- </span>
8741
- }
9041
+ <poad-icon [name]="icon(it)" [size]="22"/>
9042
+ @if (b.show) {<span class="poad-bottom-nav__badge" [class.is-dot]="b.dot">{{ b.text }}</span>}
8742
9043
  </span>
8743
9044
  @if (showLabel(it)) {<span class="poad-bottom-nav__label">{{ it.label }}</span>}
8744
9045
  </ng-template>
8745
- `, styles: [":host{display:block;position:sticky;bottom:0;z-index:20;background:var(--poad-overlay);--poad-hover: var(--poad-overlay-hover);border-top:1px solid var(--poad-border);padding-bottom:var(--poad-safe-bottom, env(safe-area-inset-bottom, 0px))}:host(.is-hidden){display:none}.poad-bottom-nav__list{display:flex;margin:0;padding:4px 4px 2px;list-style:none}.poad-bottom-nav__list>li{flex:1;min-width:0;display:flex}.poad-bottom-nav__item{all:unset;box-sizing:border-box;flex:1;min-width:0;cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-height:44px;padding:5px 2px 6px;color:var(--poad-fg-muted);font:10px var(--poad-font);text-align:center;text-decoration:none;border-radius:var(--poad-radius);position:relative}.poad-bottom-nav__item:hover{color:var(--poad-fg-secondary)}.poad-bottom-nav__item:focus-visible{outline:2px solid var(--poad-accent);outline-offset:-2px}.poad-bottom-nav__item.is-active{color:var(--poad-accent)}.poad-bottom-nav__item.is-disabled,.poad-bottom-nav__item:disabled{opacity:.45;cursor:not-allowed}.poad-bottom-nav__icon{position:relative;display:grid;place-items:center;width:100%;height:26px}.poad-bottom-nav__pill{position:absolute;width:38px;height:26px;border-radius:var(--poad-radius-pill);background:transparent;transition:background var(--poad-dur) var(--poad-ease)}.poad-bottom-nav__item.is-active .poad-bottom-nav__pill{background:var(--poad-accent-soft)}.poad-bottom-nav__icon poad-icon{position:relative;z-index:1}.poad-bottom-nav__label{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.3;position:relative;z-index:1}.poad-bottom-nav__item.is-active .poad-bottom-nav__label{font-weight:500}.poad-bottom-nav__badge{position:absolute;top:-2px;left:50%;margin-inline-start:6px;z-index:2;min-width:15px;height:15px;padding:0 4px;border-radius:var(--poad-radius-pill);background:var(--poad-danger, #f85149);color:#fff;font-size:9px;font-weight:600;line-height:15px;text-align:center;border:2px solid var(--poad-overlay);box-sizing:content-box}.poad-bottom-nav__badge.is-dot{min-width:8px;height:8px;padding:0;margin-inline-start:8px}:host-context(.poad-touch) .poad-bottom-nav__item{min-height:52px}@media(prefers-reduced-motion:reduce){.poad-bottom-nav__pill{transition:none}}\n"] }]
9046
+ `, encapsulation: ViewEncapsulation.None, styles: [".poad-bottom-nav{display:block;position:sticky;bottom:0;z-index:20;background:var(--poad-overlay);--poad-hover: var(--poad-overlay-hover);border-top:1px solid var(--poad-border);padding-bottom:var(--poad-safe-bottom, env(safe-area-inset-bottom, 0px))}.poad-bottom-nav.is-hidden{display:none}.poad-bottom-nav .poad-bottom-nav__list{display:flex;margin:0;padding:4px 4px 2px;list-style:none}.poad-bottom-nav .poad-bottom-nav__list>li{flex:1;min-width:0;display:flex}.poad-bottom-nav .poad-bottom-nav__item{all:unset;box-sizing:border-box;flex:1;min-width:0;cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-height:44px;padding:5px 2px 6px;color:var(--poad-fg-muted);font:10px var(--poad-font);text-align:center;text-decoration:none;border-radius:var(--poad-radius);position:relative}.poad-bottom-nav .poad-bottom-nav__item:hover{color:var(--poad-fg-secondary)}.poad-bottom-nav .poad-bottom-nav__list .poad-bottom-nav__item:focus-visible{outline:2px solid var(--poad-accent);outline-offset:-2px}.poad-bottom-nav .poad-bottom-nav__item.is-active{color:var(--poad-accent)}.poad-bottom-nav .poad-bottom-nav__item.is-disabled,.poad-bottom-nav .poad-bottom-nav__item:disabled{opacity:.45;cursor:not-allowed}.poad-bottom-nav .poad-bottom-nav__icon{position:relative;display:grid;place-items:center;width:100%;height:26px}.poad-bottom-nav .poad-bottom-nav__pill{position:absolute;width:38px;height:26px;border-radius:var(--poad-radius-pill);background:transparent;transition:background var(--poad-dur) var(--poad-ease)}.poad-bottom-nav .poad-bottom-nav__item.is-active .poad-bottom-nav__pill{background:var(--poad-accent-soft)}.poad-bottom-nav .poad-bottom-nav__icon>:not(.poad-bottom-nav__pill):not(.poad-bottom-nav__badge){position:relative;z-index:1}.poad-bottom-nav .poad-bottom-nav__label{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.3;position:relative;z-index:1}.poad-bottom-nav .poad-bottom-nav__item.is-active .poad-bottom-nav__label{font-weight:500}.poad-bottom-nav .poad-bottom-nav__badge{position:absolute;top:-2px;left:50%;margin-inline-start:6px;z-index:2;min-width:15px;height:15px;padding:0 4px;border-radius:var(--poad-radius-pill);background:var(--poad-danger, #f85149);color:#fff;font-size:9px;font-weight:600;line-height:15px;text-align:center;border:2px solid var(--poad-overlay);box-sizing:content-box}.poad-bottom-nav .poad-bottom-nav__badge.is-dot{min-width:8px;height:8px;padding:0;margin-inline-start:8px}.poad-touch .poad-bottom-nav .poad-bottom-nav__item{min-height:52px}@media(prefers-reduced-motion:reduce){.poad-bottom-nav .poad-bottom-nav__pill{transition:none}}\n"] }]
8746
9047
  }], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], labels: [{ type: i0.Input, args: [{ isSignal: true, alias: "labels", required: false }] }], maxItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxItems", required: false }] }], breakpoint: [{ type: i0.Input, args: [{ isSignal: true, alias: "breakpoint", required: false }] }], alwaysShow: [{ type: i0.Input, args: [{ isSignal: true, alias: "alwaysShow", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], changed: [{ type: i0.Output, args: ["changed"] }], itemClick: [{ type: i0.Output, args: ["itemClick"] }] } });
8747
9048
 
8748
9049
  /**
@@ -8759,6 +9060,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImpo
8759
9060
  type: Directive,
8760
9061
  args: [{ selector: '[poadNavDrawerHeader]', standalone: true }]
8761
9062
  }] });
9063
+ /** Pied du tiroir (compte, déconnexion…) : marqueur de slot, sur n'importe quel élément. */
8762
9064
  class PoadNavDrawerFooterDirective {
8763
9065
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: PoadNavDrawerFooterDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
8764
9066
  static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.20", type: PoadNavDrawerFooterDirective, isStandalone: true, selector: "[poadNavDrawerFooter]", ngImport: i0 });
@@ -8772,8 +9074,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImpo
8772
9074
  *
8773
9075
  * Menu principal de l'application : UN composant pour les trois états, pas deux à tenir en
8774
9076
  * parallèle. En `auto` (défaut) il est permanent en colonne au-dessus du seuil, et bascule
8775
- * en tiroir par-dessus le contenu en dessous, ouvert au hamburger. `rail` n'affiche que les
8776
- * icônes, le libellé passant en `title`.
9077
+ * en tiroir par-dessus le contenu en dessous, ouvert au hamburger ; `railBelow` intercale un
9078
+ * rail entre les deux. `rail` n'affiche que les icônes, le libellé passant en `title`.
9079
+ *
9080
+ * En mode tiroir ouvert, le panneau est une boîte de dialogue modale : voile, focus posé sur la
9081
+ * destination courante (sinon la première entrée) et piégé dedans, Échap ou le voile referment,
9082
+ * et le focus revient à l'élément qui l'avait (le bouton « menu »). Clavier dans la liste :
9083
+ * ↓ ↑ Début Fin entre les entrées, → ← déplient et replient un intertitre repliable.
8777
9084
  *
8778
9085
  * POURQUOI PAS `poad-drawer` — celui-ci est un panneau générique : il ne connaît ni items, ni
8779
9086
  * route active, ni sections, et surtout il est toujours temporaire. Le mode permanent n'est
@@ -8782,6 +9089,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImpo
8782
9089
  *
8783
9090
  * LA LISTE EST DISTINCTE DE CELLE DE `poad-bottom-nav`, volontairement — voir la note qui s'y
8784
9091
  * trouve : on ne met pas en avant les mêmes destinations au pouce que dans un menu complet.
9092
+ *
9093
+ * Décisions (mode effectif, lignes et repli, destination courante, attributs, clavier, choix,
9094
+ * fermeture) : module `nav-drawer` de @poadio/ui-core ; style partagé :
9095
+ * `@poadio/ui-core/nav-drawer.css` (encapsulation désactivée).
9096
+ * @slot [poadNavDrawerHeader] Contenu de l'en-tête (logo…) ; sans lui : `icon` et `title`.
9097
+ * @slot [poadNavDrawerFooter] Pied du tiroir (compte, déconnexion…).
8785
9098
  * @atelier icone=sidebar-open
8786
9099
  * @atelier-exemple items [{"value":"tableau","label":"Tableau de bord","icon":"layout-dashboard"},{"value":"ouvrages","label":"Ouvrages","icon":"building-2"},{"value":"releves","label":"Relevés","icon":"clipboard-list"},{"value":"parametres","label":"Paramètres","icon":"settings-2"}]
8787
9100
  * @atelier-exemple value "tableau"
@@ -8789,11 +9102,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImpo
8789
9102
  class PoadNavDrawerComponent {
8790
9103
  i18n = inject(UiI18n);
8791
9104
  bp = inject(PoadBreakpointService);
9105
+ host = inject(ElementRef);
9106
+ injector = inject(Injector);
9107
+ cdr = inject(ChangeDetectorRef);
9108
+ panel = viewChild.required('panel');
9109
+ /** Les entrées : liens, boutons, intertitres (`section`), intertitres repliables (`collapsible`). */
8792
9110
  items = input([], ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
8793
9111
  /** Ouverture du tiroir. Sans effet en mode permanent, où le panneau est toujours là. */
8794
9112
  open = model(false, ...(ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []));
8795
9113
  /** Entrée courante, comparée à `item.value`. */
8796
9114
  value = model(null, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
9115
+ /** Adresse de la page courante : l'entrée dont `url` est égale est marquée (`aria-current="page"`). */
9116
+ current = input(null, ...(ngDevMode ? [{ debugName: "current" }] : /* istanbul ignore next */ []));
8797
9117
  /**
8798
9118
  * Clés des intertitres repliés (`item.value`, à défaut `item.label`).
8799
9119
  *
@@ -8803,80 +9123,74 @@ class PoadNavDrawerComponent {
8803
9123
  * ni s'il a le droit.
8804
9124
  */
8805
9125
  collapsed = model([], ...(ngDevMode ? [{ debugName: "collapsed" }] : /* istanbul ignore next */ []));
9126
+ /** `auto` (au point de rupture de la fenêtre), `permanent`, `temporary` (tiroir modal), `rail` (icônes). */
8806
9127
  mode = input('auto', ...(ngDevMode ? [{ debugName: "mode" }] : /* istanbul ignore next */ []));
8807
9128
  /** Seuil de bascule permanent → tiroir, en mode `auto`. */
8808
9129
  breakpoint = input('md', ...(ngDevMode ? [{ debugName: "breakpoint" }] : /* istanbul ignore next */ []));
9130
+ /** En mode `auto`, sous ce seuil (et au-dessus de `breakpoint`) le tiroir devient un rail ; `''` : jamais. */
9131
+ railBelow = input('', ...(ngDevMode ? [{ debugName: "railBelow" }] : /* istanbul ignore next */ []));
9132
+ /** Côté de l'écran. */
8809
9133
  position = input('left', ...(ngDevMode ? [{ debugName: "position" }] : /* istanbul ignore next */ []));
9134
+ /** Titre de l'en-tête par défaut (sans `poadNavDrawerHeader`). */
8810
9135
  title = input('', ...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
9136
+ /** Icône de l'en-tête par défaut. */
8811
9137
  icon = input('', ...(ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []));
8812
9138
  /** Nom accessible ; par défaut le message `nav.mainMenu` du catalogue. */
8813
9139
  ariaLabel = input(...(ngDevMode ? [undefined, { debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
8814
9140
  /** Referme le tiroir après un clic sur une entrée. Sans objet en permanent. */
8815
9141
  closeOnNavigate = input(true, { ...(ngDevMode ? { debugName: "closeOnNavigate" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
9142
+ /** Échap referme le tiroir. */
8816
9143
  closeOnEscape = input(true, { ...(ngDevMode ? { debugName: "closeOnEscape" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
8817
9144
  /** Clic sur le voile. */
8818
9145
  dismissableScrim = input(true, { ...(ngDevMode ? { debugName: "dismissableScrim" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
9146
+ /** Le tiroir (mode tiroir) s'est ouvert. */
8819
9147
  opened = output();
9148
+ /** Le tiroir (mode tiroir) s'est fermé. */
8820
9149
  closed = output();
9150
+ /** Une entrée est choisie (pas une entrée désactivée), même déjà courante. */
8821
9151
  itemClick = output();
9152
+ /** La destination courante change (la nouvelle entrée). */
8822
9153
  changed = output();
8823
9154
  /** Présence des slots : sert à décider du repli sur l'en-tête par défaut et du cadre du pied. */
8824
9155
  headerSlot = contentChild(PoadNavDrawerHeaderDirective, ...(ngDevMode ? [{ debugName: "headerSlot" }] : /* istanbul ignore next */ []));
9156
+ /** Présence du pied. */
8825
9157
  footerSlot = contentChild(PoadNavDrawerFooterDirective, ...(ngDevMode ? [{ debugName: "footerSlot" }] : /* istanbul ignore next */ []));
8826
- /** Mode effectif : `auto` se résout au seuil, les autres sont imposés. */
8827
- effective = computed(() => {
8828
- const m = this.mode();
8829
- if (m !== 'auto')
8830
- return m;
8831
- return this.bp.down(this.breakpoint()) ? 'temporary' : 'permanent';
8832
- }, ...(ngDevMode ? [{ debugName: "effective" }] : /* istanbul ignore next */ []));
9158
+ /** Mode effectif : `auto` se résout au point de rupture, les autres sont imposés. */
9159
+ effective = computed(() => navDrawerMode(this.mode(), this.bp.state().current, this.breakpoint(), this.railBelow()), ...(ngDevMode ? [{ debugName: "effective" }] : /* istanbul ignore next */ []));
9160
+ /** Mode tiroir (par-dessus le contenu). */
8833
9161
  temporary = computed(() => this.effective() === 'temporary', ...(ngDevMode ? [{ debugName: "temporary" }] : /* istanbul ignore next */ []));
9162
+ /** Mode rail (icônes seules). */
8834
9163
  rail = computed(() => this.effective() === 'rail', ...(ngDevMode ? [{ debugName: "rail" }] : /* istanbul ignore next */ []));
8835
- /** Clé d'un intertitre. `value` d'abord : un libellé se renomme, une clé non. */
8836
- cle(it) { return it.value ?? it.label; }
9164
+ /** Mode tiroir ouvert : voile, focus piégé, Échap. */
9165
+ modal = computed(() => navDrawerModal(this.effective(), this.open()), ...(ngDevMode ? [{ debugName: "modal" }] : /* istanbul ignore next */ []));
9166
+ /** @internal */
9167
+ classes = computed(() => navDrawerClasses(this.effective(), this.open(), this.position()), ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
9168
+ /** @internal */
9169
+ panelAttrs = computed(() => navDrawerPanelProps(this.effective(), this.open()), ...(ngDevMode ? [{ debugName: "panelAttrs" }] : /* istanbul ignore next */ []));
8837
9170
  /**
8838
9171
  * Les lignes à rendre : les intertitres toujours, les entrées seulement si leur intertitre
8839
9172
  * n'est pas replié. Une entrée qui précède tout intertitre n'appartient à aucun groupe et
8840
9173
  * ne se replie donc jamais — sans quoi elle serait masquée sans bouton pour la rouvrir.
8841
9174
  */
8842
- rows = computed(() => {
8843
- const replies = new Set(this.collapsed());
8844
- const rail = this.rail();
8845
- const out = [];
8846
- let courante = null;
8847
- for (const item of this.items()) {
8848
- if (item.section) {
8849
- // En rail l'intertitre devient un filet : plus de bouton, donc rien ne se replie.
8850
- const collapsible = !rail && !!item.collapsible;
8851
- const key = this.cle(item);
8852
- courante = { item, key, collapsible, collapsed: collapsible && replies.has(key), count: 0 };
8853
- out.push(courante);
8854
- continue;
8855
- }
8856
- // Le compte est celui du GROUPE, pas de ce qui est visible : il doit rester le même
8857
- // une fois replié, sinon il annoncerait zéro au moment où il sert le plus.
8858
- if (courante)
8859
- courante.count++;
8860
- if (courante?.collapsed)
8861
- continue;
8862
- out.push({ item, key: '', collapsible: false, collapsed: false, count: 0 });
8863
- }
8864
- return out;
8865
- }, ...(ngDevMode ? [{ debugName: "rows" }] : /* istanbul ignore next */ []));
8866
- toggleSection(r) {
8867
- const s = new Set(this.collapsed());
8868
- s.has(r.key) ? s.delete(r.key) : s.add(r.key);
8869
- this.collapsed.set([...s]);
8870
- }
8871
- wasOpen = signal(false, ...(ngDevMode ? [{ debugName: "wasOpen" }] : /* istanbul ignore next */ []));
9175
+ rows = computed(() => navDrawerRows(this.items(), this.collapsed(), this.rail()), ...(ngDevMode ? [{ debugName: "rows" }] : /* istanbul ignore next */ []));
9176
+ trap = null;
9177
+ unlock = null;
9178
+ restoreTo = null;
9179
+ wasModal = false;
8872
9180
  constructor() {
8873
9181
  effect(() => {
8874
- const o = this.open() && this.temporary();
8875
- if (o === this.wasOpen())
9182
+ const m = this.modal();
9183
+ if (m === this.wasModal)
8876
9184
  return;
8877
- this.wasOpen.set(o);
8878
- (o ? this.opened : this.closed).emit();
9185
+ this.wasModal = m;
9186
+ untracked(() => (m ? this.opened : this.closed).emit());
9187
+ if (m)
9188
+ this.engage();
9189
+ else
9190
+ this.release();
8879
9191
  });
9192
+ // Détruit tiroir ouvert : piège et blocage du défilement relâchés.
9193
+ inject(DestroyRef).onDestroy(() => { this.trap?.destroy(); this.trap = null; this.unlock?.(); this.unlock = null; });
8880
9194
  // Repasser en permanent laisse un tiroir « ouvert » qui n'a plus de sens : on le solde,
8881
9195
  // sinon le retour en mode tiroir le rouvrirait tout seul.
8882
9196
  effect(() => {
@@ -8884,57 +9198,125 @@ class PoadNavDrawerComponent {
8884
9198
  this.open.set(false);
8885
9199
  });
8886
9200
  }
9201
+ /** Ouverture modale : on retient qui avait le focus, puis on le pose dans le panneau (après rendu). */
9202
+ engage() {
9203
+ const doc = this.host.nativeElement.ownerDocument;
9204
+ this.restoreTo = doc.activeElement;
9205
+ // Tiroir ouvert : la page derrière le voile ne défile plus (helper d'ui-core, partagé par tous les rendus).
9206
+ this.unlock ??= lockDocumentScroll(doc);
9207
+ afterNextRender(() => {
9208
+ if (!this.modal())
9209
+ return;
9210
+ this.trap?.destroy();
9211
+ this.trap = poadFocusTrap(this.panel().nativeElement);
9212
+ this.trap.focusInitial();
9213
+ }, { injector: this.injector });
9214
+ }
9215
+ /** Fermeture : le piège est relâché, et le focus revient où il était s'il était resté dans le tiroir. */
9216
+ release() {
9217
+ this.trap?.destroy();
9218
+ this.trap = null;
9219
+ this.unlock?.();
9220
+ this.unlock = null;
9221
+ const before = this.restoreTo;
9222
+ this.restoreTo = null;
9223
+ const doc = this.host.nativeElement.ownerDocument;
9224
+ const inside = this.host.nativeElement.contains(doc.activeElement) || doc.activeElement === doc.body;
9225
+ if (before && inside && doc.contains(before))
9226
+ before.focus();
9227
+ }
9228
+ /** @internal */
9229
+ attrs(it) { return navDrawerItemProps(it, this.isActive(it), this.rail()); }
9230
+ /** @internal */
9231
+ badge(it) { return navDrawerBadge(it, this.rail()); }
9232
+ /** @internal */
9233
+ sectionCount(r) { return navDrawerSectionCount(r); }
9234
+ /** @internal — focus initial du tiroir modal : la destination courante. */
9235
+ autofocus(it) { return this.isActive(it) ? '' : null; }
9236
+ /** Plie ou déplie le groupe d'un intertitre repliable. */
9237
+ toggleSection(r) {
9238
+ this.collapsed.set(navDrawerToggle(this.collapsed(), r.key));
9239
+ }
9240
+ /** L'entrée est la destination courante (`value`, ou `url` égale à `current`). */
8887
9241
  isActive(it) {
8888
- return it.value !== undefined && this.value() === it.value;
9242
+ return navDrawerIsActive(it, this.value(), this.current());
8889
9243
  }
9244
+ /** Bascule l'ouverture du tiroir. */
8890
9245
  toggle() { this.open.set(!this.open()); }
9246
+ /** Ouvre le tiroir. */
8891
9247
  show() { this.open.set(true); }
9248
+ /** Ferme le tiroir. */
8892
9249
  hide() { this.open.set(false); }
9250
+ /** Clic sur le voile. */
8893
9251
  dismiss() {
8894
- if (this.dismissableScrim())
9252
+ if (navDrawerShouldClose('scrim', this.effective(), this.open(), { dismissableScrim: this.dismissableScrim() }))
8895
9253
  this.open.set(false);
8896
9254
  }
9255
+ /** Échap (document) : referme le tiroir modal. */
8897
9256
  onEscape() {
8898
- if (this.closeOnEscape() && this.temporary() && this.open())
9257
+ if (navDrawerShouldClose('escape', this.effective(), this.open(), { closeOnEscape: this.closeOnEscape() }))
8899
9258
  this.open.set(false);
8900
9259
  }
9260
+ /** @internal — clavier dans la liste : ↓ ↑ Début Fin, → ← sur un intertitre repliable. */
9261
+ onListKey(e) {
9262
+ // Relire l'état courant avant d'agir : deux touches dans la même image (un repli puis ↓) trouveraient sinon la liste
9263
+ // d'avant le repli dans le DOM, et le rang lu ne correspondrait plus aux lignes calculées.
9264
+ this.cdr.detectChanges();
9265
+ const from = Number(e.target.closest('[data-row]')?.getAttribute('data-row') ?? NaN);
9266
+ if (Number.isNaN(from))
9267
+ return;
9268
+ const rows = this.rows();
9269
+ const step = navDrawerKeydown(rows, from, e.key, elementIsRtl(this.host.nativeElement));
9270
+ if (!step)
9271
+ return;
9272
+ e.preventDefault();
9273
+ if ('toggle' in step) {
9274
+ this.toggleSection(rows[from]);
9275
+ this.cdr.detectChanges();
9276
+ return;
9277
+ }
9278
+ if (!navDrawerFocusable(rows[step.focus]))
9279
+ return;
9280
+ this.host.nativeElement.querySelector(`.poad-nav-drawer__list [data-row="${step.focus}"]`)?.focus();
9281
+ }
9282
+ /** Choisit une entrée (clic) : sa `command`, `itemClick`, puis la valeur change si elle est nouvelle ; le tiroir se referme. */
8901
9283
  pick(it, ev) {
8902
- if (it.disabled) {
9284
+ const { action, close } = navDrawerPick(this.value(), it, this.effective(), this.closeOnNavigate());
9285
+ if (action === 'none') {
8903
9286
  ev.preventDefault();
8904
9287
  return;
8905
9288
  }
8906
- this.itemClick.emit({ item: it, originalEvent: ev });
8907
9289
  it.command?.({ item: it, originalEvent: ev });
8908
- if (it.value !== undefined && this.value() !== it.value) {
9290
+ this.itemClick.emit({ item: it, originalEvent: ev });
9291
+ if (action === 'change') {
8909
9292
  this.value.set(it.value);
8910
9293
  this.changed.emit(it);
8911
9294
  }
8912
- if (this.temporary() && this.closeOnNavigate())
9295
+ if (close)
8913
9296
  this.open.set(false);
8914
9297
  }
8915
9298
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: PoadNavDrawerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
8916
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.20", type: PoadNavDrawerComponent, isStandalone: true, selector: "poad-nav-drawer", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, collapsed: { classPropertyName: "collapsed", publicName: "collapsed", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, breakpoint: { classPropertyName: "breakpoint", publicName: "breakpoint", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, closeOnNavigate: { classPropertyName: "closeOnNavigate", publicName: "closeOnNavigate", isSignal: true, isRequired: false, transformFunction: null }, closeOnEscape: { classPropertyName: "closeOnEscape", publicName: "closeOnEscape", isSignal: true, isRequired: false, transformFunction: null }, dismissableScrim: { classPropertyName: "dismissableScrim", publicName: "dismissableScrim", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange", value: "valueChange", collapsed: "collapsedChange", opened: "opened", closed: "closed", itemClick: "itemClick", changed: "changed" }, host: { listeners: { "document:keydown.escape": "onEscape()" }, properties: { "class.is-temporary": "temporary()", "class.is-permanent": "!temporary()", "class.is-rail": "rail()", "class.is-open": "open()", "class.is-right": "position() === \"right\"" }, classAttribute: "poad-nav-drawer" }, queries: [{ propertyName: "headerSlot", first: true, predicate: PoadNavDrawerHeaderDirective, descendants: true, isSignal: true }, { propertyName: "footerSlot", first: true, predicate: PoadNavDrawerFooterDirective, descendants: true, isSignal: true }], ngImport: i0, template: `
9299
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.20", type: PoadNavDrawerComponent, isStandalone: true, selector: "poad-nav-drawer", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, current: { classPropertyName: "current", publicName: "current", isSignal: true, isRequired: false, transformFunction: null }, collapsed: { classPropertyName: "collapsed", publicName: "collapsed", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, breakpoint: { classPropertyName: "breakpoint", publicName: "breakpoint", isSignal: true, isRequired: false, transformFunction: null }, railBelow: { classPropertyName: "railBelow", publicName: "railBelow", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, closeOnNavigate: { classPropertyName: "closeOnNavigate", publicName: "closeOnNavigate", isSignal: true, isRequired: false, transformFunction: null }, closeOnEscape: { classPropertyName: "closeOnEscape", publicName: "closeOnEscape", isSignal: true, isRequired: false, transformFunction: null }, dismissableScrim: { classPropertyName: "dismissableScrim", publicName: "dismissableScrim", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange", value: "valueChange", collapsed: "collapsedChange", opened: "opened", closed: "closed", itemClick: "itemClick", changed: "changed" }, host: { listeners: { "document:keydown.escape": "onEscape()" }, properties: { "class.is-temporary": "classes()[\"is-temporary\"]", "class.is-permanent": "classes()[\"is-permanent\"]", "class.is-rail": "classes()[\"is-rail\"]", "class.is-open": "classes()[\"is-open\"]", "class.is-right": "classes()[\"is-right\"]", "attr.title": "null" }, classAttribute: "poad-nav-drawer" }, queries: [{ propertyName: "headerSlot", first: true, predicate: PoadNavDrawerHeaderDirective, descendants: true, isSignal: true }, { propertyName: "footerSlot", first: true, predicate: PoadNavDrawerFooterDirective, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "panel", first: true, predicate: ["panel"], descendants: true, isSignal: true }], ngImport: i0, template: `
8917
9300
  <!-- Le voile n'existe qu'en mode tiroir : en permanent il n'y a rien à recouvrir. -->
8918
- @if (temporary() && open()) {
9301
+ @if (modal()) {
8919
9302
  <div class="poad-nav-drawer__scrim" (click)="dismiss()" aria-hidden="true"></div>
8920
9303
  }
8921
9304
 
8922
- <nav
8923
- class="poad-nav-drawer__panel"
8924
- [attr.aria-label]="i18n.text(ariaLabel(), 'nav.mainMenu')"
8925
- [attr.aria-hidden]="temporary() && !open() ? 'true' : null"
8926
- [attr.inert]="temporary() && !open() ? '' : null"
8927
- >
9305
+ @let p = panelAttrs();
9306
+ <nav #panel class="poad-nav-drawer__panel" tabindex="-1"
9307
+ [attr.aria-label]="i18n.text(ariaLabel(), 'nav.mainMenu')" [attr.aria-hidden]="p['aria-hidden']" [attr.inert]="p.inert"
9308
+ [attr.role]="p.role" [attr.aria-modal]="p['aria-modal']">
8928
9309
  <div class="poad-nav-drawer__head">
8929
9310
  <ng-content select="[poadNavDrawerHeader]"/>
8930
9311
  @if (!headerSlot()) {
8931
9312
  @if (icon()) {<poad-icon [name]="icon()" [size]="18"/>}
8932
- @if (!rail()) {<b>{{ title() }}</b>}
9313
+ @if (!rail() && title()) {<b>{{ title() }}</b>}
8933
9314
  }
8934
9315
  </div>
8935
9316
 
8936
- <ul class="poad-nav-drawer__list" role="list">
8937
- @for (r of rows(); track $index) {
9317
+ <ul class="poad-nav-drawer__list" role="list" (keydown)="onListKey($event)">
9318
+ <!-- Suivi par entrée (pas par rang) : après un repli, chaque bouton reste celui de son entrée. -->
9319
+ @for (r of rows(); track r.item; let i = $index) {
8938
9320
  @let it = r.item;
8939
9321
  @if (it.section) {
8940
9322
  <!-- En rail, un intertitre n'a plus de place : un filet le remplace. -->
@@ -8942,45 +9324,37 @@ class PoadNavDrawerComponent {
8942
9324
  <li class="poad-nav-drawer__rule" role="separator"></li>
8943
9325
  } @else if (r.collapsible) {
8944
9326
  <li>
8945
- <button
8946
- type="button"
8947
- class="poad-nav-drawer__section is-collapsible"
8948
- [class.is-collapsed]="r.collapsed"
8949
- [attr.aria-expanded]="!r.collapsed"
8950
- (click)="toggleSection(r)"
8951
- >
9327
+ <button type="button" class="poad-nav-drawer__section is-collapsible" [class.is-collapsed]="r.collapsed" [attr.aria-expanded]="!r.collapsed"
9328
+ [attr.data-row]="i" (click)="toggleSection(r)">
8952
9329
  <poad-icon name="chevron-down" [size]="12" class="poad-nav-drawer__chev"/>
8953
9330
  <span class="poad-nav-drawer__label">{{ it.label }}</span>
8954
9331
  <!-- Un compte DÉCLARÉ l'emporte sur le compte calculé : une valeur posée
8955
9332
  par l'hôte est une affirmation, pas un oubli à combler. -->
8956
- <span class="poad-nav-drawer__badge">{{ it.badge ?? r.count }}</span>
9333
+ <span class="poad-nav-drawer__badge">{{ sectionCount(r) }}</span>
8957
9334
  </button>
8958
9335
  </li>
8959
9336
  } @else {
8960
9337
  <li class="poad-nav-drawer__section">{{ it.label }}</li>
8961
9338
  }
8962
9339
  } @else {
9340
+ @let a = attrs(it);
8963
9341
  <li>
8964
- @if (it.routerLink) {
8965
- <a class="poad-nav-drawer__item" [class.is-active]="isActive(it)" [class.is-disabled]="it.disabled"
8966
- [routerLink]="it.routerLink" [queryParams]="it.queryParams"
8967
- [attr.aria-current]="isActive(it) ? 'page' : null" [attr.aria-disabled]="it.disabled || null"
8968
- [attr.title]="rail() ? it.label : null" [attr.aria-label]="it.ariaLabel || (rail() ? it.label : null)"
8969
- (click)="pick(it, $event)">
9342
+ @if (it.routerLink && !it.disabled) {
9343
+ <a class="poad-nav-drawer__item" [class.is-active]="a.classes['is-active']" [routerLink]="it.routerLink" [queryParams]="it.queryParams"
9344
+ [attr.target]="it.target || null" [attr.aria-current]="a['aria-current']" [attr.title]="a.title" [attr.aria-label]="a['aria-label']"
9345
+ [attr.data-row]="i" [attr.data-poad-autofocus]="autofocus(it)" (click)="pick(it, $event)">
8970
9346
  <ng-container *ngTemplateOutlet="row; context: { $implicit: it }"/>
8971
9347
  </a>
8972
- } @else if (it.url) {
8973
- <a class="poad-nav-drawer__item" [class.is-active]="isActive(it)" [class.is-disabled]="it.disabled"
8974
- [href]="it.url" [attr.target]="it.target || null"
8975
- [attr.title]="rail() ? it.label : null" [attr.aria-label]="it.ariaLabel || (rail() ? it.label : null)"
8976
- (click)="pick(it, $event)">
9348
+ } @else if (it.url && !it.disabled) {
9349
+ <a class="poad-nav-drawer__item" [class.is-active]="a.classes['is-active']" [href]="it.url" [attr.target]="it.target || null"
9350
+ [attr.aria-current]="a['aria-current']" [attr.title]="a.title" [attr.aria-label]="a['aria-label']"
9351
+ [attr.data-row]="i" [attr.data-poad-autofocus]="autofocus(it)" (click)="pick(it, $event)">
8977
9352
  <ng-container *ngTemplateOutlet="row; context: { $implicit: it }"/>
8978
9353
  </a>
8979
9354
  } @else {
8980
- <button type="button" class="poad-nav-drawer__item" [class.is-active]="isActive(it)"
8981
- [disabled]="it.disabled" [attr.title]="rail() ? it.label : null"
8982
- [attr.aria-label]="it.ariaLabel || (rail() ? it.label : null)"
8983
- [attr.aria-current]="isActive(it) ? 'page' : null" (click)="pick(it, $event)">
9355
+ <button type="button" class="poad-nav-drawer__item" [class.is-active]="a.classes['is-active']" [class.is-disabled]="a.classes['is-disabled']"
9356
+ [disabled]="it.disabled" [attr.title]="a.title" [attr.aria-label]="a['aria-label']" [attr.aria-current]="a['aria-current']"
9357
+ [attr.data-row]="i" [attr.data-poad-autofocus]="autofocus(it)" (click)="pick(it, $event)">
8984
9358
  <ng-container *ngTemplateOutlet="row; context: { $implicit: it }"/>
8985
9359
  </button>
8986
9360
  }
@@ -8997,48 +9371,48 @@ class PoadNavDrawerComponent {
8997
9371
  </nav>
8998
9372
 
8999
9373
  <ng-template #row let-it>
9374
+ @let b = badge(it);
9000
9375
  @if (it.icon) {<poad-icon [name]="it.icon" [size]="17"/>}
9001
- @if (!rail()) {
9002
- <span class="poad-nav-drawer__label">{{ it.label }}</span>
9003
- @if (it.badge !== undefined && it.badge !== null) {<span class="poad-nav-drawer__badge">{{ it.badge }}</span>}
9004
- } @else if (it.badge !== undefined && it.badge !== null) {
9005
- <!-- En rail le compte ne tient pas : il devient un point, le nombre reste en title. -->
9006
- <span class="poad-nav-drawer__dot" [attr.title]="it.badge"></span>
9007
- }
9376
+ @if (!rail()) {<span class="poad-nav-drawer__label">{{ it.label }}</span>}
9377
+ <!-- En rail le compte ne tient pas : il devient un point, le nombre reste en title. -->
9378
+ @if (b.show && !b.dot) {<span class="poad-nav-drawer__badge">{{ b.text }}</span>}
9379
+ @if (b.dot) {<span class="poad-nav-drawer__dot" [attr.title]="b.text"></span>}
9008
9380
  </ng-template>
9009
- `, isInline: true, styles: [":host{display:block}:host(.is-permanent){flex:none}.poad-nav-drawer__panel{display:flex;flex-direction:column;min-height:0;height:100%;width:var(--poad-nav-drawer-w, 240px);background:var(--poad-bg-subtle);border-inline-end:1px solid var(--poad-border);transition:width var(--poad-dur) var(--poad-ease)}:host(.is-rail) .poad-nav-drawer__panel{width:var(--poad-nav-drawer-rail-w, 56px)}:host(.is-right) .poad-nav-drawer__panel{border-inline-end:0;border-inline-start:1px solid var(--poad-border)}:host(.is-temporary){position:fixed;inset:0 auto 0 0;z-index:var(--poad-z-overlay, 100002);pointer-events:none}:host(.is-temporary.is-right){inset:0 0 0 auto}:host(.is-temporary) .poad-nav-drawer__panel{pointer-events:auto;height:100%;box-shadow:var(--poad-shadow-lg, 0 12px 24px rgba(15,23,42,.18));transform:translate(-100%);transition:transform var(--poad-dur) var(--poad-ease);padding-top:env(safe-area-inset-top,0px);padding-bottom:env(safe-area-inset-bottom,0px)}:host(.is-temporary.is-right) .poad-nav-drawer__panel{transform:translate(100%)}:host(.is-temporary.is-open) .poad-nav-drawer__panel{transform:translate(0)}.poad-nav-drawer__scrim{position:fixed;inset:0;background:var(--poad-backdrop, rgba(2,6,23,.45));pointer-events:auto;z-index:-1}.poad-nav-drawer__head{display:flex;align-items:center;gap:9px;flex:none;padding:14px 14px 12px;border-bottom:1px solid var(--poad-border);min-height:48px;color:var(--poad-fg);font-size:13px}:host(.is-rail) .poad-nav-drawer__head{justify-content:center;padding:14px 0 12px}.poad-nav-drawer__head poad-icon{color:var(--poad-accent);flex:none}.poad-nav-drawer__list{list-style:none;margin:0;padding:8px 0;flex:1;min-height:0;overflow-y:auto}.poad-nav-drawer__section{padding:12px 14px 5px;font-size:10px;font-weight:500;letter-spacing:.07em;text-transform:uppercase;color:var(--poad-fg-muted)}.poad-nav-drawer__rule{height:1px;margin:8px 12px;background:var(--poad-border)}.poad-nav-drawer__section.is-collapsible{all:unset;box-sizing:border-box;display:flex;align-items:center;gap:8px;width:100%;cursor:pointer;padding:12px 14px 5px;font:500 10px var(--poad-font);letter-spacing:.07em;text-transform:uppercase;color:var(--poad-fg-muted)}.poad-nav-drawer__section.is-collapsible:hover{color:var(--poad-fg-secondary)}.poad-nav-drawer__section.is-collapsible:focus-visible{outline:2px solid var(--poad-accent);outline-offset:-2px}.poad-nav-drawer__chev{flex:none;transition:transform var(--poad-dur) var(--poad-ease)}.poad-nav-drawer__section.is-collapsed .poad-nav-drawer__chev{transform:rotate(-90deg)}@media(prefers-reduced-motion:reduce){.poad-nav-drawer__chev{transition:none}}.poad-nav-drawer__item{all:unset;box-sizing:border-box;display:flex;align-items:center;gap:10px;width:100%;cursor:pointer;padding:8px 14px;min-height:38px;color:var(--poad-fg-secondary);font:12.5px var(--poad-font);text-decoration:none}:host(.is-rail) .poad-nav-drawer__item{justify-content:center;padding:10px 0}.poad-nav-drawer__item:hover{background:var(--poad-hover);color:var(--poad-fg)}.poad-nav-drawer__item:focus-visible{outline:2px solid var(--poad-accent);outline-offset:-2px}.poad-nav-drawer__item.is-active{background:var(--poad-accent-soft);color:var(--poad-accent);font-weight:500;box-shadow:inset 3px 0 0 var(--poad-accent)}:host(.is-right) .poad-nav-drawer__item.is-active{box-shadow:inset -3px 0 0 var(--poad-accent)}.poad-nav-drawer__item.is-disabled,.poad-nav-drawer__item:disabled{opacity:.45;cursor:not-allowed}.poad-nav-drawer__label{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.poad-nav-drawer__badge{flex:none;font-size:10.5px;font-family:var(--poad-font-mono);border-radius:var(--poad-radius-pill);padding:1px 7px;background:var(--poad-elevated, var(--poad-border));color:var(--poad-fg-secondary)}.poad-nav-drawer__item.is-active .poad-nav-drawer__badge{background:var(--poad-accent);color:var(--poad-fg-on-accent)}.poad-nav-drawer__dot{position:absolute;margin:-14px 0 0 14px;width:7px;height:7px;border-radius:50%;background:var(--poad-danger, #f85149)}.poad-nav-drawer__foot{flex:none;border-top:1px solid var(--poad-border);padding:10px 14px}.poad-nav-drawer__foot.is-empty{display:none}:host(.is-rail) .poad-nav-drawer__foot{padding:10px 0;display:flex;justify-content:center}:host-context(.poad-touch) .poad-nav-drawer__item{min-height:44px}@media(prefers-reduced-motion:reduce){.poad-nav-drawer__panel{transition:none}}\n"], dependencies: [{ kind: "component", type: PoadIconComponent, selector: "poad-icon", inputs: ["name", "size", "strokeWidth", "label", "title", "spin", "filled", "flip", "rotate"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
9381
+ `, isInline: true, styles: [".poad-nav-drawer{display:block;box-sizing:border-box;font-family:var(--poad-font)}.poad-nav-drawer.is-permanent{flex:none}.poad-nav-drawer .poad-nav-drawer__panel{display:flex;flex-direction:column;min-height:0;height:100%;box-sizing:border-box;width:var(--poad-nav-drawer-w, 240px);background:var(--poad-bg-subtle);border-inline-end:1px solid var(--poad-border);transition:width var(--poad-dur) var(--poad-ease)}.poad-nav-drawer.is-rail .poad-nav-drawer__panel{width:var(--poad-nav-drawer-rail-w, 56px)}.poad-nav-drawer.is-right .poad-nav-drawer__panel{border-inline-end:0;border-inline-start:1px solid var(--poad-border)}.poad-nav-drawer.is-temporary{position:fixed;inset:0 auto 0 0;z-index:var(--poad-z-overlay, 100002);pointer-events:none}.poad-nav-drawer.is-temporary.is-right{inset:0 0 0 auto}.poad-nav-drawer.is-temporary .poad-nav-drawer__panel{pointer-events:auto;height:100%;box-shadow:var(--poad-shadow-lg, 0 12px 24px rgba(15,23,42,.18));transform:translate(-100%);transition:transform var(--poad-dur) var(--poad-ease),visibility 0s linear var(--poad-dur);visibility:hidden;padding-top:env(safe-area-inset-top,0px);padding-bottom:env(safe-area-inset-bottom,0px)}.poad-nav-drawer.is-temporary.is-right .poad-nav-drawer__panel{transform:translate(100%)}.poad-nav-drawer.is-temporary.is-open .poad-nav-drawer__panel{transform:translate(0);visibility:visible;transition:transform var(--poad-dur) var(--poad-ease)}.poad-nav-drawer .poad-nav-drawer__scrim{position:fixed;inset:0;background:var(--poad-backdrop, rgba(2,6,23,.45));pointer-events:auto;z-index:-1}.poad-nav-drawer .poad-nav-drawer__head{display:flex;align-items:center;gap:9px;flex:none;box-sizing:border-box;padding:14px 14px 12px;border-bottom:1px solid var(--poad-border);min-height:48px;color:var(--poad-fg);font-size:13px}.poad-nav-drawer.is-rail .poad-nav-drawer__head{justify-content:center;padding:14px 0 12px}.poad-nav-drawer .poad-nav-drawer__head:empty{display:none}.poad-nav-drawer .poad-nav-drawer__head>.poad-icon,.poad-nav-drawer .poad-nav-drawer__head>poad-icon{color:var(--poad-accent);flex:none}.poad-nav-drawer .poad-nav-drawer__list{list-style:none;margin:0;padding:8px 0;flex:1;min-height:0;overflow-y:auto}.poad-nav-drawer .poad-nav-drawer__section{padding:12px 14px 5px;font-size:10px;font-weight:500;letter-spacing:.07em;text-transform:uppercase;color:var(--poad-fg-muted)}.poad-nav-drawer .poad-nav-drawer__rule{height:1px;margin:8px 12px;background:var(--poad-border)}.poad-nav-drawer .poad-nav-drawer__section.is-collapsible{all:unset;box-sizing:border-box;display:flex;align-items:center;gap:8px;width:100%;cursor:pointer;padding:12px 14px 5px;font:500 10px var(--poad-font);letter-spacing:.07em;text-transform:uppercase;color:var(--poad-fg-muted)}.poad-nav-drawer .poad-nav-drawer__section.is-collapsible:hover{color:var(--poad-fg-secondary)}.poad-nav-drawer .poad-nav-drawer__list .poad-nav-drawer__section.is-collapsible:focus-visible{outline:2px solid var(--poad-accent);outline-offset:-2px}.poad-nav-drawer .poad-nav-drawer__chev{flex:none;transition:transform var(--poad-dur) var(--poad-ease)}.poad-nav-drawer .poad-nav-drawer__section.is-collapsed .poad-nav-drawer__chev{transform:rotate(-90deg)}[dir=rtl] .poad-nav-drawer .poad-nav-drawer__section.is-collapsed .poad-nav-drawer__chev{transform:rotate(90deg)}.poad-nav-drawer .poad-nav-drawer__item{all:unset;box-sizing:border-box;display:flex;align-items:center;gap:10px;width:100%;position:relative;cursor:pointer;padding:8px 14px;min-height:38px;color:var(--poad-fg-secondary);font:12.5px var(--poad-font);text-decoration:none}.poad-nav-drawer.is-rail .poad-nav-drawer__item{justify-content:center;padding:10px 0}.poad-nav-drawer .poad-nav-drawer__item:hover{background:var(--poad-hover);color:var(--poad-fg)}.poad-nav-drawer .poad-nav-drawer__list .poad-nav-drawer__item:focus-visible{outline:2px solid var(--poad-accent);outline-offset:-2px}.poad-nav-drawer .poad-nav-drawer__item.is-active{background:var(--poad-accent-soft);color:var(--poad-accent);font-weight:500;box-shadow:inset 3px 0 0 var(--poad-accent)}.poad-nav-drawer.is-right .poad-nav-drawer__item.is-active,[dir=rtl] .poad-nav-drawer:not(.is-right) .poad-nav-drawer__item.is-active{box-shadow:inset -3px 0 0 var(--poad-accent)}.poad-nav-drawer .poad-nav-drawer__item.is-disabled,.poad-nav-drawer .poad-nav-drawer__item:disabled{opacity:.45;cursor:not-allowed}.poad-nav-drawer .poad-nav-drawer__item.is-disabled:hover,.poad-nav-drawer .poad-nav-drawer__item:disabled:hover{background:none;color:var(--poad-fg-secondary)}.poad-nav-drawer .poad-nav-drawer__label{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:start}.poad-nav-drawer .poad-nav-drawer__badge{flex:none;font-size:10.5px;font-family:var(--poad-font-mono);border-radius:var(--poad-radius-pill);padding:1px 7px;background:var(--poad-elevated, var(--poad-border));color:var(--poad-fg-secondary);font-weight:400;letter-spacing:0}.poad-nav-drawer .poad-nav-drawer__item.is-active .poad-nav-drawer__badge{background:var(--poad-accent);color:var(--poad-fg-on-accent)}.poad-nav-drawer .poad-nav-drawer__dot{position:absolute;top:7px;left:calc(50% + 6px);width:7px;height:7px;border-radius:50%;background:var(--poad-danger, #f85149)}.poad-nav-drawer .poad-nav-drawer__foot{flex:none;border-top:1px solid var(--poad-border);padding:10px 14px}.poad-nav-drawer .poad-nav-drawer__foot.is-empty{display:none}.poad-nav-drawer.is-rail .poad-nav-drawer__foot{padding:10px 4px;display:flex;justify-content:center;text-align:center;overflow-wrap:anywhere}.poad-touch .poad-nav-drawer .poad-nav-drawer__item{min-height:44px}@media(prefers-reduced-motion:reduce){.poad-nav-drawer .poad-nav-drawer__panel,.poad-nav-drawer.is-temporary .poad-nav-drawer__panel,.poad-nav-drawer.is-temporary.is-open .poad-nav-drawer__panel,.poad-nav-drawer .poad-nav-drawer__chev{transition:none}}\n"], dependencies: [{ kind: "component", type: PoadIconComponent, selector: "poad-icon", inputs: ["name", "size", "strokeWidth", "label", "title", "spin", "filled", "flip", "rotate"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
9010
9382
  }
9011
9383
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: PoadNavDrawerComponent, decorators: [{
9012
9384
  type: Component,
9013
9385
  args: [{ selector: 'poad-nav-drawer', standalone: true, imports: [PoadIconComponent, RouterLink, NgTemplateOutlet], changeDetection: ChangeDetectionStrategy.OnPush, host: {
9014
9386
  class: 'poad-nav-drawer',
9015
- '[class.is-temporary]': 'temporary()',
9016
- '[class.is-permanent]': '!temporary()',
9017
- '[class.is-rail]': 'rail()',
9018
- '[class.is-open]': 'open()',
9019
- '[class.is-right]': 'position() === "right"',
9387
+ '[class.is-temporary]': 'classes()["is-temporary"]',
9388
+ '[class.is-permanent]': 'classes()["is-permanent"]',
9389
+ '[class.is-rail]': 'classes()["is-rail"]',
9390
+ '[class.is-open]': 'classes()["is-open"]',
9391
+ '[class.is-right]': 'classes()["is-right"]',
9392
+ // `title` est une entrée (titre de l'en-tête) : laissé sur l'hôte, l'attribut ferait une info-bulle sur tout le tiroir.
9393
+ '[attr.title]': 'null',
9394
+ '(document:keydown.escape)': 'onEscape()',
9020
9395
  }, template: `
9021
9396
  <!-- Le voile n'existe qu'en mode tiroir : en permanent il n'y a rien à recouvrir. -->
9022
- @if (temporary() && open()) {
9397
+ @if (modal()) {
9023
9398
  <div class="poad-nav-drawer__scrim" (click)="dismiss()" aria-hidden="true"></div>
9024
9399
  }
9025
9400
 
9026
- <nav
9027
- class="poad-nav-drawer__panel"
9028
- [attr.aria-label]="i18n.text(ariaLabel(), 'nav.mainMenu')"
9029
- [attr.aria-hidden]="temporary() && !open() ? 'true' : null"
9030
- [attr.inert]="temporary() && !open() ? '' : null"
9031
- >
9401
+ @let p = panelAttrs();
9402
+ <nav #panel class="poad-nav-drawer__panel" tabindex="-1"
9403
+ [attr.aria-label]="i18n.text(ariaLabel(), 'nav.mainMenu')" [attr.aria-hidden]="p['aria-hidden']" [attr.inert]="p.inert"
9404
+ [attr.role]="p.role" [attr.aria-modal]="p['aria-modal']">
9032
9405
  <div class="poad-nav-drawer__head">
9033
9406
  <ng-content select="[poadNavDrawerHeader]"/>
9034
9407
  @if (!headerSlot()) {
9035
9408
  @if (icon()) {<poad-icon [name]="icon()" [size]="18"/>}
9036
- @if (!rail()) {<b>{{ title() }}</b>}
9409
+ @if (!rail() && title()) {<b>{{ title() }}</b>}
9037
9410
  }
9038
9411
  </div>
9039
9412
 
9040
- <ul class="poad-nav-drawer__list" role="list">
9041
- @for (r of rows(); track $index) {
9413
+ <ul class="poad-nav-drawer__list" role="list" (keydown)="onListKey($event)">
9414
+ <!-- Suivi par entrée (pas par rang) : après un repli, chaque bouton reste celui de son entrée. -->
9415
+ @for (r of rows(); track r.item; let i = $index) {
9042
9416
  @let it = r.item;
9043
9417
  @if (it.section) {
9044
9418
  <!-- En rail, un intertitre n'a plus de place : un filet le remplace. -->
@@ -9046,45 +9420,37 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImpo
9046
9420
  <li class="poad-nav-drawer__rule" role="separator"></li>
9047
9421
  } @else if (r.collapsible) {
9048
9422
  <li>
9049
- <button
9050
- type="button"
9051
- class="poad-nav-drawer__section is-collapsible"
9052
- [class.is-collapsed]="r.collapsed"
9053
- [attr.aria-expanded]="!r.collapsed"
9054
- (click)="toggleSection(r)"
9055
- >
9423
+ <button type="button" class="poad-nav-drawer__section is-collapsible" [class.is-collapsed]="r.collapsed" [attr.aria-expanded]="!r.collapsed"
9424
+ [attr.data-row]="i" (click)="toggleSection(r)">
9056
9425
  <poad-icon name="chevron-down" [size]="12" class="poad-nav-drawer__chev"/>
9057
9426
  <span class="poad-nav-drawer__label">{{ it.label }}</span>
9058
9427
  <!-- Un compte DÉCLARÉ l'emporte sur le compte calculé : une valeur posée
9059
9428
  par l'hôte est une affirmation, pas un oubli à combler. -->
9060
- <span class="poad-nav-drawer__badge">{{ it.badge ?? r.count }}</span>
9429
+ <span class="poad-nav-drawer__badge">{{ sectionCount(r) }}</span>
9061
9430
  </button>
9062
9431
  </li>
9063
9432
  } @else {
9064
9433
  <li class="poad-nav-drawer__section">{{ it.label }}</li>
9065
9434
  }
9066
9435
  } @else {
9436
+ @let a = attrs(it);
9067
9437
  <li>
9068
- @if (it.routerLink) {
9069
- <a class="poad-nav-drawer__item" [class.is-active]="isActive(it)" [class.is-disabled]="it.disabled"
9070
- [routerLink]="it.routerLink" [queryParams]="it.queryParams"
9071
- [attr.aria-current]="isActive(it) ? 'page' : null" [attr.aria-disabled]="it.disabled || null"
9072
- [attr.title]="rail() ? it.label : null" [attr.aria-label]="it.ariaLabel || (rail() ? it.label : null)"
9073
- (click)="pick(it, $event)">
9438
+ @if (it.routerLink && !it.disabled) {
9439
+ <a class="poad-nav-drawer__item" [class.is-active]="a.classes['is-active']" [routerLink]="it.routerLink" [queryParams]="it.queryParams"
9440
+ [attr.target]="it.target || null" [attr.aria-current]="a['aria-current']" [attr.title]="a.title" [attr.aria-label]="a['aria-label']"
9441
+ [attr.data-row]="i" [attr.data-poad-autofocus]="autofocus(it)" (click)="pick(it, $event)">
9074
9442
  <ng-container *ngTemplateOutlet="row; context: { $implicit: it }"/>
9075
9443
  </a>
9076
- } @else if (it.url) {
9077
- <a class="poad-nav-drawer__item" [class.is-active]="isActive(it)" [class.is-disabled]="it.disabled"
9078
- [href]="it.url" [attr.target]="it.target || null"
9079
- [attr.title]="rail() ? it.label : null" [attr.aria-label]="it.ariaLabel || (rail() ? it.label : null)"
9080
- (click)="pick(it, $event)">
9444
+ } @else if (it.url && !it.disabled) {
9445
+ <a class="poad-nav-drawer__item" [class.is-active]="a.classes['is-active']" [href]="it.url" [attr.target]="it.target || null"
9446
+ [attr.aria-current]="a['aria-current']" [attr.title]="a.title" [attr.aria-label]="a['aria-label']"
9447
+ [attr.data-row]="i" [attr.data-poad-autofocus]="autofocus(it)" (click)="pick(it, $event)">
9081
9448
  <ng-container *ngTemplateOutlet="row; context: { $implicit: it }"/>
9082
9449
  </a>
9083
9450
  } @else {
9084
- <button type="button" class="poad-nav-drawer__item" [class.is-active]="isActive(it)"
9085
- [disabled]="it.disabled" [attr.title]="rail() ? it.label : null"
9086
- [attr.aria-label]="it.ariaLabel || (rail() ? it.label : null)"
9087
- [attr.aria-current]="isActive(it) ? 'page' : null" (click)="pick(it, $event)">
9451
+ <button type="button" class="poad-nav-drawer__item" [class.is-active]="a.classes['is-active']" [class.is-disabled]="a.classes['is-disabled']"
9452
+ [disabled]="it.disabled" [attr.title]="a.title" [attr.aria-label]="a['aria-label']" [attr.aria-current]="a['aria-current']"
9453
+ [attr.data-row]="i" [attr.data-poad-autofocus]="autofocus(it)" (click)="pick(it, $event)">
9088
9454
  <ng-container *ngTemplateOutlet="row; context: { $implicit: it }"/>
9089
9455
  </button>
9090
9456
  }
@@ -9101,20 +9467,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImpo
9101
9467
  </nav>
9102
9468
 
9103
9469
  <ng-template #row let-it>
9470
+ @let b = badge(it);
9104
9471
  @if (it.icon) {<poad-icon [name]="it.icon" [size]="17"/>}
9105
- @if (!rail()) {
9106
- <span class="poad-nav-drawer__label">{{ it.label }}</span>
9107
- @if (it.badge !== undefined && it.badge !== null) {<span class="poad-nav-drawer__badge">{{ it.badge }}</span>}
9108
- } @else if (it.badge !== undefined && it.badge !== null) {
9109
- <!-- En rail le compte ne tient pas : il devient un point, le nombre reste en title. -->
9110
- <span class="poad-nav-drawer__dot" [attr.title]="it.badge"></span>
9111
- }
9472
+ @if (!rail()) {<span class="poad-nav-drawer__label">{{ it.label }}</span>}
9473
+ <!-- En rail le compte ne tient pas : il devient un point, le nombre reste en title. -->
9474
+ @if (b.show && !b.dot) {<span class="poad-nav-drawer__badge">{{ b.text }}</span>}
9475
+ @if (b.dot) {<span class="poad-nav-drawer__dot" [attr.title]="b.text"></span>}
9112
9476
  </ng-template>
9113
- `, styles: [":host{display:block}:host(.is-permanent){flex:none}.poad-nav-drawer__panel{display:flex;flex-direction:column;min-height:0;height:100%;width:var(--poad-nav-drawer-w, 240px);background:var(--poad-bg-subtle);border-inline-end:1px solid var(--poad-border);transition:width var(--poad-dur) var(--poad-ease)}:host(.is-rail) .poad-nav-drawer__panel{width:var(--poad-nav-drawer-rail-w, 56px)}:host(.is-right) .poad-nav-drawer__panel{border-inline-end:0;border-inline-start:1px solid var(--poad-border)}:host(.is-temporary){position:fixed;inset:0 auto 0 0;z-index:var(--poad-z-overlay, 100002);pointer-events:none}:host(.is-temporary.is-right){inset:0 0 0 auto}:host(.is-temporary) .poad-nav-drawer__panel{pointer-events:auto;height:100%;box-shadow:var(--poad-shadow-lg, 0 12px 24px rgba(15,23,42,.18));transform:translate(-100%);transition:transform var(--poad-dur) var(--poad-ease);padding-top:env(safe-area-inset-top,0px);padding-bottom:env(safe-area-inset-bottom,0px)}:host(.is-temporary.is-right) .poad-nav-drawer__panel{transform:translate(100%)}:host(.is-temporary.is-open) .poad-nav-drawer__panel{transform:translate(0)}.poad-nav-drawer__scrim{position:fixed;inset:0;background:var(--poad-backdrop, rgba(2,6,23,.45));pointer-events:auto;z-index:-1}.poad-nav-drawer__head{display:flex;align-items:center;gap:9px;flex:none;padding:14px 14px 12px;border-bottom:1px solid var(--poad-border);min-height:48px;color:var(--poad-fg);font-size:13px}:host(.is-rail) .poad-nav-drawer__head{justify-content:center;padding:14px 0 12px}.poad-nav-drawer__head poad-icon{color:var(--poad-accent);flex:none}.poad-nav-drawer__list{list-style:none;margin:0;padding:8px 0;flex:1;min-height:0;overflow-y:auto}.poad-nav-drawer__section{padding:12px 14px 5px;font-size:10px;font-weight:500;letter-spacing:.07em;text-transform:uppercase;color:var(--poad-fg-muted)}.poad-nav-drawer__rule{height:1px;margin:8px 12px;background:var(--poad-border)}.poad-nav-drawer__section.is-collapsible{all:unset;box-sizing:border-box;display:flex;align-items:center;gap:8px;width:100%;cursor:pointer;padding:12px 14px 5px;font:500 10px var(--poad-font);letter-spacing:.07em;text-transform:uppercase;color:var(--poad-fg-muted)}.poad-nav-drawer__section.is-collapsible:hover{color:var(--poad-fg-secondary)}.poad-nav-drawer__section.is-collapsible:focus-visible{outline:2px solid var(--poad-accent);outline-offset:-2px}.poad-nav-drawer__chev{flex:none;transition:transform var(--poad-dur) var(--poad-ease)}.poad-nav-drawer__section.is-collapsed .poad-nav-drawer__chev{transform:rotate(-90deg)}@media(prefers-reduced-motion:reduce){.poad-nav-drawer__chev{transition:none}}.poad-nav-drawer__item{all:unset;box-sizing:border-box;display:flex;align-items:center;gap:10px;width:100%;cursor:pointer;padding:8px 14px;min-height:38px;color:var(--poad-fg-secondary);font:12.5px var(--poad-font);text-decoration:none}:host(.is-rail) .poad-nav-drawer__item{justify-content:center;padding:10px 0}.poad-nav-drawer__item:hover{background:var(--poad-hover);color:var(--poad-fg)}.poad-nav-drawer__item:focus-visible{outline:2px solid var(--poad-accent);outline-offset:-2px}.poad-nav-drawer__item.is-active{background:var(--poad-accent-soft);color:var(--poad-accent);font-weight:500;box-shadow:inset 3px 0 0 var(--poad-accent)}:host(.is-right) .poad-nav-drawer__item.is-active{box-shadow:inset -3px 0 0 var(--poad-accent)}.poad-nav-drawer__item.is-disabled,.poad-nav-drawer__item:disabled{opacity:.45;cursor:not-allowed}.poad-nav-drawer__label{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.poad-nav-drawer__badge{flex:none;font-size:10.5px;font-family:var(--poad-font-mono);border-radius:var(--poad-radius-pill);padding:1px 7px;background:var(--poad-elevated, var(--poad-border));color:var(--poad-fg-secondary)}.poad-nav-drawer__item.is-active .poad-nav-drawer__badge{background:var(--poad-accent);color:var(--poad-fg-on-accent)}.poad-nav-drawer__dot{position:absolute;margin:-14px 0 0 14px;width:7px;height:7px;border-radius:50%;background:var(--poad-danger, #f85149)}.poad-nav-drawer__foot{flex:none;border-top:1px solid var(--poad-border);padding:10px 14px}.poad-nav-drawer__foot.is-empty{display:none}:host(.is-rail) .poad-nav-drawer__foot{padding:10px 0;display:flex;justify-content:center}:host-context(.poad-touch) .poad-nav-drawer__item{min-height:44px}@media(prefers-reduced-motion:reduce){.poad-nav-drawer__panel{transition:none}}\n"] }]
9114
- }], ctorParameters: () => [], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], collapsed: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsed", required: false }] }, { type: i0.Output, args: ["collapsedChange"] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], breakpoint: [{ type: i0.Input, args: [{ isSignal: true, alias: "breakpoint", required: false }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], closeOnNavigate: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnNavigate", required: false }] }], closeOnEscape: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnEscape", required: false }] }], dismissableScrim: [{ type: i0.Input, args: [{ isSignal: true, alias: "dismissableScrim", required: false }] }], opened: [{ type: i0.Output, args: ["opened"] }], closed: [{ type: i0.Output, args: ["closed"] }], itemClick: [{ type: i0.Output, args: ["itemClick"] }], changed: [{ type: i0.Output, args: ["changed"] }], headerSlot: [{ type: i0.ContentChild, args: [i0.forwardRef(() => PoadNavDrawerHeaderDirective), { isSignal: true }] }], footerSlot: [{ type: i0.ContentChild, args: [i0.forwardRef(() => PoadNavDrawerFooterDirective), { isSignal: true }] }], onEscape: [{
9115
- type: HostListener,
9116
- args: ['document:keydown.escape']
9117
- }] } });
9477
+ `, encapsulation: ViewEncapsulation.None, styles: [".poad-nav-drawer{display:block;box-sizing:border-box;font-family:var(--poad-font)}.poad-nav-drawer.is-permanent{flex:none}.poad-nav-drawer .poad-nav-drawer__panel{display:flex;flex-direction:column;min-height:0;height:100%;box-sizing:border-box;width:var(--poad-nav-drawer-w, 240px);background:var(--poad-bg-subtle);border-inline-end:1px solid var(--poad-border);transition:width var(--poad-dur) var(--poad-ease)}.poad-nav-drawer.is-rail .poad-nav-drawer__panel{width:var(--poad-nav-drawer-rail-w, 56px)}.poad-nav-drawer.is-right .poad-nav-drawer__panel{border-inline-end:0;border-inline-start:1px solid var(--poad-border)}.poad-nav-drawer.is-temporary{position:fixed;inset:0 auto 0 0;z-index:var(--poad-z-overlay, 100002);pointer-events:none}.poad-nav-drawer.is-temporary.is-right{inset:0 0 0 auto}.poad-nav-drawer.is-temporary .poad-nav-drawer__panel{pointer-events:auto;height:100%;box-shadow:var(--poad-shadow-lg, 0 12px 24px rgba(15,23,42,.18));transform:translate(-100%);transition:transform var(--poad-dur) var(--poad-ease),visibility 0s linear var(--poad-dur);visibility:hidden;padding-top:env(safe-area-inset-top,0px);padding-bottom:env(safe-area-inset-bottom,0px)}.poad-nav-drawer.is-temporary.is-right .poad-nav-drawer__panel{transform:translate(100%)}.poad-nav-drawer.is-temporary.is-open .poad-nav-drawer__panel{transform:translate(0);visibility:visible;transition:transform var(--poad-dur) var(--poad-ease)}.poad-nav-drawer .poad-nav-drawer__scrim{position:fixed;inset:0;background:var(--poad-backdrop, rgba(2,6,23,.45));pointer-events:auto;z-index:-1}.poad-nav-drawer .poad-nav-drawer__head{display:flex;align-items:center;gap:9px;flex:none;box-sizing:border-box;padding:14px 14px 12px;border-bottom:1px solid var(--poad-border);min-height:48px;color:var(--poad-fg);font-size:13px}.poad-nav-drawer.is-rail .poad-nav-drawer__head{justify-content:center;padding:14px 0 12px}.poad-nav-drawer .poad-nav-drawer__head:empty{display:none}.poad-nav-drawer .poad-nav-drawer__head>.poad-icon,.poad-nav-drawer .poad-nav-drawer__head>poad-icon{color:var(--poad-accent);flex:none}.poad-nav-drawer .poad-nav-drawer__list{list-style:none;margin:0;padding:8px 0;flex:1;min-height:0;overflow-y:auto}.poad-nav-drawer .poad-nav-drawer__section{padding:12px 14px 5px;font-size:10px;font-weight:500;letter-spacing:.07em;text-transform:uppercase;color:var(--poad-fg-muted)}.poad-nav-drawer .poad-nav-drawer__rule{height:1px;margin:8px 12px;background:var(--poad-border)}.poad-nav-drawer .poad-nav-drawer__section.is-collapsible{all:unset;box-sizing:border-box;display:flex;align-items:center;gap:8px;width:100%;cursor:pointer;padding:12px 14px 5px;font:500 10px var(--poad-font);letter-spacing:.07em;text-transform:uppercase;color:var(--poad-fg-muted)}.poad-nav-drawer .poad-nav-drawer__section.is-collapsible:hover{color:var(--poad-fg-secondary)}.poad-nav-drawer .poad-nav-drawer__list .poad-nav-drawer__section.is-collapsible:focus-visible{outline:2px solid var(--poad-accent);outline-offset:-2px}.poad-nav-drawer .poad-nav-drawer__chev{flex:none;transition:transform var(--poad-dur) var(--poad-ease)}.poad-nav-drawer .poad-nav-drawer__section.is-collapsed .poad-nav-drawer__chev{transform:rotate(-90deg)}[dir=rtl] .poad-nav-drawer .poad-nav-drawer__section.is-collapsed .poad-nav-drawer__chev{transform:rotate(90deg)}.poad-nav-drawer .poad-nav-drawer__item{all:unset;box-sizing:border-box;display:flex;align-items:center;gap:10px;width:100%;position:relative;cursor:pointer;padding:8px 14px;min-height:38px;color:var(--poad-fg-secondary);font:12.5px var(--poad-font);text-decoration:none}.poad-nav-drawer.is-rail .poad-nav-drawer__item{justify-content:center;padding:10px 0}.poad-nav-drawer .poad-nav-drawer__item:hover{background:var(--poad-hover);color:var(--poad-fg)}.poad-nav-drawer .poad-nav-drawer__list .poad-nav-drawer__item:focus-visible{outline:2px solid var(--poad-accent);outline-offset:-2px}.poad-nav-drawer .poad-nav-drawer__item.is-active{background:var(--poad-accent-soft);color:var(--poad-accent);font-weight:500;box-shadow:inset 3px 0 0 var(--poad-accent)}.poad-nav-drawer.is-right .poad-nav-drawer__item.is-active,[dir=rtl] .poad-nav-drawer:not(.is-right) .poad-nav-drawer__item.is-active{box-shadow:inset -3px 0 0 var(--poad-accent)}.poad-nav-drawer .poad-nav-drawer__item.is-disabled,.poad-nav-drawer .poad-nav-drawer__item:disabled{opacity:.45;cursor:not-allowed}.poad-nav-drawer .poad-nav-drawer__item.is-disabled:hover,.poad-nav-drawer .poad-nav-drawer__item:disabled:hover{background:none;color:var(--poad-fg-secondary)}.poad-nav-drawer .poad-nav-drawer__label{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:start}.poad-nav-drawer .poad-nav-drawer__badge{flex:none;font-size:10.5px;font-family:var(--poad-font-mono);border-radius:var(--poad-radius-pill);padding:1px 7px;background:var(--poad-elevated, var(--poad-border));color:var(--poad-fg-secondary);font-weight:400;letter-spacing:0}.poad-nav-drawer .poad-nav-drawer__item.is-active .poad-nav-drawer__badge{background:var(--poad-accent);color:var(--poad-fg-on-accent)}.poad-nav-drawer .poad-nav-drawer__dot{position:absolute;top:7px;left:calc(50% + 6px);width:7px;height:7px;border-radius:50%;background:var(--poad-danger, #f85149)}.poad-nav-drawer .poad-nav-drawer__foot{flex:none;border-top:1px solid var(--poad-border);padding:10px 14px}.poad-nav-drawer .poad-nav-drawer__foot.is-empty{display:none}.poad-nav-drawer.is-rail .poad-nav-drawer__foot{padding:10px 4px;display:flex;justify-content:center;text-align:center;overflow-wrap:anywhere}.poad-touch .poad-nav-drawer .poad-nav-drawer__item{min-height:44px}@media(prefers-reduced-motion:reduce){.poad-nav-drawer .poad-nav-drawer__panel,.poad-nav-drawer.is-temporary .poad-nav-drawer__panel,.poad-nav-drawer.is-temporary.is-open .poad-nav-drawer__panel,.poad-nav-drawer .poad-nav-drawer__chev{transition:none}}\n"] }]
9478
+ }], ctorParameters: () => [], propDecorators: { panel: [{ type: i0.ViewChild, args: ['panel', { isSignal: true }] }], items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], current: [{ type: i0.Input, args: [{ isSignal: true, alias: "current", required: false }] }], collapsed: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsed", required: false }] }, { type: i0.Output, args: ["collapsedChange"] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], breakpoint: [{ type: i0.Input, args: [{ isSignal: true, alias: "breakpoint", required: false }] }], railBelow: [{ type: i0.Input, args: [{ isSignal: true, alias: "railBelow", required: false }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], closeOnNavigate: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnNavigate", required: false }] }], closeOnEscape: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnEscape", required: false }] }], dismissableScrim: [{ type: i0.Input, args: [{ isSignal: true, alias: "dismissableScrim", required: false }] }], opened: [{ type: i0.Output, args: ["opened"] }], closed: [{ type: i0.Output, args: ["closed"] }], itemClick: [{ type: i0.Output, args: ["itemClick"] }], changed: [{ type: i0.Output, args: ["changed"] }], headerSlot: [{ type: i0.ContentChild, args: [i0.forwardRef(() => PoadNavDrawerHeaderDirective), { isSignal: true }] }], footerSlot: [{ type: i0.ContentChild, args: [i0.forwardRef(() => PoadNavDrawerFooterDirective), { isSignal: true }] }] } });
9118
9479
 
9119
9480
  /**
9120
9481
  * Déclarations (inputs / outputs / models / contenu projeté) de poad-table — classe de base pour tenir la limite de taille du composant.
@@ -31041,6 +31402,11 @@ const CATALOGUE = {
31041
31402
  "name": "poadIf",
31042
31403
  "required": true,
31043
31404
  "type": "string"
31405
+ },
31406
+ {
31407
+ "name": "poadIfElse",
31408
+ "required": false,
31409
+ "type": "TemplateRef<unknown> | null"
31044
31410
  }
31045
31411
  ],
31046
31412
  "outputs": []
@@ -31072,13 +31438,13 @@ const CATALOGUE = {
31072
31438
  {
31073
31439
  "name": "align",
31074
31440
  "required": false,
31075
- "type": "'stretch' | 'start' | 'center' | 'end' | 'baseline'",
31441
+ "type": "Align",
31076
31442
  "default": "stretch"
31077
31443
  },
31078
31444
  {
31079
31445
  "name": "justify",
31080
31446
  "required": false,
31081
- "type": "'start' | 'center' | 'end' | 'between' | 'around' | 'evenly'",
31447
+ "type": "Justify",
31082
31448
  "default": "start"
31083
31449
  },
31084
31450
  {
@@ -31111,13 +31477,13 @@ const CATALOGUE = {
31111
31477
  {
31112
31478
  "name": "align",
31113
31479
  "required": false,
31114
- "type": "'stretch' | 'start' | 'center' | 'end' | 'baseline'",
31480
+ "type": "Align",
31115
31481
  "default": "center"
31116
31482
  },
31117
31483
  {
31118
31484
  "name": "justify",
31119
31485
  "required": false,
31120
- "type": "'start' | 'center' | 'end' | 'between' | 'around' | 'evenly'",
31486
+ "type": "Justify",
31121
31487
  "default": "start"
31122
31488
  },
31123
31489
  {
@@ -31174,7 +31540,7 @@ const CATALOGUE = {
31174
31540
  {
31175
31541
  "name": "align",
31176
31542
  "required": false,
31177
- "type": "'stretch' | 'start' | 'center' | 'end' | 'baseline'",
31543
+ "type": "Align",
31178
31544
  "default": "stretch"
31179
31545
  },
31180
31546
  {
@@ -31225,7 +31591,7 @@ const CATALOGUE = {
31225
31591
  {
31226
31592
  "name": "align",
31227
31593
  "required": false,
31228
- "type": "'stretch' | 'start' | 'center' | 'end' | 'baseline'",
31594
+ "type": "Align",
31229
31595
  "default": "stretch"
31230
31596
  },
31231
31597
  {
@@ -31249,7 +31615,7 @@ const CATALOGUE = {
31249
31615
  "symbol": "PoadSidebarComponent",
31250
31616
  "selector": "poad-sidebar",
31251
31617
  "kind": "component",
31252
- "role": null,
31618
+ "role": "Contenu et panneau latéral (le panneau : `[poadSidebarPanel]`). Style : `@poadio/ui-core/layout.css` ; valeurs de",
31253
31619
  "atelier": {
31254
31620
  "icone": "panel-left"
31255
31621
  },
@@ -31281,7 +31647,7 @@ const CATALOGUE = {
31281
31647
  {
31282
31648
  "name": "align",
31283
31649
  "required": false,
31284
- "type": "'stretch' | 'start' | 'center' | 'end' | 'baseline'",
31650
+ "type": "Align",
31285
31651
  "default": "stretch"
31286
31652
  },
31287
31653
  {
@@ -31344,7 +31710,7 @@ const CATALOGUE = {
31344
31710
  {
31345
31711
  "name": "size",
31346
31712
  "required": false,
31347
- "type": "'sm' | 'md' | 'lg' | 'xl' | '2xl' | 'full'",
31713
+ "type": "LayoutContainerSize",
31348
31714
  "default": "full"
31349
31715
  },
31350
31716
  {
@@ -33384,19 +33750,17 @@ const CATALOGUE = {
33384
33750
  {
33385
33751
  "name": "labels",
33386
33752
  "required": false,
33387
- "type": "'always' | 'selected' | 'never'",
33753
+ "type": "BottomNavLabels",
33388
33754
  "default": "always"
33389
33755
  },
33390
33756
  {
33391
33757
  "name": "maxItems",
33392
- "required": false,
33393
- "type": "number",
33394
- "default": 5
33758
+ "required": false
33395
33759
  },
33396
33760
  {
33397
33761
  "name": "breakpoint",
33398
33762
  "required": false,
33399
- "type": "'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl'",
33763
+ "type": "PoadBreakpoint",
33400
33764
  "default": "md"
33401
33765
  },
33402
33766
  {
@@ -33647,6 +34011,11 @@ const CATALOGUE = {
33647
34011
  "required": false,
33648
34012
  "type": "boolean",
33649
34013
  "default": true
34014
+ },
34015
+ {
34016
+ "name": "current",
34017
+ "required": false,
34018
+ "type": "string | null"
33650
34019
  }
33651
34020
  ],
33652
34021
  "outputs": [
@@ -33682,7 +34051,7 @@ const CATALOGUE = {
33682
34051
  "symbol": "PoadNavDrawerFooterDirective",
33683
34052
  "selector": "[poadNavDrawerFooter]",
33684
34053
  "kind": "directive",
33685
- "role": null,
34054
+ "role": "Pied du tiroir (compte, déconnexion…) : marqueur de slot, sur n'importe quel élément.",
33686
34055
  "inputs": [],
33687
34056
  "outputs": []
33688
34057
  },
@@ -33736,6 +34105,11 @@ const CATALOGUE = {
33736
34105
  "twoWay": true,
33737
34106
  "type": "string | null"
33738
34107
  },
34108
+ {
34109
+ "name": "current",
34110
+ "required": false,
34111
+ "type": "string | null"
34112
+ },
33739
34113
  {
33740
34114
  "name": "collapsed",
33741
34115
  "twoWay": true,
@@ -33744,15 +34118,21 @@ const CATALOGUE = {
33744
34118
  {
33745
34119
  "name": "mode",
33746
34120
  "required": false,
33747
- "type": "'auto' | 'permanent' | 'temporary' | 'rail'",
34121
+ "type": "PoadNavDrawerMode",
33748
34122
  "default": "auto"
33749
34123
  },
33750
34124
  {
33751
34125
  "name": "breakpoint",
33752
34126
  "required": false,
33753
- "type": "'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl'",
34127
+ "type": "PoadBreakpoint",
33754
34128
  "default": "md"
33755
34129
  },
34130
+ {
34131
+ "name": "railBelow",
34132
+ "required": false,
34133
+ "type": "PoadBreakpoint | ''",
34134
+ "default": ""
34135
+ },
33756
34136
  {
33757
34137
  "name": "position",
33758
34138
  "required": false,
@@ -37080,8 +37460,8 @@ const CATALOGUE = {
37080
37460
  "symbols": 175,
37081
37461
  "components": 113,
37082
37462
  "directives": 62,
37083
- "inputs": 1201,
37084
- "inputsTypes": 1201,
37463
+ "inputs": 1205,
37464
+ "inputsTypes": 1204,
37085
37465
  "outputs": 233,
37086
37466
  "outputsTypes": 233
37087
37467
  }