@vanelsas/baredom 4.0.0-alpha.0 → 4.0.0-alpha.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 -0
- package/dist/barebuild-action.js +8 -8
- package/dist/barebuild-data.js +4 -4
- package/dist/barebuild-invalidate-on.js +4 -4
- package/dist/barebuild-route.js +3 -3
- package/dist/barebuild-router.js +12 -12
- package/dist/base.js +143 -141
- package/dist/integrity.json +110 -110
- package/dist/x-alert.js +15 -15
- package/dist/x-avatar-group.js +8 -8
- package/dist/x-avatar.js +13 -13
- package/dist/x-badge.js +8 -8
- package/dist/x-bento-grid.js +5 -5
- package/dist/x-bento-item.js +4 -4
- package/dist/x-breadcrumbs.js +13 -13
- package/dist/x-calendar.js +31 -31
- package/dist/x-cancel-dialogue.js +11 -11
- package/dist/x-card.js +7 -7
- package/dist/x-carousel.js +22 -22
- package/dist/x-chart.js +42 -42
- package/dist/x-chip.js +1 -1
- package/dist/x-code.js +23 -23
- package/dist/x-collapse.js +8 -8
- package/dist/x-color-picker.js +32 -32
- package/dist/x-combobox.js +26 -26
- package/dist/x-command-palette.js +28 -28
- package/dist/x-confetti.js +21 -21
- package/dist/x-container.js +3 -3
- package/dist/x-context-menu.js +17 -17
- package/dist/x-currency-field.js +20 -20
- package/dist/x-date-picker.js +29 -29
- package/dist/x-divider.js +8 -8
- package/dist/x-drawer.js +8 -8
- package/dist/x-dropdown.js +12 -12
- package/dist/x-fieldset.js +3 -3
- package/dist/x-file-download.js +5 -5
- package/dist/x-file-upload.js +10 -10
- package/dist/x-form-field.js +12 -12
- package/dist/x-form.js +10 -10
- package/dist/x-gaussian-blur.js +11 -11
- package/dist/x-grid.js +6 -6
- package/dist/x-i18n-provider.js +6 -6
- package/dist/x-i18n.js +4 -4
- package/dist/x-icon.js +7 -7
- package/dist/x-image.js +16 -16
- package/dist/x-kbd.js +11 -11
- package/dist/x-kinetic-canvas.js +24 -24
- package/dist/x-kinetic-font.js +19 -19
- package/dist/x-kinetic-typography.js +24 -24
- package/dist/x-liquid-dock.js +30 -30
- package/dist/x-liquid-fill.js +32 -32
- package/dist/x-liquid-glass.js +26 -26
- package/dist/x-menu-item.js +4 -4
- package/dist/x-menu.js +7 -7
- package/dist/x-metaball-cursor.js +17 -17
- package/dist/x-modal.js +9 -9
- package/dist/x-morph-stack.js +26 -26
- package/dist/x-multi-combobox.js +28 -28
- package/dist/x-navbar.js +11 -11
- package/dist/x-neural-glow.js +18 -18
- package/dist/x-notification-center.js +9 -9
- package/dist/x-organic-divider.js +13 -13
- package/dist/x-organic-progress.js +30 -30
- package/dist/x-organic-shape.js +7 -7
- package/dist/x-otp-input.js +18 -18
- package/dist/x-pagination.js +9 -9
- package/dist/x-particle-button.js +32 -32
- package/dist/x-popover.js +23 -23
- package/dist/x-progress-circle.js +6 -6
- package/dist/x-progress.js +6 -6
- package/dist/x-proximity-list.js +20 -20
- package/dist/x-radio.js +10 -10
- package/dist/x-range-slider.js +24 -24
- package/dist/x-rating.js +18 -18
- package/dist/x-ripple-effect.js +7 -7
- package/dist/x-scroll-parallax.js +17 -17
- package/dist/x-scroll-stack.js +14 -14
- package/dist/x-scroll-story.js +29 -29
- package/dist/x-scroll-timeline.js +38 -38
- package/dist/x-scroll.js +31 -31
- package/dist/x-search-field.js +1 -1
- package/dist/x-select.js +1 -1
- package/dist/x-sidebar.js +14 -14
- package/dist/x-skeleton-group.js +11 -11
- package/dist/x-skeleton.js +1 -1
- package/dist/x-slider.js +14 -14
- package/dist/x-soft-body.js +13 -13
- package/dist/x-spacer.js +4 -4
- package/dist/x-spinner.js +3 -3
- package/dist/x-splash.js +11 -11
- package/dist/x-split-pane.js +13 -13
- package/dist/x-spotlight-card.js +11 -11
- package/dist/x-stat.js +7 -7
- package/dist/x-stepper.js +13 -13
- package/dist/x-switch.js +6 -6
- package/dist/x-tab.js +6 -6
- package/dist/x-table-cell.js +14 -14
- package/dist/x-table-row.js +7 -7
- package/dist/x-table.js +11 -11
- package/dist/x-tabs.js +9 -9
- package/dist/x-text-area.js +16 -16
- package/dist/x-theme.js +12 -12
- package/dist/x-timeline-item.js +18 -18
- package/dist/x-timeline.js +8 -8
- package/dist/x-toast.js +20 -20
- package/dist/x-toaster.js +6 -6
- package/dist/x-tooltip.js +11 -11
- package/dist/x-trace-history.js +90 -90
- package/dist/x-typography.js +5 -5
- package/dist/x-welcome-tour.js +52 -52
- package/package.json +1 -1
package/dist/x-table.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
2
|
var zM=function(a){return typeof a==="string"?(a=parseInt(a.trim(),10),$APP.p(isNaN(a))&&a>0?Math.floor(a):null):null},BM=function(a){var b=$APP.l(a,"__xTableRefs");if($APP.n(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:var(--x-color-border,rgba(0,0,0,0.1));--x-table-border-radius:var(--x-radius-md,8px);--x-table-stripe-bg:rgba(0,0,0,0.025);--x-table-caption-color:var(--x-color-text,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:var(--x-color-border,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
|
-
$APP.T(d,"part","caption");$APP.T(d,"hidden","");b.appendChild(c);b.appendChild(d);b.appendChild(e);$APP.Q(a,"__xTableRefs",new $APP.M(null,3,[$APP.Fk,b,AM,d,$APP.
|
|
4
|
-
$APP.G(a),c=$APP.C(b,CM),d=$APP.C(b,DM),e=$APP.C(b,EM);a=$APP.C(b,$APP.
|
|
5
|
-
LM,zM(b)],null)},NM=function(a){a=$APP.q($APP.ye.m($APP.
|
|
6
|
-
a=$APP.v(a),b=null,c=0),d=0;else return null},OM=function(a){var b=MM(a);if($APP.I($APP.l(a,"__xTableModel"),b)){b=$APP.G(b);var c=$APP.C(b,$APP.
|
|
7
|
-
e!=null?$APP.T(a,"aria-rowcount",""+$APP.P.i(e)):$APP.U(a,"aria-rowcount");$APP.I(f,"")?$APP.T(a,"aria-label",f):$APP.U(a,"aria-label");e=$APP.G(b);e=$APP.C(e,JM);$APP.I(e,"")?(d.textContent=e,$APP.U(d,"hidden")):(d.textContent="",$APP.T(d,"hidden",""));f=$APP.G(b);d=$APP.C(f,$APP.
|
|
8
|
-
"data-full-width");$APP.n(f)?$APP.T(a,"data-compact",""):$APP.U(a,"data-compact");$APP.n(c)&&NM(a);a=$APP.Q(a,"__xTableModel",b)}else a=null;return a},
|
|
3
|
+
$APP.T(d,"part","caption");$APP.T(d,"hidden","");b.appendChild(c);b.appendChild(d);b.appendChild(e);$APP.Q(a,"__xTableRefs",new $APP.M(null,3,[$APP.Fk,b,AM,d,$APP.wt,e],null));return $APP.l(a,"__xTableRefs")},MM=function(a){a=new $APP.M(null,8,[CM,a.getAttribute("columns"),DM,a.getAttribute("caption"),EM,a.getAttribute("selectable"),$APP.Ss,a.hasAttribute("striped"),FM,a.hasAttribute("bordered"),GM,a.hasAttribute("full-width"),HM,a.hasAttribute("compact"),IM,a.getAttribute("row-count")],null);var b=
|
|
4
|
+
$APP.G(a),c=$APP.C(b,CM),d=$APP.C(b,DM),e=$APP.C(b,EM);a=$APP.C(b,$APP.Ss);var f=$APP.C(b,FM),h=$APP.C(b,GM),k=$APP.C(b,HM);b=$APP.C(b,IM);a:{if(typeof c==="string"&&(c=c.trim(),$APP.I(c,""))){var m=parseInt(c,10);c=$APP.p(isNaN(m))&&m>0&&$APP.z.j(c,""+$APP.P.i(m))?"repeat("+$APP.P.i(m)+",1fr)":c;break a}c=null}d=$APP.n(d)?d:"";e=typeof e==="string"?e.trim().toLowerCase():null;e=$APP.ed(fea,e)?e:"none";return new $APP.M(null,8,[$APP.zs,c,JM,d,KM,e,$APP.Ss,$APP.D(a),FM,$APP.D(f),GM,$APP.D(h),HM,$APP.D(k),
|
|
5
|
+
LM,zM(b)],null)},NM=function(a){a=$APP.q($APP.ye.m($APP.eo,$APP.Ec(a.querySelectorAll("x-table-row")),$APP.xh(0,Number.MAX_VALUE)));for(var b=null,c=0,d=0;;)if(d<c){var e=b.C(null,d),f=$APP.B(e,0,null);e=$APP.B(e,1,null);$APP.ud(e+1,2)===0?$APP.T(f,"data-stripe","even"):$APP.U(f,"data-stripe");d+=1}else if(a=$APP.q(a))$APP.$c(a)?(b=$APP.Fb(a),a=$APP.Gb(a),f=b,c=$APP.w(b),b=f):(b=$APP.t(a),f=$APP.B(b,0,null),e=$APP.B(b,1,null),$APP.ud(e+1,2)===0?$APP.T(f,"data-stripe","even"):$APP.U(f,"data-stripe"),
|
|
6
|
+
a=$APP.v(a),b=null,c=0),d=0;else return null},OM=function(a){var b=MM(a);if($APP.I($APP.l(a,"__xTableModel"),b)){b=$APP.G(b);var c=$APP.C(b,$APP.Ss),d=BM(a);d=$APP.G(d);d=$APP.C(d,AM);var e=$APP.G(b);e=$APP.C(e,$APP.zs);$APP.n(e)?a.style.gridTemplateColumns=e:a.style.gridTemplateColumns="";var f=$APP.G(b),h=$APP.C(f,KM);e=$APP.C(f,LM);f=$APP.C(f,JM);$APP.T(a,"role",$APP.z.j(h,"none")?"table":"grid");h=$APP.z.j(h,"multi")?"true":null;$APP.n(h)?$APP.T(a,"aria-multiselectable",h):$APP.U(a,"aria-multiselectable");
|
|
7
|
+
e!=null?$APP.T(a,"aria-rowcount",""+$APP.P.i(e)):$APP.U(a,"aria-rowcount");$APP.I(f,"")?$APP.T(a,"aria-label",f):$APP.U(a,"aria-label");e=$APP.G(b);e=$APP.C(e,JM);$APP.I(e,"")?(d.textContent=e,$APP.U(d,"hidden")):(d.textContent="",$APP.T(d,"hidden",""));f=$APP.G(b);d=$APP.C(f,$APP.Ss);e=$APP.C(f,FM);h=$APP.C(f,GM);f=$APP.C(f,HM);$APP.n(d)?$APP.T(a,"data-striped",""):$APP.U(a,"data-striped");$APP.n(e)?$APP.T(a,"data-bordered",""):$APP.U(a,"data-bordered");$APP.n(h)?$APP.T(a,"data-full-width",""):$APP.U(a,
|
|
8
|
+
"data-full-width");$APP.n(f)?$APP.T(a,"data-compact",""):$APP.U(a,"data-compact");$APP.n(c)&&NM(a);a=$APP.Q(a,"__xTableModel",b)}else a=null;return a},gea=function(a){function b(){var f=$APP.l(a,"__xTableModel");f=$APP.n(f)?f:MM(a);return $APP.n($APP.Ss.i(f))?NM(a):null}function c(f){var h=$APP.l(a,"__xTableModel");h=$APP.n(h)?h:MM(a);var k=KM.i(h);if($APP.I(k,"none"))if(h=f.target,f=$APP.l(f.detail,"rowIndex"),$APP.jj(a,"x-table-row-select",$APP.gm(new $APP.M(null,3,[$APP.ur,$APP.n(f)?f:0,$APP.Zr,
|
|
9
9
|
$APP.p(h.hasAttribute("selected")),PM,k],null))),$APP.z.j(k,"single")){f=h.hasAttribute("selected");k=$APP.Fc(a.querySelectorAll(""+$APP.P.i("x-table-row")+"["+$APP.P.i("selected")+"]"));k=$APP.q(k);for(var m=null,r=0,u=0;;)if(u<r){var x=m.C(null,u);$APP.U(x,"selected");u+=1}else if(k=$APP.q(k))m=k,$APP.$c(m)?(k=$APP.Fb(m),u=$APP.Gb(m),m=k,r=$APP.w(k),k=u):(k=$APP.t(m),$APP.U(k,"selected"),k=$APP.v(m),m=null,r=0),u=0;else break;h=$APP.n(f)?null:$APP.T(h,"selected","")}else h=$APP.z.j(k,"multi")?$APP.n(h.hasAttribute("selected"))?
|
|
10
|
-
$APP.U(h,"selected"):$APP.T(h,"selected",""):null;else h=null;return h}function d(f){var h=f.target;h=Array.from(h.parentElement.querySelectorAll("x-table-cell")).indexOf(h);var k=$APP.l(f.detail,"direction"),m=$APP.l(f.detail,"previousDirection");h>=0?(f.stopPropagation(),f=$APP.jj(a,"x-table-sort",$APP.gm(new $APP.M(null,3,[QM,h,$APP.
|
|
11
|
-
b);e.sort=d;e["row-click"]=c;e["row-conn"]=b;$APP.Q(a,"__xTableHandlers",e)},RM=function(a){var b=$APP.l(a,"__xTableHandlers");if($APP.n(b)){var c=$APP.l(b,"sort"),d=$APP.l(b,"row-click");b=$APP.l(b,"row-conn");$APP.n(c)&&a.removeEventListener("x-table-cell-sort",c);$APP.n(d)&&a.removeEventListener("x-table-row-click",d);$APP.n(b)&&a.removeEventListener("x-table-row-connected",b)}return $APP.Q(a,"__xTableHandlers",null)},
|
|
12
|
-
"");$APP.pj(a,"selectable","selectable","none");$APP.mj(a,"striped","striped");$APP.mj(a,"bordered","bordered");$APP.mj(a,"compact","compact");$APP.mj(a,"fullWidth","full-width");return Object.defineProperty(a,"rowCount",{get:function(){return zM(this.getAttribute("row-count"))},set:function(b){return b==null?$APP.U(this,"row-count"):$APP.T(this,"row-count",""+$APP.P.i(Math.floor(b)))},enumerable:!0,configurable:!0})},
|
|
13
|
-
|
|
14
|
-
"caption-raw",-375935083),PM=new $APP.F(null,"selectionMode","selectionMode",1264773367),CM=new $APP.F(null,"columns-raw","columns-raw",-2093994046),KM=new $APP.F(null,"selectable","selectable",370587038),JM=new $APP.F(null,"caption","caption",-855383902),FM=new $APP.F(null,"bordered?","bordered?",562358476),AM=new $APP.F(null,"caption-div","caption-div",1485363333),HM=new $APP.F(null,"compact?","compact?",1216893298);var
|
|
10
|
+
$APP.U(h,"selected"):$APP.T(h,"selected",""):null;else h=null;return h}function d(f){var h=f.target;h=Array.from(h.parentElement.querySelectorAll("x-table-cell")).indexOf(h);var k=$APP.l(f.detail,"direction"),m=$APP.l(f.detail,"previousDirection");h>=0?(f.stopPropagation(),f=$APP.jj(a,"x-table-sort",$APP.gm(new $APP.M(null,3,[QM,h,$APP.gr,k,$APP.Au,m],null)))):f=null;return f}var e={};a.addEventListener("x-table-cell-sort",d);a.addEventListener("x-table-row-click",c);a.addEventListener("x-table-row-connected",
|
|
11
|
+
b);e.sort=d;e["row-click"]=c;e["row-conn"]=b;$APP.Q(a,"__xTableHandlers",e)},RM=function(a){var b=$APP.l(a,"__xTableHandlers");if($APP.n(b)){var c=$APP.l(b,"sort"),d=$APP.l(b,"row-click");b=$APP.l(b,"row-conn");$APP.n(c)&&a.removeEventListener("x-table-cell-sort",c);$APP.n(d)&&a.removeEventListener("x-table-row-click",d);$APP.n(b)&&a.removeEventListener("x-table-row-connected",b)}return $APP.Q(a,"__xTableHandlers",null)},hea=function(a){$APP.pj(a,"columns","columns","");$APP.pj(a,"caption","caption",
|
|
12
|
+
"");$APP.pj(a,"selectable","selectable","none");$APP.mj(a,"striped","striped");$APP.mj(a,"bordered","bordered");$APP.mj(a,"compact","compact");$APP.mj(a,"fullWidth","full-width");return Object.defineProperty(a,"rowCount",{get:function(){return zM(this.getAttribute("row-count"))},set:function(b){return b==null?$APP.U(this,"row-count"):$APP.T(this,"row-count",""+$APP.P.i(Math.floor(b)))},enumerable:!0,configurable:!0})},iea=function(a){BM(a);RM(a);gea(a);return OM(a)},jea=function(a){return RM(a)},
|
|
13
|
+
kea=function(a,b,c,d){return $APP.I(c,d)?OM(a):null},SM=function(){return $APP.zi("x-table",new $APP.M(null,5,[$APP.ji,lea,$APP.hi,iea,$APP.ei,jea,$APP.di,kea,$APP.ii,hea],null))},GM=new $APP.F(null,"full-width?","full-width?",1477288349),IM=new $APP.F(null,"row-count-raw","row-count-raw",-1432781274),EM=new $APP.F(null,"selectable-raw","selectable-raw",-1276314763),QM=new $APP.F(null,"colIndex","colIndex",171239635),LM=new $APP.F(null,"row-count","row-count",1060167988),DM=new $APP.F(null,"caption-raw",
|
|
14
|
+
"caption-raw",-375935083),PM=new $APP.F(null,"selectionMode","selectionMode",1264773367),CM=new $APP.F(null,"columns-raw","columns-raw",-2093994046),KM=new $APP.F(null,"selectable","selectable",370587038),JM=new $APP.F(null,"caption","caption",-855383902),FM=new $APP.F(null,"bordered?","bordered?",562358476),AM=new $APP.F(null,"caption-div","caption-div",1485363333),HM=new $APP.F(null,"compact?","compact?",1216893298);var lea="columns caption selectable striped bordered full-width compact row-count".split(" ");$APP.je(["x-table-sort",new $APP.M(null,2,[$APP.V,new $APP.M(null,3,[QM,$APP.Y,$APP.gr,$APP.X,$APP.Au,$APP.X],null),$APP.gu,!0],null),"x-table-row-select",new $APP.M(null,2,[$APP.V,new $APP.M(null,3,[$APP.ur,$APP.Y,$APP.Zr,$APP.vj,PM,$APP.X],null),$APP.gu,!0],null)]);var fea=new $APP.ch(null,new $APP.M(null,3,["none",null,"single",null,"multi",null],null),null);$APP.fa("baredom.exports.x_table.init",SM);export const init=SM;
|
package/dist/x-tabs.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var mT=function(a){var b=$APP.G(a);a=$APP.C(b,$APP.Ui);var c=$APP.C(b,$APP.
|
|
3
|
-
b.tagName)},$APP.Ec(a.children)))},pT=function(a){return $APP.p(a.hasAttribute("disabled"))},qT=function(a){return a.getAttribute("value")},
|
|
4
|
-
$APP.U(a,"selected"))},tT=function(a,b){var c=a.getAttribute("tabindex");$APP.I(c,b)&&$APP.T(a,"tabindex",b)},uT=function(a,b){a=a.getAttribute("controls");$APP.n($APP.n(a)?$APP.I(a,""):a)&&(a=document.getElementById(a),$APP.n(a)&&($APP.n(b)?$APP.U(a,"hidden"):$APP.T(a,"hidden","")))},vT=function(a){var b=oT(a),c=a.getAttribute("value"),d=$APP.hh($APP.te(qT,b));$APP.n($APP.n(c)?$APP.ed(d,c):c)||(c=
|
|
2
|
+
var mT=function(a){var b=$APP.G(a);a=$APP.C(b,$APP.Ui);var c=$APP.C(b,$APP.kt),d=$APP.C(b,lT),e=$APP.C(b,$APP.Wj);b=$APP.C(b,$APP.Bu);c=$APP.ed($ha,c)?c:"horizontal";d=$APP.ed(aia,d)?d:"auto";return new $APP.M(null,5,[$APP.Ui,a,$APP.kt,c,lT,d,$APP.Wj,e,$APP.Bu,$APP.D(b)],null)},nT=function(a){return new $APP.M(null,5,[$APP.Ui,a.getAttribute("value"),$APP.kt,a.getAttribute("orientation"),lT,a.getAttribute("activation"),$APP.Wj,a.getAttribute("label"),$APP.Bu,a.hasAttribute("loop")],null)},oT=function(a){return $APP.bf($APP.Ee(function(b){return $APP.z.j("X-TAB",
|
|
3
|
+
b.tagName)},$APP.Ec(a.children)))},pT=function(a){return $APP.p(a.hasAttribute("disabled"))},qT=function(a){return a.getAttribute("value")},bia=function(a){return $APP.pe(function(b){return pT(b)?b:null},a)},rT=function(a,b){var c=a.getAttribute("value");$APP.n($APP.n(b)?$APP.I(c,b):b)?$APP.T(a,"value",b):(b=b==null||$APP.z.j(b,""),$APP.n(b?c:b)&&$APP.U(a,"value"))},sT=function(a,b){var c=a.hasAttribute("selected");$APP.n($APP.n(b)?$APP.p(c):b)?$APP.T(a,"selected",""):(b=$APP.p(b),$APP.n(b?c:b)&&
|
|
4
|
+
$APP.U(a,"selected"))},tT=function(a,b){var c=a.getAttribute("tabindex");$APP.I(c,b)&&$APP.T(a,"tabindex",b)},uT=function(a,b){a=a.getAttribute("controls");$APP.n($APP.n(a)?$APP.I(a,""):a)&&(a=document.getElementById(a),$APP.n(a)&&($APP.n(b)?$APP.U(a,"hidden"):$APP.T(a,"hidden","")))},vT=function(a){var b=oT(a),c=a.getAttribute("value"),d=$APP.hh($APP.te(qT,b));$APP.n($APP.n(c)?$APP.ed(d,c):c)||(c=bia(b),c=$APP.n(c)?qT(c):null);if($APP.n(c)){a:{d=$APP.q(b);for(var e=null,f=0,h=0;;)if(h<f){var k=e.C(null,
|
|
5
5
|
h),m=$APP.z.j(qT(k),c);sT(k,m);m&&pT(k)?tT(k,"0"):tT(k,"-1");h+=1}else if(d=$APP.q(d))$APP.$c(d)?(e=$APP.Fb(d),d=$APP.Gb(d),k=e,f=$APP.w(e),e=k):(k=$APP.t(d),e=$APP.z.j(qT(k),c),sT(k,e),e&&pT(k)?tT(k,"0"):tT(k,"-1"),d=$APP.v(d),e=null,f=0),h=0;else break a}a:for(b=$APP.q(b),d=null,f=e=0;;)if(f<e)k=d.C(null,f),uT(k,$APP.z.j(qT(k),c)),f+=1;else if(b=$APP.q(b))d=b,$APP.$c(d)?(b=$APP.Fb(d),e=$APP.Gb(d),d=b,k=$APP.w(b),b=e,e=k):(k=$APP.t(d),uT(k,$APP.z.j(qT(k),c)),b=$APP.v(d),d=null,e=0),f=0;else break a;
|
|
6
6
|
rT(a,c)}return c},wT=function(a,b){var c=a.getAttribute("value");return $APP.n($APP.n(b)?$APP.I(c,b):b)&&$APP.jj(a,"value-change-request",{value:b,previousValue:$APP.n(c)?c:""})?(rT(a,b),vT(a),$APP.hj(a,"value-change",{value:$APP.n(b)?b:""})):null},xT=function(a,b,c){b=$APP.w(b)-1;var d=a+1;return d<=b?d:$APP.n(c)?0:a},yT=function(a,b,c){var d=a-1;b=$APP.w(b)-1;return d>=0?d:$APP.n(c)?b:a},zT=function(a){var b=mT(nT(a));if($APP.I(b,$APP.l(a,"__xTabsModel"))){var c=$APP.l(a,"__xTabsBase");if($APP.n(c)){$APP.T(c,
|
|
7
|
-
"role","tablist");$APP.T(c,"aria-orientation",$APP.
|
|
8
|
-
var k=lT.i(f);f=$APP.
|
|
9
|
-
null;break a}k=null}return k}function c(d){d.stopPropagation();return wT(a,d.detail.value)}a.addEventListener("tab-select",c);a.addEventListener("keydown",b);$APP.Q(a,"__xTabsOnTabSelect",c);$APP.Q(a,"__xTabsOnKeydown",b);
|
|
10
|
-
$APP.T(d,"part","base");d.className="base";d.appendChild(e);b.appendChild(c);b.appendChild(d);$APP.Q(a,"__xTabsBase",d);AT(a);$APP.Wi(a,"__xTabsInitialized")}zT(a);return a},
|
|
11
|
-
null},
|
|
12
|
-
$APP.je(["value-change-request",new $APP.M(null,2,[$APP.
|
|
7
|
+
"role","tablist");$APP.T(c,"aria-orientation",$APP.kt.i(b));var d=$APP.Wj.i(b);$APP.n($APP.n(d)?$APP.I(d,""):d)?$APP.T(c,"aria-label",d):$APP.U(c,"aria-label")}$APP.Q(a,"__xTabsModel",b)}return vT(a)},cia=function(a){var b=new MutationObserver(function(){return zT(a)});b.observe(a,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value","selected","disabled","controls"]});$APP.Q(a,"__xTabsObserver",b)},AT=function(a){function b(d){a:{var e=$APP.bf($APP.Ee(pT,oT(a))),f=mT(nT(a)),h=$APP.kt.i(f);
|
|
8
|
+
var k=lT.i(f);f=$APP.Bu.i(f);var m=d.key,r=e.indexOf(document.activeElement);if(r>=0&&(h=$APP.z.j(h,"horizontal")&&$APP.z.j(m,"ArrowRight")?xT(r,e,f):$APP.z.j(h,"horizontal")&&$APP.z.j(m,"ArrowLeft")?yT(r,e,f):$APP.z.j(h,"vertical")&&$APP.z.j(m,"ArrowDown")?xT(r,e,f):$APP.z.j(h,"vertical")&&$APP.z.j(m,"ArrowUp")?yT(r,e,f):$APP.z.j(m,"Home")?0:$APP.z.j(m,"End")?$APP.w(e)-1:null,h!=null)){d.preventDefault();d=$APP.B(e,h,null);$APP.n(d)?d.focus():d=null;k=$APP.n(d)?$APP.z.j(k,"auto")?wT(a,qT(d)):null:
|
|
9
|
+
null;break a}k=null}return k}function c(d){d.stopPropagation();return wT(a,d.detail.value)}a.addEventListener("tab-select",c);a.addEventListener("keydown",b);$APP.Q(a,"__xTabsOnTabSelect",c);$APP.Q(a,"__xTabsOnKeydown",b);cia(a)},dia=function(a){if($APP.Vi(a,"__xTabsInitialized"))return AT(a),zT(a);if(!$APP.Vi(a,"__xTabsInitialized")){var b=a.attachShadow({mode:"open"}),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);}";
|
|
10
|
+
$APP.T(d,"part","base");d.className="base";d.appendChild(e);b.appendChild(c);b.appendChild(d);$APP.Q(a,"__xTabsBase",d);AT(a);$APP.Wi(a,"__xTabsInitialized")}zT(a);return a},eia=function(a){var b=$APP.l(a,"__xTabsOnTabSelect");$APP.n(b)&&a.removeEventListener("tab-select",b);b=$APP.l(a,"__xTabsOnKeydown");$APP.n(b)&&a.removeEventListener("keydown",b);a=$APP.l(a,"__xTabsObserver");return $APP.n(a)?a.disconnect():null},fia=function(a,b,c,d){return $APP.I(c,d)&&$APP.Vi(a,"__xTabsInitialized")?zT(a):
|
|
11
|
+
null},hia=function(a){return $APP.xj(a,gia)},BT=function(){return $APP.zi("x-tabs",new $APP.M(null,5,[$APP.ji,iia,$APP.hi,dia,$APP.ei,eia,$APP.di,fia,$APP.ii,hia],null))},lT=new $APP.F(null,"activation","activation",2128521072);var iia=["value","orientation","activation","label","loop"],$ha=new $APP.ch(null,new $APP.M(null,2,["vertical",null,"horizontal",null],null),null),aia=new $APP.ch(null,new $APP.M(null,2,["auto",null,"manual",null],null),null),gia=new $APP.M(null,1,[$APP.Ui,new $APP.M(null,2,[$APP.N,$APP.X,$APP.W,"value"],null)],null);
|
|
12
|
+
$APP.je(["value-change-request",new $APP.M(null,2,[$APP.gu,!0,$APP.V,new $APP.M(null,2,[$APP.Ui,$APP.X,$APP.Hs,$APP.X],null)],null),"value-change",new $APP.M(null,1,[$APP.V,new $APP.M(null,1,[$APP.Ui,$APP.X],null)],null)]);$APP.fa("baredom.exports.x_tabs.init",BT);export const init=BT;
|
package/dist/x-text-area.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var d7=function(a){return typeof a==="string"?(a=parseInt(a,10),$APP.p(isNaN(a))&&a>0?a:null):null},e7=function(a,b,c){var d=a.hasAttribute("error");var e=a.getAttribute("error");e=$APP.n(e)?e:"";a=a.hasAttribute("required");var f=c.value;$APP.n(d)?b.setValidity({customError:!0},e,c):$APP.n($APP.n(a)?$APP.z.j(f,""):a)?b.setValidity({valueMissing:!0},"Please fill in this field.",c):b.setValidity({},"",c)},m7=function(a){a=$APP.Gg([f7,$APP.Dj,$APP.Aj,$APP.
|
|
2
|
+
var d7=function(a){return typeof a==="string"?(a=parseInt(a,10),$APP.p(isNaN(a))&&a>0?a:null):null},e7=function(a,b,c){var d=a.hasAttribute("error");var e=a.getAttribute("error");e=$APP.n(e)?e:"";a=a.hasAttribute("required");var f=c.value;$APP.n(d)?b.setValidity({customError:!0},e,c):$APP.n($APP.n(a)?$APP.z.j(f,""):a)?b.setValidity({valueMissing:!0},"Please fill in this field.",c):b.setValidity({},"",c)},m7=function(a){a=$APP.Gg([f7,$APP.Dj,$APP.Aj,$APP.rq,$APP.Jq,g7,$APP.Ej,h7,$APP.Fj,$APP.gl,$APP.Bj,
|
|
3
3
|
$APP.Sj,i7,$APP.Cj],[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"),a.hasAttribute("readonly"),a.getAttribute("value"),a.getAttribute("autocomplete"),a.getAttribute("minlength"),a.getAttribute("placeholder")]);var b=$APP.G(a),c=$APP.C(b,i7),d=$APP.C(b,$APP.Cj),e=$APP.C(b,f7),f=$APP.C(b,$APP.Dj),h=$APP.C(b,$APP.Aj),k=$APP.C(b,
|
|
4
|
-
$APP.
|
|
5
|
-
$APP.
|
|
6
|
-
$APP.Uj),E=$APP.C(h,k7),H=$APP.C(h,l7);h=$APP.C(h,$APP.
|
|
7
|
-
k=$APP.n($APP.n(r)?m:r)?"hint error":$APP.n(r)?"hint":$APP.n(m)?"error":null;$APP.n(k)?$APP.T(d,"aria-describedby",k):$APP.U(d,"aria-describedby");m=$APP.G(c);k=$APP.C(m,$APP.Wj);m=$APP.C(m,$APP.
|
|
8
|
-
"__xTextAreaModel",c)},p7=function(a){var b=$APP.l(a,"__xTextAreaRefs");return $APP.n(b)?o7(a,b,m7(a)):null},
|
|
9
|
-
$APP.hj(a,"x-text-area-input",{name:e,value:c})):b.value=d}return null},
|
|
10
|
-
c);b.addEventListener("change",d);$APP.Q(a,"__xTextAreaHandlers",{input:c,change:d})}},q7=function(a){var b=$APP.l(a,"__xTextAreaRefs");if($APP.n(b)){var c=$APP.l(a,"__xTextAreaHandlers");if($APP.n(c))return b=$APP.l(b,"textarea"),b.removeEventListener("input",$APP.l(c,"input")),b.removeEventListener("change",$APP.l(c,"change")),$APP.Q(a,"__xTextAreaHandlers",null)}return null},
|
|
11
|
-
$APP.n(b)&&($APP.l(b,"textarea").value="");b=$APP.l(a,"__xTextAreaInternals");$APP.n(b)&&b.setFormValue("");return p7(a)},
|
|
4
|
+
$APP.rq),m=$APP.C(b,$APP.Jq),r=$APP.C(b,g7);a=$APP.C(b,$APP.Ej);var u=$APP.C(b,h7),x=$APP.C(b,$APP.Fj),y=$APP.C(b,$APP.gl),A=$APP.C(b,$APP.Bj);b=$APP.C(b,$APP.Sj);var E=$APP.n(k)?k:"",H=$APP.n(m)?m:"",O=$APP.n(f)?f:"";x=$APP.D(x);y=$APP.D(y);d=$APP.n(d)?d:"";m=typeof m==="string"&&$APP.I(m,"");h=$APP.n(h)?h:"";A=$APP.n(A)?A:"";c=d7(c);f=typeof f==="string"&&$APP.I(f,"");k=typeof k==="string"&&$APP.I(k,"");e=typeof e==="string"&&$APP.ed(Rsa,e)?e:"vertical";r=d7(r);return $APP.Gg([$APP.Yj,$APP.ll,$APP.Vj,
|
|
5
|
+
$APP.Vp,$APP.Uj,$APP.Ui,j7,$APP.tt,$APP.Rs,k7,$APP.St,l7,$APP.cr,$APP.Wj,$APP.gq,$APP.Zj,$APP.Xj],[x,y,d,m,h,A,c,f,k,e,H,d7(u),$APP.n(r)?r:3,O,E,$APP.n(b)?b:"",$APP.D(a)])},n7=function(a,b,c,d){a.textContent=b;$APP.n(c)?a.classList.remove(d):a.classList.add(d)},o7=function(a,b,c){var d=$APP.l(b,"textarea"),e=$APP.l(b,"label"),f=$APP.l(b,"hint");b=$APP.l(b,"error");var h=$APP.G(c),k=$APP.C(h,$APP.Zj),m=$APP.C(h,$APP.Xj),r=$APP.C(h,$APP.Yj),u=$APP.C(h,$APP.ll),x=$APP.C(h,$APP.Vj),y=$APP.C(h,j7),A=$APP.C(h,
|
|
6
|
+
$APP.Uj),E=$APP.C(h,k7),H=$APP.C(h,l7);h=$APP.C(h,$APP.cr);d.name=A;d.placeholder=x;d.disabled=m;d.readOnly=u;d.required=r;d.rows=h;d.autocomplete=k;$APP.n(H)?$APP.T(d,"maxlength",""+$APP.P.i(H)):$APP.U(d,"maxlength");$APP.n(y)?$APP.T(d,"minlength",""+$APP.P.i(y)):$APP.U(d,"minlength");a.style.setProperty("--x-text-area-resize",E);r=$APP.G(c);k=$APP.C(r,$APP.Yj);m=$APP.C(r,$APP.Rs);r=$APP.C(r,$APP.Vp);$APP.T(d,"aria-required",$APP.n(k)?"true":"false");$APP.T(d,"aria-invalid",$APP.n(m)?"true":"false");
|
|
7
|
+
k=$APP.n($APP.n(r)?m:r)?"hint error":$APP.n(r)?"hint":$APP.n(m)?"error":null;$APP.n(k)?$APP.T(d,"aria-describedby",k):$APP.U(d,"aria-describedby");m=$APP.G(c);k=$APP.C(m,$APP.Wj);m=$APP.C(m,$APP.tt);n7(e,k,m,"label-hidden");k=$APP.G(c);e=$APP.C(k,$APP.St);k=$APP.C(k,$APP.Vp);n7(f,e,k,"hint-hidden");e=$APP.G(c);f=$APP.C(e,$APP.gq);e=$APP.C(e,$APP.Rs);n7(b,f,e,"error-hidden");b=$APP.G(c);b=$APP.C(b,$APP.Rs);$APP.cj(a,"data-invalid",b);b=$APP.l(a,"__xTextAreaInternals");$APP.n(b)&&e7(a,b,d);return $APP.Q(a,
|
|
8
|
+
"__xTextAreaModel",c)},p7=function(a){var b=$APP.l(a,"__xTextAreaRefs");return $APP.n(b)?o7(a,b,m7(a)):null},Ssa=function(a){var b=$APP.l(a,"__xTextAreaRefs");if($APP.n(b)){b=$APP.l(b,"textarea");var c=b.value,d=function(){var f=a.getAttribute("value");return $APP.n(f)?f:""}(),e=function(){var f=a.getAttribute("name");return $APP.n(f)?f:""}();return $APP.jj(a,"x-text-area-change-request",{name:e,value:c,previousValue:d})?(d=$APP.l(a,"__xTextAreaInternals"),$APP.n(d)&&(d.setFormValue(c),e7(a,d,b)),
|
|
9
|
+
$APP.hj(a,"x-text-area-input",{name:e,value:c})):b.value=d}return null},Tsa=function(a){var b=$APP.l(a,"__xTextAreaRefs");if($APP.n(b)){b=$APP.l(b,"textarea");var c=function(){return Ssa(a)},d=function(){var e=$APP.l(a,"__xTextAreaRefs");if($APP.n(e)){e=$APP.l(e,"textarea");var f=e.value;var h=a.getAttribute("name");h=$APP.n(h)?h:"";var k=$APP.l(a,"__xTextAreaInternals");$APP.n(k)&&(k.setFormValue(f),e7(a,k,e));e=$APP.hj(a,"x-text-area-change",{name:h,value:f})}else e=null;return e};b.addEventListener("input",
|
|
10
|
+
c);b.addEventListener("change",d);$APP.Q(a,"__xTextAreaHandlers",{input:c,change:d})}},q7=function(a){var b=$APP.l(a,"__xTextAreaRefs");if($APP.n(b)){var c=$APP.l(a,"__xTextAreaHandlers");if($APP.n(c))return b=$APP.l(b,"textarea"),b.removeEventListener("input",$APP.l(c,"input")),b.removeEventListener("change",$APP.l(c,"change")),$APP.Q(a,"__xTextAreaHandlers",null)}return null},Usa=function(a,b){$APP.cj(a,"disabled",$APP.D(b));return p7(a)},Vsa=function(a){$APP.U(a,"value");var b=$APP.l(a,"__xTextAreaRefs");
|
|
11
|
+
$APP.n(b)&&($APP.l(b,"textarea").value="");b=$APP.l(a,"__xTextAreaInternals");$APP.n(b)&&b.setFormValue("");return p7(a)},Wsa=function(a){if(!$APP.n($APP.l(a,"__xTextAreaRefs"))){var b=a.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("label"),f=document.createElement("div"),h=document.createElement("textarea"),k=document.createElement("span"),m=document.createElement("span");c.textContent=":host{display:block;color-scheme:light dark;--x-text-area-label-color:#374151;--x-text-area-label-font-size:var(--x-font-size-sm,0.875rem);--x-text-area-bg:var(--x-color-surface,#ffffff);--x-text-area-color:#111827;--x-text-area-border:1px solid var(--x-color-border,#d1d5db);--x-text-area-border-radius:var(--x-radius-md,6px);--x-text-area-padding:0.5rem 0.75rem;--x-text-area-focus-ring-color:var(--x-color-primary,#2563eb);--x-text-area-error-color:var(--x-color-danger,#dc2626);--x-text-area-hint-color:var(--x-color-text-muted,#6b7280);--x-text-area-disabled-opacity:0.45;--x-text-area-min-height:5rem;--x-text-area-font-size:var(--x-font-size-base,1rem);--x-text-area-resize:vertical;}@media (prefers-color-scheme:dark){:host{--x-text-area-label-color:var(--x-color-border,#d1d5db);--x-text-area-bg:var(--x-color-surface,#1f2937);--x-text-area-color:#f9fafb;--x-text-area-border:1px solid var(--x-color-border,#4b5563);--x-text-area-focus-ring-color:var(--x-color-primary,#3b82f6);--x-text-area-error-color:#f87171;--x-text-area-hint-color:var(--x-color-text-muted,#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;}}";
|
|
12
12
|
$APP.T(d,"part","field");$APP.T(e,"part","label");$APP.T(e,"id","label");$APP.T(e,"for","textarea");$APP.T(f,"part","textarea-wrapper");$APP.T(h,"part","textarea");$APP.T(h,"id","textarea");$APP.T(h,"aria-labelledby","label");$APP.T(k,"part","hint");$APP.T(k,"id","hint");$APP.T(k,"aria-live","polite");$APP.T(m,"part","error");$APP.T(m,"id","error");$APP.T(m,"role","alert");$APP.T(m,"aria-live","assertive");f.appendChild(h);d.appendChild(e);d.appendChild(f);d.appendChild(k);d.appendChild(m);b.appendChild(c);
|
|
13
|
-
b.appendChild(d);$APP.Q(a,"__xTextAreaRefs",{field:d,label:e,textarea:h,hint:k,error:m});$APP.n(a.attachInternals)&&$APP.Q(a,"__xTextAreaInternals",a.attachInternals())}q7(a);b=$APP.l(a,"__xTextAreaRefs");$APP.n(b)&&(b=$APP.l(b,"textarea"),c=a.getAttribute("value"),$APP.n(c)&&(b.value=c));b=$APP.l(a,"__xTextAreaInternals");$APP.n(b)&&(c=b.setFormValue,d=a.getAttribute("value"),c.call(b,$APP.n(d)?d:""));
|
|
14
|
-
"value")&&(b=$APP.l(a,"__xTextAreaRefs"),$APP.n(b)&&(b=$APP.l(b,"textarea"),$APP.I(b.value,d)&&(b.value=$APP.n(d)?d:""))),d=$APP.l(a,"__xTextAreaRefs"),$APP.n(d)?(b=m7(a),a=$APP.I(b,$APP.l(a,"__xTextAreaModel"))?o7(a,d,b):null):a=null,a):null},
|
|
15
|
-
$APP.I(b)?""+$APP.P.i(b):"";$APP.T(this,"value",b);var c=$APP.l(this,"__xTextAreaRefs");return $APP.n(c)?$APP.l(c,"textarea").value=b:null}})}
|
|
16
|
-
new $APP.M(null,8,[$APP.ji,$
|
|
17
|
-
297367086);var
|
|
18
|
-
$APP.Gg([$APP.zm,$APP.Uj,$APP.Ui,new $APP.F(null,"minLength","minLength",-1538722770),$APP.
|
|
13
|
+
b.appendChild(d);$APP.Q(a,"__xTextAreaRefs",{field:d,label:e,textarea:h,hint:k,error:m});$APP.n(a.attachInternals)&&$APP.Q(a,"__xTextAreaInternals",a.attachInternals())}q7(a);b=$APP.l(a,"__xTextAreaRefs");$APP.n(b)&&(b=$APP.l(b,"textarea"),c=a.getAttribute("value"),$APP.n(c)&&(b.value=c));b=$APP.l(a,"__xTextAreaInternals");$APP.n(b)&&(c=b.setFormValue,d=a.getAttribute("value"),c.call(b,$APP.n(d)?d:""));Tsa(a);return p7(a)},Xsa=function(a){return q7(a)},Ysa=function(a,b,c,d){return $APP.I(c,d)?($APP.z.j(b,
|
|
14
|
+
"value")&&(b=$APP.l(a,"__xTextAreaRefs"),$APP.n(b)&&(b=$APP.l(b,"textarea"),$APP.I(b.value,d)&&(b.value=$APP.n(d)?d:""))),d=$APP.l(a,"__xTextAreaRefs"),$APP.n(d)?(b=m7(a),a=$APP.I(b,$APP.l(a,"__xTextAreaModel"))?o7(a,d,b):null):a=null,a):null},Zsa=function(a){Object.defineProperty(a,"value",{configurable:!0,enumerable:!0,get:function(){var b=$APP.l(this,"__xTextAreaRefs");if($APP.n(b))return $APP.l(b,"textarea").value;b=this.getAttribute("value");return $APP.n(b)?b:""},set:function(b){b=b!=null&&
|
|
15
|
+
$APP.I(b)?""+$APP.P.i(b):"";$APP.T(this,"value",b);var c=$APP.l(this,"__xTextAreaRefs");return $APP.n(c)?$APP.l(c,"textarea").value=b:null}})},$sa=function(a){Zsa(a);$APP.pj(a,"name","name","");$APP.pj(a,"placeholder","placeholder","");$APP.pj(a,"autocomplete","autocomplete","");$APP.mj(a,"disabled","disabled");$APP.mj(a,"readOnly","readonly");$APP.mj(a,"required","required");$APP.rj(a,"rows","rows",3);$APP.rj(a,"maxLength","maxlength",null);return $APP.rj(a,"minLength","minlength",null)},r7=function(){return $APP.zi("x-text-area",
|
|
16
|
+
new $APP.M(null,8,[$APP.ji,ata,$APP.hi,Wsa,$APP.ei,Xsa,$APP.di,Ysa,$APP.fi,!0,$APP.ci,Usa,$APP.bi,Vsa,$APP.ii,$sa],null))},j7=new $APP.F(null,"minlength","minlength",259053545),i7=new $APP.F(null,"minlength-raw","minlength-raw",-1245403779),h7=new $APP.F(null,"maxlength-raw","maxlength-raw",-886656470),l7=new $APP.F(null,"maxlength","maxlength",-1163911985),f7=new $APP.F(null,"resize-raw","resize-raw",-287517888),g7=new $APP.F(null,"rows-raw","rows-raw",-1828357145),k7=new $APP.F(null,"resize","resize",
|
|
17
|
+
297367086);var ata="label name value placeholder hint error disabled readonly required rows maxlength minlength autocomplete resize".split(" "),Rsa=new $APP.ch(null,new $APP.M(null,4,["none",null,"vertical",null,"both",null,"horizontal",null],null),null);
|
|
18
|
+
$APP.Gg([$APP.zm,$APP.Uj,$APP.Ui,new $APP.F(null,"minLength","minLength",-1538722770),$APP.cr,$APP.ju,new $APP.F(null,"maxLength","maxLength",-1633020073),$APP.Zj,$APP.qs],[new $APP.M(null,2,[$APP.N,$APP.vj,$APP.W,"disabled"],null),new $APP.M(null,2,[$APP.N,$APP.X,$APP.W,"name"],null),new $APP.M(null,2,[$APP.N,$APP.X,$APP.W,"value"],null),new $APP.M(null,2,[$APP.N,$APP.Y,$APP.W,"minlength"],null),new $APP.M(null,2,[$APP.N,$APP.Y,$APP.W,"rows"],null),new $APP.M(null,2,[$APP.N,$APP.vj,$APP.W,"readonly"],
|
|
19
19
|
null),new $APP.M(null,2,[$APP.N,$APP.Y,$APP.W,"maxlength"],null),new $APP.M(null,2,[$APP.N,$APP.X,$APP.W,"autocomplete"],null),new $APP.M(null,2,[$APP.N,$APP.vj,$APP.W,"required"],null)]);
|
|
20
|
-
$APP.je(["x-text-area-change-request",new $APP.M(null,2,[$APP.
|
|
20
|
+
$APP.je(["x-text-area-change-request",new $APP.M(null,2,[$APP.gu,!0,$APP.V,new $APP.M(null,3,[$APP.Uj,$APP.X,$APP.Ui,$APP.X,$APP.Hs,$APP.X],null)],null),"x-text-area-input",new $APP.M(null,2,[$APP.gu,!1,$APP.V,new $APP.M(null,2,[$APP.Uj,$APP.X,$APP.Ui,$APP.X],null)],null),"x-text-area-change",new $APP.M(null,2,[$APP.gu,!1,$APP.V,new $APP.M(null,2,[$APP.Uj,$APP.X,$APP.Ui,$APP.X],null)],null)]);$APP.fa("baredom.exports.x_text_area.init",r7);export const init=r7;
|
package/dist/x-theme.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
2
|
+
var Ufa=function(a,b){var c=pQ.i(qQ),d=rQ.i(qQ),e=b.light,f=b.dark;b=$APP.Yg($APP.Ec([c,$APP.n(e)?$APP.Kf.j($APP.ke,function(){return function m(k){return new $APP.Id(null,function(){for(;;){var r=$APP.q(k);if(r){if($APP.$c(r)){var u=$APP.Fb(r),x=$APP.w(u),y=$APP.Md(x);a:{for(var A=0;;)if(A<x){var E=$APP.Jc(u,A);y.add(new $APP.J(null,2,5,$APP.K,[E,$APP.l(e,E)],null));A+=1}else{u=!0;break a}u=void 0}return u?$APP.Rd(y.da(),m($APP.Gb(r))):$APP.Rd(y.da(),null)}y=$APP.t(r);return $APP.Fd(new $APP.J(null,
|
|
3
3
|
2,5,$APP.K,[y,$APP.l(e,y)],null),m($APP.gc(r)))}return null}},null)}(Object.keys(e))}()):null]));d=$APP.Yg($APP.Ec([d,$APP.n(f)?$APP.Kf.j($APP.ke,function(){return function m(k){return new $APP.Id(null,function(){for(;;){var r=$APP.q(k);if(r){if($APP.$c(r)){var u=$APP.Fb(r),x=$APP.w(u),y=$APP.Md(x);a:{for(var A=0;;)if(A<x){var E=$APP.Jc(u,A);y.add(new $APP.J(null,2,5,$APP.K,[E,$APP.l(f,E)],null));A+=1}else{u=!0;break a}u=void 0}return u?$APP.Rd(y.da(),m($APP.Gb(r))):$APP.Rd(y.da(),null)}y=$APP.t(r);
|
|
4
4
|
return $APP.Fd(new $APP.J(null,2,5,$APP.K,[y,$APP.l(f,y)],null),m($APP.gc(r)))}return null}},null)}(Object.keys(f))}()):null]));return $APP.la(sQ,a,new $APP.M(null,2,[pQ,b,rQ,d],null))},tQ=function(a){var b=[];a=$APP.q(a);for(var c=null,d=0,e=0;;)if(e<d){var f=c.C(null,e),h=$APP.B(f,0,null);f=$APP.B(f,1,null);b.push(""+$APP.P.i(h)+":"+$APP.P.i(f)+";");e+=1}else if(a=$APP.q(a))$APP.$c(a)?(d=$APP.Fb(a),a=$APP.Gb(a),c=d,d=$APP.w(d)):(d=$APP.t(a),c=$APP.B(d,0,null),d=$APP.B(d,1,null),b.push(""+$APP.P.i(c)+
|
|
5
|
-
":"+$APP.P.i(d)+";"),a=$APP.v(a),c=null,d=0),e=0;else break;return b.join("")},uQ=function(a){var b=new $APP.M(null,1,[$APP.
|
|
6
|
-
$APP.P.i(tQ(e))+"}}";d.textContent=c;a=$APP.Q(a,"__xThemeModel",b)}else a=null}else a=null;return a},
|
|
7
|
-
b)},wQ=function(){return $APP.zi("x-theme",new $APP.M(null,5,[$APP.ji,$
|
|
5
|
+
":"+$APP.P.i(d)+";"),a=$APP.v(a),c=null,d=0),e=0;else break;return b.join("")},uQ=function(a){var b=new $APP.M(null,1,[$APP.ss,a.getAttribute("preset")],null);if($APP.I($APP.l(a,"__xThemeModel"),b)){b=$APP.G(b);var c=$APP.C(b,$APP.ss),d=$APP.l(a,"__xThemeRefs");if($APP.n(d)){d=d.style;c=typeof c!=="string"||!$APP.ed(Vfa,c)&&$APP.l(sQ,c)==null?"default":c;var e=$APP.l(sQ,c);$APP.n(e)||(c=$APP.C(Wfa,c),e=$APP.n(c)?c:qQ);c=pQ.i(e);e=rQ.i(e);c=":host{display:contents;"+$APP.P.i(tQ(c))+"}@media(prefers-color-scheme:dark){:host{"+
|
|
6
|
+
$APP.P.i(tQ(e))+"}}";d.textContent=c;a=$APP.Q(a,"__xThemeModel",b)}else a=null}else a=null;return a},Xfa=function(a){if(!$APP.n($APP.l(a,"__xThemeRefs"))){var b=a.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("slot");b.appendChild(c);b.appendChild(d);$APP.Q(a,"__xThemeRefs",{style:c})}return uQ(a)},Yfa=function(){return null},Zfa=function(a,b,c,d){return $APP.I(c,d)?uQ(a):null},$fa=function(a){return $APP.qj(a,"preset","preset")},vQ=function(a,b){return Ufa(a,
|
|
7
|
+
b)},wQ=function(){return $APP.zi("x-theme",new $APP.M(null,5,[$APP.ji,aga,$APP.hi,Xfa,$APP.ei,Yfa,$APP.di,Zfa,$APP.ii,$fa],null))},pQ=new $APP.F(null,"light","light",1918998747),rQ=new $APP.F(null,"dark","dark",1818973999);var aga=["preset"],xQ=$APP.Gg("--x-font-weight-semibold --x-font-size-base --x-font-size-lg --x-font-weight-medium --x-font-family-mono --x-font-size-sm --x-line-height-normal --x-font-family --x-font-size-xs --x-font-weight-normal".split(" "),"600;1rem;1.125rem;500;ui-monospace,'SF Mono',monospace;0.875rem;1.5;system-ui,-apple-system,sans-serif;0.75rem;400".split(";")),yQ=$APP.je("--x-radius-sm 0.375rem --x-radius-md 0.75rem --x-radius-lg 1rem --x-radius-full 9999px --x-border-width 1px".split(" ")),
|
|
8
8
|
zQ=$APP.je(["--x-transition-duration","140ms","--x-transition-easing","cubic-bezier(0.2,0,0,1)"]),AQ=$APP.je("--x-space-xs 0.25rem --x-space-sm 0.5rem --x-space-md 0.75rem --x-space-lg 1rem --x-space-xl 1.5rem".split(" ")),BQ=$APP.je("--x-z-dropdown 1000 --x-z-modal 1100 --x-z-toast 1200".split(" ")),CQ=$APP.je(["--x-opacity-disabled","0.5","--x-opacity-placeholder","0.6"]),DQ=$APP.je("--x-shadow-sm;0 1px 2px rgba(15,23,42,0.08);--x-shadow-md;0 4px 10px rgba(15,23,42,0.10),0 2px 4px rgba(15,23,42,0.06);--x-shadow-lg;0 10px 25px rgba(15,23,42,0.12),0 4px 10px rgba(15,23,42,0.08)".split(";")),
|
|
9
9
|
EQ=$APP.je("--x-shadow-sm;0 1px 2px rgba(0,0,0,0.35);--x-shadow-md;0 6px 14px rgba(0,0,0,0.35),0 2px 6px rgba(0,0,0,0.24);--x-shadow-lg;0 12px 30px rgba(0,0,0,0.40),0 4px 12px rgba(0,0,0,0.30)".split(";")),qQ=new $APP.M(null,2,[pQ,$APP.Yg($APP.Ec([xQ,yQ,zQ,DQ,AQ,BQ,CQ,$APP.Gg("--x-color-surface --x-color-text-muted --x-color-success --x-color-tertiary-hover --x-color-warning --x-color-primary-active --x-color-border --x-color-surface-hover --x-color-danger --x-color-secondary-active --x-color-secondary-hover --x-color-tertiary-active --x-color-surface-active --x-color-focus-ring --x-color-primary --x-color-bg --x-color-text --x-color-secondary --x-color-primary-hover --x-color-tertiary".split(" "),
|
|
10
10
|
"#ffffff #64748b #16a34a #64748b #d97706 #1e40af #cbd5e1 #f8fafc #dc2626 #334155 #475569 #475569 #f1f5f9 #60a5fa #2563eb #f8fafc #0f172a #64748b #1d4ed8 #94a3b8".split(" "))])),rQ,$APP.Yg($APP.Ec([EQ,$APP.Gg("--x-color-surface --x-color-text-muted --x-color-success --x-color-tertiary-hover --x-color-warning --x-color-primary-active --x-color-border --x-color-surface-hover --x-color-danger --x-color-secondary-active --x-color-secondary-hover --x-color-tertiary-active --x-color-surface-active --x-color-focus-ring --x-color-primary --x-color-bg --x-color-text --x-color-secondary --x-color-primary-hover --x-color-tertiary".split(" "),
|
|
11
|
-
"#111827 #94a3b8 #22c55e #94a3b8 #f59e0b #1d4ed8 #374151 #1f2937 #ef4444 #475569 #64748b #64748b #273449 #93c5fd #3b82f6 #0f172a #f1f5f9 #94a3b8 #2563eb #64748b".split(" "))]))],null),
|
|
11
|
+
"#111827 #94a3b8 #22c55e #94a3b8 #f59e0b #1d4ed8 #374151 #1f2937 #ef4444 #475569 #64748b #64748b #273449 #93c5fd #3b82f6 #0f172a #f1f5f9 #94a3b8 #2563eb #64748b".split(" "))]))],null),bga=new $APP.M(null,2,[pQ,$APP.Yg($APP.Ec([xQ,yQ,zQ,DQ,AQ,BQ,CQ,$APP.Gg("--x-color-surface --x-color-text-muted --x-color-success --x-color-tertiary-hover --x-color-warning --x-color-primary-active --x-color-border --x-color-surface-hover --x-color-danger --x-color-secondary-active --x-color-secondary-hover --x-color-tertiary-active --x-color-surface-active --x-color-focus-ring --x-color-primary --x-color-bg --x-color-text --x-color-secondary --x-color-primary-hover --x-color-tertiary".split(" "),
|
|
12
12
|
"#ffffff #5f7a7a #059669 #2dd4bf #d97706 #155e75 #99f6e4 #f0fdfa #e11d48 #115e59 #0f766e #14b8a6 #ccfbf1 #22d3ee #0891b2 #f0fdfa #134e4a #0d9488 #0e7490 #5eead4".split(" "))])),rQ,$APP.Yg($APP.Ec([EQ,$APP.Gg("--x-color-surface --x-color-text-muted --x-color-success --x-color-tertiary-hover --x-color-warning --x-color-primary-active --x-color-border --x-color-surface-hover --x-color-danger --x-color-secondary-active --x-color-secondary-hover --x-color-tertiary-active --x-color-surface-active --x-color-focus-ring --x-color-primary --x-color-bg --x-color-text --x-color-secondary --x-color-primary-hover --x-color-tertiary".split(" "),
|
|
13
|
-
"#0c1a1f #5eead4 #34d399 #5eead4 #fbbf24 #0e7490 #164e63 #133e4a #fb7185 #0f766e #0d9488 #2dd4bf #164e5e #67e8f9 #06b6d4 #061216 #ecfdf5 #14b8a6 #0891b2 #2dd4bf".split(" "))]))],null),
|
|
13
|
+
"#0c1a1f #5eead4 #34d399 #5eead4 #fbbf24 #0e7490 #164e63 #133e4a #fb7185 #0f766e #0d9488 #2dd4bf #164e5e #67e8f9 #06b6d4 #061216 #ecfdf5 #14b8a6 #0891b2 #2dd4bf".split(" "))]))],null),cga=new $APP.M(null,2,[pQ,$APP.Yg($APP.Ec([xQ,yQ,zQ,DQ,AQ,BQ,CQ,$APP.Gg("--x-color-surface --x-color-text-muted --x-color-success --x-color-tertiary-hover --x-color-warning --x-color-primary-active --x-color-border --x-color-surface-hover --x-color-danger --x-color-secondary-active --x-color-secondary-hover --x-color-tertiary-active --x-color-surface-active --x-color-focus-ring --x-color-primary --x-color-bg --x-color-text --x-color-secondary --x-color-primary-hover --x-color-tertiary".split(" "),
|
|
14
14
|
"#fffbeb #65753a #15803d #84cc16 #ca8a04 #14532d #d9d2b0 #fef9c3 #dc2626 #3f6212 #4d7c0f #65a30d #fef3c7 #4ade80 #15803d #fefce8 #1a2e05 #65a30d #166534 #a3e635".split(" "))])),rQ,$APP.Yg($APP.Ec([EQ,$APP.Gg("--x-color-surface --x-color-text-muted --x-color-success --x-color-tertiary-hover --x-color-warning --x-color-primary-active --x-color-border --x-color-surface-hover --x-color-danger --x-color-secondary-active --x-color-secondary-hover --x-color-tertiary-active --x-color-surface-active --x-color-focus-ring --x-color-primary --x-color-bg --x-color-text --x-color-secondary --x-color-primary-hover --x-color-tertiary".split(" "),
|
|
15
|
-
"#1a1f12 #86efac #4ade80 #bef264 #fbbf24 #15803d #3a4a24 #2a3318 #f87171 #4d7c0f #65a30d #a3e635 #354020 #86efac #22c55e #111408 #f0fdf4 #84cc16 #16a34a #a3e635".split(" "))]))],null),
|
|
15
|
+
"#1a1f12 #86efac #4ade80 #bef264 #fbbf24 #15803d #3a4a24 #2a3318 #f87171 #4d7c0f #65a30d #a3e635 #354020 #86efac #22c55e #111408 #f0fdf4 #84cc16 #16a34a #a3e635".split(" "))]))],null),dga=new $APP.M(null,2,[pQ,$APP.Yg($APP.Ec([xQ,yQ,zQ,DQ,AQ,BQ,CQ,$APP.Gg("--x-color-surface --x-color-text-muted --x-color-success --x-color-tertiary-hover --x-color-warning --x-color-primary-active --x-color-border --x-color-surface-hover --x-color-danger --x-color-secondary-active --x-color-secondary-hover --x-color-tertiary-active --x-color-surface-active --x-color-focus-ring --x-color-primary --x-color-bg --x-color-text --x-color-secondary --x-color-primary-hover --x-color-tertiary".split(" "),
|
|
16
16
|
"#ffffff #9a7b6b #16a34a #f97316 #ca8a04 #9a3412 #fed7aa #fff7ed #be123c #9f1239 #be123c #ea580c #ffedd5 #fb923c #ea580c #fffbf5 #431407 #e11d48 #c2410c #fb923c".split(" "))])),rQ,$APP.Yg($APP.Ec([EQ,$APP.Gg("--x-color-surface --x-color-text-muted --x-color-success --x-color-tertiary-hover --x-color-warning --x-color-primary-active --x-color-border --x-color-surface-hover --x-color-danger --x-color-secondary-active --x-color-secondary-hover --x-color-tertiary-active --x-color-surface-active --x-color-focus-ring --x-color-primary --x-color-bg --x-color-text --x-color-secondary --x-color-primary-hover --x-color-tertiary".split(" "),
|
|
17
|
-
"#1c1210 #fdba74 #4ade80 #fb923c #fbbf24 #c2410c #4a2d1f #2a1c17 #fb7185 #e11d48 #f43f5e #f97316 #3d261d #fdba74 #f97316 #140d0a #fff7ed #fb7185 #ea580c #fdba74".split(" "))]))],null),
|
|
17
|
+
"#1c1210 #fdba74 #4ade80 #fb923c #fbbf24 #c2410c #4a2d1f #2a1c17 #fb7185 #e11d48 #f43f5e #f97316 #3d261d #fdba74 #f97316 #140d0a #fff7ed #fb7185 #ea580c #fdba74".split(" "))]))],null),ega=new $APP.M(null,2,[pQ,$APP.Yg($APP.Ec([xQ,zQ,AQ,BQ,CQ,$APP.Gg("--x-shadow-lg --x-color-surface --x-font-weight-semibold --x-color-text-muted --x-color-success --x-radius-sm --x-shadow-sm --x-color-tertiary-hover --x-color-warning --x-color-primary-active --x-color-border --x-border-width --x-radius-full --x-color-surface-hover --x-color-danger --x-color-secondary-active --x-color-secondary-hover --x-radius-lg --x-color-tertiary-active --x-color-surface-active --x-color-focus-ring --x-color-primary --x-color-bg --x-color-text --x-color-secondary --x-font-family --x-radius-md --x-shadow-md --x-color-primary-hover --x-color-tertiary --x-space-md".split(" "),
|
|
18
18
|
"8px 8px 0 #000000;#ffffff;700;#555555;#00cc66;0;3px 3px 0 #000000;#333333;#ffcc00;#333333;#000000;2px;0;#f5f5f5;#ff0000;#cc0044;#e6004c;0;#1a1a1a;#eeeeee;#ff3366;#000000;#ffffff;#000000;#ff3366;'Space Grotesk',system-ui,sans-serif;0;5px 5px 0 #000000;#1a1a1a;#555555;1rem".split(";"))])),rQ,$APP.Gg("--x-shadow-lg --x-color-surface --x-color-text-muted --x-color-success --x-shadow-sm --x-color-tertiary-hover --x-color-warning --x-color-primary-active --x-color-border --x-color-surface-hover --x-color-danger --x-color-secondary-active --x-color-secondary-hover --x-color-tertiary-active --x-color-surface-active --x-color-focus-ring --x-color-primary --x-color-bg --x-color-text --x-color-secondary --x-shadow-md --x-color-primary-hover --x-color-tertiary".split(" "),
|
|
19
|
-
"8px 8px 0 #ffffff;#111111;#aaaaaa;#44ff88;3px 3px 0 #ffffff;#888888;#ffdd44;#cc0044;#ffffff;#1a1a1a;#ff4444;#cccccc;#e5e5e5;#666666;#222222;#ff3366;#ff3366;#000000;#ffffff;#ffffff;5px 5px 0 #ffffff;#e6004c;#aaaaaa".split(";"))],null),
|
|
19
|
+
"8px 8px 0 #ffffff;#111111;#aaaaaa;#44ff88;3px 3px 0 #ffffff;#888888;#ffdd44;#cc0044;#ffffff;#1a1a1a;#ff4444;#cccccc;#e5e5e5;#666666;#222222;#ff3366;#ff3366;#000000;#ffffff;#ffffff;5px 5px 0 #ffffff;#e6004c;#aaaaaa".split(";"))],null),fga=new $APP.M(null,2,[pQ,$APP.Yg($APP.Ec([xQ,yQ,zQ,AQ,BQ,CQ,$APP.Gg("--x-shadow-lg --x-color-surface --x-color-text-muted --x-color-success --x-shadow-sm --x-color-tertiary-hover --x-opacity-disabled --x-color-warning --x-color-primary-active --x-color-border --x-color-surface-hover --x-color-danger --x-color-secondary-active --x-color-secondary-hover --x-color-tertiary-active --x-color-surface-active --x-color-focus-ring --x-color-primary --x-color-bg --x-color-text --x-color-secondary --x-shadow-md --x-color-primary-hover --x-color-tertiary".split(" "),
|
|
20
20
|
"0 10px 30px rgba(139,92,246,0.15),0 4px 10px rgba(139,92,246,0.10);rgba(255,255,255,0.72);#7c7aad;#059669;0 1px 3px rgba(139,92,246,0.10);#0891b2;0.45;#d97706;#5b21b6;rgba(196,181,253,0.5);rgba(248,245,255,0.80);#e11d48;#be185d;#db2777;#0e7490;rgba(243,232,255,0.85);#a78bfa;#7c3aed;#faf5ff;#1e1b4b;#ec4899;0 4px 15px rgba(139,92,246,0.12),0 2px 4px rgba(139,92,246,0.08);#6d28d9;#06b6d4".split(";"))])),rQ,$APP.Gg("--x-shadow-lg --x-color-surface --x-color-text-muted --x-color-success --x-shadow-sm --x-color-tertiary-hover --x-color-warning --x-color-primary-active --x-color-border --x-color-surface-hover --x-color-danger --x-color-secondary-active --x-color-secondary-hover --x-color-tertiary-active --x-color-surface-active --x-color-focus-ring --x-color-primary --x-color-bg --x-color-text --x-color-secondary --x-shadow-md --x-color-primary-hover --x-color-tertiary".split(" "),
|
|
21
|
-
"0 10px 30px rgba(139,92,246,0.30),0 4px 10px rgba(139,92,246,0.18);rgba(30,20,60,0.72);#a5b4fc;#34d399;0 1px 3px rgba(139,92,246,0.20);#06b6d4;#fbbf24;#7c3aed;rgba(139,92,246,0.3);rgba(45,30,80,0.78);#fb7185;#db2777;#ec4899;#0891b2;rgba(55,35,95,0.85);#c4b5fd;#a78bfa;#0f0720;#ede9fe;#f472b6;0 4px 15px rgba(139,92,246,0.25),0 2px 4px rgba(139,92,246,0.15);#8b5cf6;#22d3ee".split(";"))],null),
|
|
21
|
+
"0 10px 30px rgba(139,92,246,0.30),0 4px 10px rgba(139,92,246,0.18);rgba(30,20,60,0.72);#a5b4fc;#34d399;0 1px 3px rgba(139,92,246,0.20);#06b6d4;#fbbf24;#7c3aed;rgba(139,92,246,0.3);rgba(45,30,80,0.78);#fb7185;#db2777;#ec4899;#0891b2;rgba(55,35,95,0.85);#c4b5fd;#a78bfa;#0f0720;#ede9fe;#f472b6;0 4px 15px rgba(139,92,246,0.25),0 2px 4px rgba(139,92,246,0.15);#8b5cf6;#22d3ee".split(";"))],null),gga=new $APP.M(null,2,[pQ,$APP.Yg($APP.Ec([yQ,zQ,AQ,BQ,CQ,$APP.Gg("--x-shadow-lg --x-color-surface --x-font-weight-semibold --x-color-text-muted --x-color-success --x-shadow-sm --x-color-tertiary-hover --x-font-size-base --x-color-warning --x-color-primary-active --x-font-size-lg --x-color-border --x-font-weight-medium --x-color-surface-hover --x-color-danger --x-font-family-mono --x-color-secondary-active --x-color-secondary-hover --x-color-tertiary-active --x-color-surface-active --x-color-focus-ring --x-font-size-sm --x-color-primary --x-color-bg --x-line-height-normal --x-color-text --x-color-secondary --x-font-family --x-font-size-xs --x-font-weight-normal --x-shadow-md --x-color-primary-hover --x-color-tertiary".split(" "),
|
|
22
22
|
"0 10px 25px rgba(0,0,0,0.10),0 4px 10px rgba(0,0,0,0.06);#fafafa;600;#71717a;#22c55e;0 1px 2px rgba(0,0,0,0.06);#52525b;1rem;#eab308;#3f3f46;1.125rem;#d4d4d8;500;#f4f4f5;#ef4444;'JetBrains Mono',ui-monospace,monospace;#24c00a;#2ee00f;#3f3f46;#e4e4e7;#39ff14;0.875rem;#18181b;#ffffff;1.4;#18181b;#39ff14;'JetBrains Mono',ui-monospace,monospace;0.75rem;400;0 4px 10px rgba(0,0,0,0.08),0 2px 4px rgba(0,0,0,0.04);#27272a;#71717a".split(";"))])),rQ,$APP.Gg("--x-shadow-lg --x-color-surface --x-color-text-muted --x-color-success --x-shadow-sm --x-color-tertiary-hover --x-color-warning --x-color-primary-active --x-color-border --x-color-surface-hover --x-color-danger --x-color-secondary-active --x-color-secondary-hover --x-color-tertiary-active --x-color-surface-active --x-color-focus-ring --x-color-primary --x-color-bg --x-color-text --x-color-secondary --x-shadow-md --x-color-primary-hover --x-color-tertiary".split(" "),
|
|
23
|
-
"0 10px 25px rgba(0,0,0,0.50),0 4px 10px rgba(0,0,0,0.35);#09090b;#71717a;#4ade80;0 1px 2px rgba(0,0,0,0.40);#71717a;#facc15;#14532d;#27272a;#18181b;#f87171;#a1a1aa;#d4d4d8;#52525b;#27272a;#39ff14;#15803d;#000000;#e4e4e7;#e4e4e7;0 4px 10px rgba(0,0,0,0.45),0 2px 4px rgba(0,0,0,0.30);#166534;#52525b".split(";"))],null),
|
|
23
|
+
"0 10px 25px rgba(0,0,0,0.50),0 4px 10px rgba(0,0,0,0.35);#09090b;#71717a;#4ade80;0 1px 2px rgba(0,0,0,0.40);#71717a;#facc15;#14532d;#27272a;#18181b;#f87171;#a1a1aa;#d4d4d8;#52525b;#27272a;#39ff14;#15803d;#000000;#e4e4e7;#e4e4e7;0 4px 10px rgba(0,0,0,0.45),0 2px 4px rgba(0,0,0,0.30);#166534;#52525b".split(";"))],null),hga=new $APP.M(null,2,[pQ,$APP.Yg($APP.Ec([xQ,yQ,zQ,DQ,AQ,BQ,CQ,$APP.Gg("--x-color-surface --x-color-text-muted --x-color-success --x-color-tertiary-hover --x-color-warning --x-color-primary-active --x-color-border --x-color-surface-hover --x-color-danger --x-color-secondary-active --x-color-secondary-hover --x-color-tertiary-active --x-color-surface-active --x-color-focus-ring --x-color-primary --x-color-bg --x-color-text --x-color-secondary --x-color-primary-hover --x-color-tertiary".split(" "),
|
|
24
24
|
"#fefdfb #8b7355 #4d7c0f #c49250 #ca8a04 #78350f #d6c4a8 #fdf8f0 #dc2626 #713f12 #854d0e #b08040 #f5ebe0 #d97706 #b45309 #fdf8f0 #3b2417 #a16207 #92400e #d6a56a".split(" "))])),rQ,$APP.Yg($APP.Ec([EQ,$APP.Gg("--x-color-surface --x-color-text-muted --x-color-success --x-color-tertiary-hover --x-color-warning --x-color-primary-active --x-color-border --x-color-surface-hover --x-color-danger --x-color-secondary-active --x-color-secondary-hover --x-color-tertiary-active --x-color-surface-active --x-color-focus-ring --x-color-primary --x-color-bg --x-color-text --x-color-secondary --x-color-primary-hover --x-color-tertiary".split(" "),
|
|
25
|
-
"#1e1c18 #9c9488 #84cc16 #8e847c #fbbf24 #8e4a38 #44403a #2a2822 #f87171 #8a7052 #a18360 #7a7068 #38352e #d4a574 #c2785a #14130f #e8e0d4 #b8976e #a8604a #7a7068".split(" "))]))],null),
|
|
25
|
+
"#1e1c18 #9c9488 #84cc16 #8e847c #fbbf24 #8e4a38 #44403a #2a2822 #f87171 #8a7052 #a18360 #7a7068 #38352e #d4a574 #c2785a #14130f #e8e0d4 #b8976e #a8604a #7a7068".split(" "))]))],null),Wfa=new $APP.M(null,8,["default",qQ,"ocean",bga,"forest",cga,"sunset",dga,"neo-brutalist",ega,"aurora",fga,"mono-ai",gga,"warm-mineral",hga],null),sQ=Object.create(null),Vfa=new $APP.ch(null,new $APP.M(null,8,["warm-mineral",null,"mono-ai",null,"ocean",null,"aurora",null,"sunset",null,"forest",null,"neo-brutalist",null,
|
|
26
26
|
"default",null],null),null);$APP.fa("baredom.exports.x_theme.registerPreset",vQ);$APP.fa("baredom.exports.x_theme.init",wQ);export const init=wQ;export const registerPreset=vQ;
|
package/dist/x-timeline-item.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
3
|
-
b){a=$APP.C(
|
|
4
|
-
$APP.
|
|
5
|
-
$APP.
|
|
2
|
+
var Lv=function(a){a=$APP.C(Kv,typeof a==="string"?a.toLowerCase():null);return $APP.n(a)?a:$APP.Np},Nv=function(a){a=$APP.C(Mv,a);return $APP.n(a)?a:"pending"},Qv=function(a){a=$APP.C(Ov,typeof a==="string"?a.toLowerCase():null);return $APP.n(a)?a:Pv},Rv=function(a){return typeof a==="string"?(a=a.trim(),$APP.I(a,"")&&$APP.I(a.toLowerCase(),"none")?a:null):null},Sv=function(a){return typeof a==="string"?(a=parseInt(a.trim(),10),typeof a==="number"&&$APP.p(isNaN(a))&&a>=0?a:null):null},Uv=function(a,
|
|
3
|
+
b){a=$APP.C(Tv,typeof a==="string"?a.toLowerCase():null);$APP.n(a)?b=a:(b=$APP.C(Tv,typeof b==="string"?b.toLowerCase():null),b=$APP.n(b)?b:$APP.iu);return b},Vv=function(a,b,c){a=Nv(a);c=c!=null?"Step "+$APP.P.i(c+1)+": ":null;return""+$APP.P.i(c)+$APP.P.i(typeof b==="string"&&$APP.I(b,"")?""+$APP.P.i(b)+" ":null)+"("+$APP.P.i(a)+")"},ew=function(a){var b=$APP.G(a),c=$APP.C(b,Wv);a=$APP.C(b,$APP.Xj);var d=$APP.C(b,$APP.Hr),e=$APP.C(b,$APP.Dj),f=$APP.C(b,Xv),h=$APP.C(b,$APP.fq),k=$APP.C(b,Yv),m=$APP.C(b,
|
|
4
|
+
$APP.Dq),r=$APP.C(b,Zv),u=$APP.C(b,$APP.zp),x=$APP.C(b,$APP.es);b=$APP.C(b,$APP.pr);var y=Lv(m),A=Rv(b),E=$APP.n($APP.n(u)?A==null:u)?$APP.bv:A!=null?$APP.ut:$APP.wj;m=function(){var H=E instanceof $APP.F?E.ea:null;switch(H){case "default":return H=$APP.C($v,y),$APP.n(H)?H:$APP.C($v,$APP.Np);case "custom":return A;case "hidden":return null;default:throw Error("No matching clause: "+$APP.P.i(H));}}();c=Sv(c);d=Uv(k,d);e=$APP.n(e)?e:"";x=$APP.n(x)?x:"";return $APP.Gg([$APP.Rp,aw,bw,Xv,Zv,$APP.Ds,$APP.Yp,
|
|
5
|
+
$APP.ls,$APP.Wj,cw,$APP.bs,$APP.Xj,dw],[Qv(h),c,m,$APP.D(f),$APP.D(r),$APP.z.j(E,$APP.ut)?A:null,x,y,e,Vv(y,e,c),E,$APP.D(a),d])},fw=function(a){a=$APP.G(a);a=$APP.C(a,$APP.Xj);return $APP.p(a)},ow=function(a){var b=$APP.l(a,"__xTimelineItemRefs");if($APP.n(b))return b;b=a.attachShadow({mode:"open"});var c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("div"),f=document.createElement("slot"),h=document.createElement("span"),k=document.createElement("div"),
|
|
6
6
|
m=document.createElement("div"),r=document.createElement("slot"),u=document.createElement("span"),x=document.createElement("div"),y=document.createElement("div"),A=document.createElement("div"),E=document.createElement("div"),H=document.createElement("slot"),O=document.createElement("div"),S=document.createElement("slot");c.textContent=":host{display:block;color-scheme:light dark;--x-timeline-item-marker-size:2rem;--x-timeline-item-marker-bg:var(--x-color-border,rgba(0,0,0,0.06));--x-timeline-item-marker-color:var(--x-color-text-muted,rgba(0,0,0,0.45));--x-timeline-item-connector-color:var(--x-color-border,rgba(0,0,0,0.12));--x-timeline-item-connector-width:2px;--x-timeline-item-gap:0.75rem;--x-timeline-item-label-width:6rem;--x-timeline-item-label-color:var(--x-color-text-muted,rgba(0,0,0,0.5));--x-timeline-item-label-font-size:var(--x-font-size-sm,0.8125rem);--x-timeline-item-title-font-size:0.9375rem;--x-timeline-item-stripe-bg:var(--x-color-surface,rgba(0,0,0,0.025));--x-timeline-item-motion:var(--x-transition-duration,150ms);--x-timeline-item-motion-ease:var(--x-transition-easing,cubic-bezier(0.2,0,0,1));--x-timeline-item-enter-duration:160ms;--x-timeline-item-disabled-opacity:0.45;}@media (prefers-color-scheme:dark){:host{--x-timeline-item-marker-bg:var(--x-color-border,rgba(255,255,255,0.10));--x-timeline-item-marker-color:var(--x-color-text-muted,rgba(255,255,255,0.55));--x-timeline-item-connector-color:var(--x-color-border,rgba(255,255,255,0.15));--x-timeline-item-label-color:var(--x-color-text-muted,rgba(255,255,255,0.5));--x-timeline-item-stripe-bg:var(--x-color-surface,rgba(255,255,255,0.03));}}:host([data-status\x3d'active']){--x-timeline-item-marker-bg:var(--x-color-primary,rgba(0,102,204,1));--x-timeline-item-marker-color:#fff;--x-timeline-item-connector-color:var(--x-color-primary,rgba(0,102,204,0.4));}:host([data-status\x3d'complete']){--x-timeline-item-marker-bg:var(--x-color-success,rgba(16,140,72,1));--x-timeline-item-marker-color:#fff;--x-timeline-item-connector-color:var(--x-color-success,rgba(16,140,72,0.5));}:host([data-status\x3d'error']){--x-timeline-item-marker-bg:var(--x-color-danger,rgba(190,20,40,1));--x-timeline-item-marker-color:#fff;--x-timeline-item-connector-color:var(--x-color-danger,rgba(190,20,40,0.4));}:host([data-status\x3d'warning']){--x-timeline-item-marker-bg:var(--x-color-warning,rgba(204,120,0,1));--x-timeline-item-marker-color:#fff;--x-timeline-item-connector-color:var(--x-color-warning,rgba(204,120,0,0.4));}@media (prefers-color-scheme:dark){:host([data-status\x3d'active']){--x-timeline-item-marker-bg:var(--x-color-primary,rgba(80,160,255,1));--x-timeline-item-connector-color:var(--x-color-primary,rgba(80,160,255,0.4));}:host([data-status\x3d'complete']){--x-timeline-item-marker-bg:var(--x-color-success,rgba(60,210,120,1));--x-timeline-item-connector-color:var(--x-color-success,rgba(60,210,120,0.5));}:host([data-status\x3d'error']){--x-timeline-item-marker-bg:var(--x-color-danger,rgba(255,90,110,1));--x-timeline-item-connector-color:var(--x-color-danger,rgba(255,90,110,0.4));}:host([data-status\x3d'warning']){--x-timeline-item-marker-bg:var(--x-color-warning,rgba(255,190,90,1));--x-timeline-item-connector-color:var(--x-color-warning,rgba(255,190,90,0.4));}}:host([data-striped]){background:var(--x-timeline-item-stripe-bg);border-radius:var(--x-radius-sm,4px);}:host([disabled]){opacity:var(--x-timeline-item-disabled-opacity);pointer-events:none;}:host(:not([disabled])){cursor:pointer;}:host(:not([disabled])):focus{outline:none;}:host(:not([disabled])):focus-visible{outline:2px solid var(--x-color-focus-ring,rgba(0,102,204,0.55));outline-offset:2px;}@media (prefers-color-scheme:dark){:host(:not([disabled])):focus-visible{outline-color:var(--x-color-focus-ring,rgba(80,160,255,0.7));}}.timeline-item{display:grid;grid-template-columns:var(--x-timeline-item-label-width) var(--x-timeline-item-marker-size) 1fr;grid-template-areas:'label track content';align-items:start;gap:0 var(--x-timeline-item-gap);}:host([data-position\x3d'end']) .timeline-item{grid-template-columns:1fr var(--x-timeline-item-marker-size) var(--x-timeline-item-label-width);grid-template-areas:'content track label';}.label-col{grid-area:label;display:flex;align-items:center;justify-content:flex-end;min-height:var(--x-timeline-item-marker-size);font-size:var(--x-timeline-item-label-font-size);color:var(--x-timeline-item-label-color);overflow:hidden;min-width:0;}:host([data-position\x3d'end']) .label-col{justify-content:flex-start;}.track-col{grid-area:track;display:flex;flex-direction:column;align-items:center;}.marker{display:inline-flex;align-items:center;justify-content:center;width:var(--x-timeline-item-marker-size);height:var(--x-timeline-item-marker-size);border-radius:999px;background:var(--x-timeline-item-marker-bg);color:var(--x-timeline-item-marker-color);font-size:0.875em;flex-shrink:0;transition:background var(--x-timeline-item-motion) var(--x-timeline-item-motion-ease),color var(--x-timeline-item-motion) var(--x-timeline-item-motion-ease);}.connector{flex:1;width:var(--x-timeline-item-connector-width);background:var(--x-timeline-item-connector-color);min-height:1rem;transition:background var(--x-timeline-item-motion) var(--x-timeline-item-motion-ease);}:host([data-connector\x3d'dashed']) .connector{background:repeating-linear-gradient(to bottom,var(--x-timeline-item-connector-color) 0,var(--x-timeline-item-connector-color) 4px,transparent 4px,transparent 8px);}:host([data-connector\x3d'none']) .connector,:host([data-last]) .connector{display:none;}.content-col{grid-area:content;display:flex;flex-direction:column;min-width:0;padding-bottom:var(--x-timeline-item-gap);}.title{font-weight:600;font-size:var(--x-timeline-item-title-font-size);line-height:1.25;min-height:var(--x-timeline-item-marker-size);display:flex;align-items:center;overflow-wrap:anywhere;min-width:0;}.title[hidden]{display:none;}.body{margin-top:0.25rem;}.actions{margin-top:0.5rem;}:host([data-entering]){animation:x-timeline-item-enter var(--x-timeline-item-enter-duration) var(--x-timeline-item-motion-ease) both;}@keyframes x-timeline-item-enter{from{opacity:0;transform:translateX(-4px);}to{opacity:1;transform:translateX(0);}}:host([data-position\x3d'end'][data-entering]){animation-name:x-timeline-item-enter-end;}@keyframes x-timeline-item-enter-end{from{opacity:0;transform:translateX(4px);}to{opacity:1;transform:translateX(0);}}@media (prefers-reduced-motion:reduce){:host([data-entering]){animation:none !important;}.marker,.connector{transition:none !important;}}";
|
|
7
7
|
$APP.T(d,"class","timeline-item");$APP.T(e,"class","label-col");$APP.T(f,"name","label");$APP.T(h,"class","label-text");f.appendChild(h);e.appendChild(f);$APP.T(k,"class","track-col");$APP.T(m,"class","marker");$APP.T(r,"name","icon");$APP.T(u,"class","default-icon");$APP.T(u,"aria-hidden","true");r.appendChild(u);m.appendChild(r);$APP.T(x,"class","connector");k.appendChild(m);k.appendChild(x);$APP.T(y,"class","content-col");$APP.T(A,"class","title");$APP.T(E,"class","body");E.appendChild(H);$APP.T(O,
|
|
8
|
-
"class","actions");$APP.T(S,"name","actions");O.appendChild(S);y.appendChild(A);y.appendChild(E);y.appendChild(O);d.appendChild(e);d.appendChild(k);d.appendChild(y);b.appendChild(c);b.appendChild(d);$APP.Q(a,"__xTimelineItemRefs",$APP.Gg([$APP.
|
|
9
|
-
|
|
10
|
-
$APP.C(d,$APP.
|
|
11
|
-
"listitem");$APP.n(h)?($APP.T(a,"aria-disabled","true"),a.tabIndex=-1):($APP.U(a,"aria-disabled"),a.tabIndex=0);k=$APP.I(m,"")?m:$APP.I(k,"")?k:null;$APP.n(k)?$APP.T(a,"aria-label",k):$APP.U(a,"aria-label");m=$APP.G(b);k=$APP.C(m,
|
|
12
|
-
null;return a},
|
|
13
|
-
$APP.gm(b))},
|
|
14
|
-
$APP.l(b,"click");b=$APP.l(b,"keydown");$APP.n(c)&&a.removeEventListener("click",c);$APP.n(b)&&a.removeEventListener("keydown",b)}$APP.Q(a,"__xTimelineItemHandlers",null)},
|
|
15
|
-
return $APP.n(b)?b:""},set:function(b){return $APP.n($APP.n(b)?$APP.I(b,""):b)?$APP.T(this,"title",""+$APP.P.i(b)):$APP.U(this,"title")},enumerable:!0,configurable:!0});$APP.pj(a,"status","status","pending");$APP.qj(a,"icon","icon");$APP.pj(a,"connector","connector","solid");$APP.pj(a,"position","position","start");return $APP.mj(a,"disabled","disabled")},
|
|
16
|
-
"__xTimelineItemModel");b=$APP.n(b)?b:
|
|
17
|
-
b],null);return $APP.lj("x-timeline-item-disconnected",$APP.gm(a))},
|
|
18
|
-
"actions-slot",1424248629),
|
|
19
|
-
"marker-aria","marker-aria",-353426855),
|
|
20
|
-
$APP.je(["x-timeline-item-connected",new $APP.M(null,2,[$APP.V,new $APP.M(null,4,[$APP.
|
|
21
|
-
var
|
|
8
|
+
"class","actions");$APP.T(S,"name","actions");O.appendChild(S);y.appendChild(A);y.appendChild(E);y.appendChild(O);d.appendChild(e);d.appendChild(k);d.appendChild(y);b.appendChild(c);b.appendChild(d);$APP.Q(a,"__xTimelineItemRefs",$APP.Gg([$APP.Rp,gw,$APP.Fs,$APP.Wu,hw,iw,$APP.Du,jw,$APP.Fk,kw,$APP.Is,lw,mw,nw,$APP.ir,$APP.cn],[x,h,m,u,e,k,E,H,b,S,A,y,d,O,r,f]));return $APP.l(a,"__xTimelineItemRefs")},pw=function(a){return ew($APP.Gg([$APP.Hr,$APP.Dj,Xv,$APP.fq,Yv,$APP.Dq,Zv,$APP.zp,$APP.es,$APP.pr,
|
|
9
|
+
Wv,$APP.Xj],[a.getAttribute("position"),a.getAttribute("label"),a.hasAttribute("data-striped"),a.getAttribute("connector"),$APP.l(a,"__xTimelineItemParentPos"),a.getAttribute("status"),a.hasAttribute("data-last"),a.hasAttribute("icon"),a.getAttribute("title"),a.getAttribute("icon"),a.getAttribute("data-index"),a.hasAttribute("disabled")]))},qw=function(a){var b=pw(a);if($APP.I($APP.l(a,"__xTimelineItemModel"),b)){var c=ow(a),d=$APP.G(c);c=$APP.C(d,gw);var e=$APP.C(d,$APP.Fs),f=$APP.C(d,$APP.Is);d=
|
|
10
|
+
$APP.C(d,$APP.Wu);var h=$APP.G(b),k=$APP.C(h,$APP.ls),m=$APP.C(h,dw);h=$APP.C(h,$APP.Rp);$APP.T(a,"data-status",Nv(k));$APP.Q(a,"__xTimelineItemSelfPos",!0);$APP.T(a,"data-position",$APP.kh(m));$APP.Q(a,"__xTimelineItemSelfPos",null);switch(h instanceof $APP.F?h.ea:null){case "dashed":$APP.T(a,"data-connector","dashed");break;case "none":$APP.T(a,"data-connector","none");break;default:$APP.U(a,"data-connector")}h=$APP.G(b);k=$APP.C(h,$APP.Wj);m=$APP.C(h,$APP.Yp);h=$APP.C(h,$APP.Xj);$APP.T(a,"role",
|
|
11
|
+
"listitem");$APP.n(h)?($APP.T(a,"aria-disabled","true"),a.tabIndex=-1):($APP.U(a,"aria-disabled"),a.tabIndex=0);k=$APP.I(m,"")?m:$APP.I(k,"")?k:null;$APP.n(k)?$APP.T(a,"aria-label",k):$APP.U(a,"aria-label");m=$APP.G(b);k=$APP.C(m,bw);m=$APP.C(m,cw);$APP.T(e,"aria-label",m);d.textContent=k!=null?k:"";d=$APP.G(b);e=$APP.C(d,$APP.Wj);d=$APP.C(d,$APP.Yp);c.textContent=e;$APP.I(d,"")?($APP.U(f,"hidden"),f.textContent=d):($APP.T(f,"hidden",""),f.textContent="");a=$APP.Q(a,"__xTimelineItemModel",b)}else a=
|
|
12
|
+
null;return a},rw=function(a){$APP.n($APP.l(a,"__xTimelineItemEntered"))||($APP.Q(a,"__xTimelineItemEntered",!0),$APP.T(a,"data-entering",""),a.addEventListener("animationend",function d(c){return $APP.z.j(c.target,a)?(a.removeEventListener("animationend",d),$APP.U(a,"data-entering")):null}))},sw=function(a){var b=$APP.l(a,"__xTimelineItemModel");b=$APP.n(b)?b:pw(a);var c=$APP.G(b);b=$APP.C(c,$APP.ls);c=$APP.C(c,$APP.Wj);b=new $APP.M(null,2,[$APP.ls,Nv(b),$APP.Wj,c],null);return $APP.jj(a,"x-timeline-item-click",
|
|
13
|
+
$APP.gm(b))},tw=function(a){function b(d){a:{var e=d.key;if($APP.z.j(e,"Enter")||$APP.z.j(e," "))if(e=$APP.l(a,"__xTimelineItemModel"),e=$APP.n(e)?e:pw(a),fw(e)){d.preventDefault();d=sw(a);break a}d=null}return d}function c(){var d=$APP.l(a,"__xTimelineItemModel");d=$APP.n(d)?d:pw(a);return fw(d)?sw(a):null}a.addEventListener("click",c);a.addEventListener("keydown",b);$APP.Q(a,"__xTimelineItemHandlers",{click:c,keydown:b})},uw=function(a){var b=$APP.l(a,"__xTimelineItemHandlers");if($APP.n(b)){var c=
|
|
14
|
+
$APP.l(b,"click");b=$APP.l(b,"keydown");$APP.n(c)&&a.removeEventListener("click",c);$APP.n(b)&&a.removeEventListener("keydown",b)}$APP.Q(a,"__xTimelineItemHandlers",null)},vw=function(a){Object.defineProperty(a,"label",{get:function(){var b=this.getAttribute("label");return $APP.n(b)?b:""},set:function(b){return $APP.n($APP.n(b)?$APP.I(b,""):b)?$APP.T(this,"label",""+$APP.P.i(b)):$APP.U(this,"label")},enumerable:!0,configurable:!0});Object.defineProperty(a,"title",{get:function(){var b=this.getAttribute("title");
|
|
15
|
+
return $APP.n(b)?b:""},set:function(b){return $APP.n($APP.n(b)?$APP.I(b,""):b)?$APP.T(this,"title",""+$APP.P.i(b)):$APP.U(this,"title")},enumerable:!0,configurable:!0});$APP.pj(a,"status","status","pending");$APP.qj(a,"icon","icon");$APP.pj(a,"connector","connector","solid");$APP.pj(a,"position","position","start");return $APP.mj(a,"disabled","disabled")},ww=function(a){ow(a);uw(a);tw(a);var b=a.getAttribute("data-position");$APP.n(b)&&$APP.Q(a,"__xTimelineItemParentPos",b);qw(a);rw(a);b=$APP.l(a,
|
|
16
|
+
"__xTimelineItemModel");b=$APP.n(b)?b:pw(a);var c=$APP.G(b);b=$APP.C(c,$APP.ls);var d=$APP.C(c,$APP.Wj),e=$APP.C(c,dw);c=$APP.C(c,$APP.Xj);b=new $APP.M(null,4,[$APP.ls,Nv(b),$APP.Wj,d,$APP.cv,$APP.kh(e),$APP.zm,$APP.D(c)],null);return $APP.hj(a,"x-timeline-item-connected",$APP.gm(b))},xw=function(a){var b=$APP.l(a,"__xTimelineItemModel");b=$APP.n(b)?b:pw(a);uw(a);$APP.Q(a,"__xTimelineItemEntered",null);b=$APP.G(b);a=$APP.C(b,$APP.ls);b=$APP.C(b,$APP.Wj);a=new $APP.M(null,2,[$APP.ls,Nv(a),$APP.Wj,
|
|
17
|
+
b],null);return $APP.lj("x-timeline-item-disconnected",$APP.gm(a))},yw=function(a,b,c,d){if($APP.I(c,d)){c=$APP.z.j(b,"data-position");if($APP.n(c?$APP.l(a,"__xTimelineItemSelfPos"):c))return null;$APP.z.j(b,"data-position")&&$APP.Q(a,"__xTimelineItemParentPos",d);return qw(a)}return null},Aw=function(){return $APP.zi("x-timeline-item",new $APP.M(null,5,[$APP.ji,zw,$APP.hi,ww,$APP.ei,xw,$APP.di,yw,$APP.ii,vw],null))},iw=new $APP.F(null,"track-col","track-col",629248272),kw=new $APP.F(null,"actions-slot",
|
|
18
|
+
"actions-slot",1424248629),dw=new $APP.F(null,"effective-position","effective-position",840072317),hw=new $APP.F(null,"label-col","label-col",1883390160),gw=new $APP.F(null,"label-text","label-text",-1566972381),Xv=new $APP.F(null,"data-striped?","data-striped?",906911587),nw=new $APP.F(null,"actions-el","actions-el",1486248509),lw=new $APP.F(null,"content-col","content-col",767367449),Bw=new $APP.F(null,"dashed","dashed",-1449249319),mw=new $APP.F(null,"item-div","item-div",1630512700),cw=new $APP.F(null,
|
|
19
|
+
"marker-aria","marker-aria",-353426855),bw=new $APP.F(null,"marker-icon","marker-icon",424963779),Pv=new $APP.F(null,"solid","solid",-2023773691),jw=new $APP.F(null,"default-slot","default-slot",-1145647151),Zv=new $APP.F(null,"data-last?","data-last?",-1110326839),Yv=new $APP.F(null,"data-position-raw","data-position-raw",256144356),Wv=new $APP.F(null,"data-index-raw","data-index-raw",491574874),aw=new $APP.F(null,"data-index","data-index",1161508385),Cw=new $APP.F(null,"none","none",1333468478);var zw="label title status icon connector position disabled data-last data-index data-position data-striped".split(" ");
|
|
20
|
+
$APP.je(["x-timeline-item-connected",new $APP.M(null,2,[$APP.V,new $APP.M(null,4,[$APP.ls,$APP.X,$APP.Wj,$APP.X,$APP.cv,$APP.X,$APP.zm,$APP.vj],null),$APP.gu,!1],null),"x-timeline-item-disconnected",new $APP.M(null,2,[$APP.V,new $APP.M(null,2,[$APP.ls,$APP.X,$APP.Wj,$APP.X],null),$APP.gu,!1],null),"x-timeline-item-click",new $APP.M(null,2,[$APP.V,new $APP.M(null,2,[$APP.ls,$APP.X,$APP.Wj,$APP.X],null),$APP.gu,!0],null)]);
|
|
21
|
+
var Kv=new $APP.M(null,5,["pending",$APP.Np,"active",$APP.vr,"complete",$APP.Ju,"error",$APP.gq,"warning",$APP.du],null),Mv=new $APP.M(null,5,[$APP.Np,"pending",$APP.vr,"active",$APP.Ju,"complete",$APP.gq,"error",$APP.du,"warning"],null),$v=new $APP.M(null,5,[$APP.Np,"○",$APP.vr,"●",$APP.Ju,"✓",$APP.gq,"✕",$APP.du,"!"],null),Ov=new $APP.M(null,3,["solid",Pv,"dashed",Bw,"none",Cw],null),Tv=new $APP.M(null,2,["start",$APP.iu,"end",$APP.tq],null);$APP.fa("baredom.exports.x_timeline_item.init",Aw);export const init=Aw;
|
package/dist/x-timeline.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var n4=function(a){a=typeof a==="string"?a.trim().toLowerCase():null;return $APP.ed(
|
|
3
|
-
$APP.T(d,"part","label");$APP.T(d,"hidden","");b.appendChild(c);b.appendChild(d);b.appendChild(e);$APP.Q(a,"__xTimelineRefs",new $APP.M(null,3,[$APP.Fk,b,o4,d,$APP.
|
|
4
|
-
$APP.D(b)],null)},r4=function(a){var b=q4(a);if($APP.I($APP.l(a,"__xTimelineModel"),b)){b=$APP.G(b);var c=$APP.C(b,$APP.Wj),d=p4(a);d=$APP.G(d);d=$APP.C(d,o4);$APP.T(a,"role","list");$APP.I(c,"")?$APP.T(a,"aria-label",c):$APP.U(a,"aria-label");$APP.I(c,"")?(d.textContent=c,$APP.U(d,"hidden")):(d.textContent="",$APP.T(d,"hidden",""));$APP.Q(a,"__xTimelineModel",b)}},s4=function(a){var b=$APP.l(a,"__xTimelineModel");b=$APP.n(b)?b:q4(a);var c=$APP.G(b);b=$APP.C(c,$APP.
|
|
5
|
-
for(var d=a.length,e=0;;)if(e<d){var f=a[e],h=$APP.z.j(e,d-1);$APP.T(f,"data-index",""+$APP.P.i(e));h?$APP.T(f,"data-last",""):$APP.U(f,"data-last");$APP.T(f,"data-position",
|
|
6
|
-
$APP.l(e,"status");e=$APP.l(e,"label");return $APP.hj(a,"x-timeline-select",$APP.gm(new $APP.M(null,3,[$APP.
|
|
7
|
-
if($APP.n(b)){var c=$APP.l(b,"item-connected"),d=$APP.l(b,"item-click");b=$APP.l(b,"item-disconnected-doc");$APP.n(c)&&a.removeEventListener("x-timeline-item-connected",c);$APP.n(d)&&a.removeEventListener("x-timeline-item-click",d);$APP.n(b)&&document.removeEventListener("x-timeline-item-disconnected",b)}return $APP.Q(a,"__xTimelineHandlers",null)},
|
|
8
|
-
$APP.I(b,""):b)?$APP.T(this,"label",""+$APP.P.i(b)):$APP.U(this,"label")},enumerable:!0,configurable:!0});Object.defineProperty(a,"position",{get:function(){return n4(this.getAttribute("position"))},set:function(b){return $APP.n(b)?$APP.T(this,"position",""+$APP.P.i(b)):$APP.U(this,"position")},enumerable:!0,configurable:!0});return $APP.mj(a,"striped","striped")},
|
|
9
|
-
null},u4=function(){return $APP.zi("x-timeline",new $APP.M(null,5,[$APP.ji,
|
|
2
|
+
var n4=function(a){a=typeof a==="string"?a.trim().toLowerCase():null;return $APP.ed(ora,a)?a:"start"},pra=function(a,b){switch(a){case "start":return"start";case "end":return"end";case "alternating":return $APP.ud(b,2)===0?"start":"end";default:return"start"}},p4=function(a){var b=$APP.l(a,"__xTimelineRefs");if($APP.n(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:flex;flex-direction:column;color-scheme:light dark;--x-timeline-gap:0;--x-timeline-label-color:var(--x-color-text,inherit);--x-timeline-label-font-size:var(--x-font-size-sm,0.875rem);--x-timeline-label-font-weight:600;--x-timeline-label-padding:0 0 0.5rem;}slot{display:contents;}[part\x3dlabel]{color:var(--x-timeline-label-color);font-size:var(--x-timeline-label-font-size);font-weight:var(--x-timeline-label-font-weight);padding:var(--x-timeline-label-padding);box-sizing:border-box;}[part\x3dlabel][hidden]{display:none !important;}";
|
|
3
|
+
$APP.T(d,"part","label");$APP.T(d,"hidden","");b.appendChild(c);b.appendChild(d);b.appendChild(e);$APP.Q(a,"__xTimelineRefs",new $APP.M(null,3,[$APP.Fk,b,o4,d,$APP.wt,e],null));return $APP.l(a,"__xTimelineRefs")},q4=function(a){a=new $APP.M(null,3,[$APP.Dj,a.getAttribute("label"),$APP.Hr,a.getAttribute("position"),$APP.Ss,a.hasAttribute("striped")],null);var b=$APP.G(a);a=$APP.C(b,$APP.Dj);var c=$APP.C(b,$APP.Hr);b=$APP.C(b,$APP.Ss);return new $APP.M(null,3,[$APP.Wj,$APP.n(a)?a:"",$APP.cv,n4(c),$APP.Ss,
|
|
4
|
+
$APP.D(b)],null)},r4=function(a){var b=q4(a);if($APP.I($APP.l(a,"__xTimelineModel"),b)){b=$APP.G(b);var c=$APP.C(b,$APP.Wj),d=p4(a);d=$APP.G(d);d=$APP.C(d,o4);$APP.T(a,"role","list");$APP.I(c,"")?$APP.T(a,"aria-label",c):$APP.U(a,"aria-label");$APP.I(c,"")?(d.textContent=c,$APP.U(d,"hidden")):(d.textContent="",$APP.T(d,"hidden",""));$APP.Q(a,"__xTimelineModel",b)}},s4=function(a){var b=$APP.l(a,"__xTimelineModel");b=$APP.n(b)?b:q4(a);var c=$APP.G(b);b=$APP.C(c,$APP.cv);c=$APP.C(c,$APP.Ss);a=a.querySelectorAll("x-timeline-item");
|
|
5
|
+
for(var d=a.length,e=0;;)if(e<d){var f=a[e],h=$APP.z.j(e,d-1);$APP.T(f,"data-index",""+$APP.P.i(e));h?$APP.T(f,"data-last",""):$APP.U(f,"data-last");$APP.T(f,"data-position",pra(b,e));$APP.n(c)?$APP.T(f,"data-striped",""):$APP.U(f,"data-striped");e+=1}else return null},qra=function(a){function b(){return $APP.n(a.isConnected)?s4(a):null}function c(e){e.stopPropagation();var f=e.target.getAttribute("data-index");e=e.detail;typeof f==="string"?(f=parseInt(f,10),f=$APP.n(isNaN(f))?null:f):f=null;var h=
|
|
6
|
+
$APP.l(e,"status");e=$APP.l(e,"label");return $APP.hj(a,"x-timeline-select",$APP.gm(new $APP.M(null,3,[$APP.Jp,$APP.n(f)?f:0,$APP.ls,$APP.n(h)?h:"",$APP.Wj,$APP.n(e)?e:""],null)))}function d(){return s4(a)}a.addEventListener("x-timeline-item-connected",d);a.addEventListener("x-timeline-item-click",c);document.addEventListener("x-timeline-item-disconnected",b);$APP.Q(a,"__xTimelineHandlers",{"item-connected":d,"item-click":c,"item-disconnected-doc":b})},t4=function(a){var b=$APP.l(a,"__xTimelineHandlers");
|
|
7
|
+
if($APP.n(b)){var c=$APP.l(b,"item-connected"),d=$APP.l(b,"item-click");b=$APP.l(b,"item-disconnected-doc");$APP.n(c)&&a.removeEventListener("x-timeline-item-connected",c);$APP.n(d)&&a.removeEventListener("x-timeline-item-click",d);$APP.n(b)&&document.removeEventListener("x-timeline-item-disconnected",b)}return $APP.Q(a,"__xTimelineHandlers",null)},rra=function(a){Object.defineProperty(a,"label",{get:function(){var b=this.getAttribute("label");return $APP.n(b)?b:""},set:function(b){return $APP.n($APP.n(b)?
|
|
8
|
+
$APP.I(b,""):b)?$APP.T(this,"label",""+$APP.P.i(b)):$APP.U(this,"label")},enumerable:!0,configurable:!0});Object.defineProperty(a,"position",{get:function(){return n4(this.getAttribute("position"))},set:function(b){return $APP.n(b)?$APP.T(this,"position",""+$APP.P.i(b)):$APP.U(this,"position")},enumerable:!0,configurable:!0});return $APP.mj(a,"striped","striped")},sra=function(a){p4(a);r4(a);t4(a);qra(a);return s4(a)},tra=function(a){return t4(a)},ura=function(a,b,c,d){return $APP.I(c,d)?(r4(a),s4(a)):
|
|
9
|
+
null},u4=function(){return $APP.zi("x-timeline",new $APP.M(null,5,[$APP.ji,vra,$APP.hi,sra,$APP.ei,tra,$APP.di,ura,$APP.ii,rra],null))},o4=new $APP.F(null,"label-div","label-div",1505730697);var vra=["label","position","striped"];$APP.je(["x-timeline-select",new $APP.M(null,2,[$APP.V,new $APP.M(null,3,[$APP.Jp,$APP.Y,$APP.ls,$APP.X,$APP.Wj,$APP.X],null),$APP.gu,!1],null)]);var ora=new $APP.ch(null,new $APP.M(null,3,["start",null,"end",null,"alternating",null],null),null);$APP.fa("baredom.exports.x_timeline.init",u4);export const init=u4;
|
package/dist/x-toast.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
3
|
-
$APP.G(a),c=$APP.C(b,$APP.
|
|
4
|
-
typeof d==="string"?d.trim():null;return $APP.n(r)?r:""}()])},
|
|
2
|
+
var eA=function(a){a=$APP.C(dA,typeof a==="string"?a.toLowerCase():null);return $APP.n(a)?a:$APP.it},gA=function(a){a=$APP.C(fA,a);return $APP.n(a)?a:"info"},hA=function(a){return a==null?!1:$APP.I((""+$APP.P.i(a)).trim().toLowerCase(),"false")},iA=function(a){return typeof a==="string"?(a=parseInt(a.trim(),10),typeof a==="number"&&$APP.p(isNaN(a))&&a>0?a:null):null},jA=function(a){return typeof a==="string"?(a=a.trim(),$APP.I(a,"")&&$APP.I(a.toLowerCase(),"none")?a:null):null},mA=function(a){var b=
|
|
3
|
+
$APP.G(a),c=$APP.C(b,$APP.ps),d=$APP.C(b,$APP.st);a=$APP.C(b,$APP.fr);var e=$APP.C(b,$APP.Ej),f=$APP.C(b,$APP.Xp),h=$APP.C(b,$APP.zp),k=$APP.C(b,kA),m=$APP.C(b,$APP.$p);b=$APP.C(b,$APP.pr);m=eA(m);b=jA(b);h=$APP.n($APP.n(h)?b==null:h)?$APP.bv:b!=null?$APP.ut:$APP.wj;return $APP.Gg([lA,$APP.wq,$APP.N,$APP.Ds,$APP.bs,$APP.Xj,$APP.su,$APP.ps,$APP.st],[hA(k),$APP.Ki(a),m,$APP.z.j(h,$APP.ut)?b:null,h,$APP.D(e),iA(f),function(){var r=typeof c==="string"?c.trim():null;return $APP.n(r)?r:""}(),function(){var r=
|
|
4
|
+
typeof d==="string"?d.trim():null;return $APP.n(r)?r:""}()])},nA=function(a){var b=$APP.G(a);a=$APP.C(b,$APP.wq);b=$APP.C(b,$APP.Xj);return $APP.n(a)?$APP.p(b):a},oA=function(a,b){var c=$APP.G(a);a=$APP.C(c,$APP.N);var d=$APP.C(c,$APP.st);c=$APP.C(c,$APP.ps);return new $APP.M(null,4,[$APP.N,gA(a),$APP.xq,b,$APP.st,d,$APP.ps,c],null)},pA=function(a){var b=$APP.G(a);a=$APP.C(b,lA);b=$APP.C(b,$APP.su);return $APP.D($APP.n(a)?b!=null&&b>0:a)},uA=function(a){var b=$APP.l(a,"__xToastRefs");if($APP.n(b))return b;
|
|
5
5
|
b=a.attachShadow({mode:"open"});var c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("div"),f=document.createElement("span"),h=document.createElement("slot"),k=document.createElement("span"),m=document.createElement("div"),r=document.createElement("span"),u=document.createElement("span"),x=document.createElement("button"),y=document.createElement("span"),A=document.createElement("div"),E=document.createElement("div");c.textContent=":host{display:block;color-scheme:light dark;--x-toast-radius:var(--x-radius-lg,12px);--x-toast-padding-y:14px;--x-toast-padding-x:16px;--x-toast-gap:12px;--x-toast-font-size:var(--x-font-size-sm,0.875rem);--x-toast-heading-font-size:0.9375rem;--x-toast-heading-weight:600;--x-toast-min-width:min(280px,calc(100vw - 2rem));--x-toast-max-width:min(480px,calc(100vw - 2rem));--x-toast-border-width:1px;--x-toast-shadow:var(--x-shadow-md,0 4px 16px rgba(0,0,0,0.12),0 1px 4px rgba(0,0,0,0.08));--x-toast-motion-fast:var(--x-transition-duration,120ms);--x-toast-motion-ease:var(--x-transition-easing,cubic-bezier(0.2,0,0,1));--x-toast-enter-duration:200ms;--x-toast-exit-duration:180ms;--x-toast-press-scale:0.97;--x-toast-disabled-opacity:0.55;--x-toast-focus-ring:var(--x-color-focus-ring,rgba(0,0,0,0.6));--x-toast-dismiss-color:var(--x-color-text-muted,rgba(0,0,0,0.50));--x-toast-dismiss-hover-bg:var(--x-color-surface-hover,rgba(0,0,0,0.06));--x-toast-progress-height:3px;--x-toast-progress-bg:var(--x-color-border,rgba(0,0,0,0.08));--x-toast-info-bg:var(--x-color-bg,#ffffff);--x-toast-info-border:rgba(0,102,204,0.30);--x-toast-info-color:rgba(15,23,42,0.92);--x-toast-info-icon-color:rgba(0,102,204,0.85);--x-toast-info-progress-fill:rgba(0,102,204,0.70);--x-toast-success-bg:var(--x-color-bg,#ffffff);--x-toast-success-border:rgba(16,140,72,0.30);--x-toast-success-color:rgba(15,23,42,0.92);--x-toast-success-icon-color:rgba(16,140,72,0.85);--x-toast-success-progress-fill:rgba(16,140,72,0.70);--x-toast-warning-bg:var(--x-color-bg,#ffffff);--x-toast-warning-border:rgba(204,120,0,0.40);--x-toast-warning-color:rgba(15,23,42,0.92);--x-toast-warning-icon-color:rgba(180,100,0,0.85);--x-toast-warning-progress-fill:rgba(204,120,0,0.70);--x-toast-error-bg:var(--x-color-bg,#ffffff);--x-toast-error-border:rgba(190,20,40,0.40);--x-toast-error-color:rgba(15,23,42,0.92);--x-toast-error-icon-color:rgba(190,20,40,0.85);--x-toast-error-progress-fill:rgba(190,20,40,0.70);--x-toast-bg:transparent;--x-toast-border-color:transparent;--x-toast-color:inherit;--x-toast-icon-color:inherit;--x-toast-progress-fill:currentColor;}@media (prefers-color-scheme:dark){:host{--x-toast-shadow:var(--x-shadow-md,0 4px 20px rgba(0,0,0,0.40),0 1px 6px rgba(0,0,0,0.30));--x-toast-focus-ring:var(--x-color-focus-ring,rgba(255,255,255,0.75));--x-toast-dismiss-color:var(--x-color-text-muted,rgba(255,255,255,0.65));--x-toast-dismiss-hover-bg:var(--x-color-surface-hover,rgba(255,255,255,0.12));--x-toast-progress-bg:var(--x-color-border,rgba(255,255,255,0.10));--x-toast-info-bg:var(--x-color-bg,#1e293b);--x-toast-info-border:rgba(80,160,255,0.35);--x-toast-info-color:rgba(248,250,252,0.92);--x-toast-info-icon-color:rgba(96,165,250,0.90);--x-toast-info-progress-fill:rgba(96,165,250,0.75);--x-toast-success-bg:var(--x-color-bg,#1e293b);--x-toast-success-border:rgba(60,210,120,0.35);--x-toast-success-color:rgba(248,250,252,0.92);--x-toast-success-icon-color:rgba(52,211,153,0.90);--x-toast-success-progress-fill:rgba(52,211,153,0.75);--x-toast-warning-bg:var(--x-color-bg,#1e293b);--x-toast-warning-border:rgba(255,190,90,0.40);--x-toast-warning-color:rgba(248,250,252,0.92);--x-toast-warning-icon-color:rgba(251,191,36,0.90);--x-toast-warning-progress-fill:rgba(251,191,36,0.75);--x-toast-error-bg:var(--x-color-bg,#1e293b);--x-toast-error-border:rgba(255,90,110,0.40);--x-toast-error-color:rgba(248,250,252,0.92);--x-toast-error-icon-color:rgba(248,113,113,0.90);--x-toast-error-progress-fill:rgba(248,113,113,0.75);}}:host([data-type\x3d'info']){--x-toast-bg:var(--x-toast-info-bg);--x-toast-border-color:var(--x-toast-info-border);--x-toast-color:var(--x-toast-info-color);--x-toast-icon-color:var(--x-toast-info-icon-color);--x-toast-progress-fill:var(--x-toast-info-progress-fill);}:host([data-type\x3d'success']){--x-toast-bg:var(--x-toast-success-bg);--x-toast-border-color:var(--x-toast-success-border);--x-toast-color:var(--x-toast-success-color);--x-toast-icon-color:var(--x-toast-success-icon-color);--x-toast-progress-fill:var(--x-toast-success-progress-fill);}:host([data-type\x3d'warning']){--x-toast-bg:var(--x-toast-warning-bg);--x-toast-border-color:var(--x-toast-warning-border);--x-toast-color:var(--x-toast-warning-color);--x-toast-icon-color:var(--x-toast-warning-icon-color);--x-toast-progress-fill:var(--x-toast-warning-progress-fill);}:host([data-type\x3d'error']){--x-toast-bg:var(--x-toast-error-bg);--x-toast-border-color:var(--x-toast-error-border);--x-toast-color:var(--x-toast-error-color);--x-toast-icon-color:var(--x-toast-error-icon-color);--x-toast-progress-fill:var(--x-toast-error-progress-fill);}[part\x3dcontainer]{display:flex;flex-direction:column;background:var(--x-toast-bg);border:var(--x-toast-border-width) solid var(--x-toast-border-color);border-radius:var(--x-toast-radius);box-shadow:var(--x-toast-shadow);color:var(--x-toast-color);min-width:var(--x-toast-min-width);max-width:var(--x-toast-max-width);overflow:hidden;transition:background var(--x-toast-motion-fast) var(--x-toast-motion-ease),border-color var(--x-toast-motion-fast) var(--x-toast-motion-ease),opacity var(--x-toast-motion-fast) var(--x-toast-motion-ease),transform var(--x-toast-motion-fast) var(--x-toast-motion-ease);}[part\x3dinner]{display:flex;align-items:flex-start;gap:var(--x-toast-gap);padding:var(--x-toast-padding-y) var(--x-toast-padding-x);}[part\x3dicon]{flex:0 0 auto;color:var(--x-toast-icon-color);line-height:1;margin-top:0.15em;}slot[name\x3dicon]::slotted(*){display:block;}[part\x3dbody]{flex:1 1 auto;display:flex;flex-direction:column;gap:3px;min-width:0;}[part\x3dheading]{font-size:var(--x-toast-heading-font-size);font-weight:var(--x-toast-heading-weight);line-height:1.2;overflow-wrap:anywhere;}[part\x3dmessage]{font-size:var(--x-toast-font-size);line-height:1.35;overflow-wrap:anywhere;opacity:0.82;}[part\x3ddismiss]{flex:0 0 auto;appearance:none;border:0;background:transparent;color:var(--x-toast-dismiss-color);width:1.5em;height:1.5em;padding:0;margin:0;border-radius:999px;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;transition:background var(--x-toast-motion-fast) var(--x-toast-motion-ease),transform var(--x-toast-motion-fast) var(--x-toast-motion-ease);}:host(:not([disabled])) [part\x3ddismiss]:hover{background:var(--x-toast-dismiss-hover-bg);}:host(:not([disabled])) [part\x3ddismiss]:active{transform:scale(var(--x-toast-press-scale));}[part\x3ddismiss]:focus{outline:none;}:host(:not([disabled])) [part\x3ddismiss]:focus-visible{outline:2px solid var(--x-toast-focus-ring);outline-offset:2px;}:host([disabled]){opacity:var(--x-toast-disabled-opacity);}:host([disabled]) [part\x3ddismiss]{cursor:default;pointer-events:none;}[part\x3dprogress]{height:var(--x-toast-progress-height);background:var(--x-toast-progress-bg);overflow:hidden;display:none;}[part\x3dprogress-bar]{height:100%;width:100%;background:var(--x-toast-progress-fill);animation:x-toast-progress var(--x-toast-timeout,0ms) linear forwards;animation-play-state:paused;}:host([data-progress-active]) [part\x3dprogress-bar]{animation-play-state:running;}@keyframes x-toast-progress{from{width:100%;}to{width:0%;}}:host([data-entering]) [part\x3dcontainer]{animation:x-toast-enter var(--x-toast-enter-duration) var(--x-toast-motion-ease) both;}@keyframes x-toast-enter{from{opacity:0;transform:translateY(-8px);}to{opacity:1;transform:translateY(0);}}:host([data-exiting]) [part\x3dcontainer]{animation:x-toast-exit var(--x-toast-exit-duration) var(--x-toast-motion-ease) forwards;}@keyframes x-toast-exit{from{opacity:1;transform:translateY(0);}to{opacity:0;transform:translateY(-8px);}}@media (prefers-reduced-motion:reduce){[part\x3dcontainer],[part\x3ddismiss]{transition:none !important;}:host([data-entering]) [part\x3dcontainer],:host([data-exiting]) [part\x3dcontainer]{animation:none !important;}:host([data-progress-active]) [part\x3dprogress-bar]{animation:none !important;}}";
|
|
6
6
|
$APP.T(d,"part","container");$APP.T(e,"part","inner");$APP.T(f,"part","icon");$APP.T(f,"aria-hidden","true");$APP.T(h,"name","icon");$APP.T(k,"part","default-icon");h.appendChild(k);f.appendChild(h);$APP.T(m,"part","body");$APP.T(r,"part","heading");$APP.T(u,"part","message");m.appendChild(r);m.appendChild(u);$APP.T(x,"part","dismiss");$APP.T(x,"type","button");$APP.T(x,"aria-label","Dismiss toast");$APP.T(y,"aria-hidden","true");y.textContent="×";x.appendChild(y);e.appendChild(f);e.appendChild(m);
|
|
7
|
-
e.appendChild(x);$APP.T(A,"part","progress");$APP.T(E,"part","progress-bar");A.appendChild(E);d.appendChild(e);d.appendChild(A);b.appendChild(c);b.appendChild(d);$APP.Q(a,"__xToastRefs",$APP.Gg([
|
|
8
|
-
a.hasAttribute("icon"),a.getAttribute("show-progress"),a.getAttribute("icon"),a.getAttribute("type"),a.getAttribute("message"),a.getAttribute("heading")]))},
|
|
9
|
-
O=$APP.C(r,$APP.
|
|
10
|
-
$APP.n(c)?(y.textContent="",r.style.display="none"):(y.textContent=d,r.style.display="inline");$APP.n(f)?(E.disabled=$APP.D(h),E.style.display="inline-flex"):(E.disabled=!0,E.style.display="none");y=
|
|
11
|
-
"aria-keyshortcuts");$APP.Q(a,"__xToastModel",b)}},
|
|
12
|
-
$APP.l(a,"__xToastTimeout");$APP.n(b)&&(clearTimeout(b),$APP.Q(a,"__xToastTimeout",null))},
|
|
13
|
-
function(){var d=$APP.l(a,"__xToastModel");return $APP.n(d)?d:
|
|
14
|
-
|
|
15
|
-
d);return $APP.Q(a,"__xToastExitTimer",setTimeout(function(){var f=a.isConnected;return $APP.n($APP.n(f)?$APP.l(a,"__xToastExiting"):f)?(b.removeEventListener("animationend",d),$APP.Q(a,"__xToastExitTimer",null),a.remove()):null},c+60))},
|
|
16
|
-
c=c>0?c:b>0?b:180;if(c===0||
|
|
17
|
-
"Escape")){var c=function(){var d=$APP.l(a,"__xToastModel");return $APP.n(d)?d:
|
|
18
|
-
$APP.n(b)&&(clearTimeout(b),$APP.Q(a,"__xToastExitTimer",null));b=$APP.l(a,"__xToastHandlers");var c=$APP.l(a,"__xToastRefs");if($APP.n($APP.n(b)?c:b)){c=$APP.
|
|
19
|
-
"dismissible");$APP.mj(a,"disabled","disabled");Object.defineProperty(a,"timeoutMs",{get:function(){return
|
|
20
|
-
|
|
21
|
-
$APP.ii,function(a){
|
|
22
|
-
"show-progress-attr",1680262066);var
|
|
23
|
-
var
|
|
7
|
+
e.appendChild(x);$APP.T(A,"part","progress");$APP.T(E,"part","progress-bar");A.appendChild(E);d.appendChild(e);d.appendChild(A);b.appendChild(c);b.appendChild(d);$APP.Q(a,"__xToastRefs",$APP.Gg([qA,$APP.Wu,rA,$APP.Gs,$APP.Du,sA,$APP.Fk,$APP.Gk,$APP.Wq,$APP.vp,$APP.ir,tA],[E,k,u,x,m,e,b,d,A,f,h,r]));return $APP.l(a,"__xToastRefs")},vA=function(a){return mA($APP.Gg([$APP.fr,$APP.Ej,$APP.Xp,$APP.zp,kA,$APP.pr,$APP.$p,$APP.ps,$APP.st],[a.getAttribute("dismissible"),a.hasAttribute("disabled"),a.getAttribute("timeout-ms"),
|
|
8
|
+
a.hasAttribute("icon"),a.getAttribute("show-progress"),a.getAttribute("icon"),a.getAttribute("type"),a.getAttribute("message"),a.getAttribute("heading")]))},zA=function(a){var b=vA(a);if($APP.I($APP.l(a,"__xToastModel"),b)){b=$APP.G(b);var c=$APP.C(b,$APP.N),d=$APP.C(b,$APP.st),e=$APP.C(b,$APP.ps),f=$APP.C(b,$APP.wq),h=$APP.C(b,$APP.Xj),k=$APP.C(b,$APP.su),m=uA(a),r=$APP.G(m),u=$APP.C(r,$APP.ir),x=$APP.C(r,tA);m=$APP.C(r,qA);var y=$APP.C(r,$APP.Wu),A=$APP.C(r,rA),E=$APP.C(r,$APP.Gs),H=$APP.C(r,$APP.Gk),
|
|
9
|
+
O=$APP.C(r,$APP.Wq);r=$APP.C(r,$APP.vp);$APP.T(a,"data-type",gA(c));var S=$APP.z.j(c,$APP.du)||$APP.z.j(c,$APP.gq)?"alert":"status";$APP.T(H,"role",S);x.textContent=d;x.style.display=$APP.z.j(d,"")?"none":"";A.textContent=e;d=$APP.n(u)?u.assignedNodes().length>0:null;u=$APP.G(b);e=$APP.C(u,$APP.bs);u=$APP.C(u,$APP.Ds);$APP.z.j(e,$APP.ut)?c=u:(c=$APP.C(wA,c),c=$APP.n(c)?c:$APP.C(wA,$APP.it));d=$APP.p(d)&&$APP.z.j(e,$APP.bv);d=$APP.G(new $APP.M(null,2,[xA,d,yA,c],null));c=$APP.C(d,xA);d=$APP.C(d,yA);
|
|
10
|
+
$APP.n(c)?(y.textContent="",r.style.display="none"):(y.textContent=d,r.style.display="inline");$APP.n(f)?(E.disabled=$APP.D(h),E.style.display="inline-flex"):(E.disabled=!0,E.style.display="none");y=pA(b);$APP.n(y)?(O.style.display="block",m.style.setProperty("--x-toast-timeout",""+$APP.P.i(k)+"ms")):O.style.display="none";f=$APP.n(f)?$APP.p(h):f;a.tabIndex=$APP.n(f)?0:-1;$APP.n(h)?$APP.T(a,"aria-disabled","true"):$APP.U(a,"aria-disabled");$APP.n(f)?$APP.T(a,"aria-keyshortcuts","Escape"):$APP.U(a,
|
|
11
|
+
"aria-keyshortcuts");$APP.Q(a,"__xToastModel",b)}},AA=function(){return $APP.D(window.matchMedia("(prefers-reduced-motion:reduce)").matches)},BA=function(a){a=typeof a==="string"?a.trim():"";return $APP.z.j(a,"")||$APP.z.j(a,"0")||$APP.z.j(a,"0ms")||$APP.z.j(a,"0s")?0:$APP.n(a.endsWith("ms"))?(a=parseFloat(a.slice(0,a.length-2)),$APP.n(isNaN(a))?0:Math.max(0,Math.round(a))):$APP.n(a.endsWith("s"))?(a=parseFloat(a.slice(0,a.length-1)),$APP.n(isNaN(a))?0:Math.max(0,Math.round(1E3*a))):0},CA=function(a){var b=
|
|
12
|
+
$APP.l(a,"__xToastTimeout");$APP.n(b)&&(clearTimeout(b),$APP.Q(a,"__xToastTimeout",null))},EA=function(a){CA(a);var b=function(){var c=$APP.l(a,"__xToastModel");return $APP.n(c)?c:vA(a)}();return $APP.n(function(){var c=nA(b);return $APP.n(c)?typeof $APP.su.i(b)==="number"&&$APP.p($APP.l(a,"__xToastExiting")):c}())?$APP.Q(a,"__xToastTimeout",setTimeout(function(){$APP.Q(a,"__xToastTimeout",null);if($APP.n(function(){var d=a.isConnected;return $APP.n(d)?$APP.p($APP.l(a,"__xToastExiting")):d}())){var c=
|
|
13
|
+
function(){var d=$APP.l(a,"__xToastModel");return $APP.n(d)?d:vA(a)}();if($APP.n(nA(c)))return c=$APP.gm(oA(c,"timeout")),$APP.jj(a,"x-toast-dismiss",c)?DA.i?DA.i(a):DA.call(null,a):null}return null},$APP.su.i(b))):null},FA=function(a){var b=$APP.l(a,"__xToastModel");$APP.n($APP.n(b)?pA(b):b)&&$APP.T(a,"data-progress-active","");return EA(a)},GA=function(a){if($APP.n($APP.l(a,"__xToastEntered")))return null;$APP.Q(a,"__xToastEntered",!0);$APP.T(a,"data-entering","");if(AA())return $APP.U(a,"data-entering"),
|
|
14
|
+
FA(a);var b=uA(a);b=$APP.G(b);var c=$APP.C(b,$APP.Gk);return c.addEventListener("animationend",function f(e){return $APP.z.j(e.target,c)?(c.removeEventListener("animationend",f),$APP.U(a,"data-entering"),FA(a)):null})},HA=function(a,b,c){var d=function h(f){return $APP.z.j(f.target,b)?(b.removeEventListener("animationend",h),f=$APP.l(a,"__xToastExitTimer"),$APP.n(f)&&(clearTimeout(f),$APP.Q(a,"__xToastExitTimer",null)),$APP.n(a.isConnected)?a.remove():null):null};$APP.T(a,"data-exiting","");b.addEventListener("animationend",
|
|
15
|
+
d);return $APP.Q(a,"__xToastExitTimer",setTimeout(function(){var f=a.isConnected;return $APP.n($APP.n(f)?$APP.l(a,"__xToastExiting"):f)?(b.removeEventListener("animationend",d),$APP.Q(a,"__xToastExitTimer",null),a.remove()):null},c+60))},DA=function(a){if($APP.n($APP.l(a,"__xToastExiting")))return null;$APP.Q(a,"__xToastExiting",!0);CA(a);$APP.U(a,"data-entering");$APP.U(a,"data-progress-active");var b=window.getComputedStyle(a);var c=BA(b.getPropertyValue("--x-toast-exit-duration"));b=BA(b.getPropertyValue("--x-motion-exit-duration"));
|
|
16
|
+
c=c>0?c:b>0?b:180;if(c===0||AA())return a.remove();b=uA(a);b=$APP.G(b);b=$APP.C(b,$APP.Gk);return HA(a,b,c)},IA=function(a,b){var c=$APP.l(a,"__xToastModel");c=$APP.n(c)?c:vA(a);b=$APP.gm(oA(c,b));(b=$APP.jj(a,"x-toast-dismiss",b))&&DA(a);return b},JA=function(a,b){var c=function(){var d=$APP.l(a,"__xToastModel");return $APP.n(d)?d:vA(a)}();return $APP.n(function(){var d=nA(c);return $APP.n(d)?$APP.p($APP.l(a,"__xToastExiting")):d}())?(b.preventDefault(),IA(a,"button")):null},KA=function(a,b){if($APP.z.j(b.key,
|
|
17
|
+
"Escape")){var c=function(){var d=$APP.l(a,"__xToastModel");return $APP.n(d)?d:vA(a)}();if($APP.n(function(){var d=nA(c);return $APP.n(d)?$APP.p($APP.l(a,"__xToastExiting")):d}()))return b.preventDefault(),IA(a,"keyboard")}return null},LA=function(a){function b(e){return KA(a,e)}function c(e){return JA(a,e)}var d=uA(a);d=$APP.G(d);$APP.C(d,$APP.Gs).addEventListener("click",c);a.addEventListener("keydown",b);$APP.Q(a,"__xToastHandlers",{click:c,keydown:b})},MA=function(a){CA(a);var b=$APP.l(a,"__xToastExitTimer");
|
|
18
|
+
$APP.n(b)&&(clearTimeout(b),$APP.Q(a,"__xToastExitTimer",null));b=$APP.l(a,"__xToastHandlers");var c=$APP.l(a,"__xToastRefs");if($APP.n($APP.n(b)?c:b)){c=$APP.Gs.i(c);var d=$APP.l(b,"click");b=$APP.l(b,"keydown");$APP.n(d)&&c.removeEventListener("click",d);$APP.n(b)&&a.removeEventListener("keydown",b)}return $APP.Q(a,"__xToastHandlers",null)},NA=function(a){$APP.pj(a,"type","type","info");$APP.pj(a,"heading","heading","");$APP.pj(a,"message","message","");$APP.qj(a,"icon","icon");$APP.nj(a,"dismissible",
|
|
19
|
+
"dismissible");$APP.mj(a,"disabled","disabled");Object.defineProperty(a,"timeoutMs",{get:function(){return iA(this.getAttribute("timeout-ms"))},set:function(b){return b==null?$APP.U(this,"timeout-ms"):$APP.T(this,"timeout-ms",""+$APP.P.i(b|0))},enumerable:!0,configurable:!0});Object.defineProperty(a,"showProgress",{get:function(){return hA(this.getAttribute("show-progress"))},set:function(b){return $APP.n(b)?$APP.T(this,"show-progress",""):$APP.U(this,"show-progress")},enumerable:!0,configurable:!0})},
|
|
20
|
+
OA=function(a){return Object.defineProperty(a,"dismiss",{value:function(b){var c=$APP.p($APP.l(this,"__xToastExiting"));$APP.n(c?this.isConnected:c)&&IA(this,typeof b==="string"?b:"api");return null},writable:!0,configurable:!0})},PA=function(a){uA(a);MA(a);LA(a);zA(a);return GA(a)},QA=function(a){return MA(a)},RA=function(a,b,c,d){return $APP.I(c,d)?(zA(a),$APP.n(a.isConnected)?EA(a):null):null},VA=function(){return $APP.zi("x-toast",new $APP.M(null,5,[$APP.ji,UA,$APP.hi,PA,$APP.ei,QA,$APP.di,RA,
|
|
21
|
+
$APP.ii,function(a){NA(a);return OA(a)}],null))},WA=function(){return VA()},tA=new $APP.F(null,"heading-el","heading-el",-1277272161),lA=new $APP.F(null,"show-progress?","show-progress?",-1681518912),sA=new $APP.F(null,"inner","inner",-1383171215),xA=new $APP.F(null,"hide?","hide?",-988635670),yA=new $APP.F(null,"fallback","fallback",761637929),rA=new $APP.F(null,"message-el","message-el",-683533234),qA=new $APP.F(null,"progress-bar","progress-bar",-123877022),kA=new $APP.F(null,"show-progress-attr",
|
|
22
|
+
"show-progress-attr",1680262066);var UA="type heading message icon dismissible disabled timeout-ms show-progress".split(" ");$APP.je(["x-toast-dismiss",new $APP.M(null,2,[$APP.V,new $APP.M(null,4,[$APP.N,$APP.X,$APP.xq,$APP.X,$APP.st,$APP.X,$APP.ps,$APP.X],null),$APP.gu,!0],null)]);
|
|
23
|
+
var dA=new $APP.M(null,4,["info",$APP.it,"success",$APP.xs,"warning",$APP.du,"error",$APP.gq],null),fA=new $APP.M(null,4,[$APP.it,"info",$APP.xs,"success",$APP.du,"warning",$APP.gq,"error"],null),wA=new $APP.M(null,4,[$APP.it,"ℹ",$APP.xs,"✓",$APP.du,"!",$APP.gq,"⨯"],null);$APP.fa("baredom.exports.x_toast.init",WA);export const init=WA;
|