@limetech/lime-elements
Version:
1 lines • 2.65 kB
JavaScript
import{r as o,h as e,H as r}from"./p-DBTJNfo7.js";const t=class{constructor(e){o(this,e),this.trigger="?",this.openDirection="top-start",this.isOpen=!1,this.openPopover=o=>{o.stopPropagation(),this.isOpen=!0},this.onPopoverClose=o=>{o.stopPropagation(),this.isOpen=!1}}render(){return e(r,{key:"a52d9b4c220e21005011449735b97599cffb542e"},e("limel-popover",{key:"8b6690894351ec32f5b982ca5d3aeac7300f5576",open:this.isOpen,onClose:this.onPopoverClose,openDirection:this.openDirection},e("button",{key:"98e5dc4abcff54df74b02c737e4889e17639ddc6",slot:"trigger",type:"button",onClick:this.openPopover,class:{"is-open":this.isOpen}},this.trigger),e("limel-help-content",{key:"10b2d483aa459403b3d922add805bf6f64ae66e3",value:this.value,readMoreLink:this.readMoreLink})))}};t.style='@charset "UTF-8";limel-popover{display:flex;--popover-surface-width:min(calc(100vw - 4rem), 22rem)}button[slot=trigger]{all:unset;transition:color var(--limel-clickable-transition-speed, 0.4s) ease, background-color var(--limel-clickable-transition-speed, 0.4s) ease, box-shadow var(--limel-clickable-transform-speed, 0.4s) ease, transform var(--limel-clickable-transform-speed, 0.4s) var(--limel-clickable-transform-timing-function, ease);cursor:pointer;color:var(--limel-theme-on-surface-color);background-color:var(--lime-elevated-surface-background-color)}button[slot=trigger]:hover,button[slot=trigger]:focus,button[slot=trigger]:focus-visible{will-change:color, background-color, box-shadow, transform}button[slot=trigger]:hover,button[slot=trigger]:focus-visible{transform:translate3d(0, 0.01rem, 0);color:rgb(var(--color-sky-dark));background-color:var(--lime-elevated-surface-background-color)}button[slot=trigger]:hover{box-shadow:var(--button-shadow-hovered)}button[slot=trigger]:active{--limel-clickable-transform-timing-function:cubic-bezier( 0.83, -0.15, 0.49, 1.16 );transform:translate3d(0, 0.05rem, 0);box-shadow:var(--button-shadow-pressed)}button[slot=trigger]:hover,button[slot=trigger]:active{--limel-clickable-transition-speed:0.2s;--limel-clickable-transform-speed:0.16s}button[slot=trigger]:focus{outline:none}button[slot=trigger]:focus-visible{outline:none;box-shadow:var(--shadow-depth-8-focused)}button[slot=trigger]{box-sizing:border-box;display:flex;align-items:center;justify-content:center;color:rgb(var(--color-sky-default));border-radius:50%;box-shadow:0 0 0 1px rgb(var(--color-sky-lighter), 0.7);width:0.875rem;height:0.875rem;font-size:0.75rem}button[slot=trigger].is-open{color:rgb(var(--color-white));background-color:rgb(var(--color-sky-default));box-shadow:var(--button-shadow-inset)}';export{t as limel_help}