56 lines
20 KiB
JavaScript
56 lines
20 KiB
JavaScript
|
import{_ as i,j as c,e,y as r,d as t,Y as p,n as a}from"./main-85e087f9.js";var d='/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://github.com/material-components/material-components-web/blob/master/LICENSE\n */\n.mdc-touch-target-wrapper{display:inline}.mdc-deprecated-chip-trailing-action__touch{position:absolute;top:50%;height:48px;left:50%;width:48px;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%)}.mdc-deprecated-chip-trailing-action{border:none;display:inline-flex;position:relative;align-items:center;justify-content:center;box-sizing:border-box;padding:0;outline:none;cursor:pointer;-webkit-appearance:none;background:none}.mdc-deprecated-chip-trailing-action .mdc-deprecated-chip-trailing-action__icon{height:18px;width:18px;font-size:18px}.mdc-deprecated-chip-trailing-action .mdc-deprecated-chip-trailing-action{color:#000;color:var(--mdc-theme-on-surface, #000)}.mdc-deprecated-chip-trailing-action .mdc-deprecated-chip-trailing-action__touch{width:26px}.mdc-deprecated-chip-trailing-action .mdc-deprecated-chip-trailing-action__icon{fill:currentColor;color:inherit}@-webkit-keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1));transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1));transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@-webkit-keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@-webkit-keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}@keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-deprecated-chip-trailing-action{--mdc-ripple-fg-size: 0;--mdc-ripple-left: 0;--mdc-ripple-top: 0;--mdc-ripple-fg-scale: 1;--mdc-ripple-fg-translate-end: 0;--mdc-ripple-fg-translate-start: 0;-webkit-tap-highlight-color:rgba(0,0,0,0);will-change:transform,opacity}.mdc-deprecated-chip-trailing-action .mdc-deprecated-chip-trailing-action__ripple::before,.mdc-deprecated-chip-trailing-action .mdc-deprecated-chip-trailing-action__ripple::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-deprecated-chip-trailing-action .mdc-deprecated-chip-trailing-action__ripple::before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}.mdc-deprecated-chip-trailing-action .mdc-deprecated-chip-trailing-action__ripple::after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}.mdc-deprecated-chip-trailing-action.mdc-ripple-upgraded .mdc-deprecated-chip-trailing-action__ripple::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale, 1));transform:scale(var(--mdc-ripple-fg-scale, 1))}.mdc-deprecated-chip-trailing-action.mdc-ripple-upgraded .mdc-depr
|
||
|
<div class="mdc-chip ${this.noText?"no-text":""}">
|
||
|
${this.hasIcon?r`<div class="mdc-chip__icon mdc-chip__icon--leading">
|
||
|
<slot name="icon"></slot>
|
||
|
</div>`:null}
|
||
|
<div class="mdc-chip__ripple"></div>
|
||
|
<span role="gridcell">
|
||
|
<span role="button" tabindex="0" class="mdc-chip__primary-action">
|
||
|
<span class="mdc-chip__text"><slot></slot></span>
|
||
|
</span>
|
||
|
</span>
|
||
|
${this.hasTrailingIcon?r`<div class="mdc-chip__icon mdc-chip__icon--trailing">
|
||
|
<slot name="trailing-icon"></slot>
|
||
|
</div>`:null}
|
||
|
</div>
|
||
|
`}},{kind:"get",static:!0,key:"styles",value:function(){return t`
|
||
|
${p(d)}
|
||
|
.mdc-chip {
|
||
|
background-color: var(
|
||
|
--ha-chip-background-color,
|
||
|
rgba(var(--rgb-primary-text-color), 0.15)
|
||
|
);
|
||
|
color: var(--ha-chip-text-color, var(--primary-text-color));
|
||
|
}
|
||
|
|
||
|
.mdc-chip.no-text {
|
||
|
padding: 0 10px;
|
||
|
}
|
||
|
|
||
|
.mdc-chip:hover {
|
||
|
color: var(--ha-chip-text-color, var(--primary-text-color));
|
||
|
}
|
||
|
|
||
|
.mdc-chip__icon--leading,
|
||
|
.mdc-chip__icon--trailing {
|
||
|
--mdc-icon-size: 18px;
|
||
|
line-height: 14px;
|
||
|
color: var(--ha-chip-icon-color, var(--ha-chip-text-color));
|
||
|
}
|
||
|
.mdc-chip.mdc-chip--selected .mdc-chip__checkmark,
|
||
|
.mdc-chip .mdc-chip__icon--leading:not(.mdc-chip__icon--leading-hidden) {
|
||
|
margin-right: -4px;
|
||
|
margin-inline-start: -4px;
|
||
|
margin-inline-end: 4px;
|
||
|
direction: var(--direction);
|
||
|
}
|
||
|
|
||
|
span[role="gridcell"] {
|
||
|
line-height: 14px;
|
||
|
}
|
||
|
|
||
|
:host {
|
||
|
outline: none;
|
||
|
}
|
||
|
`}}]}}),c);export{d as c};
|