Skip to content

Commit

Permalink
refactor(action)!: Removed deprecated properties and values. #5798
Browse files Browse the repository at this point in the history
  • Loading branch information
driskull committed Nov 22, 2022
1 parent 8ce48f3 commit d7612bb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 42 deletions.
9 changes: 0 additions & 9 deletions src/components/action/action.scss
Original file line number Diff line number Diff line change
Expand Up @@ -145,34 +145,25 @@
@apply bg-foreground-1;
}

//clear is deprecated. use transparent
:host([appearance="clear"]) .button,
:host([appearance="transparent"]) .button {
@apply bg-transparent
transition-shadow
duration-150
ease-in-out;
}

:host([appearance="clear"]) .button:hover,
:host([appearance="clear"]) .button:focus,
:host([appearance="transparent"]) .button:hover,
:host([appearance="transparent"]) .button:focus {
@apply bg-transparent;
box-shadow: 0 0 0 2px theme("borderColor.color.1") inset;
}

:host([active][appearance="clear"]) .button,
:host([active][appearance="clear"]) .button:hover,
:host([active][appearance="clear"]) .button:focus,
:host([active][appearance="transparent"]) .button,
:host([active][appearance="transparent"]) .button:hover,
:host([active][appearance="transparent"]) .button:focus {
@apply text-color-1 fill-color-1 bg-foreground-3;
}

:host([appearance="clear"][loading]) .button,
:host([appearance="clear"][disabled]) .button,
:host([appearance="transparent"][loading]) .button,
:host([appearance="transparent"][disabled]) .button {
@apply bg-transparent;
Expand Down
34 changes: 2 additions & 32 deletions src/components/action/action.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,4 @@
import {
Component,
Element,
Event,
EventEmitter,
Host,
Method,
Prop,
h,
forceUpdate,
VNode
} from "@stencil/core";
import { Component, Element, Host, Method, Prop, h, forceUpdate, VNode } from "@stencil/core";

import { Alignment, Appearance, Scale } from "../interfaces";

Expand Down Expand Up @@ -103,19 +92,6 @@ export class Action implements InteractiveComponent, LoadableComponent {
*/
@Prop({ reflect: true }) textEnabled = false;

// --------------------------------------------------------------------------
//
// Events
//
// --------------------------------------------------------------------------

/**
* Emits when the component has been clicked.
*
* @deprecated use `onClick` instead.
*/
@Event({ cancelable: false }) calciteActionClick: EventEmitter<void>;

// --------------------------------------------------------------------------
//
// Private Properties
Expand Down Expand Up @@ -231,7 +207,7 @@ export class Action implements InteractiveComponent, LoadableComponent {
};

return (
<Host onClick={this.calciteActionClickHandler}>
<Host>
<button
aria-busy={toAriaBoolean(loading)}
aria-disabled={toAriaBoolean(disabled)}
Expand Down Expand Up @@ -267,10 +243,4 @@ export class Action implements InteractiveComponent, LoadableComponent {
tooltip.referenceElement = this.buttonEl;
}
};

calciteActionClickHandler = (): void => {
if (!this.disabled) {
this.calciteActionClick.emit();
}
};
}
2 changes: 1 addition & 1 deletion src/components/pick-list-item/pick-list-item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ export class PickListItem
<calcite-action
class={CSS.remove}
icon={ICONS.remove}
onCalciteActionClick={this.removeClickHandler}
onClick={this.removeClickHandler}
slot={SLOTS.actionsEnd}
text={this.intlRemove}
/>
Expand Down

0 comments on commit d7612bb

Please sign in to comment.