@poadio/ui-angular 0.14.0 → 0.15.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, tableToggleRow, tableSelectSingle, tableSelectRange, tableSelectOnly, tableToggleAll, tableClearSelection, 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, MENU_PLACEMENTS, MENU_OFFSET, MENU_INITIAL, menuVisible, menuHasIcons, menuItemProps, menuSubIcon, menuUseSheet, menuKeydown, menuOpen, menuActivate, menuHover, menuSubHover, splitButtonIconSize, splitButtonToggleProps, tableSortMetas, tableCollator, tableGlobalFields, tableView, tableBodyState, tableHeaderRowProps, tableRootProps, tableActiveIndex, tableRowProps, tableFilterActiveCount, tableRowCountParts, tableCounts, paginatorClampFirst, tableFormatCell, tableThClasses, tableTdClasses, tableRowClasses, tableSkeletonWidth, tableSortIndex, tableSortOrderOf, tableSortIcon, tableAriaSort, tableSortToggle, tableSortState, tableFilterDelay, tableFilterSet, TABLE_ROW_CLICK_IGNORE, tableRowClickAction, tableGridKey, tableSortTo, tableFilterIsActive, tableFilterValues, tableFilterPart, tableFilterSetOperator, tableFilterRangePart, tableFilterToggleValue, tableFilterClear, tablePanelOperatorOptions, TABLE_PANEL_TABS, tablePanelTabProps, tablePanelBodyProps, tablePanelTabKey, tablePanelTabClick, tablePanelColumnMatches, tablePanelAllState, 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, dividerClasses, dividerProps, avatarGroupHidden, avatarGroupHiddenTitle, avatarGroupMoreText, avatarGroupOverflow, meterTotal, meterRemaining, meterSegments, meterRootClasses, meterBarProps, meterValueText, meterPercentText, 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, 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, tableToggleRow, tableSelectSingle, tableSelectRange, tableSelectOnly, tableToggleAll, tableClearSelection, 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, MENU_PLACEMENTS, MENU_OFFSET, MENU_INITIAL, menuVisible, menuHasIcons, menuItemProps, menuSubIcon, menuUseSheet, menuKeydown, menuOpen, menuActivate, menuHover, menuSubHover, splitButtonIconSize, splitButtonToggleProps, tableSortMetas, tableCollator, tableGlobalFields, tableView, tableBodyState, tableHeaderRowProps, tableRootProps, tableActiveIndex, tableRowProps, tableFilterActiveCount, tableRowCountParts, tableCounts, paginatorClampFirst, tableFormatCell, tableThClasses, tableTdClasses, tableRowClasses, tableSkeletonWidth, tableSortIndex, tableSortOrderOf, tableSortIcon, tableAriaSort, tableSortToggle, tableSortState, tableFilterDelay, tableFilterSet, TABLE_ROW_CLICK_IGNORE, tableRowClickAction, tableGridKey, tableSortTo, tableFilterIsActive, tableFilterValues, tableFilterPart, tableFilterSetOperator, tableFilterRangePart, tableFilterToggleValue, tableFilterClear, tablePanelOperatorOptions, TABLE_PANEL_TABS, tablePanelTabProps, tablePanelBodyProps, tablePanelTabKey, tablePanelTabClick, tablePanelColumnMatches, tablePanelAllState, 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, 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';
|
|
@@ -12019,6 +12019,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImpo
|
|
|
12019
12019
|
* contenu
|
|
12020
12020
|
* <div poadCardFooter>…</div>
|
|
12021
12021
|
* </poad-card>
|
|
12022
|
+
* Classes et zones décrites par @poadio/ui-core (`cardClasses`, `cardHasHead`) ; style partagé :
|
|
12023
|
+
* `@poadio/ui-core/card.css` (encapsulation désactivée, sélecteurs `.poad-card`).
|
|
12022
12024
|
* @atelier icone=layout-template conteneur=flux largeur=6 hauteur=6 rang=2
|
|
12023
12025
|
*/
|
|
12024
12026
|
class PoadCardComponent {
|
|
@@ -12029,11 +12031,29 @@ class PoadCardComponent {
|
|
|
12029
12031
|
compact = input(false, { ...(ngDevMode ? { debugName: "compact" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
12030
12032
|
padding = input('', ...(ngDevMode ? [{ debugName: "padding" }] : /* istanbul ignore next */ []));
|
|
12031
12033
|
headerTpl = contentChild(PoadCardHeaderDirective, ...(ngDevMode ? [{ debugName: "headerTpl" }] : /* istanbul ignore next */ []));
|
|
12032
|
-
|
|
12033
|
-
|
|
12034
|
+
host = inject(ElementRef).nativeElement;
|
|
12035
|
+
/**
|
|
12036
|
+
* L'en-tête est rendu si des actions sont projetées. Un attribut `[poadCardActions]` n'est pas une directive : il ne
|
|
12037
|
+
* se lit pas par une requête de contenu, et le contenu projeté n'est dans le DOM qu'une fois posé dans sa fente.
|
|
12038
|
+
* D'où la sonde : au premier rendu sans en-tête, la fente des actions est posée seule (vide, elle est masquée par la
|
|
12039
|
+
* feuille) ; après la vue, on regarde si elle a reçu quelque chose (une fois, au navigateur comme au serveur), puis
|
|
12040
|
+
* elle disparaît ou passe dans l'en-tête. Avant, la présence était lue dans le constructeur, quand le contenu
|
|
12041
|
+
* n'existait pas encore : des actions sans titre ne s'affichaient jamais.
|
|
12042
|
+
*/
|
|
12043
|
+
hasActions = signal(false, ...(ngDevMode ? [{ debugName: "hasActions" }] : /* istanbul ignore next */ []));
|
|
12044
|
+
probed = signal(false, ...(ngDevMode ? [{ debugName: "probed" }] : /* istanbul ignore next */ []));
|
|
12045
|
+
hostClass = computed(() => cardClasses({ hoverable: this.hoverable(), flat: this.flat(), compact: this.compact() }), ...(ngDevMode ? [{ debugName: "hostClass" }] : /* istanbul ignore next */ []));
|
|
12046
|
+
pad = computed(() => cardPadding(this.padding()), ...(ngDevMode ? [{ debugName: "pad" }] : /* istanbul ignore next */ []));
|
|
12047
|
+
hasHead = computed(() => cardHasHead({ header: this.header(), subheader: this.subheader(), customHeader: !!this.headerTpl(), actions: this.hasActions() }), ...(ngDevMode ? [{ debugName: "hasHead" }] : /* istanbul ignore next */ []));
|
|
12048
|
+
ngAfterViewInit() {
|
|
12049
|
+
const own = [...this.host.children].flatMap((c) => (c.classList.contains('poad-card__head') ? [...c.children] : [c]));
|
|
12050
|
+
const slot = own.find((c) => c.classList.contains('poad-card__actions'));
|
|
12051
|
+
this.hasActions.set(!!slot && slot.childNodes.length > 0);
|
|
12052
|
+
this.probed.set(true);
|
|
12053
|
+
}
|
|
12034
12054
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: PoadCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
12035
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.20", type: PoadCardComponent, isStandalone: true, selector: "poad-card", inputs: { header: { classPropertyName: "header", publicName: "header", isSignal: true, isRequired: false, transformFunction: null }, subheader: { classPropertyName: "subheader", publicName: "subheader", isSignal: true, isRequired: false, transformFunction: null }, hoverable: { classPropertyName: "hoverable", publicName: "hoverable", isSignal: true, isRequired: false, transformFunction: null }, flat: { classPropertyName: "flat", publicName: "flat", isSignal: true, isRequired: false, transformFunction: null }, compact: { classPropertyName: "compact", publicName: "compact", isSignal: true, isRequired: false, transformFunction: null }, padding: { classPropertyName: "padding", publicName: "padding", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class
|
|
12036
|
-
@if (
|
|
12055
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.20", type: PoadCardComponent, isStandalone: true, selector: "poad-card", inputs: { header: { classPropertyName: "header", publicName: "header", isSignal: true, isRequired: false, transformFunction: null }, subheader: { classPropertyName: "subheader", publicName: "subheader", isSignal: true, isRequired: false, transformFunction: null }, hoverable: { classPropertyName: "hoverable", publicName: "hoverable", isSignal: true, isRequired: false, transformFunction: null }, flat: { classPropertyName: "flat", publicName: "flat", isSignal: true, isRequired: false, transformFunction: null }, compact: { classPropertyName: "compact", publicName: "compact", isSignal: true, isRequired: false, transformFunction: null }, padding: { classPropertyName: "padding", publicName: "padding", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "hostClass()", "style.--_pad": "pad()" }, classAttribute: "poad-card" }, queries: [{ propertyName: "headerTpl", first: true, predicate: PoadCardHeaderDirective, descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
12056
|
+
@if (hasHead()) {
|
|
12037
12057
|
<div class="poad-card__head">
|
|
12038
12058
|
<div class="poad-card__titles">
|
|
12039
12059
|
@if (headerTpl()) { <ng-container [ngTemplateOutlet]="headerTpl()!.tpl" /> }
|
|
@@ -12042,17 +12062,20 @@ class PoadCardComponent {
|
|
|
12042
12062
|
@if (subheader()) { <div class="poad-card__sub">{{ subheader() }}</div> }
|
|
12043
12063
|
}
|
|
12044
12064
|
</div>
|
|
12045
|
-
<
|
|
12065
|
+
<ng-container [ngTemplateOutlet]="actionsSlot" />
|
|
12046
12066
|
</div>
|
|
12067
|
+
} @else if (!probed()) {
|
|
12068
|
+
<ng-container [ngTemplateOutlet]="actionsSlot" />
|
|
12047
12069
|
}
|
|
12048
12070
|
<div class="poad-card__body"><ng-content /></div>
|
|
12049
12071
|
<div class="poad-card__foot"><ng-content select="[poadCardFooter]" /></div>
|
|
12050
|
-
|
|
12072
|
+
<ng-template #actionsSlot><div class="poad-card__actions"><ng-content select="[poadCardActions]" /></div></ng-template>
|
|
12073
|
+
`, isInline: true, styles: [".poad-card{--_pad: 16px;display:flex;flex-direction:column;background:var(--poad-surface);border:1px solid var(--poad-border);border-radius:var(--poad-radius-lg);box-shadow:var(--poad-shadow-sm);font-family:var(--poad-font);font-size:var(--poad-font-size);color:var(--poad-fg);overflow:hidden;transition:box-shadow var(--poad-dur),border-color var(--poad-dur)}.poad-card.is-compact{--_pad: 10px}.poad-card.is-flat{box-shadow:none}.poad-card.is-hoverable:hover{box-shadow:var(--poad-shadow-md);border-color:var(--poad-border-strong)}.poad-card .poad-card__head{display:flex;align-items:flex-start;gap:10px;padding-block:var(--_pad) 0;padding-inline:var(--_pad)}.poad-card .poad-card__titles{flex:1;min-width:0}.poad-card .poad-card__title{font-size:14px;font-weight:600;line-height:1.3}.poad-card .poad-card__sub{font-size:var(--poad-font-size-sm);color:var(--poad-fg-secondary);margin-top:2px}.poad-card .poad-card__actions{display:flex;gap:4px;flex:none}.poad-card .poad-card__actions:empty{display:none}.poad-card .poad-card__body{padding:var(--_pad);flex:1}.poad-card .poad-card__head+.poad-card__body{padding-top:10px}.poad-card .poad-card__foot{padding:10px var(--_pad);background:var(--poad-bg-subtle);border-top:1px solid var(--poad-border)}.poad-card .poad-card__foot:empty,.poad-card .poad-card__foot:not(:has(*)){display:none}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
12051
12074
|
}
|
|
12052
12075
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: PoadCardComponent, decorators: [{
|
|
12053
12076
|
type: Component,
|
|
12054
|
-
args: [{ selector: 'poad-card', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'poad-card', '[class
|
|
12055
|
-
@if (
|
|
12077
|
+
args: [{ selector: 'poad-card', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'poad-card', '[class]': 'hostClass()', '[style.--_pad]': 'pad()' }, template: `
|
|
12078
|
+
@if (hasHead()) {
|
|
12056
12079
|
<div class="poad-card__head">
|
|
12057
12080
|
<div class="poad-card__titles">
|
|
12058
12081
|
@if (headerTpl()) { <ng-container [ngTemplateOutlet]="headerTpl()!.tpl" /> }
|
|
@@ -12061,12 +12084,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImpo
|
|
|
12061
12084
|
@if (subheader()) { <div class="poad-card__sub">{{ subheader() }}</div> }
|
|
12062
12085
|
}
|
|
12063
12086
|
</div>
|
|
12064
|
-
<
|
|
12087
|
+
<ng-container [ngTemplateOutlet]="actionsSlot" />
|
|
12065
12088
|
</div>
|
|
12089
|
+
} @else if (!probed()) {
|
|
12090
|
+
<ng-container [ngTemplateOutlet]="actionsSlot" />
|
|
12066
12091
|
}
|
|
12067
12092
|
<div class="poad-card__body"><ng-content /></div>
|
|
12068
12093
|
<div class="poad-card__foot"><ng-content select="[poadCardFooter]" /></div>
|
|
12069
|
-
|
|
12094
|
+
<ng-template #actionsSlot><div class="poad-card__actions"><ng-content select="[poadCardActions]" /></div></ng-template>
|
|
12095
|
+
`, imports: [NgTemplateOutlet], encapsulation: ViewEncapsulation.None, styles: [".poad-card{--_pad: 16px;display:flex;flex-direction:column;background:var(--poad-surface);border:1px solid var(--poad-border);border-radius:var(--poad-radius-lg);box-shadow:var(--poad-shadow-sm);font-family:var(--poad-font);font-size:var(--poad-font-size);color:var(--poad-fg);overflow:hidden;transition:box-shadow var(--poad-dur),border-color var(--poad-dur)}.poad-card.is-compact{--_pad: 10px}.poad-card.is-flat{box-shadow:none}.poad-card.is-hoverable:hover{box-shadow:var(--poad-shadow-md);border-color:var(--poad-border-strong)}.poad-card .poad-card__head{display:flex;align-items:flex-start;gap:10px;padding-block:var(--_pad) 0;padding-inline:var(--_pad)}.poad-card .poad-card__titles{flex:1;min-width:0}.poad-card .poad-card__title{font-size:14px;font-weight:600;line-height:1.3}.poad-card .poad-card__sub{font-size:var(--poad-font-size-sm);color:var(--poad-fg-secondary);margin-top:2px}.poad-card .poad-card__actions{display:flex;gap:4px;flex:none}.poad-card .poad-card__actions:empty{display:none}.poad-card .poad-card__body{padding:var(--_pad);flex:1}.poad-card .poad-card__head+.poad-card__body{padding-top:10px}.poad-card .poad-card__foot{padding:10px var(--_pad);background:var(--poad-bg-subtle);border-top:1px solid var(--poad-border)}.poad-card .poad-card__foot:empty,.poad-card .poad-card__foot:not(:has(*)){display:none}\n"] }]
|
|
12070
12096
|
}], propDecorators: { header: [{ type: i0.Input, args: [{ isSignal: true, alias: "header", required: false }] }], subheader: [{ type: i0.Input, args: [{ isSignal: true, alias: "subheader", required: false }] }], hoverable: [{ type: i0.Input, args: [{ isSignal: true, alias: "hoverable", required: false }] }], flat: [{ type: i0.Input, args: [{ isSignal: true, alias: "flat", required: false }] }], compact: [{ type: i0.Input, args: [{ isSignal: true, alias: "compact", required: false }] }], padding: [{ type: i0.Input, args: [{ isSignal: true, alias: "padding", required: false }] }], headerTpl: [{ type: i0.ContentChild, args: [i0.forwardRef(() => PoadCardHeaderDirective), { isSignal: true }] }] } });
|
|
12071
12097
|
|
|
12072
12098
|
/**
|
|
@@ -12101,7 +12127,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImpo
|
|
|
12101
12127
|
}] });
|
|
12102
12128
|
/**
|
|
12103
12129
|
* <poad-fieldset legend="Options avancées" toggleable [(collapsed)]="c" (toggled)="…">…</poad-fieldset>
|
|
12104
|
-
* Remplace p-fieldset : légende posée sur la bordure, contenu repliable (
|
|
12130
|
+
* Remplace p-fieldset : légende posée sur la bordure, contenu repliable (motif « disclosure » : bouton dans la
|
|
12131
|
+
* légende, `aria-expanded` / `aria-controls` ; animation grid-rows, `inert` fermé). Classes et attributs décrits par
|
|
12132
|
+
* @poadio/ui-core (`fieldsetClasses`, `collapsible*`) ; style partagé : `@poadio/ui-core/fieldset.css`
|
|
12133
|
+
* (encapsulation désactivée).
|
|
12105
12134
|
* @atelier icone=square-dashed conteneur=flux largeur=6 hauteur=5
|
|
12106
12135
|
*/
|
|
12107
12136
|
class PoadFieldsetComponent {
|
|
@@ -12110,43 +12139,51 @@ class PoadFieldsetComponent {
|
|
|
12110
12139
|
collapsed = model(false, ...(ngDevMode ? [{ debugName: "collapsed" }] : /* istanbul ignore next */ []));
|
|
12111
12140
|
toggled = output();
|
|
12112
12141
|
legendTpl = contentChild(PoadFieldsetLegendDirective, ...(ngDevMode ? [{ debugName: "legendTpl" }] : /* istanbul ignore next */ []));
|
|
12113
|
-
id = poadId('poad-fieldset');
|
|
12114
|
-
|
|
12115
|
-
|
|
12142
|
+
id = fieldsetRegionId(poadId('poad-fieldset'));
|
|
12143
|
+
hostClass = computed(() => fieldsetClasses({ collapsed: this.collapsed(), toggleable: this.toggleable() }), ...(ngDevMode ? [{ debugName: "hostClass" }] : /* istanbul ignore next */ []));
|
|
12144
|
+
btn = computed(() => collapsibleButtonProps(this.id, this.collapsed()), ...(ngDevMode ? [{ debugName: "btn" }] : /* istanbul ignore next */ []));
|
|
12145
|
+
region = computed(() => collapsibleRegionProps(this.id, this.collapsed()), ...(ngDevMode ? [{ debugName: "region" }] : /* istanbul ignore next */ []));
|
|
12146
|
+
toggle() {
|
|
12147
|
+
const next = collapsibleToggle(this.collapsed(), this.toggleable());
|
|
12148
|
+
if (next === null)
|
|
12149
|
+
return;
|
|
12150
|
+
this.collapsed.set(next);
|
|
12151
|
+
this.toggled.emit(next);
|
|
12152
|
+
}
|
|
12116
12153
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: PoadFieldsetComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
12117
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.20", type: PoadFieldsetComponent, isStandalone: true, selector: "poad-fieldset", inputs: { legend: { classPropertyName: "legend", publicName: "legend", isSignal: true, isRequired: false, transformFunction: null }, toggleable: { classPropertyName: "toggleable", publicName: "toggleable", isSignal: true, isRequired: false, transformFunction: null }, collapsed: { classPropertyName: "collapsed", publicName: "collapsed", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { collapsed: "collapsedChange", toggled: "toggled" }, host: { properties: { "class
|
|
12118
|
-
<fieldset class="
|
|
12119
|
-
<legend class="
|
|
12154
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.20", type: PoadFieldsetComponent, isStandalone: true, selector: "poad-fieldset", inputs: { legend: { classPropertyName: "legend", publicName: "legend", isSignal: true, isRequired: false, transformFunction: null }, toggleable: { classPropertyName: "toggleable", publicName: "toggleable", isSignal: true, isRequired: false, transformFunction: null }, collapsed: { classPropertyName: "collapsed", publicName: "collapsed", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { collapsed: "collapsedChange", toggled: "toggled" }, host: { properties: { "class": "hostClass()" }, classAttribute: "poad-fieldset" }, queries: [{ propertyName: "legendTpl", first: true, predicate: PoadFieldsetLegendDirective, descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
12155
|
+
<fieldset class="poad-fieldset__box">
|
|
12156
|
+
<legend class="poad-fieldset__legend">
|
|
12120
12157
|
@if (toggleable()) {
|
|
12121
|
-
<button
|
|
12122
|
-
<poad-icon name="chevron-right" [size]="13" class="
|
|
12158
|
+
<button class="poad-fieldset__toggle" [attr.type]="btn().type" [attr.aria-expanded]="btn()['aria-expanded']" [attr.aria-controls]="btn()['aria-controls']" (click)="toggle()">
|
|
12159
|
+
<poad-icon name="chevron-right" [size]="13" class="poad-fieldset__chev"/>
|
|
12123
12160
|
@if (legendTpl()) {<ng-container *ngTemplateOutlet="legendTpl()!.tpl"/>} @else {{{ legend() }}}
|
|
12124
12161
|
</button>
|
|
12125
12162
|
} @else {
|
|
12126
|
-
<span class="
|
|
12163
|
+
<span class="poad-fieldset__text">@if (legendTpl()) {<ng-container *ngTemplateOutlet="legendTpl()!.tpl"/>} @else {{{ legend() }}}</span>
|
|
12127
12164
|
}
|
|
12128
12165
|
</legend>
|
|
12129
|
-
<div class="
|
|
12166
|
+
<div class="poad-fieldset__wrap" [id]="region().id" [attr.inert]="region().inert"><div class="poad-fieldset__body"><ng-content/></div></div>
|
|
12130
12167
|
</fieldset>
|
|
12131
|
-
`, isInline: true, styles: ["
|
|
12168
|
+
`, isInline: true, styles: [".poad-fieldset{display:block;font-family:var(--poad-font);font-size:var(--poad-font-size);color:var(--poad-fg)}.poad-fieldset .poad-fieldset__box{margin:0;padding:4px 16px 16px;border:1px solid var(--poad-border);border-radius:var(--poad-radius-lg);background:var(--poad-surface);min-width:0}.poad-fieldset.is-collapsed .poad-fieldset__box{padding-bottom:6px}.poad-fieldset .poad-fieldset__legend{padding:0 8px;margin-inline-start:-4px;font-weight:600;font-size:13px;color:var(--poad-fg)}.poad-fieldset .poad-fieldset__toggle{all:unset;display:inline-flex;align-items:center;gap:6px;cursor:pointer;border-radius:6px;padding:2px 6px}.poad-fieldset .poad-fieldset__toggle:hover{background:var(--poad-hover)}.poad-fieldset .poad-fieldset__toggle:focus-visible{outline:2px solid var(--poad-ring)}.poad-fieldset .poad-fieldset__chev{transition:transform var(--poad-dur) var(--poad-ease);color:var(--poad-fg-muted)}.poad-fieldset:not(.is-collapsed) .poad-fieldset__chev{transform:rotate(90deg)}.poad-fieldset .poad-fieldset__wrap{display:grid;grid-template-rows:1fr;transition:grid-template-rows .16s var(--poad-ease)}.poad-fieldset.is-collapsed .poad-fieldset__wrap{grid-template-rows:0fr}.poad-fieldset .poad-fieldset__body{min-height:0;overflow:hidden}@media(prefers-reduced-motion:reduce){.poad-fieldset .poad-fieldset__wrap,.poad-fieldset .poad-fieldset__chev{transition:none}}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { 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 });
|
|
12132
12169
|
}
|
|
12133
12170
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: PoadFieldsetComponent, decorators: [{
|
|
12134
12171
|
type: Component,
|
|
12135
|
-
args: [{ selector: 'poad-fieldset', standalone: true, imports: [NgTemplateOutlet, PoadIconComponent], changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'poad-fieldset', '[class
|
|
12136
|
-
<fieldset class="
|
|
12137
|
-
<legend class="
|
|
12172
|
+
args: [{ selector: 'poad-fieldset', standalone: true, imports: [NgTemplateOutlet, PoadIconComponent], changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'poad-fieldset', '[class]': 'hostClass()' }, template: `
|
|
12173
|
+
<fieldset class="poad-fieldset__box">
|
|
12174
|
+
<legend class="poad-fieldset__legend">
|
|
12138
12175
|
@if (toggleable()) {
|
|
12139
|
-
<button
|
|
12140
|
-
<poad-icon name="chevron-right" [size]="13" class="
|
|
12176
|
+
<button class="poad-fieldset__toggle" [attr.type]="btn().type" [attr.aria-expanded]="btn()['aria-expanded']" [attr.aria-controls]="btn()['aria-controls']" (click)="toggle()">
|
|
12177
|
+
<poad-icon name="chevron-right" [size]="13" class="poad-fieldset__chev"/>
|
|
12141
12178
|
@if (legendTpl()) {<ng-container *ngTemplateOutlet="legendTpl()!.tpl"/>} @else {{{ legend() }}}
|
|
12142
12179
|
</button>
|
|
12143
12180
|
} @else {
|
|
12144
|
-
<span class="
|
|
12181
|
+
<span class="poad-fieldset__text">@if (legendTpl()) {<ng-container *ngTemplateOutlet="legendTpl()!.tpl"/>} @else {{{ legend() }}}</span>
|
|
12145
12182
|
}
|
|
12146
12183
|
</legend>
|
|
12147
|
-
<div class="
|
|
12184
|
+
<div class="poad-fieldset__wrap" [id]="region().id" [attr.inert]="region().inert"><div class="poad-fieldset__body"><ng-content/></div></div>
|
|
12148
12185
|
</fieldset>
|
|
12149
|
-
`, styles: ["
|
|
12186
|
+
`, encapsulation: ViewEncapsulation.None, styles: [".poad-fieldset{display:block;font-family:var(--poad-font);font-size:var(--poad-font-size);color:var(--poad-fg)}.poad-fieldset .poad-fieldset__box{margin:0;padding:4px 16px 16px;border:1px solid var(--poad-border);border-radius:var(--poad-radius-lg);background:var(--poad-surface);min-width:0}.poad-fieldset.is-collapsed .poad-fieldset__box{padding-bottom:6px}.poad-fieldset .poad-fieldset__legend{padding:0 8px;margin-inline-start:-4px;font-weight:600;font-size:13px;color:var(--poad-fg)}.poad-fieldset .poad-fieldset__toggle{all:unset;display:inline-flex;align-items:center;gap:6px;cursor:pointer;border-radius:6px;padding:2px 6px}.poad-fieldset .poad-fieldset__toggle:hover{background:var(--poad-hover)}.poad-fieldset .poad-fieldset__toggle:focus-visible{outline:2px solid var(--poad-ring)}.poad-fieldset .poad-fieldset__chev{transition:transform var(--poad-dur) var(--poad-ease);color:var(--poad-fg-muted)}.poad-fieldset:not(.is-collapsed) .poad-fieldset__chev{transform:rotate(90deg)}.poad-fieldset .poad-fieldset__wrap{display:grid;grid-template-rows:1fr;transition:grid-template-rows .16s var(--poad-ease)}.poad-fieldset.is-collapsed .poad-fieldset__wrap{grid-template-rows:0fr}.poad-fieldset .poad-fieldset__body{min-height:0;overflow:hidden}@media(prefers-reduced-motion:reduce){.poad-fieldset .poad-fieldset__wrap,.poad-fieldset .poad-fieldset__chev{transition:none}}\n"] }]
|
|
12150
12187
|
}], propDecorators: { legend: [{ type: i0.Input, args: [{ isSignal: true, alias: "legend", required: false }] }], toggleable: [{ type: i0.Input, args: [{ isSignal: true, alias: "toggleable", required: false }] }], collapsed: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsed", required: false }] }, { type: i0.Output, args: ["collapsedChange"] }], toggled: [{ type: i0.Output, args: ["toggled"] }], legendTpl: [{ type: i0.ContentChild, args: [i0.forwardRef(() => PoadFieldsetLegendDirective), { isSignal: true }] }] } });
|
|
12151
12188
|
|
|
12152
12189
|
/** `<ng-template poadPanelHeader>` — en-tête personnalisé (existe aussi côté accordéon : sélecteur distinct ici). */
|
|
@@ -12165,7 +12202,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImpo
|
|
|
12165
12202
|
* … contenu …
|
|
12166
12203
|
* <div poadPanelFooter>…</div>
|
|
12167
12204
|
* </poad-panel>
|
|
12168
|
-
* Remplace p-panel : en-tête 42 px fond `--poad-bg-subtle`, repli
|
|
12205
|
+
* Remplace p-panel : en-tête 42 px fond `--poad-bg-subtle`, repli animé (motif « disclosure » : bouton `aria-expanded`
|
|
12206
|
+
* / `aria-controls`, nommé par le titre ; zone `inert` repliée). Classes et attributs décrits par @poadio/ui-core
|
|
12207
|
+
* (`panelClasses`, `collapsible*`) ; style partagé : `@poadio/ui-core/panel.css` (encapsulation désactivée).
|
|
12169
12208
|
* @atelier icone=panel-top conteneur=flux largeur=6 hauteur=6 rang=1
|
|
12170
12209
|
*/
|
|
12171
12210
|
class PoadPanelComponent {
|
|
@@ -12178,43 +12217,53 @@ class PoadPanelComponent {
|
|
|
12178
12217
|
headingTpl = contentChild(PoadPanelHeadingDirective, ...(ngDevMode ? [{ debugName: "headingTpl" }] : /* istanbul ignore next */ []));
|
|
12179
12218
|
/**
|
|
12180
12219
|
* Un en-tête qui n'a RIEN à montrer ne se dessine pas (SZU 24/08 : un panel nu posé
|
|
12181
|
-
* dans l'atelier arborait une barre vide de 42 px). Masqué en CSS et non par un @if :
|
|
12220
|
+
* dans l'atelier arborait une barre vide de 42 px). Masqué en CSS (`is-headless`) et non par un @if :
|
|
12182
12221
|
* un `@if` autour d'un `<ng-content>` ferait retomber la projection dans le corps —
|
|
12183
12222
|
* piège payé le 22/08. Limite assumée : des actions `[poadPanelActions]` SANS titre ni
|
|
12184
12223
|
* repli restent masquées avec l'en-tête — donner alors un `header`.
|
|
12185
12224
|
*/
|
|
12186
|
-
|
|
12187
|
-
|
|
12188
|
-
|
|
12189
|
-
|
|
12225
|
+
hostClass = computed(() => panelClasses({
|
|
12226
|
+
collapsed: this.collapsed(), flat: this.flat(), variant: this.variant(),
|
|
12227
|
+
headless: panelHeadless({ header: this.header(), toggleable: this.toggleable(), customHeader: !!this.headingTpl() }),
|
|
12228
|
+
}), ...(ngDevMode ? [{ debugName: "hostClass" }] : /* istanbul ignore next */ []));
|
|
12229
|
+
ids = panelIds(poadId('poad-panel'));
|
|
12230
|
+
btn = computed(() => collapsibleButtonProps(this.ids.region, this.collapsed()), ...(ngDevMode ? [{ debugName: "btn" }] : /* istanbul ignore next */ []));
|
|
12231
|
+
region = computed(() => collapsibleRegionProps(this.ids.region, this.collapsed()), ...(ngDevMode ? [{ debugName: "region" }] : /* istanbul ignore next */ []));
|
|
12232
|
+
toggle() {
|
|
12233
|
+
const next = collapsibleToggle(this.collapsed(), this.toggleable());
|
|
12234
|
+
if (next === null)
|
|
12235
|
+
return;
|
|
12236
|
+
this.collapsed.set(next);
|
|
12237
|
+
this.toggled.emit(next);
|
|
12238
|
+
}
|
|
12190
12239
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: PoadPanelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
12191
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.20", type: PoadPanelComponent, isStandalone: true, selector: "poad-panel", inputs: { header: { classPropertyName: "header", publicName: "header", isSignal: true, isRequired: false, transformFunction: null }, toggleable: { classPropertyName: "toggleable", publicName: "toggleable", isSignal: true, isRequired: false, transformFunction: null }, collapsed: { classPropertyName: "collapsed", publicName: "collapsed", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, flat: { classPropertyName: "flat", publicName: "flat", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { collapsed: "collapsedChange", toggled: "toggled" }, host: { properties: { "class
|
|
12192
|
-
<div class="
|
|
12240
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.20", type: PoadPanelComponent, isStandalone: true, selector: "poad-panel", inputs: { header: { classPropertyName: "header", publicName: "header", isSignal: true, isRequired: false, transformFunction: null }, toggleable: { classPropertyName: "toggleable", publicName: "toggleable", isSignal: true, isRequired: false, transformFunction: null }, collapsed: { classPropertyName: "collapsed", publicName: "collapsed", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, flat: { classPropertyName: "flat", publicName: "flat", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { collapsed: "collapsedChange", toggled: "toggled" }, host: { properties: { "class": "hostClass()" }, classAttribute: "poad-panel" }, queries: [{ propertyName: "headingTpl", first: true, predicate: PoadPanelHeadingDirective, descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
12241
|
+
<div class="poad-panel__head">
|
|
12193
12242
|
@if (toggleable()) {
|
|
12194
|
-
<button
|
|
12243
|
+
<button class="poad-panel__toggle" [attr.type]="btn().type" [attr.aria-expanded]="btn()['aria-expanded']" [attr.aria-controls]="btn()['aria-controls']" [attr.aria-labelledby]="ids.title" (click)="toggle()"><poad-icon name="chevron-right" [size]="14" class="poad-panel__chev"/></button>
|
|
12195
12244
|
}
|
|
12196
|
-
<div class="
|
|
12197
|
-
<div class="
|
|
12245
|
+
<div class="poad-panel__title" [id]="ids.title">@if (headingTpl()) {<ng-container *ngTemplateOutlet="headingTpl()!.tpl"/>} @else {{{ header() }}}</div>
|
|
12246
|
+
<div class="poad-panel__actions"><ng-content select="[poadPanelActions]"/></div>
|
|
12198
12247
|
</div>
|
|
12199
|
-
<div class="
|
|
12200
|
-
<div class="
|
|
12248
|
+
<div class="poad-panel__wrap" [id]="region().id" [attr.inert]="region().inert">
|
|
12249
|
+
<div class="poad-panel__body"><div class="poad-panel__content"><ng-content/></div><div class="poad-panel__foot"><ng-content select="[poadPanelFooter]"/></div></div>
|
|
12201
12250
|
</div>
|
|
12202
|
-
`, isInline: true, styles: ["
|
|
12251
|
+
`, isInline: true, styles: [".poad-panel{display:block;border:1px solid var(--poad-border);border-radius:var(--poad-radius-lg);background:var(--poad-surface);box-shadow:var(--poad-shadow-sm);overflow:hidden;font-family:var(--poad-font);font-size:var(--poad-font-size);color:var(--poad-fg)}.poad-panel.is-flat{box-shadow:none}.poad-panel.var-outline .poad-panel__head{background:transparent}.poad-panel .poad-panel__head{display:flex;align-items:center;gap:8px;min-height:42px;padding-block:0;padding-inline:12px 8px;background:var(--poad-bg-subtle);border-bottom:1px solid var(--poad-border)}.poad-panel.is-headless .poad-panel__head{display:none}.poad-panel.is-collapsed .poad-panel__head{border-bottom-color:transparent}.poad-panel .poad-panel__toggle{all:unset;display:grid;place-items:center;width:24px;height:24px;border-radius:6px;cursor:pointer;color:var(--poad-fg-muted);margin-inline-start:-4px}.poad-panel .poad-panel__toggle:hover{background:var(--poad-elevated);color:var(--poad-fg)}.poad-panel .poad-panel__toggle:focus-visible{outline:2px solid var(--poad-ring)}.poad-panel .poad-panel__chev{transition:transform var(--poad-dur) var(--poad-ease)}.poad-panel:not(.is-collapsed) .poad-panel__chev{transform:rotate(90deg)}.poad-panel .poad-panel__title{flex:1;min-width:0;font-weight:600;font-size:13.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.poad-panel .poad-panel__actions{display:inline-flex;align-items:center;gap:2px}.poad-panel .poad-panel__wrap{display:grid;grid-template-rows:1fr;transition:grid-template-rows .16s var(--poad-ease)}.poad-panel.is-collapsed .poad-panel__wrap{grid-template-rows:0fr}.poad-panel .poad-panel__body{min-height:0;overflow:hidden}.poad-panel .poad-panel__content{padding:14px 16px}.poad-panel .poad-panel__foot:not(:empty){padding:10px 16px;border-top:1px solid var(--poad-border);background:var(--poad-bg-subtle)}@media(prefers-reduced-motion:reduce){.poad-panel .poad-panel__wrap,.poad-panel .poad-panel__chev{transition:none}}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { 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 });
|
|
12203
12252
|
}
|
|
12204
12253
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.20", ngImport: i0, type: PoadPanelComponent, decorators: [{
|
|
12205
12254
|
type: Component,
|
|
12206
|
-
args: [{ selector: 'poad-panel', standalone: true, imports: [NgTemplateOutlet, PoadIconComponent], changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'poad-panel', '[class
|
|
12207
|
-
<div class="
|
|
12255
|
+
args: [{ selector: 'poad-panel', standalone: true, imports: [NgTemplateOutlet, PoadIconComponent], changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'poad-panel', '[class]': 'hostClass()' }, template: `
|
|
12256
|
+
<div class="poad-panel__head">
|
|
12208
12257
|
@if (toggleable()) {
|
|
12209
|
-
<button
|
|
12258
|
+
<button class="poad-panel__toggle" [attr.type]="btn().type" [attr.aria-expanded]="btn()['aria-expanded']" [attr.aria-controls]="btn()['aria-controls']" [attr.aria-labelledby]="ids.title" (click)="toggle()"><poad-icon name="chevron-right" [size]="14" class="poad-panel__chev"/></button>
|
|
12210
12259
|
}
|
|
12211
|
-
<div class="
|
|
12212
|
-
<div class="
|
|
12260
|
+
<div class="poad-panel__title" [id]="ids.title">@if (headingTpl()) {<ng-container *ngTemplateOutlet="headingTpl()!.tpl"/>} @else {{{ header() }}}</div>
|
|
12261
|
+
<div class="poad-panel__actions"><ng-content select="[poadPanelActions]"/></div>
|
|
12213
12262
|
</div>
|
|
12214
|
-
<div class="
|
|
12215
|
-
<div class="
|
|
12263
|
+
<div class="poad-panel__wrap" [id]="region().id" [attr.inert]="region().inert">
|
|
12264
|
+
<div class="poad-panel__body"><div class="poad-panel__content"><ng-content/></div><div class="poad-panel__foot"><ng-content select="[poadPanelFooter]"/></div></div>
|
|
12216
12265
|
</div>
|
|
12217
|
-
`, styles: ["
|
|
12266
|
+
`, encapsulation: ViewEncapsulation.None, styles: [".poad-panel{display:block;border:1px solid var(--poad-border);border-radius:var(--poad-radius-lg);background:var(--poad-surface);box-shadow:var(--poad-shadow-sm);overflow:hidden;font-family:var(--poad-font);font-size:var(--poad-font-size);color:var(--poad-fg)}.poad-panel.is-flat{box-shadow:none}.poad-panel.var-outline .poad-panel__head{background:transparent}.poad-panel .poad-panel__head{display:flex;align-items:center;gap:8px;min-height:42px;padding-block:0;padding-inline:12px 8px;background:var(--poad-bg-subtle);border-bottom:1px solid var(--poad-border)}.poad-panel.is-headless .poad-panel__head{display:none}.poad-panel.is-collapsed .poad-panel__head{border-bottom-color:transparent}.poad-panel .poad-panel__toggle{all:unset;display:grid;place-items:center;width:24px;height:24px;border-radius:6px;cursor:pointer;color:var(--poad-fg-muted);margin-inline-start:-4px}.poad-panel .poad-panel__toggle:hover{background:var(--poad-elevated);color:var(--poad-fg)}.poad-panel .poad-panel__toggle:focus-visible{outline:2px solid var(--poad-ring)}.poad-panel .poad-panel__chev{transition:transform var(--poad-dur) var(--poad-ease)}.poad-panel:not(.is-collapsed) .poad-panel__chev{transform:rotate(90deg)}.poad-panel .poad-panel__title{flex:1;min-width:0;font-weight:600;font-size:13.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.poad-panel .poad-panel__actions{display:inline-flex;align-items:center;gap:2px}.poad-panel .poad-panel__wrap{display:grid;grid-template-rows:1fr;transition:grid-template-rows .16s var(--poad-ease)}.poad-panel.is-collapsed .poad-panel__wrap{grid-template-rows:0fr}.poad-panel .poad-panel__body{min-height:0;overflow:hidden}.poad-panel .poad-panel__content{padding:14px 16px}.poad-panel .poad-panel__foot:not(:empty){padding:10px 16px;border-top:1px solid var(--poad-border);background:var(--poad-bg-subtle)}@media(prefers-reduced-motion:reduce){.poad-panel .poad-panel__wrap,.poad-panel .poad-panel__chev{transition:none}}\n"] }]
|
|
12218
12267
|
}], propDecorators: { header: [{ type: i0.Input, args: [{ isSignal: true, alias: "header", required: false }] }], toggleable: [{ type: i0.Input, args: [{ isSignal: true, alias: "toggleable", required: false }] }], collapsed: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsed", required: false }] }, { type: i0.Output, args: ["collapsedChange"] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], flat: [{ type: i0.Input, args: [{ isSignal: true, alias: "flat", required: false }] }], toggled: [{ type: i0.Output, args: ["toggled"] }], headingTpl: [{ type: i0.ContentChild, args: [i0.forwardRef(() => PoadPanelHeadingDirective), { isSignal: true }] }] } });
|
|
12219
12268
|
|
|
12220
12269
|
/**
|