@vanelsas/baredom 0.2.3-alpha → 1.0.0-rc.1
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 -1
- package/README.md +4 -4
- package/dist/base.js +349 -346
- package/dist/x-alert.js +19 -19
- package/dist/x-avatar-group.js +11 -11
- package/dist/x-avatar.js +17 -17
- package/dist/x-badge.js +11 -11
- package/dist/x-breadcrumbs.js +14 -14
- package/dist/x-button.js +15 -15
- package/dist/x-cancel-dialogue.js +16 -16
- package/dist/x-card.js +7 -7
- package/dist/x-chart.js +47 -47
- package/dist/x-checkbox.js +11 -11
- package/dist/x-chip.js +8 -8
- package/dist/x-collapse.js +12 -12
- package/dist/x-command-palette.js +31 -31
- package/dist/x-container.js +6 -6
- package/dist/x-context-menu.js +20 -20
- package/dist/x-copy.js +22 -23
- package/dist/x-currency-field.js +22 -20
- package/dist/x-date-picker.js +42 -36
- package/dist/x-divider.js +13 -10
- 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 +15 -15
- package/dist/x-form.js +10 -10
- 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 +13 -12
- package/dist/x-notification-center.js +10 -9
- package/dist/x-pagination.js +16 -16
- package/dist/x-popover.js +14 -11
- package/dist/x-progress-circle.js +9 -9
- package/dist/x-progress.js +11 -10
- package/dist/x-radio.js +11 -11
- package/dist/x-search-field.js +14 -14
- package/dist/x-select.js +10 -10
- package/dist/x-sidebar.js +17 -26
- package/dist/x-skeleton.js +6 -6
- 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 +12 -9
- package/dist/x-stepper.js +16 -16
- package/dist/x-switch.js +10 -10
- package/dist/x-tab.js +8 -8
- package/dist/x-table-cell.js +23 -23
- package/dist/x-table-row.js +10 -10
- package/dist/x-table.js +16 -15
- package/dist/x-tabs.js +12 -11
- package/dist/x-text-area.js +17 -17
- package/dist/x-timeline-item.js +23 -23
- 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-search-field.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
3
|
-
"input");b=$APP.l(b,"clear");var d=new $APP.
|
|
4
|
-
k:"";m=$APP.n(m)?m:"";q=$APP.
|
|
5
|
-
$APP.l(a,"__xSearchFieldInternals");return $APP.n(b)?
|
|
6
|
-
{name:e,value:d},!1)}return null}},
|
|
7
|
-
b=function(){var d=a.getAttribute("name");return $APP.n(d)?d:""}();return $APP.n(function(){var d=a.hasAttribute("required");return $APP.n(d)?$APP.
|
|
8
|
-
"__xSearchFieldInternals");$APP.n(e)&&(e.setFormValue(""),
|
|
9
|
-
"click"));a.__xSearchFieldHandlers=null;return}}return null},
|
|
10
|
-
"value",{configurable:!0,enumerable:!0,get:function(){var b=$APP.l(this,"__xSearchFieldRefs");if($APP.n(b))return $APP.l(b,"input").value;b=this.getAttribute("value");return $APP.n(b)?b:""},set:function(b){b=b!=null&&$APP.
|
|
11
|
-
|
|
2
|
+
var ol=function(a,b,c){return $APP.n(c)?a.setAttribute(b,""):a.removeAttribute(b)},pl=function(a,b,c){a=$APP.C.h("",a.value);c=c.hasAttribute("disabled");$APP.n(a?a:c)?b.classList.add("clear-hidden"):b.classList.remove("clear-hidden")},ql=function(a,b,c){a=a.hasAttribute("required");var d=c.value;return $APP.n($APP.n(a)?$APP.C.h(d,""):a)?b.setValidity({valueMissing:!0},"Please fill in this field.",c):b.setValidity({},"",c)},sl=function(a){var b=$APP.l(a,"__xSearchFieldRefs");if($APP.n(b)){var c=$APP.l(b,
|
|
3
|
+
"input");b=$APP.l(b,"clear");var d=new $APP.Q(null,7,[$APP.Dh,a.getAttribute("name"),$APP.yi,a.getAttribute("value"),$APP.ph,a.getAttribute("placeholder"),$APP.Wg,a.getAttribute("label"),$APP.Sh,a.hasAttribute("disabled"),$APP.ug,a.hasAttribute("required"),$APP.Vg,a.getAttribute("autocomplete")],null);var e=$APP.N(d),g=$APP.I(e,$APP.Dh),h=$APP.I(e,$APP.yi),k=$APP.I(e,$APP.ph),m=$APP.I(e,$APP.Wg),q=$APP.I(e,$APP.Sh);d=$APP.I(e,$APP.ug);e=$APP.I(e,$APP.Vg);g=$APP.n(g)?g:"";h=$APP.n(h)?h:"";k=$APP.n(k)?
|
|
4
|
+
k:"";m=$APP.n(m)?m:"";q=$APP.K(q);d=$APP.K(d);e=typeof e==="string"&&$APP.yc(rl,e)?e:"off";d=new $APP.Q(null,7,[$APP.ai,g,$APP.U,h,$APP.vi,k,$APP.W,m,$APP.V,q,$APP.Tg,d,$APP.gi,e],null);c.name=$APP.ai.g(d);c.placeholder=$APP.vi.g(d);c.disabled=$APP.V.g(d);c.required=$APP.Tg.g(d);c.autocomplete=$APP.gi.g(d);e=$APP.W.g(d);$APP.n($APP.n(e)?$APP.O(e,""):e)?c.setAttribute("aria-label",e):c.removeAttribute("aria-label");d=$APP.n($APP.Tg.g(d))?"true":"false";c.setAttribute("aria-required",d);pl(c,b,a);b=
|
|
5
|
+
$APP.l(a,"__xSearchFieldInternals");return $APP.n(b)?ql(a,b,c):null}return null},tl=function(a,b,c,d){return a.dispatchEvent(new CustomEvent(b,{detail:c,bubbles:!0,composed:!0,cancelable:$APP.K(d)}))},ul=function(a){return function(){var b=$APP.l(a,"__xSearchFieldRefs");if($APP.n(b)){var c=$APP.l(b,"input");b=$APP.l(b,"clear");var d=c.value;var e=a.getAttribute("name");e=$APP.n(e)?e:"";var g=$APP.l(a,"__xSearchFieldInternals");$APP.n(g)&&(g.setFormValue(d),ql(a,g,c));pl(c,b,a);return tl(a,"x-search-field-input",
|
|
6
|
+
{name:e,value:d},!1)}return null}},vl=function(a){return function(){var b=$APP.l(a,"__xSearchFieldRefs");if($APP.n(b)){b=$APP.l(b,"input");var c=b.value;var d=a.getAttribute("name");d=$APP.n(d)?d:"";var e=$APP.l(a,"__xSearchFieldInternals");$APP.n(e)&&(e.setFormValue(c),ql(a,e,b));return tl(a,"x-search-field-change",{name:d,value:c},!1)}return null}},wl=function(a){return function(b){if($APP.C.h("Enter",b.key)&&(b.preventDefault(),b=$APP.l(a,"__xSearchFieldRefs"),$APP.n(b))){var c=$APP.l(b,"input").value;
|
|
7
|
+
b=function(){var d=a.getAttribute("name");return $APP.n(d)?d:""}();return $APP.n(function(){var d=a.hasAttribute("required");return $APP.n(d)?$APP.C.h(c,""):d}())?(b=$APP.l(a,"__xSearchFieldInternals"),$APP.n(b)?b.reportValidity():null):tl(a,"x-search-field-search",{name:b,value:c},!0)}return null}},xl=function(a){return function(){var b=$APP.l(a,"__xSearchFieldRefs");if($APP.n(b)){var c=$APP.l(b,"input");b=$APP.l(b,"clear");var d=a.getAttribute("name");d=$APP.n(d)?d:"";c.value="";var e=$APP.l(a,
|
|
8
|
+
"__xSearchFieldInternals");$APP.n(e)&&(e.setFormValue(""),ql(a,e,c));pl(c,b,a);tl(a,"x-search-field-clear",{name:d},!1);return c.focus()}return null}},yl=function(a){var b=$APP.l(a,"__xSearchFieldRefs");if($APP.n(b)){var c=$APP.l(a,"__xSearchFieldHandlers");if($APP.n(c)){var d=$APP.l(b,"input");b=$APP.l(b,"clear");d.removeEventListener("input",$APP.l(c,"input"));d.removeEventListener("change",$APP.l(c,"change"));d.removeEventListener("keydown",$APP.l(c,"keydown"));b.removeEventListener("click",$APP.l(c,
|
|
9
|
+
"click"));a.__xSearchFieldHandlers=null;return}}return null},zl=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){var d=this.getAttribute(c);return $APP.n(d)?d:""},set:function(d){d!=null&&$APP.O(d)?(d=""+$APP.T.g(d),d=this.setAttribute(c,d)):d=this.removeAttribute(c);return d}})},Al=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){return this.hasAttribute(c)},set:function(d){return ol(this,c,$APP.K(d))}})},Bl=function(a){Object.defineProperty(a,
|
|
10
|
+
"value",{configurable:!0,enumerable:!0,get:function(){var b=$APP.l(this,"__xSearchFieldRefs");if($APP.n(b))return $APP.l(b,"input").value;b=this.getAttribute("value");return $APP.n(b)?b:""},set:function(b){b=b!=null&&$APP.O(b)?""+$APP.T.g(b):"";this.setAttribute("value",b);var c=$APP.l(this,"__xSearchFieldRefs");return $APP.n(c)?$APP.l(c,"input").value=b:null}})},Dl=function(){var a=class extends HTMLElement{},b=a.prototype;a.formAssociated=!0;Object.defineProperty(a,"observedAttributes",{get:function(){return Cl}});
|
|
11
|
+
Bl(b);zl(b,"name","name");zl(b,"placeholder","placeholder");zl(b,"label","label");zl(b,"autocomplete","autocomplete");Al(b,"disabled","disabled");Al(b,"required","required");b.checkValidity=function(){var c=$APP.l(this,"__xSearchFieldInternals");return $APP.n(c)?c.checkValidity():!0};b.reportValidity=function(){var c=$APP.l(this,"__xSearchFieldInternals");return $APP.n(c)?c.reportValidity():!0};b.connectedCallback=function(){if(!$APP.n($APP.l(this,"__xSearchFieldRefs"))){if(!$APP.n(this.shadowRoot)){var c=
|
|
12
12
|
this.attachShadow({mode:"open"}),d=document.createElement("style"),e=document.createElement("div"),g=document.createElement("span"),h=document.createElement("input"),k=document.createElement("button");d.textContent=":host{display:block;color-scheme:light dark;--x-search-field-bg:#ffffff;--x-search-field-color:#111827;--x-search-field-border:1px solid #d1d5db;--x-search-field-border-radius:6px;--x-search-field-focus-ring-color:#2563eb;--x-search-field-icon-color:#9ca3af;--x-search-field-clear-color:#9ca3af;--x-search-field-disabled-opacity:0.45;}@media (prefers-color-scheme:dark){:host{--x-search-field-bg:#1f2937;--x-search-field-color:#f9fafb;--x-search-field-border:1px solid #4b5563;--x-search-field-focus-ring-color:#3b82f6;--x-search-field-icon-color:#6b7280;--x-search-field-clear-color:#6b7280;}}[part\x3dwrapper]{display:flex;align-items:center;position:relative;background:var(--x-search-field-bg);border:var(--x-search-field-border);border-radius:var(--x-search-field-border-radius);transition:border-color 120ms ease,box-shadow 120ms ease;}[part\x3dwrapper]:focus-within{border-color:var(--x-search-field-focus-ring-color);box-shadow:0 0 0 3px color-mix(in srgb,var(--x-search-field-focus-ring-color) 20%,transparent);}[part\x3dicon]{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:36px;color:var(--x-search-field-icon-color);pointer-events:none;}[part\x3dinput]{flex:1;min-width:0;padding:0.5rem 0.25rem;background:transparent;color:var(--x-search-field-color);border:none;outline:none;font-size:1rem;line-height:1.5;font-family:inherit;}[part\x3dinput]::-webkit-search-cancel-button{-webkit-appearance:none;}[part\x3dinput]::-webkit-search-decoration{-webkit-appearance:none;}[part\x3dclear]{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:32px;height:32px;margin-right:2px;background:none;border:none;cursor:pointer;color:var(--x-search-field-clear-color);font-size:1.125rem;line-height:1;border-radius:4px;padding:0;}[part\x3dclear]:hover{color:var(--x-search-field-color);}.clear-hidden{display:none;}:host([disabled]) [part\x3dwrapper]{opacity:var(--x-search-field-disabled-opacity);cursor:not-allowed;}:host([disabled]) [part\x3dinput]{cursor:not-allowed;}@media (prefers-reduced-motion:reduce){[part\x3dwrapper]{transition:none;}}";
|
|
13
13
|
e.setAttribute("part","wrapper");g.setAttribute("part","icon");g.innerHTML='\x3csvg xmlns\x3d"http://www.w3.org/2000/svg" width\x3d"16" height\x3d"16" viewBox\x3d"0 0 24 24" fill\x3d"none" stroke\x3d"currentColor" stroke-width\x3d"2" stroke-linecap\x3d"round" stroke-linejoin\x3d"round" aria-hidden\x3d"true"\x3e\x3ccircle cx\x3d"11" cy\x3d"11" r\x3d"8"/\x3e\x3cline x1\x3d"21" y1\x3d"21" x2\x3d"16.65" y2\x3d"16.65"/\x3e\x3c/svg\x3e';h.setAttribute("part","input");h.setAttribute("type","search");h.setAttribute("spellcheck",
|
|
14
|
-
"false");k.setAttribute("part","clear");k.setAttribute("type","button");k.setAttribute("aria-label","Clear search");k.textContent="×";k.classList.add("clear-hidden");e.appendChild(g);e.appendChild(h);e.appendChild(k);c.appendChild(d);c.appendChild(e);this.__xSearchFieldRefs={wrapper:e,icon:g,input:h,clear:k}}$APP.n(this.attachInternals)&&(this.__xSearchFieldInternals=this.attachInternals())}
|
|
15
|
-
(c.value=d));c=$APP.l(this,"__xSearchFieldInternals");$APP.n(c)&&(d=c.setFormValue,e=this.getAttribute("value"),d.call(c,$APP.n(e)?e:""));d=$APP.l(this,"__xSearchFieldRefs");$APP.n(d)&&(c=$APP.l(d,"input"),d=$APP.l(d,"clear"),e=
|
|
16
|
-
b.attributeChangedCallback=function(c,d,e){$APP.
|
|
17
|
-
return a},
|
|
14
|
+
"false");k.setAttribute("part","clear");k.setAttribute("type","button");k.setAttribute("aria-label","Clear search");k.textContent="×";k.classList.add("clear-hidden");e.appendChild(g);e.appendChild(h);e.appendChild(k);c.appendChild(d);c.appendChild(e);this.__xSearchFieldRefs={wrapper:e,icon:g,input:h,clear:k}}$APP.n(this.attachInternals)&&(this.__xSearchFieldInternals=this.attachInternals())}yl(this);c=$APP.l(this,"__xSearchFieldRefs");$APP.n(c)&&(c=$APP.l(c,"input"),d=this.getAttribute("value"),$APP.n(d)&&
|
|
15
|
+
(c.value=d));c=$APP.l(this,"__xSearchFieldInternals");$APP.n(c)&&(d=c.setFormValue,e=this.getAttribute("value"),d.call(c,$APP.n(e)?e:""));d=$APP.l(this,"__xSearchFieldRefs");$APP.n(d)&&(c=$APP.l(d,"input"),d=$APP.l(d,"clear"),e=ul(this),g=vl(this),h=wl(this),k=xl(this),c.addEventListener("input",e),c.addEventListener("change",g),c.addEventListener("keydown",h),d.addEventListener("click",k),this.__xSearchFieldHandlers={input:e,change:g,keydown:h,click:k});return sl(this)};b.disconnectedCallback=function(){return yl(this)};
|
|
16
|
+
b.attributeChangedCallback=function(c,d,e){$APP.C.h(c,"value")&&(c=$APP.l(this,"__xSearchFieldRefs"),$APP.n(c)&&(c=$APP.l(c,"input"),$APP.O(c.value,e)&&(c.value=$APP.n(e)?e:"")));return sl(this)};b.formDisabledCallback=function(c){ol(this,"disabled",$APP.K(c));return sl(this)};b.formResetCallback=function(){this.removeAttribute("value");var c=$APP.l(this,"__xSearchFieldRefs");$APP.n(c)&&($APP.l(c,"input").value="");c=$APP.l(this,"__xSearchFieldInternals");$APP.n(c)&&c.setFormValue("");return sl(this)};
|
|
17
|
+
return a},El=function(){return $APP.n(customElements.get("x-search-field"))?null:customElements.define("x-search-field",Dl())};var Cl="name value placeholder label disabled required autocomplete".split(" "),rl=new $APP.S(null,new $APP.Q(null,2,["off",null,"on",null],null),null);$APP.ja("baredom.exports.x_search_field.init",El);export const init=El;
|
package/dist/x-select.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
else break}d=$APP.u($APP.
|
|
6
|
-
return $APP.n(b)?(b=$APP.l(b,"select"),a.dispatchEvent(new CustomEvent("select-change",{detail:{value:b.value,label:b.selectedOptions.length>0?b.selectedOptions[0].text:""},bubbles:!0,composed:!0,cancelable:!1}))):null}},
|
|
7
|
-
$APP.l(c,"slotchange"));a.__xSelectHandlers=null;return}}return null},
|
|
8
|
-
b)):b=this.removeAttribute("value");return b}})},
|
|
9
|
-
m=document.createElement("slot");d.textContent=":host{display:inline-block;color-scheme:light dark;--x-select-height-sm:2rem;--x-select-height-md:2.5rem;--x-select-height-lg:3rem;--x-select-radius:0.5rem;--x-select-font-size-sm:0.75rem;--x-select-font-size-md:0.875rem;--x-select-font-size-lg:1rem;--x-select-padding-inline:0.75rem;--x-select-bg:#ffffff;--x-select-bg-disabled:#f8fafc;--x-select-fg:#0f172a;--x-select-fg-disabled:#94a3b8;--x-select-placeholder-fg:#94a3b8;--x-select-border:#cbd5e1;--x-select-border-hover:#94a3b8;--x-select-border-focus:#3b82f6;--x-select-chevron:#64748b;--x-select-focus-ring:#93c5fd;--x-select-shadow:0 1px 2px rgba(15,23,42,0.06);--x-select-transition-duration:140ms;}@media (prefers-color-scheme:dark){:host{--x-select-bg:#1f2937;--x-select-bg-disabled:#111827;--x-select-fg:#f1f5f9;--x-select-border:#374151;--x-select-border-hover:#4b5563;--x-select-border-focus:#60a5fa;--x-select-chevron:#94a3b8;}}[part\x3dwrapper]{position:relative;display:flex;align-items:stretch;height:var(--x-select-height-md);border:1px solid var(--x-select-border);border-radius:var(--x-select-radius);background:var(--x-select-bg);box-shadow:var(--x-select-shadow);transition:border-color var(--x-select-transition-duration) ease,box-shadow var(--x-select-transition-duration) ease;overflow:hidden;font-size:var(--x-select-font-size-md);}[part\x3dwrapper][data-size\x3dsm]{height:var(--x-select-height-sm);font-size:var(--x-select-font-size-sm);}[part\x3dwrapper][data-size\x3dlg]{height:var(--x-select-height-lg);font-size:var(--x-select-font-size-lg);}[part\x3dwrapper][data-disabled]{background:var(--x-select-bg-disabled);opacity:0.6;pointer-events:none;}[part\x3dwrapper]:hover:not([data-disabled]){border-color:var(--x-select-border-hover);}[part\x3dwrapper]:focus-within:not([data-disabled]){border-color:var(--x-select-border-focus);box-shadow:0 0 0 3px var(--x-select-focus-ring);}[part\x3dselect]{appearance:none;-webkit-appearance:none;flex:1;min-width:0;background:transparent;border:none;outline:none;color:var(--x-select-fg);font-size:inherit;font-family:inherit;padding-inline:var(--x-select-padding-inline);padding-inline-end:calc(var(--x-select-padding-inline) + 1.75rem);cursor:pointer;width:100%;}[part\x3dselect]:disabled{color:var(--x-select-fg-disabled);cursor:default;}[part\x3dselect] option[data-placeholder]{color:var(--x-select-placeholder-fg);}[part\x3dchevron]{position:absolute;right:var(--x-select-padding-inline);top:50%;transform:translateY(-50%);display:flex;align-items:center;justify-content:center;pointer-events:none;color:var(--x-select-chevron);width:1rem;height:1rem;}slot{display:none;}@media (prefers-reduced-motion:reduce){[part\x3dwrapper]{transition:none;}}";
|
|
2
|
+
var cz=function(a){var b=$APP.l(a,"__xSelectRefs");if($APP.n(b)){var c=new $APP.Q(null,6,[$APP.Sh,a.hasAttribute("disabled"),$APP.ug,a.hasAttribute("required"),$APP.$h,a.getAttribute("size"),$APP.ph,a.getAttribute("placeholder"),$APP.yi,a.getAttribute("value"),$APP.Dh,a.getAttribute("name")],null);var d=$APP.N(c),e=$APP.I(d,$APP.Sh),g=$APP.I(d,$APP.ug),h=$APP.I(d,$APP.$h);c=$APP.I(d,$APP.ph);var k=$APP.I(d,$APP.yi);d=$APP.I(d,$APP.Dh);e=$APP.K(e);g=$APP.K(g);h=typeof h==="string"&&$APP.yc(bz,h)?h:
|
|
3
|
+
"md";c=new $APP.Q(null,6,[$APP.V,e,$APP.Tg,g,$APP.sg,h,$APP.vi,c,$APP.U,k,$APP.ai,d],null);if($APP.O(c,$APP.l(a,"__xSelectModel"))){a.__xSelectModel=c;a=$APP.l(b,"wrapper");k=$APP.l(b,"select");b=$APP.l(b,"placeholder-opt");h=$APP.V.g(c);d=$APP.Tg.g(c);g=$APP.sg.g(c);e=$APP.vi.g(c);var m=$APP.U.g(c);c=$APP.ai.g(c);k.disabled=h;$APP.n(d)?k.setAttribute("required",""):k.removeAttribute("required");typeof c==="string"&&$APP.O(c,"")?k.setAttribute("name",c):k.removeAttribute("name");typeof e==="string"&&
|
|
4
|
+
$APP.O(e,"")?(b.textContent=e,b.hidden=!1):b.hidden=!0;k.value=$APP.n(m)?m:"";a.setAttribute("data-size",g);$APP.n(h)?a.setAttribute("data-disabled",""):a.removeAttribute("data-disabled");return c==null||$APP.C.h(c,"")?k.setAttribute("aria-label",$APP.n(e)?e:"select"):k.removeAttribute("aria-label")}}return null},dz=function(a){var b=$APP.l(a,"__xSelectRefs");if($APP.n(b)){var c=$APP.l(b,"select"),d=$APP.l(b,"placeholder-opt");for(b=$APP.l(b,"slot").assignedElements({flatten:!0});;){var e=c.lastChild,
|
|
5
|
+
g=e;if($APP.n($APP.n(g)?e!==d:g))c.removeChild(e);else break}d=$APP.u($APP.dc(b));b=null;for(g=e=0;;)if(g<e){var h=b.D(null,g),k=h.tagName.toLowerCase();($APP.C.h(k,"option")||$APP.C.h(k,"optgroup"))&&c.appendChild(h.cloneNode(!0));g+=1}else if(d=$APP.u(d))$APP.uc(d)?(e=$APP.mb(d),d=$APP.nb(d),b=e,e=$APP.B(e)):(b=$APP.x(d),e=b.tagName.toLowerCase(),($APP.C.h(e,"option")||$APP.C.h(e,"optgroup"))&&c.appendChild(b.cloneNode(!0)),d=$APP.y(d),b=null,e=0),g=0;else break;a.__xSelectModel=null;return cz(a)}return null},
|
|
6
|
+
ez=function(a){return function(){var b=$APP.l(a,"__xSelectRefs");return $APP.n(b)?(b=$APP.l(b,"select"),a.dispatchEvent(new CustomEvent("select-change",{detail:{value:b.value,label:b.selectedOptions.length>0?b.selectedOptions[0].text:""},bubbles:!0,composed:!0,cancelable:!1}))):null}},fz=function(a){return function(){return dz(a)}},gz=function(a){var b=$APP.l(a,"__xSelectRefs");if($APP.n(b)){var c=$APP.l(a,"__xSelectHandlers");if($APP.n(c)){var d=$APP.l(b,"slot");$APP.l(b,"select").removeEventListener("change",
|
|
7
|
+
$APP.l(c,"change"));d.removeEventListener("slotchange",$APP.l(c,"slotchange"));a.__xSelectHandlers=null;return}}return null},hz=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){return this.hasAttribute(c)},set:function(d){return $APP.n($APP.K(d))?this.setAttribute(c,""):this.removeAttribute(c)}})},iz=function(a){Object.defineProperty(a,"value",{configurable:!0,enumerable:!0,get:function(){var b=this.getAttribute("value");return $APP.n(b)?b:null},set:function(b){b!=
|
|
8
|
+
null&&$APP.O(b)?(b=""+$APP.T.g(b),b=this.setAttribute("value",b)):b=this.removeAttribute("value");return b}})},kz=function(){var a=class extends HTMLElement{},b=a.prototype;Object.defineProperty(a,"observedAttributes",{get:function(){return jz}});hz(b,"disabled","disabled");hz(b,"required","required");iz(b);b.connectedCallback=function(){if(!$APP.n($APP.l(this,"__xSelectRefs"))){var c=this.attachShadow({mode:"open"}),d=document.createElement("style"),e=document.createElement("div"),g=document.createElement("select"),
|
|
9
|
+
h=document.createElement("option"),k=document.createElement("span"),m=document.createElement("slot");d.textContent=":host{display:inline-block;color-scheme:light dark;--x-select-height-sm:2rem;--x-select-height-md:2.5rem;--x-select-height-lg:3rem;--x-select-radius:0.5rem;--x-select-font-size-sm:0.75rem;--x-select-font-size-md:0.875rem;--x-select-font-size-lg:1rem;--x-select-padding-inline:0.75rem;--x-select-bg:#ffffff;--x-select-bg-disabled:#f8fafc;--x-select-fg:#0f172a;--x-select-fg-disabled:#94a3b8;--x-select-placeholder-fg:#94a3b8;--x-select-border:#cbd5e1;--x-select-border-hover:#94a3b8;--x-select-border-focus:#3b82f6;--x-select-chevron:#64748b;--x-select-focus-ring:#93c5fd;--x-select-shadow:0 1px 2px rgba(15,23,42,0.06);--x-select-transition-duration:140ms;}@media (prefers-color-scheme:dark){:host{--x-select-bg:#1f2937;--x-select-bg-disabled:#111827;--x-select-fg:#f1f5f9;--x-select-border:#374151;--x-select-border-hover:#4b5563;--x-select-border-focus:#60a5fa;--x-select-chevron:#94a3b8;}}[part\x3dwrapper]{position:relative;display:flex;align-items:stretch;height:var(--x-select-height-md);border:1px solid var(--x-select-border);border-radius:var(--x-select-radius);background:var(--x-select-bg);box-shadow:var(--x-select-shadow);transition:border-color var(--x-select-transition-duration) ease,box-shadow var(--x-select-transition-duration) ease;overflow:hidden;font-size:var(--x-select-font-size-md);}[part\x3dwrapper][data-size\x3dsm]{height:var(--x-select-height-sm);font-size:var(--x-select-font-size-sm);}[part\x3dwrapper][data-size\x3dlg]{height:var(--x-select-height-lg);font-size:var(--x-select-font-size-lg);}[part\x3dwrapper][data-disabled]{background:var(--x-select-bg-disabled);opacity:0.6;pointer-events:none;}[part\x3dwrapper]:hover:not([data-disabled]){border-color:var(--x-select-border-hover);}[part\x3dwrapper]:focus-within:not([data-disabled]){border-color:var(--x-select-border-focus);box-shadow:0 0 0 3px var(--x-select-focus-ring);}[part\x3dselect]{appearance:none;-webkit-appearance:none;flex:1;min-width:0;background:transparent;border:none;outline:none;color:var(--x-select-fg);font-size:inherit;font-family:inherit;padding-inline:var(--x-select-padding-inline);padding-inline-end:calc(var(--x-select-padding-inline) + 1.75rem);cursor:pointer;width:100%;}[part\x3dselect]:disabled{color:var(--x-select-fg-disabled);cursor:default;}[part\x3dselect] option[data-placeholder]{color:var(--x-select-placeholder-fg);}[part\x3dchevron]{position:absolute;right:var(--x-select-padding-inline);top:50%;transform:translateY(-50%);display:flex;align-items:center;justify-content:center;pointer-events:none;color:var(--x-select-chevron);width:1rem;height:1rem;}slot{display:none;}@media (prefers-reduced-motion:reduce){[part\x3dwrapper]{transition:none;}}";
|
|
10
10
|
e.setAttribute("part","wrapper");g.setAttribute("part","select");k.setAttribute("part","chevron");k.setAttribute("aria-hidden","true");h.setAttribute("data-placeholder","");h.setAttribute("value","");h.hidden=!0;h.disabled=!0;h.selected=!0;k.innerHTML='\x3csvg xmlns\x3d"http://www.w3.org/2000/svg" width\x3d"16" height\x3d"16" viewBox\x3d"0 0 16 16" fill\x3d"none" stroke\x3d"currentColor" stroke-width\x3d"2" stroke-linecap\x3d"round" stroke-linejoin\x3d"round" aria-hidden\x3d"true"\x3e\x3cpolyline points\x3d"4 6 8 10 12 6"/\x3e\x3c/svg\x3e';
|
|
11
|
-
g.appendChild(h);e.appendChild(g);e.appendChild(k);c.appendChild(d);c.appendChild(e);c.appendChild(m);this.__xSelectRefs={root:c,wrapper:e,select:g,"placeholder-opt":h,slot:m,chevron:k}}
|
|
12
|
-
function(){return
|
|
11
|
+
g.appendChild(h);e.appendChild(g);e.appendChild(k);c.appendChild(d);c.appendChild(e);c.appendChild(m);this.__xSelectRefs={root:c,wrapper:e,select:g,"placeholder-opt":h,slot:m,chevron:k}}gz(this);c=$APP.l(this,"__xSelectRefs");$APP.n(c)&&(d=$APP.l(c,"slot"),e=ez(this),g=fz(this),h={change:e,slotchange:g},$APP.l(c,"select").addEventListener("change",e),d.addEventListener("slotchange",g),this.__xSelectHandlers=h);dz(this);return cz(this)};b.disconnectedCallback=function(){return gz(this)};b.attributeChangedCallback=
|
|
12
|
+
function(c,d,e){return $APP.O(d,e)?cz(this):null};return a},lz=function(){return $APP.n(customElements.get("x-select"))?null:customElements.define("x-select",kz())};var bz=new $APP.S(null,new $APP.Q(null,3,["md",null,"lg",null,"sm",null],null),null),jz="disabled required size placeholder value name".split(" ");$APP.sd(["select-change",new $APP.Q(null,2,[$APP.ni,!1,$APP.Y,new $APP.Q(null,2,[$APP.U,$APP.X,$APP.W,$APP.X],null)],null)]);$APP.ja("baredom.exports.x_select.init",lz);export const init=lz;
|
package/dist/x-sidebar.js
CHANGED
|
@@ -1,27 +1,18 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
a.
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
b}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
"
|
|
19
|
-
"onKeydown"));$APP.n(b)&&window.removeEventListener("resize",$APP.l(b,"onResize"));this._listening=!1}return wG(this)});$APP.ma(a,"attributeChangedCallback",function(b,c,d){return $APP.N(c,d)?UG(this):null});YG(a);ZG(a);return a},bH=function(){function a(){return Reflect.construct(HTMLElement,[],this.constructor)}if($APP.n(customElements.get("x-sidebar")))return null;var b=$G();a.prototype=b;Object.defineProperty(b,"constructor",{value:a});Object.setPrototypeOf(a,HTMLElement);a.observedAttributes=
|
|
20
|
-
aH;return customElements.define("x-sidebar",a)},cH=function(){return bH()};$APP.Ib.prototype.C=$APP.ca(24,function(){return $APP.Lb});$APP.Uc.prototype.C=$APP.ca(23,function(){return $APP.Ua($APP.Lb,this.s)});$APP.Vc.prototype.C=$APP.ca(22,function(){return this});$APP.Wc.prototype.C=$APP.ca(21,function(){return $APP.Lb});$APP.$c.prototype.C=$APP.ca(20,function(){return $APP.Ua($APP.Lb,this.s)});$APP.ed.prototype.C=$APP.ca(19,function(){return $APP.Lb});$APP.Gd.prototype.C=$APP.ca(18,function(){return $APP.Lb});
|
|
21
|
-
$APP.O.prototype.C=$APP.ca(17,function(){return $APP.Ua($APP.Ld,this.s)});$APP.ce.prototype.C=$APP.ca(16,function(){return $APP.Lb});$APP.ue.prototype.C=$APP.ca(15,function(){return null});$APP.ve.prototype.C=$APP.ca(14,function(){return $APP.Lb});$APP.P.prototype.C=$APP.ca(13,function(){return $APP.Ua($APP.xd,this.s)});$APP.Te.prototype.C=$APP.ca(12,function(){return $APP.Lb});$APP.Xe.prototype.C=$APP.ca(11,function(){return $APP.Lb});
|
|
22
|
-
$APP.bf.prototype.C=$APP.ca(10,function(){return $APP.Ua($APP.De,this.s)});$APP.hf.prototype.C=$APP.ca(9,function(){return $APP.Lb});$APP.jf.prototype.C=$APP.ca(8,function(){return null});$APP.kf.prototype.C=$APP.ca(7,function(){return null});$APP.lf.prototype.C=$APP.ca(6,function(){return new $APP.lf(this.Ca,null,0,this.s,0)});$APP.nf.prototype.C=$APP.ca(5,function(){return $APP.Lb});$APP.pf.prototype.C=$APP.ca(4,function(){return $APP.Lb});
|
|
23
|
-
$APP.R.prototype.C=$APP.ca(3,function(){return $APP.Ua($APP.sf,this.s)});$APP.vf.prototype.C=$APP.ca(2,function(){return new $APP.vf(this.s,gG(this.Ka),0)});$APP.zf.prototype.C=$APP.ca(1,function(){return $APP.Lb});$APP.Af.prototype.C=$APP.ca(0,function(){return $APP.Lb});var oG=function oG(a){for(var c=[],d=arguments.length,e=0;;)if(e<d)c.push(arguments[e]),e+=1;else break;return oG.G(0<c.length?new $APP.Ib(c.slice(0),0,null):null)};
|
|
24
|
-
oG.G=function(a){a=a instanceof $APP.Ib&&a.u===0?a.i:lG(a);var b=a.length;if(!$APP.Ac(b))throw Error(["Argument must be an integer: ",$APP.ta(b)].join(""));if((b&1)!==0)throw Error(["No value supplied for key: ",$APP.ta($APP.ic(a))].join(""));return $APP.wd(a)};oG.Y=0;oG.X=function(a){return this.G($APP.u(a))};
|
|
25
|
-
var PG=new $APP.K(null,"declared-variant","declared-variant",-2054964950),dH=new $APP.K(null,"collapsed","collapsed",-628494523),FG=new $APP.K(null,"viewport-width","viewport-width",-1146235948),LG=new $APP.K(null,"aria-hidden","aria-hidden",399337029),GG=new $APP.K(null,"prefers-reduced-motion","prefers-reduced-motion",-2023150975),OG=new $APP.K(null,"collapsed-requested","collapsed-requested",1573505800),DG=new $APP.K(null,"breakpoint-attr","breakpoint-attr",-250275627),CG=new $APP.K(null,"variant-attr",
|
|
26
|
-
"variant-attr",-1143729279),KG=new $APP.K(null,"effective-variant","effective-variant",-829495195),RG=new $APP.K(null,"reduced-motion","reduced-motion",79621277),QG=new $APP.K(null,"show-backdrop","show-backdrop",-532209910),NG=new $APP.K(null,"is-docked","is-docked",875310728),AG=new $APP.K(null,"collapsed-attr","collapsed-attr",-1535396832),SG=new $APP.K(null,"is-modal","is-modal",1610761086),BG=new $APP.K(null,"placement-attr","placement-attr",-1321967286),TG=new $APP.K(null,"is-overlay","is-overlay",
|
|
27
|
-
1953921119),EG=new $APP.K(null,"label-attr","label-attr",-571749887),zG=new $APP.K(null,"open-attr","open-attr",-1772289801),MG=new $APP.K(null,"collapsed-applied","collapsed-applied",-1696231706);var aH="open collapsed placement variant breakpoint label".split(" "),HG=$APP.tf(["right","left"]),JG=$APP.tf(["overlay","docked","modal"]),sG=$APP.tf(["backdrop","escape"]),IG=new $APP.P(null,6,[$APP.yi,"left",$APP.Vg,"docked",$APP.Oh,768,$APP.W,"Sidebar",$APP.qi,!1,dH,!1],null);$APP.wd(["toggle",new $APP.P(null,1,[$APP.Y,new $APP.P(null,1,[$APP.qi,$APP.Ji],null)],null),"dismiss",new $APP.P(null,1,[$APP.Y,new $APP.P(null,1,[$APP.wh,$APP.X],null)],null)]);$APP.ka("baredom.exports.x_sidebar.init",cH);export const init=cH;
|
|
2
|
+
var pG=function(a,b,c){return $APP.n(c)?a.setAttribute(b,""):a.removeAttribute(b)},qG=function(a,b,c){a.dispatchEvent(new CustomEvent(b,$APP.pg(new $APP.Q(null,3,[$APP.Y,c,$APP.zi,!0,$APP.Li,!0],null))))},sG=function(a,b){$APP.yc(rG,b)&&qG(a,"dismiss",new $APP.Q(null,1,[$APP.qh,b],null))},tG=function(a){var b=window.getComputedStyle(a);return $APP.O("none",b.display)&&$APP.O("hidden",b.visibility)&&a.offsetWidth>0&&a.offsetHeight>0},uG=function(a){var b=$APP.l(a,"_panel");$APP.n(b.hasAttribute("tabindex"))||
|
|
3
|
+
(b.setAttribute("tabindex","-1"),a._panelTabindexAdded=!0);return b.focus()},vG=function(a){var b=$APP.l(a,"_restoreFocusTarget"),c=$APP.l(a,"_panel"),d=$APP.l(a,"_panelTabindexAdded")===!0,e=$APP.l(a,"_root");var g=$APP.l(a,"_sidebar");e=$APP.n(e)?e.activeElement:null;var h=document.activeElement;g=$APP.n($APP.n(e)?$APP.n(g)?g.contains(e):g:e)?e:$APP.n($APP.n(h)?$APP.n(g)?g.contains(h):g:h)?h:null;$APP.n(g)&&g.blur();a._tabbables=null;a._restoreFocusTarget=null;$APP.n($APP.n(c)?d:c)&&(c.removeAttribute("tabindex"),
|
|
4
|
+
a._panelTabindexAdded=!1);return $APP.n($APP.n(b)?b.isConnected:b)?b.focus():null},wG=function(a,b){var c=$APP.l(a,"_tabbables");c=$APP.n(c)?$APP.Wd($APP.dc(c)):$APP.Fd;var d=$APP.l(a,"_panel");if($APP.oc(c))return b.preventDefault(),$APP.n(d)?uG(a):null;a=document.activeElement;d=$APP.x(c);c=$APP.fc(c);var e=b.shiftKey;return $APP.n($APP.n(e)?$APP.C.h(a,d):e)?(b.preventDefault(),c.focus()):$APP.p(e)&&$APP.C.h(a,c)?(b.preventDefault(),d.focus()):null},xG=function(a){if(!$APP.n($APP.l(a,"_root"))){var b=
|
|
5
|
+
a.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("aside"),g=document.createElement("div"),h=document.createElement("slot");c.textContent=":host { --x-sidebar-bg: Canvas; --x-sidebar-fg: CanvasText; --x-sidebar-backdrop: rgb(0 0 0 / 0.4); --x-sidebar-shadow: 0 8px 24px rgb(0 0 0 / 0.18); --x-sidebar-width: 18rem; --x-sidebar-collapsed-width: 4rem; --x-sidebar-duration: 180ms; --x-sidebar-easing: ease; display: block; position: relative;}:host([hidden]) { display: none; }.backdrop[hidden] { display: none; }.backdrop { position: fixed; inset: 0; background: var(--x-sidebar-backdrop); opacity: 0; z-index: 999; pointer-events: none; transition: opacity var(--x-sidebar-duration) var(--x-sidebar-easing);}.backdrop[data-active\x3d'true'] { opacity: 1; pointer-events: auto;}.sidebar { position: relative; color: var(--x-sidebar-fg); block-size: 100%;}.panel { background: var(--x-sidebar-bg); color: var(--x-sidebar-fg); inline-size: var(--x-sidebar-width); min-block-size: 100%; overflow: hidden; box-shadow: var(--x-sidebar-shadow); will-change: transform, inline-size; transition: transform var(--x-sidebar-duration) var(--x-sidebar-easing), inline-size var(--x-sidebar-duration) var(--x-sidebar-easing), opacity var(--x-sidebar-duration) var(--x-sidebar-easing);}:host([data-effective-variant\x3d'docked']) .panel[data-collapsed\x3d'true'] { inline-size: var(--x-sidebar-collapsed-width);}:host([data-effective-variant\x3d'overlay']) .sidebar,:host([data-effective-variant\x3d'modal']) .sidebar { position: fixed; inset-block: 0; z-index: 1000; pointer-events: none;}:host([data-effective-variant\x3d'overlay'][data-open\x3d'true']) .sidebar,:host([data-effective-variant\x3d'modal'][data-open\x3d'true']) .sidebar { pointer-events: auto;}:host([data-effective-variant\x3d'overlay'][data-placement\x3d'left']) .sidebar,:host([data-effective-variant\x3d'modal'][data-placement\x3d'left']) .sidebar { inset-inline-start: 0;}:host([data-effective-variant\x3d'overlay'][data-placement\x3d'right']) .sidebar,:host([data-effective-variant\x3d'modal'][data-placement\x3d'right']) .sidebar { inset-inline-end: 0;}:host([data-effective-variant\x3d'overlay'][data-placement\x3d'left']) .panel[data-open\x3d'false'],:host([data-effective-variant\x3d'modal'][data-placement\x3d'left']) .panel[data-open\x3d'false'] { transform: translateX(-100%); pointer-events: none;}:host([data-effective-variant\x3d'overlay'][data-placement\x3d'right']) .panel[data-open\x3d'false'],:host([data-effective-variant\x3d'modal'][data-placement\x3d'right']) .panel[data-open\x3d'false'] { transform: translateX(100%); pointer-events: none;}:host([data-effective-variant\x3d'overlay']) .panel[data-open\x3d'true'],:host([data-effective-variant\x3d'modal']) .panel[data-open\x3d'true'] { transform: translateX(0); pointer-events: auto;}:host([data-reduced-motion\x3d'true']) .panel,:host([data-reduced-motion\x3d'true']) .backdrop { transition: none;}@media (prefers-color-scheme: dark) { :host { --x-sidebar-shadow: 0 8px 24px rgb(0 0 0 / 0.4); }}";
|
|
6
|
+
d.className="backdrop";d.setAttribute("part","backdrop");d.hidden=!0;e.className="sidebar";e.setAttribute("part","sidebar");g.className="panel";g.setAttribute("part","panel");g.appendChild(h);e.appendChild(g);b.appendChild(c);b.appendChild(d);b.appendChild(e);a._root=b;a._backdrop=d;a._sidebar=e;a._panel=g;a._slot=h}},TG=function(a){xG(a);var b=$APP.l(a,"_prevState");b=$APP.n(b)?b:$APP.td;var c=a.hasAttribute("open"),d=a.hasAttribute("collapsed"),e=a.getAttribute("placement"),g=a.getAttribute("variant"),
|
|
7
|
+
h=a.getAttribute("breakpoint"),k=a.getAttribute("label"),m=window.innerWidth,q=window.matchMedia("(prefers-reduced-motion: reduce)");c=$APP.N(new $APP.Q(null,8,[yG,c,zG,d,AG,e,BG,g,CG,h,DG,k,EG,m,FG,$APP.K(q.matches)],null));k=$APP.I(c,yG);h=$APP.I(c,zG);d=$APP.I(c,AG);e=$APP.I(c,BG);m=$APP.I(c,CG);q=$APP.I(c,DG);g=$APP.I(c,EG);c=$APP.I(c,FG);d=$APP.yc(GG,d)?d:$APP.ri.g(HG);e=$APP.yc(IG,e)?e:$APP.Ng.g(HG);var r=$APP.Ih.g(HG);m=m==null?null:""+$APP.T.g(m);m=m==null?null:(0,$APP.Vf)(m);$APP.u(m)?(m=
|
|
8
|
+
Number(m),m=$APP.n(Number.isFinite(m))?m:r):m=r;q=q!=null?(0,$APP.Vf)(q):null;q=$APP.u(q)?q:null;q=$APP.n(q)?q:$APP.W.g(HG);k=$APP.N(new $APP.Q(null,1,[yG,k],null));k=$APP.I(k,yG);k=$APP.K(k);h=$APP.K(h);g=g<m?"modal":e;r=$APP.C.h(g,"modal");var v=$APP.C.h(g,"overlay"),w=$APP.C.h(g,"docked");c=$APP.Xe([$APP.ji,JG,KG,LG,$APP.Ih,MG,NG,OG,PG,$APP.W,$APP.ri,QG,RG,SG],[k,g,!k,w&&h,m,w,h,e,k&&(r||v),q,d,$APP.K(c),r,v]);k=$APP.N(c);d=$APP.I(k,JG);e=$APP.I(k,$APP.ri);g=$APP.I(k,$APP.ji);h=$APP.I(k,LG);k=
|
|
9
|
+
$APP.I(k,QG);a.setAttribute("data-effective-variant",d);a.setAttribute("data-placement",e);a.setAttribute("data-open",$APP.n(g)?"true":"false");a.setAttribute("data-collapsed",$APP.n(h)?"true":"false");a.setAttribute("data-reduced-motion",$APP.n(k)?"true":"false");d=RG.g(c);$APP.n(d)&&(d=$APP.ji.g(c),$APP.n(d)&&(d=RG.g(b),d=$APP.n(d)?$APP.ji.g(b):d,d=$APP.p(d)));$APP.n(d)?(d=$APP.Wd($APP.Ed(tG,$APP.dc($APP.l(a,"_panel").querySelectorAll("a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex\x3d'-1'])")))),
|
|
10
|
+
a._restoreFocusTarget=document.activeElement,e=$APP.pg(d),a._tabbables=e,$APP.u(d)?$APP.x(d).focus():uG(a)):(d=RG.g(b),$APP.n(d)&&(d=$APP.ji.g(b),$APP.n(d)&&(d=RG.g(c),d=$APP.n(d)?$APP.ji.g(c):d,d=$APP.p(d))),$APP.n(d)&&vG(a));e=$APP.N(c);d=$APP.I(e,$APP.W);e=$APP.I(e,KG);g=$APP.l(a,"_sidebar");$APP.n(g)&&(g.setAttribute("role","navigation"),g.setAttribute("aria-label",d),g.setAttribute("aria-hidden",$APP.n(e)?"true":"false"));d=$APP.N(c);d=$APP.I(d,PG);e=$APP.l(a,"_backdrop");$APP.n(e)&&(e.setAttribute("data-active",
|
|
11
|
+
$APP.n(d)?"true":"false"),e.hidden=$APP.p(d),e.inert!=null&&(e.inert=$APP.p(d)));h=$APP.N(c);d=$APP.I(h,$APP.ji);e=$APP.I(h,$APP.ri);g=$APP.I(h,JG);h=$APP.I(h,LG);k=$APP.l(a,"_panel");$APP.n(k)&&(k.setAttribute("data-open",$APP.n(d)?"true":"false"),k.setAttribute("data-placement",e),k.setAttribute("data-variant",g),k.setAttribute("data-collapsed",$APP.n(h)?"true":"false"));$APP.O($APP.ji.g(b),$APP.ji.g(c))&&(b=$APP.ji.g(c),qG(a,"toggle",new $APP.Q(null,1,[$APP.ji,$APP.K(b)],null)));a._prevState=c},
|
|
12
|
+
UG=function(a,b){var c=$APP.l(a,"_prevState"),d=b.key;return $APP.n(function(){var e=RG.g(c);e=$APP.n(e)?e:SG.g(c);return $APP.n(e)?$APP.ji.g(c):e}())?$APP.C.h(d,"Escape")?(b.preventDefault(),sG(a,"escape"),pG(a,"open",!1)):$APP.n(function(){var e=RG.g(c);return $APP.n(e)?$APP.C.h(d,"Tab"):e}())?wG(a,b):null:null},VG=function(a){$APP.n($APP.l(a,"_handlers"))||$APP.la(a,"_handlers",{onBackdropClick:function(b){var c=$APP.l(a,"_prevState"),d=$APP.l(a,"_backdrop");var e=RG.g(c);e=$APP.n(e)?e:SG.g(c);
|
|
13
|
+
$APP.n(e)?(c=$APP.ji.g(c),b=$APP.n(c)?$APP.C.h(b.target,d):c):b=e;$APP.n(b)?(sG(a,"backdrop"),b=pG(a,"open",!1)):b=null;return b},onKeydown:function(b){return UG(a,b)},onResize:function(){return TG(a)}})},WG=function(a){Object.defineProperty(a,"open",{get:function(){return this.hasAttribute("open")},set:function(b){return pG(this,"open",$APP.K(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"collapsed",{get:function(){return this.hasAttribute("collapsed")},set:function(b){return pG(this,
|
|
14
|
+
"collapsed",$APP.K(b))},enumerable:!0,configurable:!0})},YG=function(){var a=class extends HTMLElement{};a.observedAttributes=XG;a.prototype.connectedCallback=function(){xG(this);VG(this);if($APP.l(this,"_listening")!==!0){var b=$APP.l(this,"_handlers"),c=$APP.l(this,"_backdrop"),d=$APP.l(this,"_root");$APP.n($APP.n(c)?b:c)&&c.addEventListener("click",$APP.l(b,"onBackdropClick"));$APP.n($APP.n(d)?b:d)&&d.addEventListener("keydown",$APP.l(b,"onKeydown"));$APP.n(b)&&window.addEventListener("resize",
|
|
15
|
+
$APP.l(b,"onResize"));this._listening=!0}return TG(this)};a.prototype.disconnectedCallback=function(){if($APP.l(this,"_listening")===!0){var b=$APP.l(this,"_handlers"),c=$APP.l(this,"_backdrop"),d=$APP.l(this,"_root");$APP.n($APP.n(c)?b:c)&&c.removeEventListener("click",$APP.l(b,"onBackdropClick"));$APP.n($APP.n(d)?b:d)&&d.removeEventListener("keydown",$APP.l(b,"onKeydown"));$APP.n(b)&&window.removeEventListener("resize",$APP.l(b,"onResize"));this._listening=!1}return vG(this)};a.prototype.attributeChangedCallback=
|
|
16
|
+
function(b,c,d){return $APP.O(c,d)?TG(this):null};WG(a.prototype);return a},ZG=function(){return $APP.n(customElements.get("x-sidebar"))?null:customElements.define("x-sidebar",YG())},OG=new $APP.M(null,"declared-variant","declared-variant",-2054964950),$G=new $APP.M(null,"collapsed","collapsed",-628494523),EG=new $APP.M(null,"viewport-width","viewport-width",-1146235948),KG=new $APP.M(null,"aria-hidden","aria-hidden",399337029),FG=new $APP.M(null,"prefers-reduced-motion","prefers-reduced-motion",
|
|
17
|
+
-2023150975),NG=new $APP.M(null,"collapsed-requested","collapsed-requested",1573505800),CG=new $APP.M(null,"breakpoint-attr","breakpoint-attr",-250275627),BG=new $APP.M(null,"variant-attr","variant-attr",-1143729279),JG=new $APP.M(null,"effective-variant","effective-variant",-829495195),QG=new $APP.M(null,"reduced-motion","reduced-motion",79621277),PG=new $APP.M(null,"show-backdrop","show-backdrop",-532209910),MG=new $APP.M(null,"is-docked","is-docked",875310728),zG=new $APP.M(null,"collapsed-attr",
|
|
18
|
+
"collapsed-attr",-1535396832),RG=new $APP.M(null,"is-modal","is-modal",1610761086),AG=new $APP.M(null,"placement-attr","placement-attr",-1321967286),SG=new $APP.M(null,"is-overlay","is-overlay",1953921119),DG=new $APP.M(null,"label-attr","label-attr",-571749887),yG=new $APP.M(null,"open-attr","open-attr",-1772289801),LG=new $APP.M(null,"collapsed-applied","collapsed-applied",-1696231706);var XG="open collapsed placement variant breakpoint label".split(" "),GG=$APP.nf(["right","left"]),IG=$APP.nf(["overlay","docked","modal"]),rG=$APP.nf(["backdrop","escape"]),HG=new $APP.Q(null,6,[$APP.ri,"left",$APP.Ng,"docked",$APP.Ih,768,$APP.W,"Sidebar",$APP.ji,!1,$G,!1],null);$APP.sd(["toggle",new $APP.Q(null,1,[$APP.Y,new $APP.Q(null,1,[$APP.ji,$APP.Di],null)],null),"dismiss",new $APP.Q(null,1,[$APP.Y,new $APP.Q(null,1,[$APP.qh,$APP.X],null)],null)]);$APP.ja("baredom.exports.x_sidebar.init",ZG);export const init=ZG;
|
package/dist/x-skeleton.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
3
|
-
$APP.
|
|
4
|
-
"string"&&$APP.
|
|
5
|
-
"string"&&$APP.
|
|
2
|
+
var mz=function(a){return typeof a==="string"&&$APP.O("",a)?a:null},qz=function(a){var b=new $APP.Q(null,4,[$APP.Ng,a.getAttribute("variant"),nz,a.getAttribute("animation"),$APP.Fg,a.getAttribute("width"),$APP.Ci,a.getAttribute("height")],null);var c=$APP.N(b),d=$APP.I(c,$APP.Ng),e=$APP.I(c,nz);b=$APP.I(c,$APP.Fg);c=$APP.I(c,$APP.Ci);d=typeof d==="string"&&$APP.yc(oz,d)?d:"rect";e=typeof e==="string"&&$APP.yc(pz,e)?e:"pulse";b=new $APP.Q(null,4,[$APP.Ng,d,nz,e,$APP.Fg,mz(b),$APP.Ci,mz(c)],null);d=
|
|
3
|
+
$APP.N(b);b=$APP.I(d,$APP.Ng);e=$APP.I(d,nz);c=$APP.I(d,$APP.Fg);d=$APP.I(d,$APP.Ci);var g=$APP.l(a,"__xSkeletonBase");g.setAttribute("data-variant",b);g.setAttribute("data-animation",e);$APP.n(c)?g.style.setProperty("width",c):g.style.removeProperty("width");$APP.n(d)?g.style.setProperty("height",d):g.style.removeProperty("height");a.setAttribute("aria-hidden","true")},rz=function(a){Object.defineProperty(a,"variant",{get:function(){var b=this.getAttribute("variant");return $APP.n(b)?b:"rect"},set:function(b){return typeof b===
|
|
4
|
+
"string"&&$APP.O("",b)?this.setAttribute("variant",b):this.removeAttribute("variant")},enumerable:!0,configurable:!0});Object.defineProperty(a,"animation",{get:function(){var b=this.getAttribute("animation");return $APP.n(b)?b:"pulse"},set:function(b){return typeof b==="string"&&$APP.O("",b)?this.setAttribute("animation",b):this.removeAttribute("animation")},enumerable:!0,configurable:!0});Object.defineProperty(a,"width",{get:function(){var b=this.getAttribute("width");return $APP.n(b)?b:""},set:function(b){return typeof b===
|
|
5
|
+
"string"&&$APP.O("",b)?this.setAttribute("width",b):this.removeAttribute("width")},enumerable:!0,configurable:!0});Object.defineProperty(a,"height",{get:function(){var b=this.getAttribute("height");return $APP.n(b)?b:""},set:function(b){return typeof b==="string"&&$APP.O("",b)?this.setAttribute("height",b):this.removeAttribute("height")},enumerable:!0,configurable:!0})},tz=function(){var a=class extends HTMLElement{};a.observedAttributes=sz;a.prototype.connectedCallback=function(){if(!$APP.n($APP.l(this,
|
|
6
6
|
"__xSkeletonInit"))){var b=this.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("div");c.textContent=":host{display:block;box-sizing:border-box;color-scheme:light dark;--x-skeleton-color:rgba(0,0,0,0.08);--x-skeleton-highlight:rgba(255,255,255,0.65);--x-skeleton-border-radius:4px;--x-skeleton-duration:1.5s;}@media (prefers-color-scheme:dark){:host{--x-skeleton-color:rgba(255,255,255,0.10);--x-skeleton-highlight:rgba(255,255,255,0.18);}}[part\x3dbase]{width:100%;height:1rem;position:relative;overflow:hidden;background:var(--x-skeleton-color);border-radius:var(--x-skeleton-border-radius);}[part\x3dbase][data-variant\x3d'text']{height:1em;border-radius:3px;}[part\x3dbase][data-variant\x3d'circle']{width:2.5rem;height:2.5rem;border-radius:50%;}[part\x3dshimmer]{position:absolute;inset:0;background:linear-gradient(90deg,transparent 0%,var(--x-skeleton-highlight) 50%,transparent 100%);transform:translateX(-100%);display:none;pointer-events:none;}@keyframes x-skeleton-pulse{0%,100%{opacity:1;}50%{opacity:0.4;}}@keyframes x-skeleton-wave{0%{transform:translateX(-100%);}100%{transform:translateX(200%);}}[part\x3dbase][data-animation\x3d'pulse']{animation:x-skeleton-pulse var(--x-skeleton-duration,1.5s) ease-in-out infinite;}[part\x3dbase][data-animation\x3d'wave'] [part\x3dshimmer]{display:block;animation:x-skeleton-wave var(--x-skeleton-duration,1.5s) linear infinite;}@media (prefers-reduced-motion:reduce){[part\x3dbase][data-animation\x3d'pulse']{animation:none;}[part\x3dbase][data-animation\x3d'wave'] [part\x3dshimmer]{animation:none;}}";
|
|
7
|
-
d.setAttribute("part","base");e.setAttribute("part","shimmer");d.appendChild(e);b.appendChild(c);b.appendChild(d);this.__xSkeletonBase=d;this.__xSkeletonInit=!0}
|
|
8
|
-
|
|
7
|
+
d.setAttribute("part","base");e.setAttribute("part","shimmer");d.appendChild(e);b.appendChild(c);b.appendChild(d);this.__xSkeletonBase=d;this.__xSkeletonInit=!0}qz(this);return null};a.prototype.disconnectedCallback=function(){return null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.O(c,d)&&$APP.n($APP.l(this,"__xSkeletonInit"))&&qz(this);return null};rz(a.prototype);return a},uz=function(){$APP.n(customElements.get("x-skeleton"))||customElements.define("x-skeleton",tz());return null},
|
|
8
|
+
nz=new $APP.M(null,"animation","animation",-1248293244);var oz=new $APP.S(null,new $APP.Q(null,3,["text",null,"rect",null,"circle",null],null),null),pz=new $APP.S(null,new $APP.Q(null,3,["none",null,"pulse",null,"wave",null],null),null),sz=["variant","animation","width","height"];$APP.ja("baredom.exports.x_skeleton.init",uz);export const init=uz;
|
package/dist/x-slider.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
3
|
-
a.hasAttribute("disabled"),a.hasAttribute("show-value"),a.getAttribute("name"),a.getAttribute("value"),a.hasAttribute("readonly"),a.getAttribute("aria-labelledby"),a.getAttribute("size"),a.getAttribute("max"),a.getAttribute("label"),a.getAttribute("aria-describedby"),a.getAttribute("aria-label"),a.getAttribute("step")]);var k=$APP.
|
|
4
|
-
$APP.
|
|
5
|
-
A,typeof z==="string"&&$APP.
|
|
6
|
-
r);
|
|
7
|
-
|
|
8
|
-
$APP.
|
|
9
|
-
parseFloat($APP.l($APP.l(a,"__xSliderRefs"),"input").value),c=parseFloat(function(){var e=a.getAttribute("min");return $APP.n(e)?e:"0"}()),d=parseFloat(function(){var e=a.getAttribute("max");return $APP.n(e)?e:"100"}());return
|
|
10
|
-
$APP.l(a,"__xSliderHandlers");if($APP.n(c)){b=$APP.l(b,"input");b.removeEventListener("input",$APP.l(c,"input"));b.removeEventListener("change",$APP.l(c,"change"));b.removeEventListener("keydown",$APP.l(c,"keydown"));a.__xSliderHandlers=null;return}}return null},
|
|
11
|
-
get:function(){var d=this.getAttribute(c);return $APP.n(d)?d:null},set:function(d){return d!=null&&$APP.
|
|
12
|
-
|
|
13
|
-
e.setAttribute("part","base");g.setAttribute("part","header");h.setAttribute("part","label-text");k.setAttribute("part","value-text");m.setAttribute("part","input");m.setAttribute("type","range");g.appendChild(h);g.appendChild(k);e.appendChild(g);e.appendChild(m);c.appendChild(d);c.appendChild(e);this.__xSliderRefs={base:e,header:g,label:h,value:k,input:m};$APP.n(this.attachInternals)&&(this.__xSliderInternals=this.attachInternals())}
|
|
14
|
-
"input"),d=
|
|
15
|
-
null:customElements.define("x-slider",
|
|
16
|
-
$APP.
|
|
17
|
-
2,[$APP.Z,$APP.X,$APP.
|
|
2
|
+
var lu=function(a,b){return typeof a==="string"?(a=parseFloat(a),$APP.n(isNaN(a))?b:a):b},mu=function(a,b,c){return a.setAttribute(b,c)},nu=function(a,b,c){return $APP.n(c)?a.setAttribute(b,""):a.removeAttribute(b)},su=function(a){var b=$APP.l(a,"__xSliderRefs");if($APP.n(b)){var c=$APP.l(b,"base"),d=$APP.l(b,"header"),e=$APP.l(b,"label"),g=$APP.l(b,"value");b=$APP.l(b,"input");var h=$APP.Xe([$APP.Ni,$APP.pi,$APP.Si,$APP.ai,$APP.U,$APP.bi,$APP.Gi,$APP.sg,$APP.Yg,$APP.W,$APP.Pi,$APP.Uh,ou],[a.getAttribute("min"),
|
|
3
|
+
a.hasAttribute("disabled"),a.hasAttribute("show-value"),a.getAttribute("name"),a.getAttribute("value"),a.hasAttribute("readonly"),a.getAttribute("aria-labelledby"),a.getAttribute("size"),a.getAttribute("max"),a.getAttribute("label"),a.getAttribute("aria-describedby"),a.getAttribute("aria-label"),a.getAttribute("step")]);var k=$APP.N(h);h=$APP.I(k,$APP.Uh);var m=$APP.I(k,ou),q=$APP.I(k,$APP.Ni),r=$APP.I(k,$APP.pi),v=$APP.I(k,$APP.Si),w=$APP.I(k,$APP.U),z=$APP.I(k,$APP.ai),A=$APP.I(k,$APP.bi),D=$APP.I(k,
|
|
4
|
+
$APP.Gi),G=$APP.I(k,$APP.sg),J=$APP.I(k,$APP.W),E=$APP.I(k,$APP.Yg);k=$APP.I(k,$APP.Pi);q=lu(q,0);E=lu(E,100);w=$APP.eg.h($APP.dg.h(lu(w,0),q),E);$APP.C.h(m,"any")?m="any":(m=typeof m==="string"?parseFloat(m):NaN,m=$APP.p(isNaN(m))&&m>0?""+$APP.T.g(m):"1");G=typeof G==="string"&&$APP.yc(pu,G)?G:"md";r=$APP.K(r);A=$APP.K(A);v=$APP.K(v);var R=E>q?$APP.eg.h($APP.dg.h((w-q)/(E-q)*100,0),100):0;h=$APP.Xe([$APP.Ni,$APP.Vi,$APP.ai,$APP.U,$APP.Gi,qu,$APP.sg,$APP.Yg,$APP.W,$APP.Pi,$APP.Uh,$APP.V,ou,ru],[q,
|
|
5
|
+
A,typeof z==="string"&&$APP.O("",z)?z:null,w,typeof D==="string"&&$APP.O("",D)?D:null,v,G,E,typeof J==="string"&&$APP.O("",J)?J:null,typeof k==="string"&&$APP.O("",k)?k:null,typeof h==="string"&&$APP.O("",h)?h:null,r,m,R]);m=$APP.N(h);z=$APP.I(m,$APP.Uh);D=$APP.I(m,$APP.V);J=$APP.I(m,ou);k=$APP.I(m,ru);v=$APP.I(m,$APP.Ni);q=$APP.I(m,$APP.Vi);h=$APP.I(m,$APP.U);A=$APP.I(m,$APP.Gi);E=$APP.I(m,qu);r=$APP.I(m,$APP.sg);w=$APP.I(m,$APP.W);G=$APP.I(m,$APP.Yg);m=$APP.I(m,$APP.Pi);R=(R=w!=null)?R:E;c.setAttribute("data-size",
|
|
6
|
+
r);nu(a,"data-disabled",D);nu(a,"data-readonly",q);d.style.display=$APP.n(R)?"flex":"none";e.textContent=$APP.n(w)?w:"";e.style.display=w!=null?"":"none";g.textContent=$APP.n(E)?""+$APP.T.g(h):"";g.style.display=$APP.n(E)?"":"none";a.style.setProperty("--_x-slider-fill",""+$APP.T.g(k.toFixed(2))+"%");mu(b,"min",""+$APP.T.g(v));mu(b,"max",""+$APP.T.g(G));b.setAttribute("step",J);$APP.O(b.value,""+$APP.T.g(h))&&(b.value=""+$APP.T.g(h));mu(b,"aria-valuemin",""+$APP.T.g(v));mu(b,"aria-valuemax",""+$APP.T.g(G));
|
|
7
|
+
mu(b,"aria-valuenow",""+$APP.T.g(h));b.setAttribute("aria-readonly",$APP.n(q)?"true":"false");$APP.n(z)?b.setAttribute("aria-label",z):w!=null?b.setAttribute("aria-label",w):b.removeAttribute("aria-label");$APP.n(A)?b.setAttribute("aria-labelledby",A):b.removeAttribute("aria-labelledby");$APP.n(m)?b.setAttribute("aria-describedby",m):b.removeAttribute("aria-describedby");$APP.n(D)?b.setAttribute("disabled",""):b.removeAttribute("disabled");a=$APP.l(a,"__xSliderInternals");return $APP.n(a)?a.setFormValue(""+
|
|
8
|
+
$APP.T.g(h)):null}return null},tu=function(a,b,c){return a.dispatchEvent(new CustomEvent(b,{detail:c,bubbles:!0,composed:!0,cancelable:!1}))},uu=function(a){return function(){if($APP.n(a.hasAttribute("disabled")))return null;var b=$APP.l($APP.l(a,"__xSliderRefs"),"input").value,c=parseFloat(b),d=parseFloat(function(){var g=a.getAttribute("min");return $APP.n(g)?g:"0"}()),e=parseFloat(function(){var g=a.getAttribute("max");return $APP.n(g)?g:"100"}());a.setAttribute("value",b);return tu(a,"x-slider-input",
|
|
9
|
+
{value:c,min:d,max:e})}},vu=function(a){return function(){if($APP.n(a.hasAttribute("disabled")))return null;var b=parseFloat($APP.l($APP.l(a,"__xSliderRefs"),"input").value),c=parseFloat(function(){var e=a.getAttribute("min");return $APP.n(e)?e:"0"}()),d=parseFloat(function(){var e=a.getAttribute("max");return $APP.n(e)?e:"100"}());return tu(a,"x-slider-change",{value:b,min:c,max:d})}},xu=function(a){return function(b){var c=a.hasAttribute("readonly");c=$APP.n(c)?$APP.yc(wu,b.key):c;return $APP.n(c)?
|
|
10
|
+
b.preventDefault():null}},yu=function(a){var b=$APP.l(a,"__xSliderRefs");if($APP.n(b)){var c=$APP.l(a,"__xSliderHandlers");if($APP.n(c)){b=$APP.l(b,"input");b.removeEventListener("input",$APP.l(c,"input"));b.removeEventListener("change",$APP.l(c,"change"));b.removeEventListener("keydown",$APP.l(c,"keydown"));a.__xSliderHandlers=null;return}}return null},zu=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){return this.hasAttribute(c)},set:function(d){return nu(this,
|
|
11
|
+
c,$APP.K(d))}})},Au=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){var d=this.getAttribute(c);return $APP.n(d)?d:null},set:function(d){return d!=null&&$APP.O(d)?mu(this,c,""+$APP.T.g(d)):this.removeAttribute(c)}})},Cu=function(){var a=class extends HTMLElement{},b=a.prototype;a.formAssociated=!0;Object.defineProperty(a,"observedAttributes",{get:function(){return Bu}});zu(b,"disabled","disabled");zu(b,"readOnly","readonly");zu(b,"showValue","show-value");Au(b,
|
|
12
|
+
"value","value");Au(b,"min","min");Au(b,"max","max");Au(b,"step","step");Au(b,"name","name");Au(b,"label","label");Au(b,"size","size");b.connectedCallback=function(){if(!$APP.n($APP.l(this,"__xSliderRefs"))){var c=this.attachShadow({mode:"open"}),d=document.createElement("style"),e=document.createElement("div"),g=document.createElement("div"),h=document.createElement("span"),k=document.createElement("span"),m=document.createElement("input");d.textContent=":host{display:block;color-scheme:light dark;--x-slider-track-color:rgba(0,0,0,0.15);--x-slider-fill-color:#3b82f6;--x-slider-thumb-color:#ffffff;--x-slider-thumb-border:2px solid #3b82f6;--x-slider-thumb-shadow:0 1px 4px rgba(0,0,0,0.20);--x-slider-focus-ring:#60a5fa;--x-slider-disabled-opacity:0.45;--x-slider-label-color:rgba(0,0,0,0.60);--x-slider-value-color:rgba(0,0,0,0.50);--x-slider-radius:9999px;}@media (prefers-color-scheme:dark){:host{--x-slider-track-color:rgba(255,255,255,0.15);--x-slider-fill-color:#3b82f6;--x-slider-thumb-color:#ffffff;--x-slider-thumb-border:2px solid #3b82f6;--x-slider-focus-ring:#93c5fd;--x-slider-label-color:rgba(255,255,255,0.60);--x-slider-value-color:rgba(255,255,255,0.50);}}[part\x3dbase]{width:100%;box-sizing:border-box;}[part\x3dbase][data-size\x3dsm]{--_x-slider-track-h:4px;--_x-slider-thumb-sz:14px;}[part\x3dbase][data-size\x3dmd]{--_x-slider-track-h:6px;--_x-slider-thumb-sz:18px;}[part\x3dbase][data-size\x3dlg]{--_x-slider-track-h:8px;--_x-slider-thumb-sz:22px;}[part\x3dheader]{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:4px;}[part\x3dlabel-text]{font-size:0.875rem;color:var(--x-slider-label-color);font-weight:500;}[part\x3dvalue-text]{font-size:0.8125rem;color:var(--x-slider-value-color);}[part\x3dinput]{-webkit-appearance:none;appearance:none;display:block;width:100%;height:var(--_x-slider-thumb-sz,18px);cursor:pointer;margin:0;padding:0;background:transparent;outline:none;box-sizing:border-box;}[part\x3dinput]::-webkit-slider-runnable-track{height:var(--_x-slider-track-h,6px);border-radius:var(--x-slider-radius);background:linear-gradient(to right,var(--x-slider-fill-color) var(--_x-slider-fill,0%),var(--x-slider-track-color) var(--_x-slider-fill,0%));}[part\x3dinput]::-moz-range-track{height:var(--_x-slider-track-h,6px);border-radius:var(--x-slider-radius);background:var(--x-slider-track-color);border:none;}[part\x3dinput]::-moz-range-progress{height:var(--_x-slider-track-h,6px);border-radius:var(--x-slider-radius);background:var(--x-slider-fill-color);}[part\x3dinput]::-webkit-slider-thumb{-webkit-appearance:none;width:var(--_x-slider-thumb-sz,18px);height:var(--_x-slider-thumb-sz,18px);border-radius:50%;background:var(--x-slider-thumb-color);border:var(--x-slider-thumb-border);box-shadow:var(--x-slider-thumb-shadow);margin-top:calc(var(--_x-slider-track-h,6px)/2 - var(--_x-slider-thumb-sz,18px)/2);cursor:pointer;transition:box-shadow 100ms ease;}[part\x3dinput]::-moz-range-thumb{width:var(--_x-slider-thumb-sz,18px);height:var(--_x-slider-thumb-sz,18px);border-radius:50%;background:var(--x-slider-thumb-color);border:var(--x-slider-thumb-border);box-shadow:var(--x-slider-thumb-shadow);cursor:pointer;transition:box-shadow 100ms ease;}[part\x3dinput]:focus-visible::-webkit-slider-thumb{box-shadow:var(--x-slider-thumb-shadow),0 0 0 3px var(--x-slider-focus-ring);}[part\x3dinput]:focus-visible::-moz-range-thumb{box-shadow:var(--x-slider-thumb-shadow),0 0 0 3px var(--x-slider-focus-ring);}:host([data-disabled]) [part\x3dinput]{opacity:var(--x-slider-disabled-opacity);cursor:default;pointer-events:none;}:host([data-readonly]) [part\x3dinput]{pointer-events:none;}@media (prefers-reduced-motion:reduce){[part\x3dinput]::-webkit-slider-thumb{transition:none;}[part\x3dinput]::-moz-range-thumb{transition:none;}}";
|
|
13
|
+
e.setAttribute("part","base");g.setAttribute("part","header");h.setAttribute("part","label-text");k.setAttribute("part","value-text");m.setAttribute("part","input");m.setAttribute("type","range");g.appendChild(h);g.appendChild(k);e.appendChild(g);e.appendChild(m);c.appendChild(d);c.appendChild(e);this.__xSliderRefs={base:e,header:g,label:h,value:k,input:m};$APP.n(this.attachInternals)&&(this.__xSliderInternals=this.attachInternals())}yu(this);c=$APP.l(this,"__xSliderRefs");$APP.n(c)&&(c=$APP.l(c,
|
|
14
|
+
"input"),d=uu(this),e=vu(this),g=xu(this),h={input:d,change:e,keydown:g},c.addEventListener("input",d),c.addEventListener("change",e),c.addEventListener("keydown",g),this.__xSliderHandlers=h);return su(this)};b.disconnectedCallback=function(){return yu(this)};b.attributeChangedCallback=function(){return su(this)};b.formDisabledCallback=function(c){nu(this,"disabled",$APP.K(c));return su(this)};b.formResetCallback=function(){mu(this,"value",""+$APP.T.g(0));return su(this)};return a},Du=function(){return $APP.n(customElements.get("x-slider"))?
|
|
15
|
+
null:customElements.define("x-slider",Cu())},qu=new $APP.M(null,"show-value?","show-value?",-1960833108),ru=new $APP.M(null,"fill-percent","fill-percent",-1813848228),ou=new $APP.M(null,"step","step",1288888124);var pu=new $APP.S(null,new $APP.Q(null,3,["md",null,"lg",null,"sm",null],null),null),Bu="value min max step disabled readonly name label show-value size aria-label aria-labelledby aria-describedby".split(" ");
|
|
16
|
+
$APP.Xe([$APP.Ni,$APP.pi,$APP.wg,$APP.ai,$APP.U,$APP.sg,$APP.si,$APP.Yg,$APP.W,ou],[new $APP.Q(null,2,[$APP.Z,$APP.X,$APP.Hg,"min"],null),new $APP.Q(null,2,[$APP.Z,$APP.Di,$APP.Hg,"disabled"],null),new $APP.Q(null,2,[$APP.Z,$APP.Di,$APP.Hg,"show-value"],null),new $APP.Q(null,2,[$APP.Z,$APP.X,$APP.Hg,"name"],null),new $APP.Q(null,2,[$APP.Z,$APP.X,$APP.Hg,"value"],null),new $APP.Q(null,2,[$APP.Z,$APP.X,$APP.Hg,"size"],null),new $APP.Q(null,2,[$APP.Z,$APP.Di,$APP.Hg,"readonly"],null),new $APP.Q(null,
|
|
17
|
+
2,[$APP.Z,$APP.X,$APP.Hg,"max"],null),new $APP.Q(null,2,[$APP.Z,$APP.X,$APP.Hg,"label"],null),new $APP.Q(null,2,[$APP.Z,$APP.X,$APP.Hg,"step"],null)]);$APP.sd(["x-slider-input",new $APP.Q(null,1,[$APP.Y,new $APP.Q(null,3,[$APP.U,$APP.zh,$APP.Ni,$APP.zh,$APP.Yg,$APP.zh],null)],null),"x-slider-change",new $APP.Q(null,1,[$APP.Y,new $APP.Q(null,3,[$APP.U,$APP.zh,$APP.Ni,$APP.zh,$APP.Yg,$APP.zh],null)],null)]);var wu=new $APP.S(null,new $APP.Q(null,8,["PageDown",null,"ArrowUp",null,"ArrowDown",null,"End",null,"ArrowRight",null,"ArrowLeft",null,"PageUp",null,"Home",null],null),null);$APP.ja("baredom.exports.x_slider.init",Du);export const init=Du;
|
package/dist/x-spacer.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
3
|
-
d=$APP.I(c,
|
|
4
|
-
"grow",{get:function(){return
|
|
5
|
-
b.appendChild(c);this.__xSpacerRefs={root:b}}
|
|
6
|
-
"grow-raw",441172903),
|
|
2
|
+
var wv=function(a){return a!=null&&$APP.O((""+$APP.T.g(a)).trim().toLowerCase(),"false")},Cv=function(a){var b=new $APP.Q(null,3,[$APP.$h,a.getAttribute("size"),xv,a.getAttribute("axis"),yv,a.getAttribute("grow")],null);b=$APP.N(b);var c=$APP.I(b,$APP.$h),d=$APP.I(b,xv);b=$APP.I(b,yv);c=typeof c==="string"&&c.trim().length>0?c.trim():"1rem";d=typeof d==="string"?d.trim().toLowerCase():null;d=$APP.yc(zv,d)?d:"vertical";b=new $APP.Q(null,3,[$APP.sg,c,Av,d,Bv,wv(b)],null);c=$APP.N(b);b=$APP.I(c,$APP.sg);
|
|
3
|
+
d=$APP.I(c,Av);c=$APP.I(c,Bv);var e=a.style;a.setAttribute("data-axis",d);a.setAttribute("data-grow",$APP.n(c)?"true":"false");e.setProperty("--x-spacer-size",b);a.setAttribute("role","none");a.setAttribute("aria-hidden","true")},Dv=function(a,b,c){Object.defineProperty(a,b,{get:function(){var d=this.getAttribute(b);return $APP.n(d)?d:c},set:function(d){return d!=null?this.setAttribute(b,""+$APP.T.g(d)):this.removeAttribute(b)},enumerable:!0,configurable:!0})},Ev=function(a){Object.defineProperty(a,
|
|
4
|
+
"grow",{get:function(){return wv(this.getAttribute("grow"))},set:function(b){return $APP.n(b)?this.setAttribute("grow",""):this.removeAttribute("grow")},enumerable:!0,configurable:!0})},Fv=function(a){Dv(a,"size","1rem");Dv(a,"axis","vertical");Ev(a)},Hv=function(){var a=class extends HTMLElement{};a.observedAttributes=Gv;a.prototype.connectedCallback=function(){if(!$APP.n($APP.l(this,"__xSpacerRefs"))){var b=this.attachShadow({mode:"open"}),c=document.createElement("style");c.textContent=":host{display:block;flex-shrink:0;height:var(--x-spacer-size,1rem);width:0;pointer-events:none;}:host([data-axis\x3d'horizontal']){height:0;width:var(--x-spacer-size,1rem);}:host([data-grow\x3d'true']){flex:1 0 var(--x-spacer-size,0px);height:0;width:0;}";
|
|
5
|
+
b.appendChild(c);this.__xSpacerRefs={root:b}}Cv(this);return null};a.prototype.disconnectedCallback=function(){return null};a.prototype.attributeChangedCallback=function(b,c,d){b=$APP.O(c,d);$APP.n(b?$APP.l(this,"__xSpacerRefs"):b)&&Cv(this);return null};Fv(a.prototype);return a},Iv=function(){$APP.n(customElements.get("x-spacer"))||customElements.define("x-spacer",Hv());return null},Av=new $APP.M(null,"axis","axis",-1215390822),Bv=new $APP.M(null,"grow?","grow?",2124334580),yv=new $APP.M(null,"grow-raw",
|
|
6
|
+
"grow-raw",441172903),xv=new $APP.M(null,"axis-raw","axis-raw",291213231);var Gv=["size","axis","grow"],zv=new $APP.S(null,new $APP.Q(null,2,["vertical",null,"horizontal",null],null),null);$APP.ja("baredom.exports.x_spacer.init",Iv);export const init=Iv;
|
package/dist/x-spinner.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
3
|
-
a.setAttribute("data-size",b);a.setAttribute("data-variant",c);a.setAttribute("aria-label",d)},
|
|
4
|
-
""+$APP.
|
|
2
|
+
var kG=function(a){var b=new $APP.Q(null,3,[$APP.sg,a.getAttribute("size"),$APP.Ng,a.getAttribute("variant"),$APP.W,a.getAttribute("label")],null);var c=$APP.N(b),d=$APP.I(c,$APP.sg);b=$APP.I(c,$APP.Ng);c=$APP.I(c,$APP.W);d=typeof d==="string"&&$APP.yc(iG,d)?d:"md";b=typeof b==="string"&&$APP.yc(jG,b)?b:"default";c=typeof c==="string"&&$APP.O("",c.trim())?c.trim():"Loading";d=$APP.N(new $APP.Q(null,3,[$APP.sg,d,$APP.Ng,b,$APP.W,c],null));b=$APP.I(d,$APP.sg);c=$APP.I(d,$APP.Ng);d=$APP.I(d,$APP.W);
|
|
3
|
+
a.setAttribute("data-size",b);a.setAttribute("data-variant",c);a.setAttribute("aria-label",d)},lG=function(a){Object.defineProperty(a,"size",{get:function(){var b=this.getAttribute("size");return $APP.n(b)?b:"md"},set:function(b){return $APP.n(b)?this.setAttribute("size",""+$APP.T.g(b)):this.removeAttribute("size")},enumerable:!0,configurable:!0});Object.defineProperty(a,"variant",{get:function(){var b=this.getAttribute("variant");return $APP.n(b)?b:"default"},set:function(b){return $APP.n(b)?this.setAttribute("variant",
|
|
4
|
+
""+$APP.T.g(b)):this.removeAttribute("variant")},enumerable:!0,configurable:!0});Object.defineProperty(a,"label",{get:function(){var b=this.getAttribute("label");return $APP.n(b)?b:"Loading"},set:function(b){return $APP.n(b)?this.setAttribute("label",""+$APP.T.g(b)):this.removeAttribute("label")},enumerable:!0,configurable:!0})},nG=function(){var a=class extends HTMLElement{};a.observedAttributes=mG;a.prototype.connectedCallback=function(){if(!$APP.n($APP.l(this,"__xSpinnerInit"))){var b=this.attachShadow({mode:"open"}),
|
|
5
5
|
c=document.createElement("style"),d=document.createElement("span");c.textContent=":host{display:inline-flex;align-items:center;justify-content:center;color-scheme:light dark;--x-spinner-size:24px;--x-spinner-color:currentColor;--x-spinner-track-color:rgba(0,0,0,0.12);--x-spinner-thickness:2px;--x-spinner-duration:0.75s;}@media (prefers-color-scheme:dark){:host{--x-spinner-track-color:rgba(255,255,255,0.15);}}:host([data-size\x3d'xs']){--x-spinner-size:16px;}:host([data-size\x3d'sm']){--x-spinner-size:20px;}:host([data-size\x3d'md']){--x-spinner-size:24px;}:host([data-size\x3d'lg']){--x-spinner-size:32px;}:host([data-size\x3d'xl']){--x-spinner-size:48px;}:host([data-variant\x3d'primary']){--x-spinner-color:#3b82f6;}:host([data-variant\x3d'success']){--x-spinner-color:#22c55e;}:host([data-variant\x3d'warning']){--x-spinner-color:#f59e0b;}:host([data-variant\x3d'danger']){--x-spinner-color:#ef4444;}[part\x3dring]{display:block;width:var(--x-spinner-size);height:var(--x-spinner-size);border-radius:50%;border:var(--x-spinner-thickness) solid var(--x-spinner-track-color);border-top-color:var(--x-spinner-color);box-sizing:border-box;animation:x-spinner-spin var(--x-spinner-duration) linear infinite;}@keyframes x-spinner-spin{to{transform:rotate(360deg);}}@media (prefers-reduced-motion:reduce){[part\x3dring]{animation-play-state:paused;}}";
|
|
6
|
-
d.setAttribute("part","ring");d.setAttribute("aria-hidden","true");b.appendChild(c);b.appendChild(d);this.setAttribute("role","status");this.setAttribute("aria-live","polite");this.__xSpinnerRing=d;this.__xSpinnerInit=!0}
|
|
7
|
-
customElements.define("x-spinner",
|
|
6
|
+
d.setAttribute("part","ring");d.setAttribute("aria-hidden","true");b.appendChild(c);b.appendChild(d);this.setAttribute("role","status");this.setAttribute("aria-live","polite");this.__xSpinnerRing=d;this.__xSpinnerInit=!0}kG(this);return null};a.prototype.disconnectedCallback=function(){return null};a.prototype.attributeChangedCallback=function(b,c,d){b=$APP.O(c,d);$APP.n(b?$APP.l(this,"__xSpinnerInit"):b)&&kG(this);return null};lG(a.prototype);return a},oG=function(){$APP.n(customElements.get("x-spinner"))||
|
|
7
|
+
customElements.define("x-spinner",nG());return null};var mG=["size","variant","label"],iG=new $APP.S(null,new $APP.Q(null,5,["xs",null,"md",null,"lg",null,"xl",null,"sm",null],null),null),jG=new $APP.S(null,new $APP.Q(null,5,["success",null,"warning",null,"primary",null,"danger",null,"default",null],null),null);$APP.ja("baredom.exports.x_spinner.init",oG);export const init=oG;
|
package/dist/x-stat.js
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
3
|
-
[d,e,g,
|
|
4
|
-
$APP.W.g(b);$APP.n(b)?a.setAttribute("aria-label",b):a.removeAttribute("aria-label")},
|
|
5
|
-
g=$APP.l(a,"__x_stat_hint");return $APP.n(c)?(
|
|
6
|
-
k=document.createElement("div"),m=document.createElement("div"),q=document.createElement("span"),r=document.createElement("span"),v=document.createElement("span"),w=document.createElement("slot"),z=document.createElement("slot"),A=document.createElement("slot"),
|
|
7
|
-
d.setAttribute("part","base");e.setAttribute("part","icon");g.setAttribute("part","body");h.setAttribute("part","label");k.setAttribute("part","value");m.setAttribute("part","hint");w.setAttribute("name","icon");z.setAttribute("name","label");A.setAttribute("name","value");
|
|
8
|
-
d.appendChild(g);b.appendChild(c);b.appendChild(d);a.__x_stat_root=b;a.__x_stat_base=d;a.__x_stat_label=q;a.__x_stat_value=r;a.__x_stat_hint=v;a.__x_stat_initialized=!0}
|
|
9
|
-
|
|
10
|
-
"
|
|
2
|
+
var Hy=function(a,b,c){return $APP.yc(b,a)?a:c},Iy=function(a){return $APP.n($APP.n(a)?$APP.O("",a):a)?a:null},Ry=function(a){var b=$APP.N(a),c=$APP.I(b,Jy),d=$APP.I(b,Ky),e=$APP.I(b,$APP.Xh),g=$APP.I(b,$APP.Ng);a=$APP.I(b,$APP.U);var h=$APP.I(b,$APP.ei),k=$APP.I(b,$APP.sg),m=$APP.I(b,$APP.Ah);b=$APP.I(b,$APP.W);g=Hy(g,Ly,"default");e=Hy(e,My,"start");k=Hy(k,Ny,"md");c=Hy(c,Oy,"normal");d=Hy(d,Py,"neutral");m=$APP.K(m);return $APP.Xe([Ky,$APP.Xh,$APP.Ng,$APP.U,$APP.ei,$APP.sg,$APP.Ah,$APP.W,Qy,Jy],
|
|
3
|
+
[d,e,g,Iy(a),Iy(h),k,m,Iy(b),m?"true":null,c])},Sy=function(a){return $APP.Xe([Ky,$APP.Xh,$APP.Ng,$APP.U,$APP.ei,$APP.sg,$APP.Ah,$APP.W,Jy],[a.getAttribute("trend"),a.getAttribute("align"),a.getAttribute("variant"),a.getAttribute("value"),a.getAttribute("hint"),a.getAttribute("size"),a.hasAttribute("loading"),a.getAttribute("label"),a.getAttribute("emphasis")])},Ty=function(a,b){a.setAttribute("role","figure");var c=Qy.g(b);$APP.n(c)?a.setAttribute("aria-busy",c):a.removeAttribute("aria-busy");b=
|
|
4
|
+
$APP.W.g(b);$APP.n(b)?a.setAttribute("aria-label",b):a.removeAttribute("aria-label")},Uy=function(a,b){a.setAttribute("data-variant",$APP.Ng.g(b));a.setAttribute("data-align",$APP.Xh.g(b));a.setAttribute("data-size",$APP.sg.g(b));a.setAttribute("data-emphasis",Jy.g(b));a.setAttribute("data-trend",Ky.g(b));$APP.n($APP.Ah.g(b))?a.setAttribute("data-loading","true"):a.removeAttribute("data-loading")},Vy=function(a){var b=Ry(Sy(a)),c=$APP.l(a,"__x_stat_base"),d=$APP.l(a,"__x_stat_label"),e=$APP.l(a,"__x_stat_value"),
|
|
5
|
+
g=$APP.l(a,"__x_stat_hint");return $APP.n(c)?(Ty(a,b),Uy(c,b),d.textContent=function(){var h=$APP.W.g(b);return $APP.n(h)?h:""}(),e.textContent=function(){var h=$APP.U.g(b);return $APP.n(h)?h:""}(),g.textContent=function(){var h=$APP.ei.g(b);return $APP.n(h)?h:""}()):null},Wy=function(a){if($APP.l(a,"__x_stat_initialized")!==!0){var b=a.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("div"),g=document.createElement("div"),h=document.createElement("div"),
|
|
6
|
+
k=document.createElement("div"),m=document.createElement("div"),q=document.createElement("span"),r=document.createElement("span"),v=document.createElement("span"),w=document.createElement("slot"),z=document.createElement("slot"),A=document.createElement("slot"),D=document.createElement("slot"),G=document.createElement("slot");c.textContent=":host{display:block;color-scheme:light dark;--x-stat-background:transparent;--x-stat-color:inherit;--x-stat-muted-color:rgba(0,0,0,0.55);--x-stat-border-color:transparent;--x-stat-radius:12px;--x-stat-padding:16px;--x-stat-gap:6px;--x-stat-label-color:var(--x-stat-muted-color);--x-stat-label-size:12px;--x-stat-value-color:var(--x-stat-color);--x-stat-value-size:20px;--x-stat-hint-color:var(--x-stat-muted-color);--x-stat-hint-size:12px;--x-stat-icon-color:var(--x-stat-color);--x-stat-positive-color:#16a34a;--x-stat-warning-color:#d97706;--x-stat-danger-color:#dc2626;--x-stat-transition-duration:120ms;--x-stat-transition-timing:ease;--x-stat-loading-opacity:0.6;}@media (prefers-color-scheme:dark){:host{--x-stat-muted-color:rgba(255,255,255,0.55);--x-stat-positive-color:#4ade80;--x-stat-warning-color:#fbbf24;--x-stat-danger-color:#f87171;}}:host([variant\x3d'positive']){--x-stat-value-color:var(--x-stat-positive-color);}:host([variant\x3d'warning']){--x-stat-value-color:var(--x-stat-warning-color);}:host([variant\x3d'danger']){--x-stat-value-color:var(--x-stat-danger-color);}:host([variant\x3d'subtle']){--x-stat-value-color:var(--x-stat-muted-color);}[part\x3dbase]{display:grid;gap:var(--x-stat-gap);padding:var(--x-stat-padding);border-radius:var(--x-stat-radius);background:var(--x-stat-background);border:1px solid var(--x-stat-border-color);color:var(--x-stat-color);transition:background var(--x-stat-transition-duration) var(--x-stat-transition-timing),border-color var(--x-stat-transition-duration) var(--x-stat-transition-timing),color var(--x-stat-transition-duration) var(--x-stat-transition-timing),opacity var(--x-stat-transition-duration) var(--x-stat-transition-timing);}[part\x3dbase][data-align\x3d'center']{text-align:center;}[part\x3dbase][data-align\x3d'end']{text-align:end;}[part\x3dbase][data-size\x3d'sm'] [part\x3dvalue]{font-size:calc(var(--x-stat-value-size) * 0.8);}[part\x3dbase][data-size\x3d'lg'] [part\x3dvalue]{font-size:calc(var(--x-stat-value-size) * 1.6);}[part\x3dbase][data-emphasis\x3d'high'] [part\x3dvalue]{font-weight:800;}[part\x3dicon]{flex:0 0 auto;color:var(--x-stat-icon-color);line-height:1;}slot[name\x3dicon]::slotted(*){display:block;}[part\x3dlabel]{font-size:var(--x-stat-label-size);color:var(--x-stat-label-color);}[part\x3dvalue]{font-weight:600;font-size:var(--x-stat-value-size);color:var(--x-stat-value-color);}[part\x3dhint]{font-size:var(--x-stat-hint-size);color:var(--x-stat-hint-color);}[part\x3dbase][data-loading\x3d'true']{opacity:var(--x-stat-loading-opacity);}@media (prefers-reduced-motion:reduce){[part\x3dbase]{transition:none;}}";
|
|
7
|
+
d.setAttribute("part","base");e.setAttribute("part","icon");g.setAttribute("part","body");h.setAttribute("part","label");k.setAttribute("part","value");m.setAttribute("part","hint");w.setAttribute("name","icon");z.setAttribute("name","label");A.setAttribute("name","value");D.setAttribute("name","hint");e.appendChild(w);h.appendChild(z);h.appendChild(q);k.appendChild(A);k.appendChild(r);m.appendChild(D);m.appendChild(v);g.appendChild(h);g.appendChild(k);g.appendChild(m);g.appendChild(G);d.appendChild(e);
|
|
8
|
+
d.appendChild(g);b.appendChild(c);b.appendChild(d);a.__x_stat_root=b;a.__x_stat_base=d;a.__x_stat_label=q;a.__x_stat_value=r;a.__x_stat_hint=v;a.__x_stat_initialized=!0}Vy(a);return a},Xy=function(a,b){Object.defineProperty(a,b,{get:function(){var c=this.getAttribute(b);return $APP.n(c)?c:""},set:function(c){return $APP.n(c)?this.setAttribute(b,""+$APP.T.g(c)):this.removeAttribute(b)},enumerable:!0,configurable:!0})},Yy=function(a){Xy(a,"variant");Xy(a,"align");Xy(a,"size");Xy(a,"emphasis");Xy(a,
|
|
9
|
+
"trend");Xy(a,"label");Xy(a,"value");Xy(a,"hint");Object.defineProperty(a,"loading",{get:function(){return this.hasAttribute("loading")},set:function(b){return $APP.n(b)?this.setAttribute("loading",""):this.removeAttribute("loading")},enumerable:!0,configurable:!0})},$y=function(){var a=class extends HTMLElement{};a.observedAttributes=Zy;a.prototype.connectedCallback=function(){return Wy(this)};a.prototype.attributeChangedCallback=function(){return $APP.l(this,"__x_stat_initialized")===!0?Vy(this):
|
|
10
|
+
Wy(this)};Yy(a.prototype);return a},az=function(){return $APP.n(customElements.get("x-stat"))?null:customElements.define("x-stat",$y())},Jy=new $APP.M(null,"emphasis","emphasis",293543451),Qy=new $APP.M(null,"aria-busy","aria-busy",793864247),Ky=new $APP.M(null,"trend","trend",54563841);var Zy="variant align size emphasis trend loading label value hint".split(" "),Ly=new $APP.S(null,new $APP.Q(null,5,["warning",null,"positive",null,"subtle",null,"danger",null,"default",null],null),null),My=new $APP.S(null,new $APP.Q(null,3,["center",null,"start",null,"end",null],null),null),Ny=new $APP.S(null,new $APP.Q(null,3,["md",null,"lg",null,"sm",null],null),null),Oy=new $APP.S(null,new $APP.Q(null,2,["high",null,"normal",null],null),null),Py=new $APP.S(null,new $APP.Q(null,3,["neutral",null,
|
|
11
|
+
"up",null,"down",null],null),null);
|
|
12
|
+
$APP.Xe([Ky,$APP.Xh,$APP.Ng,$APP.U,$APP.ei,$APP.sg,$APP.Ah,$APP.W,Jy],[new $APP.Q(null,4,[$APP.mh,"trend",$APP.Z,$APP.X,$APP.Sg,"neutral",$APP.Ug,!0],null),new $APP.Q(null,4,[$APP.mh,"align",$APP.Z,$APP.X,$APP.Sg,"start",$APP.Ug,!0],null),new $APP.Q(null,4,[$APP.mh,"variant",$APP.Z,$APP.X,$APP.Sg,"default",$APP.Ug,!0],null),new $APP.Q(null,4,[$APP.mh,"value",$APP.Z,$APP.X,$APP.Sg,"",$APP.Ug,!0],null),new $APP.Q(null,4,[$APP.mh,"hint",$APP.Z,$APP.X,$APP.Sg,"",$APP.Ug,!0],null),new $APP.Q(null,4,[$APP.mh,
|
|
13
|
+
"size",$APP.Z,$APP.X,$APP.Sg,"md",$APP.Ug,!0],null),new $APP.Q(null,4,[$APP.mh,"loading",$APP.Z,$APP.Di,$APP.Sg,!1,$APP.Ug,!0],null),new $APP.Q(null,4,[$APP.mh,"label",$APP.Z,$APP.X,$APP.Sg,"",$APP.Ug,!0],null),new $APP.Q(null,4,[$APP.mh,"emphasis",$APP.Z,$APP.X,$APP.Sg,"normal",$APP.Ug,!0],null)]);$APP.ja("baredom.exports.x_stat.init",az);export const init=az;
|