style(tap-click): rename activable to activatable

This commit is contained in:
Brandy Carney
2018-09-05 13:17:24 -04:00
parent 6d6f70ce09
commit 6ed4690834
12 changed files with 17 additions and 18 deletions

View File

@ -235,7 +235,7 @@ export class ActionSheet implements OverlayInterface {
</div> </div>
} }
{buttons.map(b => {buttons.map(b =>
<button type="button" ion-activable class={buttonClass(b)} onClick={() => this.buttonClick(b)}> <button type="button" ion-activatable class={buttonClass(b)} onClick={() => this.buttonClick(b)}>
<span class="action-sheet-button-inner"> <span class="action-sheet-button-inner">
{b.icon && <ion-icon icon={b.icon} lazy={false} class="action-sheet-icon" />} {b.icon && <ion-icon icon={b.icon} lazy={false} class="action-sheet-icon" />}
{b.text} {b.text}
@ -247,7 +247,7 @@ export class ActionSheet implements OverlayInterface {
{cancelButton && {cancelButton &&
<div class="action-sheet-group action-sheet-group-cancel"> <div class="action-sheet-group action-sheet-group-cancel">
<button <button
ion-activable ion-activatable
type="button" type="button"
class={buttonClass(cancelButton)} class={buttonClass(cancelButton)}
onClick={() => this.buttonClick(cancelButton)} onClick={() => this.buttonClick(cancelButton)}

View File

@ -424,7 +424,7 @@ export class Alert implements OverlayInterface {
return ( return (
<div class={alertButtonGroupClass}> <div class={alertButtonGroupClass}>
{buttons.map(button => {buttons.map(button =>
<button type="button" ion-activable class={buttonClass(button)} tabIndex={0} onClick={() => this.buttonClick(button)}> <button type="button" ion-activatable class={buttonClass(button)} tabIndex={0} onClick={() => this.buttonClick(button)}>
<span class="alert-button-inner"> <span class="alert-button-inner">
{button.text} {button.text}
</span> </span>

View File

@ -65,7 +65,7 @@ export class BackButton {
'button': true, 'button': true,
'show-back-button': showBackButton 'show-back-button': showBackButton
}, },
'ion-activable': true, 'ion-activatable': true,
}; };
} }

View File

@ -149,6 +149,7 @@ export class Button {
const { buttonType, color, expand, fill, mode, shape, size, strong } = this; const { buttonType, color, expand, fill, mode, shape, size, strong } = this;
return { return {
'ion-activatable': true,
class: { class: {
...createColorClasses(color), ...createColorClasses(color),
...getButtonClassMap(buttonType, mode), ...getButtonClassMap(buttonType, mode),
@ -158,8 +159,7 @@ export class Button {
...getButtonTypeClassMap(buttonType, strong ? 'strong' : undefined, mode), ...getButtonTypeClassMap(buttonType, strong ? 'strong' : undefined, mode),
...getButtonTypeClassMap(buttonType, fill, mode), ...getButtonTypeClassMap(buttonType, fill, mode),
'focused': this.keyFocus, 'focused': this.keyFocus,
}, }
'ion-activable': true,
}; };
} }

View File

@ -75,9 +75,8 @@ export class FabButton {
} }
hostData() { hostData() {
return { return {
'ion-activable': !this.disabled, 'ion-activatable': true,
class: { class: {
...createColorClasses(this.color), ...createColorClasses(this.color),
...this.getFabClassMap(), ...this.getFabClassMap(),
@ -102,7 +101,7 @@ export class FabButton {
<span class="fab-button-inner"> <span class="fab-button-inner">
<slot></slot> <slot></slot>
</span> </span>
{this.mode === 'md' && <ion-ripple-effect />} {this.mode === 'md' && <ion-ripple-effect></ion-ripple-effect>}
</TagType> </TagType>
); );
} }

View File

@ -126,7 +126,7 @@ export class Item {
}); });
return { return {
'ion-activable': this.isClickable(), 'ion-activatable': this.isClickable(),
class: { class: {
...childStyles, ...childStyles,
...createColorClasses(this.color), ...createColorClasses(this.color),

View File

@ -257,7 +257,7 @@ export class Picker implements OverlayInterface {
<div class={buttonWrapperClass(b)}> <div class={buttonWrapperClass(b)}>
<button <button
type="button" type="button"
ion-activable ion-activatable
onClick={() => this.buttonClick(b)} onClick={() => this.buttonClick(b)}
class={buttonClass(b)} class={buttonClass(b)}
> >

View File

@ -57,12 +57,12 @@ export class SegmentButton {
hostData() { hostData() {
const { disabled, checked, color } = this; const { disabled, checked, color } = this;
return { return {
'ion-activatable': true,
class: { class: {
...createColorClasses(color), ...createColorClasses(color),
'segment-button-disabled': disabled, 'segment-button-disabled': disabled,
'segment-button-checked': checked, 'segment-button-checked': checked,
}, }
'ion-activable': true,
}; };
} }

View File

@ -112,7 +112,7 @@ export class Tabbar {
return ( return (
<a <a
role="tab" role="tab"
ion-activable ion-activatable
aria-selected={selected ? 'true' : null} aria-selected={selected ? 'true' : null}
href={href || '#'} href={href || '#'}
class={{ class={{

View File

@ -194,7 +194,7 @@ export class Toast implements OverlayInterface {
<div class="toast-message">{this.message}</div> <div class="toast-message">{this.message}</div>
} }
{this.showCloseButton && {this.showCloseButton &&
<ion-button fill="clear" color="light" ion-activable class="toast-button" onClick={() => this.dismiss(undefined, 'cancel')}> <ion-button fill="clear" color="light" ion-activatable class="toast-button" onClick={() => this.dismiss(undefined, 'cancel')}>
{this.closeButtonText || 'Close'} {this.closeButtonText || 'Close'}
</ion-button> </ion-button>
} }

View File

@ -54,7 +54,7 @@ declare global {
// for ion-menu and ion-split-pane // for ion-menu and ion-split-pane
main?: boolean; main?: boolean;
tappable?: boolean; tappable?: boolean;
'ion-activable'?: boolean; 'ion-activatable'?: boolean;
padding?: boolean; padding?: boolean;
['padding-top']?: boolean; ['padding-top']?: boolean;

View File

@ -149,12 +149,12 @@ function getActivatableTarget(ev: any): any {
const path = ev.composedPath() as HTMLElement[]; const path = ev.composedPath() as HTMLElement[];
for (let i = 0; i < path.length - 2; i++) { for (let i = 0; i < path.length - 2; i++) {
const el = path[i]; const el = path[i];
if (el.hasAttribute && el.hasAttribute('ion-activable')) { if (el.hasAttribute && el.hasAttribute('ion-activatable')) {
return el; return el;
} }
} }
} else { } else {
return ev.target.closest('[ion-activable]'); return ev.target.closest('[ion-activatable]');
} }
} }