Archived
Template
1
Fork 0
This repository has been archived on 2024-09-04. You can view files and clone it, but cannot push or open issues or pull requests.
Contour/public/@shoelace-style/shoelace/cdn/chunks/chunk.D6FJH3JV.js
2024-01-30 10:59:28 -05:00

127 lines
3 KiB
JavaScript

import {
component_styles_default
} from "./chunk.K23QWHWK.js";
import {
i
} from "./chunk.CXZZ2LVK.js";
// src/components/radio/radio.styles.ts
var radio_styles_default = i`
${component_styles_default}
:host {
display: block;
}
:host(:focus-visible) {
outline: 0px;
}
.radio {
display: inline-flex;
align-items: top;
font-family: var(--sl-input-font-family);
font-size: var(--sl-input-font-size-medium);
font-weight: var(--sl-input-font-weight);
color: var(--sl-input-label-color);
vertical-align: middle;
cursor: pointer;
}
.radio--small {
--toggle-size: var(--sl-toggle-size-small);
font-size: var(--sl-input-font-size-small);
}
.radio--medium {
--toggle-size: var(--sl-toggle-size-medium);
font-size: var(--sl-input-font-size-medium);
}
.radio--large {
--toggle-size: var(--sl-toggle-size-large);
font-size: var(--sl-input-font-size-large);
}
.radio__checked-icon {
display: inline-flex;
width: var(--toggle-size);
height: var(--toggle-size);
}
.radio__control {
flex: 0 0 auto;
position: relative;
display: inline-flex;
align-items: center;
justify-content: center;
width: var(--toggle-size);
height: var(--toggle-size);
border: solid var(--sl-input-border-width) var(--sl-input-border-color);
border-radius: 50%;
background-color: var(--sl-input-background-color);
color: transparent;
transition:
var(--sl-transition-fast) border-color,
var(--sl-transition-fast) background-color,
var(--sl-transition-fast) color,
var(--sl-transition-fast) box-shadow;
}
.radio__input {
position: absolute;
opacity: 0;
padding: 0;
margin: 0;
pointer-events: none;
}
/* Hover */
.radio:not(.radio--checked):not(.radio--disabled) .radio__control:hover {
border-color: var(--sl-input-border-color-hover);
background-color: var(--sl-input-background-color-hover);
}
/* Checked */
.radio--checked .radio__control {
color: var(--sl-color-neutral-0);
border-color: var(--sl-color-primary-600);
background-color: var(--sl-color-primary-600);
}
/* Checked + hover */
.radio.radio--checked:not(.radio--disabled) .radio__control:hover {
border-color: var(--sl-color-primary-500);
background-color: var(--sl-color-primary-500);
}
/* Checked + focus */
:host(:focus-visible) .radio__control {
outline: var(--sl-focus-ring);
outline-offset: var(--sl-focus-ring-offset);
}
/* Disabled */
.radio--disabled {
opacity: 0.5;
cursor: not-allowed;
}
/* When the control isn't checked, hide the circle for Windows High Contrast mode a11y */
.radio:not(.radio--checked) svg circle {
opacity: 0;
}
.radio__label {
display: inline-block;
color: var(--sl-input-label-color);
line-height: var(--toggle-size);
margin-inline-start: 0.5em;
user-select: none;
-webkit-user-select: none;
}
`;
export {
radio_styles_default
};