@vanelsas/baredom 2.4.1 → 2.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +25 -0
- package/README.md +63 -270
- package/custom-elements.json +7373 -0
- package/dist/baredom.d.ts +97 -0
- package/dist/base.js +74 -74
- package/dist/integrity.json +93 -93
- package/dist/x-alert.d.ts +43 -0
- package/dist/x-alert.js +17 -17
- package/dist/x-avatar-group.d.ts +18 -0
- package/dist/x-avatar-group.js +10 -10
- package/dist/x-avatar.d.ts +21 -0
- package/dist/x-avatar.js +13 -13
- package/dist/x-badge.d.ts +19 -0
- package/dist/x-badge.js +11 -11
- package/dist/x-bento-grid.d.ts +12 -0
- package/dist/x-bento-grid.js +5 -5
- package/dist/x-bento-item.d.ts +12 -0
- package/dist/x-bento-item.js +4 -4
- package/dist/x-breadcrumbs.d.ts +20 -0
- package/dist/x-breadcrumbs.js +14 -14
- package/dist/x-button.d.ts +45 -0
- package/dist/x-button.js +15 -15
- package/dist/x-cancel-dialogue.d.ts +50 -0
- package/dist/x-cancel-dialogue.js +12 -12
- package/dist/x-card.d.ts +39 -0
- package/dist/x-card.js +7 -7
- package/dist/x-carousel.d.ts +48 -0
- package/dist/x-carousel.js +28 -28
- package/dist/x-chart.d.ts +23 -0
- package/dist/x-chart.js +46 -46
- package/dist/x-checkbox.d.ts +45 -0
- package/dist/x-checkbox.js +11 -11
- package/dist/x-chip.d.ts +41 -0
- package/dist/x-chip.js +8 -8
- package/dist/x-collapse.d.ts +42 -0
- package/dist/x-collapse.js +10 -10
- package/dist/x-color-picker.d.ts +47 -0
- package/dist/x-color-picker.js +41 -41
- package/dist/x-combobox.d.ts +47 -0
- package/dist/x-combobox.js +25 -25
- package/dist/x-command-palette.d.ts +46 -0
- package/dist/x-command-palette.js +24 -24
- package/dist/x-container.d.ts +14 -0
- package/dist/x-container.js +6 -6
- package/dist/x-context-menu.d.ts +17 -0
- package/dist/x-context-menu.js +18 -18
- package/dist/x-copy.d.ts +51 -0
- package/dist/x-copy.js +20 -20
- package/dist/x-currency-field.d.ts +52 -0
- package/dist/x-currency-field.js +23 -21
- package/dist/x-date-picker.d.ts +20 -0
- package/dist/x-date-picker.js +37 -37
- package/dist/x-divider.d.ts +20 -0
- package/dist/x-divider.js +8 -8
- package/dist/x-drawer.d.ts +44 -0
- package/dist/x-drawer.js +11 -11
- package/dist/x-dropdown.d.ts +42 -0
- package/dist/x-dropdown.js +9 -9
- package/dist/x-fieldset.d.ts +14 -0
- package/dist/x-fieldset.js +5 -5
- package/dist/x-file-download.d.ts +40 -0
- package/dist/x-file-download.js +7 -7
- package/dist/x-file-upload.d.ts +46 -0
- package/dist/x-file-upload.js +22 -22
- package/dist/x-form-field.d.ts +47 -0
- package/dist/x-form-field.js +15 -15
- package/dist/x-form.d.ts +41 -0
- package/dist/x-form.js +9 -9
- package/dist/x-gaussian-blur.d.ts +20 -0
- package/dist/x-gaussian-blur.js +16 -16
- package/dist/x-grid.d.ts +12 -0
- package/dist/x-grid.js +6 -6
- package/dist/x-icon.d.ts +15 -0
- package/dist/x-icon.js +7 -7
- package/dist/x-image.d.ts +48 -0
- package/dist/x-image.js +18 -18
- package/dist/x-kinetic-font.d.ts +48 -0
- package/dist/x-kinetic-font.js +28 -28
- package/dist/x-kinetic-typography.d.ts +27 -0
- package/dist/x-kinetic-typography.js +37 -37
- package/dist/x-liquid-dock.d.ts +47 -0
- package/dist/x-liquid-dock.js +35 -35
- package/dist/x-liquid-fill.d.ts +46 -0
- package/dist/x-liquid-fill.js +40 -40
- package/dist/x-liquid-glass.d.ts +25 -0
- package/dist/x-liquid-glass.js +35 -35
- package/dist/x-menu-item.d.ts +41 -0
- package/dist/x-menu-item.js +10 -10
- package/dist/x-menu.d.ts +42 -0
- package/dist/x-menu.js +10 -10
- package/dist/x-metaball-cursor.d.ts +21 -0
- package/dist/x-metaball-cursor.js +25 -25
- package/dist/x-modal.d.ts +44 -0
- package/dist/x-modal.js +11 -11
- package/dist/x-morph-stack.d.ts +46 -0
- package/dist/x-morph-stack.js +39 -39
- package/dist/x-navbar.d.ts +46 -0
- package/dist/x-navbar.js +12 -12
- package/dist/x-neural-glow.d.ts +22 -0
- package/dist/x-neural-glow.js +30 -30
- package/dist/x-notification-center.d.ts +42 -0
- package/dist/x-notification-center.js +10 -10
- package/dist/x-organic-divider.d.ts +19 -0
- package/dist/x-organic-divider.js +15 -15
- package/dist/x-organic-progress.d.ts +45 -0
- package/dist/x-organic-progress.js +35 -35
- package/dist/x-organic-shape.d.ts +18 -0
- package/dist/x-organic-shape.js +12 -12
- package/dist/x-pagination.d.ts +45 -0
- package/dist/x-pagination.js +17 -16
- package/dist/x-particle-button.d.ts +47 -0
- package/dist/x-particle-button.js +46 -46
- package/dist/x-popover.d.ts +45 -0
- package/dist/x-popover.js +23 -23
- package/dist/x-progress-circle.d.ts +41 -0
- package/dist/x-progress-circle.js +7 -7
- package/dist/x-progress.d.ts +44 -0
- package/dist/x-progress.js +7 -7
- package/dist/x-radio.d.ts +44 -0
- package/dist/x-radio.js +11 -11
- package/dist/x-ripple-effect.d.ts +42 -0
- package/dist/x-ripple-effect.js +11 -11
- package/dist/x-scroll-parallax.d.ts +45 -0
- package/dist/x-scroll-parallax.js +17 -17
- package/dist/x-scroll-stack.d.ts +46 -0
- package/dist/x-scroll-stack.js +18 -18
- package/dist/x-scroll-story.d.ts +56 -0
- package/dist/x-scroll-story.js +33 -33
- package/dist/x-scroll-timeline.d.ts +58 -0
- package/dist/x-scroll-timeline.js +44 -44
- package/dist/x-scroll.d.ts +51 -0
- package/dist/x-scroll.js +39 -39
- package/dist/x-search-field.d.ts +47 -0
- package/dist/x-search-field.js +15 -14
- package/dist/x-select.d.ts +41 -0
- package/dist/x-select.js +10 -10
- package/dist/x-sidebar.d.ts +40 -0
- package/dist/x-sidebar.js +16 -16
- package/dist/x-skeleton-group.d.ts +15 -0
- package/dist/x-skeleton-group.js +13 -13
- package/dist/x-skeleton.d.ts +16 -0
- package/dist/x-skeleton.js +1 -1
- package/dist/x-slider.d.ts +49 -0
- package/dist/x-slider.js +18 -16
- package/dist/x-soft-body.d.ts +44 -0
- package/dist/x-soft-body.js +20 -20
- package/dist/x-spacer.d.ts +15 -0
- package/dist/x-spacer.js +5 -5
- package/dist/x-spinner.d.ts +15 -0
- package/dist/x-spinner.js +5 -5
- package/dist/x-splash.d.ts +42 -0
- package/dist/x-splash.js +13 -13
- package/dist/x-stat.d.ts +21 -0
- package/dist/x-stat.js +9 -9
- package/dist/x-stepper.d.ts +42 -0
- package/dist/x-stepper.js +14 -14
- package/dist/x-switch.d.ts +44 -0
- package/dist/x-switch.js +10 -10
- package/dist/x-tab.d.ts +40 -0
- package/dist/x-tab.js +7 -7
- package/dist/x-table-cell.d.ts +50 -0
- package/dist/x-table-cell.js +19 -19
- package/dist/x-table-row.d.ts +43 -0
- package/dist/x-table-row.js +10 -10
- package/dist/x-table.d.ts +124 -0
- package/dist/x-table.js +13 -13
- package/dist/x-tabs.d.ts +71 -0
- package/dist/x-tabs.js +11 -11
- package/dist/x-text-area.d.ts +48 -0
- package/dist/x-text-area.js +20 -18
- package/dist/x-theme.d.ts +15 -0
- package/dist/x-theme.js +24 -24
- package/dist/x-timeline-item.d.ts +46 -0
- package/dist/x-timeline-item.js +19 -19
- package/dist/x-timeline.d.ts +78 -0
- package/dist/x-timeline.js +9 -9
- package/dist/x-toast.d.ts +45 -0
- package/dist/x-toast.js +21 -21
- package/dist/x-toaster.d.ts +41 -0
- package/dist/x-toaster.js +8 -8
- package/dist/x-tooltip.d.ts +43 -0
- package/dist/x-tooltip.js +12 -12
- package/dist/x-typography.d.ts +16 -0
- package/dist/x-typography.js +8 -8
- package/dist/x-welcome-tour.d.ts +92 -0
- package/dist/x-welcome-tour.js +58 -58
- package/package.json +506 -392
package/dist/x-table.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
3
|
-
d.setAttribute("part","caption");d.setAttribute("hidden","");b.appendChild(c);b.appendChild(d);b.appendChild(e);a.__xTableRefs=new $APP.
|
|
4
|
-
$APP.M(a),c=$APP.D(b,
|
|
5
|
-
|
|
2
|
+
var aG=function(a){return typeof a==="string"?(a=parseInt(a.trim(),10),$APP.r(isNaN(a))&&a>0?Math.floor(a):null):null},cG=function(a){var b=$APP.k(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
|
+
d.setAttribute("part","caption");d.setAttribute("hidden","");b.appendChild(c);b.appendChild(d);b.appendChild(e);a.__xTableRefs=new $APP.Q(null,3,[$APP.Hi,b,bG,d,$APP.Fl,e],null);return $APP.k(a,"__xTableRefs")},oG=function(a){a=new $APP.Q(null,8,[dG,a.getAttribute("columns"),eG,a.getAttribute("caption"),fG,a.getAttribute("selectable"),$APP.bl,a.hasAttribute("striped"),gG,a.hasAttribute("bordered"),hG,a.hasAttribute("full-width"),iG,a.hasAttribute("compact"),jG,a.getAttribute("row-count")],null);var b=
|
|
4
|
+
$APP.M(a),c=$APP.D(b,dG),d=$APP.D(b,eG),e=$APP.D(b,fG);a=$APP.D(b,$APP.bl);var g=$APP.D(b,gG),h=$APP.D(b,hG),l=$APP.D(b,iG);b=$APP.D(b,jG);a:{if(typeof c==="string"&&(c=c.trim(),$APP.N(c,""))){var m=parseInt(c,10);c=$APP.r(isNaN(m))&&m>0&&$APP.B.i(c,""+$APP.T.g(m))?"repeat("+$APP.T.g(m)+",1fr)":c;break a}c=null}d=$APP.n(d)?d:"";e=typeof e==="string"?e.trim().toLowerCase():null;e=$APP.I(kG,e)?e:"none";return new $APP.Q(null,8,[$APP.Mk,c,lG,d,mG,e,$APP.bl,$APP.F(a),gG,$APP.F(g),hG,$APP.F(h),iG,$APP.F(l),
|
|
5
|
+
nG,aG(b)],null)},pG=function(a){a=a.querySelectorAll("x-table-row");for(var b=a.length,c=0;;)if(c<b){var d=a[c];$APP.fd(c+1,2)===0?d.setAttribute("data-stripe","even"):d.removeAttribute("data-stripe");c+=1}else break},qG=function(a){var b=oG(a);if($APP.N($APP.k(a,"__xTableModel"),b)){b=$APP.M(b);var c=$APP.D(b,$APP.Mk),d=$APP.D(b,lG),e=$APP.D(b,mG),g=$APP.D(b,$APP.bl),h=$APP.D(b,gG),l=$APP.D(b,hG),m=$APP.D(b,iG),p=$APP.D(b,nG),q=cG(a);q=$APP.M(q);q=$APP.D(q,bG);a.style.gridTemplateColumns=$APP.n(c)?
|
|
6
6
|
c:"";a.setAttribute("role",$APP.B.i(e,"none")?"table":"grid");c=$APP.B.i(e,"multi")?"true":null;$APP.n(c)?a.setAttribute("aria-multiselectable",c):a.removeAttribute("aria-multiselectable");p!=null?a.setAttribute("aria-rowcount",""+$APP.T.g(p)):a.removeAttribute("aria-rowcount");$APP.N(d,"")?a.setAttribute("aria-label",d):a.removeAttribute("aria-label");$APP.N(d,"")?(q.textContent=d,q.removeAttribute("hidden")):(q.textContent="",q.setAttribute("hidden",""));$APP.n(g)?a.setAttribute("data-striped",
|
|
7
|
-
""):a.removeAttribute("data-striped");$APP.n(h)?a.setAttribute("data-bordered",""):a.removeAttribute("data-bordered");$APP.n(l)?a.setAttribute("data-full-width",""):a.removeAttribute("data-full-width");$APP.n(m)?a.setAttribute("data-compact",""):a.removeAttribute("data-compact");$APP.n(g)&&
|
|
8
|
-
var h=
|
|
9
|
-
"")}else $APP.B.i(h,"multi")&&($APP.n(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.k(e.detail,"direction"),l=$APP.k(e.detail,"previousDirection");g>=0&&(e.stopPropagation(),e=$APP.Hh(new $APP.
|
|
10
|
-
return null}a.addEventListener("x-table-cell-sort",d);a.addEventListener("x-table-row-click",c);a.addEventListener("x-table-row-connected",b);$APP.ja(a,"__xTableHandlers",{sort:d,"row-click":c,"row-conn":b})},
|
|
11
|
-
b)}a.__xTableHandlers=null},
|
|
7
|
+
""):a.removeAttribute("data-striped");$APP.n(h)?a.setAttribute("data-bordered",""):a.removeAttribute("data-bordered");$APP.n(l)?a.setAttribute("data-full-width",""):a.removeAttribute("data-full-width");$APP.n(m)?a.setAttribute("data-compact",""):a.removeAttribute("data-compact");$APP.n(g)&&pG(a);a.__xTableModel=b}},tG=function(a){function b(){var e=$APP.k(a,"__xTableModel");e=$APP.n(e)?e:oG(a);$APP.n($APP.bl.g(e))&&pG(a);return null}function c(e){var g=$APP.k(a,"__xTableModel");g=$APP.n(g)?g:oG(a);
|
|
8
|
+
var h=mG.g(g);if($APP.N(h,"none"))if(g=e.target,e=$APP.k(e.detail,"rowIndex"),e=$APP.Hh(new $APP.Q(null,3,[$APP.Jj,$APP.n(e)?e:0,$APP.ok,$APP.r(g.hasAttribute("selected")),rG,h],null)),a.dispatchEvent(new CustomEvent("x-table-row-select",{detail:e,bubbles:!0,composed:!0,cancelable:!0})),$APP.B.i(h,"single")){e=g.hasAttribute("selected");h=a.querySelectorAll("x-table-row[selected]");for(var l=h.length,m=0;;)if(m<l)h[m].removeAttribute("selected"),m+=1;else break;$APP.n(e)||g.setAttribute("selected",
|
|
9
|
+
"")}else $APP.B.i(h,"multi")&&($APP.n(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.k(e.detail,"direction"),l=$APP.k(e.detail,"previousDirection");g>=0&&(e.stopPropagation(),e=$APP.Hh(new $APP.Q(null,3,[sG,g,$APP.tj,h,$APP.Im,l],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.ja(a,"__xTableHandlers",{sort:d,"row-click":c,"row-conn":b})},uG=function(a){var b=$APP.k(a,"__xTableHandlers");if($APP.n(b)){var c=$APP.k(b,"sort"),d=$APP.k(b,"row-click");b=$APP.k(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",
|
|
11
|
+
b)}a.__xTableHandlers=null},vG=function(a){Object.defineProperty(a,"columns",{get:function(){var b=this.getAttribute("columns");return $APP.n(b)?b:""},set:function(b){return $APP.n(b)?this.setAttribute("columns",""+$APP.T.g(b)):this.removeAttribute("columns")},enumerable:!0,configurable:!0});Object.defineProperty(a,"caption",{get:function(){var b=this.getAttribute("caption");return $APP.n(b)?b:""},set:function(b){return $APP.n(b)?this.setAttribute("caption",""+$APP.T.g(b)):this.removeAttribute("caption")},
|
|
12
12
|
enumerable:!0,configurable:!0});Object.defineProperty(a,"selectable",{get:function(){var b=this.getAttribute("selectable");return $APP.n(b)?b:"none"},set:function(b){return $APP.n(b)?this.setAttribute("selectable",""+$APP.T.g(b)):this.removeAttribute("selectable")},enumerable:!0,configurable:!0});Object.defineProperty(a,"striped",{get:function(){return this.hasAttribute("striped")},set:function(b){return $APP.n(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.n(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.n(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.n(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.n(b)?this.setAttribute("full-width",""):this.removeAttribute("full-width")},enumerable:!0,configurable:!0});Object.defineProperty(a,"rowCount",{get:function(){return aG(this.getAttribute("row-count"))},set:function(b){return b==null?this.removeAttribute("row-count"):this.setAttribute("row-count",""+$APP.T.g(Math.floor(b)))},enumerable:!0,configurable:!0})},xG=function(){var a=class extends HTMLElement{};a.observedAttributes=wG;a.prototype.connectedCallback=function(){cG(this);
|
|
15
|
+
uG(this);tG(this);qG(this);return null};a.prototype.disconnectedCallback=function(){uG(this);return null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.N(c,d)&&qG(this);return null};vG(a.prototype);return a},yG=function(){$APP.n(customElements.get("x-table"))||customElements.define("x-table",xG());return null},hG=new $APP.K(null,"full-width?","full-width?",1477288349),jG=new $APP.K(null,"row-count-raw","row-count-raw",-1432781274),fG=new $APP.K(null,"selectable-raw","selectable-raw",-1276314763),
|
|
16
|
+
sG=new $APP.K(null,"colIndex","colIndex",171239635),nG=new $APP.K(null,"row-count","row-count",1060167988),eG=new $APP.K(null,"caption-raw","caption-raw",-375935083),rG=new $APP.K(null,"selectionMode","selectionMode",1264773367),dG=new $APP.K(null,"columns-raw","columns-raw",-2093994046),mG=new $APP.K(null,"selectable","selectable",370587038),lG=new $APP.K(null,"caption","caption",-855383902),gG=new $APP.K(null,"bordered?","bordered?",562358476),bG=new $APP.K(null,"caption-div","caption-div",1485363333),
|
|
17
|
+
iG=new $APP.K(null,"compact?","compact?",1216893298);var wG="columns caption selectable striped bordered full-width compact row-count".split(" ");$APP.Pd(["x-table-sort",new $APP.Q(null,2,[$APP.V,new $APP.Q(null,3,[sG,$APP.W,$APP.tj,$APP.Y,$APP.Im,$APP.Y],null),$APP.lm,!0],null),"x-table-row-select",new $APP.Q(null,2,[$APP.V,new $APP.Q(null,3,[$APP.Jj,$APP.W,$APP.ok,$APP.Zj,rG,$APP.Y],null),$APP.lm,!0],null)]);var kG=new $APP.S(null,new $APP.Q(null,3,["none",null,"single",null,"multi",null],null),null);$APP.ha("baredom.exports.x_table.init",yG);export const init=yG;
|
package/dist/x-tabs.d.ts
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
// x-tabs.d.ts — auto-generated by generate_types.bb, do not edit
|
|
2
|
+
|
|
3
|
+
export function init(): void;
|
|
4
|
+
|
|
5
|
+
export interface XTabsEventMap {
|
|
6
|
+
"value-change-request": CustomEvent<{ value: string; previousValue: string }>;
|
|
7
|
+
"value-change": CustomEvent<{ value: string }>;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface XTabs extends HTMLElement {
|
|
11
|
+
value: string;
|
|
12
|
+
|
|
13
|
+
addEventListener<K extends keyof XTabsEventMap>(
|
|
14
|
+
type: K,
|
|
15
|
+
listener: (this: XTabs, ev: XTabsEventMap[K]) => any,
|
|
16
|
+
options?: boolean | AddEventListenerOptions
|
|
17
|
+
): void;
|
|
18
|
+
addEventListener(
|
|
19
|
+
type: string,
|
|
20
|
+
listener: EventListenerOrEventListenerObject,
|
|
21
|
+
options?: boolean | AddEventListenerOptions
|
|
22
|
+
): void;
|
|
23
|
+
removeEventListener<K extends keyof XTabsEventMap>(
|
|
24
|
+
type: K,
|
|
25
|
+
listener: (this: XTabs, ev: XTabsEventMap[K]) => any,
|
|
26
|
+
options?: boolean | EventListenerOptions
|
|
27
|
+
): void;
|
|
28
|
+
removeEventListener(
|
|
29
|
+
type: string,
|
|
30
|
+
listener: EventListenerOrEventListenerObject,
|
|
31
|
+
options?: boolean | EventListenerOptions
|
|
32
|
+
): void;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface XTabEventMap {
|
|
36
|
+
"tab-select": CustomEvent<{ value: string }>;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface XTab extends HTMLElement {
|
|
40
|
+
selected: boolean;
|
|
41
|
+
disabled: boolean;
|
|
42
|
+
value: string;
|
|
43
|
+
|
|
44
|
+
addEventListener<K extends keyof XTabEventMap>(
|
|
45
|
+
type: K,
|
|
46
|
+
listener: (this: XTab, ev: XTabEventMap[K]) => any,
|
|
47
|
+
options?: boolean | AddEventListenerOptions
|
|
48
|
+
): void;
|
|
49
|
+
addEventListener(
|
|
50
|
+
type: string,
|
|
51
|
+
listener: EventListenerOrEventListenerObject,
|
|
52
|
+
options?: boolean | AddEventListenerOptions
|
|
53
|
+
): void;
|
|
54
|
+
removeEventListener<K extends keyof XTabEventMap>(
|
|
55
|
+
type: K,
|
|
56
|
+
listener: (this: XTab, ev: XTabEventMap[K]) => any,
|
|
57
|
+
options?: boolean | EventListenerOptions
|
|
58
|
+
): void;
|
|
59
|
+
removeEventListener(
|
|
60
|
+
type: string,
|
|
61
|
+
listener: EventListenerOrEventListenerObject,
|
|
62
|
+
options?: boolean | EventListenerOptions
|
|
63
|
+
): void;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
declare global {
|
|
67
|
+
interface HTMLElementTagNameMap {
|
|
68
|
+
"x-tabs": XTabs;
|
|
69
|
+
"x-tab": XTab;
|
|
70
|
+
}
|
|
71
|
+
}
|
package/dist/x-tabs.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
3
|
-
b.tagName)},$APP.uc(a.children)))},
|
|
4
|
-
$APP.n(b?c:b)&&a.removeAttribute("selected"))},
|
|
5
|
-
for(var e=null,g=0,h=0;;)if(h<g){var l=e.F(null,h),m=$APP.B.i(
|
|
6
|
-
c)),b=$APP.w(d),d=null,e=0),g=0;else break a;
|
|
7
|
-
"tablist"),b.setAttribute("aria-orientation",$APP.
|
|
8
|
-
var m=d.key,p=e.indexOf(document.activeElement);if(p>=0&&(h=$APP.B.i(h,"horizontal")&&$APP.B.i(m,"ArrowRight")?
|
|
9
|
-
function c(d){d.stopPropagation();return
|
|
10
|
-
function(){if($APP.Dg(this,"__x_tabs_initialized")){
|
|
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 $APP.Dg(this,"__x_tabs_initialized")?
|
|
2
|
+
var qJ=function(a){var b=$APP.M(a);a=$APP.D(b,$APP.Yi);var c=$APP.D(b,$APP.rl),d=$APP.D(b,nJ),e=$APP.D(b,$APP.U);b=$APP.D(b,$APP.Jm);c=$APP.I(oJ,c)?c:"horizontal";d=$APP.I(pJ,d)?d:"auto";return new $APP.Q(null,5,[$APP.Yi,a,$APP.rl,c,nJ,d,$APP.U,e,$APP.Jm,$APP.F(b)],null)},rJ=function(a){return new $APP.Q(null,5,[$APP.Yi,a.getAttribute("value"),$APP.rl,a.getAttribute("orientation"),nJ,a.getAttribute("activation"),$APP.U,a.getAttribute("label"),$APP.Jm,a.hasAttribute("loop")],null)},sJ=function(a){return $APP.xe($APP.de(function(b){return $APP.B.i("X-TAB",
|
|
3
|
+
b.tagName)},$APP.uc(a.children)))},tJ=function(a){return $APP.r(a.hasAttribute("disabled"))},uJ=function(a){return a.getAttribute("value")},vJ=function(a){return $APP.Td(function(b){return tJ(b)?b:null},a)},wJ=function(a,b){var c=a.getAttribute("value");$APP.n($APP.n(b)?$APP.N(c,b):b)?a.setAttribute("value",b):(b=b==null||$APP.B.i(b,""),$APP.n(b?c:b)&&a.removeAttribute("value"))},xJ=function(a,b){var c=a.hasAttribute("selected");$APP.n($APP.n(b)?$APP.r(c):b)?a.setAttribute("selected",""):(b=$APP.r(b),
|
|
4
|
+
$APP.n(b?c:b)&&a.removeAttribute("selected"))},yJ=function(a,b){var c=a.getAttribute("tabindex");$APP.N(c,b)&&a.setAttribute("tabindex",b)},zJ=function(a,b){a=a.getAttribute("controls");$APP.n($APP.n(a)?$APP.N(a,""):a)&&(a=document.getElementById(a),$APP.n(a)&&($APP.n(b)?a.removeAttribute("hidden"):a.setAttribute("hidden","")))},AJ=function(a){var b=sJ(a),c=a.getAttribute("value"),d=$APP.Xf($APP.Yd(uJ,b));$APP.n($APP.n(c)?$APP.I(d,c):c)||(c=vJ(b),c=$APP.n(c)?uJ(c):null);if($APP.n(c)){a:{d=$APP.t(b);
|
|
5
|
+
for(var e=null,g=0,h=0;;)if(h<g){var l=e.F(null,h),m=$APP.B.i(uJ(l),c);xJ(l,m);m&&tJ(l)?yJ(l,"0"):yJ(l,"-1");h+=1}else if(d=$APP.t(d))$APP.Nc(d)?(e=$APP.yb(d),d=$APP.zb(d),l=e,g=$APP.z(e),e=l):(l=$APP.u(d),e=$APP.B.i(uJ(l),c),xJ(l,e),e&&tJ(l)?yJ(l,"0"):yJ(l,"-1"),d=$APP.w(d),e=null,g=0),h=0;else break a}a:for(b=$APP.t(b),d=null,g=e=0;;)if(g<e)l=d.F(null,g),zJ(l,$APP.B.i(uJ(l),c)),g+=1;else if(b=$APP.t(b))d=b,$APP.Nc(d)?(b=$APP.yb(d),e=$APP.zb(d),d=b,l=$APP.z(b),b=e,e=l):(l=$APP.u(d),zJ(l,$APP.B.i(uJ(l),
|
|
6
|
+
c)),b=$APP.w(d),d=null,e=0),g=0;else break a;wJ(a,c)}return c},BJ=function(a,b){var c=a.getAttribute("value"),d;if(d=$APP.n($APP.n(b)?$APP.N(c,b):b))c=new CustomEvent("value-change-request",{detail:{value:b,previousValue:$APP.n(c)?c:""},bubbles:!0,composed:!0,cancelable:!0}),a.dispatchEvent(c),d=$APP.r(c.defaultPrevented);return d?(wJ(a,b),AJ(a),a.dispatchEvent(new CustomEvent("value-change",{detail:{value:$APP.n(b)?b:""},bubbles:!0,composed:!0}))):null},CJ=function(a,b,c){b=$APP.z(b)-1;var d=a+1;
|
|
7
|
+
return d<=b?d:$APP.n(c)?0:a},DJ=function(a,b,c){var d=a-1;b=$APP.z(b)-1;return d>=0?d:$APP.n(c)?b:a},EJ=function(a){var b=$APP.k(a,"__x_tabs_base"),c=qJ(rJ(a));$APP.n(b)&&(b.setAttribute("role","tablist"),b.setAttribute("aria-orientation",$APP.rl.g(c)),c=$APP.U.g(c),$APP.n($APP.n(c)?$APP.N(c,""):c)?b.setAttribute("aria-label",c):b.removeAttribute("aria-label"));return AJ(a)},FJ=function(a){var b=new MutationObserver(function(){return EJ(a)});b.observe(a,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value",
|
|
8
|
+
"selected","disabled","controls"]});a.__x_tabs_observer=b},GJ=function(a){function b(d){a:{var e=$APP.xe($APP.de(tJ,sJ(a))),g=qJ(rJ(a)),h=$APP.rl.g(g);var l=nJ.g(g);g=$APP.Jm.g(g);var m=d.key,p=e.indexOf(document.activeElement);if(p>=0&&(h=$APP.B.i(h,"horizontal")&&$APP.B.i(m,"ArrowRight")?CJ(p,e,g):$APP.B.i(h,"horizontal")&&$APP.B.i(m,"ArrowLeft")?DJ(p,e,g):$APP.B.i(h,"vertical")&&$APP.B.i(m,"ArrowDown")?CJ(p,e,g):$APP.B.i(h,"vertical")&&$APP.B.i(m,"ArrowUp")?DJ(p,e,g):$APP.B.i(m,"Home")?0:$APP.B.i(m,
|
|
9
|
+
"End")?$APP.z(e)-1:null,h!=null)){d.preventDefault();d=$APP.Ac(e,h,null);$APP.n(d)?d.focus():d=null;l=$APP.n(d)?$APP.B.i(l,"auto")?BJ(a,uJ(d)):null:null;break a}l=null}return l}function c(d){d.stopPropagation();return BJ(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;FJ(a)},HJ=function(a){Object.defineProperty(a.prototype,"value",{get:function(){return this.getAttribute("value")},set:function(b){return $APP.n(b)?
|
|
10
|
+
this.setAttribute("value",b):this.removeAttribute("value")},configurable:!0,enumerable:!0})},JJ=function(){var a=class extends HTMLElement{};a.observedAttributes=IJ;a.prototype.connectedCallback=function(){if($APP.Dg(this,"__x_tabs_initialized")){GJ(this);var b=EJ(this)}else{if(!$APP.Dg(this,"__x_tabs_initialized")){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;GJ(this);this.__x_tabs_initialized=!0}EJ(this);b=this}return b};a.prototype.disconnectedCallback=function(){var b=$APP.k(this,"__x_tabs_on_tab_select");$APP.n(b)&&this.removeEventListener("tab-select",b);b=$APP.k(this,"__x_tabs_on_keydown");$APP.n(b)&&this.removeEventListener("keydown",b);b=$APP.k(this,"__x_tabs_observer");return $APP.n(b)?
|
|
12
|
+
b.disconnect():null};a.prototype.attributeChangedCallback=function(){return $APP.Dg(this,"__x_tabs_initialized")?EJ(this):null};HJ(a);return a},KJ=function(){return $APP.n(customElements.get("x-tabs"))?null:customElements.define("x-tabs",JJ())},nJ=new $APP.K(null,"activation","activation",2128521072);var IJ=["value","orientation","activation","label","loop"],oJ=new $APP.S(null,new $APP.Q(null,2,["vertical",null,"horizontal",null],null),null),pJ=new $APP.S(null,new $APP.Q(null,2,["auto",null,"manual",null],null),null);$APP.Pd(["value-change-request",new $APP.Q(null,2,[$APP.lm,!0,$APP.V,new $APP.Q(null,2,[$APP.Yi,$APP.Y,$APP.Tk,$APP.Y],null)],null),"value-change",new $APP.Q(null,1,[$APP.V,new $APP.Q(null,1,[$APP.Yi,$APP.Y],null)],null)]);$APP.ha("baredom.exports.x_tabs.init",KJ);export const init=KJ;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// x-text-area.d.ts — auto-generated by generate_types.bb, do not edit
|
|
2
|
+
|
|
3
|
+
export function init(): void;
|
|
4
|
+
|
|
5
|
+
export interface XTextAreaEventMap {
|
|
6
|
+
"x-text-area-change-request": CustomEvent<{ name: string; value: string; previousValue: string }>;
|
|
7
|
+
"x-text-area-input": CustomEvent<{ name: string; value: string }>;
|
|
8
|
+
"x-text-area-change": CustomEvent<{ name: string; value: string }>;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface XTextArea extends HTMLElement {
|
|
12
|
+
disabled: boolean;
|
|
13
|
+
name: string;
|
|
14
|
+
value: string;
|
|
15
|
+
minLength: number;
|
|
16
|
+
rows: number;
|
|
17
|
+
readOnly: boolean;
|
|
18
|
+
maxLength: number;
|
|
19
|
+
autocomplete: string;
|
|
20
|
+
required: boolean;
|
|
21
|
+
|
|
22
|
+
addEventListener<K extends keyof XTextAreaEventMap>(
|
|
23
|
+
type: K,
|
|
24
|
+
listener: (this: XTextArea, ev: XTextAreaEventMap[K]) => any,
|
|
25
|
+
options?: boolean | AddEventListenerOptions
|
|
26
|
+
): void;
|
|
27
|
+
addEventListener(
|
|
28
|
+
type: string,
|
|
29
|
+
listener: EventListenerOrEventListenerObject,
|
|
30
|
+
options?: boolean | AddEventListenerOptions
|
|
31
|
+
): void;
|
|
32
|
+
removeEventListener<K extends keyof XTextAreaEventMap>(
|
|
33
|
+
type: K,
|
|
34
|
+
listener: (this: XTextArea, ev: XTextAreaEventMap[K]) => any,
|
|
35
|
+
options?: boolean | EventListenerOptions
|
|
36
|
+
): void;
|
|
37
|
+
removeEventListener(
|
|
38
|
+
type: string,
|
|
39
|
+
listener: EventListenerOrEventListenerObject,
|
|
40
|
+
options?: boolean | EventListenerOptions
|
|
41
|
+
): void;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
declare global {
|
|
45
|
+
interface HTMLElementTagNameMap {
|
|
46
|
+
"x-text-area": XTextArea;
|
|
47
|
+
}
|
|
48
|
+
}
|
package/dist/x-text-area.js
CHANGED
|
@@ -1,20 +1,22 @@
|
|
|
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.M(g),l=$APP.D(h,
|
|
5
|
-
m=$APP.n(m)?m:"";y=typeof y==="string"&&$APP.N(y,"")&&y!=null;v=$APP.n(v)?v:"";G=$APP.n(G)?G:"";l=
|
|
6
|
-
c.name=$APP.Aj.g(g);c.placeholder=$APP.
|
|
7
|
-
$APP.n($APP.n(A)?C:A)?"hint error":$APP.n(A)?"hint":$APP.n(C)?"error":null;$APP.n(J)?c.setAttribute("aria-describedby",J):c.removeAttribute("aria-describedby");d.textContent=$APP.U.g(g);$APP.n(h)?d.classList.remove("label-hidden"):d.classList.add("label-hidden");e.textContent=$APP.
|
|
8
|
-
"__xTextAreaInternals");return $APP.n(d)?
|
|
9
|
-
$APP.
|
|
10
|
-
a
|
|
11
|
-
|
|
12
|
-
b);var c=$APP.k(this,"__xTextAreaRefs");return $APP.n(c)?$APP.k(c,"textarea").value=b:null}})},
|
|
13
|
-
"
|
|
2
|
+
var p3=function(a){return typeof a==="string"?(a=parseInt(a,10),$APP.r(isNaN(a))&&a>0?a:null):null},q3=function(a,b,c){return a.setAttribute(b,c)},r3=function(a,b,c){return $APP.n(c)?a.setAttribute(b,""):a.removeAttribute(b)},s3=function(a,b,c){var d=a.hasAttribute("error");var e=a.getAttribute("error");e=$APP.n(e)?e:"";a=a.hasAttribute("required");var g=c.value;return $APP.n(d)?b.setValidity({customError:!0},e,c):$APP.n($APP.n(a)?$APP.B.i(g,""):a)?b.setValidity({valueMissing:!0},"Please fill in this field.",
|
|
3
|
+
c):b.setValidity({},"",c)},B3=function(a){var b=$APP.k(a,"__xTextAreaRefs");if($APP.n(b)){var c=$APP.k(b,"textarea"),d=$APP.k(b,"label"),e=$APP.k(b,"hint");b=$APP.k(b,"error");var g=$APP.zf([t3,$APP.pi,$APP.Al,$APP.Ji,$APP.$i,u3,$APP.Ol,v3,$APP.Nh,$APP.Lj,$APP.Em,$APP.oi,w3,$APP.Pi],[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.M(g),l=$APP.D(h,w3),m=$APP.D(h,$APP.Pi),p=$APP.D(h,t3),q=$APP.D(h,$APP.pi),v=$APP.D(h,$APP.Al),x=$APP.D(h,$APP.Ji),y=$APP.D(h,$APP.$i),A=$APP.D(h,u3);g=$APP.D(h,$APP.Ol);var C=$APP.D(h,v3),E=$APP.D(h,$APP.Nh),H=$APP.D(h,$APP.Lj),G=$APP.D(h,$APP.Em);h=$APP.D(h,$APP.oi);var J=$APP.n(x)?x:"",R=$APP.n(y)?y:"",aa=$APP.n(q)?q:"";E=$APP.F(E);H=$APP.F(H);
|
|
5
|
+
m=$APP.n(m)?m:"";y=typeof y==="string"&&$APP.N(y,"")&&y!=null;v=$APP.n(v)?v:"";G=$APP.n(G)?G:"";l=p3(l);q=typeof q==="string"&&$APP.N(q,"")&&q!=null;x=typeof x==="string"&&$APP.N(x,"")&&x!=null;p=typeof p==="string"&&$APP.I(x3,p)?p:"vertical";A=p3(A);g=$APP.zf([$APP.mi,$APP.dn,$APP.sm,$APP.ui,$APP.Aj,$APP.Yi,y3,$APP.Dl,$APP.al,z3,$APP.Zl,A3,$APP.pj,$APP.U,$APP.Ei,$APP.am,$APP.X],[E,H,m,y,v,G,l,q,x,p,R,p3(C),$APP.n(A)?A:3,aa,J,$APP.n(h)?h:"",$APP.F(g)]);C=$APP.al.g(g);A=$APP.ui.g(g);h=$APP.Dl.g(g);
|
|
6
|
+
c.name=$APP.Aj.g(g);c.placeholder=$APP.sm.g(g);c.disabled=$APP.X.g(g);c.readOnly=$APP.dn.g(g);c.required=$APP.mi.g(g);c.rows=$APP.pj.g(g);c.autocomplete=$APP.am.g(g);J=A3.g(g);$APP.n(J)?q3(c,"maxlength",""+$APP.T.g(J)):c.removeAttribute("maxlength");J=y3.g(g);$APP.n(J)?q3(c,"minlength",""+$APP.T.g(J)):c.removeAttribute("minlength");a.style.setProperty("--x-text-area-resize",z3.g(g));q3(c,"aria-required",$APP.n($APP.mi.g(g))?"true":"false");c.setAttribute("aria-invalid",$APP.n(C)?"true":"false");J=
|
|
7
|
+
$APP.n($APP.n(A)?C:A)?"hint error":$APP.n(A)?"hint":$APP.n(C)?"error":null;$APP.n(J)?c.setAttribute("aria-describedby",J):c.removeAttribute("aria-describedby");d.textContent=$APP.U.g(g);$APP.n(h)?d.classList.remove("label-hidden"):d.classList.add("label-hidden");e.textContent=$APP.Zl.g(g);$APP.n(A)?e.classList.remove("hint-hidden"):e.classList.add("hint-hidden");b.textContent=$APP.Ei.g(g);$APP.n(C)?b.classList.remove("error-hidden"):b.classList.add("error-hidden");r3(a,"data-invalid",C);d=$APP.k(a,
|
|
8
|
+
"__xTextAreaInternals");return $APP.n(d)?s3(a,d,c):null}return null},C3=function(a,b,c){return a.dispatchEvent(new CustomEvent(b,{detail:c,bubbles:!0,composed:!0,cancelable:!1}))},D3=function(a,b){b=new CustomEvent("x-text-area-change-request",{detail:b,bubbles:!0,composed:!0,cancelable:!0});a.dispatchEvent(b);return $APP.r(b.defaultPrevented)},E3=function(a){return function(){var b=$APP.k(a,"__xTextAreaRefs");if($APP.n(b)){b=$APP.k(b,"textarea");var c=b.value,d=function(){var g=a.getAttribute("value");
|
|
9
|
+
return $APP.n(g)?g:""}(),e=function(){var g=a.getAttribute("name");return $APP.n(g)?g:""}();return D3(a,{name:e,value:c,previousValue:d})?(d=$APP.k(a,"__xTextAreaInternals"),$APP.n(d)&&(d.setFormValue(c),s3(a,d,b)),C3(a,"x-text-area-input",{name:e,value:c})):b.value=d}return null}},F3=function(a){return function(){var b=$APP.k(a,"__xTextAreaRefs");if($APP.n(b)){b=$APP.k(b,"textarea");var c=b.value;var d=a.getAttribute("name");d=$APP.n(d)?d:"";var e=$APP.k(a,"__xTextAreaInternals");$APP.n(e)&&(e.setFormValue(c),
|
|
10
|
+
s3(a,e,b));return C3(a,"x-text-area-change",{name:d,value:c})}return null}},G3=function(a){var b=$APP.k(a,"__xTextAreaRefs");if($APP.n(b)){var c=$APP.k(a,"__xTextAreaHandlers");if($APP.n(c)){b=$APP.k(b,"textarea");b.removeEventListener("input",$APP.k(c,"input"));b.removeEventListener("change",$APP.k(c,"change"));a.__xTextAreaHandlers=null;return}}return null},H3=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){var d=this.getAttribute(c);return $APP.n(d)?d:""},
|
|
11
|
+
set:function(d){return d!=null&&$APP.N(d)?q3(this,c,""+$APP.T.g(d)):this.removeAttribute(c)}})},I3=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){return this.hasAttribute(c)},set:function(d){return r3(this,c,$APP.F(d))}})},J3=function(a,b,c,d){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){var e=p3(this.getAttribute(c));return $APP.n(e)?e:d},set:function(e){return e!=null&&$APP.N(e)&&e>0?q3(this,c,""+$APP.T.g(Math.floor(e))):this.removeAttribute(c)}})},
|
|
12
|
+
K3=function(a){Object.defineProperty(a,"value",{configurable:!0,enumerable:!0,get:function(){var b=$APP.k(this,"__xTextAreaRefs");if($APP.n(b))return $APP.k(b,"textarea").value;b=this.getAttribute("value");return $APP.n(b)?b:""},set:function(b){b=b!=null&&$APP.N(b)?""+$APP.T.g(b):"";this.setAttribute("value",b);var c=$APP.k(this,"__xTextAreaRefs");return $APP.n(c)?$APP.k(c,"textarea").value=b:null}})},M3=function(){var a=class extends HTMLElement{},b=a.prototype;a.formAssociated=!0;Object.defineProperty(a,
|
|
13
|
+
"observedAttributes",{get:function(){return L3}});K3(b);H3(b,"name","name");H3(b,"placeholder","placeholder");H3(b,"autocomplete","autocomplete");I3(b,"disabled","disabled");I3(b,"readOnly","readonly");I3(b,"required","required");J3(b,"rows","rows",3);J3(b,"maxLength","maxlength",null);J3(b,"minLength","minlength",null);b.connectedCallback=function(){if(!$APP.n($APP.k(this,"__xTextAreaRefs"))){var c=this.attachShadow({mode:"open"}),d=document.createElement("style"),e=document.createElement("div"),
|
|
14
|
+
g=document.createElement("label"),h=document.createElement("div"),l=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
15
|
e.setAttribute("part","field");g.setAttribute("part","label");g.setAttribute("id","label");g.setAttribute("for","textarea");h.setAttribute("part","textarea-wrapper");l.setAttribute("part","textarea");l.setAttribute("id","textarea");l.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(l);
|
|
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:l,hint:m,error:p};$APP.n(this.attachInternals)&&(this.__xTextAreaInternals=this.attachInternals())}
|
|
16
|
-
$APP.k(this,"__xTextAreaRefs");$APP.n(c)&&(c=$APP.k(c,"textarea"),d=
|
|
17
|
-
"disabled",$APP.F(c));return
|
|
18
|
-
|
|
19
|
-
$APP.zf([$APP.Pj,$APP.Aj,$APP.Yi,new $APP.K(null,"minLength","minLength",-1538722770),$APP.pj,$APP.
|
|
20
|
-
"readonly"],null),new $APP.
|
|
16
|
+
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:l,hint:m,error:p};$APP.n(this.attachInternals)&&(this.__xTextAreaInternals=this.attachInternals())}G3(this);c=$APP.k(this,"__xTextAreaRefs");$APP.n(c)&&(c=$APP.k(c,"textarea"),d=this.getAttribute("value"),$APP.n(d)&&(c.value=d));c=$APP.k(this,"__xTextAreaInternals");$APP.n(c)&&(d=c.setFormValue,e=this.getAttribute("value"),d.call(c,$APP.n(e)?e:""));c=
|
|
17
|
+
$APP.k(this,"__xTextAreaRefs");$APP.n(c)&&(c=$APP.k(c,"textarea"),d=E3(this),e=F3(this),c.addEventListener("input",d),c.addEventListener("change",e),this.__xTextAreaHandlers={input:d,change:e});return B3(this)};b.disconnectedCallback=function(){return G3(this)};b.attributeChangedCallback=function(c,d,e){$APP.B.i(c,"value")&&(c=$APP.k(this,"__xTextAreaRefs"),$APP.n(c)&&(c=$APP.k(c,"textarea"),$APP.N(c.value,e)&&(c.value=$APP.n(e)?e:"")));return B3(this)};b.formDisabledCallback=function(c){r3(this,
|
|
18
|
+
"disabled",$APP.F(c));return B3(this)};b.formResetCallback=function(){this.removeAttribute("value");var c=$APP.k(this,"__xTextAreaRefs");$APP.n(c)&&($APP.k(c,"textarea").value="");c=$APP.k(this,"__xTextAreaInternals");$APP.n(c)&&c.setFormValue("");return B3(this)};return a},N3=function(){return $APP.n(customElements.get("x-text-area"))?null:customElements.define("x-text-area",M3())},y3=new $APP.K(null,"minlength","minlength",259053545),w3=new $APP.K(null,"minlength-raw","minlength-raw",-1245403779),
|
|
19
|
+
v3=new $APP.K(null,"maxlength-raw","maxlength-raw",-886656470),A3=new $APP.K(null,"maxlength","maxlength",-1163911985),t3=new $APP.K(null,"resize-raw","resize-raw",-287517888),u3=new $APP.K(null,"rows-raw","rows-raw",-1828357145),z3=new $APP.K(null,"resize","resize",297367086);var L3="label name value placeholder hint error disabled readonly required rows maxlength minlength autocomplete resize".split(" "),x3=new $APP.S(null,new $APP.Q(null,4,["none",null,"vertical",null,"both",null,"horizontal",null],null),null);
|
|
20
|
+
$APP.zf([$APP.Pj,$APP.Aj,$APP.Yi,new $APP.K(null,"minLength","minLength",-1538722770),$APP.pj,$APP.nm,new $APP.K(null,"maxLength","maxLength",-1633020073),$APP.am,$APP.Dk],[new $APP.Q(null,2,[$APP.Z,$APP.Zj,$APP.Ik,"disabled"],null),new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.Ik,"name"],null),new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.Ik,"value"],null),new $APP.Q(null,2,[$APP.Z,$APP.W,$APP.Ik,"minlength"],null),new $APP.Q(null,2,[$APP.Z,$APP.W,$APP.Ik,"rows"],null),new $APP.Q(null,2,[$APP.Z,$APP.Zj,$APP.Ik,
|
|
21
|
+
"readonly"],null),new $APP.Q(null,2,[$APP.Z,$APP.W,$APP.Ik,"maxlength"],null),new $APP.Q(null,2,[$APP.Z,$APP.Y,$APP.Ik,"autocomplete"],null),new $APP.Q(null,2,[$APP.Z,$APP.Zj,$APP.Ik,"required"],null)]);
|
|
22
|
+
$APP.Pd(["x-text-area-change-request",new $APP.Q(null,2,[$APP.lm,!0,$APP.V,new $APP.Q(null,3,[$APP.Aj,$APP.Y,$APP.Yi,$APP.Y,$APP.Tk,$APP.Y],null)],null),"x-text-area-input",new $APP.Q(null,2,[$APP.lm,!1,$APP.V,new $APP.Q(null,2,[$APP.Aj,$APP.Y,$APP.Yi,$APP.Y],null)],null),"x-text-area-change",new $APP.Q(null,2,[$APP.lm,!1,$APP.V,new $APP.Q(null,2,[$APP.Aj,$APP.Y,$APP.Yi,$APP.Y],null)],null)]);$APP.ha("baredom.exports.x_text_area.init",N3);export const init=N3;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// x-theme.d.ts — auto-generated by generate_types.bb, do not edit
|
|
2
|
+
|
|
3
|
+
export function init(): void;
|
|
4
|
+
|
|
5
|
+
export function registerPreset(presetName: string, data: Record<string, string>): void;
|
|
6
|
+
|
|
7
|
+
export interface XTheme extends HTMLElement {
|
|
8
|
+
preset: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
declare global {
|
|
12
|
+
interface HTMLElementTagNameMap {
|
|
13
|
+
"x-theme": XTheme;
|
|
14
|
+
}
|
|
15
|
+
}
|
package/dist/x-theme.js
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
2
|
+
var DG=function(a,b){var c=zG.g(AG),d=BG.g(AG),e=b.light,g=b.dark;b=$APP.Rf($APP.uc([c,$APP.n(e)?$APP.We.i($APP.Qd,function(){return function m(l){return new $APP.rd(null,function(){for(;;){var p=$APP.t(l);if(p){if($APP.Nc(p)){var q=$APP.yb(p),v=$APP.z(q),x=$APP.ud(v);a:{for(var y=0;;)if(y<v){var A=$APP.yc(q,y);x.add(new $APP.O(null,2,5,$APP.P,[A,$APP.k(e,A)],null));y+=1}else{q=!0;break a}q=void 0}return q?$APP.xd(x.aa(),m($APP.zb(p))):$APP.xd(x.aa(),null)}x=$APP.u(p);return $APP.od(new $APP.O(null,
|
|
3
3
|
2,5,$APP.P,[x,$APP.k(e,x)],null),m($APP.Yb(p)))}return null}},null)}(Object.keys(e))}()):null]));d=$APP.Rf($APP.uc([d,$APP.n(g)?$APP.We.i($APP.Qd,function(){return function m(l){return new $APP.rd(null,function(){for(;;){var p=$APP.t(l);if(p){if($APP.Nc(p)){var q=$APP.yb(p),v=$APP.z(q),x=$APP.ud(v);a:{for(var y=0;;)if(y<v){var A=$APP.yc(q,y);x.add(new $APP.O(null,2,5,$APP.P,[A,$APP.k(g,A)],null));y+=1}else{q=!0;break a}q=void 0}return q?$APP.xd(x.aa(),m($APP.zb(p))):$APP.xd(x.aa(),null)}x=$APP.u(p);
|
|
4
|
-
return $APP.od(new $APP.O(null,2,5,$APP.P,[x,$APP.k(g,x)],null),m($APP.Yb(p)))}return null}},null)}(Object.keys(g))}()):null]));return $APP.ja(
|
|
5
|
-
":"+$APP.T.g(d)+";"),a=$APP.w(a),c=null,d=0),e=0;else break;return b.join("")},
|
|
6
|
-
""+$APP.T.g(b)):this.removeAttribute("preset")},enumerable:!0,configurable:!0})},
|
|
7
|
-
function(){return null};a.prototype.attributeChangedCallback=function(){var b=$APP.k(this,"__xThemeRefs");return $APP.n(b)?b.style.textContent=
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
"#ffffff #64748b #16a34a #64748b #d97706 #1e40af #cbd5e1 #f8fafc #dc2626 #334155 #475569 #475569 #f1f5f9 #60a5fa #2563eb #f8fafc #0f172a #64748b #1d4ed8 #94a3b8".split(" "))])),
|
|
11
|
-
"#111827 #94a3b8 #22c55e #94a3b8 #f59e0b #1d4ed8 #374151 #1f2937 #ef4444 #475569 #64748b #64748b #273449 #93c5fd #3b82f6 #0f172a #f1f5f9 #94a3b8 #2563eb #64748b".split(" "))]))],null),
|
|
12
|
-
"#ffffff #5f7a7a #059669 #2dd4bf #d97706 #155e75 #99f6e4 #f0fdfa #e11d48 #115e59 #0f766e #14b8a6 #ccfbf1 #22d3ee #0891b2 #f0fdfa #134e4a #0d9488 #0e7490 #5eead4".split(" "))])),
|
|
13
|
-
"#0c1a1f #5eead4 #34d399 #5eead4 #fbbf24 #0e7490 #164e63 #133e4a #fb7185 #0f766e #0d9488 #2dd4bf #164e5e #67e8f9 #06b6d4 #061216 #ecfdf5 #14b8a6 #0891b2 #2dd4bf".split(" "))]))],null),
|
|
14
|
-
"#fffbeb #65753a #15803d #84cc16 #ca8a04 #14532d #d9d2b0 #fef9c3 #dc2626 #3f6212 #4d7c0f #65a30d #fef3c7 #4ade80 #15803d #fefce8 #1a2e05 #65a30d #166534 #a3e635".split(" "))])),
|
|
15
|
-
"#1a1f12 #86efac #4ade80 #bef264 #fbbf24 #15803d #3a4a24 #2a3318 #f87171 #4d7c0f #65a30d #a3e635 #354020 #86efac #22c55e #111408 #f0fdf4 #84cc16 #16a34a #a3e635".split(" "))]))],null),
|
|
16
|
-
"#ffffff #9a7b6b #16a34a #f97316 #ca8a04 #9a3412 #fed7aa #fff7ed #be123c #9f1239 #be123c #ea580c #ffedd5 #fb923c #ea580c #fffbf5 #431407 #e11d48 #c2410c #fb923c".split(" "))])),
|
|
17
|
-
"#1c1210 #fdba74 #4ade80 #fb923c #fbbf24 #c2410c #4a2d1f #2a1c17 #fb7185 #e11d48 #f43f5e #f97316 #3d261d #fdba74 #f97316 #140d0a #fff7ed #fb7185 #ea580c #fdba74".split(" "))]))],null),
|
|
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(";"))])),
|
|
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),
|
|
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(";"))])),
|
|
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)
|
|
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(";"))])),
|
|
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)
|
|
24
|
-
"#fefdfb #8b7355 #4d7c0f #c49250 #ca8a04 #78350f #d6c4a8 #fdf8f0 #dc2626 #713f12 #854d0e #b08040 #f5ebe0 #d97706 #b45309 #fdf8f0 #3b2417 #a16207 #92400e #d6a56a".split(" "))])),
|
|
25
|
-
"#1e1c18 #9c9488 #84cc16 #8e847c #fbbf24 #8e4a38 #44403a #2a2822 #f87171 #8a7052 #a18360 #7a7068 #38352e #d4a574 #c2785a #14130f #e8e0d4 #b8976e #a8604a #7a7068".split(" "))]))],null),
|
|
26
|
-
null],null),null);$APP.ha("baredom.exports.x_theme.registerPreset",
|
|
4
|
+
return $APP.od(new $APP.O(null,2,5,$APP.P,[x,$APP.k(g,x)],null),m($APP.Yb(p)))}return null}},null)}(Object.keys(g))}()):null]));return $APP.ja(CG,a,new $APP.Q(null,2,[zG,b,BG,d],null))},EG=function(a){var b=[];a=$APP.t(a);for(var c=null,d=0,e=0;;)if(e<d){var g=c.F(null,e),h=$APP.Ac(g,0,null);g=$APP.Ac(g,1,null);b.push(""+$APP.T.g(h)+":"+$APP.T.g(g)+";");e+=1}else if(a=$APP.t(a))$APP.Nc(a)?(d=$APP.yb(a),a=$APP.zb(a),c=d,d=$APP.z(d)):(d=$APP.u(a),c=$APP.Ac(d,0,null),d=$APP.Ac(d,1,null),b.push(""+$APP.T.g(c)+
|
|
5
|
+
":"+$APP.T.g(d)+";"),a=$APP.w(a),c=null,d=0),e=0;else break;return b.join("")},HG=function(a){a=typeof a!=="string"||!$APP.I(FG,a)&&$APP.k(CG,a)==null?"default":a;var b=$APP.k(CG,a);$APP.n(b)||(a=$APP.D(GG,a),b=$APP.n(a)?a:AG);a=zG.g(b);b=BG.g(b);return":host{display:contents;"+$APP.T.g(EG(a))+"}@media(prefers-color-scheme:dark){:host{"+$APP.T.g(EG(b))+"}}"},IG=function(a){Object.defineProperty(a,"preset",{get:function(){return this.getAttribute("preset")},set:function(b){return b!=null?this.setAttribute("preset",
|
|
6
|
+
""+$APP.T.g(b)):this.removeAttribute("preset")},enumerable:!0,configurable:!0})},KG=function(){var a=class extends HTMLElement{};a.observedAttributes=JG;a.prototype.connectedCallback=function(){if($APP.n($APP.k(this,"__xThemeRefs")))var b=null;else{b=this.attachShadow({mode:"open"});var c=document.createElement("style"),d=document.createElement("slot");c.textContent=HG(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.k(this,"__xThemeRefs");return $APP.n(b)?b.style.textContent=HG(this.getAttribute("preset")):null};IG(a.prototype);return a},LG=function(a,b){return DG(a,b)},MG=function(){return $APP.n(customElements.get("x-theme"))?null:customElements.define("x-theme",KG())},zG=new $APP.K(null,"light","light",1918998747),BG=new $APP.K(null,"dark","dark",1818973999);var JG=["preset"],NG=$APP.zf("--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(";")),OG=$APP.Pd("--x-radius-sm 0.375rem --x-radius-md 0.75rem --x-radius-lg 1rem --x-radius-full 9999px --x-border-width 1px".split(" ")),
|
|
8
|
+
PG=$APP.Pd(["--x-transition-duration","140ms","--x-transition-easing","cubic-bezier(0.2,0,0,1)"]),QG=$APP.Pd("--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(" ")),RG=$APP.Pd("--x-z-dropdown 1000 --x-z-modal 1100 --x-z-toast 1200".split(" ")),SG=$APP.Pd(["--x-opacity-disabled","0.5","--x-opacity-placeholder","0.6"]),TG=$APP.Pd("--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
|
+
UG=$APP.Pd("--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(";")),AG=new $APP.Q(null,2,[zG,$APP.Rf($APP.uc([NG,OG,PG,TG,QG,RG,SG,$APP.zf("--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
|
+
"#ffffff #64748b #16a34a #64748b #d97706 #1e40af #cbd5e1 #f8fafc #dc2626 #334155 #475569 #475569 #f1f5f9 #60a5fa #2563eb #f8fafc #0f172a #64748b #1d4ed8 #94a3b8".split(" "))])),BG,$APP.Rf($APP.uc([UG,$APP.zf("--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),VG=new $APP.Q(null,2,[zG,$APP.Rf($APP.uc([NG,OG,PG,TG,QG,RG,SG,$APP.zf("--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
|
+
"#ffffff #5f7a7a #059669 #2dd4bf #d97706 #155e75 #99f6e4 #f0fdfa #e11d48 #115e59 #0f766e #14b8a6 #ccfbf1 #22d3ee #0891b2 #f0fdfa #134e4a #0d9488 #0e7490 #5eead4".split(" "))])),BG,$APP.Rf($APP.uc([UG,$APP.zf("--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),WG=new $APP.Q(null,2,[zG,$APP.Rf($APP.uc([NG,OG,PG,TG,QG,RG,SG,$APP.zf("--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
|
+
"#fffbeb #65753a #15803d #84cc16 #ca8a04 #14532d #d9d2b0 #fef9c3 #dc2626 #3f6212 #4d7c0f #65a30d #fef3c7 #4ade80 #15803d #fefce8 #1a2e05 #65a30d #166534 #a3e635".split(" "))])),BG,$APP.Rf($APP.uc([UG,$APP.zf("--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),XG=new $APP.Q(null,2,[zG,$APP.Rf($APP.uc([NG,OG,PG,TG,QG,RG,SG,$APP.zf("--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
|
+
"#ffffff #9a7b6b #16a34a #f97316 #ca8a04 #9a3412 #fed7aa #fff7ed #be123c #9f1239 #be123c #ea580c #ffedd5 #fb923c #ea580c #fffbf5 #431407 #e11d48 #c2410c #fb923c".split(" "))])),BG,$APP.Rf($APP.uc([UG,$APP.zf("--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),YG=new $APP.Q(null,2,[zG,$APP.Rf($APP.uc([NG,PG,QG,RG,SG,$APP.zf("--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
|
+
"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(";"))])),BG,$APP.zf("--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),ZG=new $APP.Q(null,2,[zG,$APP.Rf($APP.uc([NG,OG,PG,QG,RG,SG,$APP.zf("--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
|
+
"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(";"))])),BG,$APP.zf("--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),$G=new $APP.Q(null,2,[zG,$APP.Rf($APP.uc([OG,PG,QG,RG,SG,$APP.zf("--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
|
+
"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(";"))])),BG,$APP.zf("--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),aH=new $APP.Q(null,2,[zG,$APP.Rf($APP.uc([NG,OG,PG,TG,QG,RG,SG,$APP.zf("--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
|
+
"#fefdfb #8b7355 #4d7c0f #c49250 #ca8a04 #78350f #d6c4a8 #fdf8f0 #dc2626 #713f12 #854d0e #b08040 #f5ebe0 #d97706 #b45309 #fdf8f0 #3b2417 #a16207 #92400e #d6a56a".split(" "))])),BG,$APP.Rf($APP.uc([UG,$APP.zf("--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),GG=new $APP.Q(null,8,["default",AG,"ocean",VG,"forest",WG,"sunset",XG,"neo-brutalist",YG,"aurora",ZG,"mono-ai",$G,"warm-mineral",aH],null),CG=Object.create(null),FG=new $APP.S(null,new $APP.Q(null,8,["warm-mineral",null,"mono-ai",null,"ocean",null,"aurora",null,"sunset",null,"forest",null,"neo-brutalist",null,"default",
|
|
26
|
+
null],null),null);$APP.ha("baredom.exports.x_theme.registerPreset",LG);$APP.ha("baredom.exports.x_theme.init",MG);export const init=MG;export const registerPreset=LG;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
// x-timeline-item.d.ts — auto-generated by generate_types.bb, do not edit
|
|
2
|
+
|
|
3
|
+
export function init(): void;
|
|
4
|
+
|
|
5
|
+
export interface XTimelineItemEventMap {
|
|
6
|
+
"x-timeline-item-connected": CustomEvent<{ status: string; label: string; position: string; disabled: boolean }>;
|
|
7
|
+
"x-timeline-item-disconnected": CustomEvent<{ status: string; label: string }>;
|
|
8
|
+
"x-timeline-item-click": CustomEvent<{ status: string; label: string }>;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface XTimelineItem extends HTMLElement {
|
|
12
|
+
label: string;
|
|
13
|
+
title: string;
|
|
14
|
+
status: string;
|
|
15
|
+
icon: string;
|
|
16
|
+
connector: string;
|
|
17
|
+
position: string;
|
|
18
|
+
disabled: boolean;
|
|
19
|
+
|
|
20
|
+
addEventListener<K extends keyof XTimelineItemEventMap>(
|
|
21
|
+
type: K,
|
|
22
|
+
listener: (this: XTimelineItem, ev: XTimelineItemEventMap[K]) => any,
|
|
23
|
+
options?: boolean | AddEventListenerOptions
|
|
24
|
+
): void;
|
|
25
|
+
addEventListener(
|
|
26
|
+
type: string,
|
|
27
|
+
listener: EventListenerOrEventListenerObject,
|
|
28
|
+
options?: boolean | AddEventListenerOptions
|
|
29
|
+
): void;
|
|
30
|
+
removeEventListener<K extends keyof XTimelineItemEventMap>(
|
|
31
|
+
type: K,
|
|
32
|
+
listener: (this: XTimelineItem, ev: XTimelineItemEventMap[K]) => any,
|
|
33
|
+
options?: boolean | EventListenerOptions
|
|
34
|
+
): void;
|
|
35
|
+
removeEventListener(
|
|
36
|
+
type: string,
|
|
37
|
+
listener: EventListenerOrEventListenerObject,
|
|
38
|
+
options?: boolean | EventListenerOptions
|
|
39
|
+
): void;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
declare global {
|
|
43
|
+
interface HTMLElementTagNameMap {
|
|
44
|
+
"x-timeline-item": XTimelineItem;
|
|
45
|
+
}
|
|
46
|
+
}
|