@limetech/lime-elements 37.53.5 → 37.54.0
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/CHANGELOG.md +8 -0
- package/dist/cjs/limel-action-bar_4.cjs.entry.js +1 -1
- package/dist/cjs/limel-callout.cjs.entry.js +1 -1
- package/dist/cjs/limel-chip_2.cjs.entry.js +1 -1
- package/dist/cjs/limel-file-viewer.cjs.entry.js +1 -1
- package/dist/cjs/limel-file.cjs.entry.js +1 -1
- package/dist/cjs/limel-flatpickr-adapter.cjs.entry.js +1 -1
- package/dist/cjs/limel-prosemirror-adapter.cjs.entry.js +1 -1
- package/dist/cjs/limel-snackbar.cjs.entry.js +1 -1
- package/dist/cjs/{translations-83a68e56.js → translations-a73f2479.js} +13 -1
- package/dist/cjs/translations-a73f2479.js.map +1 -0
- package/dist/collection/translations/da.js +2 -0
- package/dist/collection/translations/da.js.map +1 -1
- package/dist/collection/translations/en.js +2 -0
- package/dist/collection/translations/en.js.map +1 -1
- package/dist/collection/translations/fi.js +2 -0
- package/dist/collection/translations/fi.js.map +1 -1
- package/dist/collection/translations/nl.js +2 -0
- package/dist/collection/translations/nl.js.map +1 -1
- package/dist/collection/translations/no.js +2 -0
- package/dist/collection/translations/no.js.map +1 -1
- package/dist/collection/translations/sv.js +2 -0
- package/dist/collection/translations/sv.js.map +1 -1
- package/dist/esm/limel-action-bar_4.entry.js +1 -1
- package/dist/esm/limel-callout.entry.js +1 -1
- package/dist/esm/limel-chip_2.entry.js +1 -1
- package/dist/esm/limel-file-viewer.entry.js +1 -1
- package/dist/esm/limel-file.entry.js +1 -1
- package/dist/esm/limel-flatpickr-adapter.entry.js +1 -1
- package/dist/esm/limel-prosemirror-adapter.entry.js +1 -1
- package/dist/esm/limel-snackbar.entry.js +1 -1
- package/dist/esm/{translations-5ae8ec7b.js → translations-8927471e.js} +13 -1
- package/dist/esm/translations-8927471e.js.map +1 -0
- package/dist/lime-elements/lime-elements.esm.js +1 -1
- package/dist/lime-elements/{p-70bfa812.entry.js → p-0818d7d6.entry.js} +2 -2
- package/dist/lime-elements/p-1b6c1122.js +2 -0
- package/dist/lime-elements/p-1b6c1122.js.map +1 -0
- package/dist/lime-elements/{p-6dad60c1.entry.js → p-2b06f854.entry.js} +2 -2
- package/dist/lime-elements/{p-4bd0b7fb.entry.js → p-47f7d74f.entry.js} +2 -2
- package/dist/lime-elements/{p-26a43fd9.entry.js → p-480884e6.entry.js} +5 -5
- package/dist/lime-elements/{p-947478e0.entry.js → p-58d0b6b0.entry.js} +2 -2
- package/dist/lime-elements/{p-5f0a4f80.entry.js → p-6acb5c31.entry.js} +2 -2
- package/dist/lime-elements/{p-5e2604e5.entry.js → p-81150447.entry.js} +2 -2
- package/dist/lime-elements/{p-5a035a41.entry.js → p-e6881324.entry.js} +2 -2
- package/dist/types/translations/da.d.ts +2 -0
- package/dist/types/translations/en.d.ts +2 -0
- package/dist/types/translations/fi.d.ts +2 -0
- package/dist/types/translations/nl.d.ts +2 -0
- package/dist/types/translations/no.d.ts +2 -0
- package/dist/types/translations/sv.d.ts +2 -0
- package/package.json +1 -1
- package/dist/cjs/translations-83a68e56.js.map +0 -1
- package/dist/esm/translations-5ae8ec7b.js.map +0 -1
- package/dist/lime-elements/p-29e0e5bd.js +0 -2
- package/dist/lime-elements/p-29e0e5bd.js.map +0 -1
- /package/dist/lime-elements/{p-70bfa812.entry.js.map → p-0818d7d6.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-6dad60c1.entry.js.map → p-2b06f854.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-4bd0b7fb.entry.js.map → p-47f7d74f.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-26a43fd9.entry.js.map → p-480884e6.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-947478e0.entry.js.map → p-58d0b6b0.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-5f0a4f80.entry.js.map → p-6acb5c31.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-5e2604e5.entry.js.map → p-81150447.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-5a035a41.entry.js.map → p-e6881324.entry.js.map} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as t,c as i,h as n,g as
|
|
1
|
+
import{r as t,c as i,h as n,g as s}from"./p-443111b3.js";import{t as e}from"./p-1b6c1122.js";import{_ as r,a,M as c,b as o}from"./p-2ff3f85e.js";import{c as u}from"./p-dcc97cc2.js";
|
|
2
2
|
/**
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright 2018 Google Inc.
|
|
@@ -42,7 +42,7 @@ import{r as t,c as i,h as n,g as e}from"./p-443111b3.js";import{t as s}from"./p-
|
|
|
42
42
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
43
43
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
44
44
|
* THE SOFTWARE.
|
|
45
|
-
*/var d=h.ARIA_LIVE_DELAY_MS;var m=l.ARIA_LIVE_LABEL_TEXT_ATTR;function b(t,i){if(i===void 0){i=t}var n=t.getAttribute("aria-live");var
|
|
45
|
+
*/var d=h.ARIA_LIVE_DELAY_MS;var m=l.ARIA_LIVE_LABEL_TEXT_ATTR;function b(t,i){if(i===void 0){i=t}var n=t.getAttribute("aria-live");var s=i.textContent.trim();if(!s||!n){return}t.setAttribute("aria-live","off");i.textContent="";i.innerHTML='<span style="display: inline-block; width: 0; height: 1px;"> </span>';i.setAttribute(m,s);setTimeout((function(){t.setAttribute("aria-live",n);i.removeAttribute(m);i.textContent=s}),d)}
|
|
46
46
|
/**
|
|
47
47
|
* @license
|
|
48
48
|
* Copyright 2018 Google Inc.
|
|
@@ -64,7 +64,7 @@ import{r as t,c as i,h as n,g as e}from"./p-443111b3.js";import{t as s}from"./p-
|
|
|
64
64
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
65
65
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
66
66
|
* THE SOFTWARE.
|
|
67
|
-
*/var _=f.OPENING,g=f.OPEN,k=f.CLOSING;var v=l.REASON_ACTION,p=l.REASON_DISMISS;var E=function(t){r(i,t);function i(n){var
|
|
67
|
+
*/var _=f.OPENING,g=f.OPEN,k=f.CLOSING;var v=l.REASON_ACTION,p=l.REASON_DISMISS;var E=function(t){r(i,t);function i(n){var s=t.call(this,a(a({},i.defaultAdapter),n))||this;s.opened=false;s.animationFrame=0;s.animationTimer=0;s.autoDismissTimer=0;s.autoDismissTimeoutMs=h.DEFAULT_AUTO_DISMISS_TIMEOUT_MS;s.closeOnEscape=true;return s}Object.defineProperty(i,"cssClasses",{get:function(){return f},enumerable:false,configurable:true});Object.defineProperty(i,"strings",{get:function(){return l},enumerable:false,configurable:true});Object.defineProperty(i,"numbers",{get:function(){return h},enumerable:false,configurable:true});Object.defineProperty(i,"defaultAdapter",{get:function(){return{addClass:function(){return undefined},announce:function(){return undefined},notifyClosed:function(){return undefined},notifyClosing:function(){return undefined},notifyOpened:function(){return undefined},notifyOpening:function(){return undefined},removeClass:function(){return undefined}}},enumerable:false,configurable:true});i.prototype.destroy=function(){this.clearAutoDismissTimer();cancelAnimationFrame(this.animationFrame);this.animationFrame=0;clearTimeout(this.animationTimer);this.animationTimer=0;this.adapter.removeClass(_);this.adapter.removeClass(g);this.adapter.removeClass(k)};i.prototype.open=function(){var t=this;this.clearAutoDismissTimer();this.opened=true;this.adapter.notifyOpening();this.adapter.removeClass(k);this.adapter.addClass(_);this.adapter.announce();this.runNextAnimationFrame((function(){t.adapter.addClass(g);t.animationTimer=setTimeout((function(){var i=t.getTimeoutMs();t.handleAnimationTimerEnd();t.adapter.notifyOpened();if(i!==h.INDETERMINATE){t.autoDismissTimer=setTimeout((function(){t.close(p)}),i)}}),h.SNACKBAR_ANIMATION_OPEN_TIME_MS)}))};i.prototype.close=function(t){var i=this;if(t===void 0){t=""}if(!this.opened){return}cancelAnimationFrame(this.animationFrame);this.animationFrame=0;this.clearAutoDismissTimer();this.opened=false;this.adapter.notifyClosing(t);this.adapter.addClass(f.CLOSING);this.adapter.removeClass(f.OPEN);this.adapter.removeClass(f.OPENING);clearTimeout(this.animationTimer);this.animationTimer=setTimeout((function(){i.handleAnimationTimerEnd();i.adapter.notifyClosed(t)}),h.SNACKBAR_ANIMATION_CLOSE_TIME_MS)};i.prototype.isOpen=function(){return this.opened};i.prototype.getTimeoutMs=function(){return this.autoDismissTimeoutMs};i.prototype.setTimeoutMs=function(t){var i=h.MIN_AUTO_DISMISS_TIMEOUT_MS;var n=h.MAX_AUTO_DISMISS_TIMEOUT_MS;var s=h.INDETERMINATE;if(t===h.INDETERMINATE||t<=n&&t>=i){this.autoDismissTimeoutMs=t}else{throw new Error("\n timeoutMs must be an integer in the range "+i+"–"+n+"\n (or "+s+" to disable), but got '"+t+"'")}};i.prototype.getCloseOnEscape=function(){return this.closeOnEscape};i.prototype.setCloseOnEscape=function(t){this.closeOnEscape=t};i.prototype.handleKeyDown=function(t){var i=t.key==="Escape"||t.keyCode===27;if(i&&this.getCloseOnEscape()){this.close(p)}};i.prototype.handleActionButtonClick=function(t){this.close(v)};i.prototype.handleActionIconClick=function(t){this.close(p)};i.prototype.clearAutoDismissTimer=function(){clearTimeout(this.autoDismissTimer);this.autoDismissTimer=0};i.prototype.handleAnimationTimerEnd=function(){this.animationTimer=0;this.adapter.removeClass(f.OPENING);this.adapter.removeClass(f.CLOSING)};i.prototype.runNextAnimationFrame=function(t){var i=this;cancelAnimationFrame(this.animationFrame);this.animationFrame=requestAnimationFrame((function(){i.animationFrame=0;clearTimeout(i.animationTimer);i.animationTimer=setTimeout(t,0)}))};return i}(c);
|
|
68
68
|
/**
|
|
69
69
|
* @license
|
|
70
70
|
* Copyright 2018 Google Inc.
|
|
@@ -86,5 +86,5 @@ import{r as t,c as i,h as n,g as e}from"./p-443111b3.js";import{t as s}from"./p-
|
|
|
86
86
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
87
87
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
88
88
|
* THE SOFTWARE.
|
|
89
|
-
*/var T=l.SURFACE_SELECTOR,O=l.LABEL_SELECTOR,S=l.ACTION_SELECTOR,y=l.DISMISS_SELECTOR,A=l.OPENING_EVENT,I=l.OPENED_EVENT,M=l.CLOSING_EVENT,C=l.CLOSED_EVENT;var N=function(t){r(i,t);function i(){return t!==null&&t.apply(this,arguments)||this}i.attachTo=function(t){return new i(t)};i.prototype.initialize=function(t){if(t===void 0){t=function(){return b}}this.announce=t()};i.prototype.initialSyncWithDOM=function(){var t=this;this.surfaceEl=this.root.querySelector(T);this.labelEl=this.root.querySelector(O);this.actionEl=this.root.querySelector(S);this.handleKeyDown=function(i){t.foundation.handleKeyDown(i)};this.handleSurfaceClick=function(i){var n=i.target;if(t.isActionButton(n)){t.foundation.handleActionButtonClick(i)}else if(t.isActionIcon(n)){t.foundation.handleActionIconClick(i)}};this.registerKeyDownHandler(this.handleKeyDown);this.registerSurfaceClickHandler(this.handleSurfaceClick)};i.prototype.destroy=function(){t.prototype.destroy.call(this);this.deregisterKeyDownHandler(this.handleKeyDown);this.deregisterSurfaceClickHandler(this.handleSurfaceClick)};i.prototype.open=function(){this.foundation.open()};i.prototype.close=function(t){if(t===void 0){t=""}this.foundation.close(t)};i.prototype.getDefaultFoundation=function(){var t=this;var i={addClass:function(i){t.root.classList.add(i)},announce:function(){t.announce(t.labelEl)},notifyClosed:function(i){return t.emit(C,i?{reason:i}:{})},notifyClosing:function(i){return t.emit(M,i?{reason:i}:{})},notifyOpened:function(){return t.emit(I,{})},notifyOpening:function(){return t.emit(A,{})},removeClass:function(i){return t.root.classList.remove(i)}};return new E(i)};Object.defineProperty(i.prototype,"timeoutMs",{get:function(){return this.foundation.getTimeoutMs()},set:function(t){this.foundation.setTimeoutMs(t)},enumerable:false,configurable:true});Object.defineProperty(i.prototype,"closeOnEscape",{get:function(){return this.foundation.getCloseOnEscape()},set:function(t){this.foundation.setCloseOnEscape(t)},enumerable:false,configurable:true});Object.defineProperty(i.prototype,"isOpen",{get:function(){return this.foundation.isOpen()},enumerable:false,configurable:true});Object.defineProperty(i.prototype,"labelText",{get:function(){return this.labelEl.textContent},set:function(t){this.labelEl.textContent=t},enumerable:false,configurable:true});Object.defineProperty(i.prototype,"actionButtonText",{get:function(){return this.actionEl.textContent},set:function(t){this.actionEl.textContent=t},enumerable:false,configurable:true});i.prototype.registerKeyDownHandler=function(t){this.listen("keydown",t)};i.prototype.deregisterKeyDownHandler=function(t){this.unlisten("keydown",t)};i.prototype.registerSurfaceClickHandler=function(t){this.surfaceEl.addEventListener("click",t)};i.prototype.deregisterSurfaceClickHandler=function(t){this.surfaceEl.removeEventListener("click",t)};i.prototype.isActionButton=function(t){return Boolean(u(t,S))};i.prototype.isActionIcon=function(t){return Boolean(u(t,y))};return i}(o);const w="*{box-sizing:border-box}.mdc-snackbar{top:var(--snackbar-top, auto);right:var(--snackbar-right, 0);bottom:var(--snackbar-bottom, 0);left:var(--snackbar-left, 0);display:none;position:fixed;z-index:8;padding:0.75rem;align-items:center;justify-content:center}.mdc-snackbar--opening,.mdc-snackbar--open,.mdc-snackbar--closing{display:flex}.mdc-snackbar--open .mdc-snackbar__label,.mdc-snackbar--open .mdc-snackbar__actions{visibility:visible}.mdc-snackbar--open .mdc-snackbar__surface{transform:scale(1);opacity:1}.mdc-snackbar__surface{transition:opacity 0.2s cubic-bezier(0, 0, 0.2, 1), transform 0.2s cubic-bezier(0, 0, 0.2, 1);padding:0.5rem;display:flex;align-items:center;justify-content:flex-start;gap:0.25rem;min-height:3.25rem;min-width:unset;max-width:42rem;transform:scale(0.8);opacity:0;border-radius:0.75rem;background-color:rgb(var(--contrast-1400));box-shadow:var(--shadow-depth-8), var(--shadow-depth-16)}.mdc-snackbar__label{visibility:hidden;color:rgb(var(--contrast-100));-webkit-font-smoothing:antialiased;font-size:0.8125rem;font-weight:400;padding:0 0.25rem;width:100%;flex-grow:1}.mdc-snackbar__actions{visibility:hidden;display:flex;flex-shrink:0;align-items:center;box-sizing:border-box;gap:0.5rem}.dismiss,.mdc-snackbar__actions{--lime-elevated-surface-background-color:rgb(\n var(--contrast-1300)\n )}.dismiss{--mdc-theme-on-surface:rgb(var(--contrast-100));--icon-background-color:var(--lime-elevated-surface-background-color);--fill-color:var(--mdc-theme-primary);--track-color:rgb(var(--contrast-800), 0.2);position:absolute;top:-0.9rem;left:-0.9rem;transform:scale(0.8);display:flex;align-items:center;justify-content:center}.dismiss limel-icon-button.mdc-snackbar__dismiss{transform:scale(0.8);margin:0;padding:0}.dismiss svg{position:absolute;transform:rotate(90deg);fill:transparent;stroke-dasharray:100;stroke-linecap:round}.mdc-snackbar--open .dismiss svg{animation:timeout var(--snackbar-timeout) linear forwards}@keyframes timeout{0%{stroke-width:4;stroke-dashoffset:0;opacity:1}100%{stroke-width:1;stroke-dashoffset:-100;opacity:0.7}}";const x=class{constructor(n){t(this,n);this.action=i(this,"action",7);this.hide=i(this,"hide",7);this.message=undefined;this.timeout=5e3;this.actionText=undefined;this.dismissible=true;this.multiline=undefined;this.language="en";this.handleMdcClosing=this.handleMdcClosing.bind(this)}connectedCallback(){this.initialize()}componentDidLoad(){this.initialize()}initialize(){const t=this.host.shadowRoot.querySelector(".mdc-snackbar");if(!t){return}this.mdcSnackbar=new N(t);this.mdcSnackbar.listen("MDCSnackbar:closing",this.handleMdcClosing)}disconnectedCallback(){this.mdcSnackbar.unlisten("MDCSnackbar:closing",this.handleMdcClosing);this.mdcSnackbar.destroy()}async show(){if(this.timeout){this.mdcSnackbar.timeoutMs=this.timeout}this.mdcSnackbar.labelText=this.message;this.mdcSnackbar.open()}render(){return n("aside",{class:`\n mdc-snackbar\n ${this.multiline?"mdc-snackbar--stacked":""}\n `,style:{"--snackbar-timeout":`${this.timeout}ms`}},n("div",{class:"mdc-snackbar__surface",role:"status","aria-relevant":"additions"},n("div",{class:"mdc-snackbar__label","aria-atomic":"false"}),this.renderActions(this.actionText),this.renderDismissButton(this.dismissible)))}handleMdcClosing(t){if(t.detail.reason==="action"){this.action.emit()}else{this.hide.emit()}}renderActions(t){if(!t){return}return n("div",{class:"mdc-snackbar__actions","aria-atomic":"true"},this.renderActionButton(t))}renderActionButton(t){if(!t){return}return n("limel-button",{class:"mdc-button mdc-snackbar__action",label:t})}renderDismissButton(t){if(!t){return}const i=
|
|
90
|
-
//# sourceMappingURL=p-
|
|
89
|
+
*/var T=l.SURFACE_SELECTOR,O=l.LABEL_SELECTOR,S=l.ACTION_SELECTOR,y=l.DISMISS_SELECTOR,A=l.OPENING_EVENT,I=l.OPENED_EVENT,M=l.CLOSING_EVENT,C=l.CLOSED_EVENT;var N=function(t){r(i,t);function i(){return t!==null&&t.apply(this,arguments)||this}i.attachTo=function(t){return new i(t)};i.prototype.initialize=function(t){if(t===void 0){t=function(){return b}}this.announce=t()};i.prototype.initialSyncWithDOM=function(){var t=this;this.surfaceEl=this.root.querySelector(T);this.labelEl=this.root.querySelector(O);this.actionEl=this.root.querySelector(S);this.handleKeyDown=function(i){t.foundation.handleKeyDown(i)};this.handleSurfaceClick=function(i){var n=i.target;if(t.isActionButton(n)){t.foundation.handleActionButtonClick(i)}else if(t.isActionIcon(n)){t.foundation.handleActionIconClick(i)}};this.registerKeyDownHandler(this.handleKeyDown);this.registerSurfaceClickHandler(this.handleSurfaceClick)};i.prototype.destroy=function(){t.prototype.destroy.call(this);this.deregisterKeyDownHandler(this.handleKeyDown);this.deregisterSurfaceClickHandler(this.handleSurfaceClick)};i.prototype.open=function(){this.foundation.open()};i.prototype.close=function(t){if(t===void 0){t=""}this.foundation.close(t)};i.prototype.getDefaultFoundation=function(){var t=this;var i={addClass:function(i){t.root.classList.add(i)},announce:function(){t.announce(t.labelEl)},notifyClosed:function(i){return t.emit(C,i?{reason:i}:{})},notifyClosing:function(i){return t.emit(M,i?{reason:i}:{})},notifyOpened:function(){return t.emit(I,{})},notifyOpening:function(){return t.emit(A,{})},removeClass:function(i){return t.root.classList.remove(i)}};return new E(i)};Object.defineProperty(i.prototype,"timeoutMs",{get:function(){return this.foundation.getTimeoutMs()},set:function(t){this.foundation.setTimeoutMs(t)},enumerable:false,configurable:true});Object.defineProperty(i.prototype,"closeOnEscape",{get:function(){return this.foundation.getCloseOnEscape()},set:function(t){this.foundation.setCloseOnEscape(t)},enumerable:false,configurable:true});Object.defineProperty(i.prototype,"isOpen",{get:function(){return this.foundation.isOpen()},enumerable:false,configurable:true});Object.defineProperty(i.prototype,"labelText",{get:function(){return this.labelEl.textContent},set:function(t){this.labelEl.textContent=t},enumerable:false,configurable:true});Object.defineProperty(i.prototype,"actionButtonText",{get:function(){return this.actionEl.textContent},set:function(t){this.actionEl.textContent=t},enumerable:false,configurable:true});i.prototype.registerKeyDownHandler=function(t){this.listen("keydown",t)};i.prototype.deregisterKeyDownHandler=function(t){this.unlisten("keydown",t)};i.prototype.registerSurfaceClickHandler=function(t){this.surfaceEl.addEventListener("click",t)};i.prototype.deregisterSurfaceClickHandler=function(t){this.surfaceEl.removeEventListener("click",t)};i.prototype.isActionButton=function(t){return Boolean(u(t,S))};i.prototype.isActionIcon=function(t){return Boolean(u(t,y))};return i}(o);const w="*{box-sizing:border-box}.mdc-snackbar{top:var(--snackbar-top, auto);right:var(--snackbar-right, 0);bottom:var(--snackbar-bottom, 0);left:var(--snackbar-left, 0);display:none;position:fixed;z-index:8;padding:0.75rem;align-items:center;justify-content:center}.mdc-snackbar--opening,.mdc-snackbar--open,.mdc-snackbar--closing{display:flex}.mdc-snackbar--open .mdc-snackbar__label,.mdc-snackbar--open .mdc-snackbar__actions{visibility:visible}.mdc-snackbar--open .mdc-snackbar__surface{transform:scale(1);opacity:1}.mdc-snackbar__surface{transition:opacity 0.2s cubic-bezier(0, 0, 0.2, 1), transform 0.2s cubic-bezier(0, 0, 0.2, 1);padding:0.5rem;display:flex;align-items:center;justify-content:flex-start;gap:0.25rem;min-height:3.25rem;min-width:unset;max-width:42rem;transform:scale(0.8);opacity:0;border-radius:0.75rem;background-color:rgb(var(--contrast-1400));box-shadow:var(--shadow-depth-8), var(--shadow-depth-16)}.mdc-snackbar__label{visibility:hidden;color:rgb(var(--contrast-100));-webkit-font-smoothing:antialiased;font-size:0.8125rem;font-weight:400;padding:0 0.25rem;width:100%;flex-grow:1}.mdc-snackbar__actions{visibility:hidden;display:flex;flex-shrink:0;align-items:center;box-sizing:border-box;gap:0.5rem}.dismiss,.mdc-snackbar__actions{--lime-elevated-surface-background-color:rgb(\n var(--contrast-1300)\n )}.dismiss{--mdc-theme-on-surface:rgb(var(--contrast-100));--icon-background-color:var(--lime-elevated-surface-background-color);--fill-color:var(--mdc-theme-primary);--track-color:rgb(var(--contrast-800), 0.2);position:absolute;top:-0.9rem;left:-0.9rem;transform:scale(0.8);display:flex;align-items:center;justify-content:center}.dismiss limel-icon-button.mdc-snackbar__dismiss{transform:scale(0.8);margin:0;padding:0}.dismiss svg{position:absolute;transform:rotate(90deg);fill:transparent;stroke-dasharray:100;stroke-linecap:round}.mdc-snackbar--open .dismiss svg{animation:timeout var(--snackbar-timeout) linear forwards}@keyframes timeout{0%{stroke-width:4;stroke-dashoffset:0;opacity:1}100%{stroke-width:1;stroke-dashoffset:-100;opacity:0.7}}";const x=class{constructor(n){t(this,n);this.action=i(this,"action",7);this.hide=i(this,"hide",7);this.message=undefined;this.timeout=5e3;this.actionText=undefined;this.dismissible=true;this.multiline=undefined;this.language="en";this.handleMdcClosing=this.handleMdcClosing.bind(this)}connectedCallback(){this.initialize()}componentDidLoad(){this.initialize()}initialize(){const t=this.host.shadowRoot.querySelector(".mdc-snackbar");if(!t){return}this.mdcSnackbar=new N(t);this.mdcSnackbar.listen("MDCSnackbar:closing",this.handleMdcClosing)}disconnectedCallback(){this.mdcSnackbar.unlisten("MDCSnackbar:closing",this.handleMdcClosing);this.mdcSnackbar.destroy()}async show(){if(this.timeout){this.mdcSnackbar.timeoutMs=this.timeout}this.mdcSnackbar.labelText=this.message;this.mdcSnackbar.open()}render(){return n("aside",{class:`\n mdc-snackbar\n ${this.multiline?"mdc-snackbar--stacked":""}\n `,style:{"--snackbar-timeout":`${this.timeout}ms`}},n("div",{class:"mdc-snackbar__surface",role:"status","aria-relevant":"additions"},n("div",{class:"mdc-snackbar__label","aria-atomic":"false"}),this.renderActions(this.actionText),this.renderDismissButton(this.dismissible)))}handleMdcClosing(t){if(t.detail.reason==="action"){this.action.emit()}else{this.hide.emit()}}renderActions(t){if(!t){return}return n("div",{class:"mdc-snackbar__actions","aria-atomic":"true"},this.renderActionButton(t))}renderActionButton(t){if(!t){return}return n("limel-button",{class:"mdc-button mdc-snackbar__action",label:t})}renderDismissButton(t){if(!t){return}const i=e.get("snackbar.dismiss",this.language);return n("div",{class:"dismiss"},this.renderTimeoutVisualization(),n("limel-icon-button",{class:"mdc-icon-button mdc-snackbar__dismiss",icon:"multiply",label:i}))}renderTimeoutVisualization(){return n("svg",{width:"36",height:"36",viewBox:"0 0 36 36"},n("circle",{r:"18",cx:"18",cy:"18",fill:"var(--track-color)"}),n("path",{class:"track",d:"M 18,18 m -16,0 a 16,16 0 1,0 32,0 a 16,16 0 1,0 -32,0",stroke:"var(--fill-color)"}))}get host(){return s(this)}};x.style=w;export{x as limel_snackbar};
|
|
90
|
+
//# sourceMappingURL=p-480884e6.entry.js.map
|