@luzmo/lucero 0.0.6 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/accordion/accordion-item.d.ts +2 -2
- package/components/accordion/accordion.d.ts +2 -2
- package/components/accordion/index.cjs +1 -1
- package/components/accordion/index.js +3 -3
- package/components/action-bar/index.cjs +1 -1
- package/components/action-bar/index.js +6 -6
- package/components/action-button/action-button.d.ts +4 -4
- package/components/action-button/index.cjs +1 -1
- package/components/action-button/index.js +3 -3
- package/components/action-group/action-group.d.ts +2 -2
- package/components/action-group/index.cjs +1 -1
- package/components/action-group/index.js +1 -1
- package/components/{action-group-C8YUQzt8.cjs → action-group-Uimj-MJP.cjs} +1 -1
- package/components/{action-group-B7oQXv30.js → action-group-enfc-YnW.js} +2 -2
- package/components/action-menu/index.cjs +1 -1
- package/components/action-menu/index.js +6 -6
- package/components/{async-directive-BhRGSTWB.js → async-directive-DWRUSKKF.js} +1 -1
- package/components/{async-directive-_65ULPLK.cjs → async-directive-D_Ter1F8.cjs} +1 -1
- package/components/avatar/avatar.d.ts +2 -2
- package/components/avatar/index.cjs +1 -1
- package/components/avatar/index.js +5 -5
- package/components/{base-rtxi7uaR.cjs → base-B7Pfl2if.cjs} +6 -6
- package/components/{base-CxUap9HL.js → base-CawdqE7p.js} +2 -1
- package/components/button/button-base.d.ts +2 -2
- package/components/button/button.d.ts +4 -4
- package/components/button/clear-button.d.ts +4 -4
- package/components/button/close-button.d.ts +4 -4
- package/components/button/index.cjs +1 -1
- package/components/button/index.js +6 -6
- package/components/{button-base-CgrTYVgq.js → button-base-B7v4eeRh.js} +14 -12
- package/components/{button-base-DjqSZyn2.cjs → button-base-DmjYs2s9.cjs} +2 -2
- package/components/button-group/button-group.d.ts +2 -2
- package/components/button-group/index.cjs +1 -1
- package/components/button-group/index.js +2 -2
- package/components/checkbox/checkbox.d.ts +2 -2
- package/components/checkbox/index.cjs +1 -1
- package/components/checkbox/index.js +3 -3
- package/components/{checkbox-mixin-BRluTF9s.js → checkbox-mixin-BFGTmw17.js} +2 -2
- package/components/{checkbox-mixin-iB-0ivgo.cjs → checkbox-mixin-DUhXwD46.cjs} +1 -1
- package/components/{clear-button-CyLF5dx_.js → clear-button-DgZmX5RX.js} +6 -6
- package/components/{clear-button-DFXE6MLx.cjs → clear-button-KdrF2jaV.cjs} +1 -1
- package/components/{close-button-CzpdWCWI.js → close-button-CFHQnbsK.js} +6 -6
- package/components/{close-button-CcD-aVqh.cjs → close-button-DVGUppyd.cjs} +1 -1
- package/components/color-area/index.cjs +3 -3
- package/components/color-area/index.js +5 -4
- package/components/color-field/index.cjs +1 -1
- package/components/color-field/index.js +2 -2
- package/components/color-handle/index.cjs +1 -1
- package/components/color-handle/index.js +2 -2
- package/components/color-loupe/index.cjs +1 -1
- package/components/color-loupe/index.js +1 -1
- package/components/{color-loupe-CD-dhmB1.js → color-loupe-DxcqXoJ6.js} +1 -1
- package/components/{color-loupe-BN3k1ACF.cjs → color-loupe-SskbNeMp.cjs} +1 -1
- package/components/color-menu/color-menu.d.ts +2 -2
- package/components/color-menu/index.cjs +1 -1
- package/components/color-menu/index.js +3 -3
- package/components/color-picker/color-picker.d.ts +2 -2
- package/components/color-picker/index.cjs +1 -1
- package/components/color-picker/index.js +3 -3
- package/components/color-slider/index.cjs +4 -4
- package/components/color-slider/index.js +6 -5
- package/components/{directive-helpers-C3pAxRR3.cjs → directive-helpers-TkFq2eZF.cjs} +1 -1
- package/components/{directive-helpers-D0vm0gvF.js → directive-helpers-nlQRAaQt.js} +1 -1
- package/components/divider/divider.d.ts +4 -4
- package/components/divider/index.cjs +1 -1
- package/components/divider/index.d.ts +3 -3
- package/components/divider/index.js +5 -5
- package/components/field-group/index.cjs +1 -1
- package/components/field-group/index.js +1 -1
- package/components/{field-group-DAImvhSF.js → field-group-DAhrTCfl.js} +2 -2
- package/components/{field-group-d5Hkb8UW.cjs → field-group-DSY2HUoj.cjs} +1 -1
- package/components/field-label/field-label.d.ts +4 -4
- package/components/field-label/index.cjs +1 -1
- package/components/field-label/index.d.ts +3 -3
- package/components/field-label/index.js +2 -2
- package/components/{field-label-DY9iRmRI.js → field-label-CAFfGxEL.js} +6 -6
- package/components/{field-label-D1zKXSG6.cjs → field-label-CjsQ3ujK.cjs} +2 -2
- package/components/{focusable-DyyBr-J-.cjs → focusable-DGWL1v1p.cjs} +1 -1
- package/components/{focusable-Bze9xE25.js → focusable-cj2QhwDT.js} +1 -1
- package/components/icon/index.cjs +1 -1
- package/components/icon/index.js +2 -2
- package/components/{if-defined-C-8FyBSN.cjs → if-defined-B56xGmAg.cjs} +1 -1
- package/components/{if-defined-XzWkhMhg.js → if-defined-BSAr_4u4.js} +1 -1
- package/components/{index-Ci6Jnhu4.js → index-CMvLpPKD.js} +7 -7
- package/components/{index-CNtoBntg.cjs → index-DnWavOZD.cjs} +2 -2
- package/components/index.cjs +1 -10
- package/components/index.js +145 -178
- package/components/infield-button/index.cjs +1 -1
- package/components/infield-button/index.js +3 -3
- package/components/infield-button/infield-button.d.ts +4 -4
- package/components/label/index.cjs +1 -1
- package/components/label/index.js +1 -1
- package/components/language-resolution-8yZa5r_P.js +53 -0
- package/components/language-resolution-DJzmyzZq.cjs +18 -0
- package/components/{like-anchor-DKuw8fJA.cjs → like-anchor-Bmabl9ra.cjs} +1 -1
- package/components/{like-anchor-DnsAwo_O.js → like-anchor-QBlvwFfT.js} +2 -2
- package/components/{manage-help-text-B-FXFXgT.js → manage-help-text-Cozl9Sgn.js} +2 -2
- package/components/{manage-help-text-I5aYDAKT.cjs → manage-help-text-OHXDgxyj.cjs} +1 -1
- package/components/menu/index.cjs +1 -1
- package/components/menu/index.js +1 -1
- package/components/menu/menu-divider.d.ts +2 -2
- package/components/menu/menu-item.d.ts +2 -2
- package/components/menu/menu.d.ts +2 -2
- package/components/multi-language-field/index.cjs +1 -1
- package/components/multi-language-field/index.js +3 -3
- package/components/multi-language-field/multi-language-field.d.ts +2 -2
- package/components/number-field/index.cjs +3 -3
- package/components/number-field/index.js +7 -6
- package/components/{observe-slot-text-DeSKIzvP.cjs → observe-slot-text-CrYB2Pj-.cjs} +1 -1
- package/components/{observe-slot-text-DrM71me1.js → observe-slot-text-ggb4kKgY.js} +1 -1
- package/components/overlay/abstract-overlay.d.ts +6 -6
- package/components/overlay/index.cjs +7 -7
- package/components/overlay/index.d.ts +4 -4
- package/components/overlay/index.js +11 -11
- package/components/overlay/interaction-controller.d.ts +5 -5
- package/components/overlay/loader.d.ts +2 -2
- package/components/overlay/overlay-dialog.d.ts +2 -2
- package/components/overlay/overlay-no-popover.d.ts +2 -2
- package/components/overlay/overlay-popover.d.ts +2 -2
- package/components/overlay/overlay-stack.d.ts +5 -5
- package/components/overlay/overlay-timer.d.ts +1 -1
- package/components/overlay/overlay-trigger.d.ts +5 -5
- package/components/overlay/overlay.d.ts +4 -4
- package/components/{overlay-C2Cck0Az.js → overlay-CJ9by37f.js} +48 -48
- package/components/{overlay-dn6Xe_vz.cjs → overlay-Deh6Ki6I.cjs} +2 -2
- package/components/{pending-state-BeJ7iP-O.cjs → pending-state-Do522lTd.cjs} +1 -1
- package/components/{pending-state--XOfTjzE.js → pending-state-TJj1x9xn.js} +2 -2
- package/components/picker/index.cjs +1 -1
- package/components/picker/index.js +2 -2
- package/components/picker/interaction-controller.d.ts +5 -5
- package/components/picker/picker.d.ts +6 -6
- package/components/{picker-BZAWrSDk.js → picker-833Apxe4.js} +10 -10
- package/components/{picker-8cOc-jjh.cjs → picker-DDx8ii73.cjs} +2 -2
- package/components/{platform-DQYMG7JI.js → platform-BM-uMWpX.js} +34 -19
- package/components/platform-BiXhwqk3.cjs +18 -0
- package/components/popover/index.cjs +1 -1
- package/components/popover/index.d.ts +3 -3
- package/components/popover/index.js +2 -2
- package/components/popover/popover.d.ts +5 -5
- package/components/{popover-CCzs4VH8.cjs → popover-BGOgXaka.cjs} +2 -2
- package/components/{popover-D0EliN0L.js → popover-DlkzrLpl.js} +3 -3
- package/components/progress-circle/index.cjs +1 -1
- package/components/progress-circle/index.js +1 -1
- package/components/progress-circle/progress-circle.d.ts +2 -2
- package/components/{progress-circle-_-9sAlMM.js → progress-circle-Be24kv6B.js} +3 -3
- package/components/{progress-circle-DYSSkjlY.cjs → progress-circle-NNbCMK2i.cjs} +1 -1
- package/components/radio/index.cjs +1 -1
- package/components/radio/index.js +3 -3
- package/components/radio/radio.d.ts +2 -2
- package/components/search/index.cjs +1 -1
- package/components/search/index.js +3 -3
- package/components/{sized-mixin-DcJTTohI.js → sized-mixin-BxMraZLS.js} +1 -1
- package/components/{sized-mixin-BAI6NiE2.cjs → sized-mixin-D9LkrMjb.cjs} +1 -1
- package/components/slider/index.cjs +1 -1
- package/components/slider/index.js +2 -2
- package/components/slider/slider.d.ts +2 -2
- package/components/{state-WWHLNMRG.cjs → state-C5I1gP3G.cjs} +1 -1
- package/components/{state-D8vot9IB.js → state-CYxk12SV.js} +1 -1
- package/components/{streaming-listener-BbmNyKWO.js → streaming-listener-CCalHg57.js} +18 -52
- package/components/streaming-listener-KVex1WWB.cjs +18 -0
- package/components/{style-map-CoBJRbvu.js → style-map-Ct2LiEds.js} +1 -1
- package/components/{style-map-DH0jkl7s.cjs → style-map-uMq-yDJ3.cjs} +1 -1
- package/components/swatch/index.cjs +1 -1
- package/components/swatch/index.js +4 -4
- package/components/swatch/swatch-group.d.ts +2 -2
- package/components/swatch/swatch.d.ts +2 -2
- package/components/switch/index.cjs +1 -1
- package/components/switch/index.js +4 -4
- package/components/switch/switch.d.ts +2 -2
- package/components/tags/index.cjs +1 -1
- package/components/tags/index.js +3 -3
- package/components/tags/tag.d.ts +2 -2
- package/components/tags/tags.d.ts +2 -2
- package/components/text-field/help-text.d.ts +4 -4
- package/components/text-field/index.cjs +2 -2
- package/components/text-field/index.d.ts +3 -3
- package/components/text-field/index.js +4 -4
- package/components/text-field/text-field.d.ts +2 -2
- package/components/{text-field-BU7yxiOR.cjs → text-field-5_ev9way.cjs} +1 -1
- package/components/{text-field-05QNK_Lj.js → text-field-CvKSS59x.js} +7 -7
- package/components/toast/index.cjs +1 -1
- package/components/toast/index.js +2 -2
- package/components/tooltip/index.cjs +2 -2
- package/components/tooltip/index.d.ts +3 -3
- package/components/tooltip/index.js +7 -5
- package/components/tooltip/tooltip.d.ts +6 -6
- package/components/unit-input/index.cjs +1 -1
- package/components/unit-input/index.js +3 -3
- package/components/utils.cjs +18 -0
- package/components/utils.js +42 -0
- package/custom-elements.json +1 -0
- package/index.d.ts +2 -1
- package/package.json +6 -6
- package/utils/index.d.ts +6 -0
- package/components/legend-position/index.d.ts +0 -7
- package/components/legend-position/legend-position.d.ts +0 -10
- package/components/platform-CQzYNWKq.cjs +0 -18
- package/components/streaming-listener-C2A7ZJZP.cjs +0 -18
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../base-
|
|
18
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../base-B7Pfl2if.cjs");require("../close-button-DVGUppyd.cjs");const d=require("../focus-visible-B0P9aY_G.cjs"),u=require("@luzmo/icons"),v="@media (forced-colors: active){:host{--highcontrast-toast-border-color: ButtonText;border:var(--luzmo-toast-border-width, var(--toast-border-width)) solid var(--highcontrast-toast-border-color, transparent)}}:host{box-sizing:border-box;min-block-size:var(--luzmo-toast-block-size, var(--toast-block-size));max-inline-size:var(--luzmo-toast-max-inline-size, var(--toast-max-inline-size));border-radius:var(--luzmo-toast-corner-radius, var(--toast-corner-radius));font-size:var(--luzmo-toast-font-size, var(--toast-font-size));font-weight:var(--luzmo-toast-font-weight, var(--toast-font-weight));-webkit-font-smoothing:antialiased;background-color:var(--highcontrast-toast-background-color-default, var(--luzmo-toast-background-color-default, var(--toast-background-color-default)));color:var(--highcontrast-toast-background-color-default, var(--luzmo-toast-background-color-default, var(--toast-background-color-default)));overflow-wrap:anywhere;flex-direction:row;align-items:stretch;padding-inline-start:var(--luzmo-toast-spacing-start-edge-to-text-and-icon, var(--toast-spacing-start-edge-to-text-and-icon));display:inline-flex}:host([variant=negative]){background-color:var(--highcontrast-toast-negative-background-color-default, var(--luzmo-toast-negative-background-color-default, var(--toast-negative-background-color-default)))}:host([variant=negative]),:host([variant=negative]) .closeButton:focus-visible:not(:active){color:var(--highcontrast-toast-negative-background-color-default, var(--luzmo-toast-negative-background-color-default, var(--toast-negative-background-color-default)))}:host([variant=info]){background-color:var(--highcontrast-toast-informative-background-color-default, var(--luzmo-toast-informative-background-color-default, var(--toast-informative-background-color-default)))}:host([variant=info]),:host([variant=info]) .closeButton:focus-visible:not(:active){color:var(--highcontrast-toast-informative-background-color-default, var(--luzmo-toast-informative-background-color-default, var(--toast-informative-background-color-default)))}:host([variant=positive]){background-color:var(--highcontrast-toast-positive-background-color-default, var(--luzmo-toast-positive-background-color-default, var(--toast-positive-background-color-default)))}:host([variant=positive]),:host([variant=positive]) .closeButton:focus-visible:not(:active){color:var(--highcontrast-toast-positive-background-color-default, var(--luzmo-toast-positive-background-color-default, var(--toast-positive-background-color-default)))}.type{flex-grow:0;flex-shrink:0;margin-block-start:var(--luzmo-toast-spacing-top-edge-to-icon, var(--toast-spacing-top-edge-to-icon));margin-inline-start:0;margin-inline-end:var(--luzmo-toast-spacing-icon-to-text, var(--toast-spacing-icon-to-text))}.content,.type{color:var(--highcontrast-toast-text-and-icon-color, var(--luzmo-toast-text-and-icon-color, var(--toast-text-and-icon-color)))}.content{box-sizing:border-box;line-height:var(--luzmo-toast-line-height, var(--toast-line-height));text-align:start;flex:auto;padding-block-start:calc(var(--luzmo-toast-spacing-top-edge-to-text, var(--toast-spacing-top-edge-to-text)) - var(--luzmo-toast-spacing-block-start, var(--toast-spacing-block-start)));padding-block-end:calc(var(--luzmo-toast-spacing-bottom-edge-to-text, var(--toast-spacing-bottom-edge-to-text)) - var(--luzmo-toast-spacing-block-end, var(--toast-spacing-block-end)));padding-inline-start:0;padding-inline-end:var(--luzmo-toast-spacing-text-to-action-button-horizontal, var(--toast-spacing-text-to-action-button-horizontal));display:inline-block}.content:lang(ja),.content:lang(ko),.content:lang(zh){line-height:var(--luzmo-toast-line-height-cjk, var(--toast-line-height-cjk))}.buttons{border-inline-start-color:var(--luzmo-toast-divider-color, var(--toast-divider-color));flex:none;align-items:flex-start;margin-block-start:var(--luzmo-toast-spacing-top-edge-to-divider, var(--toast-spacing-top-edge-to-divider));margin-block-end:var(--luzmo-toast-spacing-bottom-edge-to-divider, var(--toast-spacing-bottom-edge-to-divider));padding-inline-end:var(--luzmo-toast-spacing-close-button, var(--toast-spacing-close-button));display:flex}.buttons .luzmo-CloseButton{align-self:flex-start}.body{flex-wrap:wrap;flex:auto;align-self:center;align-items:center;padding-block-start:var(--luzmo-toast-spacing-block-start, var(--toast-spacing-block-start));padding-block-end:var(--luzmo-toast-spacing-block-end, var(--toast-spacing-block-end));display:flex}.body ::slotted([slot=action]){margin-inline-start:auto;margin-inline-end:var(--luzmo-toast-spacing-text-and-action-button-to-divider, var(--toast-spacing-text-and-action-button-to-divider))}.body ::slotted([slot=action]:dir(rtl)),:host([dir=rtl]) .body ::slotted([slot=action]){margin-inline-end:var(--luzmo-toast-spacing-text-and-action-button-to-divider, var(--toast-spacing-text-and-action-button-to-divider))}.body+.buttons{border-inline-start-style:solid;border-inline-start-width:1px;padding-inline-start:var(--luzmo-toast-spacing-close-button, var(--toast-spacing-close-button))}:host{--toast-background-color-default: rgb(80, 80, 80);--toast-font-weight: var(--luzmo-font-weight);--toast-font-size: var(--luzmo-font-size);--toast-corner-radius: var(--luzmo-border-radius);--toast-block-size: var(--luzmo-component-height);--toast-max-inline-size: 360px;--toast-border-width: var(--luzmo-border-width);--toast-line-height: var(--luzmo-line-height);--toast-line-height-cjk: 1.5;--toast-spacing-icon-to-text: calc( var(--luzmo-spacing-2) + var(--luzmo-spacing-1) );--toast-spacing-start-edge-to-text-and-icon: var(--luzmo-spacing-5);--toast-spacing-text-and-action-button-to-divider: var(--luzmo-spacing-5);--toast-spacing-top-edge-to-divider: var(--luzmo-spacing-3);--toast-spacing-bottom-edge-to-divider: var(--luzmo-spacing-3);--toast-spacing-top-edge-to-icon: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--toast-spacing-text-to-action-button-horizontal: var(--luzmo-spacing-5);--toast-spacing-close-button: var(--luzmo-spacing-3);--toast-spacing-block-start: var(--luzmo-spacing-3);--toast-spacing-block-end: var(--luzmo-spacing-3);--toast-spacing-top-edge-to-text: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--toast-spacing-bottom-edge-to-text: calc( var(--luzmo-spacing-4) + var(--luzmo-spacing-1) );--toast-negative-background-color-default: var(--luzmo-color-negative);--toast-positive-background-color-default: var(--luzmo-color-positive);--toast-informative-background-color-default: var(--luzmo-color-informative);--toast-text-and-icon-color: rgb(255, 255, 255);--toast-divider-color: rgba(255, 255, 255, .2)}:host{--overlay-animation-distance: var(--spacing-100);--overlay-animation-duration: var(--animation-duration-100);opacity:0;pointer-events:none;transition:transform var(--overlay-animation-duration) ease-in-out,opacity var(--overlay-animation-duration) ease-in-out,visibility 0s linear var(--overlay-animation-duration);visibility:hidden}:host([open]){opacity:1;pointer-events:auto;transition-delay:0s;visibility:visible}:host([variant=error]),:host([variant=warning]){background-color:var(--highcontrast-toast-negative-background-color-default, var(--luzmo-toast-negative-background-color-default, var(--toast-negative-background-color-default)))}:host([variant=negative]),:host([variant=negative]) .closeButton:focus-visible:not(:active),:host([variant=warning]),:host([variant=warning]) .closeButton:focus-visible:not(:active){color:var(--highcontrast-toast-negative-background-color-default, var(--luzmo-toast-negative-background-color-default, var(--toast-negative-background-color-default)))}";var g=Object.defineProperty,h=Object.getOwnPropertyDescriptor,s=(r,t,a,n)=>{for(var i=n>1?void 0:n?h(t,a):t,l=r.length-1,c;l>=0;l--)(c=r[l])&&(i=(n?c(t,a,i):c(i))||i);return n&&i&&g(t,a,i),i};const m=["negative","positive","info"];class e extends d.FocusVisiblePolyfillMixin(o.LuzmoElement){constructor(){super(...arguments),this.open=!1,this._timeout=null,this._variant="",this.countdownStart=0,this.nextCount=-1,this.doCountdown=t=>{this.countdownStart||(this.countdownStart=performance.now()),t-this.countdownStart>this._timeout?(this.shouldClose(),this.countdownStart=0):this.countdown()},this.countdown=()=>{cancelAnimationFrame(this.nextCount),this.nextCount=requestAnimationFrame(this.doCountdown)},this.holdCountdown=()=>{this.stopCountdown(),this.addEventListener("focusout",this.resumeCountdown)},this.resumeCountdown=()=>{this.removeEventListener("focusout",this.holdCountdown),this.countdown()}}static get styles(){return[o.r(v)]}set timeout(t){const n=typeof t!==null&&t>0?Math.max(6e3,t):null,i=this.timeout;n&&this.countdownStart&&(this.countdownStart=performance.now()),this._timeout=n,this.requestUpdate("timeout",i)}get timeout(){return this._timeout}set variant(t){if(t===this.variant)return;const a=this.variant;m.includes(t)?(this.setAttribute("variant",t),this._variant=t):(this.removeAttribute("variant"),this._variant=""),this.requestUpdate("variant",a)}get variant(){return this._variant}renderIcon(t,a){switch(t){case"info":return o.x`
|
|
19
19
|
<luzmo-icon
|
|
20
20
|
.icon=${u.luzmoInfoCircleOutline}
|
|
21
21
|
label=${a||"Information"}
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
|
-
import {
|
|
19
|
-
import "../close-button-
|
|
18
|
+
import { a as m, r as g, x as i, n as l } from "../base-CawdqE7p.js";
|
|
19
|
+
import "../close-button-CFHQnbsK.js";
|
|
20
20
|
import { F as v } from "../focus-visible-DBlJGoEW.js";
|
|
21
21
|
import { luzmoCheckCircleOutline as p, luzmoAlertOutline as z, luzmoInfoCircleOutline as b } from "@luzmo/icons";
|
|
22
22
|
const d = () => {
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("../base-rtxi7uaR.cjs"),m=require("../query-BL-TJj7K.cjs"),u=require("../if-defined-C-8FyBSN.cjs"),c=require("../focusable-selectors-BgFlyFcY.cjs"),h=require("../dependency-manger-C5HCkMMB.cjs"),z=require("../sized-mixin-BAI6NiE2.cjs"),d="#tooltip{pointer-events:none;visibility:hidden;opacity:0;transition:transform .13s ease-in-out,opacity .13s ease-in-out,visibility 0s linear .13s;transition:transform var(--luzmo-overlay-animation-duration, .13s) ease-in-out,opacity var(--luzmo-overlay-animation-duration, .13s) ease-in-out,visibility 0s linear var(--luzmo-overlay-animation-duration, .13s)}:host([open]) #tooltip{pointer-events:auto;visibility:visible;opacity:1;transition-delay:0s;transition-delay:var(--luzmo-overlay-animation-duration-opened, 0s)}@media (forced-colors: active){#tooltip{border:1px solid rgba(0,0,0,0)}#tip{--highcontrast-tooltip-background-color-default: CanvasText;--highcontrast-tooltip-background-color-informative: CanvasText;--highcontrast-tooltip-background-color-positive: CanvasText;--highcontrast-tooltip-background-color-negative: CanvasText;forced-color-adjust:none}}#tooltip{box-sizing:border-box;vertical-align:top;inline-size:auto;padding-inline:var(--luzmo-tooltip-spacing-inline, .688rem);border-radius:var(--luzmo-tooltip-border-radius, .313rem);block-size:auto;min-block-size:var(--luzmo-tooltip-height, 1.875rem);max-inline-size:var(--luzmo-tooltip-max-inline-size, 12.5rem);background-color:var(--highcontrast-tooltip-background-color-default, var(--luzmo-tooltip-background-color-default, rgb(109, 109, 109)));color:var(--luzmo-tooltip-content-color, white);font-size:var(--luzmo-tooltip-font-size, var(--tooltip-font-size, .938rem));font-weight:var(--luzmo-tooltip-font-weight, 400);line-height:var(--luzmo-tooltip-line-height, 1.3);word-break:break-word;-webkit-font-smoothing:antialiased;cursor:default;-webkit-user-select:none;user-select:none;flex-direction:row;align-items:center;display:inline-flex;position:relative}:host(:lang(ja)) #tooltip,:host(:lang(ko)) #tooltip,:host(:lang(zh)) #tooltip{line-height:var(--luzmo-tooltip-cjk-line-height, 1.5)}#tooltip p{margin:0}:host([variant=info]) #tooltip{background-color:var(--highcontrast-tooltip-background-color-informative, var(--luzmo-tooltip-background-color-informative, rgb(2, 101, 220)))}:host([variant=positive]) #tooltip{background-color:var(--highcontrast-tooltip-background-color-positive, var(--luzmo-tooltip-background-color-positive, rgb(0, 122, 77)))}:host([variant=negative]) #tooltip{background-color:var(--highcontrast-tooltip-background-color-negative, var(--luzmo-tooltip-background-color-negative, rgb(211, 21, 16)))}#tip{block-size:var(--luzmo-tooltip-tip-square-size, .625rem);inline-size:var(--luzmo-tooltip-tip-square-size, .625rem);inset-block-start:100%;background-color:var(--highcontrast-tooltip-background-color-default, var(--luzmo-tooltip-background-color-default, rgb(109, 109, 109)));clip-path:polygon(0 calc(0% - var(--luzmo-tooltip-tip-antialiasing-inset, .5px)),50% var(--luzmo-tooltip-tip-height-percentage, 50%),100% calc(0% - var(--luzmo-tooltip-tip-antialiasing-inset, .5px)));position:absolute;left:50%;transform:translate(-50%)}:host([variant=info]) #tooltip #tip{background-color:var(--highcontrast-tooltip-background-color-informative, var(--luzmo-tooltip-background-color-informative, rgb(2, 101, 220)))}:host([variant=positive]) #tooltip #tip{background-color:var(--highcontrast-tooltip-background-color-positive, var(--luzmo-tooltip-background-color-positive, rgb(0, 122, 77)))}:host([variant=negative]) #tooltip #tip{background-color:var(--highcontrast-tooltip-background-color-negative, var(--luzmo-tooltip-background-color-negative, rgb(211, 21, 16)))}:host([placement*=top]) #tooltip #tip,.luzmo-Tooltip--top-end #tip,.luzmo-Tooltip--top-left #tip,.luzmo-Tooltip--top-right #tip,.luzmo-Tooltip--top-start #tip{inset-block-start:100%}:host([placement*=bottom]) #tooltip #tip,.luzmo-Tooltip--bottom-end #tip,.luzmo-Tooltip--bottom-left #tip,.luzmo-Tooltip--bottom-right #tip,.luzmo-Tooltip--bottom-start #tip{clip-path:polygon(50% calc(100% - var(--luzmo-tooltip-tip-height-percentage, 50%)),0 calc(100% + var(--luzmo-tooltip-tip-antialiasing-inset, .5px)),100% calc(100% + var(--luzmo-tooltip-tip-antialiasing-inset, .5px)));inset-block:auto 100%}.luzmo-Tooltip--bottom-end #tip,.luzmo-Tooltip--bottom-left #tip,.luzmo-Tooltip--bottom-right #tip,.luzmo-Tooltip--bottom-start #tip,.luzmo-Tooltip--top-end #tip,.luzmo-Tooltip--top-left #tip,.luzmo-Tooltip--top-right #tip,.luzmo-Tooltip--top-start #tip{transform:none}.luzmo-Tooltip--bottom-left #tip,.luzmo-Tooltip--top-left #tip{inset-inline-start:var(--luzmo-tooltip-pointer-corner-spacing, .313rem)}.luzmo-Tooltip--bottom-right #tip,.luzmo-Tooltip--top-right #tip{inset-inline:auto var(--luzmo-tooltip-pointer-corner-spacing, .313rem)}.luzmo-Tooltip--bottom-start #tip,.luzmo-Tooltip--top-start #tip{inset-inline:var(--luzmo-tooltip-pointer-corner-spacing, .313rem) auto}.luzmo-Tooltip--bottom-start #tip:dir(rtl),.luzmo-Tooltip--top-start #tip:dir(rtl),:host([dir=rtl]) .luzmo-Tooltip--bottom-start #tip,:host([dir=rtl]) .luzmo-Tooltip--top-start #tip{right:var(--luzmo-tooltip-pointer-corner-spacing, .313rem);left:auto}.luzmo-Tooltip--bottom-end #tip,.luzmo-Tooltip--top-end #tip{inset-inline:auto var(--luzmo-tooltip-pointer-corner-spacing, .313rem)}.luzmo-Tooltip--bottom-end #tip:dir(rtl),.luzmo-Tooltip--top-end #tip:dir(rtl),:host([dir=rtl]) .luzmo-Tooltip--bottom-end #tip,:host([dir=rtl]) .luzmo-Tooltip--top-end #tip{left:var(--luzmo-tooltip-pointer-corner-spacing, .313rem);right:auto}.luzmo-Tooltip--end #tip,.luzmo-Tooltip--end-bottom #tip,.luzmo-Tooltip--end-top #tip,:host([placement*=left]) #tooltip #tip,.luzmo-Tooltip--left-bottom #tip,.luzmo-Tooltip--left-top #tip,:host([placement*=right]) #tooltip #tip,.luzmo-Tooltip--right-bottom #tip,.luzmo-Tooltip--right-top #tip,.luzmo-Tooltip--start #tip,.luzmo-Tooltip--start-bottom #tip,.luzmo-Tooltip--start-top #tip{inset-block-start:50%;transform:translateY(-50%)}.luzmo-Tooltip--end-bottom #tip,.luzmo-Tooltip--end-top #tip,.luzmo-Tooltip--left-bottom #tip,.luzmo-Tooltip--left-top #tip,.luzmo-Tooltip--right-bottom #tip,.luzmo-Tooltip--right-top #tip,.luzmo-Tooltip--start-bottom #tip,.luzmo-Tooltip--start-top #tip{inset-block-start:auto;transform:none}.luzmo-Tooltip--end #tip,.luzmo-Tooltip--end-bottom #tip,.luzmo-Tooltip--end-top #tip,:host([placement*=right]) #tooltip #tip,.luzmo-Tooltip--right-bottom #tip,.luzmo-Tooltip--right-top #tip{clip-path:polygon(calc(100% - var(--luzmo-tooltip-tip-height-percentage, 50%)) 50%,calc(100% + var(--luzmo-tooltip-tip-antialiasing-inset, .5px)) 100%,calc(100% + var(--luzmo-tooltip-tip-antialiasing-inset, .5px)) 0);inset-inline:auto 100%}:host([placement*=left]) #tooltip #tip,.luzmo-Tooltip--left-bottom #tip,.luzmo-Tooltip--left-top #tip,.luzmo-Tooltip--start #tip,.luzmo-Tooltip--start-bottom #tip,.luzmo-Tooltip--start-top #tip{clip-path:polygon(calc(0% - var(--luzmo-tooltip-tip-antialiasing-inset, .5px)) 0,calc(0% - var(--luzmo-tooltip-tip-antialiasing-inset, .5px)) 100%,var(--luzmo-tooltip-tip-height-percentage, 50%) 50%);inset-inline-start:100%}.luzmo-Tooltip--end-top #tip,.luzmo-Tooltip--left-top #tip,.luzmo-Tooltip--right-top #tip,.luzmo-Tooltip--start-top #tip{inset-block-start:var(--luzmo-tooltip-pointer-corner-spacing, .313rem)}.luzmo-Tooltip--end-bottom #tip,.luzmo-Tooltip--left-bottom #tip,.luzmo-Tooltip--right-bottom #tip,.luzmo-Tooltip--start-bottom #tip{inset-block-end:var(--luzmo-tooltip-pointer-corner-spacing, .313rem)}.luzmo-Tooltip--end #tip:dir(rtl),.luzmo-Tooltip--end-bottom #tip:dir(rtl),.luzmo-Tooltip--end-top #tip:dir(rtl),:host([placement*=left]) #tooltip #tip:dir(rtl),.luzmo-Tooltip--left-bottom #tip:dir(rtl),.luzmo-Tooltip--left-top #tip:dir(rtl),:host([dir=rtl]) .luzmo-Tooltip--end #tip,:host([dir=rtl]) .luzmo-Tooltip--end-bottom #tip,:host([dir=rtl]) .luzmo-Tooltip--end-top #tip,:host([dir=rtl][placement*=left]) #tooltip #tip,:host([dir=rtl]) .luzmo-Tooltip--left-bottom #tip,:host([dir=rtl]) .luzmo-Tooltip--left-top #tip{clip-path:polygon(calc(0% - var(--luzmo-tooltip-tip-antialiasing-inset, .5px)) 0,calc(0% - var(--luzmo-tooltip-tip-antialiasing-inset, .5px)) 100%,var(--luzmo-tooltip-tip-height-percentage, 50%) 50%);left:100%;right:auto}:host([placement*=right]) #tooltip #tip:dir(rtl),.luzmo-Tooltip--right-bottom #tip:dir(rtl),.luzmo-Tooltip--right-top #tip:dir(rtl),.luzmo-Tooltip--start #tip:dir(rtl),.luzmo-Tooltip--start-bottom #tip:dir(rtl),.luzmo-Tooltip--start-top #tip:dir(rtl),:host([dir=rtl][placement*=right]) #tooltip #tip,:host([dir=rtl]) .luzmo-Tooltip--right-bottom #tip,:host([dir=rtl]) .luzmo-Tooltip--right-top #tip,:host([dir=rtl]) .luzmo-Tooltip--start #tip,:host([dir=rtl]) .luzmo-Tooltip--start-bottom #tip,:host([dir=rtl]) .luzmo-Tooltip--start-top #tip{clip-path:polygon(var(--luzmo-tooltip-tip-height-percentage, 50%) 50%,calc(100% + var(--luzmo-tooltip-tip-antialiasing-inset, .5px)) 100%,calc(100% + var(--luzmo-tooltip-tip-antialiasing-inset, .5px)) 0);left:auto;right:100%}::slotted([slot=icon]){inline-size:var(--luzmo-tooltip-icon-width, 1.125rem);block-size:var(--luzmo-tooltip-icon-height, 1.125rem);flex-shrink:0;align-self:flex-start;margin-block-start:var(--luzmo-tooltip-icon-spacing-block-start, .313rem);margin-inline-start:calc(var(--luzmo-tooltip-icon-spacing-inline-start, .563rem) - var(--luzmo-tooltip-spacing-inline, .688rem));margin-inline-end:var(--luzmo-tooltip-icon-spacing-inline-end, .563rem)}#label{line-height:var(--luzmo-tooltip-line-height, 1.3);margin-block-start:var(--luzmo-tooltip-spacing-block-start, .313rem);margin-block-end:var(--luzmo-tooltip-spacing-block-end, .375rem)}#tooltip,:host([placement*=top]) #tooltip,.luzmo-Tooltip--top-end,.luzmo-Tooltip--top-left,.luzmo-Tooltip--top-right,.luzmo-Tooltip--top-start{margin-block-end:calc(var(--luzmo-tooltip-tip-block-size, .313rem) + var(--luzmo-tooltip-margin, 0rem))}:host([open]) .luzmo-Tooltip--top-end,:host([open]) .luzmo-Tooltip--top-left,:host([open]) .luzmo-Tooltip--top-right,:host([open]) .luzmo-Tooltip--top-start,:host([placement*=top][open]) #tooltip,:host([open]) #tooltip{transform:translateY(calc(var(--luzmo-tooltip-animation-distance, .313rem) * -1))}:host([placement*=bottom]) #tooltip,.luzmo-Tooltip--bottom-end,.luzmo-Tooltip--bottom-left,.luzmo-Tooltip--bottom-right,.luzmo-Tooltip--bottom-start{margin-block-start:calc(var(--luzmo-tooltip-tip-block-size, .313rem) + var(--luzmo-tooltip-margin, 0rem))}:host([open]) .luzmo-Tooltip--bottom-end,:host([open]) .luzmo-Tooltip--bottom-left,:host([open]) .luzmo-Tooltip--bottom-right,:host([open]) .luzmo-Tooltip--bottom-start,:host([placement*=bottom][open]) #tooltip{transform:translateY(var(--luzmo-tooltip-animation-distance, .313rem))}:host([placement*=right]) #tooltip,.luzmo-Tooltip--right-bottom,.luzmo-Tooltip--right-top{margin-left:calc(var(--luzmo-tooltip-tip-block-size, .313rem) + var(--luzmo-tooltip-margin, 0rem))}:host([open]) .luzmo-Tooltip--right-bottom,:host([open]) .luzmo-Tooltip--right-top,:host([placement*=right][open]) #tooltip{transform:translate(var(--luzmo-tooltip-animation-distance, .313rem))}:host([placement*=left]) #tooltip,.luzmo-Tooltip--left-bottom,.luzmo-Tooltip--left-top{margin-right:calc(var(--luzmo-tooltip-tip-block-size, .313rem) + var(--luzmo-tooltip-margin, 0rem))}:host([open]) .luzmo-Tooltip--left-bottom,:host([open]) .luzmo-Tooltip--left-top,:host([placement*=left][open]) #tooltip{transform:translate(calc(var(--luzmo-tooltip-animation-distance, .313rem) * -1))}.luzmo-Tooltip--start,.luzmo-Tooltip--start-bottom,.luzmo-Tooltip--start-top{margin-inline-end:calc(var(--luzmo-tooltip-tip-block-size, .313rem) + var(--luzmo-tooltip-margin, 0rem))}:host([open]) .luzmo-Tooltip--start-bottom,:host([open]) .luzmo-Tooltip--start-top,:host([open]) .luzmo-Tooltip--start{transform:translate(calc(var(--luzmo-tooltip-animation-distance, .313rem) * -1))}:host([open]) .luzmo-Tooltip--start-bottom:dir(rtl),:host([open]) .luzmo-Tooltip--start-top:dir(rtl),:host([open]) .luzmo-Tooltip--start:dir(rtl),:host([dir=rtl][open]) .luzmo-Tooltip--start-bottom,:host([dir=rtl][open]) .luzmo-Tooltip--start-top,:host([dir=rtl][open]) .luzmo-Tooltip--start{transform:translate(var(--luzmo-tooltip-animation-distance, .313rem))}.luzmo-Tooltip--end,.luzmo-Tooltip--end-bottom,.luzmo-Tooltip--end-top{margin-inline-start:calc(var(--luzmo-tooltip-tip-block-size, .313rem) + var(--luzmo-tooltip-margin, 0rem))}:host([open]) .luzmo-Tooltip--end-bottom,:host([open]) .luzmo-Tooltip--end-top,:host([open]) .luzmo-Tooltip--end{transform:translate(var(--luzmo-tooltip-animation-distance, .313rem))}:host([open]) .luzmo-Tooltip--end-bottom:dir(rtl),:host([open]) .luzmo-Tooltip--end-top:dir(rtl),:host([open]) .luzmo-Tooltip--end:dir(rtl),:host([dir=rtl][open]) .luzmo-Tooltip--end-bottom,:host([dir=rtl][open]) .luzmo-Tooltip--end-top,:host([dir=rtl][open]) .luzmo-Tooltip--end{transform:translate(calc(var(--luzmo-tooltip-animation-distance, .313rem) * -1))}:host{--luzmo-tooltip-background-color-default: rgb(0, 0, 0);--tooltip-font-size: var(--luzmo-font-size)}:host([size=s]){--tooltip-font-size: var(--luzmo-font-size-s)}:host([size=m]){--tooltip-font-size: var(--luzmo-font-size-m)}:host([size=l]){--tooltip-font-size: var(--luzmo-font-size-l)}:host([size=xl]){--tooltip-font-size: var(--luzmo-font-size-xl)}:host{display:contents;white-space:initial}#tooltip{inline-size:max-content}#tip{clip-path:polygon(0 -5%,50% 50%,100% -5%);width:.625rem!important;height:.625rem!important}#tip[style]{transform:none!important}:host(:not([placement*=top])) #tooltip{margin-bottom:0}:host([placement*=top]) #tooltip #tip{inset-block-start:100%}:host([placement*=bottom]) #tooltip #tip{inset-block-end:100%;clip-path:polygon(50% 50%,0 105%,100% 105%);top:auto}:host([placement*=left]) #tooltip #tip,:host([placement*=right]) #tooltip #tip{inset-block-start:50%;transform:translateY(-50%)}:host([placement*=right]) #tooltip #tip{clip-path:polygon(50% 50%,105% 100%,105% 0);inset-inline:calc(var(--luzmo-tooltip-tip-block-size, .313rem) * -2) 100%}:host([placement*=left]) #tooltip #tip{clip-path:polygon(-5% 0,-5% 100%,50% 50%);inset-inline-start:100%}luzmo-overlay:not(:defined){display:none}";var g=Object.defineProperty,b=Object.getOwnPropertyDescriptor,r=(n,t,o,i)=>{for(var p=i>1?void 0:i?b(t,o):t,a=n.length-1,s;a>=0;a--)(s=n[a])&&(p=(i?s(t,o,p):s(p))||p);return i&&p&&g(t,o,p),p};class v extends HTMLElement{constructor(){super(),this._open=!1,this._placement="top",this.addEventListener("luzmo-opened",this.redispatchEvent),this.addEventListener("luzmo-closed",this.redispatchEvent)}redispatchEvent(t){t.stopPropagation(),this.tooltip.dispatchEvent(new CustomEvent(t.type,{bubbles:t.bubbles,composed:t.composed,detail:t.detail}))}get tooltip(){return this.getRootNode().host}static get observedAttributes(){return["open","placement"]}attributeChangedCallback(t,o,i){switch(t){case"open":{this.open=i!==null;break}case"placement":{this.placement=i;break}}}set open(t){this._open=t;const{tooltip:o}=this;o&&(o.open=t)}get open(){return this._open}set placement(t){this._placement=t;const{tooltip:o}=this;o&&(o.placement=t)}get placement(){return this._placement}get tipElement(){return this.tooltip.tipElement}}customElements.get("luzmo-tooltip-openable")||customElements.define("luzmo-tooltip-openable",v);class e extends z.SizedMixin(l.LuzmoElement,{defaultSize:"s"}){constructor(){super(...arguments),this.delayed=!1,this.dependencyManager=new h.DependencyManagerController(this),this.disabled=!1,this.selfManaged=!1,this.offset=0,this.open=!1,this._variant="",this.handleOpenOverlay=()=>{this.open=!0},this.handleCloseOverlay=()=>{this.open=!1}}static get styles(){return[l.r(d)]}get variant(){return this._variant}set variant(t){if(t!==this.variant){if(["info","positive","negative"].includes(t)){this.setAttribute("variant",t),this._variant=t;return}this.removeAttribute("variant"),this._variant=""}}forwardTransitionEvent(t){this.dispatchEvent(new TransitionEvent(t.type,{bubbles:!0,composed:!0,propertyName:t.propertyName}))}get triggerElement(){var p;let t=this.assignedSlot||this,o=t.getRootNode();if(o===document)return null;let i=t.parentElement||o.host||o;for(;!((p=i==null?void 0:i.matches)!=null&&p.call(i,c.focusableSelector));){if(t=i.assignedSlot||i,o=t.getRootNode(),o===document)return null;i=t.parentElement||o.host||o}return i}render(){const t=l.x`
|
|
18
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("../base-B7Pfl2if.cjs"),m=require("../query-BL-TJj7K.cjs"),u=require("../if-defined-B56xGmAg.cjs"),c=require("../focusable-selectors-BgFlyFcY.cjs"),z=require("../dependency-manger-C5HCkMMB.cjs"),h=require("../sized-mixin-D9LkrMjb.cjs"),d="#tooltip{pointer-events:none;visibility:hidden;opacity:0;transition:transform .13s ease-in-out,opacity .13s ease-in-out,visibility 0s linear .13s;transition:transform var(--luzmo-overlay-animation-duration, .13s) ease-in-out,opacity var(--luzmo-overlay-animation-duration, .13s) ease-in-out,visibility 0s linear var(--luzmo-overlay-animation-duration, .13s)}:host([open]) #tooltip{pointer-events:auto;visibility:visible;opacity:1;transition-delay:0s;transition-delay:var(--luzmo-overlay-animation-duration-opened, 0s)}@media (forced-colors: active){#tooltip{border:1px solid rgba(0,0,0,0)}#tip{--highcontrast-tooltip-background-color-default: CanvasText;--highcontrast-tooltip-background-color-informative: CanvasText;--highcontrast-tooltip-background-color-positive: CanvasText;--highcontrast-tooltip-background-color-negative: CanvasText;forced-color-adjust:none}}#tooltip{box-sizing:border-box;vertical-align:top;inline-size:auto;padding-inline:var(--luzmo-tooltip-spacing-inline, .688rem);border-radius:var(--luzmo-tooltip-border-radius, .313rem);block-size:auto;min-block-size:var(--luzmo-tooltip-height, 1.875rem);max-inline-size:var(--luzmo-tooltip-max-inline-size, 12.5rem);background-color:var(--highcontrast-tooltip-background-color-default, var(--luzmo-tooltip-background-color-default, rgb(109, 109, 109)));color:var(--luzmo-tooltip-content-color, white);font-size:var(--luzmo-tooltip-font-size, var(--tooltip-font-size, .938rem));font-weight:var(--luzmo-tooltip-font-weight, 400);line-height:var(--luzmo-tooltip-line-height, 1.3);word-break:break-word;-webkit-font-smoothing:antialiased;cursor:default;-webkit-user-select:none;user-select:none;flex-direction:row;align-items:center;display:inline-flex;position:relative}:host(:lang(ja)) #tooltip,:host(:lang(ko)) #tooltip,:host(:lang(zh)) #tooltip{line-height:var(--luzmo-tooltip-cjk-line-height, 1.5)}#tooltip p{margin:0}:host([variant=info]) #tooltip{background-color:var(--highcontrast-tooltip-background-color-informative, var(--luzmo-tooltip-background-color-informative, rgb(2, 101, 220)))}:host([variant=positive]) #tooltip{background-color:var(--highcontrast-tooltip-background-color-positive, var(--luzmo-tooltip-background-color-positive, rgb(0, 122, 77)))}:host([variant=negative]) #tooltip{background-color:var(--highcontrast-tooltip-background-color-negative, var(--luzmo-tooltip-background-color-negative, rgb(211, 21, 16)))}#tip{block-size:var(--luzmo-tooltip-tip-square-size, .625rem);inline-size:var(--luzmo-tooltip-tip-square-size, .625rem);inset-block-start:100%;background-color:var(--highcontrast-tooltip-background-color-default, var(--luzmo-tooltip-background-color-default, rgb(109, 109, 109)));clip-path:polygon(0 calc(0% - var(--luzmo-tooltip-tip-antialiasing-inset, .5px)),50% var(--luzmo-tooltip-tip-height-percentage, 50%),100% calc(0% - var(--luzmo-tooltip-tip-antialiasing-inset, .5px)));position:absolute;left:50%;transform:translate(-50%)}:host([variant=info]) #tooltip #tip{background-color:var(--highcontrast-tooltip-background-color-informative, var(--luzmo-tooltip-background-color-informative, rgb(2, 101, 220)))}:host([variant=positive]) #tooltip #tip{background-color:var(--highcontrast-tooltip-background-color-positive, var(--luzmo-tooltip-background-color-positive, rgb(0, 122, 77)))}:host([variant=negative]) #tooltip #tip{background-color:var(--highcontrast-tooltip-background-color-negative, var(--luzmo-tooltip-background-color-negative, rgb(211, 21, 16)))}:host([placement*=top]) #tooltip #tip,.luzmo-Tooltip--top-end #tip,.luzmo-Tooltip--top-left #tip,.luzmo-Tooltip--top-right #tip,.luzmo-Tooltip--top-start #tip{inset-block-start:100%}:host([placement*=bottom]) #tooltip #tip,.luzmo-Tooltip--bottom-end #tip,.luzmo-Tooltip--bottom-left #tip,.luzmo-Tooltip--bottom-right #tip,.luzmo-Tooltip--bottom-start #tip{clip-path:polygon(50% calc(100% - var(--luzmo-tooltip-tip-height-percentage, 50%)),0 calc(100% + var(--luzmo-tooltip-tip-antialiasing-inset, .5px)),100% calc(100% + var(--luzmo-tooltip-tip-antialiasing-inset, .5px)));inset-block:auto 100%}.luzmo-Tooltip--bottom-end #tip,.luzmo-Tooltip--bottom-left #tip,.luzmo-Tooltip--bottom-right #tip,.luzmo-Tooltip--bottom-start #tip,.luzmo-Tooltip--top-end #tip,.luzmo-Tooltip--top-left #tip,.luzmo-Tooltip--top-right #tip,.luzmo-Tooltip--top-start #tip{transform:none}.luzmo-Tooltip--bottom-left #tip,.luzmo-Tooltip--top-left #tip{inset-inline-start:var(--luzmo-tooltip-pointer-corner-spacing, .313rem)}.luzmo-Tooltip--bottom-right #tip,.luzmo-Tooltip--top-right #tip{inset-inline:auto var(--luzmo-tooltip-pointer-corner-spacing, .313rem)}.luzmo-Tooltip--bottom-start #tip,.luzmo-Tooltip--top-start #tip{inset-inline:var(--luzmo-tooltip-pointer-corner-spacing, .313rem) auto}.luzmo-Tooltip--bottom-start #tip:dir(rtl),.luzmo-Tooltip--top-start #tip:dir(rtl),:host([dir=rtl]) .luzmo-Tooltip--bottom-start #tip,:host([dir=rtl]) .luzmo-Tooltip--top-start #tip{right:var(--luzmo-tooltip-pointer-corner-spacing, .313rem);left:auto}.luzmo-Tooltip--bottom-end #tip,.luzmo-Tooltip--top-end #tip{inset-inline:auto var(--luzmo-tooltip-pointer-corner-spacing, .313rem)}.luzmo-Tooltip--bottom-end #tip:dir(rtl),.luzmo-Tooltip--top-end #tip:dir(rtl),:host([dir=rtl]) .luzmo-Tooltip--bottom-end #tip,:host([dir=rtl]) .luzmo-Tooltip--top-end #tip{left:var(--luzmo-tooltip-pointer-corner-spacing, .313rem);right:auto}.luzmo-Tooltip--end #tip,.luzmo-Tooltip--end-bottom #tip,.luzmo-Tooltip--end-top #tip,:host([placement*=left]) #tooltip #tip,.luzmo-Tooltip--left-bottom #tip,.luzmo-Tooltip--left-top #tip,:host([placement*=right]) #tooltip #tip,.luzmo-Tooltip--right-bottom #tip,.luzmo-Tooltip--right-top #tip,.luzmo-Tooltip--start #tip,.luzmo-Tooltip--start-bottom #tip,.luzmo-Tooltip--start-top #tip{inset-block-start:50%;transform:translateY(-50%)}.luzmo-Tooltip--end-bottom #tip,.luzmo-Tooltip--end-top #tip,.luzmo-Tooltip--left-bottom #tip,.luzmo-Tooltip--left-top #tip,.luzmo-Tooltip--right-bottom #tip,.luzmo-Tooltip--right-top #tip,.luzmo-Tooltip--start-bottom #tip,.luzmo-Tooltip--start-top #tip{inset-block-start:auto;transform:none}.luzmo-Tooltip--end #tip,.luzmo-Tooltip--end-bottom #tip,.luzmo-Tooltip--end-top #tip,:host([placement*=right]) #tooltip #tip,.luzmo-Tooltip--right-bottom #tip,.luzmo-Tooltip--right-top #tip{clip-path:polygon(calc(100% - var(--luzmo-tooltip-tip-height-percentage, 50%)) 50%,calc(100% + var(--luzmo-tooltip-tip-antialiasing-inset, .5px)) 100%,calc(100% + var(--luzmo-tooltip-tip-antialiasing-inset, .5px)) 0);inset-inline:auto 100%}:host([placement*=left]) #tooltip #tip,.luzmo-Tooltip--left-bottom #tip,.luzmo-Tooltip--left-top #tip,.luzmo-Tooltip--start #tip,.luzmo-Tooltip--start-bottom #tip,.luzmo-Tooltip--start-top #tip{clip-path:polygon(calc(0% - var(--luzmo-tooltip-tip-antialiasing-inset, .5px)) 0,calc(0% - var(--luzmo-tooltip-tip-antialiasing-inset, .5px)) 100%,var(--luzmo-tooltip-tip-height-percentage, 50%) 50%);inset-inline-start:100%}.luzmo-Tooltip--end-top #tip,.luzmo-Tooltip--left-top #tip,.luzmo-Tooltip--right-top #tip,.luzmo-Tooltip--start-top #tip{inset-block-start:var(--luzmo-tooltip-pointer-corner-spacing, .313rem)}.luzmo-Tooltip--end-bottom #tip,.luzmo-Tooltip--left-bottom #tip,.luzmo-Tooltip--right-bottom #tip,.luzmo-Tooltip--start-bottom #tip{inset-block-end:var(--luzmo-tooltip-pointer-corner-spacing, .313rem)}.luzmo-Tooltip--end #tip:dir(rtl),.luzmo-Tooltip--end-bottom #tip:dir(rtl),.luzmo-Tooltip--end-top #tip:dir(rtl),:host([placement*=left]) #tooltip #tip:dir(rtl),.luzmo-Tooltip--left-bottom #tip:dir(rtl),.luzmo-Tooltip--left-top #tip:dir(rtl),:host([dir=rtl]) .luzmo-Tooltip--end #tip,:host([dir=rtl]) .luzmo-Tooltip--end-bottom #tip,:host([dir=rtl]) .luzmo-Tooltip--end-top #tip,:host([dir=rtl][placement*=left]) #tooltip #tip,:host([dir=rtl]) .luzmo-Tooltip--left-bottom #tip,:host([dir=rtl]) .luzmo-Tooltip--left-top #tip{clip-path:polygon(calc(0% - var(--luzmo-tooltip-tip-antialiasing-inset, .5px)) 0,calc(0% - var(--luzmo-tooltip-tip-antialiasing-inset, .5px)) 100%,var(--luzmo-tooltip-tip-height-percentage, 50%) 50%);left:100%;right:auto}:host([placement*=right]) #tooltip #tip:dir(rtl),.luzmo-Tooltip--right-bottom #tip:dir(rtl),.luzmo-Tooltip--right-top #tip:dir(rtl),.luzmo-Tooltip--start #tip:dir(rtl),.luzmo-Tooltip--start-bottom #tip:dir(rtl),.luzmo-Tooltip--start-top #tip:dir(rtl),:host([dir=rtl][placement*=right]) #tooltip #tip,:host([dir=rtl]) .luzmo-Tooltip--right-bottom #tip,:host([dir=rtl]) .luzmo-Tooltip--right-top #tip,:host([dir=rtl]) .luzmo-Tooltip--start #tip,:host([dir=rtl]) .luzmo-Tooltip--start-bottom #tip,:host([dir=rtl]) .luzmo-Tooltip--start-top #tip{clip-path:polygon(var(--luzmo-tooltip-tip-height-percentage, 50%) 50%,calc(100% + var(--luzmo-tooltip-tip-antialiasing-inset, .5px)) 100%,calc(100% + var(--luzmo-tooltip-tip-antialiasing-inset, .5px)) 0);left:auto;right:100%}::slotted([slot=icon]){inline-size:var(--luzmo-tooltip-icon-width, 1.125rem);block-size:var(--luzmo-tooltip-icon-height, 1.125rem);flex-shrink:0;align-self:flex-start;margin-block-start:var(--luzmo-tooltip-icon-spacing-block-start, .313rem);margin-inline-start:calc(var(--luzmo-tooltip-icon-spacing-inline-start, .563rem) - var(--luzmo-tooltip-spacing-inline, .688rem));margin-inline-end:var(--luzmo-tooltip-icon-spacing-inline-end, .563rem)}#label{line-height:var(--luzmo-tooltip-line-height, 1.3);margin-block-start:var(--luzmo-tooltip-spacing-block-start, .313rem);margin-block-end:var(--luzmo-tooltip-spacing-block-end, .375rem)}#tooltip,:host([placement*=top]) #tooltip,.luzmo-Tooltip--top-end,.luzmo-Tooltip--top-left,.luzmo-Tooltip--top-right,.luzmo-Tooltip--top-start{margin-block-end:calc(var(--luzmo-tooltip-tip-block-size, .313rem) + var(--luzmo-tooltip-margin, 0rem))}:host([open]) .luzmo-Tooltip--top-end,:host([open]) .luzmo-Tooltip--top-left,:host([open]) .luzmo-Tooltip--top-right,:host([open]) .luzmo-Tooltip--top-start,:host([placement*=top][open]) #tooltip,:host([open]) #tooltip{transform:translateY(calc(var(--luzmo-tooltip-animation-distance, .313rem) * -1))}:host([placement*=bottom]) #tooltip,.luzmo-Tooltip--bottom-end,.luzmo-Tooltip--bottom-left,.luzmo-Tooltip--bottom-right,.luzmo-Tooltip--bottom-start{margin-block-start:calc(var(--luzmo-tooltip-tip-block-size, .313rem) + var(--luzmo-tooltip-margin, 0rem))}:host([open]) .luzmo-Tooltip--bottom-end,:host([open]) .luzmo-Tooltip--bottom-left,:host([open]) .luzmo-Tooltip--bottom-right,:host([open]) .luzmo-Tooltip--bottom-start,:host([placement*=bottom][open]) #tooltip{transform:translateY(var(--luzmo-tooltip-animation-distance, .313rem))}:host([placement*=right]) #tooltip,.luzmo-Tooltip--right-bottom,.luzmo-Tooltip--right-top{margin-left:calc(var(--luzmo-tooltip-tip-block-size, .313rem) + var(--luzmo-tooltip-margin, 0rem))}:host([open]) .luzmo-Tooltip--right-bottom,:host([open]) .luzmo-Tooltip--right-top,:host([placement*=right][open]) #tooltip{transform:translate(var(--luzmo-tooltip-animation-distance, .313rem))}:host([placement*=left]) #tooltip,.luzmo-Tooltip--left-bottom,.luzmo-Tooltip--left-top{margin-right:calc(var(--luzmo-tooltip-tip-block-size, .313rem) + var(--luzmo-tooltip-margin, 0rem))}:host([open]) .luzmo-Tooltip--left-bottom,:host([open]) .luzmo-Tooltip--left-top,:host([placement*=left][open]) #tooltip{transform:translate(calc(var(--luzmo-tooltip-animation-distance, .313rem) * -1))}.luzmo-Tooltip--start,.luzmo-Tooltip--start-bottom,.luzmo-Tooltip--start-top{margin-inline-end:calc(var(--luzmo-tooltip-tip-block-size, .313rem) + var(--luzmo-tooltip-margin, 0rem))}:host([open]) .luzmo-Tooltip--start-bottom,:host([open]) .luzmo-Tooltip--start-top,:host([open]) .luzmo-Tooltip--start{transform:translate(calc(var(--luzmo-tooltip-animation-distance, .313rem) * -1))}:host([open]) .luzmo-Tooltip--start-bottom:dir(rtl),:host([open]) .luzmo-Tooltip--start-top:dir(rtl),:host([open]) .luzmo-Tooltip--start:dir(rtl),:host([dir=rtl][open]) .luzmo-Tooltip--start-bottom,:host([dir=rtl][open]) .luzmo-Tooltip--start-top,:host([dir=rtl][open]) .luzmo-Tooltip--start{transform:translate(var(--luzmo-tooltip-animation-distance, .313rem))}.luzmo-Tooltip--end,.luzmo-Tooltip--end-bottom,.luzmo-Tooltip--end-top{margin-inline-start:calc(var(--luzmo-tooltip-tip-block-size, .313rem) + var(--luzmo-tooltip-margin, 0rem))}:host([open]) .luzmo-Tooltip--end-bottom,:host([open]) .luzmo-Tooltip--end-top,:host([open]) .luzmo-Tooltip--end{transform:translate(var(--luzmo-tooltip-animation-distance, .313rem))}:host([open]) .luzmo-Tooltip--end-bottom:dir(rtl),:host([open]) .luzmo-Tooltip--end-top:dir(rtl),:host([open]) .luzmo-Tooltip--end:dir(rtl),:host([dir=rtl][open]) .luzmo-Tooltip--end-bottom,:host([dir=rtl][open]) .luzmo-Tooltip--end-top,:host([dir=rtl][open]) .luzmo-Tooltip--end{transform:translate(calc(var(--luzmo-tooltip-animation-distance, .313rem) * -1))}:host{--luzmo-tooltip-background-color-default: rgb(0, 0, 0);--tooltip-font-size: var(--luzmo-font-size)}:host([size=s]){--tooltip-font-size: var(--luzmo-font-size-s)}:host([size=m]){--tooltip-font-size: var(--luzmo-font-size-m)}:host([size=l]){--tooltip-font-size: var(--luzmo-font-size-l)}:host([size=xl]){--tooltip-font-size: var(--luzmo-font-size-xl)}:host{display:contents;white-space:initial}#tooltip{inline-size:max-content}#tip{clip-path:polygon(0 -5%,50% 50%,100% -5%);width:.625rem!important;height:.625rem!important}#tip[style]{transform:none!important}:host(:not([placement*=top])) #tooltip{margin-bottom:0}:host([placement*=top]) #tooltip #tip{inset-block-start:100%}:host([placement*=bottom]) #tooltip #tip{inset-block-end:100%;clip-path:polygon(50% 50%,0 105%,100% 105%);top:auto}:host([placement*=left]) #tooltip #tip,:host([placement*=right]) #tooltip #tip{inset-block-start:50%;transform:translateY(-50%)}:host([placement*=right]) #tooltip #tip{clip-path:polygon(50% 50%,105% 100%,105% 0);inset-inline:calc(var(--luzmo-tooltip-tip-block-size, .313rem) * -2) 100%}:host([placement*=left]) #tooltip #tip{clip-path:polygon(-5% 0,-5% 100%,50% 50%);inset-inline-start:100%}luzmo-overlay:not(:defined){display:none}";var g=Object.defineProperty,b=Object.getOwnPropertyDescriptor,r=(n,t,o,i)=>{for(var p=i>1?void 0:i?b(t,o):t,a=n.length-1,s;a>=0;a--)(s=n[a])&&(p=(i?s(t,o,p):s(p))||p);return i&&p&&g(t,o,p),p};class v extends HTMLElement{constructor(){super(),this._open=!1,this._placement="top",this.addEventListener("luzmo-opened",this.redispatchEvent),this.addEventListener("luzmo-closed",this.redispatchEvent)}redispatchEvent(t){t.stopPropagation(),this.tooltip.dispatchEvent(new CustomEvent(t.type,{bubbles:t.bubbles,composed:t.composed,detail:t.detail}))}get tooltip(){return this.getRootNode().host}static get observedAttributes(){return["open","placement"]}attributeChangedCallback(t,o,i){switch(t){case"open":{this.open=i!==null;break}case"placement":{this.placement=i;break}}}set open(t){this._open=t;const{tooltip:o}=this;o&&(o.open=t)}get open(){return this._open}set placement(t){this._placement=t;const{tooltip:o}=this;o&&(o.placement=t)}get placement(){return this._placement}get tipElement(){return this.tooltip.tipElement}}customElements.get("luzmo-tooltip-openable")||customElements.define("luzmo-tooltip-openable",v);class e extends h.SizedMixin(l.LuzmoElement,{defaultSize:"s"}){constructor(){super(...arguments),this.delayed=!1,this.dependencyManager=new z.DependencyManagerController(this),this.disabled=!1,this.selfManaged=!1,this.offset=0,this.open=!1,this._variant="",this.handleOpenOverlay=()=>{this.open=!0},this.handleCloseOverlay=()=>{this.open=!1}}static get styles(){return[l.r(d)]}get variant(){return this._variant}set variant(t){if(t!==this.variant){if(["info","positive","negative"].includes(t)){this.setAttribute("variant",t),this._variant=t;return}this.removeAttribute("variant"),this._variant=""}}forwardTransitionEvent(t){this.dispatchEvent(new TransitionEvent(t.type,{bubbles:!0,composed:!0,propertyName:t.propertyName}))}get triggerElement(){var p;let t=this.assignedSlot||this,o=t.getRootNode();if(o===document)return null;let i=t.parentElement||o.host||o;for(;!((p=i==null?void 0:i.matches)!=null&&p.call(i,c.focusableSelector));){if(t=i.assignedSlot||i,o=t.getRootNode(),o===document)return null;i=t.parentElement||o.host||o}return i}render(){const t=l.x`
|
|
19
19
|
<luzmo-tooltip-openable
|
|
20
20
|
id="tooltip"
|
|
21
21
|
placement=${u.o(this.placement)}
|
|
@@ -42,4 +42,4 @@
|
|
|
42
42
|
>
|
|
43
43
|
${t}
|
|
44
44
|
</luzmo-overlay>
|
|
45
|
-
`):t}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{if(!this.selfManaged)return;const t=this.overlayElement;if(t){const o=this.triggerElement;t.triggerElement=o}})}}r([l.n({type:Boolean})],e.prototype,"delayed",2);r([l.n({type:Boolean})],e.prototype,"disabled",2);r([l.n({type:Boolean,attribute:"self-managed"})],e.prototype,"selfManaged",2);r([l.n({type:Number})],e.prototype,"offset",2);r([l.n({type:Boolean,reflect:!0})],e.prototype,"open",2);r([m.e("luzmo-overlay")],e.prototype,"overlayElement",2);r([l.n({reflect:!0})],e.prototype,"placement",2);r([m.e("#tip")],e.prototype,"tipElement",2);r([l.n({type:Number})],e.prototype,"tipPadding",2);r([l.n({type:String})],e.prototype,"variant",1);customElements.get("luzmo-tooltip")||customElements.define("luzmo-tooltip",e);exports.
|
|
45
|
+
`):t}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{if(!this.selfManaged)return;const t=this.overlayElement;if(t){const o=this.triggerElement;t.triggerElement=o}})}}r([l.n({type:Boolean})],e.prototype,"delayed",2);r([l.n({type:Boolean})],e.prototype,"disabled",2);r([l.n({type:Boolean,attribute:"self-managed"})],e.prototype,"selfManaged",2);r([l.n({type:Number})],e.prototype,"offset",2);r([l.n({type:Boolean,reflect:!0})],e.prototype,"open",2);r([m.e("luzmo-overlay")],e.prototype,"overlayElement",2);r([l.n({reflect:!0})],e.prototype,"placement",2);r([m.e("#tip")],e.prototype,"tipElement",2);r([l.n({type:Number})],e.prototype,"tipPadding",2);r([l.n({type:String})],e.prototype,"variant",1);customElements.get("luzmo-tooltip")||customElements.define("luzmo-tooltip",e);exports.LuzmoTooltip=e;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export * from './tooltip';
|
|
2
|
-
import {
|
|
2
|
+
import { LuzmoTooltip } from './tooltip';
|
|
3
3
|
declare global {
|
|
4
4
|
interface HTMLElementTagNameMap {
|
|
5
|
-
'luzmo-tooltip':
|
|
5
|
+
'luzmo-tooltip': LuzmoTooltip;
|
|
6
6
|
}
|
|
7
7
|
}
|
|
8
|
-
export {
|
|
8
|
+
export { LuzmoTooltip } from './tooltip';
|
|
@@ -15,12 +15,12 @@
|
|
|
15
15
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
|
-
import {
|
|
18
|
+
import { a as z, r as d, x as s, n } from "../base-CawdqE7p.js";
|
|
19
19
|
import { e as u } from "../query-D_KR_GUc.js";
|
|
20
|
-
import { o as h } from "../if-defined-
|
|
20
|
+
import { o as h } from "../if-defined-BSAr_4u4.js";
|
|
21
21
|
import { f as g } from "../focusable-selectors-B4YgbghQ.js";
|
|
22
22
|
import { D as b } from "../dependency-manger-CEXvGQUV.js";
|
|
23
|
-
import { S as f } from "../sized-mixin-
|
|
23
|
+
import { S as f } from "../sized-mixin-BxMraZLS.js";
|
|
24
24
|
const c = () => {
|
|
25
25
|
if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
|
|
26
26
|
const p = document.createElement("style");
|
|
@@ -94,7 +94,9 @@ class x extends HTMLElement {
|
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
96
|
customElements.get("luzmo-tooltip-openable") || customElements.define("luzmo-tooltip-openable", x);
|
|
97
|
-
class i extends f(z, {
|
|
97
|
+
class i extends f(z, {
|
|
98
|
+
defaultSize: "s"
|
|
99
|
+
}) {
|
|
98
100
|
constructor() {
|
|
99
101
|
super(...arguments), this.delayed = !1, this.dependencyManager = new b(this), this.disabled = !1, this.selfManaged = !1, this.offset = 0, this.open = !1, this._variant = "", this.handleOpenOverlay = () => {
|
|
100
102
|
this.open = !0;
|
|
@@ -216,5 +218,5 @@ r([
|
|
|
216
218
|
], i.prototype, "variant", 1);
|
|
217
219
|
customElements.get("luzmo-tooltip") || customElements.define("luzmo-tooltip", i);
|
|
218
220
|
export {
|
|
219
|
-
i as
|
|
221
|
+
i as LuzmoTooltip
|
|
220
222
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { CSSResultArray, TemplateResult } from 'lit';
|
|
2
2
|
import { LuzmoElement } from '../../utils/base';
|
|
3
|
-
import {
|
|
3
|
+
import { LuzmoOverlay } from '../overlay';
|
|
4
4
|
import { Placement } from '../overlay/overlay-types';
|
|
5
|
-
declare const
|
|
6
|
-
new (...args: any[]): import("
|
|
7
|
-
prototype: import("
|
|
5
|
+
declare const LuzmoTooltip_base: typeof LuzmoElement & {
|
|
6
|
+
new (...args: any[]): import("../..").SizedElementInterface;
|
|
7
|
+
prototype: import("../..").SizedElementInterface;
|
|
8
8
|
};
|
|
9
9
|
/**
|
|
10
10
|
* @element luzmo-tooltip
|
|
@@ -12,7 +12,7 @@ declare const Tooltip_base: typeof LuzmoElement & {
|
|
|
12
12
|
* @slot icon - the icon element appearing at the start of the label
|
|
13
13
|
* @slot - the text label of the Tooltip
|
|
14
14
|
*/
|
|
15
|
-
export declare class
|
|
15
|
+
export declare class LuzmoTooltip extends LuzmoTooltip_base {
|
|
16
16
|
static get styles(): CSSResultArray;
|
|
17
17
|
/**
|
|
18
18
|
* A Tooltip that is `delayed` will its Overlay wait until a warm-up period of
|
|
@@ -34,7 +34,7 @@ export declare class Tooltip extends Tooltip_base {
|
|
|
34
34
|
selfManaged: boolean;
|
|
35
35
|
offset: number;
|
|
36
36
|
open: boolean;
|
|
37
|
-
overlayElement?:
|
|
37
|
+
overlayElement?: LuzmoOverlay;
|
|
38
38
|
/**
|
|
39
39
|
* @type {"top" | "top-start" | "top-end" | "right" | "right-start" | "right-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "left-start" | "left-end"}
|
|
40
40
|
* @attr
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../base-
|
|
18
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../base-B7Pfl2if.cjs"),h=require("../state-C5I1gP3G.cjs"),d=require("@luzmo/icons"),x=require("../style-map-uMq-yDJ3.cjs"),z="*,*:before,*:after{box-sizing:border-box}:host{display:flex;flex:1 1 auto}svg{height:.75em}.unit-input-container{width:100%;position:relative;display:flex;height:1.875rem;box-sizing:border-box;border-radius:var(--luzmo-border-radius)}.unit-input-container input{box-sizing:border-box;min-width:0;width:100%;line-height:1.6rem;color:var(--luzmo-font-color);padding-left:var(--luzmo-spacing-3);padding-right:var(--luzmo-spacing-5);outline:none;border:var(--luzmo-border-width) solid var(--luzmo-border-color);border-radius:var(--luzmo-border-radius);background:transparent;font-weight:400;text-align:right;transition:border .2s ease-in-out}.unit-input-container input:focus{border:var(--luzmo-border-width) solid var(--luzmo-primary);background:var(--luzmo-background-color-hover)}.unit-input-container input:focus~.ticks{border:var(--luzmo-border-width) solid var(--luzmo-primary)}.unit-input-container input:focus~.ticks .tick-up{border-bottom:var(--luzmo-border-width) solid var(--luzmo-primary)}.unit-input-container .unit{position:absolute;box-sizing:border-box;display:flex;align-items:center;justify-content:center;right:1.125rem;color:var(--luzmo-font-color-disabled);padding:0 var(--luzmo-spacing-2);height:100%;cursor:default;-webkit-user-select:none;user-select:none;z-index:2;font-size:80%}.unit-input-container .ticks{position:absolute;display:flex;flex-direction:column;top:0;bottom:0;right:0;width:var(--luzmo-unit-input-tick-width, 1rem);-webkit-user-select:none;user-select:none;z-index:3;border:var(--luzmo-border-width) solid var(--luzmo-border-color);border-top-right-radius:var(--luzmo-border-radius);border-bottom-right-radius:var(--luzmo-border-radius);overflow:hidden;background-color:var(--luzmo-background-color-hover)}.unit-input-container .ticks>div{flex:1 1 auto;display:flex;justify-content:center;align-items:center;overflow:hidden;color:var(--luzmo-font-color);transition:all .2s ease-in-out;cursor:pointer;position:relative}.unit-input-container .ticks>div:hover{color:var(--luzmo-font-color-hard);background:var(--background-color-alt-2)}.unit-input-container .ticks>div.disabled,.unit-input-container .ticks>div.disabled:hover{cursor:not-allowed;color:var(--luzmo-font-color-disabled)!important;background-color:var(--luzmo-background-color)}.unit-input-container .ticks>div.tick-up{border-bottom:var(--luzmo-border-width) solid var(--luzmo-border-color)}.unit-input-container.with-unit input{padding-right:2.25rem}.unit-input-container.has-error input{border-color:var(--luzmo-color-negative, red)!important}.unit-input-container.has-error .ticks{border-color:var(--luzmo-color-negative, red)!important;background-color:var(--luzmo-color-negative, red)!important}.unit-input-container.has-error .tick-up,.unit-input-container.has-error .tick-down{border-color:var(--luzmo-color-negative, red)!important;background-color:var(--luzmo-color-negative, red)!important;color:#fff!important}";var w=Object.defineProperty,s=(m,t,e,i)=>{for(var n=void 0,a=m.length-1,u;a>=0;a--)(u=m[a])&&(n=u(t,e,n)||n);return n&&w(t,e,n),n};const l={min:-99999999999,max:99999999999,step:1,default:0,debounce:250},p=class p extends o.LuzmoElement{constructor(){super(),this.isDecimal=!1,this.disabled=!1,this.readOnly=!1,this.inputWidth="",this.debounce=l.debounce,this.errors=[],this.setValue=t=>{this.waitForUpdate=!0,this.debounceTimeout&&clearTimeout(this.debounceTimeout),this.debounceTimeout=setTimeout(()=>{this.dispatchEvent(new CustomEvent("change",{detail:t,bubbles:!0,composed:!0}))},this.debounce||0)},this.setCorrectInitialValues()}transformToNumber(t,e){let i=t;return i=this.isDecimal?Number.parseFloat(t+""):Number.parseInt(t+"",10),i=Number.isNaN(i)?Number(e):Number(i),i}onInput(t){let e=new RegExp(/[^0-9+-]/g);this.isDecimal&&(e=new RegExp(/[^0-9.,+-]/g));const i=t.target.value.replace(e,"").replaceAll(",",".");t.target.value=i,this.errors=[];const n=this.isDecimal?Number.parseFloat(i+""):Number.parseInt(i+"",10);Number.isNaN(n)&&this.errors.push("Not a number"),n<this.min&&this.errors.length===0&&this.errors.push("Value is lower than minimum"),n>this.max&&this.errors.length===0&&this.errors.push("Value is higher than maximum"),this.errors.length===0?(this.validValue=n,this.value=this.validValue,this.setValue(this.value),this.setErrorStatus(!1)):this.setErrorStatus(!0)}setErrorStatus(t){var e,i;t?(e=this.renderRoot.querySelector(".unit-input-container"))==null||e.classList.add("has-error"):(this.errors=[],(i=this.renderRoot.querySelector(".unit-input-container"))==null||i.classList.remove("has-error"))}setDisabledUpDownStatus(){this.value===this.min?this.renderRoot.querySelector(".tick-down").classList.add("disabled"):this.renderRoot.querySelector(".tick-down").classList.remove("disabled"),this.value===this.max?this.renderRoot.querySelector(".tick-up").classList.add("disabled"):this.renderRoot.querySelector(".tick-up").classList.remove("disabled")}createAndSetValidValue(t){let e=this.validValue?this.transformToNumber(t,this.validValue):this.transformToNumber(t,this.default);this.max<e&&(e=this.max),this.min>e&&(e=this.min),this.validValue=e,this.value=e}setCorrectInitialValues(){this.min=this.transformToNumber(this.min,l.min),this.max=this.transformToNumber(this.max,l.max),this.step=Math.abs(this.transformToNumber(this.step,l.step)),this.min>this.max&&(this.min=this.max),this.max<this.min+this.step&&(this.max=this.min+this.step),this.default=this.transformToNumber(this.default,l.default),this.createAndSetValidValue(this.value)}onKeydown(t){!this.disabled&&(t.key==="ArrowUp"||t.key==="ArrowDown")&&this.applyStep(t,t.key==="ArrowUp")}applyStep(t,e){var i,n,a,u,b,f;if(!this.disabled){t.preventDefault();const v=((a=(n=(i=this.validValue.toString())==null?void 0:i.split("."))==null?void 0:n[1])==null?void 0:a.length)??0,g=((f=(b=(u=this.step.toString())==null?void 0:u.split("."))==null?void 0:b[1])==null?void 0:f.length)??0,y=Math.max(v,g);let c=this.validValue+(e?this.step:-this.step);c=Number.parseFloat(c.toFixed(y)),this.createAndSetValidValue(c),this.setErrorStatus(!1),this.renderRoot.querySelector("input").value=this.validValue+"",this.setValue(this.validValue),this.setDisabledUpDownStatus()}}setPaddingRightOfInput(){const t=this.renderRoot.querySelector(".unit"),e=this.renderRoot.querySelector(".ticks"),i=this.unit?`calc(${t==null?void 0:t.offsetWidth}px + ${e==null?void 0:e.offsetWidth}px)`:`calc(${e==null?void 0:e.offsetWidth}px + var(--luzmo-spacing-3))`;this.renderRoot.querySelector("input").style.paddingRight=i}updated(t){t.has("value")&&(this.setCorrectInitialValues(),this.waitForUpdate?this.waitForUpdate=!1:this.renderRoot.querySelector("input").value=this.value+"",this.setPaddingRightOfInput())}render(){return o.x`
|
|
19
19
|
<div style=${x.o(this.inputWidth?{width:this.inputWidth}:{})}>
|
|
20
20
|
<input
|
|
21
21
|
.min=${String(this.min)}
|
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
16
|
* SOFTWARE.
|
|
17
17
|
* */
|
|
18
|
-
import {
|
|
19
|
-
import { r as m } from "../state-
|
|
18
|
+
import { a as w, r as k, x as f, n as u } from "../base-CawdqE7p.js";
|
|
19
|
+
import { r as m } from "../state-CYxk12SV.js";
|
|
20
20
|
import { luzmoIcon as z, luzmoAngleUp as S, luzmoAngleDown as V } from "@luzmo/icons";
|
|
21
|
-
import { o as N } from "../style-map-
|
|
21
|
+
import { o as N } from "../style-map-Ct2LiEds.js";
|
|
22
22
|
const y = () => {
|
|
23
23
|
if (typeof document < "u" && !document.querySelector("style[data-luzmo-vars]")) {
|
|
24
24
|
const s = document.createElement("style");
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*! * Lucero - The design system for Luzmo.
|
|
2
|
+
*
|
|
3
|
+
* Copyright © 2025 Luzmo
|
|
4
|
+
* All rights reserved.
|
|
5
|
+
* Lucero (“Luzmo Design System”) must be used according to the Luzmo Terms of Service.
|
|
6
|
+
* This license allows users with a current active Luzmo account to use Lucero.
|
|
7
|
+
* This license terminates automatically if a user no longer has an active Luzmo account.
|
|
8
|
+
* Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
|
|
9
|
+
*
|
|
10
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
11
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
12
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
13
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
14
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
15
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
|
+
* SOFTWARE.
|
|
17
|
+
* */
|
|
18
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./base-B7Pfl2if.cjs"),o=require("./focus-visible-B0P9aY_G.cjs"),n=require("./focusable-DGWL1v1p.cjs"),i=require("./platform-BiXhwqk3.cjs"),s=require("./sized-mixin-D9LkrMjb.cjs"),r=require("./streaming-listener-KVex1WWB.cjs");exports.LuzmoElement=e.LuzmoElement;exports.LuzmoMixin=e.LuzmoMixin;exports.FocusVisiblePolyfillMixin=o.FocusVisiblePolyfillMixin;exports.Focusable=n.Focusable;exports.isAndroid=i.isAndroid;exports.isAppleDevice=i.isAppleDevice;exports.isChrome=i.isChrome;exports.isFirefox=i.isFirefox;exports.isIOS=i.isIOS;exports.isIPad=i.isIPad;exports.isIPhone=i.isIPhone;exports.isMac=i.isMac;exports.isSeamonkey=i.isSeamonkey;exports.isWebKit=i.isWebKit;exports.ElementSizes=s.ElementSizes;exports.SizedMixin=s.SizedMixin;exports.streamingListener=r.streamingListener;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/*! * Lucero - The design system for Luzmo.
|
|
2
|
+
*
|
|
3
|
+
* Copyright © 2025 Luzmo
|
|
4
|
+
* All rights reserved.
|
|
5
|
+
* Lucero (“Luzmo Design System”) must be used according to the Luzmo Terms of Service.
|
|
6
|
+
* This license allows users with a current active Luzmo account to use Lucero.
|
|
7
|
+
* This license terminates automatically if a user no longer has an active Luzmo account.
|
|
8
|
+
* Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
|
|
9
|
+
*
|
|
10
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
11
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
12
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
13
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
14
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
15
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
|
+
* SOFTWARE.
|
|
17
|
+
* */
|
|
18
|
+
import { a as e, L as a } from "./base-CawdqE7p.js";
|
|
19
|
+
import { F as r } from "./focus-visible-DBlJGoEW.js";
|
|
20
|
+
import { F as t } from "./focusable-cj2QhwDT.js";
|
|
21
|
+
import { j as x, d as f, e as l, h as p, c, b as d, a as F, i as S, g as b, f as u } from "./platform-BM-uMWpX.js";
|
|
22
|
+
import { E as L, S as M } from "./sized-mixin-BxMraZLS.js";
|
|
23
|
+
import { s as E } from "./streaming-listener-CCalHg57.js";
|
|
24
|
+
export {
|
|
25
|
+
L as ElementSizes,
|
|
26
|
+
r as FocusVisiblePolyfillMixin,
|
|
27
|
+
t as Focusable,
|
|
28
|
+
e as LuzmoElement,
|
|
29
|
+
a as LuzmoMixin,
|
|
30
|
+
M as SizedMixin,
|
|
31
|
+
x as isAndroid,
|
|
32
|
+
f as isAppleDevice,
|
|
33
|
+
l as isChrome,
|
|
34
|
+
p as isFirefox,
|
|
35
|
+
c as isIOS,
|
|
36
|
+
d as isIPad,
|
|
37
|
+
F as isIPhone,
|
|
38
|
+
S as isMac,
|
|
39
|
+
b as isSeamonkey,
|
|
40
|
+
u as isWebKit,
|
|
41
|
+
E as streamingListener
|
|
42
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"schemaVersion":"1.0.0","readme":"","modules":[]}
|
package/index.d.ts
CHANGED
|
@@ -20,7 +20,6 @@ export * from './components/field-label';
|
|
|
20
20
|
export * from './components/icon';
|
|
21
21
|
export * from './components/infield-button';
|
|
22
22
|
export * from './components/label';
|
|
23
|
-
export * from './components/legend-position';
|
|
24
23
|
export * from './components/menu';
|
|
25
24
|
export * from './components/multi-language-field';
|
|
26
25
|
export * from './components/number-field';
|
|
@@ -35,5 +34,7 @@ export * from './components/swatch';
|
|
|
35
34
|
export * from './components/switch';
|
|
36
35
|
export * from './components/tags';
|
|
37
36
|
export * from './components/text-field';
|
|
37
|
+
export * from './components/toast';
|
|
38
38
|
export * from './components/tooltip';
|
|
39
39
|
export * from './components/unit-input';
|
|
40
|
+
export * from './utils';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@luzmo/lucero",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.8",
|
|
4
4
|
"homepage": "https://luzmo.com",
|
|
5
5
|
"description": "Lucero - The design system for Luzmo",
|
|
6
6
|
"type": "module",
|
|
@@ -123,11 +123,6 @@
|
|
|
123
123
|
"import": "./components/label/index.js",
|
|
124
124
|
"require": "./components/label/index.cjs"
|
|
125
125
|
},
|
|
126
|
-
"./legend-position": {
|
|
127
|
-
"types": "./components/legend-position/index.d.ts",
|
|
128
|
-
"import": "./components/legend-position/index.js",
|
|
129
|
-
"require": "./components/legend-position/index.cjs"
|
|
130
|
-
},
|
|
131
126
|
"./menu": {
|
|
132
127
|
"types": "./components/menu/index.d.ts",
|
|
133
128
|
"import": "./components/menu/index.js",
|
|
@@ -212,6 +207,11 @@
|
|
|
212
207
|
"types": "./components/unit-input/index.d.ts",
|
|
213
208
|
"import": "./components/unit-input/index.js",
|
|
214
209
|
"require": "./components/unit-input/index.cjs"
|
|
210
|
+
},
|
|
211
|
+
"./utils": {
|
|
212
|
+
"types": "./utils/index.d.ts",
|
|
213
|
+
"import": "./utils/index.js",
|
|
214
|
+
"require": "./utils/index.cjs"
|
|
215
215
|
}
|
|
216
216
|
},
|
|
217
217
|
"keywords": [
|
package/utils/index.d.ts
ADDED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { LuzmoElement } from '../../utils/base';
|
|
2
|
-
export declare class LuzmoLegendPosition extends LuzmoElement {
|
|
3
|
-
static styles: import("lit").CSSResult;
|
|
4
|
-
value: string;
|
|
5
|
-
disabled: boolean;
|
|
6
|
-
disabledPositions: string[];
|
|
7
|
-
private positions;
|
|
8
|
-
private setPosition;
|
|
9
|
-
render(): import("lit-html").TemplateResult<1>[];
|
|
10
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/*! * Lucero - The design system for Luzmo.
|
|
2
|
-
*
|
|
3
|
-
* Copyright © 2025 Luzmo
|
|
4
|
-
* All rights reserved.
|
|
5
|
-
* Lucero (“Luzmo Design System”) must be used according to the Luzmo Terms of Service.
|
|
6
|
-
* This license allows users with a current active Luzmo account to use Lucero.
|
|
7
|
-
* This license terminates automatically if a user no longer has an active Luzmo account.
|
|
8
|
-
* Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
|
|
9
|
-
*
|
|
10
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
11
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
12
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
13
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
14
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
15
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
|
-
* SOFTWARE.
|
|
17
|
-
* */
|
|
18
|
-
"use strict";function i(n){return typeof window<"u"&&window.navigator!=null?n.test(window.navigator.userAgent):!1}function t(n){return typeof window<"u"&&window.navigator!=null?n.test(window.navigator.platform):!1}function o(){return t(/^Mac/)}function e(){return t(/^iPhone/)}function r(){return t(/^iPad/)||o()&&navigator.maxTouchPoints>1}function u(){return e()||r()}function s(){return i(/Chrome/)}function a(){return i(/AppleWebKit/)&&!s()}function d(){return i(/Android/)}exports.isAndroid=d;exports.isIOS=u;exports.isIPhone=e;exports.isWebKit=a;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/*! * Lucero - The design system for Luzmo.
|
|
2
|
-
*
|
|
3
|
-
* Copyright © 2025 Luzmo
|
|
4
|
-
* All rights reserved.
|
|
5
|
-
* Lucero (“Luzmo Design System”) must be used according to the Luzmo Terms of Service.
|
|
6
|
-
* This license allows users with a current active Luzmo account to use Lucero.
|
|
7
|
-
* This license terminates automatically if a user no longer has an active Luzmo account.
|
|
8
|
-
* Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
|
|
9
|
-
*
|
|
10
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
11
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
12
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
13
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
14
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
15
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
16
|
-
* SOFTWARE.
|
|
17
|
-
* */
|
|
18
|
-
"use strict";const l=require("./base-rtxi7uaR.cjs"),o=require("./async-directive-_65ULPLK.cjs"),m=require("./directive-C7oCP5Bh.cjs"),a=Symbol("language resolver updated");class u{constructor(e){this.language=document.documentElement.lang||navigator.language,this.host=e,this.host.addController(this)}hostConnected(){this.resolveLanguage()}hostDisconnected(){var e;(e=this.unsubscribe)==null||e.call(this)}resolveLanguage(){const e=new CustomEvent("luzmo-language-context",{bubbles:!0,composed:!0,detail:{callback:(t,s)=>{const n=this.language;this.language=t,this.unsubscribe=s,this.host.requestUpdate(a,n)}},cancelable:!0});this.host.dispatchEvent(e)}}const i=["",()=>{}];class c extends o.f{constructor(){super(...arguments),this.start=i,this.streamInside=i,this.end=i,this.streamOutside=i,this.state="off",this.handleStart=e=>{this.clearStream(),this.callHandler(this.start[1],e),!e.defaultPrevented&&(this.removeListeners(),this.addListeners("on"))},this.handleInside=e=>{this.handleStream(this.streamInside[1],e)},this.handleEnd=e=>{this.clearStream(),this.callHandler(this.end[1],e),this.removeListeners(),this.addListeners("off")},this.handleOutside=e=>{this.handleStream(this.streamOutside[1],e)}}render(e){return l.E}update(e,[{start:t,end:s,streamInside:n=i,streamOutside:d=i}]){var r;this.element!==e.element&&(this.element=e.element,this.removeListeners()),this.host=((r=e.options)==null?void 0:r.host)||this.element,this.start=t,this.end=s,this.streamInside=n,this.streamOutside=d,this.addListeners()}addListeners(e){this.state=e||this.state,this.state==="off"?(this.addListener(this.streamOutside[0],this.handleOutside),this.addListener(this.start[0],this.handleStart)):this.state==="on"&&(this.addListener(this.streamInside[0],this.handleInside),this.addListener(this.end[0],this.handleEnd))}callHandler(e,t){typeof e=="function"?e.call(this.host,t):e.handleEvent(t)}handleStream(e,t){this.stream||(this.callHandler(e,t),this.stream=requestAnimationFrame(()=>{this.stream=void 0}))}clearStream(){this.stream!=null&&(cancelAnimationFrame(this.stream),this.stream=void 0)}addListener(e,t){Array.isArray(e)?e.map(s=>{this.element.addEventListener(s,t)}):this.element.addEventListener(e,t)}removeListener(e,t){Array.isArray(e)?e.map(s=>{this.element.removeEventListener(s,t)}):this.element.removeEventListener(e,t)}removeListeners(){this.removeListener(this.start[0],this.handleStart),this.removeListener(this.streamInside[0],this.handleInside),this.removeListener(this.end[0],this.handleEnd),this.removeListener(this.streamOutside[0],this.handleOutside)}disconnected(){this.removeListeners()}reconnected(){this.addListeners()}}const L=m.e(c);exports.LanguageResolutionController=u;exports.languageResolverUpdatedSymbol=a;exports.streamingListener=L;
|