Skip to content

Commit

Permalink
feat(design)!: rename DaffSizeable interface to DaffSizable (#2730)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: The `DaffSizeable` interface has been renamed to `DaffSizable`
  • Loading branch information
xelaint committed Jan 18, 2024
1 parent f58c266 commit ab3b70a
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 15 deletions.
6 changes: 3 additions & 3 deletions libs/design/button/src/button/button.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
DaffSuffixable,
daffPrefixableMixin,
daffSuffixableMixin,
DaffSizeable,
DaffSizable,
DaffSizeSmallType,
DaffSizeMediumType,
DaffSizeLargeType,
Expand Down Expand Up @@ -51,7 +51,7 @@ const _daffButtonBase = daffArticleEncapsulatedMixin(daffPrefixableMixin(daffSuf
export type DaffButtonType = 'daff-button' | 'daff-stroked-button' | 'daff-raised-button' | 'daff-flat-button' | 'daff-icon-button' | 'daff-underline-button' | undefined;

/**
* The DaffSizeable types that the DaffButtonComponent can implement
* The DaffSizable types that the DaffButtonComponent can implement
*/
export type DaffButtonSize = DaffSizeSmallType | DaffSizeMediumType | DaffSizeLargeType;

Expand Down Expand Up @@ -92,7 +92,7 @@ enum DaffButtonTypeEnum {
})
export class DaffButtonComponent
extends _daffButtonBase
implements OnInit, DaffPrefixable, DaffSuffixable, DaffColorable, DaffSizeable<DaffButtonSize>, DaffStatusable {
implements OnInit, DaffPrefixable, DaffSuffixable, DaffColorable, DaffSizable<DaffButtonSize>, DaffStatusable {

private buttonType: DaffButtonType;

Expand Down
4 changes: 2 additions & 2 deletions libs/design/container/src/container/container.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
} from '@angular/core';

import {
DaffSizeable,
DaffSizable,
DaffSizeAllType,
daffSizeMixin,
} from '@daffodil/design';
Expand All @@ -34,7 +34,7 @@ const _daffContainerBase = daffSizeMixin(DaffContainerBase);
inputs: ['size'],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class DaffContainerComponent extends _daffContainerBase implements DaffSizeable<DaffSizeAllType> {
export class DaffContainerComponent extends _daffContainerBase implements DaffSizable<DaffSizeAllType> {

/**
* @docs-private
Expand Down
2 changes: 1 addition & 1 deletion libs/design/src/core/public_api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ export * from './article-encapsulated/public_api';
export * from './theming/public_api';
export * from './lazy/public_api';
export * from './focus/public_api';
export * from './sizeable/public_api';
export * from './sizable/public_api';
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
export {
DaffSizeable,
DaffSizable,
DaffSizeAllType,
DaffSizeableEnum,
DaffSizableEnum,
DaffSizeXSmallType,
DaffSizeSmallType,
DaffSizeMediumType,
DaffSizeLargeType,
DaffSizeXLargeType,
} from './sizeable';
export { daffSizeMixin } from './sizeable-mixin';
} from './sizable';
export { daffSizeMixin } from './sizable-mixin';
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
Renderer2,
} from '@angular/core';

import { DaffSizeAllType } from './sizeable';
import { DaffSizeAllType } from './sizable';
import { Constructor } from '../constructor/constructor';

export interface HasElementRef {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ElementRef } from '@angular/core';

import { daffSizeMixin } from './sizeable-mixin';
import { daffSizeMixin } from './sizable-mixin';

class TestingClass {
element: HTMLElement = document.createElement('div');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
* In order to be sizable, a component class must implement this property.
*/

export interface DaffSizeable<T extends DaffSizeAllType> {
export interface DaffSizable<T extends DaffSizeAllType> {
size: T;
}

/**
* The possible types that can be passed to a component that implements DaffSizeable
* The possible types that can be passed to a component that implements DaffSizable
*/

export type DaffSizeXSmallType = 'xs';
Expand All @@ -19,7 +19,7 @@ export type DaffSizeXLargeType = 'xl';

export type DaffSizeAllType = DaffSizeXSmallType | DaffSizeSmallType | DaffSizeMediumType | DaffSizeLargeType | DaffSizeXLargeType;

export enum DaffSizeableEnum {
export enum DaffSizableEnum {
XSmall = 'xs',
Small = 'sm',
Medium = 'md',
Expand Down

0 comments on commit ab3b70a

Please sign in to comment.