@vanelsas/baredom 1.4.0 → 2.0.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 +28 -1
- package/README.md +57 -5
- package/dist/base.js +212 -212
- package/dist/x-alert.js +16 -16
- package/dist/x-avatar-group.js +11 -11
- package/dist/x-avatar.js +16 -16
- package/dist/x-badge.js +11 -11
- package/dist/x-bento-grid.js +5 -5
- package/dist/x-bento-item.js +4 -4
- package/dist/x-breadcrumbs.js +14 -14
- package/dist/x-button.js +15 -15
- package/dist/x-cancel-dialogue.js +16 -16
- package/dist/x-card.js +7 -7
- package/dist/x-chart.js +46 -46
- package/dist/x-checkbox.js +11 -11
- package/dist/x-chip.js +9 -9
- package/dist/x-collapse.js +11 -11
- package/dist/x-command-palette.js +29 -29
- package/dist/x-container.js +6 -6
- package/dist/x-context-menu.js +20 -19
- package/dist/x-copy.js +23 -23
- package/dist/x-currency-field.js +21 -21
- package/dist/x-date-picker.js +36 -36
- package/dist/x-divider.js +12 -12
- package/dist/x-drawer.js +11 -11
- package/dist/x-dropdown.js +10 -10
- package/dist/x-fieldset.js +6 -6
- package/dist/x-file-download.js +7 -7
- package/dist/x-form-field.js +16 -16
- package/dist/x-form.js +9 -9
- package/dist/x-gaussian-blur.js +18 -18
- package/dist/x-grid.js +6 -6
- package/dist/x-kinetic-font.js +27 -27
- package/dist/x-kinetic-typography.js +37 -37
- package/dist/x-liquid-dock.js +37 -37
- package/dist/x-liquid-fill.js +42 -42
- package/dist/x-liquid-glass.js +38 -38
- package/dist/x-menu-item.js +10 -10
- package/dist/x-menu.js +11 -11
- package/dist/x-metaball-cursor.js +28 -28
- package/dist/x-modal.js +11 -11
- package/dist/x-morph-stack.js +39 -39
- package/dist/x-navbar.js +13 -13
- package/dist/x-neural-glow.js +31 -31
- package/dist/x-notification-center.js +9 -9
- package/dist/x-organic-divider.js +17 -17
- package/dist/x-organic-progress.js +38 -38
- package/dist/x-organic-shape.js +12 -12
- package/dist/x-pagination.js +16 -16
- package/dist/x-popover.js +14 -14
- package/dist/x-progress-circle.js +9 -9
- package/dist/x-progress.js +9 -9
- package/dist/x-radio.js +12 -12
- package/dist/x-ripple-effect.js +11 -11
- package/dist/x-scroll-parallax.js +17 -17
- package/dist/x-scroll-stack.js +18 -18
- package/dist/x-scroll-story.js +34 -35
- package/dist/x-scroll-timeline.js +46 -49
- package/dist/x-scroll.js +39 -39
- package/dist/x-search-field.js +15 -15
- package/dist/x-select.js +10 -10
- package/dist/x-sidebar.js +17 -17
- package/dist/x-skeleton.js +5 -5
- package/dist/x-slider.js +16 -16
- package/dist/x-soft-body.js +21 -20
- package/dist/x-spacer.js +5 -5
- package/dist/x-spinner.js +6 -6
- package/dist/x-splash.js +14 -14
- package/dist/x-stat.js +11 -11
- package/dist/x-stepper.js +16 -16
- package/dist/x-switch.js +11 -11
- package/dist/x-tab.js +8 -8
- package/dist/x-table-cell.js +21 -21
- package/dist/x-table-row.js +10 -10
- package/dist/x-table.js +13 -13
- package/dist/x-tabs.js +11 -11
- package/dist/x-text-area.js +18 -18
- package/dist/x-theme.js +25 -0
- package/dist/x-timeline-item.js +21 -21
- package/dist/x-timeline.js +9 -9
- package/dist/x-toast.js +23 -23
- package/dist/x-toaster.js +8 -8
- package/dist/x-typography.js +11 -10
- package/package.json +6 -2
package/dist/x-tab.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
3
|
-
a.hasAttribute("selected"),$APP.gj,a.hasAttribute("disabled"),$APP.
|
|
4
|
-
$APP.
|
|
5
|
-
$APP.
|
|
6
|
-
"__x_tab_initialized")!==!0){var b=a.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("slot");c.textContent=":host{display:inline-block;color-scheme:light dark;outline:none;--x-tab-color
|
|
7
|
-
d.setAttribute("part","base");d.className="base";d.appendChild(e);b.appendChild(c);b.appendChild(d);a.__x_tab_root=b;a.__x_tab_base=d;
|
|
8
|
-
set:function(b){return $APP.r(b)?this.setAttribute("disabled",""):this.removeAttribute("disabled")},configurable:!0,enumerable:!0});Object.defineProperty(a.prototype,"value",{get:function(){return this.getAttribute("value")},set:function(b){return $APP.r(b)?this.setAttribute("value",b):this.removeAttribute("value")},configurable:!0,enumerable:!0})},
|
|
9
|
-
function(){return $APP.l(this,"__x_tab_initialized")===!0?
|
|
2
|
+
var bm=function(a,b,c){return $APP.J(b,a)?a:c},gm=function(a){var b=$APP.N(a),c=$APP.G(b,$APP.zj),d=$APP.G(b,$APP.gj);a=$APP.G(b,$APP.yk);var e=$APP.G(b,$APP.rh),g=$APP.G(b,$APP.Fh),h=$APP.G(b,$APP.T);b=$APP.G(b,cm);c=$APP.I(c);var k=(d=$APP.I(d))?"-1":c?"0":"-1";return new $APP.P(null,8,[$APP.zj,c,$APP.gj,d,$APP.yk,bm(a,dm,"horizontal"),$APP.rh,bm(e,em,"md"),$APP.Fh,bm(g,fm,"default"),$APP.T,h,cm,b,$APP.Uj,k],null)},hm=function(a){return new $APP.P(null,8,[$APP.ri,a.getAttribute("value"),$APP.zj,
|
|
3
|
+
a.hasAttribute("selected"),$APP.gj,a.hasAttribute("disabled"),$APP.yk,a.getAttribute("orientation"),$APP.rh,a.getAttribute("size"),$APP.Fh,a.getAttribute("variant"),$APP.T,a.getAttribute("label"),cm,a.getAttribute("controls")],null)},im=function(a){var b=gm(hm(a)),c=$APP.l(a,"__x_tab_base");if($APP.r(c)){a.setAttribute("role","tab");a.setAttribute("aria-selected",$APP.r($APP.zj.g(b))?"true":"false");$APP.r($APP.gj.g(b))?a.setAttribute("aria-disabled","true"):a.removeAttribute("aria-disabled");a.setAttribute("tabindex",
|
|
4
|
+
$APP.Uj.g(b));var d=cm.g(b),e=$APP.T.g(b);$APP.r($APP.r(d)?$APP.O(d,""):d)?a.setAttribute("aria-controls",d):a.removeAttribute("aria-controls");$APP.r($APP.r(e)?$APP.O(e,""):e)?a.setAttribute("aria-label",e):a.removeAttribute("aria-label");c.setAttribute("data-selected",$APP.r($APP.zj.g(b))?"true":"false");c.setAttribute("data-disabled",$APP.r($APP.gj.g(b))?"true":"false");c.setAttribute("data-size",$APP.rh.g(b));c.setAttribute("data-variant",$APP.Fh.g(b));return c.setAttribute("data-orientation",
|
|
5
|
+
$APP.yk.g(b))}return null},jm=function(a){var b=gm(hm(a)),c=$APP.N(b);b=$APP.G(c,$APP.zj);c=$APP.G(c,$APP.gj);$APP.t(c)&&$APP.t(b)?(b=a.getAttribute("value"),a=a.dispatchEvent(new CustomEvent("tab-select",{detail:{value:$APP.r(b)?b:""},bubbles:!0,composed:!0}))):a=null;return a},km=function(a){a.addEventListener("click",function(){return jm(a)});a.addEventListener("keydown",function(b){var c=b.key;$APP.D.i(c,"Enter")||$APP.D.i(c," ")?(b.preventDefault(),b=jm(a)):b=null;return b})},lm=function(a){if($APP.l(a,
|
|
6
|
+
"__x_tab_initialized")!==!0){var b=a.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("slot");c.textContent=":host{display:inline-block;color-scheme:light dark;outline:none;--x-tab-color:var(--x-color-text,#0f172a);--x-tab-hover-background:rgba(15,23,42,0.05);--x-tab-selected-color:var(--x-color-primary-hover,#1d4ed8);--x-tab-selected-background:rgba(59,130,246,0.12);--x-tab-selected-border-color:transparent;}@media (prefers-color-scheme:dark){:host{--x-tab-color:var(--x-color-text-muted,#94a3b8);--x-tab-hover-background:rgba(248,250,252,0.06);--x-tab-selected-color:var(--x-color-focus-ring,#60a5fa);--x-tab-selected-background:rgba(59,130,246,0.18);--x-tab-selected-border-color:var(--x-color-focus-ring,#60a5fa);}}.base{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;user-select:none;padding:var(--x-tab-padding-md,10px 16px);border-radius:var(--x-tab-radius,8px);color:var(--x-tab-color);background:var(--x-tab-background,transparent);border:1px solid var(--x-tab-border-color,transparent);transition:background var(--x-tab-transition-duration,120ms) var(--x-tab-transition-timing,ease),color var(--x-tab-transition-duration,120ms) var(--x-tab-transition-timing,ease),border-color var(--x-tab-transition-duration,120ms) var(--x-tab-transition-timing,ease);}.base[data-size\x3d'sm']{padding:var(--x-tab-padding-sm,6px 12px);}.base[data-size\x3d'md']{padding:var(--x-tab-padding-md,10px 16px);}.base[data-size\x3d'lg']{padding:var(--x-tab-padding-lg,14px 20px);}.base:hover{background:var(--x-tab-hover-background);}.base[data-selected\x3d'true']{color:var(--x-tab-selected-color);background:var(--x-tab-selected-background);border-color:var(--x-tab-selected-border-color);}.base[data-variant\x3d'underline'][data-selected\x3d'true']{border-bottom:2px solid var(--x-tab-selected-color);background:transparent;}.base[data-variant\x3d'pill'][data-selected\x3d'true']{background:var(--x-tab-selected-background);}.base[data-disabled\x3d'true']{opacity:var(--x-tab-disabled-opacity,0.5);cursor:default;}:host(:focus-visible) .base{box-shadow:0 0 0 3px var(--x-tab-focus-ring,rgba(59,130,246,0.4));}@media (prefers-reduced-motion: reduce){.base{transition:none;}}";
|
|
7
|
+
d.setAttribute("part","base");d.className="base";d.appendChild(e);b.appendChild(c);b.appendChild(d);a.__x_tab_root=b;a.__x_tab_base=d;km(a);a.__x_tab_initialized=!0}im(a);return a},mm=function(a){Object.defineProperty(a.prototype,"selected",{get:function(){return this.hasAttribute("selected")},set:function(b){return $APP.r(b)?this.setAttribute("selected",""):this.removeAttribute("selected")},configurable:!0,enumerable:!0});Object.defineProperty(a.prototype,"disabled",{get:function(){return this.hasAttribute("disabled")},
|
|
8
|
+
set:function(b){return $APP.r(b)?this.setAttribute("disabled",""):this.removeAttribute("disabled")},configurable:!0,enumerable:!0});Object.defineProperty(a.prototype,"value",{get:function(){return this.getAttribute("value")},set:function(b){return $APP.r(b)?this.setAttribute("value",b):this.removeAttribute("value")},configurable:!0,enumerable:!0})},om=function(){var a=class extends HTMLElement{};a.observedAttributes=nm;a.prototype.connectedCallback=function(){return lm(this)};a.prototype.attributeChangedCallback=
|
|
9
|
+
function(){return $APP.l(this,"__x_tab_initialized")===!0?im(this):lm(this)};mm(a);return a},pm=function(){return $APP.r(customElements.get("x-tab"))?null:customElements.define("x-tab",om())},cm=new $APP.K(null,"controls","controls",1340701452);var nm="value selected disabled orientation size variant label controls".split(" "),dm=new $APP.R(null,new $APP.P(null,2,["vertical",null,"horizontal",null],null),null),em=new $APP.R(null,new $APP.P(null,3,["md",null,"lg",null,"sm",null],null),null),fm=new $APP.R(null,new $APP.P(null,3,["default",null,"underline",null,"pill",null],null),null);$APP.Sd(["tab-select",new $APP.P(null,1,[$APP.U,new $APP.P(null,1,[$APP.ri,$APP.X],null)],null)]);$APP.ka("baredom.exports.x_tab.init",pm);export const init=pm;
|
package/dist/x-table-cell.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
3
|
-
"header"))?b:a},
|
|
4
|
-
g=document.createElement("slot"),h=document.createElement("button"),k=document.createElement("slot"),m=document.createElement("span");c.textContent=":host{display:block;box-sizing:border-box;color-scheme:light dark;--x-table-cell-padding:0.5rem 0.75rem;--x-table-cell-bg:transparent;--x-table-cell-header-bg:rgba(0,0,0,0.04);--x-table-cell-border-color:rgba(0,0,0,0.1);--x-table-cell-border-width:1px;--x-table-cell-color:inherit;--x-table-cell-header-color:inherit;--x-table-cell-font-size:inherit;--x-table-cell-header-font-weight:600;--x-table-cell-min-width:0;--x-table-cell-max-width:none;--x-table-cell-sort-color:rgba(0,0,0,0.4);--x-table-cell-sort-hover-color:rgba(0,0,0,0.7);--x-table-cell-focus-ring:rgba(59,130,246,0.5);--x-table-cell-transition-duration:150ms;--x-table-cell-sticky-bg
|
|
2
|
+
var FJ=function(a,b,c){a=typeof a==="string"?a.trim().toLowerCase():null;return $APP.J(b,a)?a:c},GJ=function(a){return typeof a==="string"?(a=parseInt(a.trim(),10),$APP.t(isNaN(a))&&a>0?Math.floor(a):1):1},JJ=function(a){var b=$APP.N(a);a=$APP.G(b,HJ);b=$APP.G(b,IJ);if($APP.r($APP.r(a)?a:$APP.O(b,"none")))switch(b){case "asc":return"ascending";case "desc":return"descending";default:return"none"}else return null},KJ=function(a){var b=$APP.N(a);a=$APP.G(b,$APP.Z);b=$APP.G(b,HJ);return(a=$APP.D.i(a,
|
|
3
|
+
"header"))?b:a},LJ=function(a){switch(a){case "none":return"asc";case "asc":return"desc";case "desc":return"none";default:return"asc"}},MJ=function(a){switch(a){case "none":return"Sort ascending";case "asc":return"Sort descending";case "desc":return"Remove sort";default:return"Sort ascending"}},QJ=function(a){var b=$APP.l(a,"__xTableCellRefs");if($APP.r(b))return b;b=a.attachShadow({mode:"open"});var c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("span"),
|
|
4
|
+
g=document.createElement("slot"),h=document.createElement("button"),k=document.createElement("slot"),m=document.createElement("span");c.textContent=":host{display:block;box-sizing:border-box;color-scheme:light dark;--x-table-cell-padding:0.5rem 0.75rem;--x-table-cell-bg:transparent;--x-table-cell-header-bg:rgba(0,0,0,0.04);--x-table-cell-border-color:var(--x-color-border,rgba(0,0,0,0.1));--x-table-cell-border-width:1px;--x-table-cell-color:var(--x-color-text,inherit);--x-table-cell-header-color:var(--x-color-text,inherit);--x-table-cell-font-size:inherit;--x-table-cell-header-font-weight:600;--x-table-cell-min-width:0;--x-table-cell-max-width:none;--x-table-cell-sort-color:var(--x-color-text-muted,rgba(0,0,0,0.4));--x-table-cell-sort-hover-color:var(--x-color-text,rgba(0,0,0,0.7));--x-table-cell-focus-ring:var(--x-color-focus-ring,rgba(59,130,246,0.5));--x-table-cell-transition-duration:var(--x-transition-duration,150ms);--x-table-cell-sticky-bg:var(--x-color-bg,#ffffff);--x-table-cell-disabled-opacity:0.45;min-width:var(--x-table-cell-min-width);max-width:var(--x-table-cell-max-width);}@media (prefers-color-scheme:dark){:host{--x-table-cell-header-bg:rgba(255,255,255,0.06);--x-table-cell-border-color:var(--x-color-border,rgba(255,255,255,0.1));--x-table-cell-sort-color:var(--x-color-text-muted,rgba(255,255,255,0.4));--x-table-cell-sort-hover-color:var(--x-color-text,rgba(255,255,255,0.7));--x-table-cell-sticky-bg:var(--x-color-bg,#1f2937);}}:host([data-sticky\x3d'start']){position:sticky;inset-inline-start:0;background:var(--x-table-cell-sticky-bg);z-index:1;}:host([data-sticky\x3d'end']){position:sticky;inset-inline-end:0;background:var(--x-table-cell-sticky-bg);z-index:1;}:host([disabled]){opacity:var(--x-table-cell-disabled-opacity);}[part\x3dcell]{display:flex;align-items:center;justify-content:flex-start;padding:var(--x-table-cell-padding);background:var(--x-table-cell-bg);border-bottom:var(--x-table-cell-border-width) solid var(--x-table-cell-border-color);color:var(--x-table-cell-color);font-size:var(--x-table-cell-font-size);min-width:0;box-sizing:border-box;}:host([data-type\x3d'header']) [part\x3dcell]{background:var(--x-table-cell-header-bg);color:var(--x-table-cell-header-color);font-weight:var(--x-table-cell-header-font-weight);}:host([data-align\x3d'start']) [part\x3dcell]{justify-content:flex-start;}:host([data-align\x3d'center']) [part\x3dcell]{justify-content:center;}:host([data-align\x3d'end']) [part\x3dcell]{justify-content:flex-end;}:host([data-valign\x3d'top']) [part\x3dcell]{align-items:flex-start;}:host([data-valign\x3d'middle']) [part\x3dcell]{align-items:center;}:host([data-valign\x3d'bottom']) [part\x3dcell]{align-items:flex-end;}[part\x3dcontent]{flex:1 1 auto;min-width:0;}:host([data-truncate]) [part\x3dcontent]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}[part\x3dsort-btn]{flex:0 0 auto;appearance:none;border:0;background:transparent;padding:2px;margin:0 0 0 4px;cursor:pointer;color:var(--x-table-cell-sort-color);display:inline-flex;align-items:center;justify-content:center;border-radius:4px;transition:color var(--x-table-cell-transition-duration) ease;line-height:1;}[part\x3dsort-btn]:hover{color:var(--x-table-cell-sort-hover-color);}[part\x3dsort-btn]:focus{outline:none;}[part\x3dsort-btn]:focus-visible{outline:2px solid var(--x-table-cell-focus-ring);outline-offset:2px;}[part\x3dsort-btn][disabled]{cursor:default;pointer-events:none;opacity:0.4;}[part\x3dsort-btn][hidden]{display:none !important;}@media (prefers-reduced-motion:reduce){[part\x3dsort-btn]{transition:none !important;}}";
|
|
5
5
|
d.setAttribute("part","cell");e.setAttribute("part","content");e.appendChild(g);h.setAttribute("part","sort-btn");h.setAttribute("type","button");k.setAttribute("name","sort-icon");m.setAttribute("part","sort-icon-default");m.setAttribute("aria-hidden","true");m.innerHTML='\x3csvg width\x3d"16" height\x3d"16" viewBox\x3d"0 0 16 16" fill\x3d"currentColor" aria-hidden\x3d"true"\x3e\x3cpath d\x3d"M8 3L5 7h6L8 3zm0 10l3-4H5l3 4z"/\x3e\x3c/svg\x3e';k.appendChild(m);h.appendChild(k);d.appendChild(e);d.appendChild(h);
|
|
6
|
-
b.appendChild(c);b.appendChild(d);a.__xTableCellRefs=new $APP.P(null,5,[$APP.bi,b,
|
|
7
|
-
var b=$APP.N(a);a=$APP.G(b,$APP.W);var c=$APP.G(b,
|
|
8
|
-
$APP.N(b);var c=$APP.G(b,$APP.
|
|
9
|
-
$APP.r(p)?a.setAttribute("aria-sort",p):a.removeAttribute("aria-sort");$APP.r(
|
|
10
|
-
k.hidden=$APP.t(m);c=parseInt;q=$APP.N(b);m=$APP.G(q,$APP.Z);d=$APP.G(q,
|
|
11
|
-
break a;default:e='\x3csvg width\x3d"16" height\x3d"16" viewBox\x3d"0 0 16 16" fill\x3d"currentColor" aria-hidden\x3d"true"\x3e\x3cpath d\x3d"M8 3L5 7h6L8 3zm0 10l3-4H5l3 4z"/\x3e\x3c/svg\x3e'}h.innerHTML=e;a.__xTableCellModel=b}},
|
|
12
|
-
return $APP.r(c)?c:
|
|
13
|
-
null},
|
|
6
|
+
b.appendChild(c);b.appendChild(d);a.__xTableCellRefs=new $APP.P(null,5,[$APP.bi,b,NJ,d,$APP.Vh,e,OJ,h,PJ,m],null);return $APP.l(a,"__xTableCellRefs")},eK=function(a){a=$APP.Q([$APP.qi,RJ,SJ,TJ,HJ,$APP.fi,$APP.Uh,UJ,VJ,$APP.W,WJ],[a.getAttribute("align"),a.getAttribute("row-span"),a.getAttribute("valign"),a.getAttribute("sort-direction"),a.hasAttribute("sortable"),a.hasAttribute("truncate"),a.getAttribute("type"),a.getAttribute("sticky"),a.getAttribute("scope"),a.hasAttribute("disabled"),a.getAttribute("col-span")]);
|
|
7
|
+
var b=$APP.N(a);a=$APP.G(b,$APP.W);var c=$APP.G(b,WJ),d=$APP.G(b,$APP.qi),e=$APP.G(b,RJ),g=$APP.G(b,SJ),h=$APP.G(b,TJ),k=$APP.G(b,HJ),m=$APP.G(b,$APP.fi),p=$APP.G(b,$APP.Uh),q=$APP.G(b,UJ);b=$APP.G(b,VJ);return $APP.Q([$APP.Qi,IJ,XJ,$APP.Z,YJ,HJ,$APP.Mk,$APP.vl,$APP.fi,$APP.W,$APP.Ch],[FJ(d,ZJ,"start"),FJ(h,$J,"none"),FJ(g,aK,"middle"),FJ(p,bK,"data"),FJ(b,cK,"col"),$APP.I(k),FJ(q,dK,"none"),GJ(c),$APP.I(m),$APP.I(a),GJ(e)])},fK=function(a){var b=eK(a);if($APP.O($APP.l(a,"__xTableCellModel"),b)){b=
|
|
8
|
+
$APP.N(b);var c=$APP.G(b,$APP.vl),d=$APP.G(b,$APP.Ch),e=$APP.G(b,$APP.W),g=$APP.G(b,IJ),h=QJ(a);h=$APP.N(h);var k=$APP.G(h,OJ);h=$APP.G(h,PJ);var m=KJ(b),p=$APP.N(b),q=$APP.G(p,$APP.Z),w=$APP.G(p,$APP.Qi),x=$APP.G(p,XJ),y=$APP.G(p,$APP.Mk),A=$APP.G(p,$APP.fi),B=$APP.G(p,$APP.W);$APP.G(p,HJ);$APP.G(p,IJ);var E=a.setAttribute,H=$APP.N(p);var F=$APP.G(H,$APP.Z);H=$APP.G(H,YJ);F=$APP.D.i(F,"header")?$APP.D.i(H,"row")||$APP.D.i(H,"rowgroup")?"rowheader":"columnheader":"cell";E.call(a,"role",F);p=JJ(p);
|
|
9
|
+
$APP.r(p)?a.setAttribute("aria-sort",p):a.removeAttribute("aria-sort");$APP.r(B)?a.setAttribute("aria-disabled","true"):a.removeAttribute("aria-disabled");a.setAttribute("data-type",q);a.setAttribute("data-align",w);a.setAttribute("data-valign",x);$APP.D.i(y,"none")?a.removeAttribute("data-sticky"):a.setAttribute("data-sticky",y);$APP.r(A)?a.setAttribute("data-truncate",""):a.removeAttribute("data-truncate");a.style.gridColumn=c>1?"span "+$APP.S.g(c):"";a.style.gridRow=d>1?"span "+$APP.S.g(d):"";
|
|
10
|
+
k.hidden=$APP.t(m);c=parseInt;q=$APP.N(b);m=$APP.G(q,$APP.Z);d=$APP.G(q,HJ);q=$APP.G(q,$APP.W);m=$APP.D.i(m,"header");k.tabIndex=c($APP.r(m?$APP.r(d)?$APP.t(q):d:m)?"0":"-1",10);k.setAttribute("aria-label",MJ(g));k.disabled=$APP.I(e);a:switch(e=$APP.N(b),$APP.G(e,IJ)){case "asc":e='\x3csvg width\x3d"16" height\x3d"16" viewBox\x3d"0 0 16 16" fill\x3d"currentColor" aria-hidden\x3d"true"\x3e\x3cpath d\x3d"M8 4L4 10h8L8 4z"/\x3e\x3c/svg\x3e';break a;case "desc":e='\x3csvg width\x3d"16" height\x3d"16" viewBox\x3d"0 0 16 16" fill\x3d"currentColor" aria-hidden\x3d"true"\x3e\x3cpath d\x3d"M8 12l4-6H4l4 6z"/\x3e\x3c/svg\x3e';
|
|
11
|
+
break a;default:e='\x3csvg width\x3d"16" height\x3d"16" viewBox\x3d"0 0 16 16" fill\x3d"currentColor" aria-hidden\x3d"true"\x3e\x3cpath d\x3d"M8 3L5 7h6L8 3zm0 10l3-4H5l3 4z"/\x3e\x3c/svg\x3e'}h.innerHTML=e;a.__xTableCellModel=b}},gK=function(a){var b=a.getAttribute("sort-direction");b=FJ(b,$J,"none");b=new CustomEvent("x-table-cell-sort",{detail:{direction:LJ(b),previousDirection:b},bubbles:!0,composed:!0,cancelable:!0});a.dispatchEvent(b)},hK=function(a){var b=function(){var c=$APP.l(a,"__xTableCellModel");
|
|
12
|
+
return $APP.r(c)?c:eK(a)}();$APP.r(function(){var c=KJ(b);return $APP.r(c)?$APP.t($APP.W.g(b)):c}())&&gK(a);return null},iK=function(a){function b(){return hK(a)}var c=QJ(a);c=$APP.N(c);$APP.G(c,OJ).addEventListener("click",b);$APP.n(a,"__xTableCellHandlers",{"sort-click":b})},jK=function(a){var b=$APP.l(a,"__xTableCellHandlers"),c=$APP.l(a,"__xTableCellRefs");$APP.r($APP.r(b)?c:b)&&(c=$APP.N(c),c=$APP.G(c,OJ),b=$APP.l(b,"sort-click"),$APP.r(b)&&c.removeEventListener("click",b));a.__xTableCellHandlers=
|
|
13
|
+
null},kK=function(a){Object.defineProperty(a,"type",{get:function(){var b=this.getAttribute("type");return $APP.r(b)?b:"data"},set:function(b){return $APP.r(b)?this.setAttribute("type",""+$APP.S.g(b)):this.removeAttribute("type")},enumerable:!0,configurable:!0});Object.defineProperty(a,"scope",{get:function(){var b=this.getAttribute("scope");return $APP.r(b)?b:"col"},set:function(b){return $APP.r(b)?this.setAttribute("scope",""+$APP.S.g(b)):this.removeAttribute("scope")},enumerable:!0,configurable:!0});
|
|
14
14
|
Object.defineProperty(a,"align",{get:function(){var b=this.getAttribute("align");return $APP.r(b)?b:"start"},set:function(b){return $APP.r(b)?this.setAttribute("align",""+$APP.S.g(b)):this.removeAttribute("align")},enumerable:!0,configurable:!0});Object.defineProperty(a,"valign",{get:function(){var b=this.getAttribute("valign");return $APP.r(b)?b:"middle"},set:function(b){return $APP.r(b)?this.setAttribute("valign",""+$APP.S.g(b)):this.removeAttribute("valign")},enumerable:!0,configurable:!0});Object.defineProperty(a,
|
|
15
15
|
"truncate",{get:function(){return this.hasAttribute("truncate")},set:function(b){return $APP.r(b)?this.setAttribute("truncate",""):this.removeAttribute("truncate")},enumerable:!0,configurable:!0});Object.defineProperty(a,"sticky",{get:function(){var b=this.getAttribute("sticky");return $APP.r(b)?b:"none"},set:function(b){return $APP.r(b)?this.setAttribute("sticky",""+$APP.S.g(b)):this.removeAttribute("sticky")},enumerable:!0,configurable:!0});Object.defineProperty(a,"sortable",{get:function(){return this.hasAttribute("sortable")},
|
|
16
|
-
set:function(b){return $APP.r(b)?this.setAttribute("sortable",""):this.removeAttribute("sortable")},enumerable:!0,configurable:!0});Object.defineProperty(a,"disabled",{get:function(){return this.hasAttribute("disabled")},set:function(b){return $APP.r(b)?this.setAttribute("disabled",""):this.removeAttribute("disabled")},enumerable:!0,configurable:!0});Object.defineProperty(a,"colSpan",{get:function(){return
|
|
17
|
-
b>0?this.setAttribute("col-span",""+$APP.S.g(b)):this.removeAttribute("col-span")},enumerable:!0,configurable:!0});Object.defineProperty(a,"rowSpan",{get:function(){return
|
|
18
|
-
set:function(b){return $APP.r(b)?this.setAttribute("sort-direction",""+$APP.S.g(b)):this.removeAttribute("sort-direction")},enumerable:!0,configurable:!0})},
|
|
19
|
-
e=$APP.G(e,$APP.Qi);b.call(this,new d("x-table-cell-connected",{detail:$APP.nh(new $APP.P(null,5,[$APP.Z,c,
|
|
20
|
-
customElements.define("x-table-cell",
|
|
21
|
-
1857578519),
|
|
22
|
-
$APP.Q([$APP.Qi,
|
|
23
|
-
1,[$APP.Z,$APP.
|
|
24
|
-
var
|
|
25
|
-
"desc",null,"asc",null],null),null);$APP.ka("baredom.exports.x_table_cell.init",
|
|
16
|
+
set:function(b){return $APP.r(b)?this.setAttribute("sortable",""):this.removeAttribute("sortable")},enumerable:!0,configurable:!0});Object.defineProperty(a,"disabled",{get:function(){return this.hasAttribute("disabled")},set:function(b){return $APP.r(b)?this.setAttribute("disabled",""):this.removeAttribute("disabled")},enumerable:!0,configurable:!0});Object.defineProperty(a,"colSpan",{get:function(){return GJ(this.getAttribute("col-span"))},set:function(b){b=parseInt(b,10);return $APP.t(isNaN(b))&&
|
|
17
|
+
b>0?this.setAttribute("col-span",""+$APP.S.g(b)):this.removeAttribute("col-span")},enumerable:!0,configurable:!0});Object.defineProperty(a,"rowSpan",{get:function(){return GJ(this.getAttribute("row-span"))},set:function(b){b=parseInt(b,10);return $APP.t(isNaN(b))&&b>0?this.setAttribute("row-span",""+$APP.S.g(b)):this.removeAttribute("row-span")},enumerable:!0,configurable:!0});Object.defineProperty(a,"sortDirection",{get:function(){var b=this.getAttribute("sort-direction");return $APP.r(b)?b:"none"},
|
|
18
|
+
set:function(b){return $APP.r(b)?this.setAttribute("sort-direction",""+$APP.S.g(b)):this.removeAttribute("sort-direction")},enumerable:!0,configurable:!0})},oK=function(){var a=class extends HTMLElement{};a.observedAttributes=lK;a.prototype.connectedCallback=function(){QJ(this);jK(this);iK(this);fK(this);var b=$APP.l(this,"__xTableCellModel");var c=$APP.r(b)?b:eK(this);b=this.dispatchEvent;var d=CustomEvent,e=$APP.N(c);c=$APP.G(e,$APP.Z);var g=$APP.G(e,YJ),h=$APP.G(e,$APP.vl),k=$APP.G(e,$APP.Ch);
|
|
19
|
+
e=$APP.G(e,$APP.Qi);b.call(this,new d("x-table-cell-connected",{detail:$APP.nh(new $APP.P(null,5,[$APP.Z,c,YJ,g,mK,h,nK,k,$APP.Qi,e],null)),bubbles:!0,composed:!0,cancelable:!1}));return null};a.prototype.disconnectedCallback=function(){jK(this);this.dispatchEvent(new CustomEvent("x-table-cell-disconnected",{detail:{},bubbles:!0,composed:!0,cancelable:!1}));return null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.O(c,d)&&fK(this);return null};kK(a.prototype);return a},pK=function(){$APP.r(customElements.get("x-table-cell"))||
|
|
20
|
+
customElements.define("x-table-cell",oK());return null},OJ=new $APP.K(null,"sort-btn","sort-btn",1913954560),mK=new $APP.K(null,"colSpan","colSpan",872137394),NJ=new $APP.K(null,"cell","cell",764245084),XJ=new $APP.K(null,"valign","valign",1485197511),PJ=new $APP.K(null,"sort-icon-default","sort-icon-default",-596209230),WJ=new $APP.K(null,"col-span-raw","col-span-raw",1425293661),TJ=new $APP.K(null,"sort-direction-raw","sort-direction-raw",-1822100883),UJ=new $APP.K(null,"sticky-raw","sticky-raw",
|
|
21
|
+
1857578519),RJ=new $APP.K(null,"row-span-raw","row-span-raw",-1130003707),VJ=new $APP.K(null,"scope-raw","scope-raw",-773628648),IJ=new $APP.K(null,"sort-direction","sort-direction",-1635889628),YJ=new $APP.K(null,"scope","scope",-439358418),HJ=new $APP.K(null,"sortable?","sortable?",291547474),SJ=new $APP.K(null,"valign-raw","valign-raw",-1083375124),nK=new $APP.K(null,"rowSpan","rowSpan",826884002);var lK="type scope align valign col-span row-span truncate sticky sortable sort-direction disabled".split(" ");
|
|
22
|
+
$APP.Q([$APP.Qi,nK,$APP.ni,$APP.gj,XJ,$APP.Z,YJ,mK,$APP.Mk,new $APP.K(null,"sortable","sortable",2109633621),new $APP.K(null,"sortDirection","sortDirection",-45816999)],[new $APP.P(null,1,[$APP.Z,$APP.X],null),new $APP.P(null,1,[$APP.Z,$APP.V],null),new $APP.P(null,1,[$APP.Z,$APP.qj],null),new $APP.P(null,1,[$APP.Z,$APP.qj],null),new $APP.P(null,1,[$APP.Z,$APP.X],null),new $APP.P(null,1,[$APP.Z,$APP.X],null),new $APP.P(null,1,[$APP.Z,$APP.X],null),new $APP.P(null,1,[$APP.Z,$APP.V],null),new $APP.P(null,
|
|
23
|
+
1,[$APP.Z,$APP.X],null),new $APP.P(null,1,[$APP.Z,$APP.qj],null),new $APP.P(null,1,[$APP.Z,$APP.X],null)]);$APP.Sd(["x-table-cell-sort",new $APP.P(null,2,[$APP.U,new $APP.P(null,2,[$APP.Ni,$APP.X,$APP.zl,$APP.X],null),$APP.ll,!0],null),"x-table-cell-connected",new $APP.P(null,1,[$APP.U,new $APP.P(null,5,[$APP.Z,$APP.X,YJ,$APP.X,mK,$APP.V,nK,$APP.V,$APP.Qi,$APP.X],null)],null),"x-table-cell-disconnected",new $APP.P(null,1,[$APP.U,$APP.Td],null)]);
|
|
24
|
+
var bK=new $APP.R(null,new $APP.P(null,2,["data",null,"header",null],null),null),cK=new $APP.R(null,new $APP.P(null,4,["rowgroup",null,"col",null,"row",null,"colgroup",null],null),null),ZJ=new $APP.R(null,new $APP.P(null,3,["center",null,"start",null,"end",null],null),null),aK=new $APP.R(null,new $APP.P(null,3,["top",null,"middle",null,"bottom",null],null),null),dK=new $APP.R(null,new $APP.P(null,3,["none",null,"start",null,"end",null],null),null),$J=new $APP.R(null,new $APP.P(null,3,["none",null,
|
|
25
|
+
"desc",null,"asc",null],null),null);$APP.ka("baredom.exports.x_table_cell.init",pK);export const init=pK;
|
package/dist/x-table-row.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
3
|
-
b.appendChild(c);b.appendChild(d);a.__xTableRowRefs=new $APP.P(null,2,[$APP.bi,b,$APP.
|
|
4
|
-
"__xTableRowModel"),b)){
|
|
5
|
-
$APP.r(d)?a.setAttribute("data-selected",""):a.removeAttribute("data-selected");$APP.r(g)?a.setAttribute("data-interactive",""):a.removeAttribute("data-interactive");a.tabIndex=$APP.r(
|
|
6
|
-
$APP.gj,g],null)),bubbles:!0,composed:!0,cancelable:!0}))},
|
|
7
|
-
if($APP.r(b)){var c=$APP.l(b,"click");b=$APP.l(b,"keydown");$APP.r(c)&&a.removeEventListener("click",c);$APP.r(b)&&a.removeEventListener("keydown",b)}a.__xTableRowHandlers=null},
|
|
8
|
-
set:function(b){return $APP.r(b)?this.setAttribute("disabled",""):this.removeAttribute("disabled")},enumerable:!0,configurable:!0});Object.defineProperty(a,"interactive",{get:function(){return this.hasAttribute("interactive")},set:function(b){return $APP.r(b)?this.setAttribute("interactive",""):this.removeAttribute("interactive")},enumerable:!0,configurable:!0});Object.defineProperty(a,"rowIndex",{get:function(){return
|
|
9
|
-
b>0?this.setAttribute("row-index",""+$APP.S.g(b)):this.removeAttribute("row-index")},enumerable:!0,configurable:!0})},
|
|
10
|
-
{detail:$APP.nh(new $APP.P(null,4,[$APP.aj,$APP.r(e)?e:0,$APP.zj,c,$APP.gj,g,$APP.Gi,h],null)),bubbles:!0,composed:!0,cancelable:!1}));return null};a.prototype.disconnectedCallback=function(){
|
|
11
|
-
customElements.define("x-table-row",
|
|
2
|
+
var aw=function(a){return typeof a==="string"?(a=parseInt(a.trim(),10),$APP.t(isNaN(a))&&a>0?Math.floor(a):null):null},bw=function(a){var b=$APP.N(a);a=$APP.G(b,$APP.Nk);b=$APP.G(b,$APP.W);return $APP.r(a)?$APP.t(b):a},cw=function(a){if(!$APP.r($APP.l(a,"__xTableRowRefs"))){var b=a.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("slot");c.textContent=":host{display:grid;grid-template-columns:subgrid;grid-column:1 / -1;box-sizing:border-box;color-scheme:light dark;--x-table-row-bg:transparent;--x-table-row-hover-bg:rgba(0,0,0,0.03);--x-table-row-selected-bg:rgba(59,130,246,0.08);--x-table-row-selected-hover-bg:rgba(59,130,246,0.12);--x-table-row-focus-ring:var(--x-color-focus-ring,rgba(59,130,246,0.5));--x-table-row-transition-duration:var(--x-transition-duration,150ms);--x-table-row-disabled-opacity:0.45;--x-table-row-cursor:pointer;background:var(--x-table-row-bg);transition:background var(--x-table-row-transition-duration) ease;}@media (prefers-color-scheme:dark){:host{--x-table-row-hover-bg:rgba(255,255,255,0.04);--x-table-row-selected-bg:rgba(99,160,255,0.12);--x-table-row-selected-hover-bg:rgba(99,160,255,0.16);}}:host([data-selected]){background:var(--x-table-row-selected-bg);}:host([data-interactive]){cursor:var(--x-table-row-cursor);}:host([data-interactive]:hover){background:var(--x-table-row-hover-bg);}:host([data-interactive][data-selected]:hover){background:var(--x-table-row-selected-hover-bg);}:host([data-interactive]:focus){outline:none;}:host([data-interactive]:focus-visible){outline:2px solid var(--x-table-row-focus-ring);outline-offset:-2px;}:host([disabled]){opacity:var(--x-table-row-disabled-opacity);pointer-events:none;}slot{display:contents;}@media (prefers-reduced-motion:reduce){:host{transition:none !important;}}";
|
|
3
|
+
b.appendChild(c);b.appendChild(d);a.__xTableRowRefs=new $APP.P(null,2,[$APP.bi,b,$APP.Kk,d],null)}},fw=function(a){a=new $APP.P(null,4,[$APP.vi,a.hasAttribute("selected"),$APP.W,a.hasAttribute("disabled"),$APP.Nk,a.hasAttribute("interactive"),dw,a.getAttribute("row-index")],null);var b=$APP.N(a);a=$APP.G(b,$APP.vi);var c=$APP.G(b,$APP.W),d=$APP.G(b,$APP.Nk);b=$APP.G(b,dw);return new $APP.P(null,4,[$APP.vi,$APP.I(a),$APP.W,$APP.I(c),$APP.Nk,$APP.I(d),ew,aw(b)],null)},gw=function(a){var b=fw(a);if($APP.O($APP.l(a,
|
|
4
|
+
"__xTableRowModel"),b)){cw(a);var c=$APP.N(b),d=$APP.G(c,$APP.vi),e=$APP.G(c,$APP.W),g=$APP.G(c,$APP.Nk),h=$APP.G(c,ew);a.setAttribute("role","row");var k=$APP.N(c);var m=$APP.G(k,$APP.vi);k=$APP.G(k,$APP.Nk);m=$APP.r(m)?"true":$APP.r(k)?"false":null;$APP.r(m)?a.setAttribute("aria-selected",m):a.removeAttribute("aria-selected");$APP.r(e)?a.setAttribute("aria-disabled","true"):a.removeAttribute("aria-disabled");h!=null?a.setAttribute("aria-rowindex",""+$APP.S.g(h)):a.removeAttribute("aria-rowindex");
|
|
5
|
+
$APP.r(d)?a.setAttribute("data-selected",""):a.removeAttribute("data-selected");$APP.r(g)?a.setAttribute("data-interactive",""):a.removeAttribute("data-interactive");a.tabIndex=$APP.r(bw(c))?0:-1;a.__xTableRowModel=b}},hw=function(a){var b=$APP.l(a,"__xTableRowModel");var c=$APP.r(b)?b:fw(a);b=a.dispatchEvent;var d=CustomEvent,e=$APP.N(c);c=$APP.G(e,$APP.vi);var g=$APP.G(e,$APP.W);e=$APP.G(e,ew);b.call(a,new d("x-table-row-click",{detail:$APP.nh(new $APP.P(null,3,[$APP.aj,$APP.r(e)?e:0,$APP.zj,c,
|
|
6
|
+
$APP.gj,g],null)),bubbles:!0,composed:!0,cancelable:!0}))},iw=function(a){function b(d){var e=d.key;if($APP.D.i(e,"Enter")||$APP.D.i(e," "))e=$APP.l(a,"__xTableRowModel"),e=$APP.r(e)?e:fw(a),$APP.r(bw(e))&&(d.preventDefault(),hw(a));return null}function c(){var d=$APP.l(a,"__xTableRowModel");d=$APP.r(d)?d:fw(a);$APP.r(bw(d))&&hw(a);return null}a.addEventListener("click",c);a.addEventListener("keydown",b);$APP.n(a,"__xTableRowHandlers",{click:c,keydown:b})},jw=function(a){var b=$APP.l(a,"__xTableRowHandlers");
|
|
7
|
+
if($APP.r(b)){var c=$APP.l(b,"click");b=$APP.l(b,"keydown");$APP.r(c)&&a.removeEventListener("click",c);$APP.r(b)&&a.removeEventListener("keydown",b)}a.__xTableRowHandlers=null},kw=function(a){Object.defineProperty(a,"selected",{get:function(){return this.hasAttribute("selected")},set:function(b){return $APP.r(b)?this.setAttribute("selected",""):this.removeAttribute("selected")},enumerable:!0,configurable:!0});Object.defineProperty(a,"disabled",{get:function(){return this.hasAttribute("disabled")},
|
|
8
|
+
set:function(b){return $APP.r(b)?this.setAttribute("disabled",""):this.removeAttribute("disabled")},enumerable:!0,configurable:!0});Object.defineProperty(a,"interactive",{get:function(){return this.hasAttribute("interactive")},set:function(b){return $APP.r(b)?this.setAttribute("interactive",""):this.removeAttribute("interactive")},enumerable:!0,configurable:!0});Object.defineProperty(a,"rowIndex",{get:function(){return aw(this.getAttribute("row-index"))},set:function(b){b=parseInt(b,10);return $APP.t(isNaN(b))&&
|
|
9
|
+
b>0?this.setAttribute("row-index",""+$APP.S.g(b)):this.removeAttribute("row-index")},enumerable:!0,configurable:!0})},mw=function(){var a=class extends HTMLElement{};a.observedAttributes=lw;a.prototype.connectedCallback=function(){cw(this);jw(this);iw(this);gw(this);var b=$APP.l(this,"__xTableRowModel");var c=$APP.r(b)?b:fw(this);b=this.dispatchEvent;var d=CustomEvent,e=$APP.N(c);c=$APP.G(e,$APP.vi);var g=$APP.G(e,$APP.W),h=$APP.G(e,$APP.Nk);e=$APP.G(e,ew);b.call(this,new d("x-table-row-connected",
|
|
10
|
+
{detail:$APP.nh(new $APP.P(null,4,[$APP.aj,$APP.r(e)?e:0,$APP.zj,c,$APP.gj,g,$APP.Gi,h],null)),bubbles:!0,composed:!0,cancelable:!1}));return null};a.prototype.disconnectedCallback=function(){jw(this);document.dispatchEvent(new CustomEvent("x-table-row-disconnected",{detail:{},bubbles:!1,composed:!1,cancelable:!1}));return null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.O(c,d)&&gw(this);return null};kw(a.prototype);return a},nw=function(){$APP.r(customElements.get("x-table-row"))||
|
|
11
|
+
customElements.define("x-table-row",mw());return null},ew=new $APP.K(null,"row-index","row-index",-828710296),dw=new $APP.K(null,"row-index-raw","row-index-raw",1490649093);var lw=["selected","disabled","interactive","row-index"];$APP.Sd(["x-table-row-click",new $APP.P(null,2,[$APP.U,new $APP.P(null,3,[$APP.aj,$APP.V,$APP.zj,$APP.qj,$APP.gj,$APP.qj],null),$APP.ll,!0],null),"x-table-row-connected",new $APP.P(null,2,[$APP.U,new $APP.P(null,4,[$APP.aj,$APP.V,$APP.zj,$APP.qj,$APP.gj,$APP.qj,$APP.Gi,$APP.qj],null),$APP.ll,!1],null),"x-table-row-disconnected",new $APP.P(null,2,[$APP.U,$APP.Td,$APP.ll,!1],null)]);$APP.ka("baredom.exports.x_table_row.init",nw);export const init=nw;
|
package/dist/x-table.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
3
|
-
d.setAttribute("part","caption");d.setAttribute("hidden","");b.appendChild(c);b.appendChild(d);b.appendChild(e);a.__xTableRefs=new $APP.P(null,3,[$APP.bi,b,
|
|
4
|
-
$APP.N(a),c=$APP.G(b,
|
|
5
|
-
|
|
2
|
+
var Iz=function(a){return typeof a==="string"?(a=parseInt(a.trim(),10),$APP.t(isNaN(a))&&a>0?Math.floor(a):null):null},Kz=function(a){var b=$APP.l(a,"__xTableRefs");if($APP.r(b))return b;b=a.attachShadow({mode:"open"});var c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("slot");c.textContent=":host{display:grid;box-sizing:border-box;color-scheme:light dark;--x-table-border-color: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
|
+
d.setAttribute("part","caption");d.setAttribute("hidden","");b.appendChild(c);b.appendChild(d);b.appendChild(e);a.__xTableRefs=new $APP.P(null,3,[$APP.bi,b,Jz,d,$APP.Kk,e],null);return $APP.l(a,"__xTableRefs")},Wz=function(a){a=new $APP.P(null,8,[Lz,a.getAttribute("columns"),Mz,a.getAttribute("caption"),Nz,a.getAttribute("selectable"),$APP.ek,a.hasAttribute("striped"),Oz,a.hasAttribute("bordered"),Pz,a.hasAttribute("full-width"),Qz,a.hasAttribute("compact"),Rz,a.getAttribute("row-count")],null);var b=
|
|
4
|
+
$APP.N(a),c=$APP.G(b,Lz),d=$APP.G(b,Mz),e=$APP.G(b,Nz);a=$APP.G(b,$APP.ek);var g=$APP.G(b,Oz),h=$APP.G(b,Pz),k=$APP.G(b,Qz);b=$APP.G(b,Rz);a:{if(typeof c==="string"&&(c=c.trim(),$APP.O(c,""))){var m=parseInt(c,10);c=$APP.t(isNaN(m))&&m>0&&$APP.D.i(c,""+$APP.S.g(m))?"repeat("+$APP.S.g(m)+",1fr)":c;break a}c=null}d=$APP.r(d)?d:"";e=typeof e==="string"?e.trim().toLowerCase():null;e=$APP.J(Sz,e)?e:"none";return new $APP.P(null,8,[$APP.Tj,c,Tz,d,Uz,e,$APP.ek,$APP.I(a),Oz,$APP.I(g),Pz,$APP.I(h),Qz,$APP.I(k),
|
|
5
|
+
Vz,Iz(b)],null)},Xz=function(a){a=a.querySelectorAll("x-table-row");for(var b=a.length,c=0;;)if(c<b){var d=a[c];$APP.hd(c+1,2)===0?d.setAttribute("data-stripe","even"):d.removeAttribute("data-stripe");c+=1}else break},Yz=function(a){var b=Wz(a);if($APP.O($APP.l(a,"__xTableModel"),b)){b=$APP.N(b);var c=$APP.G(b,$APP.Tj),d=$APP.G(b,Tz),e=$APP.G(b,Uz),g=$APP.G(b,$APP.ek),h=$APP.G(b,Oz),k=$APP.G(b,Pz),m=$APP.G(b,Qz),p=$APP.G(b,Vz),q=Kz(a);q=$APP.N(q);q=$APP.G(q,Jz);a.style.gridTemplateColumns=$APP.r(c)?
|
|
6
6
|
c:"";a.setAttribute("role",$APP.D.i(e,"none")?"table":"grid");c=$APP.D.i(e,"multi")?"true":null;$APP.r(c)?a.setAttribute("aria-multiselectable",c):a.removeAttribute("aria-multiselectable");p!=null?a.setAttribute("aria-rowcount",""+$APP.S.g(p)):a.removeAttribute("aria-rowcount");$APP.O(d,"")?a.setAttribute("aria-label",d):a.removeAttribute("aria-label");$APP.O(d,"")?(q.textContent=d,q.removeAttribute("hidden")):(q.textContent="",q.setAttribute("hidden",""));$APP.r(g)?a.setAttribute("data-striped",
|
|
7
|
-
""):a.removeAttribute("data-striped");$APP.r(h)?a.setAttribute("data-bordered",""):a.removeAttribute("data-bordered");$APP.r(k)?a.setAttribute("data-full-width",""):a.removeAttribute("data-full-width");$APP.r(m)?a.setAttribute("data-compact",""):a.removeAttribute("data-compact");$APP.r(g)&&
|
|
8
|
-
var h=
|
|
9
|
-
"")}else $APP.D.i(h,"multi")&&($APP.r(g.hasAttribute("selected"))?g.removeAttribute("selected"):g.setAttribute("selected",""));return null}function d(e){var g=e.target;g=Array.from(g.parentElement.querySelectorAll("x-table-cell")).indexOf(g);var h=$APP.l(e.detail,"direction"),k=$APP.l(e.detail,"previousDirection");g>=0&&(e.stopPropagation(),e=$APP.nh(new $APP.P(null,3,[
|
|
10
|
-
return null}a.addEventListener("x-table-cell-sort",d);a.addEventListener("x-table-row-click",c);a.addEventListener("x-table-row-connected",b);$APP.n(a,"__xTableHandlers",{sort:d,"row-click":c,"row-conn":b})},
|
|
11
|
-
b)}a.__xTableHandlers=null},
|
|
7
|
+
""):a.removeAttribute("data-striped");$APP.r(h)?a.setAttribute("data-bordered",""):a.removeAttribute("data-bordered");$APP.r(k)?a.setAttribute("data-full-width",""):a.removeAttribute("data-full-width");$APP.r(m)?a.setAttribute("data-compact",""):a.removeAttribute("data-compact");$APP.r(g)&&Xz(a);a.__xTableModel=b}},aA=function(a){function b(){var e=$APP.l(a,"__xTableModel");e=$APP.r(e)?e:Wz(a);$APP.r($APP.ek.g(e))&&Xz(a);return null}function c(e){var g=$APP.l(a,"__xTableModel");g=$APP.r(g)?g:Wz(a);
|
|
8
|
+
var h=Uz.g(g);if($APP.O(h,"none"))if(g=e.target,e=$APP.l(e.detail,"rowIndex"),e=$APP.nh(new $APP.P(null,3,[$APP.aj,$APP.r(e)?e:0,$APP.zj,$APP.t(g.hasAttribute("selected")),Zz,h],null)),a.dispatchEvent(new CustomEvent("x-table-row-select",{detail:e,bubbles:!0,composed:!0,cancelable:!0})),$APP.D.i(h,"single")){e=g.hasAttribute("selected");h=a.querySelectorAll("x-table-row[selected]");for(var k=h.length,m=0;;)if(m<k)h[m].removeAttribute("selected"),m+=1;else break;$APP.r(e)||g.setAttribute("selected",
|
|
9
|
+
"")}else $APP.D.i(h,"multi")&&($APP.r(g.hasAttribute("selected"))?g.removeAttribute("selected"):g.setAttribute("selected",""));return null}function d(e){var g=e.target;g=Array.from(g.parentElement.querySelectorAll("x-table-cell")).indexOf(g);var h=$APP.l(e.detail,"direction"),k=$APP.l(e.detail,"previousDirection");g>=0&&(e.stopPropagation(),e=$APP.nh(new $APP.P(null,3,[$z,g,$APP.Ni,h,$APP.zl,k],null)),a.dispatchEvent(new CustomEvent("x-table-sort",{detail:e,bubbles:!0,composed:!0,cancelable:!0})));
|
|
10
|
+
return null}a.addEventListener("x-table-cell-sort",d);a.addEventListener("x-table-row-click",c);a.addEventListener("x-table-row-connected",b);$APP.n(a,"__xTableHandlers",{sort:d,"row-click":c,"row-conn":b})},bA=function(a){var b=$APP.l(a,"__xTableHandlers");if($APP.r(b)){var c=$APP.l(b,"sort"),d=$APP.l(b,"row-click");b=$APP.l(b,"row-conn");$APP.r(c)&&a.removeEventListener("x-table-cell-sort",c);$APP.r(d)&&a.removeEventListener("x-table-row-click",d);$APP.r(b)&&a.removeEventListener("x-table-row-connected",
|
|
11
|
+
b)}a.__xTableHandlers=null},cA=function(a){Object.defineProperty(a,"columns",{get:function(){var b=this.getAttribute("columns");return $APP.r(b)?b:""},set:function(b){return $APP.r(b)?this.setAttribute("columns",""+$APP.S.g(b)):this.removeAttribute("columns")},enumerable:!0,configurable:!0});Object.defineProperty(a,"caption",{get:function(){var b=this.getAttribute("caption");return $APP.r(b)?b:""},set:function(b){return $APP.r(b)?this.setAttribute("caption",""+$APP.S.g(b)):this.removeAttribute("caption")},
|
|
12
12
|
enumerable:!0,configurable:!0});Object.defineProperty(a,"selectable",{get:function(){var b=this.getAttribute("selectable");return $APP.r(b)?b:"none"},set:function(b){return $APP.r(b)?this.setAttribute("selectable",""+$APP.S.g(b)):this.removeAttribute("selectable")},enumerable:!0,configurable:!0});Object.defineProperty(a,"striped",{get:function(){return this.hasAttribute("striped")},set:function(b){return $APP.r(b)?this.setAttribute("striped",""):this.removeAttribute("striped")},enumerable:!0,configurable:!0});
|
|
13
13
|
Object.defineProperty(a,"bordered",{get:function(){return this.hasAttribute("bordered")},set:function(b){return $APP.r(b)?this.setAttribute("bordered",""):this.removeAttribute("bordered")},enumerable:!0,configurable:!0});Object.defineProperty(a,"compact",{get:function(){return this.hasAttribute("compact")},set:function(b){return $APP.r(b)?this.setAttribute("compact",""):this.removeAttribute("compact")},enumerable:!0,configurable:!0});Object.defineProperty(a,"fullWidth",{get:function(){return this.hasAttribute("full-width")},
|
|
14
|
-
set:function(b){return $APP.r(b)?this.setAttribute("full-width",""):this.removeAttribute("full-width")},enumerable:!0,configurable:!0});Object.defineProperty(a,"rowCount",{get:function(){return
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
set:function(b){return $APP.r(b)?this.setAttribute("full-width",""):this.removeAttribute("full-width")},enumerable:!0,configurable:!0});Object.defineProperty(a,"rowCount",{get:function(){return Iz(this.getAttribute("row-count"))},set:function(b){return b==null?this.removeAttribute("row-count"):this.setAttribute("row-count",""+$APP.S.g(Math.floor(b)))},enumerable:!0,configurable:!0})},eA=function(){var a=class extends HTMLElement{};a.observedAttributes=dA;a.prototype.connectedCallback=function(){Kz(this);
|
|
15
|
+
bA(this);aA(this);Yz(this);return null};a.prototype.disconnectedCallback=function(){bA(this);return null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.O(c,d)&&Yz(this);return null};cA(a.prototype);return a},fA=function(){$APP.r(customElements.get("x-table"))||customElements.define("x-table",eA());return null},Pz=new $APP.K(null,"full-width?","full-width?",1477288349),Rz=new $APP.K(null,"row-count-raw","row-count-raw",-1432781274),Nz=new $APP.K(null,"selectable-raw","selectable-raw",-1276314763),
|
|
16
|
+
$z=new $APP.K(null,"colIndex","colIndex",171239635),Vz=new $APP.K(null,"row-count","row-count",1060167988),Mz=new $APP.K(null,"caption-raw","caption-raw",-375935083),Zz=new $APP.K(null,"selectionMode","selectionMode",1264773367),Lz=new $APP.K(null,"columns-raw","columns-raw",-2093994046),Uz=new $APP.K(null,"selectable","selectable",370587038),Tz=new $APP.K(null,"caption","caption",-855383902),Oz=new $APP.K(null,"bordered?","bordered?",562358476),Jz=new $APP.K(null,"caption-div","caption-div",1485363333),
|
|
17
|
+
Qz=new $APP.K(null,"compact?","compact?",1216893298);var dA="columns caption selectable striped bordered full-width compact row-count".split(" ");$APP.Sd(["x-table-sort",new $APP.P(null,2,[$APP.U,new $APP.P(null,3,[$z,$APP.V,$APP.Ni,$APP.X,$APP.zl,$APP.X],null),$APP.ll,!0],null),"x-table-row-select",new $APP.P(null,2,[$APP.U,new $APP.P(null,3,[$APP.aj,$APP.V,$APP.zj,$APP.qj,Zz,$APP.X],null),$APP.ll,!0],null)]);var Sz=new $APP.R(null,new $APP.P(null,3,["none",null,"single",null,"multi",null],null),null);$APP.ka("baredom.exports.x_table.init",fA);export const init=fA;
|
package/dist/x-tabs.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
3
|
-
$APP.
|
|
4
|
-
b){var c=a.hasAttribute("selected");$APP.r($APP.r(b)?$APP.t(c):b)?a.setAttribute("selected",""):(b=$APP.t(b),$APP.r(b?c:b)&&a.removeAttribute("selected"))},
|
|
5
|
-
b));$APP.r($APP.r(c)?$APP.J(d,c):c)||(c=
|
|
6
|
-
b,$APP.Pc(d)?(b=$APP.yb(d),e=$APP.zb(d),d=b,k=$APP.
|
|
7
|
-
$APP.r(c)?b:a},
|
|
8
|
-
$APP.Be($APP.ge(
|
|
9
|
-
d=null;k=$APP.r(d)?$APP.D.i(k,"auto")?
|
|
10
|
-
|
|
11
|
-
d.setAttribute("part","base");d.className="base";d.appendChild(e);b.appendChild(c);b.appendChild(d);this.__x_tabs_root=b;this.__x_tabs_base=d;this.__x_tabs_slot=e;
|
|
12
|
-
b.disconnect():null};a.prototype.attributeChangedCallback=function(){return
|
|
2
|
+
var DC=function(a){var b=$APP.N(a);a=$APP.G(b,$APP.ri);var c=$APP.G(b,$APP.yk),d=$APP.G(b,AC),e=$APP.G(b,$APP.T);b=$APP.G(b,$APP.Al);c=$APP.J(BC,c)?c:"horizontal";d=$APP.J(CC,d)?d:"auto";return new $APP.P(null,5,[$APP.ri,a,$APP.yk,c,AC,d,$APP.T,e,$APP.Al,$APP.I(b)],null)},EC=function(a){return $APP.l(a,"__x_tabs_initialized")===!0},FC=function(a){return new $APP.P(null,5,[$APP.ri,a.getAttribute("value"),$APP.yk,a.getAttribute("orientation"),AC,a.getAttribute("activation"),$APP.T,a.getAttribute("label"),
|
|
3
|
+
$APP.Al,a.hasAttribute("loop")],null)},GC=function(a){return $APP.Be($APP.ge(function(b){return $APP.D.i("X-TAB",b.tagName)},$APP.wc(a.children)))},HC=function(a){return $APP.t(a.hasAttribute("disabled"))},IC=function(a){return a.getAttribute("value")},JC=function(a){return $APP.Wd(function(b){return HC(b)?b:null},a)},KC=function(a,b){var c=a.getAttribute("value");$APP.r($APP.r(b)?$APP.O(c,b):b)?a.setAttribute("value",b):(b=b==null||$APP.D.i(b,""),$APP.r(b?c:b)&&a.removeAttribute("value"))},LC=function(a,
|
|
4
|
+
b){var c=a.hasAttribute("selected");$APP.r($APP.r(b)?$APP.t(c):b)?a.setAttribute("selected",""):(b=$APP.t(b),$APP.r(b?c:b)&&a.removeAttribute("selected"))},MC=function(a,b){var c=a.getAttribute("tabindex");$APP.O(c,b)&&a.setAttribute("tabindex",b)},NC=function(a,b){a=a.getAttribute("controls");$APP.r($APP.r(a)?$APP.O(a,""):a)&&(a=document.getElementById(a),$APP.r(a)&&($APP.r(b)?a.removeAttribute("hidden"):a.setAttribute("hidden","")))},OC=function(a){var b=GC(a),c=a.getAttribute("value"),d=$APP.ag($APP.$d(IC,
|
|
5
|
+
b));$APP.r($APP.r(c)?$APP.J(d,c):c)||(c=JC(b),c=$APP.r(c)?IC(c):null);if($APP.r(c)){a:{d=$APP.u(b);for(var e=null,g=0,h=0;;)if(h<g){var k=e.G(null,h),m=$APP.D.i(IC(k),c);LC(k,m);m&&HC(k)?MC(k,"0"):MC(k,"-1");h+=1}else if(d=$APP.u(d))$APP.Pc(d)?(e=$APP.yb(d),d=$APP.zb(d),k=e,g=$APP.C(e),e=k):(k=$APP.v(d),e=$APP.D.i(IC(k),c),LC(k,e),e&&HC(k)?MC(k,"0"):MC(k,"-1"),d=$APP.z(d),e=null,g=0),h=0;else break a}a:for(b=$APP.u(b),d=null,g=e=0;;)if(g<e)k=d.G(null,g),NC(k,$APP.D.i(IC(k),c)),g+=1;else if(b=$APP.u(b))d=
|
|
6
|
+
b,$APP.Pc(d)?(b=$APP.yb(d),e=$APP.zb(d),d=b,k=$APP.C(b),b=e,e=k):(k=$APP.v(d),NC(k,$APP.D.i(IC(k),c)),b=$APP.z(d),d=null,e=0),g=0;else break a;KC(a,c)}return c},PC=function(a,b){var c=a.getAttribute("value");return $APP.r($APP.r(b)?$APP.O(c,b):b)?(KC(a,b),OC(a),a.dispatchEvent(new CustomEvent("value-change",{detail:{value:$APP.r(b)?b:""},bubbles:!0,composed:!0}))):null},QC=function(a,b,c){b=$APP.C(b)-1;var d=a+1;return d<=b?d:$APP.r(c)?0:a},RC=function(a,b,c){var d=a-1;b=$APP.C(b)-1;return d>=0?d:
|
|
7
|
+
$APP.r(c)?b:a},SC=function(a){var b=$APP.l(a,"__x_tabs_base"),c=DC(FC(a));$APP.r(b)&&(b.setAttribute("role","tablist"),b.setAttribute("aria-orientation",$APP.yk.g(c)),c=$APP.T.g(c),$APP.r($APP.r(c)?$APP.O(c,""):c)?b.setAttribute("aria-label",c):b.removeAttribute("aria-label"));return OC(a)},TC=function(a){var b=new MutationObserver(function(){return SC(a)});b.observe(a,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value","selected","disabled","controls"]});a.__x_tabs_observer=b},UC=function(a){function b(d){a:{var e=
|
|
8
|
+
$APP.Be($APP.ge(HC,GC(a))),g=DC(FC(a)),h=$APP.yk.g(g);var k=AC.g(g);g=$APP.Al.g(g);var m=d.key,p=e.indexOf(document.activeElement);if(p>=0&&(h=$APP.D.i(h,"horizontal")&&$APP.D.i(m,"ArrowRight")?QC(p,e,g):$APP.D.i(h,"horizontal")&&$APP.D.i(m,"ArrowLeft")?RC(p,e,g):$APP.D.i(h,"vertical")&&$APP.D.i(m,"ArrowDown")?QC(p,e,g):$APP.D.i(h,"vertical")&&$APP.D.i(m,"ArrowUp")?RC(p,e,g):$APP.D.i(m,"Home")?0:$APP.D.i(m,"End")?$APP.C(e)-1:null,h!=null)){d.preventDefault();d=$APP.Cc(e,h,null);$APP.r(d)?d.focus():
|
|
9
|
+
d=null;k=$APP.r(d)?$APP.D.i(k,"auto")?PC(a,IC(d)):null:null;break a}k=null}return k}function c(d){d.stopPropagation();return PC(a,d.detail.value)}a.addEventListener("tab-select",c);a.addEventListener("keydown",b);a.__x_tabs_on_tab_select=c;a.__x_tabs_on_keydown=b;TC(a)},VC=function(a){Object.defineProperty(a.prototype,"value",{get:function(){return this.getAttribute("value")},set:function(b){return $APP.r(b)?this.setAttribute("value",b):this.removeAttribute("value")},configurable:!0,enumerable:!0})},
|
|
10
|
+
XC=function(){var a=class extends HTMLElement{};a.observedAttributes=WC;a.prototype.connectedCallback=function(){if(EC(this)){UC(this);var b=SC(this)}else{if(!EC(this)){b=this.attachShadow({mode:"open"});var c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("slot");c.textContent=":host{display:block;color-scheme:light dark;}.base{display:flex;flex-direction:row;}.base[aria-orientation\x3d'vertical']{flex-direction:column;}::slotted(x-tab){margin-inline-end:var(--x-tabs-gap,8px);}:host([orientation\x3d'vertical']) ::slotted(x-tab){margin-inline-end:0;margin-block-end:var(--x-tabs-gap,8px);}";
|
|
11
|
+
d.setAttribute("part","base");d.className="base";d.appendChild(e);b.appendChild(c);b.appendChild(d);this.__x_tabs_root=b;this.__x_tabs_base=d;this.__x_tabs_slot=e;UC(this);this.__x_tabs_initialized=!0}SC(this);b=this}return b};a.prototype.disconnectedCallback=function(){var b=$APP.l(this,"__x_tabs_on_tab_select");$APP.r(b)&&this.removeEventListener("tab-select",b);b=$APP.l(this,"__x_tabs_on_keydown");$APP.r(b)&&this.removeEventListener("keydown",b);b=$APP.l(this,"__x_tabs_observer");return $APP.r(b)?
|
|
12
|
+
b.disconnect():null};a.prototype.attributeChangedCallback=function(){return EC(this)?SC(this):null};VC(a);return a},YC=function(){return $APP.r(customElements.get("x-tabs"))?null:customElements.define("x-tabs",XC())},AC=new $APP.K(null,"activation","activation",2128521072);var WC=["value","orientation","activation","label","loop"],BC=new $APP.R(null,new $APP.P(null,2,["vertical",null,"horizontal",null],null),null),CC=new $APP.R(null,new $APP.P(null,2,["auto",null,"manual",null],null),null);$APP.Sd(["value-change",new $APP.P(null,1,[$APP.U,new $APP.P(null,1,[$APP.ri,$APP.X],null)],null)]);$APP.ka("baredom.exports.x_tabs.init",YC);export const init=YC;
|
package/dist/x-text-area.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
3
|
-
c):b.setValidity({},"",c)},
|
|
4
|
-
a.hasAttribute("readonly"),a.getAttribute("value"),a.getAttribute("autocomplete"),a.getAttribute("minlength"),a.getAttribute("placeholder")]);var h=$APP.N(g),k=$APP.G(h,
|
|
5
|
-
m=$APP.r(m)?m:"";y=typeof y==="string"&&$APP.O(y,"")&&y!=null;w=$APP.r(w)?w:"";F=$APP.r(F)?F:"";k=
|
|
6
|
-
c.name=$APP.Si.g(g);c.placeholder=$APP.
|
|
7
|
-
$APP.r($APP.r(A)?
|
|
8
|
-
"__xTextAreaInternals");return $APP.r(d)
|
|
9
|
-
$APP.l(a,"__xTextAreaRefs");if($APP.r(b)){b=$APP.l(b,"textarea");var c=b.value;var d=a.getAttribute("name");d=$APP.r(d)?d:"";var e=$APP.l(a,"__xTextAreaInternals");$APP.r(e)&&(e.setFormValue(c)
|
|
10
|
-
a.__xTextAreaHandlers=null;return}}return null},
|
|
11
|
-
enumerable:!0,get:function(){var e=
|
|
12
|
-
b);var c=$APP.l(this,"__xTextAreaRefs");return $APP.r(c)?$APP.l(c,"textarea").value=b:null}})},
|
|
13
|
-
"minlength",null);b.connectedCallback=function(){if(!$APP.r($APP.l(this,"__xTextAreaRefs"))){var c=this.attachShadow({mode:"open"}),d=document.createElement("style"),e=document.createElement("div"),g=document.createElement("label"),h=document.createElement("div"),k=document.createElement("textarea"),m=document.createElement("span"),p=document.createElement("span");d.textContent=":host{display:block;color-scheme:light dark;--x-text-area-label-color:#374151;--x-text-area-label-font-size:0.875rem;--x-text-area-bg
|
|
2
|
+
var BV=function(a){return typeof a==="string"?(a=parseInt(a,10),$APP.t(isNaN(a))&&a>0?a:null):null},CV=function(a,b,c){return a.setAttribute(b,c)},DV=function(a,b,c){return $APP.r(c)?a.setAttribute(b,""):a.removeAttribute(b)},EV=function(a,b,c){var d=a.hasAttribute("error");var e=a.getAttribute("error");e=$APP.r(e)?e:"";a=a.hasAttribute("required");var g=c.value;return $APP.r(d)?b.setValidity({customError:!0},e,c):$APP.r($APP.r(a)?$APP.D.i(g,""):a)?b.setValidity({valueMissing:!0},"Please fill in this field.",
|
|
3
|
+
c):b.setValidity({},"",c)},NV=function(a){var b=$APP.l(a,"__xTextAreaRefs");if($APP.r(b)){var c=$APP.l(b,"textarea"),d=$APP.l(b,"label"),e=$APP.l(b,"hint");b=$APP.l(b,"error");var g=$APP.Q([FV,$APP.Oh,$APP.Fk,$APP.ci,$APP.ti,GV,$APP.Sk,HV,$APP.sh,$APP.cj,$APP.wl,$APP.Nh,IV,$APP.ii],[a.getAttribute("resize"),a.getAttribute("label"),a.getAttribute("name"),a.getAttribute("error"),a.getAttribute("hint"),a.getAttribute("rows"),a.hasAttribute("disabled"),a.getAttribute("maxlength"),a.hasAttribute("required"),
|
|
4
|
+
a.hasAttribute("readonly"),a.getAttribute("value"),a.getAttribute("autocomplete"),a.getAttribute("minlength"),a.getAttribute("placeholder")]);var h=$APP.N(g),k=$APP.G(h,IV),m=$APP.G(h,$APP.ii),p=$APP.G(h,FV),q=$APP.G(h,$APP.Oh),w=$APP.G(h,$APP.Fk),x=$APP.G(h,$APP.ci),y=$APP.G(h,$APP.ti),A=$APP.G(h,GV);g=$APP.G(h,$APP.Sk);var B=$APP.G(h,HV),E=$APP.G(h,$APP.sh),H=$APP.G(h,$APP.cj),F=$APP.G(h,$APP.wl);h=$APP.G(h,$APP.Nh);var M=$APP.r(x)?x:"",Y=$APP.r(y)?y:"",ea=$APP.r(q)?q:"";E=$APP.I(E);H=$APP.I(H);
|
|
5
|
+
m=$APP.r(m)?m:"";y=typeof y==="string"&&$APP.O(y,"")&&y!=null;w=$APP.r(w)?w:"";F=$APP.r(F)?F:"";k=BV(k);q=typeof q==="string"&&$APP.O(q,"")&&q!=null;x=typeof x==="string"&&$APP.O(x,"")&&x!=null;p=typeof p==="string"&&$APP.J(JV,p)?p:"vertical";A=BV(A);g=$APP.Q([$APP.Lh,$APP.Tl,$APP.sl,$APP.Sh,$APP.Si,$APP.ri,KV,$APP.Ik,$APP.dk,LV,$APP.al,MV,$APP.Ji,$APP.T,$APP.Zh,$APP.cl,$APP.W],[E,H,m,y,w,F,k,q,x,p,Y,BV(B),$APP.r(A)?A:3,ea,M,$APP.r(h)?h:"",$APP.I(g)]);B=$APP.dk.g(g);A=$APP.Sh.g(g);h=$APP.Ik.g(g);
|
|
6
|
+
c.name=$APP.Si.g(g);c.placeholder=$APP.sl.g(g);c.disabled=$APP.W.g(g);c.readOnly=$APP.Tl.g(g);c.required=$APP.Lh.g(g);c.rows=$APP.Ji.g(g);c.autocomplete=$APP.cl.g(g);M=MV.g(g);$APP.r(M)?CV(c,"maxlength",""+$APP.S.g(M)):c.removeAttribute("maxlength");M=KV.g(g);$APP.r(M)?CV(c,"minlength",""+$APP.S.g(M)):c.removeAttribute("minlength");a.style.setProperty("--x-text-area-resize",LV.g(g));CV(c,"aria-required",$APP.r($APP.Lh.g(g))?"true":"false");c.setAttribute("aria-invalid",$APP.r(B)?"true":"false");M=
|
|
7
|
+
$APP.r($APP.r(A)?B:A)?"hint error":$APP.r(A)?"hint":$APP.r(B)?"error":null;$APP.r(M)?c.setAttribute("aria-describedby",M):c.removeAttribute("aria-describedby");d.textContent=$APP.T.g(g);$APP.r(h)?d.classList.remove("label-hidden"):d.classList.add("label-hidden");e.textContent=$APP.al.g(g);$APP.r(A)?e.classList.remove("hint-hidden"):e.classList.add("hint-hidden");b.textContent=$APP.Zh.g(g);$APP.r(B)?b.classList.remove("error-hidden"):b.classList.add("error-hidden");DV(a,"data-invalid",B);d=$APP.l(a,
|
|
8
|
+
"__xTextAreaInternals");return $APP.r(d)?EV(a,d,c):null}return null},OV=function(a,b,c){return a.dispatchEvent(new CustomEvent(b,{detail:c,bubbles:!0,composed:!0,cancelable:!1}))},PV=function(a){return function(){var b=$APP.l(a,"__xTextAreaRefs");if($APP.r(b)){b=$APP.l(b,"textarea");var c=b.value;var d=a.getAttribute("name");d=$APP.r(d)?d:"";var e=$APP.l(a,"__xTextAreaInternals");$APP.r(e)&&(e.setFormValue(c),EV(a,e,b));return OV(a,"x-text-area-input",{name:d,value:c})}return null}},QV=function(a){return function(){var b=
|
|
9
|
+
$APP.l(a,"__xTextAreaRefs");if($APP.r(b)){b=$APP.l(b,"textarea");var c=b.value;var d=a.getAttribute("name");d=$APP.r(d)?d:"";var e=$APP.l(a,"__xTextAreaInternals");$APP.r(e)&&(e.setFormValue(c),EV(a,e,b));return OV(a,"x-text-area-change",{name:d,value:c})}return null}},RV=function(a){var b=$APP.l(a,"__xTextAreaRefs");if($APP.r(b)){var c=$APP.l(a,"__xTextAreaHandlers");if($APP.r(c)){b=$APP.l(b,"textarea");b.removeEventListener("input",$APP.l(c,"input"));b.removeEventListener("change",$APP.l(c,"change"));
|
|
10
|
+
a.__xTextAreaHandlers=null;return}}return null},SV=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){var d=this.getAttribute(c);return $APP.r(d)?d:""},set:function(d){return d!=null&&$APP.O(d)?CV(this,c,""+$APP.S.g(d)):this.removeAttribute(c)}})},TV=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){return this.hasAttribute(c)},set:function(d){return DV(this,c,$APP.I(d))}})},UV=function(a,b,c,d){Object.defineProperty(a,b,{configurable:!0,
|
|
11
|
+
enumerable:!0,get:function(){var e=BV(this.getAttribute(c));return $APP.r(e)?e:d},set:function(e){return e!=null&&$APP.O(e)&&e>0?CV(this,c,""+$APP.S.g(Math.floor(e))):this.removeAttribute(c)}})},VV=function(a){Object.defineProperty(a,"value",{configurable:!0,enumerable:!0,get:function(){var b=$APP.l(this,"__xTextAreaRefs");if($APP.r(b))return $APP.l(b,"textarea").value;b=this.getAttribute("value");return $APP.r(b)?b:""},set:function(b){b=b!=null&&$APP.O(b)?""+$APP.S.g(b):"";this.setAttribute("value",
|
|
12
|
+
b);var c=$APP.l(this,"__xTextAreaRefs");return $APP.r(c)?$APP.l(c,"textarea").value=b:null}})},XV=function(){var a=class extends HTMLElement{},b=a.prototype;a.formAssociated=!0;Object.defineProperty(a,"observedAttributes",{get:function(){return WV}});VV(b);SV(b,"name","name");SV(b,"placeholder","placeholder");SV(b,"autocomplete","autocomplete");TV(b,"disabled","disabled");TV(b,"readOnly","readonly");TV(b,"required","required");UV(b,"rows","rows",3);UV(b,"maxLength","maxlength",null);UV(b,"minLength",
|
|
13
|
+
"minlength",null);b.connectedCallback=function(){if(!$APP.r($APP.l(this,"__xTextAreaRefs"))){var c=this.attachShadow({mode:"open"}),d=document.createElement("style"),e=document.createElement("div"),g=document.createElement("label"),h=document.createElement("div"),k=document.createElement("textarea"),m=document.createElement("span"),p=document.createElement("span");d.textContent=":host{display:block;color-scheme:light dark;--x-text-area-label-color:#374151;--x-text-area-label-font-size: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;}}";
|
|
14
14
|
e.setAttribute("part","field");g.setAttribute("part","label");g.setAttribute("id","label");g.setAttribute("for","textarea");h.setAttribute("part","textarea-wrapper");k.setAttribute("part","textarea");k.setAttribute("id","textarea");k.setAttribute("aria-labelledby","label");m.setAttribute("part","hint");m.setAttribute("id","hint");m.setAttribute("aria-live","polite");p.setAttribute("part","error");p.setAttribute("id","error");p.setAttribute("role","alert");p.setAttribute("aria-live","assertive");h.appendChild(k);
|
|
15
|
-
e.appendChild(g);e.appendChild(h);e.appendChild(m);e.appendChild(p);c.appendChild(d);c.appendChild(e);this.__xTextAreaRefs={field:e,label:g,textarea:k,hint:m,error:p};$APP.r(this.attachInternals)&&(this.__xTextAreaInternals=this.attachInternals())}
|
|
16
|
-
$APP.l(this,"__xTextAreaRefs");$APP.r(c)&&(c=$APP.l(c,"textarea"),d=
|
|
17
|
-
"disabled",$APP.I(c));return
|
|
18
|
-
|
|
19
|
-
$APP.Q([$APP.gj,$APP.Si,$APP.
|
|
20
|
-
null),new $APP.P(null,2,[$APP.Z,$APP.V,$APP.
|
|
15
|
+
e.appendChild(g);e.appendChild(h);e.appendChild(m);e.appendChild(p);c.appendChild(d);c.appendChild(e);this.__xTextAreaRefs={field:e,label:g,textarea:k,hint:m,error:p};$APP.r(this.attachInternals)&&(this.__xTextAreaInternals=this.attachInternals())}RV(this);c=$APP.l(this,"__xTextAreaRefs");$APP.r(c)&&(c=$APP.l(c,"textarea"),d=this.getAttribute("value"),$APP.r(d)&&(c.value=d));c=$APP.l(this,"__xTextAreaInternals");$APP.r(c)&&(d=c.setFormValue,e=this.getAttribute("value"),d.call(c,$APP.r(e)?e:""));c=
|
|
16
|
+
$APP.l(this,"__xTextAreaRefs");$APP.r(c)&&(c=$APP.l(c,"textarea"),d=PV(this),e=QV(this),c.addEventListener("input",d),c.addEventListener("change",e),this.__xTextAreaHandlers={input:d,change:e});return NV(this)};b.disconnectedCallback=function(){return RV(this)};b.attributeChangedCallback=function(c,d,e){$APP.D.i(c,"value")&&(c=$APP.l(this,"__xTextAreaRefs"),$APP.r(c)&&(c=$APP.l(c,"textarea"),$APP.O(c.value,e)&&(c.value=$APP.r(e)?e:"")));return NV(this)};b.formDisabledCallback=function(c){DV(this,
|
|
17
|
+
"disabled",$APP.I(c));return NV(this)};b.formResetCallback=function(){this.removeAttribute("value");var c=$APP.l(this,"__xTextAreaRefs");$APP.r(c)&&($APP.l(c,"textarea").value="");c=$APP.l(this,"__xTextAreaInternals");$APP.r(c)&&c.setFormValue("");return NV(this)};return a},YV=function(){return $APP.r(customElements.get("x-text-area"))?null:customElements.define("x-text-area",XV())},KV=new $APP.K(null,"minlength","minlength",259053545),IV=new $APP.K(null,"minlength-raw","minlength-raw",-1245403779),
|
|
18
|
+
HV=new $APP.K(null,"maxlength-raw","maxlength-raw",-886656470),MV=new $APP.K(null,"maxlength","maxlength",-1163911985),FV=new $APP.K(null,"resize-raw","resize-raw",-287517888),GV=new $APP.K(null,"rows-raw","rows-raw",-1828357145),LV=new $APP.K(null,"resize","resize",297367086);var WV="label name value placeholder hint error disabled readonly required rows maxlength minlength autocomplete resize".split(" "),JV=new $APP.R(null,new $APP.P(null,4,["none",null,"vertical",null,"both",null,"horizontal",null],null),null);
|
|
19
|
+
$APP.Q([$APP.gj,$APP.Si,$APP.ri,new $APP.K(null,"minLength","minLength",-1538722770),$APP.Ji,$APP.nl,new $APP.K(null,"maxLength","maxLength",-1633020073),$APP.cl,$APP.Kj],[new $APP.P(null,2,[$APP.Z,$APP.qj,$APP.Pj,"disabled"],null),new $APP.P(null,2,[$APP.Z,$APP.X,$APP.Pj,"name"],null),new $APP.P(null,2,[$APP.Z,$APP.X,$APP.Pj,"value"],null),new $APP.P(null,2,[$APP.Z,$APP.V,$APP.Pj,"minlength"],null),new $APP.P(null,2,[$APP.Z,$APP.V,$APP.Pj,"rows"],null),new $APP.P(null,2,[$APP.Z,$APP.qj,$APP.Pj,"readonly"],
|
|
20
|
+
null),new $APP.P(null,2,[$APP.Z,$APP.V,$APP.Pj,"maxlength"],null),new $APP.P(null,2,[$APP.Z,$APP.X,$APP.Pj,"autocomplete"],null),new $APP.P(null,2,[$APP.Z,$APP.qj,$APP.Pj,"required"],null)]);$APP.ka("baredom.exports.x_text_area.init",YV);export const init=YV;
|
package/dist/x-theme.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
+
var kA=function(a,b){var c=gA.g(hA),d=iA.g(hA),e=b.light,g=b.dark;b=$APP.Vf($APP.wc([c,$APP.r(e)?$APP.af.i($APP.Td,function(){return function m(k){return new $APP.ud(null,function(){for(;;){var p=$APP.u(k);if(p){if($APP.Pc(p)){var q=$APP.yb(p),w=$APP.C(q),x=$APP.xd(w);a:{for(var y=0;;)if(y<w){var A=$APP.Ac(q,y);x.add(new $APP.ve(null,2,5,$APP.we,[A,$APP.l(e,A)],null));y+=1}else{q=!0;break a}q=void 0}return q?$APP.Ad(x.ba(),m($APP.zb(p))):$APP.Ad(x.ba(),null)}x=$APP.v(p);return $APP.rd(new $APP.ve(null,
|
|
3
|
+
2,5,$APP.we,[x,$APP.l(e,x)],null),m($APP.Zb(p)))}return null}},null)}(Object.keys(e))}()):null]));d=$APP.Vf($APP.wc([d,$APP.r(g)?$APP.af.i($APP.Td,function(){return function m(k){return new $APP.ud(null,function(){for(;;){var p=$APP.u(k);if(p){if($APP.Pc(p)){var q=$APP.yb(p),w=$APP.C(q),x=$APP.xd(w);a:{for(var y=0;;)if(y<w){var A=$APP.Ac(q,y);x.add(new $APP.ve(null,2,5,$APP.we,[A,$APP.l(g,A)],null));y+=1}else{q=!0;break a}q=void 0}return q?$APP.Ad(x.ba(),m($APP.zb(p))):$APP.Ad(x.ba(),null)}x=$APP.v(p);
|
|
4
|
+
return $APP.rd(new $APP.ve(null,2,5,$APP.we,[x,$APP.l(g,x)],null),m($APP.Zb(p)))}return null}},null)}(Object.keys(g))}()):null]));return $APP.n(jA,a,new $APP.P(null,2,[gA,b,iA,d],null))},lA=function(a){var b=[];a=$APP.u(a);for(var c=null,d=0,e=0;;)if(e<d){var g=c.G(null,e),h=$APP.Cc(g,0,null);g=$APP.Cc(g,1,null);b.push(""+$APP.S.g(h)+":"+$APP.S.g(g)+";");e+=1}else if(a=$APP.u(a))$APP.Pc(a)?(d=$APP.yb(a),a=$APP.zb(a),c=d,d=$APP.C(d)):(d=$APP.v(a),c=$APP.Cc(d,0,null),d=$APP.Cc(d,1,null),b.push(""+$APP.S.g(c)+
|
|
5
|
+
":"+$APP.S.g(d)+";"),a=$APP.z(a),c=null,d=0),e=0;else break;return b.join("")},oA=function(a){a=typeof a!=="string"||!$APP.J(mA,a)&&$APP.l(jA,a)==null?"default":a;var b=$APP.l(jA,a);$APP.r(b)||(a=$APP.G(nA,a),b=$APP.r(a)?a:hA);a=gA.g(b);b=iA.g(b);return":host{display:contents;"+$APP.S.g(lA(a))+"}@media(prefers-color-scheme:dark){:host{"+$APP.S.g(lA(b))+"}}"},pA=function(a){Object.defineProperty(a,"preset",{get:function(){return this.getAttribute("preset")},set:function(b){return b!=null?this.setAttribute("preset",
|
|
6
|
+
""+$APP.S.g(b)):this.removeAttribute("preset")},enumerable:!0,configurable:!0})},rA=function(){var a=class extends HTMLElement{};a.observedAttributes=qA;a.prototype.connectedCallback=function(){if($APP.r($APP.l(this,"__xThemeRefs")))var b=null;else{b=this.attachShadow({mode:"open"});var c=document.createElement("style"),d=document.createElement("slot");c.textContent=oA(this.getAttribute("preset"));b.appendChild(c);b.appendChild(d);this.__xThemeRefs={style:c};b=void 0}return b};a.prototype.disconnectedCallback=
|
|
7
|
+
function(){return null};a.prototype.attributeChangedCallback=function(){var b=$APP.l(this,"__xThemeRefs");return $APP.r(b)?b.style.textContent=oA(this.getAttribute("preset")):null};pA(a.prototype);return a},sA=function(a,b){return kA(a,b)},tA=function(){return $APP.r(customElements.get("x-theme"))?null:customElements.define("x-theme",rA())},gA=new $APP.K(null,"light","light",1918998747),iA=new $APP.K(null,"dark","dark",1818973999);var qA=["preset"],uA=$APP.Sd("--x-font-family;system-ui,-apple-system,sans-serif;--x-font-family-mono;ui-monospace,'SF Mono',monospace;--x-font-size-sm;0.875rem;--x-font-size-base;1rem".split(";")),vA=$APP.Sd("--x-radius-sm 0.375rem --x-radius-md 0.75rem --x-radius-lg 1rem --x-radius-full 9999px".split(" ")),wA=$APP.Sd(["--x-transition-duration","140ms","--x-transition-easing","cubic-bezier(0.2,0,0,1)"]),xA=$APP.Sd("--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(";")),
|
|
8
|
+
yA=$APP.Sd("--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(";")),hA=new $APP.P(null,2,[gA,$APP.Vf($APP.wc([uA,vA,wA,xA,$APP.Q("--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(" "),
|
|
9
|
+
"#ffffff #64748b #16a34a #64748b #d97706 #1e40af #cbd5e1 #f8fafc #dc2626 #334155 #475569 #475569 #f1f5f9 #60a5fa #2563eb #f8fafc #0f172a #64748b #1d4ed8 #94a3b8".split(" "))])),iA,$APP.Vf($APP.wc([yA,$APP.Q("--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
|
+
"#111827 #94a3b8 #22c55e #94a3b8 #f59e0b #1d4ed8 #374151 #1f2937 #ef4444 #475569 #64748b #64748b #273449 #93c5fd #3b82f6 #0f172a #f1f5f9 #94a3b8 #2563eb #64748b".split(" "))]))],null),zA=new $APP.P(null,2,[gA,$APP.Vf($APP.wc([uA,vA,wA,xA,$APP.Q("--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
|
+
"#ffffff #5f7a7a #059669 #2dd4bf #d97706 #155e75 #99f6e4 #f0fdfa #e11d48 #115e59 #0f766e #14b8a6 #ccfbf1 #22d3ee #0891b2 #f0fdfa #134e4a #0d9488 #0e7490 #5eead4".split(" "))])),iA,$APP.Vf($APP.wc([yA,$APP.Q("--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
|
+
"#0c1a1f #5eead4 #34d399 #5eead4 #fbbf24 #0e7490 #164e63 #133e4a #fb7185 #0f766e #0d9488 #2dd4bf #164e5e #67e8f9 #06b6d4 #061216 #ecfdf5 #14b8a6 #0891b2 #2dd4bf".split(" "))]))],null),AA=new $APP.P(null,2,[gA,$APP.Vf($APP.wc([uA,vA,wA,xA,$APP.Q("--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
|
+
"#fffbeb #65753a #15803d #84cc16 #ca8a04 #14532d #d9d2b0 #fef9c3 #dc2626 #3f6212 #4d7c0f #65a30d #fef3c7 #4ade80 #15803d #fefce8 #1a2e05 #65a30d #166534 #a3e635".split(" "))])),iA,$APP.Vf($APP.wc([yA,$APP.Q("--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
|
+
"#1a1f12 #86efac #4ade80 #bef264 #fbbf24 #15803d #3a4a24 #2a3318 #f87171 #4d7c0f #65a30d #a3e635 #354020 #86efac #22c55e #111408 #f0fdf4 #84cc16 #16a34a #a3e635".split(" "))]))],null),BA=new $APP.P(null,2,[gA,$APP.Vf($APP.wc([uA,vA,wA,xA,$APP.Q("--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
|
+
"#ffffff #9a7b6b #16a34a #f97316 #ca8a04 #9a3412 #fed7aa #fff7ed #be123c #9f1239 #be123c #ea580c #ffedd5 #fb923c #ea580c #fffbf5 #431407 #e11d48 #c2410c #fb923c".split(" "))])),iA,$APP.Vf($APP.wc([yA,$APP.Q("--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
|
+
"#1c1210 #fdba74 #4ade80 #fb923c #fbbf24 #c2410c #4a2d1f #2a1c17 #fb7185 #e11d48 #f43f5e #f97316 #3d261d #fdba74 #f97316 #140d0a #fff7ed #fb7185 #ea580c #fdba74".split(" "))]))],null),CA=new $APP.P(null,2,[gA,$APP.Vf($APP.wc([uA,wA,$APP.Q("--x-shadow-lg --x-color-surface --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-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".split(" "),
|
|
17
|
+
"8px 8px 0 #000000;#ffffff;#555555;#00cc66;0;3px 3px 0 #000000;#333333;#ffcc00;#333333;#000000;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".split(";"))])),iA,$APP.Q("--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(" "),
|
|
18
|
+
"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),DA=new $APP.P(null,2,[gA,$APP.Vf($APP.wc([uA,vA,wA,$APP.Q("--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
|
+
"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;#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(";"))])),iA,$APP.Q("--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(" "),
|
|
20
|
+
"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),EA=new $APP.P(null,2,[gA,$APP.Vf($APP.wc([vA,wA,$APP.Q("--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-font-family-mono --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-font-family --x-shadow-md --x-color-primary-hover --x-color-tertiary".split(" "),
|
|
21
|
+
"0 10px 25px rgba(0,0,0,0.10),0 4px 10px rgba(0,0,0,0.06);#fafafa;#71717a;#22c55e;0 1px 2px rgba(0,0,0,0.06);#52525b;#eab308;#3f3f46;#d4d4d8;#f4f4f5;#ef4444;'JetBrains Mono',ui-monospace,monospace;#24c00a;#2ee00f;#3f3f46;#e4e4e7;#39ff14;#18181b;#ffffff;#18181b;#39ff14;'JetBrains Mono',ui-monospace,monospace;0 4px 10px rgba(0,0,0,0.08),0 2px 4px rgba(0,0,0,0.04);#27272a;#71717a".split(";"))])),iA,$APP.Q("--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(" "),
|
|
22
|
+
"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),FA=new $APP.P(null,2,[gA,$APP.Vf($APP.wc([uA,vA,wA,xA,$APP.Q("--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(" "),
|
|
23
|
+
"#fefdfb #8b7355 #4d7c0f #c49250 #ca8a04 #78350f #d6c4a8 #fdf8f0 #dc2626 #713f12 #854d0e #b08040 #f5ebe0 #d97706 #b45309 #fdf8f0 #3b2417 #a16207 #92400e #d6a56a".split(" "))])),iA,$APP.Vf($APP.wc([yA,$APP.Q("--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
|
+
"#1e1c18 #9c9488 #84cc16 #8e847c #fbbf24 #8e4a38 #44403a #2a2822 #f87171 #8a7052 #a18360 #7a7068 #38352e #d4a574 #c2785a #14130f #e8e0d4 #b8976e #a8604a #7a7068".split(" "))]))],null),nA=new $APP.P(null,8,["default",hA,"ocean",zA,"forest",AA,"sunset",BA,"neo-brutalist",CA,"aurora",DA,"mono-ai",EA,"warm-mineral",FA],null),jA=Object.create(null),mA=new $APP.R(null,new $APP.P(null,8,["warm-mineral",null,"mono-ai",null,"ocean",null,"aurora",null,"sunset",null,"forest",null,"neo-brutalist",null,"default",
|
|
25
|
+
null],null),null);$APP.ka("baredom.exports.x_theme.registerPreset",sA);$APP.ka("baredom.exports.x_theme.init",tA);export const init=tA;export const registerPreset=sA;
|