@vanelsas/baredom 2.7.0 → 2.8.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 +22 -0
- package/custom-elements.json +344 -5
- package/dist/baredom.d.ts +4 -0
- package/dist/base.js +451 -427
- package/dist/integrity.json +97 -93
- package/dist/x-alert.js +17 -18
- package/dist/x-avatar-group.js +9 -10
- package/dist/x-avatar.js +15 -15
- package/dist/x-badge.js +9 -10
- package/dist/x-bento-grid.js +5 -5
- package/dist/x-bento-item.js +4 -4
- package/dist/x-breadcrumbs.js +13 -14
- package/dist/x-button.js +16 -18
- package/dist/x-cancel-dialogue.js +13 -17
- package/dist/x-card.js +7 -7
- package/dist/x-carousel.js +33 -34
- package/dist/x-chart.d.ts +26 -0
- package/dist/x-chart.js +47 -46
- package/dist/x-checkbox.js +11 -10
- package/dist/x-chip.js +1 -9
- package/dist/x-collapse.js +10 -10
- package/dist/x-color-picker.js +44 -44
- package/dist/x-combobox.js +26 -26
- package/dist/x-command-palette.js +26 -26
- package/dist/x-container.js +4 -4
- package/dist/x-context-menu.d.ts +31 -2
- package/dist/x-context-menu.js +20 -18
- package/dist/x-copy.js +20 -23
- package/dist/x-currency-field.js +23 -23
- package/dist/x-date-picker.d.ts +27 -0
- package/dist/x-date-picker.js +42 -41
- package/dist/x-divider.js +9 -9
- package/dist/x-drawer.js +10 -11
- package/dist/x-dropdown.js +11 -10
- package/dist/x-fieldset.js +5 -6
- package/dist/x-file-download.js +7 -7
- package/dist/x-file-upload.js +20 -20
- package/dist/x-form-field.js +15 -15
- package/dist/x-form.js +9 -8
- package/dist/x-gaussian-blur.js +13 -19
- package/dist/x-grid.js +6 -6
- package/dist/x-i18n-provider.d.ts +43 -0
- package/dist/x-i18n-provider.js +8 -0
- package/dist/x-i18n.d.ts +14 -0
- package/dist/x-i18n.js +5 -0
- package/dist/x-icon.js +6 -7
- package/dist/x-image.js +18 -19
- package/dist/x-kinetic-canvas.d.ts +18 -0
- package/dist/x-kinetic-canvas.js +26 -0
- package/dist/x-kinetic-font.js +27 -28
- package/dist/x-kinetic-typography.js +33 -39
- package/dist/x-liquid-dock.js +39 -39
- package/dist/x-liquid-fill.js +45 -45
- package/dist/x-liquid-glass.js +47 -47
- package/dist/x-menu-item.js +8 -9
- package/dist/x-menu.js +10 -11
- package/dist/x-metaball-cursor.js +27 -27
- package/dist/x-modal.js +11 -12
- package/dist/x-morph-stack.js +37 -38
- package/dist/x-multi-combobox.d.ts +50 -0
- package/dist/x-multi-combobox.js +37 -0
- package/dist/x-navbar.js +12 -12
- package/dist/x-neural-glow.js +33 -33
- package/dist/x-notification-center.js +9 -9
- package/dist/x-organic-divider.js +17 -18
- package/dist/x-organic-progress.js +38 -38
- package/dist/x-organic-shape.js +13 -13
- package/dist/x-pagination.js +15 -16
- package/dist/x-particle-button.js +51 -51
- package/dist/x-popover.js +26 -24
- package/dist/x-progress-circle.js +9 -10
- package/dist/x-progress.js +10 -11
- package/dist/x-radio.js +11 -10
- package/dist/x-ripple-effect.js +11 -12
- package/dist/x-scroll-parallax.js +18 -19
- package/dist/x-scroll-stack.js +17 -18
- package/dist/x-scroll-story.js +34 -36
- package/dist/x-scroll-timeline.js +45 -46
- package/dist/x-scroll.js +40 -41
- package/dist/x-search-field.js +15 -15
- package/dist/x-select.js +10 -9
- package/dist/x-sidebar.js +17 -17
- package/dist/x-skeleton-group.js +12 -12
- package/dist/x-skeleton.js +1 -1
- package/dist/x-slider.js +15 -16
- package/dist/x-soft-body.js +22 -22
- package/dist/x-spacer.js +4 -5
- package/dist/x-spinner.js +4 -5
- package/dist/x-splash.js +12 -13
- package/dist/x-stat.js +10 -12
- package/dist/x-stepper.js +14 -15
- package/dist/x-switch.js +10 -9
- package/dist/x-tab.js +7 -8
- package/dist/x-table-cell.js +20 -24
- package/dist/x-table-row.js +8 -9
- package/dist/x-table.js +12 -15
- package/dist/x-tabs.js +11 -11
- package/dist/x-text-area.js +18 -18
- package/dist/x-theme.js +25 -25
- package/dist/x-timeline-item.js +21 -23
- package/dist/x-timeline.js +8 -9
- package/dist/x-toast.js +22 -24
- package/dist/x-toaster.js +8 -8
- package/dist/x-tooltip.js +12 -11
- package/dist/x-typography.js +9 -11
- package/dist/x-welcome-tour.js +60 -64
- package/package.json +21 -1
package/dist/x-checkbox.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
3
|
-
$APP.
|
|
4
|
-
e=$APP.
|
|
5
|
-
h):c.removeAttribute("aria-describedby");c.tabIndex=$APP.n(d)?-1:0;$APP.n(d)?c.setAttribute("disabled",""):c.removeAttribute("disabled");$APP.
|
|
6
|
-
2,[$APP.
|
|
7
|
-
null}},
|
|
8
|
-
a.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("button"),e=document.createElement("span"),
|
|
9
|
-
d.setAttribute("part","control");d.setAttribute("type","button");d.setAttribute("role","checkbox");e.setAttribute("part","box");
|
|
10
|
-
d),a.__xCheckboxHandlers=e);c=a.getAttribute("id");$APP.n(c)&&(b=document.querySelector("label[for\x3d'"+$APP.
|
|
11
|
-
|
|
2
|
+
var uH=function(a){a=$APP.Lf([$APP.Mm,$APP.Fh,$APP.cj,$APP.oj,$APP.Fk,tH,$APP.Xk,$APP.Dh,$APP.fl,$APP.Ok],[a.getAttribute("name"),$APP.sh(a.getAttribute("disabled")),$APP.sh(a.getAttribute("required")),a.getAttribute("aria-labelledby"),$APP.sh(a.getAttribute("checked")),$APP.sh(a.getAttribute("indeterminate")),$APP.sh(a.getAttribute("readonly")),a.getAttribute("value"),a.getAttribute("aria-label"),a.getAttribute("aria-describedby")]);var b=$APP.J(a);a=$APP.C(b,$APP.fl);var c=$APP.C(b,$APP.Ok),d=$APP.C(b,
|
|
3
|
+
$APP.Mm),e=$APP.C(b,$APP.Fh),f=$APP.C(b,$APP.cj),h=$APP.C(b,$APP.oj),l=$APP.C(b,$APP.Fk),m=$APP.C(b,tH),q=$APP.C(b,$APP.Xk);b=$APP.C(b,$APP.Dh);l=$APP.E(l);m=$APP.E(m);f=$APP.E(f);return $APP.Lf([$APP.sn,$APP.xj,$APP.sj,$APP.ro,$APP.Qk,$APP.ij,$APP.Nk,$APP.Gh,$APP.ll,$APP.mo,$APP.gn,$APP.Y],[m,f,m?"mixed":l?"true":"false",$APP.E(q),l,$APP.n(f)?l:!0,d,b!=null?b:"on",h,c,a,$APP.E(e)])},vH=function(a){var b=$APP.k(a,"__xCheckboxRefs");if($APP.n(b)){var c=$APP.k(b,"control");b=uH(a);var d=$APP.Y.g(b),
|
|
4
|
+
e=$APP.Qk.g(b),f=$APP.sn.g(b);$APP.ah(c,"aria-checked",$APP.sj.g(b));c.setAttribute("aria-disabled",$APP.n(d)?"true":"false");$APP.ah(c,"aria-required",$APP.n($APP.xj.g(b))?"true":"false");$APP.ah(c,"aria-readonly",$APP.n($APP.ro.g(b))?"true":"false");var h=$APP.gn.g(b);$APP.n(h)?c.setAttribute("aria-label",h):c.removeAttribute("aria-label");h=$APP.ll.g(b);$APP.n(h)?c.setAttribute("aria-labelledby",h):c.removeAttribute("aria-labelledby");h=$APP.mo.g(b);$APP.n(h)?c.setAttribute("aria-describedby",
|
|
5
|
+
h):c.removeAttribute("aria-describedby");c.tabIndex=$APP.n(d)?-1:0;$APP.n(d)?c.setAttribute("disabled",""):c.removeAttribute("disabled");$APP.bh(a,"data-checked",e);$APP.bh(a,"data-indeterminate",f);$APP.bh(a,"data-disabled",d);a=$APP.k(a,"__xCheckboxInternals");if($APP.n(a))return b=$APP.n(e)?$APP.Gh.g(b):null,a.setFormValue($APP.n(b)?b:null)}return null},wH=function(a){var b=uH(a),c=$APP.Y.g(b),d=$APP.ro.g(b);if($APP.n($APP.n(c)?c:d))return null;c=$APP.Qk.g(b);d=$APP.sn.g(b);d=$APP.n(d)?new $APP.N(null,
|
|
6
|
+
2,[$APP.Qk,!0,$APP.sn,!1],null):new $APP.N(null,2,[$APP.Qk,$APP.p(c),$APP.sn,!1],null);var e=$APP.Qk.g(d);b=$APP.Gh.g(b);return $APP.ch(a,"x-checkbox-change-request",{value:b,previousChecked:c,nextChecked:e})?($APP.bh(a,"checked",e),$APP.bh(a,"indeterminate",$APP.sn.g(d)),vH(a),$APP.P(a,"x-checkbox-change",{value:b,checked:e})):null},xH=function(a){return function(){return wH(a)}},yH=function(a){return function(b){var c=b.key;return $APP.B.i(c," ")||$APP.B.i(c,"Enter")?(b.preventDefault(),wH(a)):
|
|
7
|
+
null}},zH=function(a){var b=$APP.k(a,"__xCheckboxRefs");if($APP.n(b)){var c=$APP.k(a,"__xCheckboxHandlers");if($APP.n(c)){b=$APP.k(b,"control");b.removeEventListener("click",$APP.k(c,"click"));b.removeEventListener("keydown",$APP.k(c,"keydown"));a.__xCheckboxHandlers=null;return}}return null},AH=function(a,b){$APP.bh(a,"disabled",$APP.E(b));return vH(a)},BH=function(a){a.removeAttribute("checked");a.removeAttribute("indeterminate");return vH(a)},CH=function(a){if(!$APP.n($APP.k(a,"__xCheckboxRefs"))){var b=
|
|
8
|
+
a.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("button"),e=document.createElement("span"),f=document.createElement("span");c.textContent=":host{display:inline-block;vertical-align:middle;color-scheme:light dark;--x-checkbox-size:16px;--x-checkbox-border-width:2px;--x-checkbox-border-color:var(--x-color-border,#6b7280);--x-checkbox-border-radius:4px;--x-checkbox-bg:var(--x-color-surface,#ffffff);--x-checkbox-bg-checked:var(--x-color-primary,#2563eb);--x-checkbox-bg-indeterminate:var(--x-color-primary,#2563eb);--x-checkbox-border-checked:var(--x-color-primary,#2563eb);--x-checkbox-border-indeterminate:var(--x-color-primary,#2563eb);--x-checkbox-check-color:var(--x-color-surface,#ffffff);--x-checkbox-focus-ring:var(--x-color-focus-ring,#60a5fa);--x-checkbox-disabled-opacity:0.45;--x-checkbox-transition:background var(--x-transition-duration,120ms) var(--x-transition-easing,ease),border-color var(--x-transition-duration,120ms) var(--x-transition-easing,ease);}@media (prefers-color-scheme:dark){:host{--x-checkbox-border-color:var(--x-color-border,#9ca3af);--x-checkbox-bg:var(--x-color-surface,#1f2937);--x-checkbox-bg-checked:var(--x-color-primary,#3b82f6);--x-checkbox-bg-indeterminate:var(--x-color-primary,#3b82f6);--x-checkbox-border-checked:var(--x-color-primary,#3b82f6);--x-checkbox-border-indeterminate:var(--x-color-primary,#3b82f6);--x-checkbox-focus-ring:var(--x-color-focus-ring,#93c5fd);}}[part\x3dcontrol]{all:unset;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;padding:0;cursor:pointer;}[part\x3dcontrol][disabled]{cursor:default;opacity:var(--x-checkbox-disabled-opacity);}[part\x3dcontrol]:focus-visible{outline:none;box-shadow:0 0 0 3px var(--x-checkbox-focus-ring);border-radius:calc(var(--x-checkbox-border-radius) + 2px);}[part\x3dbox]{display:inline-flex;align-items:center;justify-content:center;width:var(--x-checkbox-size);height:var(--x-checkbox-size);border:var(--x-checkbox-border-width) solid var(--x-checkbox-border-color);border-radius:var(--x-checkbox-border-radius);background:var(--x-checkbox-bg);transition:var(--x-checkbox-transition);position:relative;flex-shrink:0;}:host([data-checked]) [part\x3dbox]{background:var(--x-checkbox-bg-checked);border-color:var(--x-checkbox-border-checked);}:host([data-indeterminate]) [part\x3dbox]{background:var(--x-checkbox-bg-indeterminate);border-color:var(--x-checkbox-border-indeterminate);}[part\x3dcheck]{display:inline-flex;align-items:center;justify-content:center;position:relative;width:100%;height:100%;}[part\x3dcheck]::before{content:'\\2713';color:var(--x-checkbox-check-color);font-size:10px;font-weight:700;line-height:1;opacity:0;transition:opacity 100ms ease;position:absolute;}:host([data-checked]) [part\x3dcheck]::before{opacity:1;}[part\x3dcheck]::after{content:'';display:block;width:8px;height:2px;background:var(--x-checkbox-check-color);border-radius:1px;opacity:0;transition:opacity 100ms ease;position:absolute;}:host([data-indeterminate]) [part\x3dcheck]::after{opacity:1;}@media (prefers-reduced-motion:reduce){[part\x3dbox]{transition:none;}[part\x3dcheck]::before{transition:none;}[part\x3dcheck]::after{transition:none;}}";
|
|
9
|
+
d.setAttribute("part","control");d.setAttribute("type","button");d.setAttribute("role","checkbox");e.setAttribute("part","box");f.setAttribute("part","check");e.appendChild(f);d.appendChild(e);b.appendChild(c);b.appendChild(d);a.__xCheckboxRefs={root:b,control:d,box:e,check:f};$APP.n(a.attachInternals)&&(b=a.attachInternals(),a.__xCheckboxInternals=b)}zH(a);b=$APP.k(a,"__xCheckboxRefs");$APP.n(b)&&(b=$APP.k(b,"control"),c=xH(a),d=yH(a),e={click:c,keydown:d},b.addEventListener("click",c),b.addEventListener("keydown",
|
|
10
|
+
d),a.__xCheckboxHandlers=e);c=a.getAttribute("id");$APP.n(c)&&(b=document.querySelector("label[for\x3d'"+$APP.Q.g(c)+"']"),$APP.n(b)&&(d=b.getAttribute("id"),$APP.n(d)?b=d:(c="x-cb-lbl-"+$APP.Q.g(c),b.setAttribute("id",c),b=c),c=$APP.k(a,"__xCheckboxRefs"),$APP.n(c)&&(c=$APP.k(c,"control"),$APP.n(a.hasAttribute("aria-labelledby"))||c.setAttribute("aria-labelledby",b))));return vH(a)},DH=function(a){return zH(a)},EH=function(a){return vH(a)},GH=function(a){return $APP.jh(a,FH)},IH=function(){return $APP.Yg("x-checkbox",
|
|
11
|
+
new $APP.N(null,8,[$APP.Pg,HH,$APP.Qg,CH,$APP.Rg,DH,$APP.Sg,EH,$APP.Tg,!0,$APP.Ug,AH,$APP.Vg,BH,$APP.Wg,GH],null))},tH=new $APP.F(null,"indeterminate-present?","indeterminate-present?",-1714683438);var HH="checked indeterminate disabled readonly required name value aria-label aria-describedby aria-labelledby".split(" "),FH=new $APP.N(null,7,[$APP.eo,new $APP.N(null,2,[$APP.R,$APP.T,$APP.S,"checked"],null),$APP.In,new $APP.N(null,2,[$APP.R,$APP.T,$APP.S,"indeterminate"],null),$APP.al,new $APP.N(null,2,[$APP.R,$APP.T,$APP.S,"disabled"],null),$APP.Hn,new $APP.N(null,2,[$APP.R,$APP.T,$APP.S,"readonly"],null),$APP.Ll,new $APP.N(null,2,[$APP.R,$APP.T,$APP.S,"required"],null),$APP.Nk,new $APP.N(null,
|
|
12
|
+
2,[$APP.R,$APP.U,$APP.S,"name"],null),$APP.Gh,new $APP.N(null,2,[$APP.R,$APP.U,$APP.S,"value"],null)],null);$APP.Yd(["x-checkbox-change-request",new $APP.N(null,2,[$APP.Fn,!0,$APP.Z,new $APP.N(null,3,[$APP.Gh,$APP.U,$APP.Dl,$APP.T,$APP.mn,$APP.T],null)],null),"x-checkbox-change",new $APP.N(null,2,[$APP.Fn,!1,$APP.Z,new $APP.N(null,2,[$APP.Gh,$APP.U,$APP.eo,$APP.T],null)],null)]);$APP.ca("baredom.exports.x_checkbox.init",IH);export const init=IH;
|
package/dist/x-chip.js
CHANGED
|
@@ -1,10 +1,2 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
3
|
-
a.removeEventListener("animationend",d);return a.remove()});return a.setAttribute("data-exiting","")},Gt=function(a){var b=Dt(new $APP.Q(null,4,[$APP.Hi,a.getAttribute("label"),$APP.Wm,a.getAttribute("value"),Bt,a.getAttribute("removable"),$APP.fm,a.hasAttribute("disabled")],null));if($APP.n(Et(b))){var c=$APP.M(b);b=$APP.D(c,$APP.pj);c=$APP.D(c,$APP.T);b=new CustomEvent("x-chip-remove",{detail:{value:b,label:c},bubbles:!0,composed:!0,cancelable:!0});a.dispatchEvent(b);a=$APP.q(b.defaultPrevented)?
|
|
4
|
-
Ft(a):null}else a=null;return a},It=function(a){var b=Dt(new $APP.Q(null,4,[$APP.Hi,a.getAttribute("label"),$APP.Wm,a.getAttribute("value"),Bt,a.getAttribute("removable"),$APP.fm,a.hasAttribute("disabled")],null)),c=$APP.M(b),d=$APP.D(c,$APP.T),e=$APP.D(c,Ct);c=$APP.D(c,$APP.X);var g=$APP.k(a,"__xChipRefs"),h=$APP.jn.g(g);g=Ht.g(g);b=Et(b);$APP.n(h)&&(h.textContent=d);$APP.n(e)?a.setAttribute("data-removable",""):a.removeAttribute("data-removable");a.tabIndex=$APP.n(b)?0:-1;$APP.n(c)?a.setAttribute("aria-disabled",
|
|
5
|
-
"true"):a.removeAttribute("aria-disabled");$APP.n(b)?a.setAttribute("aria-keyshortcuts","Backspace Delete"):a.removeAttribute("aria-keyshortcuts");$APP.n(g)&&($APP.n(c)?g.setAttribute("disabled",""):g.removeAttribute("disabled"));return null},Jt=function(a){function b(e){var g=e.key;return $APP.B.i(g,"Backspace")||$APP.B.i(g,"Delete")?(e.preventDefault(),Gt(a)):null}function c(){return Gt(a)}var d=Ht.g($APP.k(a,"__xChipRefs"));$APP.n(d)&&d.addEventListener("click",c);a.addEventListener("keydown",
|
|
6
|
-
b);$APP.ja(a,"__xChipHandlers",{click:c,keydown:b})},Kt=function(a){var b=$APP.k(a,"__xChipHandlers");if($APP.n(b)){var c=$APP.k(a,"__xChipRefs"),d=$APP.k(b,"click");b=$APP.k(b,"keydown");$APP.n($APP.n(c)?d:c)&&(c=Ht.g(c),$APP.n(c)&&c.removeEventListener("click",d));$APP.n(b)&&a.removeEventListener("keydown",b)}return a.__xChipHandlers=null},Lt=function(a){if(!$APP.n($APP.k(a,"__xChipRefs"))){var b=a.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("span"),e=
|
|
7
|
-
document.createElement("span"),g=document.createElement("button"),h=document.createElement("span");c.textContent=":host{--x-chip-bg:var(--x-color-surface,rgba(0,0,0,0.08));--x-chip-color:var(--x-color-text,rgba(0,0,0,0.80));--x-chip-border:var(--x-color-border,rgba(0,0,0,0.12));--x-chip-radius:var(--x-radius-full, 9999px);--x-chip-font-size:var(--x-font-size-sm, 0.875rem);--x-chip-padding-x:0.625rem;--x-chip-padding-y:0.25rem;--x-chip-remove-size:1rem;--x-chip-exit-duration:300ms;display:inline-flex;align-items:center;vertical-align:middle;color-scheme:light dark;font-family:inherit;font-size:var(--x-chip-font-size);line-height:1;border-radius:var(--x-chip-radius);background:var(--x-chip-bg);border:1px solid var(--x-chip-border);color:var(--x-chip-color);padding:var(--x-chip-padding-y) var(--x-chip-padding-x);gap:0.25rem;box-sizing:border-box;cursor:default;user-select:none;outline:none;}@media (prefers-color-scheme:dark){:host{--x-chip-bg:var(--x-color-surface,rgba(255,255,255,0.10));--x-chip-border:var(--x-color-border,rgba(255,255,255,0.16));--x-chip-color:var(--x-color-text,rgba(255,255,255,0.88));}}:host(:focus-visible){outline:2px solid var(--x-color-focus-ring,currentColor);outline-offset:2px;}:host([disabled]){opacity:0.55;pointer-events:none;}[part\x3dcontainer]{display:inline-flex;align-items:center;gap:0.25rem;}[part\x3dlabel]{display:inline;font-size:inherit;color:inherit;}[part\x3dremove]{display:none;align-items:center;justify-content:center;width:var(--x-chip-remove-size);height:var(--x-chip-remove-size);border:none;background:none;color:inherit;cursor:pointer;padding:0;border-radius:50%;font-size:1rem;line-height:1;opacity:0.7;flex-shrink:0;}[part\x3dremove]:hover{opacity:1;}[part\x3dremove]:focus-visible{outline:2px solid currentColor;outline-offset:1px;}:host([data-removable]) [part\x3dremove]{display:inline-flex;}@keyframes x-chip-exit{to{opacity:0;transform:scale(0.85);}}:host([data-exiting]){animation:x-chip-exit var(--x-chip-exit-duration) forwards;}@media (prefers-reduced-motion:reduce){:host([data-exiting]){animation-duration:0ms;}}";
|
|
8
|
-
d.setAttribute("part","container");e.setAttribute("part","label");g.setAttribute("part","remove");g.setAttribute("type","button");g.setAttribute("aria-label","Remove");h.setAttribute("aria-hidden","true");h.textContent="×";g.appendChild(h);d.appendChild(e);d.appendChild(g);b.appendChild(c);b.appendChild(d);a.__xChipRefs=new $APP.Q(null,4,[$APP.Zi,b,$APP.Zj,d,$APP.jn,e,Ht,g],null)}Kt(a);Jt(a);return It(a)},Mt=function(a){return Kt(a)},Nt=function(a,b,c,d){return $APP.N(c,d)?$APP.n($APP.k(a,"__xChipRefs"))?
|
|
9
|
-
It(a):null:null},Ot=function(a,b){Object.defineProperty(a,b,{get:function(){return this.getAttribute(b)},set:function(c){return c!=null?this.setAttribute(b,""+$APP.S.g(c)):this.removeAttribute(b)},enumerable:!0,configurable:!0})},Pt=function(a,b){return Object.defineProperty(a,b,{get:function(){return this.hasAttribute(b)},set:function(c){return $APP.n(c)?this.setAttribute(b,""):this.removeAttribute(b)},enumerable:!0,configurable:!0})},Qt=function(a){Ot(a,"label");Ot(a,"value");Pt(a,"removable");
|
|
10
|
-
return Pt(a,"disabled")},St=function(){return $APP.Lg("x-chip",new $APP.Q(null,5,[$APP.Cg,Rt,$APP.Dg,Lt,$APP.Eg,Mt,$APP.Fg,Nt,$APP.Jg,Qt],null))},Bt=new $APP.K(null,"removable-raw","removable-raw",1718453796),Ht=new $APP.K(null,"remove-btn","remove-btn",843430290),Ct=new $APP.K(null,"removable?","removable?",1886800649);var Rt=["label","value","removable","disabled"];$APP.Pd(["x-chip-remove",new $APP.Q(null,2,[$APP.V,new $APP.Q(null,2,[$APP.pj,$APP.Y,$APP.T,$APP.Y],null),$APP.Km,!0],null)]);$APP.ha("baredom.exports.x_chip.init",St);export const init=St;
|
|
2
|
+
var xu=function(){return $APP.bi()};$APP.ca("baredom.exports.x_chip.init",xu);export const init=xu;
|
package/dist/x-collapse.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var f$=function(){var a=window.matchMedia;return $APP.n(a)?window.matchMedia("(prefers-reduced-motion: reduce)").matches:a},g$=function(a){a=a.getAttribute("duration-ms");return $APP.n(a)?(a=parseInt(a,10),$APP.n(isNaN(a))?300:$APP.
|
|
3
|
-
b.offsetHeight;var d=""+$APP.
|
|
4
|
-
"px";a=g$(a);b.style.height=d;b.offsetHeight;b.style.transition="height "+$APP.
|
|
5
|
-
$APP.n(d)?"true":"false");if($APP.n(e))return c.setAttribute("disabled",""),c.setAttribute("aria-disabled","true");c.removeAttribute("disabled");return c.removeAttribute("aria-disabled")}return null},i$=function(a,b){if($APP.n(a.hasAttribute("disabled")))return null;var c=$APP.
|
|
6
|
-
"pointer")}},
|
|
7
|
-
c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("button"),
|
|
8
|
-
d.setAttribute("part","container");e.setAttribute("part","trigger");e.setAttribute("type","button");e.setAttribute("id","trigger");e.setAttribute("aria-controls","panel");
|
|
9
|
-
"▼";e.appendChild(
|
|
10
|
-
(h$(a),$APP.B.i(b,"open"))){b=$APP.k(a,"__xCollapseRefs");b=$APP.n(b)?$APP.k(b,"content"):null;var c=a.hasAttribute("open");return $APP.n(b)?$APP.n(c)?
|
|
11
|
-
$APP.
|
|
2
|
+
var f$=function(){var a=window.matchMedia;return $APP.n(a)?window.matchMedia("(prefers-reduced-motion: reduce)").matches:a},g$=function(a){a=a.getAttribute("duration-ms");return $APP.n(a)?(a=parseInt(a,10),$APP.n(isNaN(a))?300:$APP.Hi.i(0,$APP.Ii.i(2E3,a))):300},qca=function(a,b){function c(){clearTimeout(e);b.style.height="";b.style.transition="";return b.removeEventListener("transitionend",$APP.k(f,"fn"))}if($APP.n(f$()))return b.style.height="",b.style.transition="";a=g$(a);b.style.height="0px";
|
|
3
|
+
b.offsetHeight;var d=""+$APP.Q.g(b.scrollHeight)+"px";b.style.transition="height "+$APP.Q.g(a)+"ms ease";b.style.height=d;var e=setTimeout(function(){b.style.height="";return b.style.transition=""},a+80),f={fn:null};f.fn=c;return b.addEventListener("transitionend",c)},rca=function(a,b){function c(){clearTimeout(e);b.style.height="";b.style.transition="";return b.removeEventListener("transitionend",$APP.k(f,"fn"))}if($APP.n(f$()))return b.style.height="0px",b.style.transition="";var d=""+$APP.Q.g(b.offsetHeight)+
|
|
4
|
+
"px";a=g$(a);b.style.height=d;b.offsetHeight;b.style.transition="height "+$APP.Q.g(a)+"ms ease";b.style.height="0px";var e=setTimeout(function(){b.style.height="";return b.style.transition=""},a+80),f={fn:null};f.fn=c;return b.addEventListener("transitionend",c)},h$=function(a){var b=$APP.k(a,"__xCollapseRefs");if($APP.n(b)){var c=$APP.k(b,"trigger");b=$APP.k(b,"header-text");var d=a.hasAttribute("open"),e=a.hasAttribute("disabled");a=a.getAttribute("header");b.textContent=$APP.n(a)?a:"";c.setAttribute("aria-expanded",
|
|
5
|
+
$APP.n(d)?"true":"false");if($APP.n(e))return c.setAttribute("disabled",""),c.setAttribute("aria-disabled","true");c.removeAttribute("disabled");return c.removeAttribute("aria-disabled")}return null},i$=function(a,b){if($APP.n(a.hasAttribute("disabled")))return null;var c=$APP.p(a.hasAttribute("open"));return $APP.ch(a,"x-collapse-toggle",{open:c,source:b})?(c?a.setAttribute("open",""):a.removeAttribute("open"),$APP.P(a,"x-collapse-change",{open:c})):null},sca=function(a){return function(){return i$(a,
|
|
6
|
+
"pointer")}},tca=function(a){return function(b){var c=b.key;return $APP.B.i(c," ")||$APP.B.i(c,"Enter")?(b.preventDefault(),i$(a,"keyboard")):null}},j$=function(a){var b=$APP.k(a,"__xCollapseRefs");if($APP.n(b)){var c=$APP.k(a,"__xCollapseHandlers");if($APP.n(c)){b=$APP.k(b,"trigger");b.removeEventListener("click",$APP.k(c,"click"));b.removeEventListener("keydown",$APP.k(c,"keydown"));a.__xCollapseHandlers=null;return}}return null},uca=function(a){if(!$APP.n($APP.k(a,"__xCollapseRefs"))){var b=a.attachShadow({mode:"open"}),
|
|
7
|
+
c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("button"),f=document.createElement("span"),h=document.createElement("span"),l=document.createElement("div"),m=document.createElement("div"),q=document.createElement("slot");c.textContent=":host{display:block;color-scheme:light dark;--x-collapse-border-radius:var(--x-radius-md, 8px);--x-collapse-border:1px solid var(--x-color-border,#e2e8f0);--x-collapse-bg:var(--x-color-surface, #ffffff);--x-collapse-trigger-bg:var(--x-color-surface-hover, #f8fafc);--x-collapse-trigger-bg-hover:var(--x-color-surface-active,#f1f5f9);--x-collapse-trigger-color:var(--x-color-text, #0f172a);--x-collapse-trigger-padding:0.75rem 1rem;--x-collapse-content-padding:1rem;--x-collapse-font-size:0.9375rem;--x-collapse-font-weight:600;--x-collapse-chevron-color:var(--x-color-text-muted, #64748b);--x-collapse-focus-ring:var(--x-color-focus-ring, #60a5fa);}@media (prefers-color-scheme:dark){:host{--x-collapse-border:1px solid var(--x-color-border,#334155);--x-collapse-bg:var(--x-color-surface,#1e293b);--x-collapse-trigger-bg:var(--x-color-surface-hover,#0f172a);--x-collapse-trigger-bg-hover:var(--x-color-surface-active,#1e293b);--x-collapse-trigger-color:var(--x-color-text,#e2e8f0);--x-collapse-chevron-color:var(--x-color-text-muted, #94a3b8);--x-collapse-focus-ring:var(--x-color-focus-ring, #93c5fd);}}[part\x3dcontainer]{box-sizing:border-box;border:var(--x-collapse-border);border-radius:var(--x-collapse-border-radius);background:var(--x-collapse-bg);overflow:hidden;}[part\x3dtrigger]{all:unset;box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;width:100%;padding:var(--x-collapse-trigger-padding);background:var(--x-collapse-trigger-bg);color:var(--x-collapse-trigger-color);font-size:var(--x-collapse-font-size);font-weight:var(--x-collapse-font-weight);cursor:pointer;user-select:none;}[part\x3dtrigger][disabled]{cursor:default;opacity:0.55;}[part\x3dtrigger]:hover:not([disabled]){background:var(--x-collapse-trigger-bg-hover);}[part\x3dtrigger]:focus-visible{outline:none;box-shadow:inset 0 0 0 2px var(--x-collapse-focus-ring);}[part\x3dheader-text]{flex:1;text-align:start;}[part\x3dchevron]{display:inline-block;margin-inline-start:0.5rem;color:var(--x-collapse-chevron-color);transition:transform 200ms ease;flex-shrink:0;}:host([open]) [part\x3dchevron]{transform:rotate(180deg);}[part\x3dcontent]{overflow:hidden;height:0;}:host([open]) [part\x3dcontent]{height:auto;}[part\x3dcontent-inner]{padding:var(--x-collapse-content-padding);}@media (prefers-reduced-motion:reduce){[part\x3dcontent]{transition:none !important;}[part\x3dchevron]{transition:none !important;}}";
|
|
8
|
+
d.setAttribute("part","container");e.setAttribute("part","trigger");e.setAttribute("type","button");e.setAttribute("id","trigger");e.setAttribute("aria-controls","panel");f.setAttribute("part","header-text");h.setAttribute("part","chevron");h.setAttribute("aria-hidden","true");l.setAttribute("part","content");l.setAttribute("id","panel");l.setAttribute("role","region");l.setAttribute("aria-labelledby","trigger");m.setAttribute("part","content-inner");q.setAttribute("name","content");h.textContent=
|
|
9
|
+
"▼";e.appendChild(f);e.appendChild(h);m.appendChild(q);l.appendChild(m);d.appendChild(e);d.appendChild(l);b.appendChild(c);b.appendChild(d);a.__xCollapseRefs={root:b,trigger:e,"header-text":f,content:l}}j$(a);b=$APP.k(a,"__xCollapseRefs");$APP.n(b)&&(b=$APP.k(b,"trigger"),c=sca(a),d=tca(a),e={click:c,keydown:d},b.addEventListener("click",c),b.addEventListener("keydown",d),a.__xCollapseHandlers=e);return h$(a)},vca=function(a){return j$(a)},wca=function(a,b){if($APP.n($APP.k(a,"__xCollapseRefs"))&&
|
|
10
|
+
(h$(a),$APP.B.i(b,"open"))){b=$APP.k(a,"__xCollapseRefs");b=$APP.n(b)?$APP.k(b,"content"):null;var c=a.hasAttribute("open");return $APP.n(b)?$APP.n(c)?qca(a,b):rca(a,b):null}return null},yca=function(a){$APP.jh(a,xca);return a.toggle=function(){return i$(this,"programmatic")}},k$=function(){return $APP.Yg("x-collapse",new $APP.N(null,5,[$APP.Pg,zca,$APP.Qg,uca,$APP.Rg,vca,$APP.Sg,wca,$APP.Wg,yca],null))};var zca=["open","disabled","header","duration-ms"],xca=new $APP.N(null,4,[$APP.Bn,new $APP.N(null,2,[$APP.R,$APP.T,$APP.S,"open"],null),$APP.al,new $APP.N(null,2,[$APP.R,$APP.T,$APP.S,"disabled"],null),$APP.xk,new $APP.N(null,2,[$APP.R,$APP.U,$APP.S,"header"],null),new $APP.F(null,"durationMs","durationMs",1439579766),new $APP.N(null,3,[$APP.R,$APP.V,$APP.S,"duration-ms",$APP.ih,300],null)],null);
|
|
11
|
+
$APP.Yd(["x-collapse-toggle",new $APP.N(null,2,[$APP.Fn,!0,$APP.Z,new $APP.N(null,2,[$APP.Bn,$APP.T,$APP.Em,$APP.U],null)],null),"x-collapse-change",new $APP.N(null,2,[$APP.Fn,!1,$APP.Z,new $APP.N(null,1,[$APP.Bn,$APP.T],null)],null)]);$APP.ca("baredom.exports.x_collapse.init",k$);export const init=k$;
|
package/dist/x-color-picker.js
CHANGED
|
@@ -1,45 +1,45 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
3
|
-
1)),16),d=parseInt(""+$APP.
|
|
4
|
-
else return null},
|
|
5
|
-
Math.round(c*255),new $APP.
|
|
6
|
-
return"#"+$APP.
|
|
7
|
-
|
|
8
|
-
$APP.
|
|
9
|
-
A=$APP.D
|
|
10
|
-
"%":a},
|
|
11
|
-
|
|
12
|
-
e)},
|
|
13
|
-
e.setAttribute("part","swatch"),e.setAttribute("type","button"),e.setAttribute("role","option"),e.setAttribute("aria-label",c),e.setAttribute("data-color",c),e.style.backgroundColor=c,b.appendChild(e),a=$APP.w(a),c=null,e=0),
|
|
14
|
-
$APP.
|
|
15
|
-
r.style.setProperty("--_x-cp-area-x",""+$APP.
|
|
16
|
-
"%,"+$APP.
|
|
17
|
-
function(){var
|
|
18
|
-
$APP.
|
|
19
|
-
h=function(){switch(b.key){case "ArrowUp":return
|
|
20
|
-
case "End":return 360;default:return
|
|
21
|
-
e,!0);
|
|
22
|
-
(a.removeAttribute("open"),a=$APP.k(a,"__xColorPickerRefs"),$APP.n(a)?$APP.k(a,"trigger").focus():null):null},
|
|
23
|
-
a.__xColorPickerDragging="area";
|
|
24
|
-
$APP.
|
|
25
|
-
|
|
26
|
-
(
|
|
27
|
-
$APP.k(a,"__xColorPickerDragging"))){a.__xColorPickerDragging=null;var
|
|
28
|
-
|
|
29
|
-
return
|
|
30
|
-
|
|
31
|
-
"alpha-down":
|
|
32
|
-
"area-down"));d.removeEventListener("pointermove",$APP.k(c,"area-move"));d.removeEventListener("pointerup",$APP.k(c,"area-up"));d.removeEventListener("keydown",$APP.k(c,"area-key"));e.removeEventListener("pointerdown",$APP.k(c,"hue-down"));e.removeEventListener("pointermove",$APP.k(c,"hue-move"));e.removeEventListener("pointerup",$APP.k(c,"hue-up"));e.removeEventListener("keydown",$APP.k(c,"hue-key"));
|
|
33
|
-
$APP.k(c,"alpha-move"));
|
|
34
|
-
document.removeEventListener("pointerdown",$APP.k(c,"doc-click"),!0);a.__xColorPickerHandlers=null}else return null},
|
|
35
|
-
|
|
36
|
-
d.setAttribute("part","container");e.setAttribute("part","trigger");e.setAttribute("type","button");e.setAttribute("aria-label","Pick color");
|
|
37
|
-
"0");r.setAttribute("aria-label","Hue");r.setAttribute("aria-valuemin","0");r.setAttribute("aria-valuemax","360");v.setAttribute("part","hue-thumb");x.setAttribute("part","alpha-strip");x.setAttribute("role","slider");x.setAttribute("tabindex","0");x.setAttribute("aria-label","Opacity");x.setAttribute("aria-valuemin","0");x.setAttribute("aria-valuemax","100");y.setAttribute("part","alpha-gradient");A.setAttribute("part","alpha-thumb");
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
"swatches");
|
|
41
|
-
{"alpha-thumb":A,copy:
|
|
42
|
-
$APP.
|
|
43
|
-
"
|
|
44
|
-
|
|
45
|
-
$APP
|
|
2
|
+
var vD=function(a,b){return $APP.Ii.i($APP.Hi.i(a,0),b)},wD=function(a){return $APP.od(a,360)},xD=function(a){return vD(a,100)},yD=function(a){return vD(a,1)},AD=function(a){var b=typeof a==="string";a=b?$APP.rg(zD,a.trim()):b;return $APP.E(a)},ED=function(a){if(typeof a==="string")if(a=$APP.rg(zD,a.trim()),$APP.n(a))switch($APP.Hc(a,0,null),a=$APP.Hc(a,1,null),$APP.z(a)){case 3:var b=parseInt(""+$APP.Q.g($APP.wc(a,0))+$APP.Q.g($APP.wc(a,0)),16),c=parseInt(""+$APP.Q.g($APP.wc(a,1))+$APP.Q.g($APP.wc(a,
|
|
3
|
+
1)),16),d=parseInt(""+$APP.Q.g($APP.wc(a,2))+$APP.Q.g($APP.wc(a,2)),16);return new $APP.N(null,4,[BD,b,$APP.hn,c,CD,d,DD,1],null);case 6:return b=parseInt(a.substring(0,2),16),c=parseInt(a.substring(2,4),16),d=parseInt(a.substring(4,6),16),new $APP.N(null,4,[BD,b,$APP.hn,c,CD,d,DD,1],null);case 8:return b=parseInt(a.substring(0,2),16),c=parseInt(a.substring(2,4),16),d=parseInt(a.substring(4,6),16),new $APP.N(null,4,[BD,b,$APP.hn,c,CD,d,DD,parseInt(a.substring(6,8),16)/255],null);default:return null}else return null;
|
|
4
|
+
else return null},ID=function(a,b,c){a/=255;b/=255;c/=255;var d=$APP.Hi.B(a,b,$APP.Bc([c])),e=$APP.Ii.B(a,b,$APP.Bc([c])),f=(d+e)/2,h=d-e;return h===0?new $APP.N(null,3,[FD,0,GD,0,HD,f*100],null):new $APP.N(null,3,[FD,(d===a?((b-c)/h+(b<c?6:0))/6:d===b?((c-a)/h+2)/6:((a-b)/h+4)/6)*360,GD,(f>.5?h/(2-d-e):h/(d+e))*100,HD,f*100],null)},JD=function(a,b,c){c=c<0?c+1:c>1?c-1:c;return c<1/6?a+(b-a)*6*c:c<.5?b:c<2/3?a+(b-a)*(2/3-c)*6:a},KD=function(a,b,c){a=wD(a)/360;b=xD(b)/100;c=xD(c)/100;if(b===0)return a=
|
|
5
|
+
Math.round(c*255),new $APP.N(null,3,[BD,a,$APP.hn,a,CD,a],null);b=c<.5?c*(1+b):c+b-c*b;c=2*c-b;return new $APP.N(null,3,[BD,Math.round(JD(c,b,a+1/3)*255),$APP.hn,Math.round(JD(c,b,a)*255),CD,Math.round(JD(c,b,a-1/3)*255)],null)},LD=function(a,b,c){function d(e){e=vD(Math.round(e),255).toString(16);return $APP.z(e)<2?"0"+$APP.Q.g(e):e}return"#"+$APP.Q.g(d(a))+$APP.Q.g(d(b))+$APP.Q.g(d(c))},MD=function(a,b,c,d){function e(f){f=vD(Math.round(f),255).toString(16);return $APP.z(f)<2?"0"+$APP.Q.g(f):f}
|
|
6
|
+
return"#"+$APP.Q.g(e(a))+$APP.Q.g(e(b))+$APP.Q.g(e(c))+$APP.Q.g(e(yD(d)*255))},OD=function(a,b,c){b=xD(b)/100;c=xD(c)/100;b=c+b*$APP.Ii.i(c,1-c);return new $APP.N(null,3,[FD,wD(a),GD,(b===0?0:2*(1-c/b))*100,ND,b*100],null)},PD=function(a,b,c){b=xD(b)/100;c=xD(c)/100;b=c*(1-b/2);c=b===0||b===1?0:(c-b)/$APP.Ii.i(b,1-b);return new $APP.N(null,3,[FD,wD(a),GD,c*100,HD,b*100],null)},QD=function(a,b){return new $APP.N(null,2,[$APP.cn,xD(a),$APP.bn,100-xD(b)],null)},RD=function(a){return typeof a==="string"&&
|
|
7
|
+
AD(a)?(a=ED(a),$APP.n(a)?LD(BD.g(a),$APP.hn.g(a),CD.g(a)):null):"#000000"},TD=function(a){return typeof a==="string"&&$APP.Zc(SD,a.trim().toLowerCase())?a.trim().toLowerCase():"inline"},UD=function(a){return typeof a==="string"&&$APP.th(a)?$APP.hf.l($APP.pe,$APP.Ji.l($APP.he.g($APP.rh),$APP.me(AD),$APP.he.g(function(b){b=ED(b);var c=$APP.J(b);b=$APP.C(c,BD);var d=$APP.C(c,$APP.hn);c=$APP.C(c,CD);return LD(b,d,c)})),$APP.ph(a,/,/)):$APP.pe},$D=function(a){var b=$APP.J(a),c=$APP.C(b,$APP.Bn),d=$APP.C(b,
|
|
8
|
+
$APP.al),e=$APP.C(b,$APP.Gh);a=$APP.C(b,$APP.Nk);var f=$APP.C(b,$APP.hh),h=$APP.C(b,$APP.Jk),l=$APP.C(b,VD),m=$APP.C(b,$APP.X),q=$APP.C(b,WD);b=RD(e);var r=function(){var I=ED(e);return $APP.n(I)?I:ED("#000000")}(),v=$APP.J(r);r=$APP.C(v,BD);var x=$APP.C(v,$APP.hn),y=$APP.C(v,CD);v=$APP.C(v,DD);var A=function(){var I=typeof e==="string";if(I){I=e.trim();var H=$APP.rg(zD,I);$APP.n(H)?(I=$APP.rg(zD,I),I=$APP.u($APP.w(I)),I=8===$APP.z(I)):I=H;return I}return I}();v=$APP.n(A)?v:1;A=ID(r,x,y);var D=$APP.J(A);
|
|
9
|
+
A=$APP.C(D,FD);var G=$APP.C(D,GD);D=$APP.C(D,HD);d=$APP.sh(d);f=$APP.sh(f);q=q!=null;c=c!=null;h=TD(h);return $APP.Lf([$APP.ro,XD,$APP.Nk,$APP.Jk,VD,GD,HD,YD,FD,$APP.X,$APP.ao,ZD,$APP.Y,DD],[f,q,$APP.th(a)?a:null,h,UD(l),G,D,b,A,$APP.th(m)?m:null,$APP.B.i(h,"popover")&&c,q&&v<1?MD(r,x,y,v):b,d,v])},aE=function(a,b,c,d){a="Hue "+$APP.Q.g(Math.round(a))+", Saturation "+$APP.Q.g(Math.round(b))+"%, Lightness "+$APP.Q.g(Math.round(c))+"%";return d<1?""+$APP.Q.g(a)+", Opacity "+$APP.Q.g(Math.round(d*100))+
|
|
10
|
+
"%":a},bE=function(a){var b=$APP.J(a);a=$APP.C(b,$APP.Y);b=$APP.C(b,$APP.ro);return $APP.p(a)&&$APP.p(b)},cE=function(a){return document.createElement(a)},dE=function(a){return $D($APP.Lf([$APP.Bn,$APP.al,$APP.Nk,$APP.Gh,$APP.hh,$APP.Jk,VD,$APP.X,WD],[a.getAttribute("open"),a.getAttribute("disabled"),a.getAttribute("name"),a.getAttribute("value"),a.getAttribute("readonly"),a.getAttribute("mode"),a.getAttribute("swatches"),a.getAttribute("label"),a.getAttribute("alpha")]))},eE=function(a,b){var c=
|
|
11
|
+
ZD.g(b),d=FD.g(b),e=GD.g(b),f=HD.g(b);b=DD.g(b);return $APP.P(a,"x-color-picker-input",$APP.Xi(new $APP.N(null,5,[$APP.Gh,c,FD,d,GD,e,HD,f,DD,b],null)))},fE=function(a,b){var c=ZD.g(b),d=FD.g(b),e=GD.g(b),f=HD.g(b);b=DD.g(b);return $APP.ch(a,"x-color-picker-change",$APP.Xi(new $APP.N(null,5,[$APP.Gh,c,FD,d,GD,e,HD,f,DD,b],null)))},gE=function(a,b,c,d,e,f){b=KD(b,c,d);d=$APP.J(b);b=$APP.C(d,BD);c=$APP.C(d,$APP.hn);d=$APP.C(d,CD);e=$APP.n($APP.n(f)?e<1:f)?MD(b,c,d,e):LD(b,c,d);a.setAttribute("value",
|
|
12
|
+
e)},hE=function(a,b,c,d){if($APP.M($APP.k(a,"__xColorPickerSwatchesCache"),c)){a.__xColorPickerSwatchesCache=c;b.innerHTML="";a=$APP.t(c);c=null;for(var e=0,f=0;;)if(f<e){var h=c.F(null,f),l=cE("button");l.setAttribute("part","swatch");l.setAttribute("type","button");l.setAttribute("role","option");l.setAttribute("aria-label",h);l.setAttribute("data-color",h);l.style.backgroundColor=h;b.appendChild(l);f+=1}else if(a=$APP.t(a))$APP.Vc(a)?(e=$APP.Db(a),a=$APP.Eb(a),c=e,e=$APP.z(e)):(c=$APP.u(a),e=cE("button"),
|
|
13
|
+
e.setAttribute("part","swatch"),e.setAttribute("type","button"),e.setAttribute("role","option"),e.setAttribute("aria-label",c),e.setAttribute("data-color",c),e.style.backgroundColor=c,b.appendChild(e),a=$APP.w(a),c=null,e=0),f=0;else break}b.querySelectorAll("[part\x3dswatch]").forEach(function(m){return $APP.ah(m,"aria-selected",$APP.B.i(m.getAttribute("data-color"),d)?"true":"false")})},iE=function(a){var b=$APP.k(a,"__xColorPickerRefs");if($APP.n(b)){var c=dE(a),d=$APP.J(c);c=$APP.C(d,ZD);var e=
|
|
14
|
+
$APP.C(d,$APP.Y),f=$APP.C(d,DD),h=$APP.C(d,$APP.ro),l=$APP.C(d,XD),m=$APP.C(d,$APP.Jk),q=$APP.C(d,VD),r=$APP.C(d,GD),v=$APP.C(d,HD),x=$APP.C(d,YD),y=$APP.C(d,$APP.X),A=$APP.C(d,FD);d=OD(A,r,v);d=$APP.J(d);var D=$APP.C(d,GD);r=$APP.C(d,ND);d=QD(GD.g(d),r);r=$APP.k(b,"area");var G=$APP.k(b,"hue-strip"),I=$APP.k(b,"alpha-strip"),H=$APP.k(b,"preview-color"),K=$APP.k(b,"hex-input"),W=$APP.k(b,"trigger-swatch");b=$APP.k(b,"swatches");a.setAttribute("data-mode",m);a.style.setProperty("--_x-cp-hue",""+$APP.Q.g(Math.round(A)));
|
|
15
|
+
r.style.setProperty("--_x-cp-area-x",""+$APP.Q.g($APP.cn.g(d).toFixed(2))+"%");r.style.setProperty("--_x-cp-area-y",""+$APP.Q.g($APP.bn.g(d).toFixed(2))+"%");$APP.ah(r,"aria-valuetext",aE(A,D,v,f));$APP.n(y)&&r.setAttribute("aria-label",y);G.style.setProperty("--_x-cp-hue-pos",""+$APP.Q.g((wD(A)/360*100).toFixed(2))+"%");$APP.ah(G,"aria-valuenow",""+$APP.Q.g(Math.round(A)));$APP.n(l)?(I.style.display="",a.style.setProperty("--_x-cp-alpha-color","hsl("+$APP.Q.g(Math.round(A))+","+$APP.Q.g(Math.round(D))+
|
|
16
|
+
"%,"+$APP.Q.g(Math.round(v))+"%)"),I.style.setProperty("--_x-cp-alpha-pos",""+$APP.Q.g((yD(f)*100).toFixed(2))+"%"),$APP.ah(I,"aria-valuenow",""+$APP.Q.g(Math.round(f*100)))):I.style.display="none";H.style.backgroundColor=$APP.n(l)?function(){var ea=KD(A,D,v),va=$APP.J(ea);ea=$APP.C(va,BD);var Pa=$APP.C(va,$APP.hn);va=$APP.C(va,CD);return"rgba("+$APP.Q.g(ea)+","+$APP.Q.g(Pa)+","+$APP.Q.g(va)+","+$APP.Q.g(f.toFixed(2))+")"}():x;a.shadowRoot.activeElement!==K&&(K.value=c);W.style.backgroundColor=$APP.n(l)?
|
|
17
|
+
function(){var ea=KD(A,D,v),va=$APP.J(ea);ea=$APP.C(va,BD);var Pa=$APP.C(va,$APP.hn);va=$APP.C(va,CD);return"rgba("+$APP.Q.g(ea)+","+$APP.Q.g(Pa)+","+$APP.Q.g(va)+","+$APP.Q.g(f.toFixed(2))+")"}():x;K.disabled=$APP.n(e)?e:h;hE(a,b,q,x);a=$APP.k(a,"__xColorPickerInternals");return $APP.n(a)?a.setFormValue(c):null}return null},kE=function(a,b){var c=a.getBoundingClientRect();a=b.clientY-c.top;var d=c.width,e=c.height;b=100*(vD(b.clientX-c.left,d)/d);a=100*(vD(a,e)/e);return new $APP.N(null,2,[jE,xD(b),
|
|
18
|
+
$APP.cl,100-xD(a)],null)},lE=function(a,b){a=a.getBoundingClientRect();var c=a.width;b=100*(vD(b.clientX-a.left,c)/c);return xD(b)/100*360},mE=function(a,b){a=a.getBoundingClientRect();var c=a.width;b=100*(vD(b.clientX-a.left,c)/c);return xD(b)/100},oE=function(a,b){var c=dE(a);if(bE(c)&&$APP.Zc(nE,b.key)){b.preventDefault();var d=$APP.n(b.shiftKey)?10:1,e=OD(FD.g(c),GD.g(c),HD.g(c)),f=function(){switch(b.key){case "ArrowRight":return xD(GD.g(e)+d);case "ArrowLeft":return xD(GD.g(e)-d);default:return GD.g(e)}}(),
|
|
19
|
+
h=function(){switch(b.key){case "ArrowUp":return xD(ND.g(e)+d);case "ArrowDown":return xD(ND.g(e)-d);default:return ND.g(e)}}();f=PD(FD.g(c),f,h);var l=$APP.J(f);f=$APP.C(l,FD);h=$APP.C(l,GD);l=$APP.C(l,HD);gE(a,f,h,l,DD.g(c),XD.g(c));eE(a,dE(a));return fE(a,dE(a))}return null},qE=function(a,b){var c=dE(a);if(bE(c)&&$APP.Zc(pE,b.key)){b.preventDefault();var d=$APP.n(b.shiftKey)?10:1,e=function(){switch(b.key){case "ArrowRight":return wD(FD.g(c)+d);case "ArrowLeft":return wD(FD.g(c)-d);case "Home":return 0;
|
|
20
|
+
case "End":return 360;default:return FD.g(c)}}();gE(a,e,GD.g(c),HD.g(c),DD.g(c),XD.g(c));eE(a,dE(a));return fE(a,dE(a))}return null},rE=function(a,b){var c=dE(a);if($APP.n(function(){var f=bE(c);return f?(f=XD.g(c),$APP.n(f)?$APP.Zc(pE,b.key):f):f}())){b.preventDefault();var d=$APP.n(b.shiftKey)?.1:.01,e=function(){switch(b.key){case "ArrowRight":return yD(DD.g(c)+d);case "ArrowLeft":return yD(DD.g(c)-d);case "Home":return 0;case "End":return 1;default:return DD.g(c)}}();gE(a,FD.g(c),GD.g(c),HD.g(c),
|
|
21
|
+
e,!0);eE(a,dE(a));return fE(a,dE(a))}return null},sE=function(a){var b=dE(a);return bE(b)&&typeof EyeDropper!=="undefined"?(new EyeDropper).open().then(function(c){a.setAttribute("value",c.sRGBHex);return fE(a,dE(a))}).catch(function(){return null}):null},tE=function(a){if($APP.n(a.hasAttribute("open")))return null;a.setAttribute("open","");a=$APP.k(a,"__xColorPickerRefs");if($APP.n(a)){var b=$APP.k(a,"area");return setTimeout(function(){return b.focus()},0)}return null},uE=function(a){return $APP.n(a.hasAttribute("open"))?
|
|
22
|
+
(a.removeAttribute("open"),a=$APP.k(a,"__xColorPickerRefs"),$APP.n(a)?$APP.k(a,"trigger").focus():null):null},vE=function(a){var b=$APP.k(a,"__xColorPickerRefs");if($APP.n(b)){var c=$APP.k(b,"area"),d=$APP.k(b,"hue-strip"),e=$APP.k(b,"alpha-strip"),f=$APP.k(b,"hex-input"),h=$APP.k(b,"swatches"),l=$APP.k(b,"eyedropper"),m=$APP.k(b,"copy"),q=$APP.k(b,"trigger");b=$APP.k(b,"panel");var r=function(ia){var Da=dE(a);if(bE(Da)){ia.preventDefault();var fb=$APP.k($APP.k(a,"__xColorPickerRefs"),"area");fb.setPointerCapture(ia.pointerId);
|
|
23
|
+
a.__xColorPickerDragging="area";ia=kE(fb,ia);fb=$APP.J(ia);ia=$APP.C(fb,jE);fb=$APP.C(fb,$APP.cl);ia=PD(FD.g(Da),ia,fb);var sc=$APP.J(ia);ia=$APP.C(sc,FD);fb=$APP.C(sc,GD);sc=$APP.C(sc,HD);gE(a,ia,fb,sc,DD.g(Da),XD.g(Da));Da=eE(a,dE(a))}else Da=null;return Da},v=function(ia){if($APP.B.i("area",$APP.k(a,"__xColorPickerDragging"))){var Da=dE(a);ia=kE($APP.k($APP.k(a,"__xColorPickerRefs"),"area"),ia);var fb=$APP.J(ia);ia=$APP.C(fb,jE);fb=$APP.C(fb,$APP.cl);ia=PD(FD.g(Da),ia,fb);var sc=$APP.J(ia);ia=
|
|
24
|
+
$APP.C(sc,FD);fb=$APP.C(sc,GD);sc=$APP.C(sc,HD);gE(a,ia,fb,sc,DD.g(Da),XD.g(Da));Da=eE(a,dE(a))}else Da=null;return Da},x=function(){if($APP.B.i("area",$APP.k(a,"__xColorPickerDragging"))){a.__xColorPickerDragging=null;var ia=fE(a,dE(a))}else ia=null;return ia},y=function(ia){return oE(a,ia)},A=function(ia){var Da=dE(a);if(bE(Da)){ia.preventDefault();var fb=$APP.k($APP.k(a,"__xColorPickerRefs"),"hue-strip");fb.setPointerCapture(ia.pointerId);a.__xColorPickerDragging="hue";ia=lE(fb,ia);gE(a,ia,GD.g(Da),
|
|
25
|
+
HD.g(Da),DD.g(Da),XD.g(Da));Da=eE(a,dE(a))}else Da=null;return Da},D=function(ia){if($APP.B.i("hue",$APP.k(a,"__xColorPickerDragging"))){var Da=dE(a);ia=lE($APP.k($APP.k(a,"__xColorPickerRefs"),"hue-strip"),ia);gE(a,ia,GD.g(Da),HD.g(Da),DD.g(Da),XD.g(Da));Da=eE(a,dE(a))}else Da=null;return Da},G=function(){if($APP.B.i("hue",$APP.k(a,"__xColorPickerDragging"))){a.__xColorPickerDragging=null;var ia=fE(a,dE(a))}else ia=null;return ia},I=function(ia){return qE(a,ia)},H=function(ia){var Da=dE(a);var fb=
|
|
26
|
+
(fb=bE(Da))?XD.g(Da):fb;$APP.n(fb)?(ia.preventDefault(),fb=$APP.k($APP.k(a,"__xColorPickerRefs"),"alpha-strip"),fb.setPointerCapture(ia.pointerId),a.__xColorPickerDragging="alpha",ia=mE(fb,ia),gE(a,FD.g(Da),GD.g(Da),HD.g(Da),ia,!0),Da=eE(a,dE(a))):Da=null;return Da},K=function(ia){if($APP.B.i("alpha",$APP.k(a,"__xColorPickerDragging"))){var Da=dE(a);ia=mE($APP.k($APP.k(a,"__xColorPickerRefs"),"alpha-strip"),ia);gE(a,FD.g(Da),GD.g(Da),HD.g(Da),ia,!0);Da=eE(a,dE(a))}else Da=null;return Da},W=function(){if($APP.B.i("alpha",
|
|
27
|
+
$APP.k(a,"__xColorPickerDragging"))){a.__xColorPickerDragging=null;var ia=fE(a,dE(a))}else ia=null;return ia},ea=function(ia){return rE(a,ia)},va=function(ia){a:{if($APP.B.i("Enter",ia.key)){ia.preventDefault();ia=$APP.k($APP.k(a,"__xColorPickerRefs"),"hex-input");var Da=ia.value,fb=dE(a);if(bE(fb)){if(AD(Da)){a.setAttribute("value",Da);ia=fE(a,dE(a));break a}ia=ia.value=ZD.g(fb);break a}}ia=null}return ia},Pa=function(ia){a:{var Da=dE(a);if(bE(Da)&&(ia=ia.target,$APP.n(ia.hasAttribute("data-color")))){ia=
|
|
28
|
+
ia.getAttribute("data-color");a.setAttribute("value",ia);ia=fE(a,dE(a));break a}ia=null}return ia},eb=function(){return sE(a)},sb=function(){var ia=dE(a);return $APP.n(navigator.clipboard)?navigator.clipboard.writeText(ZD.g(ia)):null},tb=function(){var ia=dE(a);return $APP.B.i("popover",$APP.Jk.g(ia))&&$APP.p($APP.Y.g(ia))?$APP.n($APP.ao.g(ia))?uE(a):tE(a):null},Ib=function(ia){$APP.B.i("Escape",ia.key)&&$APP.B.i("popover",$APP.Jk.g(dE(a)))?(ia.preventDefault(),ia.stopPropagation(),ia=uE(a)):ia=null;
|
|
29
|
+
return ia},fc=function(ia){return ia.stopPropagation()},vb=function(ia){return $APP.n(a.hasAttribute("open"))?$APP.n(ia.composedPath().some(function(Da){return Da===a}))?null:uE(a):null};c.addEventListener("pointerdown",r);c.addEventListener("pointermove",v);c.addEventListener("pointerup",x);c.addEventListener("keydown",y);d.addEventListener("pointerdown",A);d.addEventListener("pointermove",D);d.addEventListener("pointerup",G);d.addEventListener("keydown",I);e.addEventListener("pointerdown",H);e.addEventListener("pointermove",
|
|
30
|
+
K);e.addEventListener("pointerup",W);e.addEventListener("keydown",ea);f.addEventListener("keydown",va);h.addEventListener("click",Pa);l.addEventListener("click",eb);m.addEventListener("click",sb);q.addEventListener("click",tb);b.addEventListener("keydown",Ib);b.addEventListener("pointerdown",fc);document.addEventListener("pointerdown",vb,!0);$APP.Zg(a,"__xColorPickerHandlers",{"area-move":v,copy:sb,"panel-key":Ib,"alpha-up":W,"hue-up":G,"alpha-key":ea,"alpha-move":K,"hex-key":va,swatch:Pa,"area-up":x,
|
|
31
|
+
"alpha-down":H,"area-key":y,"hue-down":A,"hue-key":I,"hue-move":D,eyedrop:eb,"panel-pd":fc,trigger:tb,"doc-click":vb,"area-down":r})}},wE=function(a){var b=$APP.k(a,"__xColorPickerRefs"),c=$APP.k(a,"__xColorPickerHandlers");if($APP.n($APP.n(b)?c:b)){var d=$APP.k(b,"area"),e=$APP.k(b,"hue-strip"),f=$APP.k(b,"alpha-strip"),h=$APP.k(b,"hex-input"),l=$APP.k(b,"swatches"),m=$APP.k(b,"eyedropper"),q=$APP.k(b,"copy"),r=$APP.k(b,"trigger");b=$APP.k(b,"panel");d.removeEventListener("pointerdown",$APP.k(c,
|
|
32
|
+
"area-down"));d.removeEventListener("pointermove",$APP.k(c,"area-move"));d.removeEventListener("pointerup",$APP.k(c,"area-up"));d.removeEventListener("keydown",$APP.k(c,"area-key"));e.removeEventListener("pointerdown",$APP.k(c,"hue-down"));e.removeEventListener("pointermove",$APP.k(c,"hue-move"));e.removeEventListener("pointerup",$APP.k(c,"hue-up"));e.removeEventListener("keydown",$APP.k(c,"hue-key"));f.removeEventListener("pointerdown",$APP.k(c,"alpha-down"));f.removeEventListener("pointermove",
|
|
33
|
+
$APP.k(c,"alpha-move"));f.removeEventListener("pointerup",$APP.k(c,"alpha-up"));f.removeEventListener("keydown",$APP.k(c,"alpha-key"));h.removeEventListener("keydown",$APP.k(c,"hex-key"));l.removeEventListener("click",$APP.k(c,"swatch"));m.removeEventListener("click",$APP.k(c,"eyedrop"));q.removeEventListener("click",$APP.k(c,"copy"));r.removeEventListener("click",$APP.k(c,"trigger"));b.removeEventListener("keydown",$APP.k(c,"panel-key"));b.removeEventListener("pointerdown",$APP.k(c,"panel-pd"));
|
|
34
|
+
document.removeEventListener("pointerdown",$APP.k(c,"doc-click"),!0);a.__xColorPickerHandlers=null}else return null},xE=function(a,b){$APP.bh(a,"disabled",$APP.E(b));return iE(a)},yE=function(a){a.setAttribute("value","#000000");return iE(a)},zE=function(a){if(!$APP.n($APP.k(a,"__xColorPickerRefs"))){var b=a.attachShadow({mode:"open"}),c=cE("style"),d=cE("div"),e=cE("button"),f=cE("span"),h=cE("div"),l=cE("div"),m=cE("div"),q=cE("div"),r=cE("div"),v=cE("div"),x=cE("div"),y=cE("div"),A=cE("div"),D=
|
|
35
|
+
cE("div"),G=cE("div"),I=cE("span"),H=cE("input"),K=cE("button"),W=cE("button"),ea=cE("div");c.textContent=":host{display:inline-block;color-scheme:light dark;position:relative;--x-color-picker-width:240px;--x-color-picker-area-height:160px;--x-color-picker-strip-height:14px;--x-color-picker-swatch-size:28px;--x-color-picker-radius:var(--x-radius-md,8px);--x-color-picker-gap:10px;--x-color-picker-bg:var(--x-color-bg,#ffffff);--x-color-picker-border:var(--x-color-border,#cbd5e1);--x-color-picker-text:var(--x-color-text,#1e293b);--x-color-picker-focus-ring:var(--x-color-focus-ring,#60a5fa);--x-color-picker-disabled-opacity:0.45;}@media (prefers-color-scheme:dark){:host{--x-color-picker-bg:var(--x-color-bg,#1e293b);--x-color-picker-border:var(--x-color-border,#475569);--x-color-picker-text:var(--x-color-text,#f1f5f9);--x-color-picker-focus-ring:var(--x-color-focus-ring,#93c5fd);}}[part\x3dcontainer]{position:relative;width:var(--x-color-picker-width);max-width:calc(100vw - 2rem);}[part\x3dtrigger]{all:unset;display:none;box-sizing:border-box;width:36px;height:36px;border-radius:var(--x-color-picker-radius);border:2px solid var(--x-color-picker-border);cursor:pointer;overflow:hidden;}[part\x3dtrigger]:focus-visible{outline:2px solid var(--x-color-picker-focus-ring);outline-offset:2px;}:host([data-mode\x3dpopover]) [part\x3dtrigger]{display:block;}[part\x3dtrigger-swatch]{display:block;width:100%;height:100%;}[part\x3dpanel]{box-sizing:border-box;background:var(--x-color-picker-bg);border:1px solid var(--x-color-picker-border);border-radius:var(--x-color-picker-radius);padding:var(--x-color-picker-gap);display:flex;flex-direction:column;gap:var(--x-color-picker-gap);box-shadow:var(--x-shadow-md,0 4px 12px rgba(0,0,0,0.1));}:host([data-mode\x3dpopover]) [part\x3dpanel]{display:none;position:absolute;z-index:1000;top:calc(100% + 8px);left:0;max-width:calc(100vw - 1rem);}:host([data-mode\x3dpopover][open]) [part\x3dpanel]{display:flex;}[part\x3darea]{position:relative;width:100%;height:var(--x-color-picker-area-height);border-radius:calc(var(--x-color-picker-radius) - 2px);cursor:crosshair;touch-action:none;overflow:hidden;background:linear-gradient(to bottom,transparent,#000),linear-gradient(to right,#fff,hsl(var(--_x-cp-hue,0),100%,50%));}[part\x3darea]:focus-visible{outline:2px solid var(--x-color-picker-focus-ring);outline-offset:2px;}[part\x3darea-thumb]{position:absolute;width:16px;height:16px;border-radius:50%;border:2px solid #fff;box-shadow:0 0 0 1px rgba(0,0,0,0.3),inset 0 0 0 1px rgba(0,0,0,0.3);pointer-events:none;left:var(--_x-cp-area-x,0%);top:var(--_x-cp-area-y,0%);transform:translate(-50%,-50%);}[part\x3dstrips]{display:flex;flex-direction:column;gap:8px;}[part\x3dhue-strip]{position:relative;width:100%;height:var(--x-color-picker-strip-height);border-radius:var(--x-color-picker-strip-height);cursor:pointer;touch-action:none;background:linear-gradient(to right,#f00 0%,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,#f00 100%);}[part\x3dhue-strip]:focus-visible{outline:2px solid var(--x-color-picker-focus-ring);outline-offset:2px;}[part\x3dhue-thumb]{position:absolute;width:16px;height:16px;border-radius:50%;border:2px solid #fff;box-shadow:0 1px 4px rgba(0,0,0,0.3);pointer-events:none;top:50%;left:var(--_x-cp-hue-pos,0%);transform:translate(-50%,-50%);}[part\x3dalpha-strip]{position:relative;width:100%;height:var(--x-color-picker-strip-height);border-radius:var(--x-color-picker-strip-height);cursor:pointer;touch-action:none;background-image:linear-gradient(45deg,#ccc 25%,transparent 25%),linear-gradient(-45deg,#ccc 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#ccc 75%),linear-gradient(-45deg,transparent 75%,#ccc 75%);background-size:12px 12px;background-position:0 0,0 6px,6px -6px,-6px 0;}[part\x3dalpha-strip]:focus-visible{outline:2px solid var(--x-color-picker-focus-ring);outline-offset:2px;}[part\x3dalpha-gradient]{position:absolute;inset:0;border-radius:inherit;background:linear-gradient(to right,transparent,var(--_x-cp-alpha-color,#000));}[part\x3dalpha-thumb]{position:absolute;width:16px;height:16px;border-radius:50%;border:2px solid #fff;box-shadow:0 1px 4px rgba(0,0,0,0.3);pointer-events:none;top:50%;left:var(--_x-cp-alpha-pos,100%);transform:translate(-50%,-50%);z-index:1;}[part\x3dcontrols]{display:flex;align-items:center;gap:6px;}[part\x3dpreview]{width:32px;height:32px;border-radius:var(--x-color-picker-radius);border:1px solid var(--x-color-picker-border);flex-shrink:0;background-image:linear-gradient(45deg,#ccc 25%,transparent 25%),linear-gradient(-45deg,#ccc 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#ccc 75%),linear-gradient(-45deg,transparent 75%,#ccc 75%);background-size:8px 8px;background-position:0 0,0 4px,4px -4px,-4px 0;overflow:hidden;}[part\x3dpreview-color]{display:block;width:100%;height:100%;}[part\x3dhex-input]{flex:1;min-width:0;box-sizing:border-box;padding:4px 8px;border:1px solid var(--x-color-picker-border);border-radius:calc(var(--x-color-picker-radius) - 2px);background:transparent;color:var(--x-color-picker-text);font-family:var(--x-font-family,inherit);font-size:var(--x-font-size-sm,0.8125rem);outline:none;}[part\x3dhex-input]:focus-visible{border-color:var(--x-color-picker-focus-ring);box-shadow:0 0 0 2px var(--x-color-picker-focus-ring);}[part\x3deyedropper],[part\x3dcopy]{all:unset;display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:calc(var(--x-color-picker-radius) - 2px);cursor:pointer;color:var(--x-color-picker-text);flex-shrink:0;}[part\x3deyedropper]:hover,[part\x3dcopy]:hover{background:rgba(0,0,0,0.06);}@media (prefers-color-scheme:dark){[part\x3deyedropper]:hover,[part\x3dcopy]:hover{background:rgba(255,255,255,0.1);}}[part\x3deyedropper]:focus-visible,[part\x3dcopy]:focus-visible{outline:2px solid var(--x-color-picker-focus-ring);outline-offset:1px;}[part\x3dswatches]{display:grid;grid-template-columns:repeat(auto-fill,var(--x-color-picker-swatch-size));gap:4px;}[part\x3dswatches]:empty{display:none;}[part\x3dswatch]{all:unset;width:var(--x-color-picker-swatch-size);height:var(--x-color-picker-swatch-size);border-radius:4px;cursor:pointer;border:1px solid rgba(0,0,0,0.1);box-sizing:border-box;}[part\x3dswatch]:focus-visible{outline:2px solid var(--x-color-picker-focus-ring);outline-offset:1px;}[part\x3dswatch][aria-selected\x3dtrue]{outline:2px solid var(--x-color-picker-focus-ring);outline-offset:1px;}:host([disabled]){opacity:var(--x-color-picker-disabled-opacity);pointer-events:none;}@media (prefers-reduced-motion:reduce){[part\x3darea-thumb],[part\x3dhue-thumb],[part\x3dalpha-thumb]{transition:none;}}@media (pointer:coarse){[part\x3darea-thumb],[part\x3dhue-thumb],[part\x3dalpha-thumb]{width:24px;height:24px;}[part\x3dtrigger]{width:44px;height:44px;}[part\x3deyedropper],[part\x3dcopy]{width:44px;height:44px;}[part\x3dswatch]{min-width:44px;min-height:44px;}}";
|
|
36
|
+
d.setAttribute("part","container");e.setAttribute("part","trigger");e.setAttribute("type","button");e.setAttribute("aria-label","Pick color");f.setAttribute("part","trigger-swatch");h.setAttribute("part","panel");l.setAttribute("part","area");l.setAttribute("role","slider");l.setAttribute("tabindex","0");l.setAttribute("aria-label","Color");m.setAttribute("part","area-thumb");q.setAttribute("part","strips");r.setAttribute("part","hue-strip");r.setAttribute("role","slider");r.setAttribute("tabindex",
|
|
37
|
+
"0");r.setAttribute("aria-label","Hue");r.setAttribute("aria-valuemin","0");r.setAttribute("aria-valuemax","360");v.setAttribute("part","hue-thumb");x.setAttribute("part","alpha-strip");x.setAttribute("role","slider");x.setAttribute("tabindex","0");x.setAttribute("aria-label","Opacity");x.setAttribute("aria-valuemin","0");x.setAttribute("aria-valuemax","100");y.setAttribute("part","alpha-gradient");A.setAttribute("part","alpha-thumb");D.setAttribute("part","controls");G.setAttribute("part","preview");
|
|
38
|
+
I.setAttribute("part","preview-color");H.setAttribute("part","hex-input");H.setAttribute("type","text");H.setAttribute("spellcheck","false");H.setAttribute("autocomplete","off");H.setAttribute("aria-label","Hex color value");K.setAttribute("part","eyedropper");K.setAttribute("type","button");K.setAttribute("aria-label","Pick color from screen");K.innerHTML='\x3csvg width\x3d"16" height\x3d"16" viewBox\x3d"0 0 16 16" fill\x3d"none" stroke\x3d"currentColor" stroke-width\x3d"1.5" stroke-linecap\x3d"round" stroke-linejoin\x3d"round"\x3e\x3cpath d\x3d"M13.5 2.5a2.12 2.12 0 0 0-3 0L9 4l-.5-.5L6 6l4 4 2.5-2.5L12 7l1.5-1.5a2.12 2.12 0 0 0 0-3zM6 6L2.5 9.5a1.5 1.5 0 0 0-.4.8L1.5 14l3.7-.6a1.5 1.5 0 0 0 .8-.4L10 10"/\x3e\x3c/svg\x3e';
|
|
39
|
+
W.setAttribute("part","copy");W.setAttribute("type","button");W.setAttribute("aria-label","Copy color value");W.innerHTML='\x3csvg width\x3d"16" height\x3d"16" viewBox\x3d"0 0 16 16" fill\x3d"none" stroke\x3d"currentColor" stroke-width\x3d"1.5" stroke-linecap\x3d"round" stroke-linejoin\x3d"round"\x3e\x3crect x\x3d"5" y\x3d"5" width\x3d"9" height\x3d"9" rx\x3d"1.5"/\x3e\x3cpath d\x3d"M5 11H3.5A1.5 1.5 0 0 1 2 9.5v-6A1.5 1.5 0 0 1 3.5 2h6A1.5 1.5 0 0 1 11 3.5V5"/\x3e\x3c/svg\x3e';ea.setAttribute("part",
|
|
40
|
+
"swatches");ea.setAttribute("role","listbox");ea.setAttribute("aria-label","Preset colors");e.appendChild(f);l.appendChild(m);r.appendChild(v);x.appendChild(y);x.appendChild(A);q.appendChild(r);q.appendChild(x);G.appendChild(I);D.appendChild(G);D.appendChild(H);D.appendChild(K);D.appendChild(W);h.appendChild(l);h.appendChild(q);h.appendChild(D);h.appendChild(ea);d.appendChild(e);d.appendChild(h);b.appendChild(c);b.appendChild(d);typeof EyeDropper==="undefined"&&(K.style.display="none");a.__xColorPickerRefs=
|
|
41
|
+
{"alpha-thumb":A,copy:W,swatches:ea,"hue-strip":r,controls:D,"alpha-gradient":y,panel:h,preview:G,"area-thumb":m,"preview-color":I,container:d,area:l,"hue-thumb":v,"trigger-swatch":f,trigger:e,"alpha-strip":x,eyedropper:K,"hex-input":H};$APP.n(a.attachInternals)&&(b=a.attachInternals(),a.__xColorPickerInternals=b)}wE(a);vE(a);return iE(a)},AE=function(a){return wE(a)},BE=function(a){return iE(a)},DE=function(a){return $APP.jh(a,CE)},FE=function(){return $APP.Yg("x-color-picker",new $APP.N(null,8,
|
|
42
|
+
[$APP.Pg,EE,$APP.Qg,zE,$APP.Rg,AE,$APP.Sg,BE,$APP.Tg,!0,$APP.Ug,xE,$APP.Vg,yE,$APP.Wg,DE],null))},WD=new $APP.F(null,"alpha","alpha",-1574982441),ZD=new $APP.F(null,"hex-full","hex-full",-1466644518),VD=new $APP.F(null,"swatches","swatches",2033601707),ND=new $APP.F(null,"v","v",21465059),GD=new $APP.F(null,"s","s",1705939918),BD=new $APP.F(null,"r","r",-471384190),XD=new $APP.F(null,"alpha?","alpha?",1329751525),HD=new $APP.F(null,"l","l",1395893423),FD=new $APP.F(null,"h","h",1109658740),CD=new $APP.F(null,
|
|
43
|
+
"b","b",1482224470),jE=new $APP.F(null,"sat","sat",1064662667),DD=new $APP.F(null,"a","a",-2123407586),YD=new $APP.F(null,"hex","hex",41691346);var SD=new $APP.O(null,new $APP.N(null,2,["inline",null,"popover",null],null),null),EE="value alpha swatches disabled readonly name mode open label".split(" "),CE=$APP.Lf([$APP.Bn,$APP.al,$APP.Nk,$APP.Gh,$APP.Jk,VD,$APP.Hn,$APP.X,WD],[new $APP.N(null,2,[$APP.R,$APP.T,$APP.S,"open"],null),new $APP.N(null,2,[$APP.R,$APP.T,$APP.S,"disabled"],null),new $APP.N(null,2,[$APP.R,$APP.U,$APP.S,"name"],null),new $APP.N(null,2,[$APP.R,$APP.U,$APP.S,"value"],null),new $APP.N(null,2,[$APP.R,$APP.U,$APP.S,"mode"],
|
|
44
|
+
null),new $APP.N(null,2,[$APP.R,$APP.U,$APP.S,"swatches"],null),new $APP.N(null,2,[$APP.R,$APP.T,$APP.S,"readonly"],null),new $APP.N(null,2,[$APP.R,$APP.U,$APP.S,"label"],null),new $APP.N(null,2,[$APP.R,$APP.T,$APP.S,"alpha"],null)]);
|
|
45
|
+
$APP.Yd(["x-color-picker-input",new $APP.N(null,2,[$APP.Z,new $APP.N(null,5,[$APP.Gh,$APP.U,FD,$APP.V,GD,$APP.V,HD,$APP.V,DD,$APP.V],null),$APP.Fn,!1],null),"x-color-picker-change",new $APP.N(null,2,[$APP.Z,new $APP.N(null,5,[$APP.Gh,$APP.U,FD,$APP.V,GD,$APP.V,HD,$APP.V,DD,$APP.V],null),$APP.Fn,!0],null)]);var zD=/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/;var nE=new $APP.O(null,new $APP.N(null,4,["ArrowUp",null,"ArrowDown",null,"ArrowRight",null,"ArrowLeft",null],null),null),pE=new $APP.O(null,new $APP.N(null,4,["End",null,"ArrowRight",null,"ArrowLeft",null,"Home",null],null),null);$APP.ca("baredom.exports.x_color_picker.init",FE);export const init=FE;
|