Skip to content

Commit

Permalink
move config file out of src (#648)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristianHoffmannS2 authored and RubirajAccenture committed Dec 7, 2023
1 parent c046fec commit 235ef24
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { componentTokens } from "../../../../foundation/_tokens-generated/__comp
import { semanticTokens } from "../../../../foundation/_tokens-generated/__semantic-tokens.Light.generated.mjs";

const { IconButton } = componentTokens.Actions;
const { Global } = semanticTokens;
const { Global, Action } = semanticTokens;

export const styleCustom = typeSafeNestedCss`
.focus-layer {
Expand Down Expand Up @@ -70,6 +70,30 @@ export const styleCustom = typeSafeNestedCss`
}
.loading {
&.blr-icon-button:hover, &.blr-icon-button:focus{
cursor: auto;
text-decoration: none;
&.cta{
background-color: ${Action.CTA.SurfaceFill.Loading}
}
&.primary{
background-color: ${Action.Primary.SurfaceFill.Loading}
}
&.secondary{
background-color: ${Action.Secondary.SurfaceFill.Loading}
}
&.silent{
background-color: ${Action.Silent.SurfaceFill.Loading}
}
&.destructive{
background-color: ${Action.Destructive.SurfaceFill.Loading}
}
&.Encourage{
background-color: ${Action.Encourage.SurfaceFill.Loading}
}
}
& > .icon {
visibility: hidden;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export class BlrIconButton extends LitElement {
role="button"
@keydown=${this.onClick}
>
${this.focused ? html`<span class="focus-layer"></span>` : nothing}
${this.focused && !this.loading ? html`<span class="focus-layer"></span>` : nothing}
${this.loading
? BlrLoaderRenderFunction({
size: loaderSizeVariant,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { componentTokens } from "../../../../foundation/_tokens-generated/__comp
import { semanticTokens } from "../../../../foundation/_tokens-generated/__semantic-tokens.Light.generated.mjs";

const { TextButton } = componentTokens.Actions;
const { Global } = semanticTokens;
const { Global, Action } = semanticTokens;

export const styleCustom = typeSafeNestedCss`
.focus-layer {
Expand Down Expand Up @@ -75,6 +75,30 @@ export const styleCustom = typeSafeNestedCss`
& > .flex-container {
visibility: hidden;
}
&.blr-text-button:hover, &.blr-text-button:focus {
cursor: auto;
text-decoration: none;
&.cta{
background-color: ${Action.CTA.SurfaceFill.Loading}
}
&.primary{
background-color: ${Action.Primary.SurfaceFill.Loading}
}
&.secondary{
background-color: ${Action.Secondary.SurfaceFill.Loading}
}
&.silent{
background-color: ${Action.Silent.SurfaceFill.Loading}
}
&.destructive{
background-color: ${Action.Destructive.SurfaceFill.Loading}
}
&.Encourage{
background-color: ${Action.Encourage.SurfaceFill.Loading}
}
}
}
.block {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ export class BlrTextButton extends LitElement {
const loaderVariant = determineLoaderVariant(this.variant);

const loaderSizeVariant = getComponentConfigToken([
'SizeVariant',
'Action',
this.size.toUpperCase(),
'SizeVariant',
'Loader',
]).toLowerCase() as FormSizesType;

Expand Down Expand Up @@ -130,7 +130,7 @@ export class BlrTextButton extends LitElement {
@keydown=${this.onClick}
id=${this.buttonId || nothing}
>
${this.focused ? html`<span class="focus-layer"></span>` : nothing}
${this.focused && !this.loading ? html`<span class="focus-layer"></span>` : nothing}
${this.loading
? html`
${BlrLoaderRenderFunction({
Expand Down

0 comments on commit 235ef24

Please sign in to comment.