@fundamental-ngx/core 0.64.2-rc.1 → 0.64.2-rc.3

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 +1 @@
1
- {"version":3,"file":"fundamental-ngx-core-button.mjs","sources":["../../../../libs/core/button/base-button.ts","../../../../libs/core/button/tokens.ts","../../../../libs/core/button/button-badge.directive.ts","../../../../libs/core/button/button.component.ts","../../../../libs/core/button/button.component.html","../../../../libs/core/button/button.module.ts","../../../../libs/core/button/fundamental-ngx-core-button.ts"],"sourcesContent":["import { BooleanInput } from '@angular/cdk/coercion';\nimport { Directive, ElementRef, booleanAttribute, inject, input, linkedSignal } from '@angular/core';\n\nimport { HasElementRef } from '@fundamental-ngx/cdk/utils';\nimport { FD_DEFAULT_ICON_FONT_FAMILY, IconFont } from '@fundamental-ngx/core/icon';\nimport { ButtonModel } from './button.model';\n\nexport type GlyphPosition = 'before' | 'after';\n\nexport type ButtonType =\n | ''\n | 'standard'\n | 'positive'\n | 'negative'\n | 'attention'\n | 'half'\n | 'ghost'\n | 'transparent'\n | 'emphasized'\n | 'menu';\n\nexport const defaultButtonType = 'standard' as ButtonType;\n\n@Directive({\n host: {\n '[class.fd-button--toggled]': 'toggledState()',\n '[attr.aria-pressed]': 'toggledState() || null',\n '[attr.aria-selected]': 'selectedState() || null'\n }\n})\nexport class BaseButton implements HasElementRef, ButtonModel {\n /**\n * Whether the button is in a toggled state.\n * Used for toggle buttons that maintain an on/off state.\n * When true, adds the toggled class and sets aria-pressed=\"true\".\n */\n readonly toggled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * Whether the button is selected.\n * Used in button groups or toolbars to indicate the currently selected option.\n * When true, sets aria-selected=\"true\".\n */\n readonly selected = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * Native type attribute of the button element.\n * Defaults to 'button' to prevent form submission.\n * Set to 'submit' for form submission buttons or 'reset' for form reset buttons.\n */\n readonly type = input<string | null | undefined>('button');\n\n /**\n * Position of the icon relative to the button text.\n * - 'before': Icon appears before the text (default)\n * - 'after': Icon appears after the text\n */\n readonly glyphPosition = input<GlyphPosition>('before');\n\n /**\n * The icon to display in the button.\n * See the icon documentation for the list of available icons.\n * Example values: 'add', 'edit', 'delete', 'accept', 'decline'\n */\n readonly glyph = input<string | null | undefined>();\n\n /**\n * Font family for the icon.\n * Defaults to the SAP icon font.\n * Override when using custom icon fonts.\n */\n readonly glyphFont = input<IconFont>(FD_DEFAULT_ICON_FONT_FAMILY);\n\n /**\n * Visual style of the button.\n * Available types:\n * - 'standard': Default button style (blue)\n * - 'emphasized': High emphasis action (darker blue)\n * - 'positive': Successful/positive action (green)\n * - 'negative': Destructive/negative action (red)\n * - 'attention': Warning action (orange)\n * - 'transparent': No background, minimal style\n * - 'ghost': Subtle button with border on hover\n * - 'half': Split button style\n * - 'menu': Menu trigger button\n */\n readonly fdType = input<ButtonType>(defaultButtonType);\n\n /**\n * Text label displayed inside the button.\n * Can be used alone or combined with an icon.\n */\n readonly label = input<string | undefined>();\n\n /**\n * Whether to apply menu mode styling to the button.\n * When true, adds a dropdown arrow icon and menu-specific styling.\n */\n readonly fdMenu = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * Whether the button is disabled.\n * When true, the button cannot be interacted with and displays a disabled state.\n * This sets the native 'disabled' attribute on button elements.\n */\n readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * ARIA disabled attribute for accessibility.\n * Use this when you want to indicate a disabled state to screen readers\n * without preventing interaction (e.g., for showing tooltips on disabled buttons).\n * Unlike the 'disabled' attribute, this does not prevent click events.\n */\n readonly ariaDisabled = input<boolean, BooleanInput>(false, {\n alias: 'aria-disabled',\n transform: booleanAttribute\n });\n\n /**\n * ARIA label for the button.\n * Provides an accessible name for screen readers.\n * If not provided, special button types will auto-generate from label or glyph.\n */\n readonly ariaLabel = input<string | null | undefined>();\n\n /**\n * ARIA description for the button.\n * Provides additional context for screen readers beyond the label.\n * Special button types (emphasized, positive, negative, attention) will\n * auto-generate a description from their type if not provided.\n */\n readonly ariaDescription = input<string | null | undefined>();\n\n /** @hidden */\n readonly elementRef = inject(ElementRef);\n\n /**\n * Internal toggled state that can be mutated programmatically.\n * Syncs with the toggled input but allows internal modification.\n * @hidden\n */\n protected readonly toggledState = linkedSignal(() => this.toggled());\n\n /**\n * Internal selected state that can be mutated programmatically.\n * Syncs with the selected input but allows internal modification.\n * @hidden\n */\n protected readonly selectedState = linkedSignal(() => this.selected());\n\n /**\n * Internal button type state that can be mutated programmatically.\n * Syncs with the fdType input but allows internal modification.\n * @hidden\n */\n protected readonly fdTypeState = linkedSignal(() => this.fdType());\n\n /**\n * Internal disabled state that can be mutated programmatically.\n * Syncs with the disabled input but allows internal modification.\n * @hidden\n */\n protected readonly _disabledState = linkedSignal(() => this.disabled());\n\n /**\n * No-op for ButtonModel interface compatibility.\n * Signals automatically notify Angular when they change.\n * @deprecated Signals eliminate the need for manual change detection.\n */\n markForCheck(): void {\n // No-op: Signals automatically trigger change detection\n }\n\n /**\n * Programmatically set the disabled state.\n * This allows parent components or directives to update the button's disabled state.\n *\n * @param value - Whether the button should be disabled\n *\n * @example\n * ```typescript\n * // In a form component that needs to disable all buttons\n * this.submitButton.setDisabled(this.form.invalid);\n * ```\n */\n setDisabled(value: boolean): void {\n this._disabledState.set(value);\n }\n\n /**\n * Get the current disabled state.\n * Returns the internal disabled state which may have been modified programmatically.\n *\n * @returns True if the button is currently disabled\n *\n * @example\n * ```typescript\n * if (!this.button.isDisabled()) {\n * this.button.setDisabled(true);\n * }\n * ```\n */\n isDisabled(): boolean {\n return this._disabledState();\n }\n\n /**\n * Programmatically set the button type.\n * This allows directives to override the button's visual style.\n *\n * @param value - The button type to apply\n *\n * @example\n * ```typescript\n * // A directive that changes button style based on validation state\n * if (this.validationFailed) {\n * this.button.setFdType('negative');\n * }\n * ```\n */\n setFdType(value: ButtonType): void {\n this.fdTypeState.set(value);\n }\n\n /**\n * Get the current button type.\n * Returns the internal button type which may have been modified programmatically.\n *\n * @returns The current button type\n */\n getFdType(): ButtonType {\n return this.fdTypeState();\n }\n\n /**\n * Programmatically set the selected state.\n * This allows parent components to update the button's selected state.\n * Used in button groups or toolbars to indicate active selection.\n *\n * @param value - Whether the button should be selected\n *\n * @example\n * ```typescript\n * // In a button group component managing selection\n * this.buttons.forEach(btn => btn.setSelected(false));\n * this.activeButton.setSelected(true);\n * ```\n */\n setSelected(value: boolean): void {\n this.selectedState.set(value);\n }\n\n /**\n * Get the current selected state.\n * Returns the internal selected state which may have been modified programmatically.\n *\n * @returns True if the button is currently selected\n */\n isSelected(): boolean {\n return this.selectedState();\n }\n\n /**\n * Programmatically set the toggled state.\n * This allows parent components to update the button's toggled state.\n * Used for toggle buttons that maintain an on/off state.\n *\n * @param value - Whether the button should be toggled on\n *\n * @example\n * ```typescript\n * // In a toolbar with toggle buttons\n * handleBoldClick(): void {\n * const isActive = !this.boldButton.isToggled();\n * this.boldButton.setToggled(isActive);\n * }\n * ```\n */\n setToggled(value: boolean): void {\n this.toggledState.set(value);\n }\n\n /**\n * Get the current toggled state.\n * Returns the internal toggled state which may have been modified programmatically.\n *\n * @returns True if the button is currently toggled\n */\n isToggled(): boolean {\n return this.toggledState();\n }\n}\n","import { InjectionToken } from '@angular/core';\nimport { BaseButton } from './base-button';\n\nexport const FD_BUTTON_COMPONENT = new InjectionToken<BaseButton>('FdButtonComponent');\n","import { Directive, ElementRef, effect, inject, input, isDevMode } from '@angular/core';\nimport { HasElementRef } from '@fundamental-ngx/cdk/utils';\nimport { BaseButton, ButtonType } from './base-button';\nimport { FD_BUTTON_COMPONENT } from './tokens';\n\nexport const badgeEnabledButtonTypes: ButtonType[] = ['emphasized', 'standard', 'ghost', 'transparent'];\n\n/**\n * Directive to display a badge on a button.\n *\n * Badges are small status indicators that can be added to buttons to show\n * notifications, counts, or other supplementary information.\n *\n * Usage:\n * ```html\n * <button fd-button>\n * Button Text\n * <fd-button-badge [content]=\"5\" />\n * </button>\n * ```\n *\n * @note Badge content should not exceed 4 characters for optimal display.\n * @note Badges are only supported on emphasized, standard, ghost, and transparent button types.\n */\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: 'fd-button-badge',\n host: {\n class: 'fd-button__badge'\n }\n})\nexport class ButtonBadgeDirective implements HasElementRef {\n /**\n * Content to display inside the badge.\n * Should not exceed 4 characters for optimal display.\n * Supports both string and numeric values.\n */\n readonly content = input<string | number>();\n\n /** @hidden */\n readonly elementRef: ElementRef<HTMLElement> = inject(ElementRef);\n\n /** @hidden */\n protected readonly buttonComponent = inject<BaseButton>(FD_BUTTON_COMPONENT, { host: true });\n\n /** @hidden */\n constructor() {\n // Single-purpose effect: Sync badge content to DOM\n effect(() => {\n this.elementRef.nativeElement.textContent = String(this.content() ?? '');\n });\n\n // Validation effect only in development mode (zero overhead in production)\n if (isDevMode()) {\n effect(() => {\n this._validateBadge();\n });\n }\n }\n\n /**\n * Validates badge configuration in development mode.\n * Checks content length and button type compatibility.\n * @hidden\n */\n private _validateBadge(): void {\n const contentValue = this.content();\n if (contentValue && contentValue.toString().length > 4) {\n console.warn('Badge content should not be longer than 4 characters');\n }\n\n if (!badgeEnabledButtonTypes.includes(this.buttonComponent.getFdType())) {\n console.warn(\n `Currently the ${JSON.stringify(\n badgeEnabledButtonTypes\n )} type of buttons are required for Badge enablement`\n );\n }\n }\n}\n","import {\n afterNextRender,\n ChangeDetectionStrategy,\n Component,\n computed,\n ElementRef,\n inject,\n input,\n signal,\n ViewEncapsulation\n} from '@angular/core';\nimport { HasElementRef } from '@fundamental-ngx/cdk/utils';\nimport { ContentDensityObserver, contentDensityObserverProviders } from '@fundamental-ngx/core/content-density';\nimport { BaseButton } from './base-button';\n\nimport { IconComponent } from '@fundamental-ngx/core/icon';\nimport { FD_BUTTON_COMPONENT } from './tokens';\n\nlet buttonId = 0;\n\nconst SPECIAL_BUTTON_TYPES = new Set(['emphasized', 'positive', 'negative', 'attention']);\n\n/**\n * Button directive, used to enhance standard HTML buttons.\n *\n * ``` selector: button[fd-button], a[fd-button] ```\n *\n * ```html\n * <button fd-button label=\"Button Text\"></button>\n * <a fd-button label=\"Button Text\"></a>\n * ```\n */\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'button[fd-button], a[fd-button], span[fd-button]',\n exportAs: 'fd-button',\n templateUrl: './button.component.html',\n styleUrl: './button.component.scss',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[attr.type]': 'type()',\n '[attr.disabled]': '_disabledState() || null',\n '[attr.aria-disabled]': 'ariaDisabled() || null',\n '[attr.aria-label]': 'buttonArialabel()',\n '[attr.aria-description]': 'buttonAriaDescription()',\n '[attr.id]': 'id()',\n '[class]': 'cssClass()',\n '(click)': 'clicked($event)'\n },\n providers: [\n contentDensityObserverProviders(),\n {\n provide: FD_BUTTON_COMPONENT,\n useExisting: ButtonComponent\n }\n ],\n imports: [IconComponent]\n})\nexport class ButtonComponent extends BaseButton implements HasElementRef {\n /** Button ID - default value is provided if not set */\n readonly id = input(`fd-button-${++buttonId}`);\n\n /** @hidden */\n readonly elementRef = inject(ElementRef);\n\n /** @hidden */\n protected readonly contentDensityObserver = inject(ContentDensityObserver);\n\n /**\n * Calculate aria-label attribute\n * @hidden\n */\n protected readonly buttonArialabel = computed(() => {\n if (this.ariaLabel()) {\n return this.ariaLabel(); // return the input aria-label\n }\n\n const nativeLabel = this._nativeAriaLabel();\n\n if (nativeLabel) {\n return nativeLabel; // return the native attribute aria-label\n }\n\n if (SPECIAL_BUTTON_TYPES.has(this.fdTypeState())) {\n return this.label() ?? this._glyphLabel() ?? null;\n }\n\n return null;\n });\n\n /**\n * Calculate aria-description attribute\n * @hidden\n */\n protected readonly buttonAriaDescription = computed(() => {\n if (this.ariaDescription()) {\n return this.ariaDescription();\n }\n\n if (SPECIAL_BUTTON_TYPES.has(this.fdTypeState())) {\n return this.fdTypeState();\n }\n\n return null;\n });\n\n /**\n * Computed CSS classes for the button.\n * Built as a string to avoid array allocation overhead.\n * @hidden\n */\n protected readonly cssClass = computed(() => {\n let classes = 'fd-button';\n\n const type = this.fdTypeState();\n if (type) {\n classes += ` fd-button--${type}`;\n }\n\n if (this.fdMenu()) {\n classes += ' fd-button--menu';\n }\n\n if (this._disabledState() || this.ariaDisabled()) {\n classes += ' is-disabled';\n }\n\n if (this.toggledState()) {\n classes += ' fd-button--toggled';\n }\n\n return classes;\n });\n\n /**\n * Memoized glyph label for aria-label fallback.\n * Transforms glyph name (e.g., \"slim-arrow-down\") to readable text (e.g., \"slim arrow down\").\n * @hidden\n */\n private readonly _glyphLabel = computed(() => {\n const glyph = this.glyph();\n return glyph ? glyph.replace(/-/g, ' ') : null;\n });\n\n /**\n * Native aria-label attribute read from the DOM element.\n * Captured once after render for use in aria-label computation.\n * @hidden\n */\n private readonly _nativeAriaLabel = signal<string | null>(null);\n\n /** @hidden */\n constructor() {\n super();\n\n // Read native aria-label attribute once after render\n afterNextRender(() => {\n const nativeLabel = this.elementRef.nativeElement.getAttribute('aria-label');\n if (nativeLabel) {\n this._nativeAriaLabel.set(nativeLabel);\n }\n });\n }\n\n /** Forces the focus outline around the button, which is not default behavior in Safari. */\n protected clicked(event: Event): void {\n const target = event?.target as HTMLElement;\n // Target can be empty during unit tests execution.\n if (target && document.activeElement !== target) {\n target.focus();\n }\n }\n}\n","@if (glyph() && glyphPosition() === 'before') {\n <fd-icon [glyph]=\"glyph()\" [font]=\"glyphFont()\"></fd-icon>\n}\n@if (label()) {\n <span class=\"fd-button__text\">\n {{ label() }}\n </span>\n}\n<ng-content></ng-content>\n<ng-content select=\"fd-button-badge\"></ng-content>\n@if (glyph() && glyphPosition() === 'after') {\n <fd-icon [glyph]=\"glyph()\" [font]=\"glyphFont()\"></fd-icon>\n}\n@if (fdMenu()) {\n <fd-icon glyph=\"slim-arrow-down\"></fd-icon>\n}\n","import { NgModule } from '@angular/core';\n\nimport { ButtonComponent } from './button.component';\n\n/**\n * @deprecated\n * Use `ButtonComponent` import instead\n */\n@NgModule({\n imports: [ButtonComponent],\n exports: [ButtonComponent]\n})\nexport class ButtonModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAqBO,MAAM,iBAAiB,GAAG;MASpB,UAAU,CAAA;AAPvB,IAAA,WAAA,GAAA;AAQI;;;;AAIG;QACM,IAAA,CAAA,OAAO,GAAG,KAAK,CAAwB,KAAK,+EAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAEvF;;;;AAIG;QACM,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAwB,KAAK,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAExF;;;;AAIG;QACM,IAAA,CAAA,IAAI,GAAG,KAAK,CAA4B,QAAQ;iFAAC;AAE1D;;;;AAIG;QACM,IAAA,CAAA,aAAa,GAAG,KAAK,CAAgB,QAAQ;0FAAC;AAEvD;;;;AAIG;AACM,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK;6FAA6B;AAEnD;;;;AAIG;QACM,IAAA,CAAA,SAAS,GAAG,KAAK,CAAW,2BAA2B;sFAAC;AAEjE;;;;;;;;;;;;AAYG;QACM,IAAA,CAAA,MAAM,GAAG,KAAK,CAAa,iBAAiB;mFAAC;AAEtD;;;AAGG;AACM,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK;6FAAsB;AAE5C;;;AAGG;QACM,IAAA,CAAA,MAAM,GAAG,KAAK,CAAwB,KAAK,8EAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAEtF;;;;AAIG;QACM,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAwB,KAAK,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAExF;;;;;AAKG;AACM,QAAA,IAAA,CAAA,YAAY,GAAG,KAAK,CAAwB,KAAK,EAAA,EAAA,IAAA,SAAA,GAAA,EAAA,SAAA,EAAA,cAAA,EA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+ {"version":3,"file":"fundamental-ngx-core-button.mjs","sources":["../../../../libs/core/button/base-button.ts","../../../../libs/core/button/tokens.ts","../../../../libs/core/button/button-badge.directive.ts","../../../../libs/core/button/button.component.ts","../../../../libs/core/button/button.component.html","../../../../libs/core/button/button.module.ts","../../../../libs/core/button/fundamental-ngx-core-button.ts"],"sourcesContent":["import { BooleanInput } from '@angular/cdk/coercion';\nimport { Directive, ElementRef, booleanAttribute, inject, input, linkedSignal } from '@angular/core';\n\nimport { HasElementRef } from '@fundamental-ngx/cdk/utils';\nimport { FD_DEFAULT_ICON_FONT_FAMILY, IconFont } from '@fundamental-ngx/core/icon';\nimport { ButtonModel } from './button.model';\n\nexport type GlyphPosition = 'before' | 'after';\n\nexport type ButtonType =\n | ''\n | 'standard'\n | 'positive'\n | 'negative'\n | 'attention'\n | 'half'\n | 'ghost'\n | 'transparent'\n | 'emphasized'\n | 'menu';\n\nexport const defaultButtonType = 'standard' as ButtonType;\n\n@Directive({\n host: {\n '[class.fd-button--toggled]': 'toggledState()',\n '[attr.aria-pressed]': 'toggledState() || null',\n '[attr.aria-selected]': 'selectedState() || null'\n }\n})\nexport class BaseButton implements HasElementRef, ButtonModel {\n /**\n * Whether the button is in a toggled state.\n * Used for toggle buttons that maintain an on/off state.\n * When true, adds the toggled class and sets aria-pressed=\"true\".\n */\n readonly toggled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * Whether the button is selected.\n * Used in button groups or toolbars to indicate the currently selected option.\n * When true, sets aria-selected=\"true\".\n */\n readonly selected = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * Native type attribute of the button element.\n * Defaults to 'button' to prevent form submission.\n * Set to 'submit' for form submission buttons or 'reset' for form reset buttons.\n */\n readonly type = input<string | null | undefined>('button');\n\n /**\n * Position of the icon relative to the button text.\n * - 'before': Icon appears before the text (default)\n * - 'after': Icon appears after the text\n */\n readonly glyphPosition = input<GlyphPosition>('before');\n\n /**\n * The icon to display in the button.\n * See the icon documentation for the list of available icons.\n * Example values: 'add', 'edit', 'delete', 'accept', 'decline'\n */\n readonly glyph = input<string | null | undefined>();\n\n /**\n * Font family for the icon.\n * Defaults to the SAP icon font.\n * Override when using custom icon fonts.\n */\n readonly glyphFont = input<IconFont>(FD_DEFAULT_ICON_FONT_FAMILY);\n\n /**\n * Visual style of the button.\n * Available types:\n * - 'standard': Default button style (blue)\n * - 'emphasized': High emphasis action (darker blue)\n * - 'positive': Successful/positive action (green)\n * - 'negative': Destructive/negative action (red)\n * - 'attention': Warning action (orange)\n * - 'transparent': No background, minimal style\n * - 'ghost': Subtle button with border on hover\n * - 'half': Split button style\n * - 'menu': Menu trigger button\n */\n readonly fdType = input<ButtonType>(defaultButtonType);\n\n /**\n * Text label displayed inside the button.\n * Can be used alone or combined with an icon.\n */\n readonly label = input<string | undefined>();\n\n /**\n * Whether to apply menu mode styling to the button.\n * When true, adds a dropdown arrow icon and menu-specific styling.\n */\n readonly fdMenu = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * Whether the button is disabled.\n * When true, the button cannot be interacted with and displays a disabled state.\n * This sets the native 'disabled' attribute on button elements.\n */\n readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * ARIA disabled attribute for accessibility.\n * Use this when you want to indicate a disabled state to screen readers\n * without preventing interaction (e.g., for showing tooltips on disabled buttons).\n * Unlike the 'disabled' attribute, this does not prevent click events.\n */\n readonly ariaDisabled = input<boolean, BooleanInput>(false, {\n alias: 'aria-disabled',\n transform: booleanAttribute\n });\n\n /**\n * ARIA label for the button.\n * Provides an accessible name for screen readers.\n * If not provided, special button types will auto-generate from label or glyph.\n */\n readonly ariaLabel = input<string | null | undefined>();\n\n /**\n * ARIA description for the button.\n * Provides additional context for screen readers beyond the label.\n * Special button types (emphasized, positive, negative, attention) will\n * auto-generate a description from their type if not provided.\n */\n readonly ariaDescription = input<string | null | undefined>();\n\n /**\n * Override the default type description for special button types.\n * Provides a custom description for screen readers.\n * If not provided, defaults to the i18n-translated type description.\n */\n readonly ariaTypeDescription = input<string | null | undefined>();\n\n /**\n * Custom aria-describedby value.\n * When provided, bypasses the component's auto-generated aria-describedby\n * (which references the hidden description spans) and uses this value directly.\n * Use this when you need to reference external elements as the description source.\n * Native aria-describedby attributes are captured automatically via ngOnInit.\n */\n readonly ariaDescribedBy = input<string | null | undefined>();\n\n /** @hidden */\n readonly elementRef = inject(ElementRef);\n\n /**\n * Internal toggled state that can be mutated programmatically.\n * Syncs with the toggled input but allows internal modification.\n * @hidden\n */\n protected readonly toggledState = linkedSignal(() => this.toggled());\n\n /**\n * Internal selected state that can be mutated programmatically.\n * Syncs with the selected input but allows internal modification.\n * @hidden\n */\n protected readonly selectedState = linkedSignal(() => this.selected());\n\n /**\n * Internal button type state that can be mutated programmatically.\n * Syncs with the fdType input but allows internal modification.\n * @hidden\n */\n protected readonly fdTypeState = linkedSignal(() => this.fdType());\n\n /**\n * Internal disabled state that can be mutated programmatically.\n * Syncs with the disabled input but allows internal modification.\n * @hidden\n */\n protected readonly _disabledState = linkedSignal(() => this.disabled());\n\n /**\n * No-op for ButtonModel interface compatibility.\n * Signals automatically notify Angular when they change.\n * @deprecated Signals eliminate the need for manual change detection.\n */\n markForCheck(): void {\n // No-op: Signals automatically trigger change detection\n }\n\n /**\n * Programmatically set the disabled state.\n * This allows parent components or directives to update the button's disabled state.\n *\n * @param value - Whether the button should be disabled\n *\n * @example\n * ```typescript\n * // In a form component that needs to disable all buttons\n * this.submitButton.setDisabled(this.form.invalid);\n * ```\n */\n setDisabled(value: boolean): void {\n this._disabledState.set(value);\n }\n\n /**\n * Get the current disabled state.\n * Returns the internal disabled state which may have been modified programmatically.\n *\n * @returns True if the button is currently disabled\n *\n * @example\n * ```typescript\n * if (!this.button.isDisabled()) {\n * this.button.setDisabled(true);\n * }\n * ```\n */\n isDisabled(): boolean {\n return this._disabledState();\n }\n\n /**\n * Programmatically set the button type.\n * This allows directives to override the button's visual style.\n *\n * @param value - The button type to apply\n *\n * @example\n * ```typescript\n * // A directive that changes button style based on validation state\n * if (this.validationFailed) {\n * this.button.setFdType('negative');\n * }\n * ```\n */\n setFdType(value: ButtonType): void {\n this.fdTypeState.set(value);\n }\n\n /**\n * Get the current button type.\n * Returns the internal button type which may have been modified programmatically.\n *\n * @returns The current button type\n */\n getFdType(): ButtonType {\n return this.fdTypeState();\n }\n\n /**\n * Programmatically set the selected state.\n * This allows parent components to update the button's selected state.\n * Used in button groups or toolbars to indicate active selection.\n *\n * @param value - Whether the button should be selected\n *\n * @example\n * ```typescript\n * // In a button group component managing selection\n * this.buttons.forEach(btn => btn.setSelected(false));\n * this.activeButton.setSelected(true);\n * ```\n */\n setSelected(value: boolean): void {\n this.selectedState.set(value);\n }\n\n /**\n * Get the current selected state.\n * Returns the internal selected state which may have been modified programmatically.\n *\n * @returns True if the button is currently selected\n */\n isSelected(): boolean {\n return this.selectedState();\n }\n\n /**\n * Programmatically set the toggled state.\n * This allows parent components to update the button's toggled state.\n * Used for toggle buttons that maintain an on/off state.\n *\n * @param value - Whether the button should be toggled on\n *\n * @example\n * ```typescript\n * // In a toolbar with toggle buttons\n * handleBoldClick(): void {\n * const isActive = !this.boldButton.isToggled();\n * this.boldButton.setToggled(isActive);\n * }\n * ```\n */\n setToggled(value: boolean): void {\n this.toggledState.set(value);\n }\n\n /**\n * Get the current toggled state.\n * Returns the internal toggled state which may have been modified programmatically.\n *\n * @returns True if the button is currently toggled\n */\n isToggled(): boolean {\n return this.toggledState();\n }\n}\n","import { InjectionToken } from '@angular/core';\nimport { BaseButton } from './base-button';\n\nexport const FD_BUTTON_COMPONENT = new InjectionToken<BaseButton>('FdButtonComponent');\n","import { Directive, ElementRef, effect, inject, input, isDevMode } from '@angular/core';\nimport { HasElementRef } from '@fundamental-ngx/cdk/utils';\nimport { BaseButton, ButtonType } from './base-button';\nimport { FD_BUTTON_COMPONENT } from './tokens';\n\nexport const badgeEnabledButtonTypes: ButtonType[] = ['emphasized', 'standard', 'ghost', 'transparent'];\n\n/**\n * Directive to display a badge on a button.\n *\n * Badges are small status indicators that can be added to buttons to show\n * notifications, counts, or other supplementary information.\n *\n * Usage:\n * ```html\n * <button fd-button>\n * Button Text\n * <fd-button-badge [content]=\"5\" />\n * </button>\n * ```\n *\n * @note Badge content should not exceed 4 characters for optimal display.\n * @note Badges are only supported on emphasized, standard, ghost, and transparent button types.\n */\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: 'fd-button-badge',\n host: {\n class: 'fd-button__badge'\n }\n})\nexport class ButtonBadgeDirective implements HasElementRef {\n /**\n * Content to display inside the badge.\n * Should not exceed 4 characters for optimal display.\n * Supports both string and numeric values.\n */\n readonly content = input<string | number>();\n\n /** @hidden */\n readonly elementRef: ElementRef<HTMLElement> = inject(ElementRef);\n\n /** @hidden */\n protected readonly buttonComponent = inject<BaseButton>(FD_BUTTON_COMPONENT, { host: true });\n\n /** @hidden */\n constructor() {\n // Single-purpose effect: Sync badge content to DOM\n effect(() => {\n this.elementRef.nativeElement.textContent = String(this.content() ?? '');\n });\n\n // Validation effect only in development mode (zero overhead in production)\n if (isDevMode()) {\n effect(() => {\n this._validateBadge();\n });\n }\n }\n\n /**\n * Validates badge configuration in development mode.\n * Checks content length and button type compatibility.\n * @hidden\n */\n private _validateBadge(): void {\n const contentValue = this.content();\n if (contentValue && contentValue.toString().length > 4) {\n console.warn('Badge content should not be longer than 4 characters');\n }\n\n if (!badgeEnabledButtonTypes.includes(this.buttonComponent.getFdType())) {\n console.warn(\n `Currently the ${JSON.stringify(\n badgeEnabledButtonTypes\n )} type of buttons are required for Badge enablement`\n );\n }\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n ElementRef,\n inject,\n input,\n OnInit,\n signal,\n ViewEncapsulation\n} from '@angular/core';\nimport { HasElementRef } from '@fundamental-ngx/cdk/utils';\nimport { ContentDensityObserver, contentDensityObserverProviders } from '@fundamental-ngx/core/content-density';\nimport { resolveTranslationSignalFn } from '@fundamental-ngx/i18n';\nimport { BaseButton } from './base-button';\n\nimport { IconComponent } from '@fundamental-ngx/core/icon';\nimport { FD_BUTTON_COMPONENT } from './tokens';\n\nlet buttonId = 0;\n\nconst SPECIAL_BUTTON_TYPES = new Set(['emphasized', 'positive', 'negative', 'attention']);\n\n/**\n * Button directive, used to enhance standard HTML buttons.\n *\n * ``` selector: button[fd-button], a[fd-button] ```\n *\n * ```html\n * <button fd-button label=\"Button Text\"></button>\n * <a fd-button label=\"Button Text\"></a>\n * ```\n */\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'button[fd-button], a[fd-button], span[fd-button]',\n exportAs: 'fd-button',\n templateUrl: './button.component.html',\n styleUrl: './button.component.scss',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[attr.type]': 'type()',\n '[attr.disabled]': '_disabledState() || null',\n '[attr.aria-disabled]': 'ariaDisabled() || null',\n '[attr.aria-label]': 'buttonArialabel()',\n '[attr.aria-describedby]': 'ariaDescribedby() || null',\n '[attr.id]': 'id()',\n '[class]': 'cssClass()',\n '(click)': 'clicked($event)'\n },\n providers: [\n contentDensityObserverProviders(),\n {\n provide: FD_BUTTON_COMPONENT,\n useExisting: ButtonComponent\n }\n ],\n imports: [IconComponent]\n})\nexport class ButtonComponent extends BaseButton implements HasElementRef, OnInit {\n /** Button ID - default value is provided if not set */\n readonly id = input(`fd-button-${++buttonId}`);\n\n /** @hidden */\n readonly elementRef = inject(ElementRef);\n\n /** @hidden */\n protected readonly contentDensityObserver = inject(ContentDensityObserver);\n\n /**\n * Check if button has a special type (emphasized, positive, negative, attention)\n * @hidden\n */\n protected readonly isSpecialButtonType = computed(() => SPECIAL_BUTTON_TYPES.has(this.fdTypeState()));\n\n /**\n * Calculate aria-describedby attribute value.\n * If the user explicitly provides aria-describedby (via input or native attribute),\n * that value is used as-is. Otherwise, auto-generates IDs referencing hidden description spans.\n * Returns null if no descriptions apply (attribute not set).\n * @hidden\n */\n protected readonly ariaDescribedby = computed(() => {\n // User-provided value takes full precedence — bypass the auto-generated spans\n const userProvided = this.ariaDescribedBy() ?? this.nativeAriaDescribedBy();\n if (userProvided != null) {\n return userProvided || null;\n }\n\n const ids: string[] = [];\n\n if (this.effectiveAriaDescription()) {\n ids.push(this.id() + '-description');\n }\n\n if (this.isSpecialButtonType()) {\n ids.push(this.id() + '-type-description');\n }\n\n return ids.length > 0 ? ids.join(' ') : null;\n });\n\n /**\n * Native aria-describedby attribute read from the DOM element.\n * Captured once during init; signals user intent to manage describedby manually.\n * @hidden\n */\n protected readonly nativeAriaDescribedBy = signal<string | null>(null);\n\n /**\n * Effective aria description: explicit input takes precedence over native attribute.\n * Prioritizes ariaDescription input, falls back to native attribute.\n * Empty string from ariaDescription is preserved (clears description).\n * @hidden\n */\n protected readonly effectiveAriaDescription = computed(\n () => this.ariaDescription() ?? this._nativeAriaDescription()\n );\n\n /**\n * Translated aria description for the current special button type, or null if not special.\n * @hidden\n */\n protected readonly defaultButtonTypeDescription = computed(() => {\n const type = this.fdTypeState() as keyof typeof this._typeDescriptions;\n return this._typeDescriptions[type]?.() ?? null;\n });\n\n /**\n * Calculate aria-label attribute\n * @hidden\n */\n protected readonly buttonArialabel = computed(() => {\n if (this.ariaLabel()) {\n return this.ariaLabel(); // return the input aria-label\n }\n\n const nativeLabel = this._nativeAriaLabel();\n\n if (nativeLabel) {\n return nativeLabel; // return the native attribute aria-label\n }\n\n if (this.isSpecialButtonType()) {\n return this.label() ?? this._glyphLabel() ?? null;\n }\n\n return null;\n });\n\n /**\n * Computed CSS classes for the button.\n * Built as a string to avoid array allocation overhead.\n * @hidden\n */\n protected readonly cssClass = computed(() => {\n let classes = 'fd-button';\n\n const type = this.fdTypeState();\n if (type) {\n classes += ` fd-button--${type}`;\n }\n\n if (this.fdMenu()) {\n classes += ' fd-button--menu';\n }\n\n if (this._disabledState() || this.ariaDisabled()) {\n classes += ' is-disabled';\n }\n\n if (this.toggledState()) {\n classes += ' fd-button--toggled';\n }\n\n return classes;\n });\n\n /**\n * Memoized glyph label for aria-label fallback.\n * Transforms glyph name (e.g., \"slim-arrow-down\") to readable text (e.g., \"slim arrow down\").\n * @hidden\n */\n private readonly _glyphLabel = computed(() => {\n const glyph = this.glyph();\n return glyph ? glyph.replace(/-/g, ' ') : null;\n });\n\n /**\n * Native aria-label attribute read from the DOM element.\n * Captured once after render for use in aria-label computation.\n * @hidden\n */\n private readonly _nativeAriaLabel = signal<string | null>(null);\n\n /**\n * Native aria-description attribute read from the DOM element.\n * Captured once after render for use in aria-description computation.\n * @hidden\n */\n private readonly _nativeAriaDescription = signal<string | null>(null);\n\n /** @hidden Resolves per-key translation signals */\n private readonly _translate = resolveTranslationSignalFn();\n\n /** @hidden Translated aria descriptions for each special button type */\n private readonly _typeDescriptions = {\n attention: this._translate('coreButton.attentionTypeDescription'),\n emphasized: this._translate('coreButton.emphasizedTypeDescription'),\n negative: this._translate('coreButton.negativeTypeDescription'),\n positive: this._translate('coreButton.positiveTypeDescription')\n } as const;\n\n /** @hidden */\n constructor() {\n super();\n }\n\n /**\n * Capture native aria-label and aria-description attributes during initialization.\n * Runs during ngOnInit to ensure attributes are captured before rendering the template.\n * The native aria-description is removed from the DOM after capture to prevent\n * duplicate accessibility attributes (ACC-264.1).\n */\n ngOnInit(): void {\n const nativeLabel = this.elementRef.nativeElement.getAttribute('aria-label');\n if (nativeLabel) {\n this._nativeAriaLabel.set(nativeLabel);\n }\n\n const nativeDescription = this.elementRef.nativeElement.getAttribute('aria-description');\n if (nativeDescription) {\n this._nativeAriaDescription.set(nativeDescription);\n // Remove native attribute to prevent ACC-264.1 (duplicate aria-description)\n this.elementRef.nativeElement.removeAttribute('aria-description');\n }\n\n const nativeDescribedBy = this.elementRef.nativeElement.getAttribute('aria-describedby');\n if (nativeDescribedBy) {\n this.nativeAriaDescribedBy.set(nativeDescribedBy);\n }\n }\n\n /** Forces the focus outline around the button, which is not default behavior in Safari. */\n protected clicked(event: Event): void {\n const target = event?.target as HTMLElement;\n // Target can be empty during unit tests execution.\n if (target && document.activeElement !== target) {\n target.focus();\n }\n }\n}\n","@if (glyph() && glyphPosition() === 'before') {\n <fd-icon [glyph]=\"glyph()\" [font]=\"glyphFont()\"></fd-icon>\n}\n@if (label()) {\n <span class=\"fd-button__text\">\n {{ label() }}\n </span>\n}\n<ng-content></ng-content>\n<ng-content select=\"fd-button-badge\"></ng-content>\n@if (glyph() && glyphPosition() === 'after') {\n <fd-icon [glyph]=\"glyph()\" [font]=\"glyphFont()\"></fd-icon>\n}\n@if (fdMenu()) {\n <fd-icon glyph=\"slim-arrow-down\"></fd-icon>\n}\n\n<!-- Custom description (ariaDescription input or native attribute).\n Skipped when user provides aria-describedby — they manage their own description references. -->\n@if (!ariaDescribedBy() && !nativeAriaDescribedBy() && effectiveAriaDescription()) {\n <span class=\"fd-button__sr-only\" [attr.id]=\"id() + '-description'\">{{ effectiveAriaDescription() }}</span>\n}\n\n<!-- Type description (special button types: emphasized, positive, negative, attention).\n Skipped when user provides aria-describedby — they manage their own description references. -->\n@if (!ariaDescribedBy() && !nativeAriaDescribedBy() && isSpecialButtonType()) {\n <span class=\"fd-button__sr-only\" [attr.id]=\"id() + '-type-description'\">{{\n ariaTypeDescription() || defaultButtonTypeDescription()\n }}</span>\n}\n","import { NgModule } from '@angular/core';\n\nimport { ButtonComponent } from './button.component';\n\n/**\n * @deprecated\n * Use `ButtonComponent` import instead\n */\n@NgModule({\n imports: [ButtonComponent],\n exports: [ButtonComponent]\n})\nexport class ButtonModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAqBO,MAAM,iBAAiB,GAAG;MASpB,UAAU,CAAA;AAPvB,IAAA,WAAA,GAAA;AAQI;;;;AAIG;QACM,IAAA,CAAA,OAAO,GAAG,KAAK,CAAwB,KAAK,+EAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AAEvF;;;;AAIG;QACM,IAAA,CAAA,Q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