@vanelsas/baredom 1.2.0 → 1.4.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 +29 -0
- package/README.md +7 -5
- package/dist/base.js +397 -362
- package/dist/x-alert.js +19 -19
- package/dist/x-avatar-group.js +11 -11
- package/dist/x-avatar.js +15 -15
- package/dist/x-badge.js +11 -11
- package/dist/x-bento-grid.js +6 -0
- package/dist/x-bento-item.js +5 -0
- package/dist/x-breadcrumbs.js +14 -14
- package/dist/x-button.js +16 -16
- package/dist/x-cancel-dialogue.js +17 -17
- package/dist/x-card.js +7 -7
- package/dist/x-chart.js +48 -48
- 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 +19 -19
- package/dist/x-copy.js +23 -23
- package/dist/x-currency-field.js +22 -22
- package/dist/x-date-picker.js +41 -41
- package/dist/x-divider.js +13 -13
- package/dist/x-drawer.js +12 -12
- 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-gaussian-blur.js +19 -32
- package/dist/x-grid.js +6 -7
- package/dist/x-kinetic-font.js +29 -0
- package/dist/x-kinetic-typography.js +39 -61
- package/dist/x-liquid-dock.js +40 -0
- package/dist/x-liquid-fill.js +45 -0
- package/dist/x-liquid-glass.js +48 -0
- package/dist/x-menu-item.js +10 -10
- package/dist/x-menu.js +11 -11
- package/dist/x-metaball-cursor.js +29 -0
- package/dist/x-modal.js +13 -13
- package/dist/x-morph-stack.js +41 -0
- package/dist/x-navbar.js +13 -13
- package/dist/x-neural-glow.js +35 -0
- package/dist/x-notification-center.js +9 -10
- package/dist/x-organic-divider.js +19 -19
- package/dist/x-organic-progress.js +40 -0
- package/dist/x-organic-shape.js +14 -14
- package/dist/x-pagination.js +16 -16
- package/dist/x-popover.js +15 -15
- package/dist/x-progress-circle.js +9 -9
- package/dist/x-progress.js +10 -10
- package/dist/x-radio.js +11 -11
- package/dist/x-ripple-effect.js +12 -13
- package/dist/x-scroll-parallax.js +19 -19
- package/dist/x-scroll-stack.js +18 -18
- package/dist/x-scroll-story.js +36 -36
- package/dist/x-scroll-timeline.js +50 -50
- package/dist/x-scroll.js +41 -41
- package/dist/x-search-field.js +14 -14
- package/dist/x-select.js +9 -9
- package/dist/x-sidebar.js +16 -16
- package/dist/x-skeleton.js +6 -6
- package/dist/x-slider.js +16 -16
- package/dist/x-soft-body.js +22 -0
- package/dist/x-spacer.js +5 -5
- package/dist/x-spinner.js +5 -5
- package/dist/x-splash.js +15 -0
- package/dist/x-stat.js +11 -11
- 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 +22 -23
- package/dist/x-table-row.js +10 -10
- package/dist/x-table.js +16 -16
- package/dist/x-tabs.js +11 -11
- package/dist/x-text-area.js +18 -18
- package/dist/x-timeline-item.js +24 -24
- package/dist/x-timeline.js +9 -9
- package/dist/x-toast.js +24 -24
- package/dist/x-toaster.js +8 -8
- package/dist/x-typography.js +8 -8
- package/package.json +50 -2
package/dist/x-table-cell.js
CHANGED
|
@@ -1,26 +1,25 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
3
|
-
"header"))?b:a},
|
|
2
|
+
var aJ=function(a,b,c){a=typeof a==="string"?a.trim().toLowerCase():null;return $APP.J(b,a)?a:c},bJ=function(a){return typeof a==="string"?(a=parseInt(a.trim(),10),$APP.t(isNaN(a))&&a>0?Math.floor(a):1):1},eJ=function(a){var b=$APP.N(a);a=$APP.G(b,cJ);b=$APP.G(b,dJ);if($APP.r($APP.r(a)?a:$APP.O(b,"none")))switch(b){case "asc":return"ascending";case "desc":return"descending";default:return"none"}else return null},fJ=function(a){var b=$APP.N(a);a=$APP.G(b,$APP.Z);b=$APP.G(b,cJ);return(a=$APP.D.i(a,
|
|
3
|
+
"header"))?b:a},gJ=function(a){switch(a){case "none":return"asc";case "asc":return"desc";case "desc":return"none";default:return"asc"}},hJ=function(a){switch(a){case "none":return"Sort ascending";case "asc":return"Sort descending";case "desc":return"Remove sort";default:return"Sort ascending"}},lJ=function(a){var b=$APP.l(a,"__xTableCellRefs");if($APP.r(b))return b;b=a.attachShadow({mode:"open"});var c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("span"),
|
|
4
4
|
g=document.createElement("slot"),h=document.createElement("button"),k=document.createElement("slot"),m=document.createElement("span");c.textContent=":host{display:block;box-sizing:border-box;color-scheme:light dark;--x-table-cell-padding:0.5rem 0.75rem;--x-table-cell-bg:transparent;--x-table-cell-header-bg:rgba(0,0,0,0.04);--x-table-cell-border-color:rgba(0,0,0,0.1);--x-table-cell-border-width:1px;--x-table-cell-color:inherit;--x-table-cell-header-color:inherit;--x-table-cell-font-size:inherit;--x-table-cell-header-font-weight:600;--x-table-cell-min-width:0;--x-table-cell-max-width:none;--x-table-cell-sort-color:rgba(0,0,0,0.4);--x-table-cell-sort-hover-color:rgba(0,0,0,0.7);--x-table-cell-focus-ring:rgba(59,130,246,0.5);--x-table-cell-transition-duration:150ms;--x-table-cell-sticky-bg:#ffffff;--x-table-cell-disabled-opacity:0.45;min-width:var(--x-table-cell-min-width);max-width:var(--x-table-cell-max-width);}@media (prefers-color-scheme:dark){:host{--x-table-cell-header-bg:rgba(255,255,255,0.06);--x-table-cell-border-color:rgba(255,255,255,0.1);--x-table-cell-sort-color:rgba(255,255,255,0.4);--x-table-cell-sort-hover-color:rgba(255,255,255,0.7);--x-table-cell-sticky-bg:#1f2937;}}:host([data-sticky\x3d'start']){position:sticky;inset-inline-start:0;background:var(--x-table-cell-sticky-bg);z-index:1;}:host([data-sticky\x3d'end']){position:sticky;inset-inline-end:0;background:var(--x-table-cell-sticky-bg);z-index:1;}:host([disabled]){opacity:var(--x-table-cell-disabled-opacity);}[part\x3dcell]{display:flex;align-items:center;justify-content:flex-start;padding:var(--x-table-cell-padding);background:var(--x-table-cell-bg);border-bottom:var(--x-table-cell-border-width) solid var(--x-table-cell-border-color);color:var(--x-table-cell-color);font-size:var(--x-table-cell-font-size);min-width:0;box-sizing:border-box;}:host([data-type\x3d'header']) [part\x3dcell]{background:var(--x-table-cell-header-bg);color:var(--x-table-cell-header-color);font-weight:var(--x-table-cell-header-font-weight);}:host([data-align\x3d'start']) [part\x3dcell]{justify-content:flex-start;}:host([data-align\x3d'center']) [part\x3dcell]{justify-content:center;}:host([data-align\x3d'end']) [part\x3dcell]{justify-content:flex-end;}:host([data-valign\x3d'top']) [part\x3dcell]{align-items:flex-start;}:host([data-valign\x3d'middle']) [part\x3dcell]{align-items:center;}:host([data-valign\x3d'bottom']) [part\x3dcell]{align-items:flex-end;}[part\x3dcontent]{flex:1 1 auto;min-width:0;}:host([data-truncate]) [part\x3dcontent]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}[part\x3dsort-btn]{flex:0 0 auto;appearance:none;border:0;background:transparent;padding:2px;margin:0 0 0 4px;cursor:pointer;color:var(--x-table-cell-sort-color);display:inline-flex;align-items:center;justify-content:center;border-radius:4px;transition:color var(--x-table-cell-transition-duration) ease;line-height:1;}[part\x3dsort-btn]:hover{color:var(--x-table-cell-sort-hover-color);}[part\x3dsort-btn]:focus{outline:none;}[part\x3dsort-btn]:focus-visible{outline:2px solid var(--x-table-cell-focus-ring);outline-offset:2px;}[part\x3dsort-btn][disabled]{cursor:default;pointer-events:none;opacity:0.4;}[part\x3dsort-btn][hidden]{display:none !important;}@media (prefers-reduced-motion:reduce){[part\x3dsort-btn]{transition:none !important;}}";
|
|
5
5
|
d.setAttribute("part","cell");e.setAttribute("part","content");e.appendChild(g);h.setAttribute("part","sort-btn");h.setAttribute("type","button");k.setAttribute("name","sort-icon");m.setAttribute("part","sort-icon-default");m.setAttribute("aria-hidden","true");m.innerHTML='\x3csvg width\x3d"16" height\x3d"16" viewBox\x3d"0 0 16 16" fill\x3d"currentColor" aria-hidden\x3d"true"\x3e\x3cpath d\x3d"M8 3L5 7h6L8 3zm0 10l3-4H5l3 4z"/\x3e\x3c/svg\x3e';k.appendChild(m);h.appendChild(k);d.appendChild(e);d.appendChild(h);
|
|
6
|
-
b.appendChild(c);b.appendChild(d);a.__xTableCellRefs=new $APP.
|
|
7
|
-
var b=$APP.N(a);a=$APP.
|
|
8
|
-
var c=$APP.
|
|
9
|
-
p):a.removeAttribute("aria-sort");$APP.
|
|
10
|
-
m=$APP.
|
|
11
|
-
break a;default:e='\x3csvg width\x3d"16" height\x3d"16" viewBox\x3d"0 0 16 16" fill\x3d"currentColor" aria-hidden\x3d"true"\x3e\x3cpath d\x3d"M8 3L5 7h6L8 3zm0 10l3-4H5l3 4z"/\x3e\x3c/svg\x3e'}h.innerHTML=e;a.__xTableCellModel=b}},
|
|
12
|
-
return $APP.
|
|
13
|
-
null},
|
|
14
|
-
Object.defineProperty(a,"align",{get:function(){var b=this.getAttribute("align");return $APP.
|
|
15
|
-
"truncate",{get:function(){return this.hasAttribute("truncate")},set:function(b){return $APP.
|
|
16
|
-
set:function(b){return $APP.
|
|
17
|
-
b>0?this.setAttribute("col-span",""+$APP.S.g(b)):this.removeAttribute("col-span")},enumerable:!0,configurable:!0});Object.defineProperty(a,"rowSpan",{get:function(){return
|
|
18
|
-
set:function(b){return $APP.
|
|
19
|
-
|
|
20
|
-
customElements.define("x-table-cell",
|
|
21
|
-
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
"desc",null,"asc",null],null),null);$APP.ja("baredom.exports.x_table_cell.init",WD);export const init=WD;
|
|
6
|
+
b.appendChild(c);b.appendChild(d);a.__xTableCellRefs=new $APP.P(null,5,[$APP.bi,b,iJ,d,$APP.Vh,e,jJ,h,kJ,m],null);return $APP.l(a,"__xTableCellRefs")},AJ=function(a){a=$APP.Q([$APP.qi,mJ,nJ,oJ,cJ,$APP.fi,$APP.Uh,pJ,qJ,$APP.W,rJ],[a.getAttribute("align"),a.getAttribute("row-span"),a.getAttribute("valign"),a.getAttribute("sort-direction"),a.hasAttribute("sortable"),a.hasAttribute("truncate"),a.getAttribute("type"),a.getAttribute("sticky"),a.getAttribute("scope"),a.hasAttribute("disabled"),a.getAttribute("col-span")]);
|
|
7
|
+
var b=$APP.N(a);a=$APP.G(b,$APP.W);var c=$APP.G(b,rJ),d=$APP.G(b,$APP.qi),e=$APP.G(b,mJ),g=$APP.G(b,nJ),h=$APP.G(b,oJ),k=$APP.G(b,cJ),m=$APP.G(b,$APP.fi),p=$APP.G(b,$APP.Uh),q=$APP.G(b,pJ);b=$APP.G(b,qJ);return $APP.Q([$APP.Qi,dJ,sJ,$APP.Z,tJ,cJ,$APP.Lk,$APP.ul,$APP.fi,$APP.W,$APP.Ch],[aJ(d,uJ,"start"),aJ(h,vJ,"none"),aJ(g,wJ,"middle"),aJ(p,xJ,"data"),aJ(b,yJ,"col"),$APP.I(k),aJ(q,zJ,"none"),bJ(c),$APP.I(m),$APP.I(a),bJ(e)])},BJ=function(a){var b=AJ(a);if($APP.O($APP.l(a,"__xTableCellModel"),b)){b=
|
|
8
|
+
$APP.N(b);var c=$APP.G(b,$APP.ul),d=$APP.G(b,$APP.Ch),e=$APP.G(b,$APP.W),g=$APP.G(b,dJ),h=lJ(a);h=$APP.N(h);var k=$APP.G(h,jJ);h=$APP.G(h,kJ);var m=fJ(b),p=$APP.N(b),q=$APP.G(p,$APP.Z),w=$APP.G(p,$APP.Qi),x=$APP.G(p,sJ),y=$APP.G(p,$APP.Lk),A=$APP.G(p,$APP.fi),C=$APP.G(p,$APP.W);$APP.G(p,cJ);$APP.G(p,dJ);var E=a.setAttribute,H=$APP.N(p);var F=$APP.G(H,$APP.Z);H=$APP.G(H,tJ);F=$APP.D.i(F,"header")?$APP.D.i(H,"row")||$APP.D.i(H,"rowgroup")?"rowheader":"columnheader":"cell";E.call(a,"role",F);p=eJ(p);
|
|
9
|
+
$APP.r(p)?a.setAttribute("aria-sort",p):a.removeAttribute("aria-sort");$APP.r(C)?a.setAttribute("aria-disabled","true"):a.removeAttribute("aria-disabled");a.setAttribute("data-type",q);a.setAttribute("data-align",w);a.setAttribute("data-valign",x);$APP.D.i(y,"none")?a.removeAttribute("data-sticky"):a.setAttribute("data-sticky",y);$APP.r(A)?a.setAttribute("data-truncate",""):a.removeAttribute("data-truncate");a.style.gridColumn=c>1?"span "+$APP.S.g(c):"";a.style.gridRow=d>1?"span "+$APP.S.g(d):"";
|
|
10
|
+
k.hidden=$APP.t(m);c=parseInt;q=$APP.N(b);m=$APP.G(q,$APP.Z);d=$APP.G(q,cJ);q=$APP.G(q,$APP.W);m=$APP.D.i(m,"header");k.tabIndex=c($APP.r(m?$APP.r(d)?$APP.t(q):d:m)?"0":"-1",10);k.setAttribute("aria-label",hJ(g));k.disabled=$APP.I(e);a:switch(e=$APP.N(b),$APP.G(e,dJ)){case "asc":e='\x3csvg width\x3d"16" height\x3d"16" viewBox\x3d"0 0 16 16" fill\x3d"currentColor" aria-hidden\x3d"true"\x3e\x3cpath d\x3d"M8 4L4 10h8L8 4z"/\x3e\x3c/svg\x3e';break a;case "desc":e='\x3csvg width\x3d"16" height\x3d"16" viewBox\x3d"0 0 16 16" fill\x3d"currentColor" aria-hidden\x3d"true"\x3e\x3cpath d\x3d"M8 12l4-6H4l4 6z"/\x3e\x3c/svg\x3e';
|
|
11
|
+
break a;default:e='\x3csvg width\x3d"16" height\x3d"16" viewBox\x3d"0 0 16 16" fill\x3d"currentColor" aria-hidden\x3d"true"\x3e\x3cpath d\x3d"M8 3L5 7h6L8 3zm0 10l3-4H5l3 4z"/\x3e\x3c/svg\x3e'}h.innerHTML=e;a.__xTableCellModel=b}},CJ=function(a){var b=a.getAttribute("sort-direction");b=aJ(b,vJ,"none");b=new CustomEvent("x-table-cell-sort",{detail:{direction:gJ(b),previousDirection:b},bubbles:!0,composed:!0,cancelable:!0});a.dispatchEvent(b)},DJ=function(a){var b=function(){var c=$APP.l(a,"__xTableCellModel");
|
|
12
|
+
return $APP.r(c)?c:AJ(a)}();$APP.r(function(){var c=fJ(b);return $APP.r(c)?$APP.t($APP.W.g(b)):c}())&&CJ(a);return null},EJ=function(a){function b(){return DJ(a)}var c=lJ(a);c=$APP.N(c);$APP.G(c,jJ).addEventListener("click",b);$APP.n(a,"__xTableCellHandlers",{"sort-click":b})},FJ=function(a){var b=$APP.l(a,"__xTableCellHandlers"),c=$APP.l(a,"__xTableCellRefs");$APP.r($APP.r(b)?c:b)&&(c=$APP.N(c),c=$APP.G(c,jJ),b=$APP.l(b,"sort-click"),$APP.r(b)&&c.removeEventListener("click",b));a.__xTableCellHandlers=
|
|
13
|
+
null},GJ=function(a){Object.defineProperty(a,"type",{get:function(){var b=this.getAttribute("type");return $APP.r(b)?b:"data"},set:function(b){return $APP.r(b)?this.setAttribute("type",""+$APP.S.g(b)):this.removeAttribute("type")},enumerable:!0,configurable:!0});Object.defineProperty(a,"scope",{get:function(){var b=this.getAttribute("scope");return $APP.r(b)?b:"col"},set:function(b){return $APP.r(b)?this.setAttribute("scope",""+$APP.S.g(b)):this.removeAttribute("scope")},enumerable:!0,configurable:!0});
|
|
14
|
+
Object.defineProperty(a,"align",{get:function(){var b=this.getAttribute("align");return $APP.r(b)?b:"start"},set:function(b){return $APP.r(b)?this.setAttribute("align",""+$APP.S.g(b)):this.removeAttribute("align")},enumerable:!0,configurable:!0});Object.defineProperty(a,"valign",{get:function(){var b=this.getAttribute("valign");return $APP.r(b)?b:"middle"},set:function(b){return $APP.r(b)?this.setAttribute("valign",""+$APP.S.g(b)):this.removeAttribute("valign")},enumerable:!0,configurable:!0});Object.defineProperty(a,
|
|
15
|
+
"truncate",{get:function(){return this.hasAttribute("truncate")},set:function(b){return $APP.r(b)?this.setAttribute("truncate",""):this.removeAttribute("truncate")},enumerable:!0,configurable:!0});Object.defineProperty(a,"sticky",{get:function(){var b=this.getAttribute("sticky");return $APP.r(b)?b:"none"},set:function(b){return $APP.r(b)?this.setAttribute("sticky",""+$APP.S.g(b)):this.removeAttribute("sticky")},enumerable:!0,configurable:!0});Object.defineProperty(a,"sortable",{get:function(){return this.hasAttribute("sortable")},
|
|
16
|
+
set:function(b){return $APP.r(b)?this.setAttribute("sortable",""):this.removeAttribute("sortable")},enumerable:!0,configurable:!0});Object.defineProperty(a,"disabled",{get:function(){return this.hasAttribute("disabled")},set:function(b){return $APP.r(b)?this.setAttribute("disabled",""):this.removeAttribute("disabled")},enumerable:!0,configurable:!0});Object.defineProperty(a,"colSpan",{get:function(){return bJ(this.getAttribute("col-span"))},set:function(b){b=parseInt(b,10);return $APP.t(isNaN(b))&&
|
|
17
|
+
b>0?this.setAttribute("col-span",""+$APP.S.g(b)):this.removeAttribute("col-span")},enumerable:!0,configurable:!0});Object.defineProperty(a,"rowSpan",{get:function(){return bJ(this.getAttribute("row-span"))},set:function(b){b=parseInt(b,10);return $APP.t(isNaN(b))&&b>0?this.setAttribute("row-span",""+$APP.S.g(b)):this.removeAttribute("row-span")},enumerable:!0,configurable:!0});Object.defineProperty(a,"sortDirection",{get:function(){var b=this.getAttribute("sort-direction");return $APP.r(b)?b:"none"},
|
|
18
|
+
set:function(b){return $APP.r(b)?this.setAttribute("sort-direction",""+$APP.S.g(b)):this.removeAttribute("sort-direction")},enumerable:!0,configurable:!0})},KJ=function(){var a=class extends HTMLElement{};a.observedAttributes=HJ;a.prototype.connectedCallback=function(){lJ(this);FJ(this);EJ(this);BJ(this);var b=$APP.l(this,"__xTableCellModel");var c=$APP.r(b)?b:AJ(this);b=this.dispatchEvent;var d=CustomEvent,e=$APP.N(c);c=$APP.G(e,$APP.Z);var g=$APP.G(e,tJ),h=$APP.G(e,$APP.ul),k=$APP.G(e,$APP.Ch);
|
|
19
|
+
e=$APP.G(e,$APP.Qi);b.call(this,new d("x-table-cell-connected",{detail:$APP.nh(new $APP.P(null,5,[$APP.Z,c,tJ,g,IJ,h,JJ,k,$APP.Qi,e],null)),bubbles:!0,composed:!0,cancelable:!1}));return null};a.prototype.disconnectedCallback=function(){FJ(this);this.dispatchEvent(new CustomEvent("x-table-cell-disconnected",{detail:{},bubbles:!0,composed:!0,cancelable:!1}));return null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.O(c,d)&&BJ(this);return null};GJ(a.prototype);return a},LJ=function(){$APP.r(customElements.get("x-table-cell"))||
|
|
20
|
+
customElements.define("x-table-cell",KJ());return null},jJ=new $APP.M(null,"sort-btn","sort-btn",1913954560),IJ=new $APP.M(null,"colSpan","colSpan",872137394),iJ=new $APP.M(null,"cell","cell",764245084),sJ=new $APP.M(null,"valign","valign",1485197511),kJ=new $APP.M(null,"sort-icon-default","sort-icon-default",-596209230),rJ=new $APP.M(null,"col-span-raw","col-span-raw",1425293661),oJ=new $APP.M(null,"sort-direction-raw","sort-direction-raw",-1822100883),pJ=new $APP.M(null,"sticky-raw","sticky-raw",
|
|
21
|
+
1857578519),mJ=new $APP.M(null,"row-span-raw","row-span-raw",-1130003707),qJ=new $APP.M(null,"scope-raw","scope-raw",-773628648),dJ=new $APP.M(null,"sort-direction","sort-direction",-1635889628),tJ=new $APP.M(null,"scope","scope",-439358418),cJ=new $APP.M(null,"sortable?","sortable?",291547474),nJ=new $APP.M(null,"valign-raw","valign-raw",-1083375124),JJ=new $APP.M(null,"rowSpan","rowSpan",826884002);var HJ="type scope align valign col-span row-span truncate sticky sortable sort-direction disabled".split(" ");
|
|
22
|
+
$APP.Q([$APP.Qi,JJ,$APP.ni,$APP.gj,sJ,$APP.Z,tJ,IJ,$APP.Lk,new $APP.M(null,"sortable","sortable",2109633621),new $APP.M(null,"sortDirection","sortDirection",-45816999)],[new $APP.P(null,1,[$APP.Z,$APP.Y],null),new $APP.P(null,1,[$APP.Z,$APP.V],null),new $APP.P(null,1,[$APP.Z,$APP.qj],null),new $APP.P(null,1,[$APP.Z,$APP.qj],null),new $APP.P(null,1,[$APP.Z,$APP.Y],null),new $APP.P(null,1,[$APP.Z,$APP.Y],null),new $APP.P(null,1,[$APP.Z,$APP.Y],null),new $APP.P(null,1,[$APP.Z,$APP.V],null),new $APP.P(null,
|
|
23
|
+
1,[$APP.Z,$APP.Y],null),new $APP.P(null,1,[$APP.Z,$APP.qj],null),new $APP.P(null,1,[$APP.Z,$APP.Y],null)]);$APP.Sd(["x-table-cell-sort",new $APP.P(null,2,[$APP.U,new $APP.P(null,2,[$APP.Ni,$APP.Y,$APP.yl,$APP.Y],null),$APP.kl,!0],null),"x-table-cell-connected",new $APP.P(null,1,[$APP.U,new $APP.P(null,5,[$APP.Z,$APP.Y,tJ,$APP.Y,IJ,$APP.V,JJ,$APP.V,$APP.Qi,$APP.Y],null)],null),"x-table-cell-disconnected",new $APP.P(null,1,[$APP.U,$APP.Td],null)]);
|
|
24
|
+
var xJ=new $APP.R(null,new $APP.P(null,2,["data",null,"header",null],null),null),yJ=new $APP.R(null,new $APP.P(null,4,["rowgroup",null,"col",null,"row",null,"colgroup",null],null),null),uJ=new $APP.R(null,new $APP.P(null,3,["center",null,"start",null,"end",null],null),null),wJ=new $APP.R(null,new $APP.P(null,3,["top",null,"middle",null,"bottom",null],null),null),zJ=new $APP.R(null,new $APP.P(null,3,["none",null,"start",null,"end",null],null),null),vJ=new $APP.R(null,new $APP.P(null,3,["none",null,
|
|
25
|
+
"desc",null,"asc",null],null),null);$APP.ka("baredom.exports.x_table_cell.init",LJ);export const init=LJ;
|
package/dist/x-table-row.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
3
|
-
b.appendChild(c);b.appendChild(d);a.__xTableRowRefs=new $APP.
|
|
4
|
-
"__xTableRowModel"),b)){
|
|
5
|
-
a.setAttribute("data-selected",""):a.removeAttribute("data-selected");$APP.
|
|
6
|
-
null)),bubbles:!0,composed:!0,cancelable:!0}))},
|
|
7
|
-
if($APP.
|
|
8
|
-
set:function(b){return $APP.
|
|
9
|
-
b>0?this.setAttribute("row-index",""+$APP.S.g(b)):this.removeAttribute("row-index")},enumerable:!0,configurable:!0})},
|
|
10
|
-
4,[$APP.
|
|
11
|
-
|
|
2
|
+
var Vv=function(a){return typeof a==="string"?(a=parseInt(a.trim(),10),$APP.t(isNaN(a))&&a>0?Math.floor(a):null):null},Wv=function(a){var b=$APP.N(a);a=$APP.G(b,$APP.Mk);b=$APP.G(b,$APP.W);return $APP.r(a)?$APP.t(b):a},Xv=function(a){if(!$APP.r($APP.l(a,"__xTableRowRefs"))){var b=a.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("slot");c.textContent=":host{display:grid;grid-template-columns:subgrid;grid-column:1 / -1;box-sizing:border-box;color-scheme:light dark;--x-table-row-bg:transparent;--x-table-row-hover-bg:rgba(0,0,0,0.03);--x-table-row-selected-bg:rgba(59,130,246,0.08);--x-table-row-selected-hover-bg:rgba(59,130,246,0.12);--x-table-row-focus-ring:rgba(59,130,246,0.5);--x-table-row-transition-duration:150ms;--x-table-row-disabled-opacity:0.45;--x-table-row-cursor:pointer;background:var(--x-table-row-bg);transition:background var(--x-table-row-transition-duration) ease;}@media (prefers-color-scheme:dark){:host{--x-table-row-hover-bg:rgba(255,255,255,0.04);--x-table-row-selected-bg:rgba(99,160,255,0.12);--x-table-row-selected-hover-bg:rgba(99,160,255,0.16);}}:host([data-selected]){background:var(--x-table-row-selected-bg);}:host([data-interactive]){cursor:var(--x-table-row-cursor);}:host([data-interactive]:hover){background:var(--x-table-row-hover-bg);}:host([data-interactive][data-selected]:hover){background:var(--x-table-row-selected-hover-bg);}:host([data-interactive]:focus){outline:none;}:host([data-interactive]:focus-visible){outline:2px solid var(--x-table-row-focus-ring);outline-offset:-2px;}:host([disabled]){opacity:var(--x-table-row-disabled-opacity);pointer-events:none;}slot{display:contents;}@media (prefers-reduced-motion:reduce){:host{transition:none !important;}}";
|
|
3
|
+
b.appendChild(c);b.appendChild(d);a.__xTableRowRefs=new $APP.P(null,2,[$APP.bi,b,$APP.Jk,d],null)}},$v=function(a){a=new $APP.P(null,4,[$APP.yi,a.hasAttribute("selected"),$APP.W,a.hasAttribute("disabled"),$APP.Mk,a.hasAttribute("interactive"),Yv,a.getAttribute("row-index")],null);var b=$APP.N(a);a=$APP.G(b,$APP.yi);var c=$APP.G(b,$APP.W),d=$APP.G(b,$APP.Mk);b=$APP.G(b,Yv);return new $APP.P(null,4,[$APP.yi,$APP.I(a),$APP.W,$APP.I(c),$APP.Mk,$APP.I(d),Zv,Vv(b)],null)},aw=function(a){var b=$v(a);if($APP.O($APP.l(a,
|
|
4
|
+
"__xTableRowModel"),b)){Xv(a);var c=$APP.N(b),d=$APP.G(c,$APP.yi),e=$APP.G(c,$APP.W),g=$APP.G(c,$APP.Mk),h=$APP.G(c,Zv);a.setAttribute("role","row");var k=$APP.N(c);var m=$APP.G(k,$APP.yi);k=$APP.G(k,$APP.Mk);m=$APP.r(m)?"true":$APP.r(k)?"false":null;$APP.r(m)?a.setAttribute("aria-selected",m):a.removeAttribute("aria-selected");$APP.r(e)?a.setAttribute("aria-disabled","true"):a.removeAttribute("aria-disabled");h!=null?a.setAttribute("aria-rowindex",""+$APP.S.g(h)):a.removeAttribute("aria-rowindex");
|
|
5
|
+
$APP.r(d)?a.setAttribute("data-selected",""):a.removeAttribute("data-selected");$APP.r(g)?a.setAttribute("data-interactive",""):a.removeAttribute("data-interactive");a.tabIndex=$APP.r(Wv(c))?0:-1;a.__xTableRowModel=b}},bw=function(a){var b=$APP.l(a,"__xTableRowModel");var c=$APP.r(b)?b:$v(a);b=a.dispatchEvent;var d=CustomEvent,e=$APP.N(c);c=$APP.G(e,$APP.yi);var g=$APP.G(e,$APP.W);e=$APP.G(e,Zv);b.call(a,new d("x-table-row-click",{detail:$APP.nh(new $APP.P(null,3,[$APP.aj,$APP.r(e)?e:0,$APP.zj,c,
|
|
6
|
+
$APP.gj,g],null)),bubbles:!0,composed:!0,cancelable:!0}))},cw=function(a){function b(d){var e=d.key;if($APP.D.i(e,"Enter")||$APP.D.i(e," "))e=$APP.l(a,"__xTableRowModel"),e=$APP.r(e)?e:$v(a),$APP.r(Wv(e))&&(d.preventDefault(),bw(a));return null}function c(){var d=$APP.l(a,"__xTableRowModel");d=$APP.r(d)?d:$v(a);$APP.r(Wv(d))&&bw(a);return null}a.addEventListener("click",c);a.addEventListener("keydown",b);$APP.n(a,"__xTableRowHandlers",{click:c,keydown:b})},dw=function(a){var b=$APP.l(a,"__xTableRowHandlers");
|
|
7
|
+
if($APP.r(b)){var c=$APP.l(b,"click");b=$APP.l(b,"keydown");$APP.r(c)&&a.removeEventListener("click",c);$APP.r(b)&&a.removeEventListener("keydown",b)}a.__xTableRowHandlers=null},ew=function(a){Object.defineProperty(a,"selected",{get:function(){return this.hasAttribute("selected")},set:function(b){return $APP.r(b)?this.setAttribute("selected",""):this.removeAttribute("selected")},enumerable:!0,configurable:!0});Object.defineProperty(a,"disabled",{get:function(){return this.hasAttribute("disabled")},
|
|
8
|
+
set:function(b){return $APP.r(b)?this.setAttribute("disabled",""):this.removeAttribute("disabled")},enumerable:!0,configurable:!0});Object.defineProperty(a,"interactive",{get:function(){return this.hasAttribute("interactive")},set:function(b){return $APP.r(b)?this.setAttribute("interactive",""):this.removeAttribute("interactive")},enumerable:!0,configurable:!0});Object.defineProperty(a,"rowIndex",{get:function(){return Vv(this.getAttribute("row-index"))},set:function(b){b=parseInt(b,10);return $APP.t(isNaN(b))&&
|
|
9
|
+
b>0?this.setAttribute("row-index",""+$APP.S.g(b)):this.removeAttribute("row-index")},enumerable:!0,configurable:!0})},gw=function(){var a=class extends HTMLElement{};a.observedAttributes=fw;a.prototype.connectedCallback=function(){Xv(this);dw(this);cw(this);aw(this);var b=$APP.l(this,"__xTableRowModel");var c=$APP.r(b)?b:$v(this);b=this.dispatchEvent;var d=CustomEvent,e=$APP.N(c);c=$APP.G(e,$APP.yi);var g=$APP.G(e,$APP.W),h=$APP.G(e,$APP.Mk);e=$APP.G(e,Zv);b.call(this,new d("x-table-row-connected",
|
|
10
|
+
{detail:$APP.nh(new $APP.P(null,4,[$APP.aj,$APP.r(e)?e:0,$APP.zj,c,$APP.gj,g,$APP.Gi,h],null)),bubbles:!0,composed:!0,cancelable:!1}));return null};a.prototype.disconnectedCallback=function(){dw(this);document.dispatchEvent(new CustomEvent("x-table-row-disconnected",{detail:{},bubbles:!1,composed:!1,cancelable:!1}));return null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.O(c,d)&&aw(this);return null};ew(a.prototype);return a},hw=function(){$APP.r(customElements.get("x-table-row"))||
|
|
11
|
+
customElements.define("x-table-row",gw());return null},Zv=new $APP.M(null,"row-index","row-index",-828710296),Yv=new $APP.M(null,"row-index-raw","row-index-raw",1490649093);var fw=["selected","disabled","interactive","row-index"];$APP.Sd(["x-table-row-click",new $APP.P(null,2,[$APP.U,new $APP.P(null,3,[$APP.aj,$APP.V,$APP.zj,$APP.qj,$APP.gj,$APP.qj],null),$APP.kl,!0],null),"x-table-row-connected",new $APP.P(null,2,[$APP.U,new $APP.P(null,4,[$APP.aj,$APP.V,$APP.zj,$APP.qj,$APP.gj,$APP.qj,$APP.Gi,$APP.qj],null),$APP.kl,!1],null),"x-table-row-disconnected",new $APP.P(null,2,[$APP.U,$APP.Td,$APP.kl,!1],null)]);$APP.ka("baredom.exports.x_table_row.init",hw);export const init=hw;
|
package/dist/x-table.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
3
|
-
d.setAttribute("part","caption");d.setAttribute("hidden","");b.appendChild(c);b.appendChild(d);b.appendChild(e);a.__xTableRefs=new $APP.
|
|
4
|
-
$APP.N(a),c=$APP.
|
|
5
|
-
|
|
6
|
-
c:"";a.setAttribute("role",$APP.
|
|
7
|
-
""):a.removeAttribute("data-striped");$APP.
|
|
8
|
-
var h=
|
|
9
|
-
"")}else $APP.
|
|
10
|
-
return null}a.addEventListener("x-table-cell-sort",d);a.addEventListener("x-table-row-click",c);a.addEventListener("x-table-row-connected",b);$APP.
|
|
11
|
-
b)}a.__xTableHandlers=null},
|
|
12
|
-
enumerable:!0,configurable:!0});Object.defineProperty(a,"selectable",{get:function(){var b=this.getAttribute("selectable");return $APP.
|
|
13
|
-
Object.defineProperty(a,"bordered",{get:function(){return this.hasAttribute("bordered")},set:function(b){return $APP.
|
|
14
|
-
set:function(b){return $APP.
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
2
|
+
var Cz=function(a){return typeof a==="string"?(a=parseInt(a.trim(),10),$APP.t(isNaN(a))&&a>0?Math.floor(a):null):null},Ez=function(a){var b=$APP.l(a,"__xTableRefs");if($APP.r(b))return b;b=a.attachShadow({mode:"open"});var c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("slot");c.textContent=":host{display:grid;box-sizing:border-box;color-scheme:light dark;--x-table-border-color:rgba(0,0,0,0.1);--x-table-border-radius:8px;--x-table-stripe-bg:rgba(0,0,0,0.025);--x-table-caption-color:inherit;--x-table-caption-font-size:0.875rem;--x-table-caption-font-weight:600;--x-table-caption-padding:0 0 0.5rem;--x-table-compact-padding:0.25rem 0.5rem;}@media (prefers-color-scheme:dark){:host{--x-table-border-color:rgba(255,255,255,0.1);--x-table-stripe-bg:rgba(255,255,255,0.03);}}:host([data-bordered]){border:1px solid var(--x-table-border-color);border-radius:var(--x-table-border-radius);overflow:hidden;}:host([data-full-width]){width:100%;}:host([data-compact]){--x-table-cell-padding:var(--x-table-compact-padding);}:host([data-striped]) ::slotted(x-table-row[data-stripe\x3d'even']){--x-table-row-bg:var(--x-table-stripe-bg);}[part\x3dcaption]{grid-column:1 / -1;color:var(--x-table-caption-color);font-size:var(--x-table-caption-font-size);font-weight:var(--x-table-caption-font-weight);padding:var(--x-table-caption-padding);box-sizing:border-box;}[part\x3dcaption][hidden]{display:none !important;}slot{display:contents;}";
|
|
3
|
+
d.setAttribute("part","caption");d.setAttribute("hidden","");b.appendChild(c);b.appendChild(d);b.appendChild(e);a.__xTableRefs=new $APP.P(null,3,[$APP.bi,b,Dz,d,$APP.Jk,e],null);return $APP.l(a,"__xTableRefs")},Qz=function(a){a=new $APP.P(null,8,[Fz,a.getAttribute("columns"),Gz,a.getAttribute("caption"),Hz,a.getAttribute("selectable"),$APP.kk,a.hasAttribute("striped"),Iz,a.hasAttribute("bordered"),Jz,a.hasAttribute("full-width"),Kz,a.hasAttribute("compact"),Lz,a.getAttribute("row-count")],null);var b=
|
|
4
|
+
$APP.N(a),c=$APP.G(b,Fz),d=$APP.G(b,Gz),e=$APP.G(b,Hz);a=$APP.G(b,$APP.kk);var g=$APP.G(b,Iz),h=$APP.G(b,Jz),k=$APP.G(b,Kz);b=$APP.G(b,Lz);a:{if(typeof c==="string"&&(c=c.trim(),$APP.O(c,""))){var m=parseInt(c,10);c=$APP.t(isNaN(m))&&m>0&&$APP.D.i(c,""+$APP.S.g(m))?"repeat("+$APP.S.g(m)+",1fr)":c;break a}c=null}d=$APP.r(d)?d:"";e=typeof e==="string"?e.trim().toLowerCase():null;e=$APP.J(Mz,e)?e:"none";return new $APP.P(null,8,[$APP.Sj,c,Nz,d,Oz,e,$APP.kk,$APP.I(a),Iz,$APP.I(g),Jz,$APP.I(h),Kz,$APP.I(k),
|
|
5
|
+
Pz,Cz(b)],null)},Rz=function(a){a=a.querySelectorAll("x-table-row");for(var b=a.length,c=0;;)if(c<b){var d=a[c];$APP.hd(c+1,2)===0?d.setAttribute("data-stripe","even"):d.removeAttribute("data-stripe");c+=1}else break},Sz=function(a){var b=Qz(a);if($APP.O($APP.l(a,"__xTableModel"),b)){b=$APP.N(b);var c=$APP.G(b,$APP.Sj),d=$APP.G(b,Nz),e=$APP.G(b,Oz),g=$APP.G(b,$APP.kk),h=$APP.G(b,Iz),k=$APP.G(b,Jz),m=$APP.G(b,Kz),p=$APP.G(b,Pz),q=Ez(a);q=$APP.N(q);q=$APP.G(q,Dz);a.style.gridTemplateColumns=$APP.r(c)?
|
|
6
|
+
c:"";a.setAttribute("role",$APP.D.i(e,"none")?"table":"grid");c=$APP.D.i(e,"multi")?"true":null;$APP.r(c)?a.setAttribute("aria-multiselectable",c):a.removeAttribute("aria-multiselectable");p!=null?a.setAttribute("aria-rowcount",""+$APP.S.g(p)):a.removeAttribute("aria-rowcount");$APP.O(d,"")?a.setAttribute("aria-label",d):a.removeAttribute("aria-label");$APP.O(d,"")?(q.textContent=d,q.removeAttribute("hidden")):(q.textContent="",q.setAttribute("hidden",""));$APP.r(g)?a.setAttribute("data-striped",
|
|
7
|
+
""):a.removeAttribute("data-striped");$APP.r(h)?a.setAttribute("data-bordered",""):a.removeAttribute("data-bordered");$APP.r(k)?a.setAttribute("data-full-width",""):a.removeAttribute("data-full-width");$APP.r(m)?a.setAttribute("data-compact",""):a.removeAttribute("data-compact");$APP.r(g)&&Rz(a);a.__xTableModel=b}},Vz=function(a){function b(){var e=$APP.l(a,"__xTableModel");e=$APP.r(e)?e:Qz(a);$APP.r($APP.kk.g(e))&&Rz(a);return null}function c(e){var g=$APP.l(a,"__xTableModel");g=$APP.r(g)?g:Qz(a);
|
|
8
|
+
var h=Oz.g(g);if($APP.O(h,"none"))if(g=e.target,e=$APP.l(e.detail,"rowIndex"),e=$APP.nh(new $APP.P(null,3,[$APP.aj,$APP.r(e)?e:0,$APP.zj,$APP.t(g.hasAttribute("selected")),Tz,h],null)),a.dispatchEvent(new CustomEvent("x-table-row-select",{detail:e,bubbles:!0,composed:!0,cancelable:!0})),$APP.D.i(h,"single")){e=g.hasAttribute("selected");h=a.querySelectorAll("x-table-row[selected]");for(var k=h.length,m=0;;)if(m<k)h[m].removeAttribute("selected"),m+=1;else break;$APP.r(e)||g.setAttribute("selected",
|
|
9
|
+
"")}else $APP.D.i(h,"multi")&&($APP.r(g.hasAttribute("selected"))?g.removeAttribute("selected"):g.setAttribute("selected",""));return null}function d(e){var g=e.target;g=Array.from(g.parentElement.querySelectorAll("x-table-cell")).indexOf(g);var h=$APP.l(e.detail,"direction"),k=$APP.l(e.detail,"previousDirection");g>=0&&(e.stopPropagation(),e=$APP.nh(new $APP.P(null,3,[Uz,g,$APP.Ni,h,$APP.yl,k],null)),a.dispatchEvent(new CustomEvent("x-table-sort",{detail:e,bubbles:!0,composed:!0,cancelable:!0})));
|
|
10
|
+
return null}a.addEventListener("x-table-cell-sort",d);a.addEventListener("x-table-row-click",c);a.addEventListener("x-table-row-connected",b);$APP.n(a,"__xTableHandlers",{sort:d,"row-click":c,"row-conn":b})},Wz=function(a){var b=$APP.l(a,"__xTableHandlers");if($APP.r(b)){var c=$APP.l(b,"sort"),d=$APP.l(b,"row-click");b=$APP.l(b,"row-conn");$APP.r(c)&&a.removeEventListener("x-table-cell-sort",c);$APP.r(d)&&a.removeEventListener("x-table-row-click",d);$APP.r(b)&&a.removeEventListener("x-table-row-connected",
|
|
11
|
+
b)}a.__xTableHandlers=null},Xz=function(a){Object.defineProperty(a,"columns",{get:function(){var b=this.getAttribute("columns");return $APP.r(b)?b:""},set:function(b){return $APP.r(b)?this.setAttribute("columns",""+$APP.S.g(b)):this.removeAttribute("columns")},enumerable:!0,configurable:!0});Object.defineProperty(a,"caption",{get:function(){var b=this.getAttribute("caption");return $APP.r(b)?b:""},set:function(b){return $APP.r(b)?this.setAttribute("caption",""+$APP.S.g(b)):this.removeAttribute("caption")},
|
|
12
|
+
enumerable:!0,configurable:!0});Object.defineProperty(a,"selectable",{get:function(){var b=this.getAttribute("selectable");return $APP.r(b)?b:"none"},set:function(b){return $APP.r(b)?this.setAttribute("selectable",""+$APP.S.g(b)):this.removeAttribute("selectable")},enumerable:!0,configurable:!0});Object.defineProperty(a,"striped",{get:function(){return this.hasAttribute("striped")},set:function(b){return $APP.r(b)?this.setAttribute("striped",""):this.removeAttribute("striped")},enumerable:!0,configurable:!0});
|
|
13
|
+
Object.defineProperty(a,"bordered",{get:function(){return this.hasAttribute("bordered")},set:function(b){return $APP.r(b)?this.setAttribute("bordered",""):this.removeAttribute("bordered")},enumerable:!0,configurable:!0});Object.defineProperty(a,"compact",{get:function(){return this.hasAttribute("compact")},set:function(b){return $APP.r(b)?this.setAttribute("compact",""):this.removeAttribute("compact")},enumerable:!0,configurable:!0});Object.defineProperty(a,"fullWidth",{get:function(){return this.hasAttribute("full-width")},
|
|
14
|
+
set:function(b){return $APP.r(b)?this.setAttribute("full-width",""):this.removeAttribute("full-width")},enumerable:!0,configurable:!0});Object.defineProperty(a,"rowCount",{get:function(){return Cz(this.getAttribute("row-count"))},set:function(b){return b==null?this.removeAttribute("row-count"):this.setAttribute("row-count",""+$APP.S.g(Math.floor(b)))},enumerable:!0,configurable:!0})},Zz=function(){var a=class extends HTMLElement{};a.observedAttributes=Yz;a.prototype.connectedCallback=function(){Ez(this);
|
|
15
|
+
Wz(this);Vz(this);Sz(this);return null};a.prototype.disconnectedCallback=function(){Wz(this);return null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.O(c,d)&&Sz(this);return null};Xz(a.prototype);return a},$z=function(){$APP.r(customElements.get("x-table"))||customElements.define("x-table",Zz());return null},Jz=new $APP.M(null,"full-width?","full-width?",1477288349),Lz=new $APP.M(null,"row-count-raw","row-count-raw",-1432781274),Hz=new $APP.M(null,"selectable-raw","selectable-raw",-1276314763),
|
|
16
|
+
Uz=new $APP.M(null,"colIndex","colIndex",171239635),Pz=new $APP.M(null,"row-count","row-count",1060167988),Gz=new $APP.M(null,"caption-raw","caption-raw",-375935083),Tz=new $APP.M(null,"selectionMode","selectionMode",1264773367),Fz=new $APP.M(null,"columns-raw","columns-raw",-2093994046),Oz=new $APP.M(null,"selectable","selectable",370587038),Nz=new $APP.M(null,"caption","caption",-855383902),Iz=new $APP.M(null,"bordered?","bordered?",562358476),Dz=new $APP.M(null,"caption-div","caption-div",1485363333),
|
|
17
|
+
Kz=new $APP.M(null,"compact?","compact?",1216893298);var Yz="columns caption selectable striped bordered full-width compact row-count".split(" ");$APP.Sd(["x-table-sort",new $APP.P(null,2,[$APP.U,new $APP.P(null,3,[Uz,$APP.V,$APP.Ni,$APP.Y,$APP.yl,$APP.Y],null),$APP.kl,!0],null),"x-table-row-select",new $APP.P(null,2,[$APP.U,new $APP.P(null,3,[$APP.aj,$APP.V,$APP.zj,$APP.qj,Tz,$APP.Y],null),$APP.kl,!0],null)]);var Mz=new $APP.R(null,new $APP.P(null,3,["none",null,"single",null,"multi",null],null),null);$APP.ka("baredom.exports.x_table.init",$z);export const init=$z;
|
package/dist/x-tabs.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
3
|
-
$APP.
|
|
4
|
-
b){var c=a.hasAttribute("selected");$APP.
|
|
5
|
-
b));$APP.
|
|
6
|
-
b,$APP.
|
|
7
|
-
$APP.
|
|
8
|
-
$APP.
|
|
9
|
-
d=null;k=$APP.
|
|
10
|
-
|
|
11
|
-
d.setAttribute("part","base");d.className="base";d.appendChild(e);b.appendChild(c);b.appendChild(d);this.__x_tabs_root=b;this.__x_tabs_base=d;this.__x_tabs_slot=e;
|
|
12
|
-
b.disconnect():null};a.prototype.attributeChangedCallback=function(){return
|
|
2
|
+
var YB=function(a){var b=$APP.N(a);a=$APP.G(b,$APP.ui);var c=$APP.G(b,$APP.xk),d=$APP.G(b,VB),e=$APP.G(b,$APP.T);b=$APP.G(b,$APP.zl);c=$APP.J(WB,c)?c:"horizontal";d=$APP.J(XB,d)?d:"auto";return new $APP.P(null,5,[$APP.ui,a,$APP.xk,c,VB,d,$APP.T,e,$APP.zl,$APP.I(b)],null)},ZB=function(a){return $APP.l(a,"__x_tabs_initialized")===!0},$B=function(a){return new $APP.P(null,5,[$APP.ui,a.getAttribute("value"),$APP.xk,a.getAttribute("orientation"),VB,a.getAttribute("activation"),$APP.T,a.getAttribute("label"),
|
|
3
|
+
$APP.zl,a.hasAttribute("loop")],null)},aC=function(a){return $APP.Be($APP.ge(function(b){return $APP.D.i("X-TAB",b.tagName)},$APP.wc(a.children)))},bC=function(a){return $APP.t(a.hasAttribute("disabled"))},cC=function(a){return a.getAttribute("value")},dC=function(a){return $APP.Wd(function(b){return bC(b)?b:null},a)},eC=function(a,b){var c=a.getAttribute("value");$APP.r($APP.r(b)?$APP.O(c,b):b)?a.setAttribute("value",b):(b=b==null||$APP.D.i(b,""),$APP.r(b?c:b)&&a.removeAttribute("value"))},fC=function(a,
|
|
4
|
+
b){var c=a.hasAttribute("selected");$APP.r($APP.r(b)?$APP.t(c):b)?a.setAttribute("selected",""):(b=$APP.t(b),$APP.r(b?c:b)&&a.removeAttribute("selected"))},gC=function(a,b){var c=a.getAttribute("tabindex");$APP.O(c,b)&&a.setAttribute("tabindex",b)},hC=function(a,b){a=a.getAttribute("controls");$APP.r($APP.r(a)?$APP.O(a,""):a)&&(a=document.getElementById(a),$APP.r(a)&&($APP.r(b)?a.removeAttribute("hidden"):a.setAttribute("hidden","")))},iC=function(a){var b=aC(a),c=a.getAttribute("value"),d=$APP.dg($APP.$d(cC,
|
|
5
|
+
b));$APP.r($APP.r(c)?$APP.J(d,c):c)||(c=dC(b),c=$APP.r(c)?cC(c):null);if($APP.r(c)){a:{d=$APP.u(b);for(var e=null,g=0,h=0;;)if(h<g){var k=e.G(null,h),m=$APP.D.i(cC(k),c);fC(k,m);m&&bC(k)?gC(k,"0"):gC(k,"-1");h+=1}else if(d=$APP.u(d))$APP.Pc(d)?(e=$APP.yb(d),d=$APP.zb(d),k=e,g=$APP.B(e),e=k):(k=$APP.v(d),e=$APP.D.i(cC(k),c),fC(k,e),e&&bC(k)?gC(k,"0"):gC(k,"-1"),d=$APP.z(d),e=null,g=0),h=0;else break a}a:for(b=$APP.u(b),d=null,g=e=0;;)if(g<e)k=d.G(null,g),hC(k,$APP.D.i(cC(k),c)),g+=1;else if(b=$APP.u(b))d=
|
|
6
|
+
b,$APP.Pc(d)?(b=$APP.yb(d),e=$APP.zb(d),d=b,k=$APP.B(b),b=e,e=k):(k=$APP.v(d),hC(k,$APP.D.i(cC(k),c)),b=$APP.z(d),d=null,e=0),g=0;else break a;eC(a,c)}return c},jC=function(a,b){var c=a.getAttribute("value");return $APP.r($APP.r(b)?$APP.O(c,b):b)?(eC(a,b),iC(a),a.dispatchEvent(new CustomEvent("value-change",{detail:{value:$APP.r(b)?b:""},bubbles:!0,composed:!0}))):null},kC=function(a,b,c){b=$APP.B(b)-1;var d=a+1;return d<=b?d:$APP.r(c)?0:a},lC=function(a,b,c){var d=a-1;b=$APP.B(b)-1;return d>=0?d:
|
|
7
|
+
$APP.r(c)?b:a},mC=function(a){var b=$APP.l(a,"__x_tabs_base"),c=YB($B(a));$APP.r(b)&&(b.setAttribute("role","tablist"),b.setAttribute("aria-orientation",$APP.xk.g(c)),c=$APP.T.g(c),$APP.r($APP.r(c)?$APP.O(c,""):c)?b.setAttribute("aria-label",c):b.removeAttribute("aria-label"));return iC(a)},nC=function(a){var b=new MutationObserver(function(){return mC(a)});b.observe(a,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value","selected","disabled","controls"]});a.__x_tabs_observer=b},oC=function(a){function b(d){a:{var e=
|
|
8
|
+
$APP.Be($APP.ge(bC,aC(a))),g=YB($B(a)),h=$APP.xk.g(g);var k=VB.g(g);g=$APP.zl.g(g);var m=d.key,p=e.indexOf(document.activeElement);if(p>=0&&(h=$APP.D.i(h,"horizontal")&&$APP.D.i(m,"ArrowRight")?kC(p,e,g):$APP.D.i(h,"horizontal")&&$APP.D.i(m,"ArrowLeft")?lC(p,e,g):$APP.D.i(h,"vertical")&&$APP.D.i(m,"ArrowDown")?kC(p,e,g):$APP.D.i(h,"vertical")&&$APP.D.i(m,"ArrowUp")?lC(p,e,g):$APP.D.i(m,"Home")?0:$APP.D.i(m,"End")?$APP.B(e)-1:null,h!=null)){d.preventDefault();d=$APP.Cc(e,h,null);$APP.r(d)?d.focus():
|
|
9
|
+
d=null;k=$APP.r(d)?$APP.D.i(k,"auto")?jC(a,cC(d)):null:null;break a}k=null}return k}function c(d){d.stopPropagation();return jC(a,d.detail.value)}a.addEventListener("tab-select",c);a.addEventListener("keydown",b);a.__x_tabs_on_tab_select=c;a.__x_tabs_on_keydown=b;nC(a)},pC=function(a){Object.defineProperty(a.prototype,"value",{get:function(){return this.getAttribute("value")},set:function(b){return $APP.r(b)?this.setAttribute("value",b):this.removeAttribute("value")},configurable:!0,enumerable:!0})},
|
|
10
|
+
rC=function(){var a=class extends HTMLElement{};a.observedAttributes=qC;a.prototype.connectedCallback=function(){if(ZB(this)){oC(this);var b=mC(this)}else{if(!ZB(this)){b=this.attachShadow({mode:"open"});var c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("slot");c.textContent=":host{display:block;color-scheme:light dark;}.base{display:flex;flex-direction:row;}.base[aria-orientation\x3d'vertical']{flex-direction:column;}::slotted(x-tab){margin-inline-end:var(--x-tabs-gap,8px);}:host([orientation\x3d'vertical']) ::slotted(x-tab){margin-inline-end:0;margin-block-end:var(--x-tabs-gap,8px);}";
|
|
11
|
+
d.setAttribute("part","base");d.className="base";d.appendChild(e);b.appendChild(c);b.appendChild(d);this.__x_tabs_root=b;this.__x_tabs_base=d;this.__x_tabs_slot=e;oC(this);this.__x_tabs_initialized=!0}mC(this);b=this}return b};a.prototype.disconnectedCallback=function(){var b=$APP.l(this,"__x_tabs_on_tab_select");$APP.r(b)&&this.removeEventListener("tab-select",b);b=$APP.l(this,"__x_tabs_on_keydown");$APP.r(b)&&this.removeEventListener("keydown",b);b=$APP.l(this,"__x_tabs_observer");return $APP.r(b)?
|
|
12
|
+
b.disconnect():null};a.prototype.attributeChangedCallback=function(){return ZB(this)?mC(this):null};pC(a);return a},sC=function(){return $APP.r(customElements.get("x-tabs"))?null:customElements.define("x-tabs",rC())},VB=new $APP.M(null,"activation","activation",2128521072);var qC=["value","orientation","activation","label","loop"],WB=new $APP.R(null,new $APP.P(null,2,["vertical",null,"horizontal",null],null),null),XB=new $APP.R(null,new $APP.P(null,2,["auto",null,"manual",null],null),null);$APP.Sd(["value-change",new $APP.P(null,1,[$APP.U,new $APP.P(null,1,[$APP.ui,$APP.Y],null)],null)]);$APP.ka("baredom.exports.x_tabs.init",sC);export const init=sC;
|
package/dist/x-text-area.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
3
|
-
c):b.setValidity({},"",c)},
|
|
4
|
-
a.hasAttribute("readonly"),a.getAttribute("value"),a.getAttribute("autocomplete"),a.getAttribute("minlength"),a.getAttribute("placeholder")]);var h=$APP.N(g),k=$APP.
|
|
5
|
-
m=$APP.
|
|
6
|
-
c.name=$APP.
|
|
7
|
-
$APP.
|
|
8
|
-
"__xTextAreaInternals");return $APP.
|
|
9
|
-
$APP.l(a,"__xTextAreaRefs");if($APP.
|
|
10
|
-
a.__xTextAreaHandlers=null;return}}return null},
|
|
11
|
-
enumerable:!0,get:function(){var e=
|
|
12
|
-
b);var c=$APP.l(this,"__xTextAreaRefs");return $APP.
|
|
13
|
-
"minlength",null);b.connectedCallback=function(){if(!$APP.
|
|
2
|
+
var XU=function(a){return typeof a==="string"?(a=parseInt(a,10),$APP.t(isNaN(a))&&a>0?a:null):null},YU=function(a,b,c){return a.setAttribute(b,c)},ZU=function(a,b,c){return $APP.r(c)?a.setAttribute(b,""):a.removeAttribute(b)},$U=function(a,b,c){var d=a.hasAttribute("error");var e=a.getAttribute("error");e=$APP.r(e)?e:"";a=a.hasAttribute("required");var g=c.value;return $APP.r(d)?b.setValidity({customError:!0},e,c):$APP.r($APP.r(a)?$APP.D.i(g,""):a)?b.setValidity({valueMissing:!0},"Please fill in this field.",
|
|
3
|
+
c):b.setValidity({},"",c)},iV=function(a){var b=$APP.l(a,"__xTextAreaRefs");if($APP.r(b)){var c=$APP.l(b,"textarea"),d=$APP.l(b,"label"),e=$APP.l(b,"hint");b=$APP.l(b,"error");var g=$APP.Q([aV,$APP.Oh,$APP.Ek,$APP.ci,$APP.wi,bV,$APP.Rk,cV,$APP.sh,$APP.cj,$APP.vl,$APP.Nh,dV,$APP.ii],[a.getAttribute("resize"),a.getAttribute("label"),a.getAttribute("name"),a.getAttribute("error"),a.getAttribute("hint"),a.getAttribute("rows"),a.hasAttribute("disabled"),a.getAttribute("maxlength"),a.hasAttribute("required"),
|
|
4
|
+
a.hasAttribute("readonly"),a.getAttribute("value"),a.getAttribute("autocomplete"),a.getAttribute("minlength"),a.getAttribute("placeholder")]);var h=$APP.N(g),k=$APP.G(h,dV),m=$APP.G(h,$APP.ii),p=$APP.G(h,aV),q=$APP.G(h,$APP.Oh),w=$APP.G(h,$APP.Ek),x=$APP.G(h,$APP.ci),y=$APP.G(h,$APP.wi),A=$APP.G(h,bV);g=$APP.G(h,$APP.Rk);var C=$APP.G(h,cV),E=$APP.G(h,$APP.sh),H=$APP.G(h,$APP.cj),F=$APP.G(h,$APP.vl);h=$APP.G(h,$APP.Nh);var K=$APP.r(x)?x:"",X=$APP.r(y)?y:"",da=$APP.r(q)?q:"";E=$APP.I(E);H=$APP.I(H);
|
|
5
|
+
m=$APP.r(m)?m:"";y=typeof y==="string"&&$APP.O(y,"")&&y!=null;w=$APP.r(w)?w:"";F=$APP.r(F)?F:"";k=XU(k);q=typeof q==="string"&&$APP.O(q,"")&&q!=null;x=typeof x==="string"&&$APP.O(x,"")&&x!=null;p=typeof p==="string"&&$APP.J(eV,p)?p:"vertical";A=XU(A);g=$APP.Q([$APP.Lh,$APP.Sl,$APP.rl,$APP.Sh,$APP.Si,$APP.ui,fV,$APP.Hk,$APP.jk,gV,$APP.$k,hV,$APP.Ji,$APP.T,$APP.Zh,$APP.bl,$APP.W],[E,H,m,y,w,F,k,q,x,p,X,XU(C),$APP.r(A)?A:3,da,K,$APP.r(h)?h:"",$APP.I(g)]);C=$APP.jk.g(g);A=$APP.Sh.g(g);h=$APP.Hk.g(g);
|
|
6
|
+
c.name=$APP.Si.g(g);c.placeholder=$APP.rl.g(g);c.disabled=$APP.W.g(g);c.readOnly=$APP.Sl.g(g);c.required=$APP.Lh.g(g);c.rows=$APP.Ji.g(g);c.autocomplete=$APP.bl.g(g);K=hV.g(g);$APP.r(K)?YU(c,"maxlength",""+$APP.S.g(K)):c.removeAttribute("maxlength");K=fV.g(g);$APP.r(K)?YU(c,"minlength",""+$APP.S.g(K)):c.removeAttribute("minlength");a.style.setProperty("--x-text-area-resize",gV.g(g));YU(c,"aria-required",$APP.r($APP.Lh.g(g))?"true":"false");c.setAttribute("aria-invalid",$APP.r(C)?"true":"false");K=
|
|
7
|
+
$APP.r($APP.r(A)?C:A)?"hint error":$APP.r(A)?"hint":$APP.r(C)?"error":null;$APP.r(K)?c.setAttribute("aria-describedby",K):c.removeAttribute("aria-describedby");d.textContent=$APP.T.g(g);$APP.r(h)?d.classList.remove("label-hidden"):d.classList.add("label-hidden");e.textContent=$APP.$k.g(g);$APP.r(A)?e.classList.remove("hint-hidden"):e.classList.add("hint-hidden");b.textContent=$APP.Zh.g(g);$APP.r(C)?b.classList.remove("error-hidden"):b.classList.add("error-hidden");ZU(a,"data-invalid",C);d=$APP.l(a,
|
|
8
|
+
"__xTextAreaInternals");return $APP.r(d)?$U(a,d,c):null}return null},jV=function(a,b,c){return a.dispatchEvent(new CustomEvent(b,{detail:c,bubbles:!0,composed:!0,cancelable:!1}))},kV=function(a){return function(){var b=$APP.l(a,"__xTextAreaRefs");if($APP.r(b)){b=$APP.l(b,"textarea");var c=b.value;var d=a.getAttribute("name");d=$APP.r(d)?d:"";var e=$APP.l(a,"__xTextAreaInternals");$APP.r(e)&&(e.setFormValue(c),$U(a,e,b));return jV(a,"x-text-area-input",{name:d,value:c})}return null}},lV=function(a){return function(){var b=
|
|
9
|
+
$APP.l(a,"__xTextAreaRefs");if($APP.r(b)){b=$APP.l(b,"textarea");var c=b.value;var d=a.getAttribute("name");d=$APP.r(d)?d:"";var e=$APP.l(a,"__xTextAreaInternals");$APP.r(e)&&(e.setFormValue(c),$U(a,e,b));return jV(a,"x-text-area-change",{name:d,value:c})}return null}},mV=function(a){var b=$APP.l(a,"__xTextAreaRefs");if($APP.r(b)){var c=$APP.l(a,"__xTextAreaHandlers");if($APP.r(c)){b=$APP.l(b,"textarea");b.removeEventListener("input",$APP.l(c,"input"));b.removeEventListener("change",$APP.l(c,"change"));
|
|
10
|
+
a.__xTextAreaHandlers=null;return}}return null},nV=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){var d=this.getAttribute(c);return $APP.r(d)?d:""},set:function(d){return d!=null&&$APP.O(d)?YU(this,c,""+$APP.S.g(d)):this.removeAttribute(c)}})},oV=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){return this.hasAttribute(c)},set:function(d){return ZU(this,c,$APP.I(d))}})},pV=function(a,b,c,d){Object.defineProperty(a,b,{configurable:!0,
|
|
11
|
+
enumerable:!0,get:function(){var e=XU(this.getAttribute(c));return $APP.r(e)?e:d},set:function(e){return e!=null&&$APP.O(e)&&e>0?YU(this,c,""+$APP.S.g(Math.floor(e))):this.removeAttribute(c)}})},qV=function(a){Object.defineProperty(a,"value",{configurable:!0,enumerable:!0,get:function(){var b=$APP.l(this,"__xTextAreaRefs");if($APP.r(b))return $APP.l(b,"textarea").value;b=this.getAttribute("value");return $APP.r(b)?b:""},set:function(b){b=b!=null&&$APP.O(b)?""+$APP.S.g(b):"";this.setAttribute("value",
|
|
12
|
+
b);var c=$APP.l(this,"__xTextAreaRefs");return $APP.r(c)?$APP.l(c,"textarea").value=b:null}})},sV=function(){var a=class extends HTMLElement{},b=a.prototype;a.formAssociated=!0;Object.defineProperty(a,"observedAttributes",{get:function(){return rV}});qV(b);nV(b,"name","name");nV(b,"placeholder","placeholder");nV(b,"autocomplete","autocomplete");oV(b,"disabled","disabled");oV(b,"readOnly","readonly");oV(b,"required","required");pV(b,"rows","rows",3);pV(b,"maxLength","maxlength",null);pV(b,"minLength",
|
|
13
|
+
"minlength",null);b.connectedCallback=function(){if(!$APP.r($APP.l(this,"__xTextAreaRefs"))){var c=this.attachShadow({mode:"open"}),d=document.createElement("style"),e=document.createElement("div"),g=document.createElement("label"),h=document.createElement("div"),k=document.createElement("textarea"),m=document.createElement("span"),p=document.createElement("span");d.textContent=":host{display:block;color-scheme:light dark;--x-text-area-label-color:#374151;--x-text-area-label-font-size:0.875rem;--x-text-area-bg:#ffffff;--x-text-area-color:#111827;--x-text-area-border:1px solid #d1d5db;--x-text-area-border-radius:6px;--x-text-area-padding:0.5rem 0.75rem;--x-text-area-focus-ring-color:#2563eb;--x-text-area-error-color:#dc2626;--x-text-area-hint-color:#6b7280;--x-text-area-disabled-opacity:0.45;--x-text-area-min-height:5rem;--x-text-area-font-size:1rem;--x-text-area-resize:vertical;}@media (prefers-color-scheme:dark){:host{--x-text-area-label-color:#d1d5db;--x-text-area-bg:#1f2937;--x-text-area-color:#f9fafb;--x-text-area-border:1px solid #4b5563;--x-text-area-focus-ring-color:#3b82f6;--x-text-area-error-color:#f87171;--x-text-area-hint-color:#9ca3af;}}[part\x3dfield]{display:flex;flex-direction:column;gap:0.25rem;}[part\x3dlabel]{display:block;font-size:var(--x-text-area-label-font-size);font-weight:500;color:var(--x-text-area-label-color);}.label-hidden{display:none;}[part\x3dtextarea-wrapper]{display:block;}[part\x3dtextarea]{display:block;width:100%;box-sizing:border-box;min-height:var(--x-text-area-min-height);padding:var(--x-text-area-padding);background:var(--x-text-area-bg);color:var(--x-text-area-color);border:var(--x-text-area-border);border-radius:var(--x-text-area-border-radius);font-size:var(--x-text-area-font-size);line-height:1.5;font-family:inherit;outline:none;resize:var(--x-text-area-resize);transition:border-color 120ms ease,box-shadow 120ms ease;}[part\x3dtextarea]:focus{border-color:var(--x-text-area-focus-ring-color);box-shadow:0 0 0 3px color-mix(in srgb,var(--x-text-area-focus-ring-color) 20%,transparent);}:host([data-invalid]) [part\x3dtextarea]{border-color:var(--x-text-area-error-color);}:host([data-invalid]) [part\x3dtextarea]:focus{box-shadow:0 0 0 3px color-mix(in srgb,var(--x-text-area-error-color) 20%,transparent);}[part\x3dtextarea]:disabled{opacity:var(--x-text-area-disabled-opacity);cursor:not-allowed;}[part\x3dhint]{display:block;font-size:0.8125rem;color:var(--x-text-area-hint-color);}.hint-hidden{display:none;}[part\x3derror]{display:block;font-size:0.8125rem;color:var(--x-text-area-error-color);}.error-hidden{display:none;}@media (prefers-reduced-motion:reduce){[part\x3dtextarea]{transition:none;}}";
|
|
14
14
|
e.setAttribute("part","field");g.setAttribute("part","label");g.setAttribute("id","label");g.setAttribute("for","textarea");h.setAttribute("part","textarea-wrapper");k.setAttribute("part","textarea");k.setAttribute("id","textarea");k.setAttribute("aria-labelledby","label");m.setAttribute("part","hint");m.setAttribute("id","hint");m.setAttribute("aria-live","polite");p.setAttribute("part","error");p.setAttribute("id","error");p.setAttribute("role","alert");p.setAttribute("aria-live","assertive");h.appendChild(k);
|
|
15
|
-
e.appendChild(g);e.appendChild(h);e.appendChild(m);e.appendChild(p);c.appendChild(d);c.appendChild(e);this.__xTextAreaRefs={field:e,label:g,textarea:k,hint:m,error:p};$APP.
|
|
16
|
-
$APP.l(this,"__xTextAreaRefs");$APP.
|
|
17
|
-
"disabled",$APP.
|
|
18
|
-
|
|
19
|
-
$APP.
|
|
20
|
-
null),new $APP.
|
|
15
|
+
e.appendChild(g);e.appendChild(h);e.appendChild(m);e.appendChild(p);c.appendChild(d);c.appendChild(e);this.__xTextAreaRefs={field:e,label:g,textarea:k,hint:m,error:p};$APP.r(this.attachInternals)&&(this.__xTextAreaInternals=this.attachInternals())}mV(this);c=$APP.l(this,"__xTextAreaRefs");$APP.r(c)&&(c=$APP.l(c,"textarea"),d=this.getAttribute("value"),$APP.r(d)&&(c.value=d));c=$APP.l(this,"__xTextAreaInternals");$APP.r(c)&&(d=c.setFormValue,e=this.getAttribute("value"),d.call(c,$APP.r(e)?e:""));c=
|
|
16
|
+
$APP.l(this,"__xTextAreaRefs");$APP.r(c)&&(c=$APP.l(c,"textarea"),d=kV(this),e=lV(this),c.addEventListener("input",d),c.addEventListener("change",e),this.__xTextAreaHandlers={input:d,change:e});return iV(this)};b.disconnectedCallback=function(){return mV(this)};b.attributeChangedCallback=function(c,d,e){$APP.D.i(c,"value")&&(c=$APP.l(this,"__xTextAreaRefs"),$APP.r(c)&&(c=$APP.l(c,"textarea"),$APP.O(c.value,e)&&(c.value=$APP.r(e)?e:"")));return iV(this)};b.formDisabledCallback=function(c){ZU(this,
|
|
17
|
+
"disabled",$APP.I(c));return iV(this)};b.formResetCallback=function(){this.removeAttribute("value");var c=$APP.l(this,"__xTextAreaRefs");$APP.r(c)&&($APP.l(c,"textarea").value="");c=$APP.l(this,"__xTextAreaInternals");$APP.r(c)&&c.setFormValue("");return iV(this)};return a},tV=function(){return $APP.r(customElements.get("x-text-area"))?null:customElements.define("x-text-area",sV())},fV=new $APP.M(null,"minlength","minlength",259053545),dV=new $APP.M(null,"minlength-raw","minlength-raw",-1245403779),
|
|
18
|
+
cV=new $APP.M(null,"maxlength-raw","maxlength-raw",-886656470),hV=new $APP.M(null,"maxlength","maxlength",-1163911985),aV=new $APP.M(null,"resize-raw","resize-raw",-287517888),bV=new $APP.M(null,"rows-raw","rows-raw",-1828357145),gV=new $APP.M(null,"resize","resize",297367086);var rV="label name value placeholder hint error disabled readonly required rows maxlength minlength autocomplete resize".split(" "),eV=new $APP.R(null,new $APP.P(null,4,["none",null,"vertical",null,"both",null,"horizontal",null],null),null);
|
|
19
|
+
$APP.Q([$APP.gj,$APP.Si,$APP.ui,new $APP.M(null,"minLength","minLength",-1538722770),$APP.Ji,$APP.ml,new $APP.M(null,"maxLength","maxLength",-1633020073),$APP.bl,$APP.Kj],[new $APP.P(null,2,[$APP.Z,$APP.qj,$APP.Oj,"disabled"],null),new $APP.P(null,2,[$APP.Z,$APP.Y,$APP.Oj,"name"],null),new $APP.P(null,2,[$APP.Z,$APP.Y,$APP.Oj,"value"],null),new $APP.P(null,2,[$APP.Z,$APP.V,$APP.Oj,"minlength"],null),new $APP.P(null,2,[$APP.Z,$APP.V,$APP.Oj,"rows"],null),new $APP.P(null,2,[$APP.Z,$APP.qj,$APP.Oj,"readonly"],
|
|
20
|
+
null),new $APP.P(null,2,[$APP.Z,$APP.V,$APP.Oj,"maxlength"],null),new $APP.P(null,2,[$APP.Z,$APP.Y,$APP.Oj,"autocomplete"],null),new $APP.P(null,2,[$APP.Z,$APP.qj,$APP.Oj,"required"],null)]);$APP.ka("baredom.exports.x_text_area.init",tV);export const init=tV;
|