@synergy-design-system/components
Version:
This package provides the base of the Synergy Design System as native web components. It uses [lit](https://www.lit.dev) and parts of [shoelace](https://shoelace.style/). Synergy officially supports the latest two versions of all major browsers (as define
85 lines (67 loc) • 2.48 kB
JavaScript
// src/components/icon-button/icon-button.custom.styles.ts
import { css } from "lit";
var icon_button_custom_styles_default = css`
.icon-button {
border-radius: 0;
color: currentColor;
font-size: inherit;
}
.icon-button--disabled {
color: var(--syn-color-neutral-400);
/** #429: Use token for opacity */
opacity: var(--syn-input-disabled-opacity);
}
/* Remove round borders */
.icon-button:focus-visible {
border-radius: var(--syn-icon-button-focus-ring-border-radius, var(--syn-border-radius-none));
}
/* Colors */
:host([color="currentColor"]) {
color: currentColor;
}
:host([color="primary"]),
:host([color="primary"]) .icon-button:focus-visible:not(.icon-button--disabled) {
color: var(--syn-interactive-emphasis-color, var(--syn-color-primary-600));
}
:host([color="primary"]) .icon-button:hover:not(.icon-button--disabled) {
color: var(--syn-interactive-emphasis-color-hover, var(--syn-color-primary-900));
}
:host([color="primary"]) .icon-button:active:not(.icon-button--disabled) {
color: var(--syn-interactive-emphasis-color-active, var(--syn-color-primary-950));
}
:host([color="neutral"]) {
color: var(--syn-interactive-quiet-color, var(--syn-typography-color-text));
}
:host([color="neutral"]) .icon-button:hover:not(.icon-button--disabled) {
color: var(--syn-interactive-quiet-color-hover, var(--syn-color-primary-600));
}
:host([color="neutral"]) .icon-button:active:not(.icon-button--disabled) {
color: var(--syn-interactive-quiet-color-active, var(--syn-color-primary-700));
}
:host([color="neutral"]) .icon-button:focus-visible:not(.icon-button--disabled):not(:hover) {
color: var(--syn-interactive-quiet-color, var(--syn-typography-color-text));
}
/* Sizes */
.icon-button--small {
font-size: var(--syn-font-size-medium);
}
.icon-button--medium {
font-size: var(--syn-font-size-x-large);
}
.icon-button--large {
font-size: var(--syn-font-size-2x-large);
}
/* Force user to set "label" prop */
.icon-button[aria-label=""] {
border: var(--syn-border-width-large) var(--syn-color-error-600) solid;
}
.icon-button[aria-label=""]::after {
content: "Set label prop for a11y to get rid of this text and border!";
font-size: var(--syn-font-size-2x-small);
margin-left: var(--syn-spacing-2x-small);
}
`;
export {
icon_button_custom_styles_default
};
//# sourceMappingURL=chunk.E3Z62YYT.js.map