How to use the @ptsecurity/mosaic/core.mixinDisabled function in @ptsecurity/mosaic

To help you get started, we’ve selected a few @ptsecurity/mosaic examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github positive-js / mosaic / packages / mosaic / tabs / tab-nav-bar / tab-nav-bar.ts View on Github external
host: { class: 'mc-tab-nav-bar' },
    encapsulation: ViewEncapsulation.None,
    changeDetection: ChangeDetectionStrategy.OnPush
})
export class McTabNav extends McTabNavMixinBase
    implements CanColor {
        constructor(elementRef: ElementRef) {
            super(elementRef);
        }
     }

// Boilerplate for applying mixins to McTabLink.
export class McTabLinkBase {}
// tslint:disable-next-line:naming-convention
export const McTabLinkMixinBase: HasTabIndexCtor & CanDisableCtor &
    typeof McTabLinkBase = mixinTabIndex(mixinDisabled(McTabLinkBase));

/**
 * Link inside of a `mc-tab-nav-bar`.
 */
@Directive({
    selector: '[mc-tab-link], [mcTabLink]',
    exportAs: 'mcTabLink',
    inputs: ['disabled', 'tabIndex'],
    host: {
        class: 'mc-tab-link',
        '[attr.aria-current]': 'active',
        '[attr.aria-disabled]': 'disabled.toString()',
        '[attr.tabIndex]': 'tabIndex',
        '[class.mc-disabled]': 'disabled',
        '[class.mc-active]': 'active'
    }
github positive-js / mosaic / src / lib / tabs / tab-nav-bar / tab-nav-bar.ts View on Github external
styleUrls: ['tab-nav-bar.css'],
    host: { class: 'mc-tab-nav-bar' },
    encapsulation: ViewEncapsulation.None,
    changeDetection: ChangeDetectionStrategy.OnPush
})
export class McTabNav extends mcTabNavMixinBase
    implements CanColor {
        constructor(elementRef: ElementRef) {
            super(elementRef);
        }
     }

// Boilerplate for applying mixins to McTabLink.
export class McTabLinkBase {}
export const mcTabLinkMixinBase: HasTabIndexCtor & CanDisableCtor &
    typeof McTabLinkBase = mixinTabIndex(mixinDisabled(McTabLinkBase));

/**
 * Link inside of a `mc-tab-nav-bar`.
 */
@Directive({
    selector: '[mc-tab-link], [mcTabLink]',
    exportAs: 'mcTabLink',
    inputs: ['disabled', 'tabIndex'],
    host: {
        class: 'mc-tab-link',
        '[attr.aria-current]': 'active',
        '[attr.aria-disabled]': 'disabled.toString()',
        '[attr.tabIndex]': 'tabIndex',
        '[class.mc-disabled]': 'disabled',
        '[class.mc-active]': 'active'
    }
github positive-js / mosaic / packages / mosaic / tabs / tab-group.ts View on Github external
}

/** Injection token that can be used to provide the default options the tabs module. */
export const MC_TABS_CONFIG = new InjectionToken('MC_TABS_CONFIG');

// Boilerplate for applying mixins to McTabGroup.
/** @docs-private */
export class McTabGroupBase {
    // tslint:disable-next-line:naming-convention
    constructor(public _elementRef: ElementRef) { }
}
// tslint:disable-next-line:naming-convention
export const McTabGroupMixinBase:
    CanColorCtor &
    typeof McTabGroupBase =
    mixinColor(mixinDisabled(McTabGroupBase));

/**
 * Tab-group component.  Supports basic tab pairs (label + content) and includes
 * keyboard navigation.
 */
@Component({
    selector: 'mc-tab-group',
    exportAs: 'mcTabGroup',
    templateUrl: 'tab-group.html',
    styleUrls: ['tab-group.css'],
    encapsulation: ViewEncapsulation.None,
    changeDetection: ChangeDetectionStrategy.OnPush,
    inputs: ['color'],
    host: {
        class: 'mc-tab-group',
        '[class.mc-tab-group_dynamic-height]': 'dynamicHeight',
github positive-js / mosaic / src / lib / dropdown / dropdown-item.ts View on Github external
Optional,
    Input,
    ViewChild
} from '@angular/core';
import { IFocusableOption, FocusMonitor, FocusOrigin } from '@ptsecurity/cdk/a11y';
import { CanDisable, CanDisableCtor, mixinDisabled } from '@ptsecurity/mosaic/core';
import { Subject } from 'rxjs';

import { MC_DROPDOWN_PANEL, McDropdownPanel } from './dropdown-panel';


// Boilerplate for applying mixins to McDropdownItem.
/** @docs-private */
export class McDropdownItemBase {}
export const _McDropdownItemMixinBase: CanDisableCtor & typeof McDropdownItemBase =
    mixinDisabled(McDropdownItemBase);

/**
 * This directive is intended to be used inside an mc-dropdown tag.
 * It exists mostly to set the role attribute.
 */
@Component({
    selector: 'mc-dropdown-item, [mc-dropdown-item]',
    exportAs: 'mcDropdownItem',
    inputs: ['disabled'],
    host: {
        '[attr.role]': 'role',
        class: 'mc-dropdown__item',
        '[class.mc-dropdown__item_highlighted]': '_highlighted',
        '[attr.tabindex]': '_getTabIndex()',
        '[attr.aria-disabled]': 'disabled.toString()',
        '[attr.disabled]': 'disabled || null',
github positive-js / mosaic / src / lib / tabs / tab-group.ts View on Github external
animationDuration?: string;
}

/** Injection token that can be used to provide the default options the tabs module. */
export const MC_TABS_CONFIG = new InjectionToken('MC_TABS_CONFIG');

// Boilerplate for applying mixins to McTabGroup.
/** @docs-private */
export class McTabGroupBase {
    // tslint:disable-next-line:naming-convention
    constructor(public _elementRef: ElementRef) { }
}
export const mcTabGroupMixinBase:
    CanColorCtor &
    typeof McTabGroupBase =
    mixinColor(mixinDisabled(McTabGroupBase));

/**
 * Tab-group component.  Supports basic tab pairs (label + content) and includes
 * keyboard navigation.
 */
@Component({
    selector: 'mc-tab-group',
    exportAs: 'mcTabGroup',
    templateUrl: 'tab-group.html',
    styleUrls: ['tab-group.css'],
    encapsulation: ViewEncapsulation.None,
    changeDetection: ChangeDetectionStrategy.OnPush,
    inputs: ['color'],
    host: {
        class: 'mc-tab-group',
        '[class.mc-tab-group_dynamic-height]': 'dynamicHeight',