@vanelsas/baredom 0.2.1-alpha → 0.2.3-alpha
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 +15 -1
- package/README.md +3 -3
- package/dist/base.js +215 -215
- package/dist/x-alert.js +18 -18
- package/dist/x-avatar-group.js +11 -11
- package/dist/x-avatar.js +16 -16
- package/dist/x-badge.js +11 -11
- package/dist/x-breadcrumbs.js +14 -14
- package/dist/x-button.js +16 -15
- package/dist/x-cancel-dialogue.js +17 -19
- package/dist/x-card.js +7 -7
- package/dist/x-chart.js +47 -43
- package/dist/x-checkbox.js +11 -11
- package/dist/x-chip.js +9 -9
- package/dist/x-collapse.js +10 -10
- package/dist/x-command-palette.js +30 -30
- package/dist/x-container.js +5 -5
- package/dist/x-context-menu.js +19 -18
- package/dist/x-copy.js +23 -23
- package/dist/x-currency-field.js +19 -19
- package/dist/x-date-picker.js +34 -34
- package/dist/x-divider.js +9 -9
- package/dist/x-drawer.js +11 -11
- package/dist/x-dropdown.js +9 -9
- package/dist/x-fieldset.js +6 -6
- package/dist/x-file-download.js +7 -7
- package/dist/x-form-field.js +16 -14
- package/dist/x-form.js +9 -9
- package/dist/x-grid.js +7 -7
- package/dist/x-menu-item.js +10 -10
- package/dist/x-menu.js +10 -10
- package/dist/x-modal.js +12 -12
- package/dist/x-navbar.js +12 -12
- package/dist/x-notification-center.js +9 -9
- package/dist/x-pagination.js +16 -16
- package/dist/x-popover.js +11 -11
- package/dist/x-progress-circle.js +7 -7
- package/dist/x-progress.js +8 -8
- package/dist/x-radio.js +11 -11
- package/dist/x-search-field.js +14 -14
- package/dist/x-select.js +9 -9
- package/dist/x-sidebar.js +25 -25
- package/dist/x-skeleton.js +5 -5
- package/dist/x-slider.js +16 -16
- package/dist/x-spacer.js +5 -5
- package/dist/x-spinner.js +5 -5
- package/dist/x-stat.js +9 -9
- package/dist/x-stepper.js +16 -16
- package/dist/x-switch.js +10 -10
- package/dist/x-tab.js +7 -7
- package/dist/x-table-cell.js +21 -21
- package/dist/x-table-row.js +10 -10
- package/dist/x-table.js +11 -11
- package/dist/x-tabs.js +11 -11
- package/dist/x-text-area.js +17 -17
- package/dist/x-timeline-item.js +22 -22
- package/dist/x-timeline.js +9 -9
- package/dist/x-toast.js +23 -23
- package/dist/x-toaster.js +8 -8
- package/package.json +1 -1
package/dist/x-toaster.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
3
|
-
new $APP.P(null,3,[$APP.
|
|
4
|
-
a.setAttribute("aria-label",d);a.setAttribute("data-position",c);a.__xToasterModel=b}},
|
|
5
|
-
e=a.dispatchEvent(e);$APP.n(e)&&c.target.dismiss("toaster-remove")}return null}a.addEventListener("x-toast-dismiss",b);$APP.ma(a,"__xToasterHandlers",{dismiss:b})},
|
|
6
|
-
""+$APP.S.g(b)):this.removeAttribute("position")},enumerable:!0,configurable:!0});Object.defineProperty(a,"label",{get:function(){var b=this.getAttribute("label");return $APP.n(b)?b:"Notifications"},set:function(b){return $APP.n($APP.n(b)?$APP.N(b,""):b)?this.setAttribute("label",""+$APP.S.g(b)):this.removeAttribute("label")},enumerable:!0,configurable:!0});Object.defineProperty(a,"maxToasts",{get:function(){var b=
|
|
7
|
-
null?this.removeAttribute("max-toasts"):this.setAttribute("max-toasts",""+$APP.S.g(Math.floor(b)))},enumerable:!0,configurable:!0});Object.defineProperty(a,"toast",{value:function(b){b=$APP.n(b)?b:{};var c=$APP.l(this,"__xToasterModel");c=$APP.n(c)?c:
|
|
8
|
-
"heading");$APP.n(d)&&c.setAttribute("heading",d);d=$APP.l(b,"message");$APP.n(d)&&c.setAttribute("message",d);d=$APP.l(b,"icon");$APP.n(d)&&c.setAttribute("icon",d);$APP.l(b,"dismissible")===!1&&c.setAttribute("dismissible","false");d=$APP.l(b,"timeoutMs");$APP.n(d)&&c.setAttribute("timeout-ms",""+$APP.S.g(d));$APP.n($APP.l(b,"showProgress"))&&c.setAttribute("show-progress","");this.appendChild(c);return c},writable:!0,configurable:!0})},
|
|
9
|
-
|
|
2
|
+
var ro=function(a){a=typeof a==="string"?a.trim().toLowerCase():null;return $APP.Cc(qo,a)?a:"top-end"},so=function(a){return typeof a==="string"?(a=parseInt(a.trim(),10),$APP.p(isNaN(a))&&a>0?Math.floor(a):null):null},uo=function(a){if(!$APP.n($APP.l(a,"__xToasterRefs"))){var b=a.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("slot");c.textContent=to;b.appendChild(c);b.appendChild(d);a.__xToasterRefs=new $APP.P(null,2,[$APP.rh,b,$APP.Ph,d],null)}},xo=function(a){a=
|
|
3
|
+
new $APP.P(null,3,[$APP.Gi,a.getAttribute("position"),vo,a.getAttribute("max-toasts"),$APP.ch,a.getAttribute("label")],null);var b=$APP.M(a),c=$APP.I(b,$APP.Gi);a=$APP.I(b,vo);b=$APP.I(b,$APP.ch);c=ro(c);a=so(a);return new $APP.P(null,3,[$APP.Zi,c,wo,$APP.n(a)?a:5,$APP.W,typeof b==="string"&&$APP.N(b.trim(),"")?b:"Notifications"],null)},yo=function(a){var b=xo(a);if($APP.N($APP.l(a,"__xToasterModel"),b)){b=$APP.M(b);var c=$APP.I(b,$APP.Zi),d=$APP.I(b,$APP.W);uo(a);a.setAttribute("role","region");
|
|
4
|
+
a.setAttribute("aria-label",d);a.setAttribute("data-position",c);a.__xToasterModel=b}},zo=function(a){function b(c){var d=c.detail;if($APP.N($APP.l(d,"reason"),"toaster-remove")){c.preventDefault();var e=$APP.l(d,"type");var g=$APP.l(d,"reason"),h=$APP.l(d,"heading");d=$APP.l(d,"message");e=$APP.xg(new $APP.P(null,4,[$APP.Z,$APP.n(e)?e:"info",$APP.wh,$APP.n(g)?g:"",$APP.Kh,$APP.n(h)?h:"",$APP.Kg,$APP.n(d)?d:""],null));e=new CustomEvent("x-toaster-dismiss",{detail:e,bubbles:!0,composed:!0,cancelable:!0});
|
|
5
|
+
e=a.dispatchEvent(e);$APP.n(e)&&c.target.dismiss("toaster-remove")}return null}a.addEventListener("x-toast-dismiss",b);$APP.ma(a,"__xToasterHandlers",{dismiss:b})},Ao=function(a){var b=$APP.l(a,"__xToasterHandlers");$APP.n(b)&&(b=$APP.l(b,"dismiss"),$APP.n(b)&&a.removeEventListener("x-toast-dismiss",b));a.__xToasterHandlers=null},Bo=function(a){a=a.prototype;Object.defineProperty(a,"position",{get:function(){return ro(this.getAttribute("position"))},set:function(b){return $APP.n(b)?this.setAttribute("position",
|
|
6
|
+
""+$APP.S.g(b)):this.removeAttribute("position")},enumerable:!0,configurable:!0});Object.defineProperty(a,"label",{get:function(){var b=this.getAttribute("label");return $APP.n(b)?b:"Notifications"},set:function(b){return $APP.n($APP.n(b)?$APP.N(b,""):b)?this.setAttribute("label",""+$APP.S.g(b)):this.removeAttribute("label")},enumerable:!0,configurable:!0});Object.defineProperty(a,"maxToasts",{get:function(){var b=so(this.getAttribute("max-toasts"));return $APP.n(b)?b:5},set:function(b){return b==
|
|
7
|
+
null?this.removeAttribute("max-toasts"):this.setAttribute("max-toasts",""+$APP.S.g(Math.floor(b)))},enumerable:!0,configurable:!0});Object.defineProperty(a,"toast",{value:function(b){b=$APP.n(b)?b:{};var c=$APP.l(this,"__xToasterModel");c=$APP.n(c)?c:xo(this);var d=wo.g(c);c=this.querySelectorAll("x-toast");var e=c.length;if(e>=d)for(d=e-d- -1,e=0;;)if(e<d)c[e].dismiss("toaster-remove"),e+=1;else break;c=document.createElement("x-toast");d=$APP.l(b,"type");$APP.n(d)&&c.setAttribute("type",d);d=$APP.l(b,
|
|
8
|
+
"heading");$APP.n(d)&&c.setAttribute("heading",d);d=$APP.l(b,"message");$APP.n(d)&&c.setAttribute("message",d);d=$APP.l(b,"icon");$APP.n(d)&&c.setAttribute("icon",d);$APP.l(b,"dismissible")===!1&&c.setAttribute("dismissible","false");d=$APP.l(b,"timeoutMs");$APP.n(d)&&c.setAttribute("timeout-ms",""+$APP.S.g(d));$APP.n($APP.l(b,"showProgress"))&&c.setAttribute("show-progress","");this.appendChild(c);return c},writable:!0,configurable:!0})},Do=function(){var a=class extends HTMLElement{};a.observedAttributes=
|
|
9
|
+
Co;a.prototype.connectedCallback=function(){uo(this);Ao(this);zo(this);yo(this);return null};a.prototype.disconnectedCallback=function(){Ao(this);return null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.N(c,d)&&yo(this);return null};Bo(a);return a},Eo=function(){$APP.n(customElements.get("x-toaster"))||customElements.define("x-toaster",Do());return null},wo=new $APP.K(null,"max-toasts","max-toasts",-1982289139),vo=new $APP.K(null,"max-toasts-raw","max-toasts-raw",-815087069);var Co=["position","max-toasts","label"];$APP.wd(["x-toaster-dismiss",new $APP.P(null,2,[$APP.Y,new $APP.P(null,4,[$APP.Z,$APP.X,$APP.wh,$APP.X,$APP.Kh,$APP.X,$APP.Kg,$APP.X],null),$APP.ui,!0],null)]);var qo=new $APP.R(null,new $APP.P(null,6,["top-center",null,"bottom-start",null,"bottom-end",null,"bottom-center",null,"top-end",null,"top-start",null],null),null);var to=":host{display:flex;position:fixed;z-index:var(--x-toaster-z-index,9000);gap:var(--x-toaster-gap,8px);width:max-content;max-width:var(--x-toaster-max-width,480px);box-sizing:border-box;pointer-events:none;color-scheme:light dark;}::slotted("+$APP.S.g("x-toast")+"){pointer-events:auto;}slot{display:contents;}:host([data-position\x3d'top-start']){top:var(--x-toaster-inset,16px);inset-inline-start:var(--x-toaster-inset,16px);flex-direction:column-reverse;}:host([data-position\x3d'top-center']){top:var(--x-toaster-inset,16px);left:50%;transform:translateX(-50%);flex-direction:column-reverse;align-items:center;}:host([data-position\x3d'top-end']){top:var(--x-toaster-inset,16px);inset-inline-end:var(--x-toaster-inset,16px);flex-direction:column-reverse;}:host([data-position\x3d'bottom-start']){bottom:var(--x-toaster-inset,16px);inset-inline-start:var(--x-toaster-inset,16px);flex-direction:column;}:host([data-position\x3d'bottom-center']){bottom:var(--x-toaster-inset,16px);left:50%;transform:translateX(-50%);flex-direction:column;align-items:center;}:host([data-position\x3d'bottom-end']){bottom:var(--x-toaster-inset,16px);inset-inline-end:var(--x-toaster-inset,16px);flex-direction:column;}";$APP.ka("baredom.exports.x_toaster.init",Eo);export const init=Eo;
|