@vanelsas/baredom 2.3.1 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/README.md +3 -3
- package/dist/base.js +265 -264
- package/dist/integrity.json +98 -0
- package/dist/x-alert.js +17 -17
- package/dist/x-avatar-group.js +11 -11
- package/dist/x-avatar.js +14 -14
- 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-carousel.js +32 -32
- package/dist/x-chart.js +47 -47
- package/dist/x-checkbox.js +11 -11
- package/dist/x-chip.js +8 -8
- package/dist/x-collapse.js +10 -10
- package/dist/x-color-picker.js +42 -42
- package/dist/x-combobox.js +24 -24
- package/dist/x-command-palette.js +24 -24
- package/dist/x-container.js +6 -6
- package/dist/x-context-menu.js +18 -18
- package/dist/x-copy.js +22 -22
- package/dist/x-currency-field.js +22 -22
- package/dist/x-date-picker.js +37 -37
- package/dist/x-divider.js +8 -8
- package/dist/x-drawer.js +11 -11
- package/dist/x-dropdown.js +9 -9
- package/dist/x-fieldset.js +5 -5
- package/dist/x-file-download.js +7 -7
- package/dist/x-file-upload.js +26 -0
- package/dist/x-form-field.js +15 -15
- package/dist/x-form.js +10 -10
- package/dist/x-gaussian-blur.js +18 -18
- package/dist/x-grid.js +6 -6
- package/dist/x-icon.js +7 -7
- package/dist/x-image.js +18 -18
- package/dist/x-kinetic-font.js +28 -28
- package/dist/x-kinetic-typography.js +38 -38
- package/dist/x-liquid-dock.js +36 -36
- package/dist/x-liquid-fill.js +42 -42
- package/dist/x-liquid-glass.js +40 -40
- package/dist/x-menu-item.js +10 -10
- package/dist/x-menu.js +10 -10
- package/dist/x-metaball-cursor.js +27 -27
- 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 +30 -30
- package/dist/x-notification-center.js +10 -10
- package/dist/x-organic-divider.js +16 -16
- package/dist/x-organic-progress.js +35 -35
- package/dist/x-organic-shape.js +12 -12
- package/dist/x-pagination.js +16 -16
- package/dist/x-particle-button.js +49 -49
- package/dist/x-popover.js +23 -23
- package/dist/x-progress-circle.js +8 -8
- package/dist/x-progress.js +8 -8
- package/dist/x-radio.js +11 -11
- 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 -34
- package/dist/x-scroll-timeline.js +45 -45
- package/dist/x-scroll.js +40 -40
- package/dist/x-search-field.js +14 -14
- package/dist/x-select.js +9 -9
- package/dist/x-sidebar.js +16 -16
- package/dist/x-skeleton-group.js +13 -13
- package/dist/x-skeleton.js +1 -1
- package/dist/x-slider.js +16 -16
- package/dist/x-soft-body.js +20 -20
- package/dist/x-spacer.js +5 -5
- package/dist/x-spinner.js +5 -5
- package/dist/x-splash.js +13 -13
- package/dist/x-stat.js +11 -11
- package/dist/x-stepper.js +15 -15
- package/dist/x-switch.js +10 -10
- package/dist/x-tab.js +7 -7
- package/dist/x-table-cell.js +20 -20
- package/dist/x-table-row.js +10 -10
- package/dist/x-table.js +14 -14
- package/dist/x-tabs.js +11 -11
- package/dist/x-text-area.js +17 -17
- package/dist/x-theme.js +25 -25
- package/dist/x-timeline-item.js +20 -21
- package/dist/x-timeline.js +9 -9
- package/dist/x-toast.js +22 -22
- package/dist/x-toaster.js +8 -8
- package/dist/x-tooltip.js +12 -12
- package/dist/x-typography.js +8 -8
- package/dist/x-welcome-tour.js +66 -0
- package/package.json +10 -2
package/dist/x-container.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
3
|
-
this.setAttribute("center","false")}})},
|
|
4
|
-
$APP.U,$APP.
|
|
5
|
-
|
|
6
|
-
d.setAttribute("part","base");d.appendChild(e);b.appendChild(c);b.appendChild(d);this.__xContainerState={root:b,base:d,slot:e}}return
|
|
7
|
-
|
|
2
|
+
var FO=function(a,b,c){return typeof a==="string"&&$APP.I(b,a)?a:c},GO=function(a){return a.__xContainerState},HO=function(a){Object.defineProperty(a,"fluid",{configurable:!0,enumerable:!0,get:function(){return this.hasAttribute("fluid")},set:function(b){return $APP.Eg(this,"fluid",$APP.F(b))}})},IO=function(a){Object.defineProperty(a,"center",{configurable:!0,enumerable:!0,get:function(){return $APP.N("false",this.getAttribute("center"))},set:function(b){return $APP.F(b)?this.removeAttribute("center"):
|
|
3
|
+
this.setAttribute("center","false")}})},PO=function(a,b){a=new $APP.R(null,6,[JO,a.getAttribute("as"),$APP.Mh,a.getAttribute("size"),$APP.Lm,a.getAttribute("padding"),KO,$APP.N("false",a.getAttribute("center")),LO,a.hasAttribute("fluid"),$APP.U,a.getAttribute("label")],null);var c=$APP.M(a);a=$APP.D(c,JO);var d=$APP.D(c,$APP.Mh),e=$APP.D(c,$APP.Lm),g=$APP.D(c,KO),h=$APP.D(c,LO);c=$APP.D(c,$APP.U);a=new $APP.R(null,6,[JO,FO(a,MO,"div"),$APP.Mh,FO(d,NO,"lg"),$APP.Lm,FO(e,OO,"md"),KO,$APP.F(g),LO,$APP.F(h),
|
|
4
|
+
$APP.U,$APP.Lg(c)?c:null],null);h=JO.g(a);d=b.base;$APP.N(d.tagName.toLowerCase(),h)&&(e=b.root,g=b.slot,h=document.createElement(h),h.setAttribute("part","base"),h.appendChild(g),e.replaceChild(h,d),b.base=h);b=b.base;b.setAttribute("data-size",$APP.Mh.g(a));b.setAttribute("data-padding",$APP.Lm.g(a));b.setAttribute("data-center",$APP.n(KO.g(a))?"true":"false");b.setAttribute("data-fluid",$APP.n(LO.g(a))?"true":"false");a=$APP.U.g(a);return $APP.n(a)?b.setAttribute("aria-label",a):b.removeAttribute("aria-label")},
|
|
5
|
+
RO=function(){var a=class extends HTMLElement{};a.observedAttributes=QO;a.prototype.connectedCallback=function(){if(!$APP.n(GO(this))){var b=this.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("slot");c.textContent="\n :host{\n display:block;\n color-scheme:light dark;\n\n --x-container-max-width-xs:480px;\n --x-container-max-width-sm:640px;\n --x-container-max-width-md:768px;\n --x-container-max-width-lg:1024px;\n --x-container-max-width-xl:1280px;\n\n --x-container-padding-sm:0.5rem;\n --x-container-padding-md:1rem;\n --x-container-padding-lg:1.5rem;\n\n --x-container-padding-block:0;\n --x-container-margin-inline:auto;\n\n --x-container-bg:transparent;\n --x-container-color:var(--x-color-text, #0f172a);\n --x-container-border:transparent;\n --x-container-radius:0;\n --x-container-shadow:none;\n }\n\n @media (prefers-color-scheme: dark){\n :host{\n --x-container-bg:transparent;\n --x-container-color:var(--x-color-text, #e5e7eb);\n --x-container-border:transparent;\n --x-container-radius:0;\n --x-container-shadow:none;\n }\n }\n\n [part\x3d'base']{\n display:block;\n box-sizing:border-box;\n width:100%;\n max-width:var(--x-container-max-width-lg);\n padding-inline:var(--x-container-padding-md);\n padding-block:var(--x-container-padding-block);\n margin-inline:0;\n background:var(--x-container-bg);\n color:var(--x-container-color);\n border:1px solid var(--x-container-border);\n border-radius:var(--x-container-radius);\n box-shadow:var(--x-container-shadow);\n }\n\n [part\x3d'base'][data-size\x3d'xs']{max-width:var(--x-container-max-width-xs);}\n [part\x3d'base'][data-size\x3d'sm']{max-width:var(--x-container-max-width-sm);}\n [part\x3d'base'][data-size\x3d'md']{max-width:var(--x-container-max-width-md);}\n [part\x3d'base'][data-size\x3d'lg']{max-width:var(--x-container-max-width-lg);}\n [part\x3d'base'][data-size\x3d'xl']{max-width:var(--x-container-max-width-xl);}\n [part\x3d'base'][data-size\x3d'full']{max-width:none;width:100%;}\n\n [part\x3d'base'][data-padding\x3d'none']{padding-inline:0;}\n [part\x3d'base'][data-padding\x3d'sm']{padding-inline:var(--x-container-padding-sm);}\n [part\x3d'base'][data-padding\x3d'md']{padding-inline:var(--x-container-padding-md);}\n [part\x3d'base'][data-padding\x3d'lg']{padding-inline:var(--x-container-padding-lg);}\n\n [part\x3d'base'][data-center\x3d'true']{\n margin-inline:var(--x-container-margin-inline);\n }\n\n [part\x3d'base'][data-center\x3d'false']{\n margin-inline:0;\n }\n\n [part\x3d'base'][data-fluid\x3d'true']{\n max-width:none;\n width:100%;\n }\n\n ";
|
|
6
|
+
d.setAttribute("part","base");d.appendChild(e);b.appendChild(c);b.appendChild(d);this.__xContainerState={root:b,base:d,slot:e}}return PO(this,GO(this))};a.prototype.disconnectedCallback=function(){return null};a.prototype.attributeChangedCallback=function(){var b=GO(this);return $APP.n(b)?PO(this,b):null};IO(a.prototype);HO(a.prototype);return a},SO=function(){$APP.n(customElements.get("x-container"))||customElements.define("x-container",RO());return null},LO=new $APP.K(null,"fluid","fluid",-1823657759),
|
|
7
|
+
JO=new $APP.K(null,"as","as",1148689641),KO=new $APP.K(null,"center","center",-748944368);var MO=new $APP.S(null,new $APP.R(null,8,["article",null,"footer",null,"section",null,"main",null,"nav",null,"div",null,"aside",null,"header",null],null),null),NO=new $APP.S(null,new $APP.R(null,6,["xs",null,"md",null,"lg",null,"full",null,"xl",null,"sm",null],null),null),OO=new $APP.S(null,new $APP.R(null,4,["none",null,"md",null,"lg",null,"sm",null],null),null),QO="as size padding center fluid label".split(" ");$APP.ha("baredom.exports.x_container.init",SO);export const init=SO;
|
package/dist/x-context-menu.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
3
|
-
l=$APP.D(l,$APP.
|
|
4
|
-
2,[$APP.
|
|
5
|
-
$APP.
|
|
6
|
-
e)?e:"bottom-start";return new $APP.
|
|
7
|
-
b);b=document.createElement("div");b.setAttribute("part","panel");b.setAttribute("role","menu");b.setAttribute("tabindex","-1");a.shadowRoot.appendChild(b);return a},
|
|
8
|
-
e+=1}else if(a=$APP.t(a))c=a,$APP.Nc(c)?(a=$APP.yb(c),d=$APP.zb(c),c=a,g=$APP.z(a),a=d,d=g):(g=$APP.u(c),b.appendChild(g.cloneNode(!0)),a=$APP.w(c),c=null,d=0),e=0;else break},
|
|
9
|
-
a,"backdrop"):null}function e(h){var l=h.key,m=b.shadowRoot.activeElement;return $APP.
|
|
10
|
-
m=$APP.Ac(h,$APP.fd(m+(l-1),l),null),m=
|
|
11
|
-
a.__xContextMenuLayer=null,
|
|
12
|
-
var v=
|
|
13
|
-
b){if($APP.n(a.hasAttribute("disabled")))return null;b=b.getBoundingClientRect();var c=
|
|
14
|
-
|
|
15
|
-
b,{configurable:!0,enumerable:!0,get:function(){return this.hasAttribute(c)},set:function(d){return $APP.n(d)?this.setAttribute(c,""):this.removeAttribute(c)}})},
|
|
16
|
-
|
|
17
|
-
c={};c.root=b;c.slot=d;this.__xContextMenuRefs=c}return $APP.n(this.hasAttribute("open"))?this.removeAttribute("open"):null};a.prototype.disconnectedCallback=function(){var b=$APP.k(this,"__xContextMenuLayer");$APP.n(b)?($APP.
|
|
18
|
-
null;b=void 0;break a}}b=null}return b};
|
|
19
|
-
"offset-raw",-1418404095);var
|
|
2
|
+
var i6=function(a,b){return typeof a==="string"?(a=parseInt(a,10),$APP.r(isNaN(a))&&a>0?a:b):b},j6=function(a){return $APP.B.i(a,"bottom-start")?"top-start":$APP.B.i(a,"bottom-end")?"top-end":$APP.B.i(a,"top-start")?"bottom-start":$APP.B.i(a,"top-end")?"bottom-end":$APP.B.i(a,"right-start")?"left-start":$APP.B.i(a,"left-start")?"right-start":a},k6=function(a,b,c,d){var e=$APP.M(c);c=$APP.D(e,$APP.Jl);var g=$APP.D(e,$APP.Il),h=$APP.D(e,$APP.Xg);e=$APP.D(e,$APP.Yg);var l=$APP.M(d);d=$APP.D(l,$APP.Xg);
|
|
3
|
+
l=$APP.D(l,$APP.Yg);switch(a){case "bottom-start":return new $APP.R(null,2,[$APP.Jl,c,$APP.Il,g+e+b],null);case "bottom-end":return new $APP.R(null,2,[$APP.Jl,c+h-d,$APP.Il,g+e+b],null);case "top-start":return new $APP.R(null,2,[$APP.Jl,c,$APP.Il,g-l-b],null);case "top-end":return new $APP.R(null,2,[$APP.Jl,c+h-d,$APP.Il,g-l-b],null);case "right-start":return new $APP.R(null,2,[$APP.Jl,c+h+b,$APP.Il,g],null);case "left-start":return new $APP.R(null,2,[$APP.Jl,c-d-b,$APP.Il,g],null);default:return new $APP.R(null,
|
|
4
|
+
2,[$APP.Jl,c,$APP.Il,g+e+b],null)}},l6=function(a,b,c,d,e){function g(x){var y=k6(x,b,c,d);y=$APP.M(y);var A=$APP.D(y,$APP.Jl),C=$APP.D(y,$APP.Il);y=A>=8&&A+m<=h-8;var E=C>=8&&C+p<=l-8;A=$APP.sh.i($APP.oh.i(A,8),h-m-8);C=$APP.sh.i($APP.oh.i(C,8),l-p-8);return new $APP.R(null,5,[$APP.Jl,A,$APP.Il,C,$APP.vi,x,$APP.Vl,y&&E,$APP.Ek,$APP.oh.i(40,l-C-8)],null)}e=$APP.M(e);var h=$APP.D(e,$APP.Xg),l=$APP.D(e,$APP.Yg);e=$APP.M(d);var m=$APP.D(e,$APP.Xg),p=$APP.D(e,$APP.Yg),q=g(a),v=g(j6(a));return $APP.n(function(){var x=
|
|
5
|
+
$APP.Vl.g(q);return $APP.n(x)?x:$APP.r($APP.Vl.g(v))}())?q:v},q6=function(a){a=new $APP.R(null,5,[$APP.Gi,$APP.n(a.hasAttribute("open"))?a.getAttribute("open"):null,$APP.Ml,$APP.n(a.hasAttribute("disabled"))?a.getAttribute("disabled"):null,$APP.gn,a.getAttribute("placement"),m6,a.getAttribute("offset"),n6,a.getAttribute("z-index")],null);var b=$APP.M(a),c=$APP.D(b,$APP.Gi),d=$APP.D(b,$APP.Ml),e=$APP.D(b,$APP.gn);a=$APP.D(b,m6);b=$APP.D(b,n6);c=$APP.Kg(c);d=$APP.Kg(d);e=typeof e==="string"&&$APP.I(o6,
|
|
6
|
+
e)?e:"bottom-start";return new $APP.R(null,5,[$APP.Mm,c,$APP.X,d,$APP.Qj,e,$APP.ti,i6(a,8),p6,i6(b,1E3)],null)},r6=function(a,b,c,d){b=new CustomEvent(b,{detail:d,bubbles:!0,composed:!0,cancelable:c});a.dispatchEvent(b);return $APP.r(b.defaultPrevented)},s6=function(a){return $APP.uc(a.querySelectorAll("[role\x3dmenuitem]:not([disabled]):not([aria-disabled\x3dtrue])"))},t6=function(a){return $APP.n(a)?a.focus():null},u6=function(a,b){a=$APP.Pg(a,":host{color-scheme:light dark;--x-context-menu-bg:var(--x-color-bg,rgba(255,255,255,0.97));--x-context-menu-border:var(--x-color-border,rgba(0,0,0,0.1));--x-context-menu-shadow:var(--x-shadow-lg,0 8px 32px rgba(0,0,0,0.14),0 2px 8px rgba(0,0,0,0.08));--x-context-menu-radius:var(--x-radius-md,10px);--x-context-menu-item-hover:rgba(0,0,0,0.05);--x-context-menu-item-active:rgba(0,0,0,0.09);--x-context-menu-item-fg:var(--x-color-text,rgba(0,0,0,0.87));--x-context-menu-separator:var(--x-color-border,rgba(0,0,0,0.1));}@media(prefers-color-scheme:dark){:host{--x-context-menu-bg:var(--x-color-bg,#1e293b);--x-context-menu-border:var(--x-color-border,rgba(255,255,255,0.12));--x-context-menu-shadow:var(--x-shadow-lg,0 8px 32px rgba(0,0,0,0.7),0 2px 8px rgba(0,0,0,0.4));--x-context-menu-item-hover:rgba(255,255,255,0.08);--x-context-menu-item-active:rgba(255,255,255,0.14);--x-context-menu-item-fg:var(--x-color-text,rgba(255,255,255,0.9));--x-context-menu-separator:var(--x-color-border,rgba(255,255,255,0.12));}}[part\x3dpanel]{position:absolute;min-width:160px;max-width:calc(100vw - 1rem);border-radius:var(--x-context-menu-radius);background:var(--x-context-menu-bg);border:1px solid var(--x-context-menu-border);box-shadow:var(--x-context-menu-shadow);padding:4px 0;overflow:auto;pointer-events:auto;outline:none;@media(prefers-reduced-motion:no-preference){transition:opacity 120ms ease,transform 120ms ease;}}[role\x3dmenuitem]{color:var(--x-context-menu-item-fg);}[role\x3dmenuitem]:hover{background:var(--x-context-menu-item-hover);}",
|
|
7
|
+
b);b=document.createElement("div");b.setAttribute("part","panel");b.setAttribute("role","menu");b.setAttribute("tabindex","-1");a.shadowRoot.appendChild(b);return a},v6=function(a,b,c,d){var e=$APP.M(d);d=$APP.D(e,p6);e=$APP.D(e,$APP.Ek);a.style.zIndex=""+$APP.T.g(d);a=$APP.Qg(a);$APP.n(a)&&(a.style.left=""+$APP.T.g(b)+"px",a.style.top=""+$APP.T.g(c)+"px",a.style.maxHeight=""+$APP.T.g(e)+"px")},w6=function(a,b){a=$APP.t($APP.uc(a.children));for(var c=null,d=0,e=0;;)if(e<d){var g=c.F(null,e);b.appendChild(g.cloneNode(!0));
|
|
8
|
+
e+=1}else if(a=$APP.t(a))c=a,$APP.Nc(c)?(a=$APP.yb(c),d=$APP.zb(c),c=a,g=$APP.z(a),a=d,d=g):(g=$APP.u(c),b.appendChild(g.cloneNode(!0)),a=$APP.w(c),c=null,d=0),e=0;else break},y6=function(a,b){function c(h){h.stopPropagation();h=h.target.closest("[role\x3dmenuitem]");return $APP.n(h)?(r6(a,"x-context-menu-select",!1,{item:h}),x6.i?x6.i(a,"select"):x6.call(null,a,"select")):null}function d(h){var l=$APP.Qg(b);return $APP.n($APP.n(l)?$APP.r(l.contains(h.target)):l)?x6.i?x6.i(a,"backdrop"):x6.call(null,
|
|
9
|
+
a,"backdrop"):null}function e(h){var l=h.key,m=b.shadowRoot.activeElement;return $APP.B.i(l,"Escape")?(h.preventDefault(),h.stopPropagation(),x6.i?x6.i(a,"keyboard"):x6.call(null,a,"keyboard")):$APP.B.i(l,"Tab")?x6.i?x6.i(a,"keyboard"):x6.call(null,a,"keyboard"):$APP.B.i(l,"ArrowDown")?(h.preventDefault(),$APP.n(m)?(h=s6(g),m=$APP.zd(h).indexOf(m),m=$APP.Ac(h,$APP.fd(m+1,$APP.z(h)),null),m=t6(m)):m=t6($APP.u(s6(g))),m):$APP.B.i(l,"ArrowUp")?(h.preventDefault(),$APP.n(m)?(h=s6(g),l=$APP.z(h),m=$APP.zd(h).indexOf(m),
|
|
10
|
+
m=$APP.Ac(h,$APP.fd(m+(l-1),l),null),m=t6(m)):m=t6($APP.u(s6(g))),m):($APP.B.i(l,"Enter")||$APP.B.i(l," "))&&$APP.n(m)?(h.preventDefault(),m.click()):null}var g=$APP.Qg(b);b.addEventListener("keydown",e,!0);b.addEventListener("click",d);$APP.n(g)&&g.addEventListener("click",c);b.__onKey=e;b.__onClickBackdrop=d;b.__onItemClick=c},x6=function(a,b){return $APP.n(a.hasAttribute("open"))&&r6(a,"x-context-menu-close-request",!0,{reason:b})?(a.removeAttribute("open"),$APP.Rg($APP.k(a,"__xContextMenuLayer")),
|
|
11
|
+
a.__xContextMenuLayer=null,r6(a,"x-context-menu-close",!1,{reason:b})):null},z6=function(a,b,c,d){if($APP.n(a.hasAttribute("disabled")))return null;if(r6(a,"x-context-menu-open-request",!0,{reason:d})){var e=q6(a);e=$APP.M(e);var g=$APP.D(e,$APP.Qj),h=$APP.D(e,$APP.ti),l=$APP.D(e,p6),m=window.innerWidth,p=window.innerHeight,q=new $APP.R(null,4,[$APP.Jl,b,$APP.Il,c,$APP.Xg,1,$APP.Yg,1],null);b=l6(g,h,q,new $APP.R(null,2,[$APP.Xg,200,$APP.Yg,300],null),new $APP.R(null,2,[$APP.Xg,m,$APP.Yg,p],null));
|
|
12
|
+
var v=u6(a,l);w6(a,$APP.Qg(v));y6(a,v);v6(v,$APP.Jl.g(b),$APP.Il.g(b),$APP.mh.m(b,p6,l));a.setAttribute("open","");a.__xContextMenuLayer=v;requestAnimationFrame(function(){var x=$APP.Qg(v);if($APP.n(x)){var y=l6(g,h,q,new $APP.R(null,2,[$APP.Xg,x.offsetWidth,$APP.Yg,x.offsetHeight],null),new $APP.R(null,2,[$APP.Xg,m,$APP.Yg,p],null));v6(v,$APP.Jl.g(y),$APP.Il.g(y),$APP.mh.m(y,p6,l));return t6($APP.u(s6(x)))}return null});return r6(a,"x-context-menu-open",!1,{reason:d})}return null},A6=function(a,
|
|
13
|
+
b){if($APP.n(a.hasAttribute("disabled")))return null;b=b.getBoundingClientRect();var c=q6(a);c=$APP.M(c);var d=$APP.D(c,$APP.Qj),e=$APP.D(c,$APP.ti),g=$APP.D(c,p6),h=window.innerWidth,l=window.innerHeight,m=new $APP.R(null,4,[$APP.Jl,b.left,$APP.Il,b.top,$APP.Xg,b.width,$APP.Yg,b.height],null);if(r6(a,"x-context-menu-open-request",!0,{reason:"programmatic"})){b=l6(d,e,m,new $APP.R(null,2,[$APP.Xg,200,$APP.Yg,300],null),new $APP.R(null,2,[$APP.Xg,h,$APP.Yg,l],null));var p=u6(a,g);w6(a,$APP.Qg(p));
|
|
14
|
+
y6(a,p);v6(p,$APP.Jl.g(b),$APP.Il.g(b),$APP.mh.m(b,p6,g));a.setAttribute("open","");a.__xContextMenuLayer=p;requestAnimationFrame(function(){var q=$APP.Qg(p);if($APP.n(q)){var v=l6(d,e,m,new $APP.R(null,2,[$APP.Xg,q.offsetWidth,$APP.Yg,q.offsetHeight],null),new $APP.R(null,2,[$APP.Xg,h,$APP.Yg,l],null));v6(p,$APP.Jl.g(v),$APP.Il.g(v),$APP.mh.m(v,p6,g));return t6($APP.u(s6(q)))}return null});return r6(a,"x-context-menu-open",!1,{reason:"programmatic"})}return null},B6=function(a,b,c){Object.defineProperty(a,
|
|
15
|
+
b,{configurable:!0,enumerable:!0,get:function(){return this.hasAttribute(c)},set:function(d){return $APP.n(d)?this.setAttribute(c,""):this.removeAttribute(c)}})},C6=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){return this.getAttribute(c)},set:function(d){return d!=null?this.setAttribute(c,""+$APP.T.g(d)):this.removeAttribute(c)}})},D6=function(a){a.openAt=function(b,c){return z6(this,b,c,"programmatic")};a.toggleAt=function(b,c){return $APP.n(this.hasAttribute("open"))?
|
|
16
|
+
x6(this,"toggle"):z6(this,b,c,"toggle")};a.openForElement=function(b){return A6(this,b)};a.close=function(){return x6(this,"programmatic")}},F6=function(){var a=class extends HTMLElement{};a.observedAttributes=E6;a.prototype.connectedCallback=function(){if(!$APP.n($APP.k(this,"__xContextMenuRefs"))){var b=this.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("slot");c.textContent=":host{display:contents;}slot{display:none;}";b.appendChild(c);b.appendChild(d);
|
|
17
|
+
c={};c.root=b;c.slot=d;this.__xContextMenuRefs=c}return $APP.n(this.hasAttribute("open"))?this.removeAttribute("open"):null};a.prototype.disconnectedCallback=function(){var b=$APP.k(this,"__xContextMenuLayer");$APP.n(b)?($APP.Rg(b),this.__xContextMenuLayer=null,b=void 0):b=null;return b};a.prototype.attributeChangedCallback=function(b){a:{if($APP.B.i(b,"open")){if($APP.n(this.hasAttribute("open"))){b=null;break a}b=$APP.k(this,"__xContextMenuLayer");if($APP.n(b)){$APP.Rg(b);this.__xContextMenuLayer=
|
|
18
|
+
null;b=void 0;break a}}b=null}return b};B6(a.prototype,"open","open");B6(a.prototype,"disabled","disabled");C6(a.prototype,"placement","placement");C6(a.prototype,"offset","offset");C6(a.prototype,"zIndex","z-index");D6(a.prototype);return a},G6=function(){return $APP.n(customElements.get("x-context-menu"))?null:customElements.define("x-context-menu",F6())},n6=new $APP.K(null,"z-index-raw","z-index-raw",-1179679257),p6=new $APP.K(null,"z-index","z-index",1892827090),m6=new $APP.K(null,"offset-raw",
|
|
19
|
+
"offset-raw",-1418404095);var E6=["open","disabled","placement","offset","z-index"],o6=new $APP.S(null,new $APP.R(null,6,["right-start",null,"bottom-start",null,"bottom-end",null,"top-end",null,"top-start",null,"left-start",null],null),null);$APP.ha("baredom.exports.x_context_menu.init",G6);export const init=G6;
|
package/dist/x-copy.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
3
|
-
$APP.
|
|
4
|
-
$APP.M(a);a=$APP.D(b,$APP.
|
|
2
|
+
var ME=function(a){return a==null?!0:$APP.B.i(a,"false")?!1:$APP.B.i(a,"0")?!1:!0},NE=function(a){return typeof a==="string"&&$APP.N(a,"")?(a=parseInt(a,10),$APP.r(isNaN(a))&&a>0?a:1200):1200},OE=function(a){return Math.min(1E4,Math.max(100,a))},bF=function(a){var b=$APP.M(a);a=$APP.D(b,PE);var c=$APP.D(b,QE),d=$APP.D(b,RE),e=$APP.D(b,$APP.Kh),g=$APP.D(b,$APP.vl),h=$APP.D(b,SE),l=$APP.D(b,TE),m=$APP.D(b,$APP.Ml),p=$APP.D(b,UE);b=$APP.D(b,VE);return $APP.zf([WE,$APP.wj,XE,YE,ZE,$APP.Vh,$E,$APP.X,aF,
|
|
3
|
+
$APP.Al],[ME(b),$APP.B.i(g,"html")?"html":"text",typeof l==="string"&&$APP.N(l.trim(),"")?l.trim():null,typeof a==="string"&&$APP.N(a.trim(),"")?a.trim():null,OE(NE(c)),typeof d==="string"&&$APP.N(d.trim(),"")?d.trim():null,function(){var q;if(q=typeof h==="string")q=(q=$APP.N(h,""))?h:q;return $APP.n(q)?q:"Copy failed"}(),$APP.F(m),function(){var q;if(q=typeof p==="string")q=(q=$APP.N(p,""))?p:q;return $APP.n(q)?q:"Copied"}(),typeof e==="string"&&$APP.N(e.trim(),"")?e.trim():null])},cF=function(a){var b=
|
|
4
|
+
$APP.M(a);a=$APP.D(b,$APP.Al);var c=$APP.D(b,$APP.Vh),d=$APP.D(b,XE);b=$APP.D(b,$APP.wj);return{text:$APP.n(a)?a:"",mode:$APP.n(b)?b:"text",from:$APP.n(c)?c:null,fromAttr:$APP.n(d)?d:null}},dF=function(a){var b=$APP.k(a,"__xCopyRefs");if($APP.n(b))return b;b=a.attachShadow({mode:"open"});var c=document.createElement("style"),d=document.createElement("span"),e=document.createElement("button"),g=document.createElement("slot"),h=document.createElement("span"),l=document.createElement("slot"),m=document.createElement("span");
|
|
5
5
|
c.textContent=":host{display:inline-block;position:relative;color-scheme:light dark;--x-copy-tooltip-bg:var(--x-color-bg,#1e293b);--x-copy-tooltip-fg:var(--x-color-text,#f8fafc);--x-copy-tooltip-success-bg:var(--x-color-primary,#15803d);--x-copy-tooltip-success-fg:#ffffff;--x-copy-tooltip-error-bg:var(--x-color-danger,#b91c1c);--x-copy-tooltip-error-fg:#fef2f2;--x-copy-tooltip-radius:var(--x-radius-md,6px);--x-copy-tooltip-padding:4px 8px;--x-copy-tooltip-font-size:var(--x-font-size-sm,0.8125rem);--x-copy-tooltip-z:100;}@media (prefers-color-scheme:dark){:host{--x-copy-tooltip-bg:var(--x-color-bg,#0f172a);--x-copy-tooltip-fg:var(--x-color-text,#e2e8f0);--x-copy-tooltip-success-bg:var(--x-color-primary,#166534);--x-copy-tooltip-success-fg:#ffffff;--x-copy-tooltip-error-bg:var(--x-color-danger,#991b1b);--x-copy-tooltip-error-fg:#fee2e2;}}[part\x3dwrap]{display:inline-flex;align-items:center;justify-content:center;}[part\x3dtrigger]{all:unset;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;box-sizing:border-box;}[part\x3dtrigger]:focus-visible{outline:2px solid currentColor;outline-offset:2px;}:host([disabled]) [part\x3dtrigger]{opacity:0.55;pointer-events:none;cursor:default;}[part\x3dtooltip]{display:none;position:absolute;bottom:calc(100% + 6px);left:50%;transform:translateX(-50%);white-space:nowrap;background:var(--x-copy-tooltip-bg);color:var(--x-copy-tooltip-fg);border-radius:var(--x-copy-tooltip-radius);padding:var(--x-copy-tooltip-padding);font-size:var(--x-copy-tooltip-font-size);z-index:var(--x-copy-tooltip-z);pointer-events:none;}:host([data-tooltip-open]) [part\x3dtooltip]{display:block;}:host([data-tooltip-kind\x3dsuccess]) [part\x3dtooltip]{background:var(--x-copy-tooltip-success-bg);color:var(--x-copy-tooltip-success-fg);}:host([data-tooltip-kind\x3derror]) [part\x3dtooltip]{background:var(--x-copy-tooltip-error-bg);color:var(--x-copy-tooltip-error-fg);}@media (prefers-reduced-motion:reduce){[part\x3dtrigger]{transition:none;}}";
|
|
6
|
-
d.setAttribute("part","wrap");e.setAttribute("part","trigger");e.setAttribute("type","button");e.appendChild(g);h.setAttribute("part","tooltip");h.setAttribute("role","status");h.setAttribute("aria-live","polite");l.setAttribute("name","tooltip");m.setAttribute("part","tooltip-text");h.appendChild(l);h.appendChild(m);d.appendChild(e);d.appendChild(h);b.appendChild(c);b.appendChild(d);a.__xCopyRefs={root:b,wrap:d,trigger:e,tooltip:h,tooltipSlot:l,tooltipText:m};return $APP.k(a,"__xCopyRefs")},
|
|
7
|
-
$APP.
|
|
8
|
-
return typeof b==="string"&&$APP.N(b,"")&&(b=document.querySelector(b),$APP.n(b))?(a=a.getAttribute("from-attr"),a=typeof a==="string"&&$APP.N(a,"")?b.getAttribute(a):b.textContent,$APP.n(a)?a:""):""},
|
|
6
|
+
d.setAttribute("part","wrap");e.setAttribute("part","trigger");e.setAttribute("type","button");e.appendChild(g);h.setAttribute("part","tooltip");h.setAttribute("role","status");h.setAttribute("aria-live","polite");l.setAttribute("name","tooltip");m.setAttribute("part","tooltip-text");h.appendChild(l);h.appendChild(m);d.appendChild(e);d.appendChild(h);b.appendChild(c);b.appendChild(d);a.__xCopyRefs={root:b,wrap:d,trigger:e,tooltip:h,tooltipSlot:l,tooltipText:m};return $APP.k(a,"__xCopyRefs")},eF=function(a){return bF($APP.zf([RE,
|
|
7
|
+
$APP.Kh,$APP.vl,SE,TE,$APP.Ml,UE,VE,PE,QE],[a.getAttribute("from"),a.getAttribute("text"),a.getAttribute("mode"),a.getAttribute("error-message"),a.getAttribute("from-attr"),a.hasAttribute("disabled"),a.getAttribute("success-message"),a.getAttribute("show-tooltip"),a.getAttribute("hotkey"),a.getAttribute("tooltip-ms")]))},fF=function(a){var b=$APP.k(a,"__xCopyTextValue");if(typeof b==="string")return b;b=a.getAttribute("text");if(typeof b==="string"&&$APP.N(b,""))return b;b=a.getAttribute("from");
|
|
8
|
+
return typeof b==="string"&&$APP.N(b,"")&&(b=document.querySelector(b),$APP.n(b))?(a=a.getAttribute("from-attr"),a=typeof a==="string"&&$APP.N(a,"")?b.getAttribute(a):b.textContent,$APP.n(a)?a:""):""},gF=function(a){var b=fF(a),c=function(){var d=a.getAttribute("mode");return $APP.n(d)?d:"text"}();return new Promise(function(d,e){if($APP.B.i(c,"html")){if($APP.n(function(){var h=navigator.clipboard;return $APP.n(h)?window.ClipboardItem:h}()))return navigator.clipboard.write($APP.Hh(new $APP.O(null,
|
|
9
9
|
1,5,$APP.P,[new ClipboardItem({"text/html":new Blob([b],{type:"text/html"}),"text/plain":new Blob([b],{type:"text/plain"})})],null))).then(function(){return d.g?d.g(b):d.call(null,b)}).catch(function(h){return e.g?e.g(h):e.call(null,h)});try{var g=document.createElement("textarea");g.value=b;document.body.appendChild(g);g.select();document.execCommand("copy");g.remove();return d.g?d.g(b):d.call(null,b)}catch(h){if(h instanceof Error)return g=h,e.g?e.g(g):e.call(null,g);throw h;}}else{if($APP.n(navigator.clipboard))return navigator.clipboard.writeText(b).then(function(){return d.g?
|
|
10
|
-
d.g(b):d.call(null,b)}).catch(function(h){try{return document.execCommand("copy"),d.g?d.g(b):d.call(null,b)}catch(l){if(l instanceof Error)return e.g?e.g(h):e.call(null,h);throw l;}});try{return g=document.createElement("textarea"),g.value=b,g.style.position="fixed",g.style.opacity="0",document.body.appendChild(g),g.select(),document.execCommand("copy"),g.remove(),d.g?d.g(b):d.call(null,b)}catch(h){if(h instanceof Error)return g=h,e.g?e.g(g):e.call(null,g);throw h;}}})},
|
|
11
|
-
$APP.k(a,"__xCopyRefs");if($APP.n(e)){var g=$APP.k(a,"__xCopyTid");$APP.n(g)&&(clearTimeout(g),a.__xCopyTid=null);a.setAttribute("data-tooltip-open","");a.setAttribute("data-tooltip-kind",b);$APP.k(e,"tooltipText").textContent=c;$APP.ja(a,"__xCopyTid",setTimeout(function(){a.__xCopyTid=null;a.removeAttribute("data-tooltip-open");a.removeAttribute("data-tooltip-kind");var h=$APP.k(a,"__xCopyRefs");$APP.n(h)&&($APP.k(h,"tooltipText").textContent="");return null},d))}},
|
|
12
|
-
{detail:c,bubbles:!0,composed:!0,cancelable:d});a.dispatchEvent(b);return b},
|
|
13
|
-
return Promise.reject(d)})},
|
|
14
|
-
|
|
15
|
-
"click");b=$APP.k(b,"keydown");$APP.n(d)&&c.removeEventListener("click",d);$APP.n(b)&&document.removeEventListener("keydown",b)}a.__xCopyHandlers=null},
|
|
16
|
-
2,5,$APP.P,["fromAttr","from-attr"],null),new $APP.O(null,2,5,$APP.P,["mode","mode"],null),new $APP.O(null,2,5,$APP.P,["successMessage","success-message"],null),new $APP.O(null,2,5,$APP.P,["errorMessage","error-message"],null),new $APP.O(null,2,5,$APP.P,["hotkey","hotkey"],null)],null)),c=null,d=0,e=0;;)if(e<d){var g=c.F(null,e),h=$APP.Ac(g,0,null),l=$APP.Ac(g,1,null);Object.defineProperty(a,h,{get:function(q,v,x,y,A,
|
|
17
|
-
v,x,y,A,
|
|
18
|
-
this.setAttribute(E,""+$APP.T.g(
|
|
19
|
-
"true"):this.setAttribute("show-tooltip","false")},enumerable:!0,configurable:!0});Object.defineProperty(a,"tooltipMs",{get:function(){return
|
|
20
|
-
configurable:!0});Object.defineProperty(a,"copy",{value:function(){return
|
|
21
|
-
customElements.define("x-copy",
|
|
22
|
-
"from-attr-raw","from-attr-raw",761657416),
|
|
23
|
-
$APP.zf([new $APP.K(null,"errorMessage","errorMessage",982744869),$APP.
|
|
24
|
-
"note","note",1426297904),"property-only override"],null),new $APP.
|
|
25
|
-
$APP.Y,$APP.
|
|
10
|
+
d.g(b):d.call(null,b)}).catch(function(h){try{return document.execCommand("copy"),d.g?d.g(b):d.call(null,b)}catch(l){if(l instanceof Error)return e.g?e.g(h):e.call(null,h);throw l;}});try{return g=document.createElement("textarea"),g.value=b,g.style.position="fixed",g.style.opacity="0",document.body.appendChild(g),g.select(),document.execCommand("copy"),g.remove(),d.g?d.g(b):d.call(null,b)}catch(h){if(h instanceof Error)return g=h,e.g?e.g(g):e.call(null,g);throw h;}}})},hF=function(a,b,c,d){var e=
|
|
11
|
+
$APP.k(a,"__xCopyRefs");if($APP.n(e)){var g=$APP.k(a,"__xCopyTid");$APP.n(g)&&(clearTimeout(g),a.__xCopyTid=null);a.setAttribute("data-tooltip-open","");a.setAttribute("data-tooltip-kind",b);$APP.k(e,"tooltipText").textContent=c;$APP.ja(a,"__xCopyTid",setTimeout(function(){a.__xCopyTid=null;a.removeAttribute("data-tooltip-open");a.removeAttribute("data-tooltip-kind");var h=$APP.k(a,"__xCopyRefs");$APP.n(h)&&($APP.k(h,"tooltipText").textContent="");return null},d))}},iF=function(a,b,c,d){b=new CustomEvent(b,
|
|
12
|
+
{detail:c,bubbles:!0,composed:!0,cancelable:d});a.dispatchEvent(b);return b},jF=function(a){if($APP.n(a.hasAttribute("disabled")))return Promise.resolve(null);var b=eF(a),c=cF(b);c=iF(a,"x-copy-request",c,!0);return $APP.n(c.defaultPrevented)?Promise.resolve(null):gF(a).then(function(d){iF(a,"x-copy-success",{text:$APP.n(d)?d:""},!1);$APP.n(WE.g(b))&&hF(a,"success",aF.g(b),ZE.g(b));return d}).catch(function(d){iF(a,"x-copy-error",{error:""+$APP.T.g(d)},!1);$APP.n(WE.g(b))&&hF(a,"error",$E.g(b),ZE.g(b));
|
|
13
|
+
return Promise.reject(d)})},kF=function(a,b){if(typeof b==="string"&&$APP.N(b,"")){var c=b.toLowerCase().split("+");b=$APP.xc(c);var d=$APP.F($APP.Td(function(h){return $APP.B.i(h,"ctrl")},c)),e=$APP.F($APP.Td(function(h){return $APP.B.i(h,"shift")},c)),g=$APP.F($APP.Td(function(h){return $APP.B.i(h,"alt")},c));c=$APP.F($APP.Td(function(h){return $APP.B.i(h,"meta")},c));return $APP.B.i(a.key.toLowerCase(),b)&&$APP.B.i(d,a.ctrlKey)&&$APP.B.i(e,a.shiftKey)&&$APP.B.i(g,a.altKey)&&$APP.B.i(c,a.metaKey)}return null},
|
|
14
|
+
lF=function(a){function b(e){var g=a.getAttribute("hotkey");return $APP.n(kF(e,g))?(e.preventDefault(),jF(a)):null}function c(){return jF(a)}var d=dF(a);$APP.k(d,"trigger").addEventListener("click",c);document.addEventListener("keydown",b);$APP.ja(a,"__xCopyHandlers",{click:c,keydown:b})},mF=function(a){var b=$APP.k(a,"__xCopyTid");$APP.n(b)&&(clearTimeout(b),a.__xCopyTid=null);b=$APP.k(a,"__xCopyHandlers");var c=$APP.k(a,"__xCopyRefs");if($APP.n($APP.n(b)?c:b)){c=$APP.k(c,"trigger");var d=$APP.k(b,
|
|
15
|
+
"click");b=$APP.k(b,"keydown");$APP.n(d)&&c.removeEventListener("click",d);$APP.n(b)&&document.removeEventListener("keydown",b)}a.__xCopyHandlers=null},nF=function(a){var b=dF(a),c=a.hasAttribute("disabled");$APP.k(b,"trigger").disabled=$APP.F(c);$APP.n(c)?a.setAttribute("aria-disabled","true"):a.removeAttribute("aria-disabled")},oF=function(a){for(var b=$APP.t(new $APP.O(null,7,5,$APP.P,[new $APP.O(null,2,5,$APP.P,["text","text"],null),new $APP.O(null,2,5,$APP.P,["from","from"],null),new $APP.O(null,
|
|
16
|
+
2,5,$APP.P,["fromAttr","from-attr"],null),new $APP.O(null,2,5,$APP.P,["mode","mode"],null),new $APP.O(null,2,5,$APP.P,["successMessage","success-message"],null),new $APP.O(null,2,5,$APP.P,["errorMessage","error-message"],null),new $APP.O(null,2,5,$APP.P,["hotkey","hotkey"],null)],null)),c=null,d=0,e=0;;)if(e<d){var g=c.F(null,e),h=$APP.Ac(g,0,null),l=$APP.Ac(g,1,null);Object.defineProperty(a,h,{get:function(q,v,x,y,A,C,E){return function(){return this.getAttribute(E)}}(b,c,d,e,g,h,l),set:function(q,
|
|
17
|
+
v,x,y,A,C,E){return function(H){return H==null?this.removeAttribute(E):this.setAttribute(E,""+$APP.T.g(H))}}(b,c,d,e,g,h,l),enumerable:!0,configurable:!0});e+=1}else if(h=$APP.t(b)){g=h;if($APP.Nc(g))b=$APP.yb(g),e=$APP.zb(g),c=b,d=$APP.z(b),b=e;else{l=$APP.u(g);var m=$APP.Ac(l,0,null),p=$APP.Ac(l,1,null);Object.defineProperty(a,m,{get:function(q,v,x,y,A,C,E){return function(){return this.getAttribute(E)}}(b,c,d,e,l,m,p,g,h),set:function(q,v,x,y,A,C,E){return function(H){return H==null?this.removeAttribute(E):
|
|
18
|
+
this.setAttribute(E,""+$APP.T.g(H))}}(b,c,d,e,l,m,p,g,h),enumerable:!0,configurable:!0});b=$APP.w(g);c=null;d=0}e=0}else break;Object.defineProperty(a,"disabled",{get:function(){return this.hasAttribute("disabled")},set:function(q){return $APP.n(q)?this.setAttribute("disabled",""):this.removeAttribute("disabled")},enumerable:!0,configurable:!0});Object.defineProperty(a,"showTooltip",{get:function(){return ME(this.getAttribute("show-tooltip"))},set:function(q){return $APP.n(q)?this.setAttribute("show-tooltip",
|
|
19
|
+
"true"):this.setAttribute("show-tooltip","false")},enumerable:!0,configurable:!0});Object.defineProperty(a,"tooltipMs",{get:function(){return NE(this.getAttribute("tooltip-ms"))},set:function(q){return q==null?this.removeAttribute("tooltip-ms"):this.setAttribute("tooltip-ms",""+$APP.T.g(q|0))},enumerable:!0,configurable:!0});Object.defineProperty(a,"textValue",{get:function(){return $APP.k(this,"__xCopyTextValue")},set:function(q){this.__xCopyTextValue=typeof q==="string"?q:void 0},enumerable:!0,
|
|
20
|
+
configurable:!0});Object.defineProperty(a,"copy",{value:function(){return jF(this)},enumerable:!0,configurable:!0,writable:!0})},qF=function(){var a=class extends HTMLElement{};a.observedAttributes=pF;a.prototype.connectedCallback=function(){dF(this);mF(this);lF(this);nF(this);return null};a.prototype.disconnectedCallback=function(){mF(this);return null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.N(c,d)&&nF(this);return null};oF(a.prototype);return a},rF=function(){$APP.n(customElements.get("x-copy"))||
|
|
21
|
+
customElements.define("x-copy",qF());return null},WE=new $APP.K(null,"show-tooltip?","show-tooltip?",-1214081087),QE=new $APP.K(null,"tooltip-ms-raw","tooltip-ms-raw",-1973326401),aF=new $APP.K(null,"success-message","success-message",-96541601),SE=new $APP.K(null,"error-message-raw","error-message-raw",1910536231),YE=new $APP.K(null,"hotkey","hotkey",-329017295),$E=new $APP.K(null,"error-message","error-message",1756021561),sF=new $APP.K(null,"fromAttr","fromAttr",-1768252533),TE=new $APP.K(null,
|
|
22
|
+
"from-attr-raw","from-attr-raw",761657416),ZE=new $APP.K(null,"tooltip-ms","tooltip-ms",1062450417),UE=new $APP.K(null,"success-message-raw","success-message-raw",388691116),RE=new $APP.K(null,"from-raw","from-raw",-44462428),XE=new $APP.K(null,"from-attr","from-attr",1217901743),PE=new $APP.K(null,"hotkey-raw","hotkey-raw",1972404222),VE=new $APP.K(null,"show-tooltip-raw","show-tooltip-raw",453600717);var pF="text from from-attr mode disabled show-tooltip tooltip-ms success-message error-message hotkey".split(" ");
|
|
23
|
+
$APP.zf([new $APP.K(null,"errorMessage","errorMessage",982744869),$APP.Pj,new $APP.K(null,"textValue","textValue",-598870870),$APP.wj,sF,new $APP.K(null,"tooltipMs","tooltipMs",1056463375),YE,$APP.Vh,new $APP.K(null,"showTooltip","showTooltip",482349691),new $APP.K(null,"successMessage","successMessage",-789572803),$APP.Al],[new $APP.R(null,2,[$APP.Z,$APP.Y,$APP.Ik,"error-message"],null),new $APP.R(null,2,[$APP.Z,$APP.Zj,$APP.Ik,"disabled"],null),new $APP.R(null,3,[$APP.Z,$APP.Y,$APP.Ik,null,new $APP.K(null,
|
|
24
|
+
"note","note",1426297904),"property-only override"],null),new $APP.R(null,2,[$APP.Z,$APP.Y,$APP.Ik,"mode"],null),new $APP.R(null,2,[$APP.Z,$APP.Y,$APP.Ik,"from-attr"],null),new $APP.R(null,2,[$APP.Z,$APP.W,$APP.Ik,"tooltip-ms"],null),new $APP.R(null,2,[$APP.Z,$APP.Y,$APP.Ik,"hotkey"],null),new $APP.R(null,2,[$APP.Z,$APP.Y,$APP.Ik,"from"],null),new $APP.R(null,2,[$APP.Z,$APP.Zj,$APP.Ik,"show-tooltip"],null),new $APP.R(null,2,[$APP.Z,$APP.Y,$APP.Ik,"success-message"],null),new $APP.R(null,2,[$APP.Z,
|
|
25
|
+
$APP.Y,$APP.Ik,"text"],null)]);$APP.Pd(["x-copy-request",new $APP.R(null,2,[$APP.jm,!0,$APP.V,new $APP.R(null,4,[$APP.Al,$APP.Y,$APP.wj,$APP.Y,$APP.Vh,$APP.Y,sF,$APP.Y],null)],null),"x-copy-success",new $APP.R(null,2,[$APP.jm,!1,$APP.V,new $APP.R(null,1,[$APP.Al,$APP.Y],null)],null),"x-copy-error",new $APP.R(null,2,[$APP.jm,!1,$APP.V,new $APP.R(null,1,[$APP.Ei,$APP.Y],null)],null)]);$APP.ha("baredom.exports.x_copy.init",rF);export const init=rF;
|
package/dist/x-currency-field.js
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
3
|
-
"")?void 0:b,{minimumFractionDigits:2,maximumFractionDigits:2})).format(c)}catch(d){return a}},
|
|
2
|
+
var nQ=function(a){a=(""+$APP.T.g($APP.n(a)?a:"")).trim().toUpperCase();return $APP.B.i(a,"")?"USD":a},oQ=function(a,b,c){return $APP.n(c)?a.setAttribute(b,""):a.removeAttribute(b)},pQ=function(a,b){try{var c=(new Intl.NumberFormat($APP.B.i(b,"")?"en-US":b,{style:"currency",currency:a})).formatToParts(0),d=$APP.Td(function(e){return $APP.B.i("currency",e.type)?e.value:null},$APP.uc(c));return $APP.n(d)?d:a}catch(e){return a}},qQ=function(a,b){var c=parseFloat(a);if($APP.n(isNaN(c)))return a;try{return(new Intl.NumberFormat($APP.B.i(b,
|
|
3
|
+
"")?void 0:b,{minimumFractionDigits:2,maximumFractionDigits:2})).format(c)}catch(d){return a}},rQ=function(a){var b=a.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("label"),g=document.createElement("div"),h=document.createElement("span"),l=document.createElement("input"),m=document.createElement("span"),p=document.createElement("span");c.textContent=":host{display:block;color-scheme:light dark;--x-currency-field-bg:var(--x-color-surface,#ffffff);--x-currency-field-color:var(--x-color-text,#111827);--x-currency-field-border:1px solid var(--x-color-border,#d1d5db);--x-currency-field-border-radius:var(--x-radius-md,6px);--x-currency-field-focus-ring-color:var(--x-color-primary,#2563eb);--x-currency-field-symbol-color:var(--x-color-text-muted,#6b7280);--x-currency-field-label-color:var(--x-color-text-muted,#374151);--x-currency-field-hint-color:var(--x-color-text-muted,#6b7280);--x-currency-field-error-color:var(--x-color-danger,#dc2626);--x-currency-field-disabled-opacity:0.45;}@media (prefers-color-scheme:dark){:host{--x-currency-field-bg:var(--x-color-surface-hover,#1f2937);--x-currency-field-color:var(--x-color-text,#f9fafb);--x-currency-field-border:1px solid var(--x-color-border,#4b5563);--x-currency-field-focus-ring-color:var(--x-color-primary,#3b82f6);--x-currency-field-symbol-color:var(--x-color-text-muted,#9ca3af);--x-currency-field-label-color:var(--x-color-text-muted,#d1d5db);--x-currency-field-hint-color:var(--x-color-text-muted,#9ca3af);--x-currency-field-error-color:var(--x-color-danger,#f87171);}}[part\x3dfield]{display:flex;flex-direction:column;gap:0.25rem;}[part\x3dlabel]{display:block;font-size:0.875rem;font-weight:500;color:var(--x-currency-field-label-color);}.label-hidden{display:none;}[part\x3dinput-wrapper]{display:flex;align-items:center;background:var(--x-currency-field-bg);border:var(--x-currency-field-border);border-radius:var(--x-currency-field-border-radius);transition:border-color 120ms ease,box-shadow 120ms ease;}[part\x3dinput-wrapper]:focus-within{border-color:var(--x-currency-field-focus-ring-color);box-shadow:0 0 0 3px color-mix(in srgb,var(--x-currency-field-focus-ring-color) 20%,transparent);}:host([data-invalid]) [part\x3dinput-wrapper]{border-color:var(--x-currency-field-error-color);}:host([data-invalid]) [part\x3dinput-wrapper]:focus-within{box-shadow:0 0 0 3px color-mix(in srgb,var(--x-currency-field-error-color) 20%,transparent);}[part\x3dsymbol]{flex-shrink:0;padding:0.5rem 0 0.5rem 0.75rem;font-size:1rem;color:var(--x-currency-field-symbol-color);user-select:none;pointer-events:none;}[part\x3dinput]{flex:1;min-width:0;padding:0.5rem 0.75rem;background:transparent;color:var(--x-currency-field-color);border:none;outline:none;font-size:1rem;line-height:1.5;font-family:inherit;}[part\x3dinput]:disabled{opacity:1;cursor:not-allowed;}:host([disabled]) [part\x3dinput-wrapper]{opacity:var(--x-currency-field-disabled-opacity);cursor:not-allowed;}[part\x3dhint]{display:block;font-size:0.8125rem;color:var(--x-currency-field-hint-color);}.hint-hidden{display:none;}[part\x3derror]{display:block;font-size:0.8125rem;color:var(--x-currency-field-error-color);}.error-hidden{display:none;}@media (prefers-reduced-motion:reduce){[part\x3dinput-wrapper]{transition:none;}}";
|
|
4
4
|
d.setAttribute("part","field");e.setAttribute("part","label");e.setAttribute("id","label");e.setAttribute("for","input");g.setAttribute("part","input-wrapper");h.setAttribute("part","symbol");h.setAttribute("aria-hidden","true");l.setAttribute("part","input");l.setAttribute("id","input");l.setAttribute("inputmode","decimal");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",
|
|
5
|
-
"error");p.setAttribute("role","alert");p.setAttribute("aria-live","assertive");g.appendChild(h);g.appendChild(l);d.appendChild(e);d.appendChild(g);d.appendChild(m);d.appendChild(p);b.appendChild(c);b.appendChild(d);a.__xCurrencyFieldRefs={field:d,label:e,wrapper:g,symbol:h,input:l,hint:m,error:p}},
|
|
6
|
-
$APP.r(isNaN(a));l=$APP.n(l)?parseFloat(l):null;m=$APP.n(m)?parseFloat(m):null;return $APP.n(e)?b.setValidity({customError:!0},g,c):$APP.n($APP.n(h)?$APP.
|
|
7
|
-
"Value must be at most "+$APP.T.g(m)+".",c):b.setValidity({},"",c)},
|
|
8
|
-
a.hasAttribute("required"),a.getAttribute("max"),a.hasAttribute("readonly"),a.getAttribute("value"),a.getAttribute("locale"),a.getAttribute("placeholder")]);var l=$APP.M(h);h=$APP.D(l,$APP.
|
|
9
|
-
$APP.
|
|
10
|
-
"")?parseFloat(q):null,
|
|
11
|
-
$APP.X.g(h);e.readOnly=$APP.
|
|
12
|
-
c.classList.add("label-hidden");g.textContent=$APP.
|
|
13
|
-
$APP.k(a,"__xCurrencyFieldRefs");if($APP.n(b)){b=$APP.k(b,"input");var c=a.getAttribute("value");return b.value=$APP.n(c)?c:""}return null}}
|
|
14
|
-
$APP.k(a,"__xCurrencyFieldRefs");if($APP.n(b)){b=$APP.k(b,"input");var c=b.value,d=parseFloat(c);c=$APP.n(isNaN(d))?c:""+$APP.T.g(d);d=a.getAttribute("name");d=$APP.n(d)?d:"";a.setAttribute("value",c);var e=$APP.k(a,"__xCurrencyFieldInternals");$APP.n(e)&&(e.setFormValue(c),
|
|
15
|
-
c);b.addEventListener("input",d);b.addEventListener("change",e);a.__xCurrencyFieldHandlers={focus:c,input:d,change:e}}},
|
|
16
|
-
(
|
|
17
|
-
b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){var d=this.getAttribute(c);return $APP.n(d)?d:""},set:function(d){d!=null&&$APP.N(d)?(d=""+$APP.T.g(d),d=this.setAttribute(c,d)):d=this.removeAttribute(c);return d}})},
|
|
18
|
-
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,"__xCurrencyFieldRefs");if($APP.n(c)){c=$APP.k(c,"input");
|
|
19
|
-
|
|
20
|
-
$APP.n(c)&&(c=$APP.k(c,"input"),$APP.
|
|
21
|
-
return
|
|
22
|
-
"locale-raw",385401846),
|
|
23
|
-
$APP.zf([$APP.
|
|
24
|
-
null),new $APP.
|
|
5
|
+
"error");p.setAttribute("role","alert");p.setAttribute("aria-live","assertive");g.appendChild(h);g.appendChild(l);d.appendChild(e);d.appendChild(g);d.appendChild(m);d.appendChild(p);b.appendChild(c);b.appendChild(d);a.__xCurrencyFieldRefs={field:d,label:e,wrapper:g,symbol:h,input:l,hint:m,error:p}},sQ=function(a,b,c,d){var e=a.hasAttribute("error");var g=a.getAttribute("error");g=$APP.n(g)?g:"";var h=a.hasAttribute("required"),l=a.getAttribute("min"),m=a.getAttribute("max");a=parseFloat(d);var p=
|
|
6
|
+
$APP.r(isNaN(a));l=$APP.n(l)?parseFloat(l):null;m=$APP.n(m)?parseFloat(m):null;return $APP.n(e)?b.setValidity({customError:!0},g,c):$APP.n($APP.n(h)?$APP.B.i(d,""):h)?b.setValidity({valueMissing:!0},"Please fill in this field.",c):$APP.N(d,"")&&!p?b.setValidity({badInput:!0},"Please enter a valid number.",c):$APP.n(p?$APP.n(l)?$APP.r(isNaN(l))&&a<l:l:p)?b.setValidity({rangeUnderflow:!0},"Value must be at least "+$APP.T.g(l)+".",c):$APP.n(p?$APP.n(m)?$APP.r(isNaN(m))&&a>m:m:p)?b.setValidity({rangeOverflow:!0},
|
|
7
|
+
"Value must be at most "+$APP.T.g(m)+".",c):b.setValidity({},"",c)},xQ=function(a){var b=$APP.k(a,"__xCurrencyFieldRefs");if($APP.n(b)){var c=$APP.k(b,"label"),d=$APP.k(b,"symbol"),e=$APP.k(b,"input"),g=$APP.k(b,"hint");b=$APP.k(b,"error");var h=$APP.zf([$APP.pi,tQ,$APP.yl,$APP.Ji,$APP.$i,$APP.Ml,uQ,$APP.Nh,$APP.Zk,$APP.Lj,$APP.Cm,vQ,$APP.Pi],[a.getAttribute("label"),a.getAttribute("currency"),a.getAttribute("name"),a.getAttribute("error"),a.getAttribute("hint"),a.hasAttribute("disabled"),a.getAttribute("min"),
|
|
8
|
+
a.hasAttribute("required"),a.getAttribute("max"),a.hasAttribute("readonly"),a.getAttribute("value"),a.getAttribute("locale"),a.getAttribute("placeholder")]);var l=$APP.M(h);h=$APP.D(l,$APP.Pi);var m=$APP.D(l,$APP.pi),p=$APP.D(l,tQ),q=$APP.D(l,$APP.yl),v=$APP.D(l,$APP.Ji),x=$APP.D(l,$APP.$i),y=$APP.D(l,$APP.Ml),A=$APP.D(l,uQ),C=$APP.D(l,$APP.Nh),E=$APP.D(l,$APP.Zk),H=$APP.D(l,$APP.Lj),G=$APP.D(l,$APP.Cm);l=$APP.D(l,vQ);var J=$APP.n(v)?v:"",Q=$APP.n(x)?x:"",aa=$APP.n(m)?m:"";h=$APP.zf([$APP.jk,$APP.mi,
|
|
9
|
+
$APP.bn,$APP.qm,$APP.ui,$APP.cn,$APP.Aj,$APP.Yi,$APP.Bl,$APP.$k,$APP.Xl,wQ,$APP.Vk,$APP.U,$APP.Ei,$APP.X],[$APP.n(A)?A:"",$APP.F(C),$APP.F(H),$APP.n(h)?h:"",typeof x==="string"&&$APP.N(x,""),$APP.n(l)?l:"",$APP.n(q)?q:"",$APP.n(G)?G:"",typeof m==="string"&&$APP.N(m,""),typeof v==="string"&&$APP.N(v,""),Q,nQ(p),$APP.n(E)?E:"",aa,J,$APP.F(y)]);m=$APP.$k.g(h);$APP.n(m)?p=null:(v=$APP.M(h),p=$APP.D(v,$APP.Yi),q=$APP.D(v,$APP.jk),v=$APP.D(v,$APP.Vk),x=parseFloat(p),y=$APP.N(p,"")&&$APP.r(isNaN(x)),A=$APP.N(q,
|
|
10
|
+
"")?parseFloat(q):null,C=$APP.N(v,"")?parseFloat(v):null,p=$APP.N(p,"")&&!y?"Please enter a valid number.":$APP.n(y?$APP.n(A)?$APP.r(isNaN(A))&&x<A:A:y)?"Value must be at least "+$APP.T.g(q)+".":$APP.n(y?$APP.n(C)?$APP.r(isNaN(C))&&x>C:C:y)?"Value must be at most "+$APP.T.g(v)+".":"");q=p;p=$APP.n(m)?m:$APP.N($APP.n(q)?q:"","");m=$APP.n(m)?$APP.Ei.g(h):$APP.n(q)?q:"";q=$APP.ui.g(h);v=$APP.Bl.g(h);y=wQ.g(h);x=$APP.cn.g(h);d.textContent=pQ(y,x);e.name=$APP.Aj.g(h);e.placeholder=$APP.qm.g(h);e.disabled=
|
|
11
|
+
$APP.X.g(h);e.readOnly=$APP.bn.g(h);e.required=$APP.mi.g(h);d=$APP.n($APP.mi.g(h))?"true":"false";e.setAttribute("aria-required",d);e.setAttribute("aria-invalid",$APP.n(p)?"true":"false");d=$APP.n($APP.n(q)?p:q)?"hint error":$APP.n(q)?"hint":$APP.n(p)?"error":null;$APP.n(d)?e.setAttribute("aria-describedby",d):e.removeAttribute("aria-describedby");$APP.B.i(e,a.shadowRoot.activeElement)||(d=$APP.Yi.g(h),e.value=$APP.B.i(d,"")?"":qQ(d,x));c.textContent=$APP.U.g(h);$APP.n(v)?c.classList.remove("label-hidden"):
|
|
12
|
+
c.classList.add("label-hidden");g.textContent=$APP.Xl.g(h);$APP.n(q)?g.classList.remove("hint-hidden"):g.classList.add("hint-hidden");b.textContent=m;$APP.n(p)?b.classList.remove("error-hidden"):b.classList.add("error-hidden");oQ(a,"data-invalid",p);c=$APP.k(a,"__xCurrencyFieldInternals");$APP.n(c)?(g=a.getAttribute("value"),a=sQ(a,c,e,$APP.n(g)?g:"")):a=null;return a}return null},yQ=function(a,b,c){return a.dispatchEvent(new CustomEvent(b,{detail:c,bubbles:!0,composed:!0,cancelable:!1}))},zQ=function(a){return function(){var b=
|
|
13
|
+
$APP.k(a,"__xCurrencyFieldRefs");if($APP.n(b)){b=$APP.k(b,"input");var c=a.getAttribute("value");return b.value=$APP.n(c)?c:""}return null}},AQ=function(a){return function(){var b=$APP.k(a,"__xCurrencyFieldRefs");if($APP.n(b)){b=$APP.k(b,"input");var c=b.value;var d=a.getAttribute("name");d=$APP.n(d)?d:"";var e=$APP.k(a,"__xCurrencyFieldInternals");$APP.n(e)&&(e.setFormValue(c),sQ(a,e,b,c));return yQ(a,"x-currency-field-input",{name:d,value:c})}return null}},BQ=function(a){return function(){var b=
|
|
14
|
+
$APP.k(a,"__xCurrencyFieldRefs");if($APP.n(b)){b=$APP.k(b,"input");var c=b.value,d=parseFloat(c);c=$APP.n(isNaN(d))?c:""+$APP.T.g(d);d=a.getAttribute("name");d=$APP.n(d)?d:"";a.setAttribute("value",c);var e=$APP.k(a,"__xCurrencyFieldInternals");$APP.n(e)&&(e.setFormValue(c),sQ(a,e,b,c));return yQ(a,"x-currency-field-change",{name:d,value:c})}return null}},CQ=function(a){var b=$APP.k(a,"__xCurrencyFieldRefs");if($APP.n(b)){b=$APP.k(b,"input");var c=zQ(a),d=AQ(a),e=BQ(a);b.addEventListener("focus",
|
|
15
|
+
c);b.addEventListener("input",d);b.addEventListener("change",e);a.__xCurrencyFieldHandlers={focus:c,input:d,change:e}}},DQ=function(a){var b=$APP.k(a,"__xCurrencyFieldRefs");if($APP.n(b)){var c=$APP.k(a,"__xCurrencyFieldHandlers");if($APP.n(c)){b=$APP.k(b,"input");b.removeEventListener("focus",$APP.k(c,"focus"));b.removeEventListener("input",$APP.k(c,"input"));b.removeEventListener("change",$APP.k(c,"change"));a.__xCurrencyFieldHandlers=null;return}}return null},EQ=function(a){$APP.n($APP.k(a,"__xCurrencyFieldRefs"))||
|
|
16
|
+
(rQ(a),$APP.n(a.attachInternals)&&$APP.ja(a,"__xCurrencyFieldInternals",a.attachInternals()));DQ(a);var b=$APP.k(a,"__xCurrencyFieldRefs");if($APP.n(b)){b=$APP.k(b,"input");var c=a.getAttribute("value");nQ(a.getAttribute("currency"));var d=function(){var e=a.getAttribute("locale");return $APP.n(e)?e:""}();$APP.n(c)&&(b.value=qQ(c,d))}b=$APP.k(a,"__xCurrencyFieldInternals");$APP.n(b)&&b.setFormValue(function(){var e=a.getAttribute("value");return $APP.n(e)?e:""}());CQ(a);return xQ(a)},FQ=function(a,
|
|
17
|
+
b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){var d=this.getAttribute(c);return $APP.n(d)?d:""},set:function(d){d!=null&&$APP.N(d)?(d=""+$APP.T.g(d),d=this.setAttribute(c,d)):d=this.removeAttribute(c);return d}})},GQ=function(a,b,c){Object.defineProperty(a,b,{configurable:!0,enumerable:!0,get:function(){return this.hasAttribute(c)},set:function(d){return oQ(this,c,$APP.F(d))}})},HQ=function(a){Object.defineProperty(a,"value",{configurable:!0,enumerable:!0,get:function(){var b=
|
|
18
|
+
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,"__xCurrencyFieldRefs");if($APP.n(c)){c=$APP.k(c,"input");nQ(this.getAttribute("currency"));var d=this.getAttribute("locale");d=$APP.n(d)?d:"";return $APP.B.i(c,this.shadowRoot.activeElement)?null:c.value=$APP.B.i(b,"")?"":qQ(b,d)}return null}})},JQ=function(){var a=class extends HTMLElement{},b=a.prototype;a.formAssociated=!0;a.observedAttributes=
|
|
19
|
+
IQ;HQ(b);FQ(b,"name","name");FQ(b,"currency","currency");FQ(b,"locale","locale");FQ(b,"min","min");FQ(b,"max","max");FQ(b,"placeholder","placeholder");FQ(b,"label","label");FQ(b,"hint","hint");FQ(b,"error","error");GQ(b,"disabled","disabled");GQ(b,"readOnly","readonly");GQ(b,"required","required");b.connectedCallback=function(){return EQ(this)};b.disconnectedCallback=function(){return DQ(this)};b.attributeChangedCallback=function(c,d,e){$APP.B.i(c,"value")&&(c=$APP.k(this,"__xCurrencyFieldRefs"),
|
|
20
|
+
$APP.n(c)&&(c=$APP.k(c,"input"),$APP.B.i(c,this.shadowRoot.activeElement)||(nQ(this.getAttribute("currency")),d=this.getAttribute("locale"),d=$APP.n(d)?d:"",c.value=e==null||$APP.B.i(e,"")?"":qQ(e,d))));return xQ(this)};b.formDisabledCallback=function(c){oQ(this,"disabled",$APP.F(c));return xQ(this)};b.formResetCallback=function(){this.removeAttribute("value");var c=$APP.k(this,"__xCurrencyFieldRefs");$APP.n(c)&&($APP.k(c,"input").value="");c=$APP.k(this,"__xCurrencyFieldInternals");$APP.n(c)&&c.setFormValue("");
|
|
21
|
+
return xQ(this)};b.checkValidity=function(){var c=$APP.k(this,"__xCurrencyFieldInternals");return $APP.n(c)?c.checkValidity():!0};b.reportValidity=function(){var c=$APP.k(this,"__xCurrencyFieldInternals");return $APP.n(c)?c.reportValidity():!0};return a},KQ=function(){return $APP.n(customElements.get("x-currency-field"))?null:customElements.define("x-currency-field",JQ())},uQ=new $APP.K(null,"min-raw","min-raw",183137548),wQ=new $APP.K(null,"currency","currency",-898327568),vQ=new $APP.K(null,"locale-raw",
|
|
22
|
+
"locale-raw",385401846),tQ=new $APP.K(null,"currency-raw","currency-raw",1169887491);var IQ="name value currency locale min max placeholder label hint error disabled required readonly".split(" ");
|
|
23
|
+
$APP.zf([$APP.jk,$APP.qm,$APP.Pj,$APP.cn,$APP.Aj,$APP.Yi,$APP.Xl,wQ,$APP.lm,$APP.Vk,$APP.U,$APP.Ei,$APP.Dk],[new $APP.R(null,2,[$APP.Z,$APP.Y,$APP.Ik,"min"],null),new $APP.R(null,2,[$APP.Z,$APP.Y,$APP.Ik,"placeholder"],null),new $APP.R(null,2,[$APP.Z,$APP.Zj,$APP.Ik,"disabled"],null),new $APP.R(null,2,[$APP.Z,$APP.Y,$APP.Ik,"locale"],null),new $APP.R(null,2,[$APP.Z,$APP.Y,$APP.Ik,"name"],null),new $APP.R(null,2,[$APP.Z,$APP.Y,$APP.Ik,"value"],null),new $APP.R(null,2,[$APP.Z,$APP.Y,$APP.Ik,"hint"],
|
|
24
|
+
null),new $APP.R(null,2,[$APP.Z,$APP.Y,$APP.Ik,"currency"],null),new $APP.R(null,2,[$APP.Z,$APP.Zj,$APP.Ik,"readonly"],null),new $APP.R(null,2,[$APP.Z,$APP.Y,$APP.Ik,"max"],null),new $APP.R(null,2,[$APP.Z,$APP.Y,$APP.Ik,"label"],null),new $APP.R(null,2,[$APP.Z,$APP.Y,$APP.Ik,"error"],null),new $APP.R(null,2,[$APP.Z,$APP.Zj,$APP.Ik,"required"],null)]);$APP.ha("baredom.exports.x_currency_field.init",KQ);export const init=KQ;
|