@ecopages/radiant-ui 0.2.5 → 0.3.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/README.md +2 -0
- package/dist/components/ui/alert/alert.d.ts +1 -3
- package/dist/components/ui/alert/alert.script.d.ts +7 -0
- package/dist/components/ui/alert/index.js +1 -1
- package/dist/components/ui/alert/index.js.map +3 -3
- package/dist/components/ui/autocomplete/autocomplete.d.ts +1 -2
- package/dist/components/ui/autocomplete/autocomplete.script.d.ts +7 -0
- package/dist/components/ui/autocomplete/index.js +1 -1
- package/dist/components/ui/autocomplete/index.js.map +3 -3
- package/dist/components/ui/breadcrumb/breadcrumb.d.ts +1 -2
- package/dist/components/ui/breadcrumb/breadcrumb.script.d.ts +7 -0
- package/dist/components/ui/breadcrumb/index.js +1 -1
- package/dist/components/ui/breadcrumb/index.js.map +3 -3
- package/dist/components/ui/calendar/calendar.script.d.ts +8 -0
- package/dist/components/ui/calendar/index.d.ts +1 -2
- package/dist/components/ui/calendar/index.js +1 -1
- package/dist/components/ui/calendar/index.js.map +4 -4
- package/dist/components/ui/carousel/carousel.d.ts +1 -2
- package/dist/components/ui/carousel/carousel.script.d.ts +7 -0
- package/dist/components/ui/carousel/index.js +1 -1
- package/dist/components/ui/carousel/index.js.map +3 -3
- package/dist/components/ui/checkbox/checkbox.d.ts +1 -2
- package/dist/components/ui/checkbox/checkbox.script.d.ts +7 -0
- package/dist/components/ui/checkbox/index.js +1 -1
- package/dist/components/ui/checkbox/index.js.map +3 -3
- package/dist/components/ui/checkbox-group/checkbox-group.d.ts +1 -2
- package/dist/components/ui/checkbox-group/checkbox-group.script.d.ts +7 -0
- package/dist/components/ui/checkbox-group/index.js +1 -1
- package/dist/components/ui/checkbox-group/index.js.map +3 -3
- package/dist/components/ui/combobox/combobox.d.ts +1 -2
- package/dist/components/ui/combobox/combobox.script.d.ts +7 -0
- package/dist/components/ui/combobox/index.js +1 -1
- package/dist/components/ui/combobox/index.js.map +3 -3
- package/dist/components/ui/cycle-toggle/cycle-toggle.d.ts +1 -2
- package/dist/components/ui/cycle-toggle/cycle-toggle.script.d.ts +7 -0
- package/dist/components/ui/cycle-toggle/index.js +1 -1
- package/dist/components/ui/cycle-toggle/index.js.map +3 -3
- package/dist/components/ui/date-field/date-field.d.ts +1 -3
- package/dist/components/ui/date-field/date-field.script.d.ts +7 -0
- package/dist/components/ui/date-field/index.js +1 -1
- package/dist/components/ui/date-field/index.js.map +4 -4
- package/dist/components/ui/date-input/date-input.d.ts +1 -2
- package/dist/components/ui/date-input/date-input.script.d.ts +8 -0
- package/dist/components/ui/date-input/index.js +1 -1
- package/dist/components/ui/date-input/index.js.map +3 -3
- package/dist/components/ui/date-range-picker/date-range-picker.d.ts +1 -3
- package/dist/components/ui/date-range-picker/date-range-picker.script.d.ts +7 -0
- package/dist/components/ui/date-range-picker/index.js +1 -1
- package/dist/components/ui/date-range-picker/index.js.map +4 -4
- package/dist/components/ui/dialog/dialog-registry.d.ts +0 -1
- package/dist/components/ui/dialog/dialog.d.ts +1 -2
- package/dist/components/ui/dialog/dialog.script.d.ts +7 -0
- package/dist/components/ui/dialog/index.js +1 -1
- package/dist/components/ui/dialog/index.js.map +3 -3
- package/dist/components/ui/disclosure/disclosure-group.script.d.ts +7 -0
- package/dist/components/ui/disclosure/disclosure.d.ts +2 -4
- package/dist/components/ui/disclosure/disclosure.script.d.ts +7 -0
- package/dist/components/ui/disclosure/index.js +1 -1
- package/dist/components/ui/disclosure/index.js.map +3 -3
- package/dist/components/ui/field/field.d.ts +1 -2
- package/dist/components/ui/field/field.script.d.ts +7 -0
- package/dist/components/ui/field/index.js +1 -1
- package/dist/components/ui/field/index.js.map +3 -3
- package/dist/components/ui/form/form.d.ts +1 -2
- package/dist/components/ui/form/form.script.d.ts +7 -0
- package/dist/components/ui/form/index.js +1 -1
- package/dist/components/ui/form/index.js.map +3 -3
- package/dist/components/ui/grid/grid.d.ts +1 -2
- package/dist/components/ui/grid/grid.script.d.ts +7 -0
- package/dist/components/ui/grid/index.js +1 -1
- package/dist/components/ui/grid/index.js.map +3 -3
- package/dist/components/ui/hover-card/hover-card.d.ts +1 -2
- package/dist/components/ui/hover-card/hover-card.script.d.ts +7 -0
- package/dist/components/ui/hover-card/index.js +1 -1
- package/dist/components/ui/hover-card/index.js.map +3 -3
- package/dist/components/ui/knob/index.js +1 -1
- package/dist/components/ui/knob/index.js.map +3 -3
- package/dist/components/ui/knob/knob.d.ts +1 -2
- package/dist/components/ui/knob/knob.script.d.ts +7 -0
- package/dist/components/ui/listbox/index.js +1 -1
- package/dist/components/ui/listbox/index.js.map +3 -3
- package/dist/components/ui/listbox/listbox.d.ts +1 -2
- package/dist/components/ui/listbox/listbox.script.d.ts +7 -0
- package/dist/components/ui/menu-button/index.js +1 -1
- package/dist/components/ui/menu-button/index.js.map +3 -3
- package/dist/components/ui/menu-button/menu-button.d.ts +1 -2
- package/dist/components/ui/menu-button/menu-button.script.d.ts +7 -0
- package/dist/components/ui/menubar/index.js +1 -1
- package/dist/components/ui/menubar/index.js.map +3 -3
- package/dist/components/ui/menubar/menubar.d.ts +1 -2
- package/dist/components/ui/menubar/menubar.script.d.ts +7 -0
- package/dist/components/ui/meter/index.d.ts +1 -2
- package/dist/components/ui/meter/index.js +1 -1
- package/dist/components/ui/meter/index.js.map +4 -4
- package/dist/components/ui/meter/meter.script.d.ts +8 -0
- package/dist/components/ui/navigation-menu/index.js +1 -1
- package/dist/components/ui/navigation-menu/index.js.map +3 -3
- package/dist/components/ui/navigation-menu/navigation-menu.css +2 -1
- package/dist/components/ui/navigation-menu/navigation-menu.d.ts +1 -2
- package/dist/components/ui/navigation-menu/navigation-menu.script.d.ts +7 -0
- package/dist/components/ui/number-field/index.js +1 -1
- package/dist/components/ui/number-field/index.js.map +3 -3
- package/dist/components/ui/number-field/number-field.d.ts +1 -2
- package/dist/components/ui/number-field/number-field.script.d.ts +7 -0
- package/dist/components/ui/pagination/index.js +1 -1
- package/dist/components/ui/pagination/index.js.map +3 -3
- package/dist/components/ui/pagination/pagination.d.ts +1 -2
- package/dist/components/ui/pagination/pagination.script.d.ts +7 -0
- package/dist/components/ui/popover/index.js +1 -1
- package/dist/components/ui/popover/index.js.map +3 -3
- package/dist/components/ui/popover/popover.d.ts +1 -2
- package/dist/components/ui/popover/popover.script.d.ts +9 -0
- package/dist/components/ui/radio-group/index.js +1 -1
- package/dist/components/ui/radio-group/index.js.map +3 -3
- package/dist/components/ui/radio-group/radio-group.d.ts +1 -2
- package/dist/components/ui/radio-group/radio-group.script.d.ts +7 -0
- package/dist/components/ui/select/index.js +1 -1
- package/dist/components/ui/select/index.js.map +3 -3
- package/dist/components/ui/select/select.d.ts +1 -2
- package/dist/components/ui/select/select.script.d.ts +7 -0
- package/dist/components/ui/sidebar/index.js +1 -1
- package/dist/components/ui/sidebar/index.js.map +3 -3
- package/dist/components/ui/sidebar/sidebar-trigger.d.ts +1 -2
- package/dist/components/ui/sidebar/sidebar-trigger.script.d.ts +7 -0
- package/dist/components/ui/sidebar/sidebar.d.ts +1 -3
- package/dist/components/ui/sidebar/sidebar.script.d.ts +7 -0
- package/dist/components/ui/slider/index.js +1 -1
- package/dist/components/ui/slider/index.js.map +3 -3
- package/dist/components/ui/slider/slider.d.ts +1 -2
- package/dist/components/ui/slider/slider.script.d.ts +7 -0
- package/dist/components/ui/switch/index.js +1 -1
- package/dist/components/ui/switch/index.js.map +3 -3
- package/dist/components/ui/switch/switch.d.ts +1 -2
- package/dist/components/ui/switch/switch.script.d.ts +7 -0
- package/dist/components/ui/table/index.js +1 -1
- package/dist/components/ui/table/index.js.map +3 -3
- package/dist/components/ui/table/table.d.ts +1 -2
- package/dist/components/ui/table/table.script.d.ts +7 -0
- package/dist/components/ui/tabs/index.d.ts +2 -2
- package/dist/components/ui/tabs/index.js +1 -1
- package/dist/components/ui/tabs/index.js.map +3 -3
- package/dist/components/ui/tabs/tabs.d.ts +1 -4
- package/dist/components/ui/tabs/tabs.script.d.ts +7 -0
- package/dist/components/ui/tag-group/index.js +1 -1
- package/dist/components/ui/tag-group/index.js.map +3 -3
- package/dist/components/ui/tag-group/tag-group.d.ts +1 -2
- package/dist/components/ui/tag-group/tag-group.script.d.ts +7 -0
- package/dist/components/ui/toast/index.d.ts +2 -2
- package/dist/components/ui/toast/index.js +1 -1
- package/dist/components/ui/toast/index.js.map +3 -3
- package/dist/components/ui/toast/toast.d.ts +2 -9
- package/dist/components/ui/toast/toast.script.d.ts +8 -0
- package/dist/components/ui/toast/toaster.script.d.ts +8 -1
- package/dist/components/ui/toc/index.d.ts +6 -2
- package/dist/components/ui/toc/index.js +1 -1
- package/dist/components/ui/toc/index.js.map +4 -4
- package/dist/components/ui/toc/toc.script.d.ts +8 -0
- package/dist/components/ui/toolbar/index.js +1 -1
- package/dist/components/ui/toolbar/index.js.map +3 -3
- package/dist/components/ui/toolbar/toolbar.d.ts +1 -2
- package/dist/components/ui/toolbar/toolbar.script.d.ts +7 -0
- package/dist/components/ui/tooltip/index.js +1 -1
- package/dist/components/ui/tooltip/index.js.map +3 -3
- package/dist/components/ui/tooltip/tooltip.d.ts +1 -2
- package/dist/components/ui/tooltip/tooltip.script.d.ts +7 -0
- package/dist/components/ui/tree/index.js +1 -1
- package/dist/components/ui/tree/index.js.map +3 -3
- package/dist/components/ui/tree/tree.d.ts +1 -2
- package/dist/components/ui/tree/tree.script.d.ts +7 -0
- package/dist/components/ui/treegrid/index.js +1 -1
- package/dist/components/ui/treegrid/index.js.map +3 -3
- package/dist/components/ui/treegrid/treegrid.d.ts +1 -2
- package/dist/components/ui/treegrid/treegrid.script.d.ts +7 -0
- package/dist/components/ui/window-splitter/index.js +1 -1
- package/dist/components/ui/window-splitter/index.js.map +3 -3
- package/dist/components/ui/window-splitter/window-splitter.d.ts +1 -2
- package/dist/components/ui/window-splitter/window-splitter.script.d.ts +7 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +4 -4
- package/dist/styles/radiant-ui-core.css +3 -0
- package/dist/styles/radiant-ui.css +3 -0
- package/dist/styles/styles.css +1 -1
- package/dist/styles/tailwind.css +3 -0
- package/package.json +11 -11
- package/dist/components/ui/calendar/calendar.d.ts +0 -6
- package/dist/components/ui/meter/meter.d.ts +0 -10
- package/dist/components/ui/toc/toc.d.ts +0 -7
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { JSX_PROPS } from '@ecopages/jsx';
|
|
1
2
|
import { RadiantElement } from '@ecopages/radiant';
|
|
2
3
|
import type { EventEmitter } from '@ecopages/radiant/tools/event-emitter';
|
|
3
4
|
export type RuiPaginationProps = {
|
|
@@ -58,6 +59,7 @@ export declare function clampPage(page: number, pageCount: number): number;
|
|
|
58
59
|
* BEM classes are presentation-only; see view `@cssclass`.
|
|
59
60
|
*/
|
|
60
61
|
export declare class RuiPagination extends RadiantElement {
|
|
62
|
+
readonly [JSX_PROPS]?: RuiPaginationProps;
|
|
61
63
|
label: string;
|
|
62
64
|
page: number;
|
|
63
65
|
pageCount: number;
|
|
@@ -67,3 +69,8 @@ export declare class RuiPagination extends RadiantElement {
|
|
|
67
69
|
private changePage;
|
|
68
70
|
onPageClick(event: Event): void;
|
|
69
71
|
}
|
|
72
|
+
declare global {
|
|
73
|
+
interface HTMLElementTagNameMap {
|
|
74
|
+
'rui-pagination': RuiPagination;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as F,jsxs as oe}from"@ecopages/jsx/jsx-runtime";function pt(...e){return e.filter(Boolean).join(" ")}import{RadiantElement as V,bound as Q,customElement as te,event as xe,onEvent as D,onUpdated as ee,prop as A,query as N}from"@ecopages/radiant";import{isServer as be}from"@ecopages/radiant/is-server";var ie=/^[A-Za-z][A-Za-z0-9_-]*$/;function ft(e){return ie.test(e)}function se(e){let t=e.trim();if(ft(t))return t;let n=`rui-${t}`;return t&&ft(n)?n:"rui"}function dt(e){let t=typeof crypto.randomUUID=="function"?crypto.randomUUID().replace(/-/g,""):Array.from(crypto.getRandomValues(new Uint8Array(16)),n=>n.toString(16).padStart(2,"0")).join("");return`${se(e)}-${t}`}var ae={top:"bottom",bottom:"top",left:"right",right:"left"},ce=8,Y=new WeakMap;function le(e){Y.has(e)&&(e.style.width="",e.style.minWidth="",e.style.maxWidth="",e.style.boxSizing="",Y.delete(e))}function ue(e){let t=e.indexOf("-");if(t===-1)return{side:e,align:"center"};let n=e.slice(0,t),r=e.slice(t+1);return{side:n,align:r==="start"||r==="end"?r:"center"}}function vt(e){return e==="top"||e==="bottom"?"y":"x"}function gt(e,t,n,r,o){let{width:i,height:a}=t,s=0,h=0;switch(n){case"top":h=e.top-a-o;break;case"bottom":h=e.bottom+o;break;case"left":s=e.left-i-o;break;case"right":s=e.right+o;break}return vt(n)==="y"?r==="start"?s=e.left:r==="end"?s=e.right-i:s=e.left+(e.width-i)/2:r==="start"?h=e.top:r==="end"?h=e.bottom-a:h=e.top+(e.height-a)/2,{x:s,y:h}}function he(e,t,n,r){let{padding:o,width:i,height:a}=r;return n==="top"?Math.max(0,o-e.y):n==="bottom"?Math.max(0,e.y+t.height-(a-o)):n==="left"?Math.max(0,o-e.x):Math.max(0,e.x+t.width-(i-o))}function mt(e,t,n,r){let{padding:o,width:i,height:a}=r;return n==="top"?e.top-o-t.height:n==="bottom"?a-o-t.height-e.bottom:n==="left"?e.left-o-t.width:i-o-t.width-e.right}function pe(e,t){return t==="center"?e:`${e}-${t}`}function fe(e,t,n,r){let{padding:o,width:i,height:a}=r;if(vt(n)==="y"){let h=Math.max(o,i-o-t.width);return{x:Math.min(Math.max(e.x,o),h),y:Math.max(o,e.y)}}let s=Math.max(o,a-o-t.height);return{x:Math.max(o,e.x),y:Math.min(Math.max(e.y,o),s)}}function de(e,t,n,r,o={width:typeof window>"u"?0:window.innerWidth,height:typeof window>"u"?0:window.innerHeight,padding:ce}){let{side:i,align:a}=ue(n),s=gt(e,t,i,a,r),h=he(s,t,i,o),v=i,C=s;if(h>0){let P=ae[i],T=gt(e,t,P,a,r),H=mt(e,t,i,o);mt(e,t,P,o)>H&&(v=P,C=T)}return{coords:fe(C,t,v,o),placement:pe(v,a)}}function ge(e,t,n,r,o={}){let i=o.matchAnchorWidth===!0,a=e.offsetWidth,s=i?{width:a,height:t.offsetHeight}:{width:t.offsetWidth,height:t.offsetHeight};i?(t.style.width=`${a}px`,t.style.minWidth=`${a}px`,t.style.maxWidth=`${a}px`,t.style.boxSizing="border-box",Y.set(t,!0)):le(t);let{coords:h,placement:v}=de(e.getBoundingClientRect(),s,n,r);return Object.assign(t.style,{position:"fixed",left:`${h.x}px`,top:`${h.y}px`,right:"auto",bottom:"auto",visibility:"visible"}),t.setAttribute("data-placement",v),v}function yt({anchor:e,floating:t,getPlacement:n,gap:r,matchAnchorWidth:o}){let i=()=>{t.hidden||ge(e,t,n(),r,{matchAnchorWidth:o})};i(),window.addEventListener("resize",i),window.addEventListener("scroll",i,!0);let a=new ResizeObserver(i);return a.observe(e),a.observe(t),()=>{window.removeEventListener("resize",i),window.removeEventListener("scroll",i,!0),a.disconnect()}}function xt(e,t=document.body){let n=e.parentNode;if(!n)return{unmount:()=>{}};let r=document.createComment("rui-portal");return n.insertBefore(r,e),t.appendChild(e),{unmount:()=>{let o=r.parentNode;o&&(o.insertBefore(e,r),r.remove())}}}function z(e,t,n){return n?!!(e?.contains(n)||t?.contains(n)):!1}function bt(e,t,n){return n instanceof Node?!z(e,t,n):!0}function wt(e,t,n){return!z(e,t,n)}var L=class{config;cleanupFloating=null;portalHandle=null;floatingElement=null;constructor(t){this.config=t}updateConfig(t){this.config={...this.config,...t}}sync(){let t=this.resolveFloating();if(!t)return;if(!this.config.getOpen()){this.teardown(),t.toggleAttribute("hidden",!0);return}let r=this.config.getAnchor();if(!r)return;t.toggleAttribute("hidden",!1),this.config.portal!==!1?this.portalHandle||(this.portalHandle=xt(t,this.config.portalContainer??document.body)):this.portalHandle&&(this.portalHandle.unmount(),this.portalHandle=null),this.teardownFloating(),this.cleanupFloating=yt({anchor:r,floating:t,getPlacement:this.config.getPlacement,gap:this.config.gap??8,matchAnchorWidth:this.config.matchAnchorWidth})}contains(t){return z(this.config.getAnchor(),this.resolveFloating(),t)}getFloatingElement(){return this.resolveFloating()}teardown(){this.teardownFloating(),this.portalHandle&&(this.portalHandle.unmount(),this.portalHandle=null)}destroy(){this.teardown(),this.floatingElement=null}resolveFloating(){let t=this.config.getFloating();return t&&(this.floatingElement=t),t??this.floatingElement}teardownFloating(){this.cleanupFloating?.(),this.cleanupFloating=null}};var _t,Et,At,Ct,Pt,Tt,St,kt,Ft,Ot,Wt,Dt,Ht,Rt,Mt,jt,It,$t,Lt,Vt,qt,Bt,Ut,Kt,Zt,Gt,Xt,Yt;function Nt(e,t,n,r,o,i){var a,s,h,v,C,P,T,H=Symbol.metadata||Symbol.for("Symbol.metadata"),q=Object.defineProperty,B=Object.create,tt=[B(null),B(null)],et=t.length;function R(c,y,g){return function(l,u){y&&(u=l,l=e);for(var x=0;x<c.length;x++)u=c[x].apply(l,g?[u]:[]);return g?u:l}}function _(c,y,g,l){if(typeof c!="function"&&(l||c!==void 0))throw new TypeError(y+" must "+(g||"be")+" a function"+(l?"":" or undefined"));return c}function nt(c,y,g,l,u,x,S,m,b,w,ot){function U(f){if(!ot(f))throw new TypeError("Attempted to access private element on non-instance")}var K=[].concat(y[0]),it=y[3],Z=!S,O=u===1,st=u===3,at=u===4,M=u===2;function j(f,k,ut){return function($,ht){return k&&(ht=$,$=c),ut&&ut($),p[f].call($,ht)}}if(!Z){var p={},G=[],E=st?"get":at||O?"set":"value";if(b?(w||O?p={get:zt(function(){return it(this)},l,"get"),set:function(f){y[4](this,f)}}:p[E]=it,w||zt(p[E],l,M?"":E)):w||(p=Object.getOwnPropertyDescriptor(c,l)),!w&&!b){if((s=tt[+m][l])&&(s^u)!==7)throw Error("Decorating two elements with the same name ("+p[E].name+") is not supported yet");tt[+m][l]=u<3?1:u}}for(var d=c,I=K.length-1;I>=0;I-=g?2:1){var ct=_(K[I],"A decorator","be",!0),lt=g?K[I-1]:void 0,X={},W={kind:["field","accessor","method","getter","setter","class"][u],name:l,metadata:a,addInitializer:function(f,k){if(f.v)throw new TypeError("attempted to call addInitializer after decoration was finished");_(k,"An initializer","be",!0),x.push(k)}.bind(null,X)};if(Z)s=ct.call(lt,d,W),X.v=1,_(s,"class decorators","return")&&(d=s);else if(W.static=m,W.private=b,s=W.access={has:b?ot.bind():function(f){return l in f}},at||(s.get=b?M?function(f){return U(f),p.value}:j("get",0,U):function(f){return f[l]}),M||st||(s.set=b?j("set",0,U):function(f,k){f[l]=k}),d=ct.call(lt,O?{get:p.get,set:p.set}:p[E],W),X.v=1,O){if(typeof d=="object"&&d)(s=_(d.get,"accessor.get"))&&(p.get=s),(s=_(d.set,"accessor.set"))&&(p.set=s),(s=_(d.init,"accessor.init"))&&G.unshift(s);else if(d!==void 0)throw new TypeError("accessor decorators must return an object with get, set, or init properties or undefined")}else _(d,(w?"field":"method")+" decorators","return")&&(w?G.unshift(d):p[E]=d)}return u<2&&S.push(R(G,m,1),R(x,m,0)),w||Z||(b?O?S.splice(-1,0,j("get",m),j("set",m)):S.push(M?p[E]:_.call.bind(p[E])):q(c,l,p)),d}function rt(c){return q(c,H,{configurable:!0,enumerable:!0,value:a})}return i!==void 0&&(a=i[H]),a=B(a??null),C=[],P=function(c){c&&C.push(R(c))},T=function(c,y){for(var g=0;g<n.length;g++){var l=n[g],u=l[1],x=7&u;if((8&u)==c&&!x==y){var S=l[2],m=!!l[3],b=16&u;nt(c?e:e.prototype,l,b,m?"#"+S:me(S),x,x<2?[]:c?v=v||[]:h=h||[],C,!!c,m,y,c&&m?function(w){return ye(w)===e}:o)}}},T(8,0),T(0,0),T(8,1),T(0,1),P(h),P(v),s=C,et||rt(e),{e:s,get c(){var c=[];return et&&[rt(e=nt(e,[t],r,e.name,5,c)),R(c,1)]}}}function me(e){var t=ve(e,"string");return typeof t=="symbol"?t:t+""}function ve(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function zt(e,t,n){typeof t=="symbol"&&(t=(t=t.description)?"["+t+"]":"");try{Object.defineProperty(e,"name",{configurable:!0,value:n?n+" "+t:t})}catch{}return e}function ye(e){if(Object(e)!==e)throw TypeError("right-hand side of 'in' should be an object, got "+(e!==null?typeof e:"null"));return e}var ne,Jt=class extends V{static{({e:[At,Ct,Pt,Tt,St,kt,Ft,Ot,Wt,Dt,Ht,Rt,Mt,jt,It,$t,Lt,Vt,qt,Bt,_t],c:[ne,Et]}=Nt(this,[te("rui-popover")],[[A({type:Boolean,reflect:!0,defaultValue:!1}),0,"open"],[A({type:String,defaultValue:"bottom"}),0,"placement"],[A({type:Boolean,defaultValue:!0}),0,"portal"],[A({type:Boolean,defaultValue:!1}),0,"matchAnchorWidth"],[A({type:Number,defaultValue:8}),0,"offset"],[A({type:String,defaultValue:""}),0,"anchor"],[A({type:String,defaultValue:"default"}),0,"variant"],[N({ref:"surface"}),0,"surfaceTarget"],[N({ref:"host"}),0,"hostTarget"],[xe({name:"rui-open-change",bubbles:!0,composed:!0}),0,"openChangeEvent"],[[Q,ee(["open","placement","portal","matchAnchorWidth","offset","anchor"])],2,"syncPopover"],[D({document:!0,type:"pointerdown"}),2,"onDocumentPointerDown"],[D({ref:"host",type:"focusout"}),2,"onFocusOut"],[Q,2,"onExternalAnchorClick"],[D({document:!0,type:"keydown"}),2,"onDocumentKeydown"]],0,void 0,V))}open=(_t(this),At(this));placement=(Ct(this),Pt(this));portal=(Tt(this),St(this));matchAnchorWidth=(kt(this),Ft(this));offset=(Ot(this),Wt(this));anchor=(Dt(this),Ht(this));variant=(Rt(this),Mt(this));surfaceTarget=(jt(this),It(this));hostTarget=($t(this),Lt(this));openChangeEvent=(Vt(this),qt(this));surfaceId=(Bt(this),dt("rui-popover"));controller=null;anchorClickTarget=null;onConnected(){this.syncPopover()}disconnectedCallback(){this.unbindExternalAnchorClick(),this.controller?.destroy(),this.controller=null,super.disconnectedCallback()}getAnchorElement(){let n=this.closest("rui-popover-trigger")?.querySelector("[data-popover-trigger]");if(n instanceof HTMLElement)return J(n);let r=this.querySelector("[data-popover-trigger]");if(r instanceof HTMLElement)return J(r);let o=this.anchor.trim();if(o){let i=document.querySelector(o);if(i instanceof HTMLElement)return J(i)}return null}ensureController(){return this.controller||(this.controller=new L({getAnchor:()=>this.getAnchorElement(),getFloating:()=>this.surfaceTarget,getOpen:()=>this.open,getPlacement:()=>this.placement,gap:this.offset,portal:this.portal,matchAnchorWidth:this.matchAnchorWidth})),this.controller}syncPopover(){let t=this.getAnchorElement(),n=this.surfaceTarget;n&&(n.id=this.surfaceId),t&&(t.setAttribute("aria-controls",this.surfaceId),t.setAttribute("aria-expanded",String(this.open))),this.syncExternalAnchorClick(t);let r=this.ensureController();r.updateConfig({getAnchor:()=>this.getAnchorElement(),getFloating:()=>this.surfaceTarget,getOpen:()=>this.open,getPlacement:()=>this.placement,gap:this.offset,portal:this.portal,matchAnchorWidth:this.matchAnchorWidth}),r.sync()}setOpen(t,n=!0){if(this.open===t){this.syncPopover();return}this.open=t,n&&this.openChangeEvent.emit({open:t}),this.syncPopover()}onDocumentPointerDown(t){if(!this.open)return;let n=t.target;wt(this.getAnchorElement(),this.controller?.getFloatingElement()??this.surfaceTarget,n)&&this.setOpen(!1)}onFocusOut(t){this.open&&bt(this.getAnchorElement(),this.controller?.getFloatingElement()??this.surfaceTarget,t.relatedTarget)&&this.setOpen(!1)}usesExternalAnchor(){return!this.anchor.trim()||this.closest("rui-popover-trigger")?!1:!this.querySelector("[data-popover-trigger]")}syncExternalAnchorClick(t){if(!this.usesExternalAnchor()||!t){this.unbindExternalAnchorClick();return}this.anchorClickTarget!==t&&(this.unbindExternalAnchorClick(),t.addEventListener("click",this.onExternalAnchorClick),this.anchorClickTarget=t)}unbindExternalAnchorClick(){this.anchorClickTarget&&(this.anchorClickTarget.removeEventListener("click",this.onExternalAnchorClick),this.anchorClickTarget=null)}onExternalAnchorClick(){this.setOpen(!this.open)}onDocumentKeydown(t){if(!this.open||t.key!=="Escape")return;t.preventDefault(),this.setOpen(!1),this.getAnchorElement()?.focus()}static{Et()}};var re,Qt=class extends V{static{({e:[Zt,Gt,Xt,Yt,Ut],c:[re,Kt]}=Nt(this,[te("rui-popover-trigger")],[[A({type:Boolean,reflect:!0,defaultValue:!1}),0,"open"],[N({ref:"root"}),0,"rootTarget"],[[Q,ee(["open"])],2,"syncToPopover"],[D({ref:"root",type:"click"}),2,"onHostClick"],[D({selector:"rui-popover",type:"rui-open-change"}),2,"onPopoverOpenChange"]],0,void 0,V))}constructor(...t){super(...t),Yt(this)}open=(Ut(this),Zt(this));rootTarget=(Gt(this),Xt(this));getPopover(){return this.querySelector("rui-popover")}onConnected(){this.syncToPopover()}syncToPopover(){if(be)return;let t=this.getPopover();!t||typeof t.setOpen!="function"||t.open!==this.open&&t.setOpen(this.open,!1)}onHostClick(t){if(!t.target?.closest("[data-popover-trigger]"))return;this.open=!this.open;let r=this.getPopover();r&&typeof r.setOpen=="function"&&r.setOpen(this.open)}onPopoverOpenChange(t){let n=this.getPopover();t.target===n&&(this.open=t.detail.open)}static{Kt()}};function J(e){return e.querySelector('button, a[href], input, select, textarea, [role="button"]')??e}function we({children:e,class:t,...n}){return F("div",{...n,class:pt(t),children:e})}function _e({trigger:e,children:t,variant:n="default",...r}){let o=n==="listbox"?"rui-popover--listbox":"";return F("rui-popover",{...r,variant:n,children:oe("div",{class:"rui-popover-host","data-ref":"host",children:[e!=null?F("span",{"data-popover-trigger":!0,children:e}):null,F("div",{"data-ref":"surface",class:`rui-popover rui-floating ${o}`.trim(),role:"dialog",children:t})]})})}function Ee({trigger:e,children:t,...n}){return F("rui-popover-trigger",{...n,children:oe("div",{class:"rui-popover-trigger","data-ref":"root",children:[F("span",{"data-popover-trigger":!0,children:e}),t]})})}export{_e as RuiPopover,we as RuiPopoverContent,ne as RuiPopoverElement,Ee as RuiPopoverTrigger,re as RuiPopoverTriggerElement};
|
|
1
|
+
import{jsx as F,jsxs as oe}from"@ecopages/jsx/jsx-runtime";function dt(...e){return e.filter(Boolean).join(" ")}import{RadiantElement as V,bound as tt,customElement as ne,event as xe,onEvent as D,onUpdated as re,prop as A,query as et}from"@ecopages/radiant";import{isServer as be}from"@ecopages/radiant/is-server";var ie=/^[A-Za-z][A-Za-z0-9_-]*$/;function gt(e){return ie.test(e)}function se(e){let t=e.trim();if(gt(t))return t;let n=`rui-${t}`;return t&>(n)?n:"rui"}function mt(e){let t=typeof crypto.randomUUID=="function"?crypto.randomUUID().replace(/-/g,""):Array.from(crypto.getRandomValues(new Uint8Array(16)),n=>n.toString(16).padStart(2,"0")).join("");return`${se(e)}-${t}`}var ae={top:"bottom",bottom:"top",left:"right",right:"left"},ce=8,J=new WeakMap;function le(e){J.has(e)&&(e.style.width="",e.style.minWidth="",e.style.maxWidth="",e.style.boxSizing="",J.delete(e))}function ue(e){let t=e.indexOf("-");if(t===-1)return{side:e,align:"center"};let n=e.slice(0,t),r=e.slice(t+1);return{side:n,align:r==="start"||r==="end"?r:"center"}}function xt(e){return e==="top"||e==="bottom"?"y":"x"}function vt(e,t,n,r,o){let{width:i,height:a}=t,s=0,h=0;switch(n){case"top":h=e.top-a-o;break;case"bottom":h=e.bottom+o;break;case"left":s=e.left-i-o;break;case"right":s=e.right+o;break}return xt(n)==="y"?r==="start"?s=e.left:r==="end"?s=e.right-i:s=e.left+(e.width-i)/2:r==="start"?h=e.top:r==="end"?h=e.bottom-a:h=e.top+(e.height-a)/2,{x:s,y:h}}function he(e,t,n,r){let{padding:o,width:i,height:a}=r;return n==="top"?Math.max(0,o-e.y):n==="bottom"?Math.max(0,e.y+t.height-(a-o)):n==="left"?Math.max(0,o-e.x):Math.max(0,e.x+t.width-(i-o))}function yt(e,t,n,r){let{padding:o,width:i,height:a}=r;return n==="top"?e.top-o-t.height:n==="bottom"?a-o-t.height-e.bottom:n==="left"?e.left-o-t.width:i-o-t.width-e.right}function pe(e,t){return t==="center"?e:`${e}-${t}`}function fe(e,t,n,r){let{padding:o,width:i,height:a}=r;if(xt(n)==="y"){let h=Math.max(o,i-o-t.width);return{x:Math.min(Math.max(e.x,o),h),y:Math.max(o,e.y)}}let s=Math.max(o,a-o-t.height);return{x:Math.max(o,e.x),y:Math.min(Math.max(e.y,o),s)}}function de(e,t,n,r,o={width:typeof window>"u"?0:window.innerWidth,height:typeof window>"u"?0:window.innerHeight,padding:ce}){let{side:i,align:a}=ue(n),s=vt(e,t,i,a,r),h=he(s,t,i,o),v=i,P=s;if(h>0){let C=ae[i],T=vt(e,t,C,a,r),R=yt(e,t,i,o);yt(e,t,C,o)>R&&(v=C,P=T)}return{coords:fe(P,t,v,o),placement:pe(v,a)}}function ge(e,t,n,r,o={}){let i=o.matchAnchorWidth===!0,a=e.offsetWidth,s=i?{width:a,height:t.offsetHeight}:{width:t.offsetWidth,height:t.offsetHeight};i?(t.style.width=`${a}px`,t.style.minWidth=`${a}px`,t.style.maxWidth=`${a}px`,t.style.boxSizing="border-box",J.set(t,!0)):le(t);let{coords:h,placement:v}=de(e.getBoundingClientRect(),s,n,r);return Object.assign(t.style,{position:"fixed",left:`${h.x}px`,top:`${h.y}px`,right:"auto",bottom:"auto",visibility:"visible"}),t.setAttribute("data-placement",v),v}function bt({anchor:e,floating:t,getPlacement:n,gap:r,matchAnchorWidth:o}){let i=()=>{t.hidden||ge(e,t,n(),r,{matchAnchorWidth:o})};i(),window.addEventListener("resize",i),window.addEventListener("scroll",i,!0);let a=new ResizeObserver(i);return a.observe(e),a.observe(t),()=>{window.removeEventListener("resize",i),window.removeEventListener("scroll",i,!0),a.disconnect()}}function wt(e,t=document.body){let n=e.parentNode;if(!n)return{unmount:()=>{}};let r=document.createComment("rui-portal");return n.insertBefore(r,e),t.appendChild(e),{unmount:()=>{let o=r.parentNode;o&&(o.insertBefore(e,r),r.remove())}}}function Q(e,t,n){return n?!!(e?.contains(n)||t?.contains(n)):!1}function _t(e,t,n){return n instanceof Node?!Q(e,t,n):!0}function Et(e,t,n){return!Q(e,t,n)}var L=class{config;cleanupFloating=null;portalHandle=null;floatingElement=null;constructor(t){this.config=t}updateConfig(t){this.config={...this.config,...t}}sync(){let t=this.resolveFloating();if(!t)return;if(!this.config.getOpen()){this.teardown(),t.toggleAttribute("hidden",!0);return}let r=this.config.getAnchor();if(!r)return;t.toggleAttribute("hidden",!1),this.config.portal!==!1?this.portalHandle||(this.portalHandle=wt(t,this.config.portalContainer??document.body)):this.portalHandle&&(this.portalHandle.unmount(),this.portalHandle=null),this.teardownFloating(),this.cleanupFloating=bt({anchor:r,floating:t,getPlacement:this.config.getPlacement,gap:this.config.gap??8,matchAnchorWidth:this.config.matchAnchorWidth})}contains(t){return Q(this.config.getAnchor(),this.resolveFloating(),t)}getFloatingElement(){return this.resolveFloating()}teardown(){this.teardownFloating(),this.portalHandle&&(this.portalHandle.unmount(),this.portalHandle=null)}destroy(){this.teardown(),this.floatingElement=null}resolveFloating(){let t=this.config.getFloating();return t&&(this.floatingElement=t),t??this.floatingElement}teardownFloating(){this.cleanupFloating?.(),this.cleanupFloating=null}};var At,Pt,Ct,Tt,St,kt,Ft,Ot,Wt,Dt,Rt,Ht,Mt,jt,It,$t,Lt,Vt,qt,Bt,Ut,Kt,Zt,Gt,Xt,Yt,zt,Jt;function ee(e,t,n,r,o,i){var a,s,h,v,P,C,T,R=Symbol.metadata||Symbol.for("Symbol.metadata"),U=Object.defineProperty,K=Object.create,nt=[K(null),K(null)],rt=t.length;function H(c,y,g){return function(l,u){y&&(u=l,l=e);for(var x=0;x<c.length;x++)u=c[x].apply(l,g?[u]:[]);return g?u:l}}function _(c,y,g,l){if(typeof c!="function"&&(l||c!==void 0))throw new TypeError(y+" must "+(g||"be")+" a function"+(l?"":" or undefined"));return c}function ot(c,y,g,l,u,x,S,m,b,w,st){function Z(f){if(!st(f))throw new TypeError("Attempted to access private element on non-instance")}var G=[].concat(y[0]),at=y[3],X=!S,O=u===1,ct=u===3,lt=u===4,M=u===2;function j(f,k,pt){return function($,ft){return k&&(ft=$,$=c),pt&&pt($),p[f].call($,ft)}}if(!X){var p={},Y=[],E=ct?"get":lt||O?"set":"value";if(b?(w||O?p={get:Qt(function(){return at(this)},l,"get"),set:function(f){y[4](this,f)}}:p[E]=at,w||Qt(p[E],l,M?"":E)):w||(p=Object.getOwnPropertyDescriptor(c,l)),!w&&!b){if((s=nt[+m][l])&&(s^u)!==7)throw Error("Decorating two elements with the same name ("+p[E].name+") is not supported yet");nt[+m][l]=u<3?1:u}}for(var d=c,I=G.length-1;I>=0;I-=g?2:1){var ut=_(G[I],"A decorator","be",!0),ht=g?G[I-1]:void 0,z={},W={kind:["field","accessor","method","getter","setter","class"][u],name:l,metadata:a,addInitializer:function(f,k){if(f.v)throw new TypeError("attempted to call addInitializer after decoration was finished");_(k,"An initializer","be",!0),x.push(k)}.bind(null,z)};if(X)s=ut.call(ht,d,W),z.v=1,_(s,"class decorators","return")&&(d=s);else if(W.static=m,W.private=b,s=W.access={has:b?st.bind():function(f){return l in f}},lt||(s.get=b?M?function(f){return Z(f),p.value}:j("get",0,Z):function(f){return f[l]}),M||ct||(s.set=b?j("set",0,Z):function(f,k){f[l]=k}),d=ut.call(ht,O?{get:p.get,set:p.set}:p[E],W),z.v=1,O){if(typeof d=="object"&&d)(s=_(d.get,"accessor.get"))&&(p.get=s),(s=_(d.set,"accessor.set"))&&(p.set=s),(s=_(d.init,"accessor.init"))&&Y.unshift(s);else if(d!==void 0)throw new TypeError("accessor decorators must return an object with get, set, or init properties or undefined")}else _(d,(w?"field":"method")+" decorators","return")&&(w?Y.unshift(d):p[E]=d)}return u<2&&S.push(H(Y,m,1),H(x,m,0)),w||X||(b?O?S.splice(-1,0,j("get",m),j("set",m)):S.push(M?p[E]:_.call.bind(p[E])):U(c,l,p)),d}function it(c){return U(c,R,{configurable:!0,enumerable:!0,value:a})}return i!==void 0&&(a=i[R]),a=K(a??null),P=[],C=function(c){c&&P.push(H(c))},T=function(c,y){for(var g=0;g<n.length;g++){var l=n[g],u=l[1],x=7&u;if((8&u)==c&&!x==y){var S=l[2],m=!!l[3],b=16&u;ot(c?e:e.prototype,l,b,m?"#"+S:me(S),x,x<2?[]:c?v=v||[]:h=h||[],P,!!c,m,y,c&&m?function(w){return ye(w)===e}:o)}}},T(8,0),T(0,0),T(8,1),T(0,1),C(h),C(v),s=P,rt||it(e),{e:s,get c(){var c=[];return rt&&[it(e=ot(e,[t],r,e.name,5,c)),H(c,1)]}}}function me(e){var t=ve(e,"string");return typeof t=="symbol"?t:t+""}function ve(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Qt(e,t,n){typeof t=="symbol"&&(t=(t=t.description)?"["+t+"]":"");try{Object.defineProperty(e,"name",{configurable:!0,value:n?n+" "+t:t})}catch{}return e}function ye(e){if(Object(e)!==e)throw TypeError("right-hand side of 'in' should be an object, got "+(e!==null?typeof e:"null"));return e}var q,Nt=class extends V{static{({e:[Ct,Tt,St,kt,Ft,Ot,Wt,Dt,Rt,Ht,Mt,jt,It,$t,Lt,Vt,qt,Bt,Ut,Kt,At],c:[q,Pt]}=ee(this,[ne("rui-popover")],[[A({type:Boolean,reflect:!0,defaultValue:!1}),0,"open"],[A({type:String,defaultValue:"bottom"}),0,"placement"],[A({type:Boolean,defaultValue:!0}),0,"portal"],[A({type:Boolean,defaultValue:!1}),0,"matchAnchorWidth"],[A({type:Number,defaultValue:8}),0,"offset"],[A({type:String,defaultValue:""}),0,"anchor"],[A({type:String,defaultValue:"default"}),0,"variant"],[et({ref:"surface"}),0,"surfaceTarget"],[et({ref:"host"}),0,"hostTarget"],[xe({name:"rui-open-change",bubbles:!0,composed:!0}),0,"openChangeEvent"],[[tt,re(["open","placement","portal","matchAnchorWidth","offset","anchor"])],2,"syncPopover"],[D({document:!0,type:"pointerdown"}),2,"onDocumentPointerDown"],[D({ref:"host",type:"focusout"}),2,"onFocusOut"],[tt,2,"onExternalAnchorClick"],[D({document:!0,type:"keydown"}),2,"onDocumentKeydown"]],0,void 0,V))}open=(At(this),Ct(this));placement=(Tt(this),St(this));portal=(kt(this),Ft(this));matchAnchorWidth=(Ot(this),Wt(this));offset=(Dt(this),Rt(this));anchor=(Ht(this),Mt(this));variant=(jt(this),It(this));surfaceTarget=($t(this),Lt(this));hostTarget=(Vt(this),qt(this));openChangeEvent=(Bt(this),Ut(this));surfaceId=(Kt(this),mt("rui-popover"));controller=null;anchorClickTarget=null;onConnected(){this.syncPopover()}disconnectedCallback(){this.unbindExternalAnchorClick(),this.controller?.destroy(),this.controller=null,super.disconnectedCallback()}getAnchorElement(){let n=this.closest("rui-popover-trigger")?.querySelector("[data-popover-trigger]");if(n instanceof HTMLElement)return N(n);let r=this.querySelector("[data-popover-trigger]");if(r instanceof HTMLElement)return N(r);let o=this.anchor.trim();if(o){let i=document.querySelector(o);if(i instanceof HTMLElement)return N(i)}return null}ensureController(){return this.controller||(this.controller=new L({getAnchor:()=>this.getAnchorElement(),getFloating:()=>this.surfaceTarget,getOpen:()=>this.open,getPlacement:()=>this.placement,gap:this.offset,portal:this.portal,matchAnchorWidth:this.matchAnchorWidth})),this.controller}syncPopover(){let t=this.getAnchorElement(),n=this.surfaceTarget;n&&(n.id=this.surfaceId),t&&(t.setAttribute("aria-controls",this.surfaceId),t.setAttribute("aria-expanded",String(this.open))),this.syncExternalAnchorClick(t);let r=this.ensureController();r.updateConfig({getAnchor:()=>this.getAnchorElement(),getFloating:()=>this.surfaceTarget,getOpen:()=>this.open,getPlacement:()=>this.placement,gap:this.offset,portal:this.portal,matchAnchorWidth:this.matchAnchorWidth}),r.sync()}setOpen(t,n=!0){if(this.open===t){this.syncPopover();return}this.open=t,n&&this.openChangeEvent.emit({open:t}),this.syncPopover()}onDocumentPointerDown(t){if(!this.open)return;let n=t.target;Et(this.getAnchorElement(),this.controller?.getFloatingElement()??this.surfaceTarget,n)&&this.setOpen(!1)}onFocusOut(t){this.open&&_t(this.getAnchorElement(),this.controller?.getFloatingElement()??this.surfaceTarget,t.relatedTarget)&&this.setOpen(!1)}usesExternalAnchor(){return!this.anchor.trim()||this.closest("rui-popover-trigger")?!1:!this.querySelector("[data-popover-trigger]")}syncExternalAnchorClick(t){if(!this.usesExternalAnchor()||!t){this.unbindExternalAnchorClick();return}this.anchorClickTarget!==t&&(this.unbindExternalAnchorClick(),t.addEventListener("click",this.onExternalAnchorClick),this.anchorClickTarget=t)}unbindExternalAnchorClick(){this.anchorClickTarget&&(this.anchorClickTarget.removeEventListener("click",this.onExternalAnchorClick),this.anchorClickTarget=null)}onExternalAnchorClick(){this.setOpen(!this.open)}onDocumentKeydown(t){if(!this.open||t.key!=="Escape")return;t.preventDefault(),this.setOpen(!1),this.getAnchorElement()?.focus()}static{Pt()}};var B,te=class extends V{static{({e:[Xt,Yt,zt,Jt,Zt],c:[B,Gt]}=ee(this,[ne("rui-popover-trigger")],[[A({type:Boolean,reflect:!0,defaultValue:!1}),0,"open"],[et({ref:"root"}),0,"rootTarget"],[[tt,re(["open"])],2,"syncToPopover"],[D({ref:"root",type:"click"}),2,"onHostClick"],[D({selector:"rui-popover",type:"rui-open-change"}),2,"onPopoverOpenChange"]],0,void 0,V))}constructor(...t){super(...t),Jt(this)}open=(Zt(this),Xt(this));rootTarget=(Yt(this),zt(this));getPopover(){return this.querySelector("rui-popover")}onConnected(){this.syncToPopover()}syncToPopover(){if(be)return;let t=this.getPopover();!t||typeof t.setOpen!="function"||t.open!==this.open&&t.setOpen(this.open,!1)}onHostClick(t){if(!t.target?.closest("[data-popover-trigger]"))return;this.open=!this.open;let r=this.getPopover();r&&typeof r.setOpen=="function"&&r.setOpen(this.open)}onPopoverOpenChange(t){let n=this.getPopover();t.target===n&&(this.open=t.detail.open)}static{Gt()}};function N(e){return e.querySelector('button, a[href], input, select, textarea, [role="button"]')??e}function we({children:e,class:t,...n}){return F("div",{...n,class:dt(t),children:e})}function _e({trigger:e,children:t,variant:n="default",...r}){let o=n==="listbox"?"rui-popover--listbox":"";return F(q,{...r,variant:n,children:oe("div",{class:"rui-popover-host","data-ref":"host",children:[e!=null?F("span",{"data-popover-trigger":!0,children:e}):null,F("div",{"data-ref":"surface",class:`rui-popover rui-floating ${o}`.trim(),role:"dialog",children:t})]})})}function Ee({trigger:e,children:t,...n}){return F(B,{...n,children:oe("div",{class:"rui-popover-trigger","data-ref":"root",children:[F("span",{"data-popover-trigger":!0,children:e}),t]})})}export{_e as RuiPopover,we as RuiPopoverContent,q as RuiPopoverElement,Ee as RuiPopoverTrigger,B as RuiPopoverTriggerElement};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/components/ui/popover/popover.tsx", "../../../../src/lib/cx.ts", "../../../../src/components/ui/popover/popover.script.tsx", "../../../../src/lib/unique-id.ts", "../../../../src/components/ui/shared/floating-position.ts", "../../../../src/components/ui/shared/portal.ts", "../../../../src/components/ui/shared/popover-controller.ts"],
|
|
4
|
-
"sourcesContent": ["import { jsx, jsxs } from \"@ecopages/jsx/jsx-runtime\";\nimport { cx } from \"@/lib/cx\";\nimport \"./popover.script\";\nexport function RuiPopoverContent({\n children,\n class: className,\n ...props\n}) {\n return /* @__PURE__ */jsx(\"div\", {\n ...props,\n class: cx(className),\n children\n });\n}\nexport function RuiPopover({\n trigger,\n children,\n variant = \"default\",\n ...props\n}) {\n const variantClass = variant === \"listbox\" ? \"rui-popover--listbox\" : \"\";\n return /* @__PURE__ */jsx(\"rui-popover\", {\n ...props,\n variant,\n children: /* @__PURE__ */jsxs(\"div\", {\n class: \"rui-popover-host\",\n \"data-ref\": \"host\",\n children: [trigger != null ? /* @__PURE__ */jsx(\"span\", {\n \"data-popover-trigger\": true,\n children: trigger\n }) : null, /* @__PURE__ */jsx(\"div\", {\n \"data-ref\": \"surface\",\n class: `rui-popover rui-floating ${variantClass}`.trim(),\n role: \"dialog\",\n children\n })]\n })\n });\n}\nexport function RuiPopoverTrigger({\n trigger,\n children,\n ...props\n}) {\n return /* @__PURE__ */jsx(\"rui-popover-trigger\", {\n ...props,\n children: /* @__PURE__ */jsxs(\"div\", {\n class: \"rui-popover-trigger\",\n \"data-ref\": \"root\",\n children: [/* @__PURE__ */jsx(\"span\", {\n \"data-popover-trigger\": true,\n children: trigger\n }), children]\n })\n });\n}", "export function cx(...parts) {\n return parts.filter(Boolean).join(\" \");\n}", "let _initProto, _initClass, _init_open, _init_extra_open, _init_placement, _init_extra_placement, _init_portal, _init_extra_portal, _init_matchAnchorWidth, _init_extra_matchAnchorWidth, _init_offset, _init_extra_offset, _init_anchor, _init_extra_anchor, _init_variant, _init_extra_variant, _init_surfaceTarget, _init_extra_surfaceTarget, _init_hostTarget, _init_extra_hostTarget, _init_openChangeEvent, _init_extra_openChangeEvent, _initProto2, _initClass2, _init_open2, _init_extra_open2, _init_rootTarget, _init_extra_rootTarget;\nfunction _applyDecs(e, t, n, r, o, i) { var a, c, u, s, f, l, p, d = Symbol.metadata || Symbol.for(\"Symbol.metadata\"), m = Object.defineProperty, h = Object.create, y = [h(null), h(null)], v = t.length; function g(t, n, r) { return function (o, i) { n && (i = o, o = e); for (var a = 0; a < t.length; a++) i = t[a].apply(o, r ? [i] : []); return r ? i : o; }; } function b(e, t, n, r) { if (\"function\" != typeof e && (r || void 0 !== e)) throw new TypeError(t + \" must \" + (n || \"be\") + \" a function\" + (r ? \"\" : \" or undefined\")); return e; } function applyDec(e, t, n, r, o, i, u, s, f, l, p) { function d(e) { if (!p(e)) throw new TypeError(\"Attempted to access private element on non-instance\"); } var h = [].concat(t[0]), v = t[3], w = !u, D = 1 === o, S = 3 === o, j = 4 === o, E = 2 === o; function I(t, n, r) { return function (o, i) { return n && (i = o, o = e), r && r(o), P[t].call(o, i); }; } if (!w) { var P = {}, k = [], F = S ? \"get\" : j || D ? \"set\" : \"value\"; if (f ? (l || D ? P = { get: _setFunctionName(function () { return v(this); }, r, \"get\"), set: function (e) { t[4](this, e); } } : P[F] = v, l || _setFunctionName(P[F], r, E ? \"\" : F)) : l || (P = Object.getOwnPropertyDescriptor(e, r)), !l && !f) { if ((c = y[+s][r]) && 7 !== (c ^ o)) throw Error(\"Decorating two elements with the same name (\" + P[F].name + \") is not supported yet\"); y[+s][r] = o < 3 ? 1 : o; } } for (var N = e, O = h.length - 1; O >= 0; O -= n ? 2 : 1) { var T = b(h[O], \"A decorator\", \"be\", !0), z = n ? h[O - 1] : void 0, A = {}, H = { kind: [\"field\", \"accessor\", \"method\", \"getter\", \"setter\", \"class\"][o], name: r, metadata: a, addInitializer: function (e, t) { if (e.v) throw new TypeError(\"attempted to call addInitializer after decoration was finished\"); b(t, \"An initializer\", \"be\", !0), i.push(t); }.bind(null, A) }; if (w) c = T.call(z, N, H), A.v = 1, b(c, \"class decorators\", \"return\") && (N = c);else if (H.static = s, H.private = f, c = H.access = { has: f ? p.bind() : function (e) { return r in e; } }, j || (c.get = f ? E ? function (e) { return d(e), P.value; } : I(\"get\", 0, d) : function (e) { return e[r]; }), E || S || (c.set = f ? I(\"set\", 0, d) : function (e, t) { e[r] = t; }), N = T.call(z, D ? { get: P.get, set: P.set } : P[F], H), A.v = 1, D) { if (\"object\" == typeof N && N) (c = b(N.get, \"accessor.get\")) && (P.get = c), (c = b(N.set, \"accessor.set\")) && (P.set = c), (c = b(N.init, \"accessor.init\")) && k.unshift(c);else if (void 0 !== N) throw new TypeError(\"accessor decorators must return an object with get, set, or init properties or undefined\"); } else b(N, (l ? \"field\" : \"method\") + \" decorators\", \"return\") && (l ? k.unshift(N) : P[F] = N); } return o < 2 && u.push(g(k, s, 1), g(i, s, 0)), l || w || (f ? D ? u.splice(-1, 0, I(\"get\", s), I(\"set\", s)) : u.push(E ? P[F] : b.call.bind(P[F])) : m(e, r, P)), N; } function w(e) { return m(e, d, { configurable: !0, enumerable: !0, value: a }); } return void 0 !== i && (a = i[d]), a = h(null == a ? null : a), f = [], l = function (e) { e && f.push(g(e)); }, p = function (t, r) { for (var i = 0; i < n.length; i++) { var a = n[i], c = a[1], l = 7 & c; if ((8 & c) == t && !l == r) { var p = a[2], d = !!a[3], m = 16 & c; applyDec(t ? e : e.prototype, a, m, d ? \"#\" + p : _toPropertyKey(p), l, l < 2 ? [] : t ? s = s || [] : u = u || [], f, !!t, d, r, t && d ? function (t) { return _checkInRHS(t) === e; } : o); } } }, p(8, 0), p(0, 0), p(8, 1), p(0, 1), l(u), l(s), c = f, v || w(e), { e: c, get c() { var n = []; return v && [w(e = applyDec(e, [t], r, e.name, 5, n)), g(n, 1)]; } }; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == typeof i ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != typeof i) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nfunction _setFunctionName(e, t, n) { \"symbol\" == typeof t && (t = (t = t.description) ? \"[\" + t + \"]\" : \"\"); try { Object.defineProperty(e, \"name\", { configurable: !0, value: n ? n + \" \" + t : t }); } catch (e) {} return e; }\nfunction _checkInRHS(e) { if (Object(e) !== e) throw TypeError(\"right-hand side of 'in' should be an object, got \" + (null !== e ? typeof e : \"null\")); return e; }\nimport { RadiantElement, bound, customElement, event, onEvent, onUpdated, prop, query } from \"@ecopages/radiant\";\nimport { isServer } from \"@ecopages/radiant/is-server\";\nimport { uniqueId } from \"@/lib/unique-id\";\nimport { PopoverController, shouldDismissPopoverFocus, shouldDismissPopoverPointer } from \"../shared/popover-controller\";\nlet _RuiPopover;\nclass RuiPopover extends RadiantElement {\n static {\n ({\n e: [_init_open, _init_extra_open, _init_placement, _init_extra_placement, _init_portal, _init_extra_portal, _init_matchAnchorWidth, _init_extra_matchAnchorWidth, _init_offset, _init_extra_offset, _init_anchor, _init_extra_anchor, _init_variant, _init_extra_variant, _init_surfaceTarget, _init_extra_surfaceTarget, _init_hostTarget, _init_extra_hostTarget, _init_openChangeEvent, _init_extra_openChangeEvent, _initProto],\n c: [_RuiPopover, _initClass]\n } = _applyDecs(this, [customElement(\"rui-popover\")], [[prop({\n type: Boolean,\n reflect: true,\n defaultValue: false\n }), 0, \"open\"], [prop({\n type: String,\n defaultValue: \"bottom\"\n }), 0, \"placement\"], [prop({\n type: Boolean,\n defaultValue: true\n }), 0, \"portal\"], [prop({\n type: Boolean,\n defaultValue: false\n }), 0, \"matchAnchorWidth\"], [prop({\n type: Number,\n defaultValue: 8\n }), 0, \"offset\"], [prop({\n type: String,\n defaultValue: \"\"\n }), 0, \"anchor\"], [prop({\n type: String,\n defaultValue: \"default\"\n }), 0, \"variant\"], [query({\n ref: \"surface\"\n }), 0, \"surfaceTarget\"], [query({\n ref: \"host\"\n }), 0, \"hostTarget\"], [event({\n name: \"rui-open-change\",\n bubbles: true,\n composed: true\n }), 0, \"openChangeEvent\"], [[bound, onUpdated([\"open\", \"placement\", \"portal\", \"matchAnchorWidth\", \"offset\", \"anchor\"])], 2, \"syncPopover\"], [onEvent({\n document: true,\n type: \"pointerdown\"\n }), 2, \"onDocumentPointerDown\"], [onEvent({\n ref: \"host\",\n type: \"focusout\"\n }), 2, \"onFocusOut\"], [bound, 2, \"onExternalAnchorClick\"], [onEvent({\n document: true,\n type: \"keydown\"\n }), 2, \"onDocumentKeydown\"]], 0, void 0, RadiantElement));\n }\n open = (_initProto(this), _init_open(this));\n placement = (_init_extra_open(this), _init_placement(this));\n portal = (_init_extra_placement(this), _init_portal(this));\n matchAnchorWidth = (_init_extra_portal(this), _init_matchAnchorWidth(this));\n offset = (_init_extra_matchAnchorWidth(this), _init_offset(this));\n anchor = (_init_extra_offset(this), _init_anchor(this));\n variant = (_init_extra_anchor(this), _init_variant(this));\n surfaceTarget = (_init_extra_variant(this), _init_surfaceTarget(this));\n hostTarget = (_init_extra_surfaceTarget(this), _init_hostTarget(this));\n openChangeEvent = (_init_extra_hostTarget(this), _init_openChangeEvent(this));\n surfaceId = (_init_extra_openChangeEvent(this), uniqueId(\"rui-popover\"));\n controller = null;\n anchorClickTarget = null;\n onConnected() {\n this.syncPopover();\n }\n disconnectedCallback() {\n this.unbindExternalAnchorClick();\n this.controller?.destroy();\n this.controller = null;\n super.disconnectedCallback();\n }\n getAnchorElement() {\n const triggerHost = this.closest(\"rui-popover-trigger\");\n const triggerFromHost = triggerHost?.querySelector(\"[data-popover-trigger]\");\n if (triggerFromHost instanceof HTMLElement) {\n return resolvePopoverAnchor(triggerFromHost);\n }\n const slottedTrigger = this.querySelector(\"[data-popover-trigger]\");\n if (slottedTrigger instanceof HTMLElement) {\n return resolvePopoverAnchor(slottedTrigger);\n }\n const selector = this.anchor.trim();\n if (selector) {\n const external = document.querySelector(selector);\n if (external instanceof HTMLElement) {\n return resolvePopoverAnchor(external);\n }\n }\n return null;\n }\n ensureController() {\n if (!this.controller) {\n this.controller = new PopoverController({\n getAnchor: () => this.getAnchorElement(),\n getFloating: () => this.surfaceTarget,\n getOpen: () => this.open,\n getPlacement: () => this.placement,\n gap: this.offset,\n portal: this.portal,\n matchAnchorWidth: this.matchAnchorWidth\n });\n }\n return this.controller;\n }\n syncPopover() {\n const anchor = this.getAnchorElement();\n const surface = this.surfaceTarget;\n if (surface) {\n surface.id = this.surfaceId;\n }\n if (anchor) {\n anchor.setAttribute(\"aria-controls\", this.surfaceId);\n anchor.setAttribute(\"aria-expanded\", String(this.open));\n }\n this.syncExternalAnchorClick(anchor);\n const controller = this.ensureController();\n controller.updateConfig({\n getAnchor: () => this.getAnchorElement(),\n getFloating: () => this.surfaceTarget,\n getOpen: () => this.open,\n getPlacement: () => this.placement,\n gap: this.offset,\n portal: this.portal,\n matchAnchorWidth: this.matchAnchorWidth\n });\n controller.sync();\n }\n setOpen(next, emit = true) {\n if (this.open === next) {\n this.syncPopover();\n return;\n }\n this.open = next;\n if (emit) {\n this.openChangeEvent.emit({\n open: next\n });\n }\n this.syncPopover();\n }\n onDocumentPointerDown(event2) {\n if (!this.open) {\n return;\n }\n const target = event2.target;\n if (!shouldDismissPopoverPointer(this.getAnchorElement(), this.controller?.getFloatingElement() ?? this.surfaceTarget, target)) {\n return;\n }\n this.setOpen(false);\n }\n onFocusOut(event2) {\n if (!this.open) {\n return;\n }\n if (!shouldDismissPopoverFocus(this.getAnchorElement(), this.controller?.getFloatingElement() ?? this.surfaceTarget, event2.relatedTarget)) {\n return;\n }\n this.setOpen(false);\n }\n usesExternalAnchor() {\n if (!this.anchor.trim()) {\n return false;\n }\n if (this.closest(\"rui-popover-trigger\")) {\n return false;\n }\n return !this.querySelector(\"[data-popover-trigger]\");\n }\n syncExternalAnchorClick(anchor) {\n if (!this.usesExternalAnchor() || !anchor) {\n this.unbindExternalAnchorClick();\n return;\n }\n if (this.anchorClickTarget === anchor) {\n return;\n }\n this.unbindExternalAnchorClick();\n anchor.addEventListener(\"click\", this.onExternalAnchorClick);\n this.anchorClickTarget = anchor;\n }\n unbindExternalAnchorClick() {\n if (!this.anchorClickTarget) {\n return;\n }\n this.anchorClickTarget.removeEventListener(\"click\", this.onExternalAnchorClick);\n this.anchorClickTarget = null;\n }\n onExternalAnchorClick() {\n this.setOpen(!this.open);\n }\n onDocumentKeydown(event2) {\n if (!this.open || event2.key !== \"Escape\") {\n return;\n }\n event2.preventDefault();\n this.setOpen(false);\n const anchor = this.getAnchorElement();\n anchor?.focus();\n }\n static {\n _initClass();\n }\n}\nexport { _RuiPopover as RuiPopover };\nlet _RuiPopoverTrigger;\nclass RuiPopoverTrigger extends RadiantElement {\n static {\n ({\n e: [_init_open2, _init_extra_open2, _init_rootTarget, _init_extra_rootTarget, _initProto2],\n c: [_RuiPopoverTrigger, _initClass2]\n } = _applyDecs(this, [customElement(\"rui-popover-trigger\")], [[prop({\n type: Boolean,\n reflect: true,\n defaultValue: false\n }), 0, \"open\"], [query({\n ref: \"root\"\n }), 0, \"rootTarget\"], [[bound, onUpdated([\"open\"])], 2, \"syncToPopover\"], [onEvent({\n ref: \"root\",\n type: \"click\"\n }), 2, \"onHostClick\"], [onEvent({\n selector: \"rui-popover\",\n type: \"rui-open-change\"\n }), 2, \"onPopoverOpenChange\"]], 0, void 0, RadiantElement));\n }\n constructor(...args) {\n super(...args);\n _init_extra_rootTarget(this);\n }\n open = (_initProto2(this), _init_open2(this));\n rootTarget = (_init_extra_open2(this), _init_rootTarget(this));\n getPopover() {\n return this.querySelector(\"rui-popover\");\n }\n onConnected() {\n this.syncToPopover();\n }\n syncToPopover() {\n if (isServer) {\n return;\n }\n const popover = this.getPopover();\n if (!popover || typeof popover.setOpen !== \"function\") {\n return;\n }\n if (popover.open !== this.open) {\n popover.setOpen(this.open, false);\n }\n }\n onHostClick(event2) {\n const target = event2.target;\n if (!target?.closest(\"[data-popover-trigger]\")) {\n return;\n }\n this.open = !this.open;\n const popover = this.getPopover();\n if (popover && typeof popover.setOpen === \"function\") {\n popover.setOpen(this.open);\n }\n }\n onPopoverOpenChange(event2) {\n const popover = this.getPopover();\n if (event2.target !== popover) {\n return;\n }\n this.open = event2.detail.open;\n }\n static {\n _initClass2();\n }\n}\nexport { _RuiPopoverTrigger as RuiPopoverTrigger };\nfunction resolvePopoverAnchor(trigger) {\n const focusable = trigger.querySelector('button, a[href], input, select, textarea, [role=\"button\"]');\n return focusable ?? trigger;\n}", "const CSS_SAFE_ID = /^[A-Za-z][A-Za-z0-9_-]*$/;\nexport function isCssSafeId(value) {\n return CSS_SAFE_ID.test(value);\n}\nfunction cssSafePrefix(prefix) {\n const trimmed = prefix.trim();\n if (isCssSafeId(trimmed)) {\n return trimmed;\n }\n const prefixed = `rui-${trimmed}`;\n if (trimmed && isCssSafeId(prefixed)) {\n return prefixed;\n }\n return \"rui\";\n}\nexport function uniqueId(prefix) {\n const token = typeof crypto.randomUUID === \"function\" ? crypto.randomUUID().replace(/-/g, \"\") : Array.from(crypto.getRandomValues(new Uint8Array(16)), byte => byte.toString(16).padStart(2, \"0\")).join(\"\");\n return `${cssSafePrefix(prefix)}-${token}`;\n}", "const OPPOSITE = {\n top: \"bottom\",\n bottom: \"top\",\n left: \"right\",\n right: \"left\"\n};\nconst DEFAULT_VIEWPORT_PADDING = 8;\nconst matchAnchorWidthStylesApplied = /* @__PURE__ */new WeakMap();\nfunction clearMatchAnchorWidthStyles(floating) {\n if (!matchAnchorWidthStylesApplied.has(floating)) {\n return;\n }\n floating.style.width = \"\";\n floating.style.minWidth = \"\";\n floating.style.maxWidth = \"\";\n floating.style.boxSizing = \"\";\n matchAnchorWidthStylesApplied.delete(floating);\n}\nfunction parsePlacement(placement) {\n const dash = placement.indexOf(\"-\");\n if (dash === -1) return {\n side: placement,\n align: \"center\"\n };\n const side = placement.slice(0, dash);\n const align = placement.slice(dash + 1);\n return {\n side,\n align: align === \"start\" || align === \"end\" ? align : \"center\"\n };\n}\nfunction primaryAxis(side) {\n return side === \"top\" || side === \"bottom\" ? \"y\" : \"x\";\n}\nfunction coordsFor(anchor, size, side, align, gap) {\n const {\n width,\n height\n } = size;\n let x = 0;\n let y = 0;\n switch (side) {\n case \"top\":\n y = anchor.top - height - gap;\n break;\n case \"bottom\":\n y = anchor.bottom + gap;\n break;\n case \"left\":\n x = anchor.left - width - gap;\n break;\n case \"right\":\n x = anchor.right + gap;\n break;\n }\n if (primaryAxis(side) === \"y\") {\n if (align === \"start\") x = anchor.left;else if (align === \"end\") x = anchor.right - width;else x = anchor.left + (anchor.width - width) / 2;\n } else {\n if (align === \"start\") y = anchor.top;else if (align === \"end\") y = anchor.bottom - height;else y = anchor.top + (anchor.height - height) / 2;\n }\n return {\n x,\n y\n };\n}\nfunction overflowOnPrimary(coords, size, side, viewport) {\n const {\n padding,\n width: vw,\n height: vh\n } = viewport;\n if (side === \"top\") return Math.max(0, padding - coords.y);\n if (side === \"bottom\") return Math.max(0, coords.y + size.height - (vh - padding));\n if (side === \"left\") return Math.max(0, padding - coords.x);\n return Math.max(0, coords.x + size.width - (vw - padding));\n}\nfunction freeSpaceOnSide(anchor, size, side, viewport) {\n const {\n padding,\n width: vw,\n height: vh\n } = viewport;\n if (side === \"top\") return anchor.top - padding - size.height;\n if (side === \"bottom\") return vh - padding - size.height - anchor.bottom;\n if (side === \"left\") return anchor.left - padding - size.width;\n return vw - padding - size.width - anchor.right;\n}\nfunction toPlacement(side, align) {\n if (align === \"center\") {\n return side;\n }\n return `${side}-${align}`;\n}\nfunction clampCrossAxis(coords, size, side, viewport) {\n const {\n padding,\n width: vw,\n height: vh\n } = viewport;\n if (primaryAxis(side) === \"y\") {\n const maxX = Math.max(padding, vw - padding - size.width);\n return {\n x: Math.min(Math.max(coords.x, padding), maxX),\n y: Math.max(padding, coords.y)\n };\n }\n const maxY = Math.max(padding, vh - padding - size.height);\n return {\n x: Math.max(padding, coords.x),\n y: Math.min(Math.max(coords.y, padding), maxY)\n };\n}\nexport function computeFloatingCoords(anchor, size, placement, gap, viewport = {\n width: typeof window === \"undefined\" ? 0 : window.innerWidth,\n height: typeof window === \"undefined\" ? 0 : window.innerHeight,\n padding: DEFAULT_VIEWPORT_PADDING\n}) {\n return computeFloatingPosition(anchor, size, placement, gap, viewport).coords;\n}\nexport function computeFloatingPosition(anchor, size, placement, gap, viewport = {\n width: typeof window === \"undefined\" ? 0 : window.innerWidth,\n height: typeof window === \"undefined\" ? 0 : window.innerHeight,\n padding: DEFAULT_VIEWPORT_PADDING\n}) {\n const {\n side: preferred,\n align\n } = parsePlacement(placement);\n const preferredCoords = coordsFor(anchor, size, preferred, align, gap);\n const preferredOverflow = overflowOnPrimary(preferredCoords, size, preferred, viewport);\n let side = preferred;\n let coords = preferredCoords;\n if (preferredOverflow > 0) {\n const flipped = OPPOSITE[preferred];\n const flippedCoords = coordsFor(anchor, size, flipped, align, gap);\n const preferredFree = freeSpaceOnSide(anchor, size, preferred, viewport);\n const flippedFree = freeSpaceOnSide(anchor, size, flipped, viewport);\n if (flippedFree > preferredFree) {\n side = flipped;\n coords = flippedCoords;\n }\n }\n return {\n coords: clampCrossAxis(coords, size, side, viewport),\n placement: toPlacement(side, align)\n };\n}\nexport function applyFloatingPosition(anchor, floating, placement, gap, options = {}) {\n const matchAnchorWidth = options.matchAnchorWidth === true;\n const anchorWidth = anchor.offsetWidth;\n const size = matchAnchorWidth ? {\n width: anchorWidth,\n height: floating.offsetHeight\n } : {\n width: floating.offsetWidth,\n height: floating.offsetHeight\n };\n if (matchAnchorWidth) {\n floating.style.width = `${anchorWidth}px`;\n floating.style.minWidth = `${anchorWidth}px`;\n floating.style.maxWidth = `${anchorWidth}px`;\n floating.style.boxSizing = \"border-box\";\n matchAnchorWidthStylesApplied.set(floating, true);\n } else {\n clearMatchAnchorWidthStyles(floating);\n }\n const {\n coords,\n placement: resolved\n } = computeFloatingPosition(anchor.getBoundingClientRect(), size, placement, gap);\n Object.assign(floating.style, {\n position: \"fixed\",\n left: `${coords.x}px`,\n top: `${coords.y}px`,\n right: \"auto\",\n bottom: \"auto\",\n visibility: \"visible\"\n });\n floating.setAttribute(\"data-placement\", resolved);\n return resolved;\n}\nexport function attachFloating({\n anchor,\n floating,\n getPlacement,\n gap,\n matchAnchorWidth\n}) {\n const update = () => {\n if (floating.hidden) return;\n applyFloatingPosition(anchor, floating, getPlacement(), gap, {\n matchAnchorWidth\n });\n };\n update();\n window.addEventListener(\"resize\", update);\n window.addEventListener(\"scroll\", update, true);\n const observer = new ResizeObserver(update);\n observer.observe(anchor);\n observer.observe(floating);\n return () => {\n window.removeEventListener(\"resize\", update);\n window.removeEventListener(\"scroll\", update, true);\n observer.disconnect();\n };\n}", "export function mountPortal(node, container = document.body) {\n const parent = node.parentNode;\n if (!parent) {\n return {\n unmount: () => {}\n };\n }\n const placeholder = document.createComment(\"rui-portal\");\n parent.insertBefore(placeholder, node);\n container.appendChild(node);\n return {\n unmount: () => {\n const restoreParent = placeholder.parentNode;\n if (!restoreParent) {\n return;\n }\n restoreParent.insertBefore(node, placeholder);\n placeholder.remove();\n }\n };\n}", "import { attachFloating } from \"./floating-position\";\nimport { mountPortal } from \"./portal\";\nexport function popoverContains(anchor, floating, node) {\n if (!node) {\n return false;\n }\n return Boolean(anchor?.contains(node) || floating?.contains(node));\n}\nexport function shouldDismissPopoverFocus(anchor, floating, relatedTarget) {\n if (!(relatedTarget instanceof Node)) {\n return true;\n }\n return !popoverContains(anchor, floating, relatedTarget);\n}\nexport function shouldDismissPopoverPointer(anchor, floating, target) {\n return !popoverContains(anchor, floating, target);\n}\nexport class PopoverController {\n config;\n cleanupFloating = null;\n portalHandle = null;\n floatingElement = null;\n constructor(config) {\n this.config = config;\n }\n updateConfig(patch) {\n this.config = {\n ...this.config,\n ...patch\n };\n }\n sync() {\n const floating = this.resolveFloating();\n if (!floating) {\n return;\n }\n const open = this.config.getOpen();\n if (!open) {\n this.teardown();\n floating.toggleAttribute(\"hidden\", true);\n return;\n }\n const anchor = this.config.getAnchor();\n if (!anchor) {\n return;\n }\n floating.toggleAttribute(\"hidden\", false);\n const usePortal = this.config.portal !== false;\n if (usePortal) {\n if (!this.portalHandle) {\n this.portalHandle = mountPortal(floating, this.config.portalContainer ?? document.body);\n }\n } else if (this.portalHandle) {\n this.portalHandle.unmount();\n this.portalHandle = null;\n }\n this.teardownFloating();\n this.cleanupFloating = attachFloating({\n anchor,\n floating,\n getPlacement: this.config.getPlacement,\n gap: this.config.gap ?? 8,\n matchAnchorWidth: this.config.matchAnchorWidth\n });\n }\n contains(node) {\n return popoverContains(this.config.getAnchor(), this.resolveFloating(), node);\n }\n getFloatingElement() {\n return this.resolveFloating();\n }\n teardown() {\n this.teardownFloating();\n if (this.portalHandle) {\n this.portalHandle.unmount();\n this.portalHandle = null;\n }\n }\n destroy() {\n this.teardown();\n this.floatingElement = null;\n }\n resolveFloating() {\n const configuredFloating = this.config.getFloating();\n if (configuredFloating) {\n this.floatingElement = configuredFloating;\n }\n return configuredFloating ?? this.float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,EAAQ,QAAQ,KAAK,IAAI,CAE7B,CACA,oBAAoBC,EAAQ,CAC1B,IAAMD,EAAU,KAAK,WAAW,EAC5BC,EAAO,SAAWD,IAGtB,KAAK,KAAOC,EAAO,OAAO,KAC5B,CACA,MAAO,CACLX,GAAY,CACd,CACF,EAEA,SAASY,EAAqBC,EAAS,CAErC,OADkBA,EAAQ,cAAc,2DAA2D,GAC/EA,CACtB,CFvRO,SAASC,GAAkB,CAChC,SAAAC,EACA,MAAOC,EACP,GAAGC,CACL,EAAG,CACD,OAAsBC,EAAI,MAAO,CAC/B,GAAGD,EACH,MAAOE,GAAGH,CAAS,EACnB,SAAAD,CACF,CAAC,CACH,CACO,SAASK,GAAW,CACzB,QAAAC,EACA,SAAAN,EACA,QAAAO,EAAU,UACV,GAAGL,CACL,EAAG,CACD,IAAMM,EAAeD,IAAY,UAAY,uBAAyB,GACtE,OAAsBJ,EAAI,cAAe,CACvC,GAAGD,EACH,QAAAK,EACA,SAAyBE,GAAK,MAAO,CACnC,MAAO,mBACP,WAAY,OACZ,SAAU,CAACH,GAAW,KAAsBH,EAAI,OAAQ,CACtD,uBAAwB,GACxB,SAAUG,CACZ,CAAC,EAAI,KAAqBH,EAAI,MAAO,CACnC,WAAY,UACZ,MAAO,4BAA4BK,CAAY,GAAG,KAAK,EACvD,KAAM,SACN,SAAAR,CACF,CAAC,CAAC,CACJ,CAAC,CACH,CAAC,CACH,CACO,SAASU,GAAkB,CAChC,QAAAJ,EACA,SAAAN,EACA,GAAGE,CACL,EAAG,CACD,OAAsBC,EAAI,sBAAuB,CAC/C,GAAGD,EACH,SAAyBO,GAAK,MAAO,CACnC,MAAO,sBACP,WAAY,OACZ,SAAU,CAAgBN,EAAI,OAAQ,CACpC,uBAAwB,GACxB,SAAUG,CACZ,CAAC,EAAGN,CAAQ,CACd,CAAC,CACH,CAAC,CACH",
|
|
6
|
-
"names": ["jsx", "jsxs", "cx", "parts", "RadiantElement", "bound", "customElement", "event", "onEvent", "onUpdated", "prop", "query", "isServer", "CSS_SAFE_ID", "isCssSafeId", "value", "cssSafePrefix", "prefix", "trimmed", "prefixed", "uniqueId", "token", "byte", "OPPOSITE", "DEFAULT_VIEWPORT_PADDING", "matchAnchorWidthStylesApplied", "clearMatchAnchorWidthStyles", "floating", "parsePlacement", "placement", "dash", "side", "align", "primaryAxis", "coordsFor", "anchor", "size", "gap", "width", "height", "x", "y", "overflowOnPrimary", "coords", "viewport", "padding", "vw", "vh", "freeSpaceOnSide", "toPlacement", "clampCrossAxis", "maxX", "maxY", "computeFloatingPosition", "anchor", "size", "placement", "gap", "viewport", "DEFAULT_VIEWPORT_PADDING", "preferred", "align", "parsePlacement", "preferredCoords", "coordsFor", "preferredOverflow", "overflowOnPrimary", "side", "coords", "flipped", "OPPOSITE", "flippedCoords", "preferredFree", "freeSpaceOnSide", "clampCrossAxis", "toPlacement", "applyFloatingPosition", "floating", "options", "matchAnchorWidth", "anchorWidth", "matchAnchorWidthStylesApplied", "clearMatchAnchorWidthStyles", "resolved", "attachFloating", "getPlacement", "update", "observer", "mountPortal", "node", "container", "parent", "placeholder", "restoreParent", "popoverContains", "anchor", "floating", "node", "shouldDismissPopoverFocus", "relatedTarget", "shouldDismissPopoverPointer", "target", "PopoverController", "config", "patch", "mountPortal", "attachFloating", "configuredFloating", "_initProto", "_initClass", "_init_open", "_init_extra_open", "_init_placement", "_init_extra_placement", "_init_portal", "_init_extra_portal", "_init_matchAnchorWidth", "_init_extra_matchAnchorWidth", "_init_offset", "_init_extra_offset", "_init_anchor", "_init_extra_anchor", "_init_variant", "_init_extra_variant", "_init_surfaceTarget", "_init_extra_surfaceTarget", "_init_hostTarget", "_init_extra_hostTarget", "_init_openChangeEvent", "_init_extra_openChangeEvent", "_initProto2", "_initClass2", "_init_open2", "_init_extra_open2", "_init_rootTarget", "_init_extra_rootTarget", "_applyDecs", "c", "u", "s", "f", "l", "p", "d", "m", "h", "y", "v", "g", "t", "n", "r", "o", "i", "a", "b", "e", "applyDec", "w", "D", "S", "j", "E", "I", "P", "k", "F", "_setFunctionName", "N", "O", "T", "z", "A", "H", "_toPropertyKey", "_checkInRHS", "_toPrimitive", "_RuiPopover", "RuiPopover", "RadiantElement", "customElement", "prop", "query", "event", "bound", "onUpdated", "onEvent", "uniqueId", "triggerFromHost", "resolvePopoverAnchor", "slottedTrigger", "selector", "external", "PopoverController", "anchor", "surface", "controller", "next", "emit", "event2", "target", "shouldDismissPopoverPointer", "shouldDismissPopoverFocus", "_RuiPopoverTrigger", "RuiPopoverTrigger", "RadiantElement", "_init_open2", "_init_extra_open2", "_init_rootTarget", "_init_extra_rootTarget", "_initProto2", "_initClass2", "_applyDecs", "customElement", "prop", "query", "bound", "onUpdated", "onEvent", "args", "isServer", "popover", "event2", "resolvePopoverAnchor", "trigger", "RuiPopoverContent", "children", "className", "props", "jsx", "cx", "RuiPopover", "trigger", "variant", "variantClass", "jsxs", "RuiPopoverTrigger"]
|
|
4
|
+
"sourcesContent": ["import { jsx, jsxs } from \"@ecopages/jsx/jsx-runtime\";\nimport { cx } from \"@/lib/cx\";\nimport { RuiPopover as RuiPopoverElement, RuiPopoverTrigger as RuiPopoverTriggerElement } from \"./popover.script\";\nexport function RuiPopoverContent({\n children,\n class: className,\n ...props\n}) {\n return /* @__PURE__ */jsx(\"div\", {\n ...props,\n class: cx(className),\n children\n });\n}\nexport function RuiPopover({\n trigger,\n children,\n variant = \"default\",\n ...props\n}) {\n const variantClass = variant === \"listbox\" ? \"rui-popover--listbox\" : \"\";\n return /* @__PURE__ */jsx(RuiPopoverElement, {\n ...props,\n variant,\n children: /* @__PURE__ */jsxs(\"div\", {\n class: \"rui-popover-host\",\n \"data-ref\": \"host\",\n children: [trigger != null ? /* @__PURE__ */jsx(\"span\", {\n \"data-popover-trigger\": true,\n children: trigger\n }) : null, /* @__PURE__ */jsx(\"div\", {\n \"data-ref\": \"surface\",\n class: `rui-popover rui-floating ${variantClass}`.trim(),\n role: \"dialog\",\n children\n })]\n })\n });\n}\nexport function RuiPopoverTrigger({\n trigger,\n children,\n ...props\n}) {\n return /* @__PURE__ */jsx(RuiPopoverTriggerElement, {\n ...props,\n children: /* @__PURE__ */jsxs(\"div\", {\n class: \"rui-popover-trigger\",\n \"data-ref\": \"root\",\n children: [/* @__PURE__ */jsx(\"span\", {\n \"data-popover-trigger\": true,\n children: trigger\n }), children]\n })\n });\n}", "export function cx(...parts) {\n return parts.filter(Boolean).join(\" \");\n}", "let _initProto, _initClass, _init_open, _init_extra_open, _init_placement, _init_extra_placement, _init_portal, _init_extra_portal, _init_matchAnchorWidth, _init_extra_matchAnchorWidth, _init_offset, _init_extra_offset, _init_anchor, _init_extra_anchor, _init_variant, _init_extra_variant, _init_surfaceTarget, _init_extra_surfaceTarget, _init_hostTarget, _init_extra_hostTarget, _init_openChangeEvent, _init_extra_openChangeEvent, _initProto2, _initClass2, _init_open2, _init_extra_open2, _init_rootTarget, _init_extra_rootTarget;\nfunction _applyDecs(e, t, n, r, o, i) { var a, c, u, s, f, l, p, d = Symbol.metadata || Symbol.for(\"Symbol.metadata\"), m = Object.defineProperty, h = Object.create, y = [h(null), h(null)], v = t.length; function g(t, n, r) { return function (o, i) { n && (i = o, o = e); for (var a = 0; a < t.length; a++) i = t[a].apply(o, r ? [i] : []); return r ? i : o; }; } function b(e, t, n, r) { if (\"function\" != typeof e && (r || void 0 !== e)) throw new TypeError(t + \" must \" + (n || \"be\") + \" a function\" + (r ? \"\" : \" or undefined\")); return e; } function applyDec(e, t, n, r, o, i, u, s, f, l, p) { function d(e) { if (!p(e)) throw new TypeError(\"Attempted to access private element on non-instance\"); } var h = [].concat(t[0]), v = t[3], w = !u, D = 1 === o, S = 3 === o, j = 4 === o, E = 2 === o; function I(t, n, r) { return function (o, i) { return n && (i = o, o = e), r && r(o), P[t].call(o, i); }; } if (!w) { var P = {}, k = [], F = S ? \"get\" : j || D ? \"set\" : \"value\"; if (f ? (l || D ? P = { get: _setFunctionName(function () { return v(this); }, r, \"get\"), set: function (e) { t[4](this, e); } } : P[F] = v, l || _setFunctionName(P[F], r, E ? \"\" : F)) : l || (P = Object.getOwnPropertyDescriptor(e, r)), !l && !f) { if ((c = y[+s][r]) && 7 !== (c ^ o)) throw Error(\"Decorating two elements with the same name (\" + P[F].name + \") is not supported yet\"); y[+s][r] = o < 3 ? 1 : o; } } for (var N = e, O = h.length - 1; O >= 0; O -= n ? 2 : 1) { var T = b(h[O], \"A decorator\", \"be\", !0), z = n ? h[O - 1] : void 0, A = {}, H = { kind: [\"field\", \"accessor\", \"method\", \"getter\", \"setter\", \"class\"][o], name: r, metadata: a, addInitializer: function (e, t) { if (e.v) throw new TypeError(\"attempted to call addInitializer after decoration was finished\"); b(t, \"An initializer\", \"be\", !0), i.push(t); }.bind(null, A) }; if (w) c = T.call(z, N, H), A.v = 1, b(c, \"class decorators\", \"return\") && (N = c);else if (H.static = s, H.private = f, c = H.access = { has: f ? p.bind() : function (e) { return r in e; } }, j || (c.get = f ? E ? function (e) { return d(e), P.value; } : I(\"get\", 0, d) : function (e) { return e[r]; }), E || S || (c.set = f ? I(\"set\", 0, d) : function (e, t) { e[r] = t; }), N = T.call(z, D ? { get: P.get, set: P.set } : P[F], H), A.v = 1, D) { if (\"object\" == typeof N && N) (c = b(N.get, \"accessor.get\")) && (P.get = c), (c = b(N.set, \"accessor.set\")) && (P.set = c), (c = b(N.init, \"accessor.init\")) && k.unshift(c);else if (void 0 !== N) throw new TypeError(\"accessor decorators must return an object with get, set, or init properties or undefined\"); } else b(N, (l ? \"field\" : \"method\") + \" decorators\", \"return\") && (l ? k.unshift(N) : P[F] = N); } return o < 2 && u.push(g(k, s, 1), g(i, s, 0)), l || w || (f ? D ? u.splice(-1, 0, I(\"get\", s), I(\"set\", s)) : u.push(E ? P[F] : b.call.bind(P[F])) : m(e, r, P)), N; } function w(e) { return m(e, d, { configurable: !0, enumerable: !0, value: a }); } return void 0 !== i && (a = i[d]), a = h(null == a ? null : a), f = [], l = function (e) { e && f.push(g(e)); }, p = function (t, r) { for (var i = 0; i < n.length; i++) { var a = n[i], c = a[1], l = 7 & c; if ((8 & c) == t && !l == r) { var p = a[2], d = !!a[3], m = 16 & c; applyDec(t ? e : e.prototype, a, m, d ? \"#\" + p : _toPropertyKey(p), l, l < 2 ? [] : t ? s = s || [] : u = u || [], f, !!t, d, r, t && d ? function (t) { return _checkInRHS(t) === e; } : o); } } }, p(8, 0), p(0, 0), p(8, 1), p(0, 1), l(u), l(s), c = f, v || w(e), { e: c, get c() { var n = []; return v && [w(e = applyDec(e, [t], r, e.name, 5, n)), g(n, 1)]; } }; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == typeof i ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != typeof i) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nfunction _setFunctionName(e, t, n) { \"symbol\" == typeof t && (t = (t = t.description) ? \"[\" + t + \"]\" : \"\"); try { Object.defineProperty(e, \"name\", { configurable: !0, value: n ? n + \" \" + t : t }); } catch (e) {} return e; }\nfunction _checkInRHS(e) { if (Object(e) !== e) throw TypeError(\"right-hand side of 'in' should be an object, got \" + (null !== e ? typeof e : \"null\")); return e; }\nimport { RadiantElement, bound, customElement, event, onEvent, onUpdated, prop, query } from \"@ecopages/radiant\";\nimport { isServer } from \"@ecopages/radiant/is-server\";\nimport { uniqueId } from \"@/lib/unique-id\";\nimport { PopoverController, shouldDismissPopoverFocus, shouldDismissPopoverPointer } from \"../shared/popover-controller\";\nlet _RuiPopover;\nclass RuiPopover extends RadiantElement {\n static {\n ({\n e: [_init_open, _init_extra_open, _init_placement, _init_extra_placement, _init_portal, _init_extra_portal, _init_matchAnchorWidth, _init_extra_matchAnchorWidth, _init_offset, _init_extra_offset, _init_anchor, _init_extra_anchor, _init_variant, _init_extra_variant, _init_surfaceTarget, _init_extra_surfaceTarget, _init_hostTarget, _init_extra_hostTarget, _init_openChangeEvent, _init_extra_openChangeEvent, _initProto],\n c: [_RuiPopover, _initClass]\n } = _applyDecs(this, [customElement(\"rui-popover\")], [[prop({\n type: Boolean,\n reflect: true,\n defaultValue: false\n }), 0, \"open\"], [prop({\n type: String,\n defaultValue: \"bottom\"\n }), 0, \"placement\"], [prop({\n type: Boolean,\n defaultValue: true\n }), 0, \"portal\"], [prop({\n type: Boolean,\n defaultValue: false\n }), 0, \"matchAnchorWidth\"], [prop({\n type: Number,\n defaultValue: 8\n }), 0, \"offset\"], [prop({\n type: String,\n defaultValue: \"\"\n }), 0, \"anchor\"], [prop({\n type: String,\n defaultValue: \"default\"\n }), 0, \"variant\"], [query({\n ref: \"surface\"\n }), 0, \"surfaceTarget\"], [query({\n ref: \"host\"\n }), 0, \"hostTarget\"], [event({\n name: \"rui-open-change\",\n bubbles: true,\n composed: true\n }), 0, \"openChangeEvent\"], [[bound, onUpdated([\"open\", \"placement\", \"portal\", \"matchAnchorWidth\", \"offset\", \"anchor\"])], 2, \"syncPopover\"], [onEvent({\n document: true,\n type: \"pointerdown\"\n }), 2, \"onDocumentPointerDown\"], [onEvent({\n ref: \"host\",\n type: \"focusout\"\n }), 2, \"onFocusOut\"], [bound, 2, \"onExternalAnchorClick\"], [onEvent({\n document: true,\n type: \"keydown\"\n }), 2, \"onDocumentKeydown\"]], 0, void 0, RadiantElement));\n }\n open = (_initProto(this), _init_open(this));\n placement = (_init_extra_open(this), _init_placement(this));\n portal = (_init_extra_placement(this), _init_portal(this));\n matchAnchorWidth = (_init_extra_portal(this), _init_matchAnchorWidth(this));\n offset = (_init_extra_matchAnchorWidth(this), _init_offset(this));\n anchor = (_init_extra_offset(this), _init_anchor(this));\n variant = (_init_extra_anchor(this), _init_variant(this));\n surfaceTarget = (_init_extra_variant(this), _init_surfaceTarget(this));\n hostTarget = (_init_extra_surfaceTarget(this), _init_hostTarget(this));\n openChangeEvent = (_init_extra_hostTarget(this), _init_openChangeEvent(this));\n surfaceId = (_init_extra_openChangeEvent(this), uniqueId(\"rui-popover\"));\n controller = null;\n anchorClickTarget = null;\n onConnected() {\n this.syncPopover();\n }\n disconnectedCallback() {\n this.unbindExternalAnchorClick();\n this.controller?.destroy();\n this.controller = null;\n super.disconnectedCallback();\n }\n getAnchorElement() {\n const triggerHost = this.closest(\"rui-popover-trigger\");\n const triggerFromHost = triggerHost?.querySelector(\"[data-popover-trigger]\");\n if (triggerFromHost instanceof HTMLElement) {\n return resolvePopoverAnchor(triggerFromHost);\n }\n const slottedTrigger = this.querySelector(\"[data-popover-trigger]\");\n if (slottedTrigger instanceof HTMLElement) {\n return resolvePopoverAnchor(slottedTrigger);\n }\n const selector = this.anchor.trim();\n if (selector) {\n const external = document.querySelector(selector);\n if (external instanceof HTMLElement) {\n return resolvePopoverAnchor(external);\n }\n }\n return null;\n }\n ensureController() {\n if (!this.controller) {\n this.controller = new PopoverController({\n getAnchor: () => this.getAnchorElement(),\n getFloating: () => this.surfaceTarget,\n getOpen: () => this.open,\n getPlacement: () => this.placement,\n gap: this.offset,\n portal: this.portal,\n matchAnchorWidth: this.matchAnchorWidth\n });\n }\n return this.controller;\n }\n syncPopover() {\n const anchor = this.getAnchorElement();\n const surface = this.surfaceTarget;\n if (surface) {\n surface.id = this.surfaceId;\n }\n if (anchor) {\n anchor.setAttribute(\"aria-controls\", this.surfaceId);\n anchor.setAttribute(\"aria-expanded\", String(this.open));\n }\n this.syncExternalAnchorClick(anchor);\n const controller = this.ensureController();\n controller.updateConfig({\n getAnchor: () => this.getAnchorElement(),\n getFloating: () => this.surfaceTarget,\n getOpen: () => this.open,\n getPlacement: () => this.placement,\n gap: this.offset,\n portal: this.portal,\n matchAnchorWidth: this.matchAnchorWidth\n });\n controller.sync();\n }\n setOpen(next, emit = true) {\n if (this.open === next) {\n this.syncPopover();\n return;\n }\n this.open = next;\n if (emit) {\n this.openChangeEvent.emit({\n open: next\n });\n }\n this.syncPopover();\n }\n onDocumentPointerDown(event2) {\n if (!this.open) {\n return;\n }\n const target = event2.target;\n if (!shouldDismissPopoverPointer(this.getAnchorElement(), this.controller?.getFloatingElement() ?? this.surfaceTarget, target)) {\n return;\n }\n this.setOpen(false);\n }\n onFocusOut(event2) {\n if (!this.open) {\n return;\n }\n if (!shouldDismissPopoverFocus(this.getAnchorElement(), this.controller?.getFloatingElement() ?? this.surfaceTarget, event2.relatedTarget)) {\n return;\n }\n this.setOpen(false);\n }\n usesExternalAnchor() {\n if (!this.anchor.trim()) {\n return false;\n }\n if (this.closest(\"rui-popover-trigger\")) {\n return false;\n }\n return !this.querySelector(\"[data-popover-trigger]\");\n }\n syncExternalAnchorClick(anchor) {\n if (!this.usesExternalAnchor() || !anchor) {\n this.unbindExternalAnchorClick();\n return;\n }\n if (this.anchorClickTarget === anchor) {\n return;\n }\n this.unbindExternalAnchorClick();\n anchor.addEventListener(\"click\", this.onExternalAnchorClick);\n this.anchorClickTarget = anchor;\n }\n unbindExternalAnchorClick() {\n if (!this.anchorClickTarget) {\n return;\n }\n this.anchorClickTarget.removeEventListener(\"click\", this.onExternalAnchorClick);\n this.anchorClickTarget = null;\n }\n onExternalAnchorClick() {\n this.setOpen(!this.open);\n }\n onDocumentKeydown(event2) {\n if (!this.open || event2.key !== \"Escape\") {\n return;\n }\n event2.preventDefault();\n this.setOpen(false);\n const anchor = this.getAnchorElement();\n anchor?.focus();\n }\n static {\n _initClass();\n }\n}\nexport { _RuiPopover as RuiPopover };\nlet _RuiPopoverTrigger;\nclass RuiPopoverTrigger extends RadiantElement {\n static {\n ({\n e: [_init_open2, _init_extra_open2, _init_rootTarget, _init_extra_rootTarget, _initProto2],\n c: [_RuiPopoverTrigger, _initClass2]\n } = _applyDecs(this, [customElement(\"rui-popover-trigger\")], [[prop({\n type: Boolean,\n reflect: true,\n defaultValue: false\n }), 0, \"open\"], [query({\n ref: \"root\"\n }), 0, \"rootTarget\"], [[bound, onUpdated([\"open\"])], 2, \"syncToPopover\"], [onEvent({\n ref: \"root\",\n type: \"click\"\n }), 2, \"onHostClick\"], [onEvent({\n selector: \"rui-popover\",\n type: \"rui-open-change\"\n }), 2, \"onPopoverOpenChange\"]], 0, void 0, RadiantElement));\n }\n constructor(...args) {\n super(...args);\n _init_extra_rootTarget(this);\n }\n open = (_initProto2(this), _init_open2(this));\n rootTarget = (_init_extra_open2(this), _init_rootTarget(this));\n getPopover() {\n return this.querySelector(\"rui-popover\");\n }\n onConnected() {\n this.syncToPopover();\n }\n syncToPopover() {\n if (isServer) {\n return;\n }\n const popover = this.getPopover();\n if (!popover || typeof popover.setOpen !== \"function\") {\n return;\n }\n if (popover.open !== this.open) {\n popover.setOpen(this.open, false);\n }\n }\n onHostClick(event2) {\n const target = event2.target;\n if (!target?.closest(\"[data-popover-trigger]\")) {\n return;\n }\n this.open = !this.open;\n const popover = this.getPopover();\n if (popover && typeof popover.setOpen === \"function\") {\n popover.setOpen(this.open);\n }\n }\n onPopoverOpenChange(event2) {\n const popover = this.getPopover();\n if (event2.target !== popover) {\n return;\n }\n this.open = event2.detail.open;\n }\n static {\n _initClass2();\n }\n}\nexport { _RuiPopoverTrigger as RuiPopoverTrigger };\nfunction resolvePopoverAnchor(trigger) {\n const focusable = trigger.querySelector('button, a[href], input, select, textarea, [role=\"button\"]');\n return focusable ?? trigger;\n}", "const CSS_SAFE_ID = /^[A-Za-z][A-Za-z0-9_-]*$/;\nexport function isCssSafeId(value) {\n return CSS_SAFE_ID.test(value);\n}\nfunction cssSafePrefix(prefix) {\n const trimmed = prefix.trim();\n if (isCssSafeId(trimmed)) {\n return trimmed;\n }\n const prefixed = `rui-${trimmed}`;\n if (trimmed && isCssSafeId(prefixed)) {\n return prefixed;\n }\n return \"rui\";\n}\nexport function uniqueId(prefix) {\n const token = typeof crypto.randomUUID === \"function\" ? crypto.randomUUID().replace(/-/g, \"\") : Array.from(crypto.getRandomValues(new Uint8Array(16)), byte => byte.toString(16).padStart(2, \"0\")).join(\"\");\n return `${cssSafePrefix(prefix)}-${token}`;\n}", "const OPPOSITE = {\n top: \"bottom\",\n bottom: \"top\",\n left: \"right\",\n right: \"left\"\n};\nconst DEFAULT_VIEWPORT_PADDING = 8;\nconst matchAnchorWidthStylesApplied = /* @__PURE__ */new WeakMap();\nfunction clearMatchAnchorWidthStyles(floating) {\n if (!matchAnchorWidthStylesApplied.has(floating)) {\n return;\n }\n floating.style.width = \"\";\n floating.style.minWidth = \"\";\n floating.style.maxWidth = \"\";\n floating.style.boxSizing = \"\";\n matchAnchorWidthStylesApplied.delete(floating);\n}\nfunction parsePlacement(placement) {\n const dash = placement.indexOf(\"-\");\n if (dash === -1) return {\n side: placement,\n align: \"center\"\n };\n const side = placement.slice(0, dash);\n const align = placement.slice(dash + 1);\n return {\n side,\n align: align === \"start\" || align === \"end\" ? align : \"center\"\n };\n}\nfunction primaryAxis(side) {\n return side === \"top\" || side === \"bottom\" ? \"y\" : \"x\";\n}\nfunction coordsFor(anchor, size, side, align, gap) {\n const {\n width,\n height\n } = size;\n let x = 0;\n let y = 0;\n switch (side) {\n case \"top\":\n y = anchor.top - height - gap;\n break;\n case \"bottom\":\n y = anchor.bottom + gap;\n break;\n case \"left\":\n x = anchor.left - width - gap;\n break;\n case \"right\":\n x = anchor.right + gap;\n break;\n }\n if (primaryAxis(side) === \"y\") {\n if (align === \"start\") x = anchor.left;else if (align === \"end\") x = anchor.right - width;else x = anchor.left + (anchor.width - width) / 2;\n } else {\n if (align === \"start\") y = anchor.top;else if (align === \"end\") y = anchor.bottom - height;else y = anchor.top + (anchor.height - height) / 2;\n }\n return {\n x,\n y\n };\n}\nfunction overflowOnPrimary(coords, size, side, viewport) {\n const {\n padding,\n width: vw,\n height: vh\n } = viewport;\n if (side === \"top\") return Math.max(0, padding - coords.y);\n if (side === \"bottom\") return Math.max(0, coords.y + size.height - (vh - padding));\n if (side === \"left\") return Math.max(0, padding - coords.x);\n return Math.max(0, coords.x + size.width - (vw - padding));\n}\nfunction freeSpaceOnSide(anchor, size, side, viewport) {\n const {\n padding,\n width: vw,\n height: vh\n } = viewport;\n if (side === \"top\") return anchor.top - padding - size.height;\n if (side === \"bottom\") return vh - padding - size.height - anchor.bottom;\n if (side === \"left\") return anchor.left - padding - size.width;\n return vw - padding - size.width - anchor.right;\n}\nfunction toPlacement(side, align) {\n if (align === \"center\") {\n return side;\n }\n return `${side}-${align}`;\n}\nfunction clampCrossAxis(coords, size, side, viewport) {\n const {\n padding,\n width: vw,\n height: vh\n } = viewport;\n if (primaryAxis(side) === \"y\") {\n const maxX = Math.max(padding, vw - padding - size.width);\n return {\n x: Math.min(Math.max(coords.x, padding), maxX),\n y: Math.max(padding, coords.y)\n };\n }\n const maxY = Math.max(padding, vh - padding - size.height);\n return {\n x: Math.max(padding, coords.x),\n y: Math.min(Math.max(coords.y, padding), maxY)\n };\n}\nexport function computeFloatingCoords(anchor, size, placement, gap, viewport = {\n width: typeof window === \"undefined\" ? 0 : window.innerWidth,\n height: typeof window === \"undefined\" ? 0 : window.innerHeight,\n padding: DEFAULT_VIEWPORT_PADDING\n}) {\n return computeFloatingPosition(anchor, size, placement, gap, viewport).coords;\n}\nexport function computeFloatingPosition(anchor, size, placement, gap, viewport = {\n width: typeof window === \"undefined\" ? 0 : window.innerWidth,\n height: typeof window === \"undefined\" ? 0 : window.innerHeight,\n padding: DEFAULT_VIEWPORT_PADDING\n}) {\n const {\n side: preferred,\n align\n } = parsePlacement(placement);\n const preferredCoords = coordsFor(anchor, size, preferred, align, gap);\n const preferredOverflow = overflowOnPrimary(preferredCoords, size, preferred, viewport);\n let side = preferred;\n let coords = preferredCoords;\n if (preferredOverflow > 0) {\n const flipped = OPPOSITE[preferred];\n const flippedCoords = coordsFor(anchor, size, flipped, align, gap);\n const preferredFree = freeSpaceOnSide(anchor, size, preferred, viewport);\n const flippedFree = freeSpaceOnSide(anchor, size, flipped, viewport);\n if (flippedFree > preferredFree) {\n side = flipped;\n coords = flippedCoords;\n }\n }\n return {\n coords: clampCrossAxis(coords, size, side, viewport),\n placement: toPlacement(side, align)\n };\n}\nexport function applyFloatingPosition(anchor, floating, placement, gap, options = {}) {\n const matchAnchorWidth = options.matchAnchorWidth === true;\n const anchorWidth = anchor.offsetWidth;\n const size = matchAnchorWidth ? {\n width: anchorWidth,\n height: floating.offsetHeight\n } : {\n width: floating.offsetWidth,\n height: floating.offsetHeight\n };\n if (matchAnchorWidth) {\n floating.style.width = `${anchorWidth}px`;\n floating.style.minWidth = `${anchorWidth}px`;\n floating.style.maxWidth = `${anchorWidth}px`;\n floating.style.boxSizing = \"border-box\";\n matchAnchorWidthStylesApplied.set(floating, true);\n } else {\n clearMatchAnchorWidthStyles(floating);\n }\n const {\n coords,\n placement: resolved\n } = computeFloatingPosition(anchor.getBoundingClientRect(), size, placement, gap);\n Object.assign(floating.style, {\n position: \"fixed\",\n left: `${coords.x}px`,\n top: `${coords.y}px`,\n right: \"auto\",\n bottom: \"auto\",\n visibility: \"visible\"\n });\n floating.setAttribute(\"data-placement\", resolved);\n return resolved;\n}\nexport function attachFloating({\n anchor,\n floating,\n getPlacement,\n gap,\n matchAnchorWidth\n}) {\n const update = () => {\n if (floating.hidden) return;\n applyFloatingPosition(anchor, floating, getPlacement(), gap, {\n matchAnchorWidth\n });\n };\n update();\n window.addEventListener(\"resize\", update);\n window.addEventListener(\"scroll\", update, true);\n const observer = new ResizeObserver(update);\n observer.observe(anchor);\n observer.observe(floating);\n return () => {\n window.removeEventListener(\"resize\", update);\n window.removeEventListener(\"scroll\", update, true);\n observer.disconnect();\n };\n}", "export function mountPortal(node, container = document.body) {\n const parent = node.parentNode;\n if (!parent) {\n return {\n unmount: () => {}\n };\n }\n const placeholder = document.createComment(\"rui-portal\");\n parent.insertBefore(placeholder, node);\n container.appendChild(node);\n return {\n unmount: () => {\n const restoreParent = placeholder.parentNode;\n if (!restoreParent) {\n return;\n }\n restoreParent.insertBefore(node, placeholder);\n placeholder.remove();\n }\n };\n}", "import { attachFloating } from \"./floating-position\";\nimport { mountPortal } from \"./portal\";\nexport function popoverContains(anchor, floating, node) {\n if (!node) {\n return false;\n }\n return Boolean(anchor?.contains(node) || floating?.contains(node));\n}\nexport function shouldDismissPopoverFocus(anchor, floating, relatedTarget) {\n if (!(relatedTarget instanceof Node)) {\n return true;\n }\n return !popoverContains(anchor, floating, relatedTarget);\n}\nexport function shouldDismissPopoverPointer(anchor, floating, target) {\n return !popoverContains(anchor, floating, target);\n}\nexport class PopoverController {\n config;\n cleanupFloating = null;\n portalHandle = null;\n floatingElement = null;\n constructor(config) {\n this.config = config;\n }\n updateConfig(patch) {\n this.config = {\n ...this.config,\n ...patch\n };\n }\n sync() {\n const floating = this.resolveFloating();\n if (!floating) {\n return;\n }\n const open = this.config.getOpen();\n if (!open) {\n this.teardown();\n floating.toggleAttribute(\"hidden\", true);\n return;\n }\n const anchor = this.config.getAnchor();\n if (!anchor) {\n return;\n }\n floating.toggleAttribute(\"hidden\", false);\n const usePortal = this.config.portal !== false;\n if (usePortal) {\n if (!this.portalHandle) {\n this.portalHandle = mountPortal(floating, this.config.portalContainer ?? document.body);\n }\n } else if (this.portalHandle) {\n this.portalHandle.unmount();\n this.portalHandle = null;\n }\n this.teardownFloating();\n this.cleanupFloating = attachFloating({\n anchor,\n floating,\n getPlacement: this.config.getPlacement,\n gap: this.config.gap ?? 8,\n matchAnchorWidth: this.config.matchAnchorWidth\n });\n }\n contains(node) {\n return popoverContains(this.config.getAnchor(), this.resolveFloating(), node);\n }\n getFloatingElement() {\n return this.resolveFloating();\n }\n teardown() {\n this.teardownFloating();\n if (this.portalHandle) {\n this.portalHandle.unmount();\n this.portalHandle = null;\n }\n }\n destroy() {\n this.teardown();\n this.floatingElement = null;\n }\n resolveFloating() {\n const configuredFloating = this.config.getFloating();\n if (configuredFloating) {\n this.floatingElement = configuredFloating;\n }\n return configuredFloating ?? this.floatingElement;\n }\n teardownFloating() {\n this.cleanupFloating?.();\n this.cleanupFloating = null;\n }\n}"],
|
|
5
|
+
"mappings": "AAAA,OAAS,OAAAA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,SAAWD,IAGtB,KAAK,KAAOC,EAAO,OAAO,KAC5B,CACA,MAAO,CACLX,GAAY,CACd,CACF,EAEA,SAASY,EAAqBC,EAAS,CAErC,OADkBA,EAAQ,cAAc,2DAA2D,GAC/EA,CACtB,CFvRO,SAASC,GAAkB,CAChC,SAAAC,EACA,MAAOC,EACP,GAAGC,CACL,EAAG,CACD,OAAsBC,EAAI,MAAO,CAC/B,GAAGD,EACH,MAAOE,GAAGH,CAAS,EACnB,SAAAD,CACF,CAAC,CACH,CACO,SAASK,GAAW,CACzB,QAAAC,EACA,SAAAN,EACA,QAAAO,EAAU,UACV,GAAGL,CACL,EAAG,CACD,IAAMM,EAAeD,IAAY,UAAY,uBAAyB,GACtE,OAAsBJ,EAAIM,EAAmB,CAC3C,GAAGP,EACH,QAAAK,EACA,SAAyBG,GAAK,MAAO,CACnC,MAAO,mBACP,WAAY,OACZ,SAAU,CAACJ,GAAW,KAAsBH,EAAI,OAAQ,CACtD,uBAAwB,GACxB,SAAUG,CACZ,CAAC,EAAI,KAAqBH,EAAI,MAAO,CACnC,WAAY,UACZ,MAAO,4BAA4BK,CAAY,GAAG,KAAK,EACvD,KAAM,SACN,SAAAR,CACF,CAAC,CAAC,CACJ,CAAC,CACH,CAAC,CACH,CACO,SAASW,GAAkB,CAChC,QAAAL,EACA,SAAAN,EACA,GAAGE,CACL,EAAG,CACD,OAAsBC,EAAIS,EAA0B,CAClD,GAAGV,EACH,SAAyBQ,GAAK,MAAO,CACnC,MAAO,sBACP,WAAY,OACZ,SAAU,CAAgBP,EAAI,OAAQ,CACpC,uBAAwB,GACxB,SAAUG,CACZ,CAAC,EAAGN,CAAQ,CACd,CAAC,CACH,CAAC,CACH",
|
|
6
|
+
"names": ["jsx", "jsxs", "cx", "parts", "RadiantElement", "bound", "customElement", "event", "onEvent", "onUpdated", "prop", "query", "isServer", "CSS_SAFE_ID", "isCssSafeId", "value", "cssSafePrefix", "prefix", "trimmed", "prefixed", "uniqueId", "token", "byte", "OPPOSITE", "DEFAULT_VIEWPORT_PADDING", "matchAnchorWidthStylesApplied", "clearMatchAnchorWidthStyles", "floating", "parsePlacement", "placement", "dash", "side", "align", "primaryAxis", "coordsFor", "anchor", "size", "gap", "width", "height", "x", "y", "overflowOnPrimary", "coords", "viewport", "padding", "vw", "vh", "freeSpaceOnSide", "toPlacement", "clampCrossAxis", "maxX", "maxY", "computeFloatingPosition", "anchor", "size", "placement", "gap", "viewport", "DEFAULT_VIEWPORT_PADDING", "preferred", "align", "parsePlacement", "preferredCoords", "coordsFor", "preferredOverflow", "overflowOnPrimary", "side", "coords", "flipped", "OPPOSITE", "flippedCoords", "preferredFree", "freeSpaceOnSide", "clampCrossAxis", "toPlacement", "applyFloatingPosition", "floating", "options", "matchAnchorWidth", "anchorWidth", "matchAnchorWidthStylesApplied", "clearMatchAnchorWidthStyles", "resolved", "attachFloating", "getPlacement", "update", "observer", "mountPortal", "node", "container", "parent", "placeholder", "restoreParent", "popoverContains", "anchor", "floating", "node", "shouldDismissPopoverFocus", "relatedTarget", "shouldDismissPopoverPointer", "target", "PopoverController", "config", "patch", "mountPortal", "attachFloating", "configuredFloating", "_initProto", "_initClass", "_init_open", "_init_extra_open", "_init_placement", "_init_extra_placement", "_init_portal", "_init_extra_portal", "_init_matchAnchorWidth", "_init_extra_matchAnchorWidth", "_init_offset", "_init_extra_offset", "_init_anchor", "_init_extra_anchor", "_init_variant", "_init_extra_variant", "_init_surfaceTarget", "_init_extra_surfaceTarget", "_init_hostTarget", "_init_extra_hostTarget", "_init_openChangeEvent", "_init_extra_openChangeEvent", "_initProto2", "_initClass2", "_init_open2", "_init_extra_open2", "_init_rootTarget", "_init_extra_rootTarget", "_applyDecs", "c", "u", "s", "f", "l", "p", "d", "m", "h", "y", "v", "g", "t", "n", "r", "o", "i", "a", "b", "e", "applyDec", "w", "D", "S", "j", "E", "I", "P", "k", "F", "_setFunctionName", "N", "O", "T", "z", "A", "H", "_toPropertyKey", "_checkInRHS", "_toPrimitive", "_RuiPopover", "RuiPopover", "RadiantElement", "customElement", "prop", "query", "event", "bound", "onUpdated", "onEvent", "uniqueId", "triggerFromHost", "resolvePopoverAnchor", "slottedTrigger", "selector", "external", "PopoverController", "anchor", "surface", "controller", "next", "emit", "event2", "target", "shouldDismissPopoverPointer", "shouldDismissPopoverFocus", "_RuiPopoverTrigger", "RuiPopoverTrigger", "RadiantElement", "_init_open2", "_init_extra_open2", "_init_rootTarget", "_init_extra_rootTarget", "_initProto2", "_initClass2", "_applyDecs", "customElement", "prop", "query", "bound", "onUpdated", "onEvent", "args", "isServer", "popover", "event2", "resolvePopoverAnchor", "trigger", "RuiPopoverContent", "children", "className", "props", "jsx", "cx", "RuiPopover", "trigger", "variant", "variantClass", "_RuiPopover", "jsxs", "RuiPopoverTrigger", "_RuiPopoverTrigger"]
|
|
7
7
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { JsxCustomElementAttributes, JsxElementProps, JsxRenderable } from '@ecopages/jsx';
|
|
2
|
-
import
|
|
3
|
-
import './popover.script';
|
|
2
|
+
import { RuiPopover as RuiPopoverElement, type RuiPopoverProps, RuiPopoverTrigger as RuiPopoverTriggerElement, type RuiPopoverTriggerProps } from './popover.script';
|
|
4
3
|
export type RuiPopoverContentProps = JsxElementProps<HTMLDivElement>;
|
|
5
4
|
/** Popover body in the floating surface. Content lives inside `[data-ref="surface"]`. */
|
|
6
5
|
export declare function RuiPopoverContent({ children, class: className, ...props }: RuiPopoverContentProps): JsxRenderable;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { JSX_PROPS } from '@ecopages/jsx';
|
|
1
2
|
import { RadiantElement } from '@ecopages/radiant';
|
|
2
3
|
import type { EventEmitter } from '@ecopages/radiant/tools/event-emitter';
|
|
3
4
|
import type { RuiPlacement } from '../shared/placement';
|
|
@@ -68,6 +69,7 @@ export type RuiPopoverProps = {
|
|
|
68
69
|
* `[data-popover-trigger]` + `[data-ref="surface"]`. BEM classes live on the view; the host never queries them.
|
|
69
70
|
*/
|
|
70
71
|
export declare class RuiPopover extends RadiantElement {
|
|
72
|
+
readonly [JSX_PROPS]?: RuiPopoverProps;
|
|
71
73
|
open: boolean;
|
|
72
74
|
placement: RuiPlacement;
|
|
73
75
|
portal: boolean;
|
|
@@ -122,6 +124,7 @@ export type RuiPopoverTriggerProps = {
|
|
|
122
124
|
* Minimum tree: `[data-ref="root"]` > `[data-popover-trigger]` + `rui-popover`. BEM classes live on the view.
|
|
123
125
|
*/
|
|
124
126
|
export declare class RuiPopoverTrigger extends RadiantElement {
|
|
127
|
+
readonly [JSX_PROPS]?: RuiPopoverTriggerProps;
|
|
125
128
|
open: boolean;
|
|
126
129
|
rootTarget: HTMLElement | null;
|
|
127
130
|
private getPopover;
|
|
@@ -130,3 +133,9 @@ export declare class RuiPopoverTrigger extends RadiantElement {
|
|
|
130
133
|
onHostClick(event: Event): void;
|
|
131
134
|
onPopoverOpenChange(event: CustomEvent<RuiPopoverOpenChangeDetail>): void;
|
|
132
135
|
}
|
|
136
|
+
declare global {
|
|
137
|
+
interface HTMLElementTagNameMap {
|
|
138
|
+
'rui-popover': RuiPopover;
|
|
139
|
+
'rui-popover-trigger': RuiPopoverTrigger;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{RadiantElement as
|
|
1
|
+
import{RadiantElement as xe,bindTo as Ee,customElement as Ie,event as Ve,onEvent as Ae,onUpdated as Oe,prop as A,query as ke}from"@ecopages/radiant";function oe(e){return e||void 0}var ue,se,le,ce,de,pe,fe,he,me,ve,ge,be,ye,_e;function Se(e,t,i,c,k,T){var R,o,z,B,S,q,E,X=Symbol.metadata||Symbol.for("Symbol.metadata"),Y=Object.defineProperty,K=Object.create,Z=[K(null),K(null)],$=t.length;function G(r,f,d){return function(n,a){f&&(a=n,n=e);for(var h=0;h<r.length;h++)a=r[h].apply(n,d?[a]:[]);return d?a:n}}function g(r,f,d,n){if(typeof r!="function"&&(n||r!==void 0))throw new TypeError(f+" must "+(d||"be")+" a function"+(n?"":" or undefined"));return r}function H(r,f,d,n,a,h,y,p,m,v,P){function U(s){if(!P(s))throw new TypeError("Attempted to access private element on non-instance")}var J=[].concat(f[0]),N=f[3],L=!y,w=a===1,ee=a===3,te=a===4,C=a===2;function D(s,x,ne){return function(V,ae){return x&&(ae=V,V=r),ne&&ne(V),u[s].call(V,ae)}}if(!L){var u={},M=[],b=ee?"get":te||w?"set":"value";if(m?(v||w?u={get:Re(function(){return N(this)},n,"get"),set:function(s){f[4](this,s)}}:u[b]=N,v||Re(u[b],n,C?"":b)):v||(u=Object.getOwnPropertyDescriptor(r,n)),!v&&!m){if((o=Z[+p][n])&&(o^a)!==7)throw Error("Decorating two elements with the same name ("+u[b].name+") is not supported yet");Z[+p][n]=a<3?1:a}}for(var l=r,I=J.length-1;I>=0;I-=d?2:1){var re=g(J[I],"A decorator","be",!0),ie=d?J[I-1]:void 0,Q={},j={kind:["field","accessor","method","getter","setter","class"][a],name:n,metadata:R,addInitializer:function(s,x){if(s.v)throw new TypeError("attempted to call addInitializer after decoration was finished");g(x,"An initializer","be",!0),h.push(x)}.bind(null,Q)};if(L)o=re.call(ie,l,j),Q.v=1,g(o,"class decorators","return")&&(l=o);else if(j.static=p,j.private=m,o=j.access={has:m?P.bind():function(s){return n in s}},te||(o.get=m?C?function(s){return U(s),u.value}:D("get",0,U):function(s){return s[n]}),C||ee||(o.set=m?D("set",0,U):function(s,x){s[n]=x}),l=re.call(ie,w?{get:u.get,set:u.set}:u[b],j),Q.v=1,w){if(typeof l=="object"&&l)(o=g(l.get,"accessor.get"))&&(u.get=o),(o=g(l.set,"accessor.set"))&&(u.set=o),(o=g(l.init,"accessor.init"))&&M.unshift(o);else if(l!==void 0)throw new TypeError("accessor decorators must return an object with get, set, or init properties or undefined")}else g(l,(v?"field":"method")+" decorators","return")&&(v?M.unshift(l):u[b]=l)}return a<2&&y.push(G(M,p,1),G(h,p,0)),v||L||(m?w?y.splice(-1,0,D("get",p),D("set",p)):y.push(C?u[b]:g.call.bind(u[b])):Y(r,n,u)),l}function F(r){return Y(r,X,{configurable:!0,enumerable:!0,value:R})}return T!==void 0&&(R=T[X]),R=K(R??null),S=[],q=function(r){r&&S.push(G(r))},E=function(r,f){for(var d=0;d<i.length;d++){var n=i[d],a=n[1],h=7&a;if((8&a)==r&&!h==f){var y=n[2],p=!!n[3],m=16&a;H(r?e:e.prototype,n,m,p?"#"+y:Ge(y),h,h<2?[]:r?B=B||[]:z=z||[],S,!!r,p,f,r&&p?function(v){return De(v)===e}:k)}}},E(8,0),E(0,0),E(8,1),E(0,1),q(z),q(B),o=S,$||F(e),{e:o,get c(){var r=[];return $&&[F(e=H(e,[t],c,e.name,5,r)),G(r,1)]}}}function Ge(e){var t=Ce(e,"string");return typeof t=="symbol"?t:t+""}function Ce(e,t){if(typeof e!="object"||!e)return e;var i=e[Symbol.toPrimitive];if(i!==void 0){var c=i.call(e,t||"default");if(typeof c!="object")return c;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Re(e,t,i){typeof t=="symbol"&&(t=(t=t.description)?"["+t+"]":"");try{Object.defineProperty(e,"name",{configurable:!0,value:i?i+" "+t:t})}catch{}return e}function De(e){if(Object(e)!==e)throw TypeError("right-hand side of 'in' should be an object, got "+(e!==null?typeof e:"null"));return e}var O,we=class extends xe{static{({e:[le,ce,de,pe,fe,he,me,ve,ge,be,ye,_e,ue],c:[O,se]}=Se(this,[Ie("rui-radio-group")],[[A({type:String,reflect:!0,defaultValue:""}),0,"value"],[A({type:String,defaultValue:""}),0,"name"],[[A({type:String,defaultValue:""}),Ee({selector:"[data-radio-group-root]",attr:"aria-label",map:oe})],0,"label"],[[A({type:Boolean,reflect:!0,defaultValue:!1}),Ee({selector:"[data-radio-group-root]",attr:"aria-disabled",map:t=>t?"true":void 0})],0,"disabled"],[ke({selector:'input[type="radio"]',all:!0,cache:!1}),0,"radioTargets"],[Ve({name:"rui-change",bubbles:!0,composed:!0}),0,"changeEvent"],[Oe(["value","name","disabled"]),2,"syncRadios"],[Ae({selector:'input[type="radio"]',type:"change"}),2,"onRadioChange"]],0,void 0,xe))}constructor(...t){super(...t),_e(this)}value=(ue(this),le(this));name=(ce(this),de(this));label=(pe(this),fe(this));disabled=(he(this),me(this));radioTargets=(ve(this),ge(this));changeEvent=(be(this),ye(this));onConnected(){this.syncRadios()}syncRadios(){let t=this.name||this.getAttribute("name")||"rui-radio-group";for(let i of this.radioTargets)i.name=t,i.disabled=this.disabled||i.hasAttribute("data-disabled"),i.checked=this.value!==""&&i.value===this.value}onRadioChange(t){let i=t.target;i.checked&&(this.value=i.value,this.changeEvent.emit({value:this.value}))}static{se()}};import{jsx as _,jsxs as ze}from"@ecopages/jsx/jsx-runtime";function W(...e){return e.filter(Boolean).join(" ")}function je({children:e,class:t,...i}){return _("div",{...i,"data-radio-group-root":!0,class:W("rui-radio-group",t),role:"radiogroup","data-rui-control":!0,"data-rui-control-type":"text",children:e})}function Te({children:e,value:t,name:i,disabled:c,class:k,...T}){return ze("label",{...T,class:W("rui-radio",k),children:[_("input",{type:"radio",class:"rui-radio__input",value:t,name:i,disabled:c,"data-disabled":c?"":void 0}),_("span",{class:"rui-radio__control","aria-hidden":"true"}),_("span",{class:"rui-radio__label",children:e})]})}function Be({options:e,children:t,...i}){return _(O,{...i,children:e==null?t:_(je,{children:e.map(c=>_(Te,{value:c.value,disabled:c.disabled,children:c.label}))})})}export{Te as RuiRadio,Be as RuiRadioGroup,je as RuiRadioGroupControl,O as RuiRadioGroupElement};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/components/ui/radio-group/radio-group.script.tsx", "../../../../src/lib/non-empty.ts", "../../../../src/components/ui/radio-group/radio-group.tsx", "../../../../src/lib/cx.ts"],
|
|
4
|
-
"sourcesContent": ["let _initProto, _initClass, _init_value, _init_extra_value, _init_name, _init_extra_name, _init_label, _init_extra_label, _init_disabled, _init_extra_disabled, _init_radioTargets, _init_extra_radioTargets, _init_changeEvent, _init_extra_changeEvent;\nfunction _applyDecs(e, t, n, r, o, i) { var a, c, u, s, f, l, p, d = Symbol.metadata || Symbol.for(\"Symbol.metadata\"), m = Object.defineProperty, h = Object.create, y = [h(null), h(null)], v = t.length; function g(t, n, r) { return function (o, i) { n && (i = o, o = e); for (var a = 0; a < t.length; a++) i = t[a].apply(o, r ? [i] : []); return r ? i : o; }; } function b(e, t, n, r) { if (\"function\" != typeof e && (r || void 0 !== e)) throw new TypeError(t + \" must \" + (n || \"be\") + \" a function\" + (r ? \"\" : \" or undefined\")); return e; } function applyDec(e, t, n, r, o, i, u, s, f, l, p) { function d(e) { if (!p(e)) throw new TypeError(\"Attempted to access private element on non-instance\"); } var h = [].concat(t[0]), v = t[3], w = !u, D = 1 === o, S = 3 === o, j = 4 === o, E = 2 === o; function I(t, n, r) { return function (o, i) { return n && (i = o, o = e), r && r(o), P[t].call(o, i); }; } if (!w) { var P = {}, k = [], F = S ? \"get\" : j || D ? \"set\" : \"value\"; if (f ? (l || D ? P = { get: _setFunctionName(function () { return v(this); }, r, \"get\"), set: function (e) { t[4](this, e); } } : P[F] = v, l || _setFunctionName(P[F], r, E ? \"\" : F)) : l || (P = Object.getOwnPropertyDescriptor(e, r)), !l && !f) { if ((c = y[+s][r]) && 7 !== (c ^ o)) throw Error(\"Decorating two elements with the same name (\" + P[F].name + \") is not supported yet\"); y[+s][r] = o < 3 ? 1 : o; } } for (var N = e, O = h.length - 1; O >= 0; O -= n ? 2 : 1) { var T = b(h[O], \"A decorator\", \"be\", !0), z = n ? h[O - 1] : void 0, A = {}, H = { kind: [\"field\", \"accessor\", \"method\", \"getter\", \"setter\", \"class\"][o], name: r, metadata: a, addInitializer: function (e, t) { if (e.v) throw new TypeError(\"attempted to call addInitializer after decoration was finished\"); b(t, \"An initializer\", \"be\", !0), i.push(t); }.bind(null, A) }; if (w) c = T.call(z, N, H), A.v = 1, b(c, \"class decorators\", \"return\") && (N = c);else if (H.static = s, H.private = f, c = H.access = { has: f ? p.bind() : function (e) { return r in e; } }, j || (c.get = f ? E ? function (e) { return d(e), P.value; } : I(\"get\", 0, d) : function (e) { return e[r]; }), E || S || (c.set = f ? I(\"set\", 0, d) : function (e, t) { e[r] = t; }), N = T.call(z, D ? { get: P.get, set: P.set } : P[F], H), A.v = 1, D) { if (\"object\" == typeof N && N) (c = b(N.get, \"accessor.get\")) && (P.get = c), (c = b(N.set, \"accessor.set\")) && (P.set = c), (c = b(N.init, \"accessor.init\")) && k.unshift(c);else if (void 0 !== N) throw new TypeError(\"accessor decorators must return an object with get, set, or init properties or undefined\"); } else b(N, (l ? \"field\" : \"method\") + \" decorators\", \"return\") && (l ? k.unshift(N) : P[F] = N); } return o < 2 && u.push(g(k, s, 1), g(i, s, 0)), l || w || (f ? D ? u.splice(-1, 0, I(\"get\", s), I(\"set\", s)) : u.push(E ? P[F] : b.call.bind(P[F])) : m(e, r, P)), N; } function w(e) { return m(e, d, { configurable: !0, enumerable: !0, value: a }); } return void 0 !== i && (a = i[d]), a = h(null == a ? null : a), f = [], l = function (e) { e && f.push(g(e)); }, p = function (t, r) { for (var i = 0; i < n.length; i++) { var a = n[i], c = a[1], l = 7 & c; if ((8 & c) == t && !l == r) { var p = a[2], d = !!a[3], m = 16 & c; applyDec(t ? e : e.prototype, a, m, d ? \"#\" + p : _toPropertyKey(p), l, l < 2 ? [] : t ? s = s || [] : u = u || [], f, !!t, d, r, t && d ? function (t) { return _checkInRHS(t) === e; } : o); } } }, p(8, 0), p(0, 0), p(8, 1), p(0, 1), l(u), l(s), c = f, v || w(e), { e: c, get c() { var n = []; return v && [w(e = applyDec(e, [t], r, e.name, 5, n)), g(n, 1)]; } }; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == typeof i ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != typeof i) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nfunction _setFunctionName(e, t, n) { \"symbol\" == typeof t && (t = (t = t.description) ? \"[\" + t + \"]\" : \"\"); try { Object.defineProperty(e, \"name\", { configurable: !0, value: n ? n + \" \" + t : t }); } catch (e) {} return e; }\nfunction _checkInRHS(e) { if (Object(e) !== e) throw TypeError(\"right-hand side of 'in' should be an object, got \" + (null !== e ? typeof e : \"null\")); return e; }\nimport { RadiantElement, bindTo, customElement, event, onEvent, onUpdated, prop, query } from \"@ecopages/radiant\";\nimport { nonEmpty } from \"@/lib/non-empty\";\nlet _RuiRadioGroup;\nclass RuiRadioGroup extends RadiantElement {\n static {\n ({\n e: [_init_value, _init_extra_value, _init_name, _init_extra_name, _init_label, _init_extra_label, _init_disabled, _init_extra_disabled, _init_radioTargets, _init_extra_radioTargets, _init_changeEvent, _init_extra_changeEvent, _initProto],\n c: [_RuiRadioGroup, _initClass]\n } = _applyDecs(this, [customElement(\"rui-radio-group\")], [[prop({\n type: String,\n reflect: true,\n defaultValue: \"\"\n }), 0, \"value\"], [prop({\n type: String,\n defaultValue: \"\"\n }), 0, \"name\"], [[prop({\n type: String,\n defaultValue: \"\"\n }), bindTo({\n selector: \"[data-radio-group-root]\",\n attr: \"aria-label\",\n map: nonEmpty\n })], 0, \"label\"], [[prop({\n type: Boolean,\n reflect: true,\n defaultValue: false\n }), bindTo({\n selector: \"[data-radio-group-root]\",\n attr: \"aria-disabled\",\n map: disabled => disabled ? \"true\" : void 0\n })], 0, \"disabled\"], [query({\n selector: 'input[type=\"radio\"]',\n all: true,\n cache: false\n }), 0, \"radioTargets\"], [event({\n name: \"rui-change\",\n bubbles: true,\n composed: true\n }), 0, \"changeEvent\"], [onUpdated([\"value\", \"name\", \"disabled\"]), 2, \"syncRadios\"], [onEvent({\n selector: 'input[type=\"radio\"]',\n type: \"change\"\n }), 2, \"onRadioChange\"]], 0, void 0, RadiantElement));\n }\n constructor(...args) {\n super(...args);\n _init_extra_changeEvent(this);\n }\n value = (_initProto(this), _init_value(this));\n name = (_init_extra_value(this), _init_name(this));\n label = (_init_extra_name(this), _init_label(this));\n disabled = (_init_extra_label(this), _init_disabled(this));\n radioTargets = (_init_extra_disabled(this), _init_radioTargets(this));\n changeEvent = (_init_extra_radioTargets(this), _init_changeEvent(this));\n onConnected() {\n this.syncRadios();\n }\n syncRadios() {\n const groupName = this.name || this.getAttribute(\"name\") || \"rui-radio-group\";\n for (const radio of this.radioTargets) {\n radio.name = groupName;\n radio.disabled = this.disabled || radio.hasAttribute(\"data-disabled\");\n radio.checked = this.value !== \"\" && radio.value === this.value;\n }\n }\n onRadioChange(event2) {\n const input = event2.target;\n if (!input.checked) return;\n this.value = input.value;\n this.changeEvent.emit({\n value: this.value\n });\n }\n static {\n _initClass();\n }\n}\nexport { _RuiRadioGroup as RuiRadioGroup };", "export function nonEmpty(value) {\n return value || void 0;\n}", "import { jsx, jsxs } from \"@ecopages/jsx/jsx-runtime\";\nimport { cx } from \"@/lib/cx\";\nimport \"./radio-group.script\";\nexport function RuiRadioGroupControl({\n children,\n class: className,\n ...props\n}) {\n return /* @__PURE__ */jsx(\"div\", {\n ...props,\n \"data-radio-group-root\": true,\n class: cx(\"rui-radio-group\", className),\n role: \"radiogroup\",\n \"data-rui-control\": true,\n \"data-rui-control-type\": \"text\",\n children\n });\n}\nexport function RuiRadio({\n children,\n value,\n name,\n disabled,\n class: className,\n ...props\n}) {\n return /* @__PURE__ */jsxs(\"label\", {\n ...props,\n class: cx(\"rui-radio\", className),\n children: [/* @__PURE__ */jsx(\"input\", {\n type: \"radio\",\n class: \"rui-radio__input\",\n value,\n name,\n disabled,\n \"data-disabled\": disabled ? \"\" : void 0\n }), /* @__PURE__ */jsx(\"span\", {\n class: \"rui-radio__control\",\n \"aria-hidden\": \"true\"\n }), /* @__PURE__ */jsx(\"span\", {\n class: \"rui-radio__label\",\n children\n })]\n });\n}\nexport function RuiRadioGroup({\n options,\n children,\n ...props\n}) {\n return /* @__PURE__ */jsx(
|
|
5
|
-
"mappings": "AAMA,OAAS,kBAAAA,GAAgB,UAAAC,GAAQ,iBAAAC,GAAe,SAAAC,GAAO,WAAAC,GAAS,aAAAC,GAAW,QAAAC,EAAM,SAAAC,OAAa,oBCNvF,SAASC,GAASC,EAAO,CAC9B,OAAOA,GAAS,MAClB,CDFA,IAAIC,GAAYC,GAAYC,GAAaC,GAAmBC,GAAYC,GAAkBC,GAAaC,GAAmBC,GAAgBC,GAAsBC,GAAoBC,GAA0BC,GAAmBC,GACjO,SAASC,GAAW,EAAG,EAAGC,EAAGC,EAAGC,EAAGC,EAAG,CAAE,IAAIC,EAAGC,EAAGC,EAAGC,EAAGC,EAAGC,EAAGC,EAAGC,EAAI,OAAO,UAAY,OAAO,IAAI,iBAAiB,EAAGC,EAAI,OAAO,eAAgBC,EAAI,OAAO,OAAQC,EAAI,CAACD,EAAE,IAAI,EAAGA,EAAE,IAAI,CAAC,EAAGE,EAAI,EAAE,OAAQ,SAASC,EAAEC,EAAGjB,EAAGC,EAAG,CAAE,OAAO,SAAUC,EAAGC,EAAG,CAAEH,IAAMG,EAAID,EAAGA,EAAI,GAAI,QAASE,EAAI,EAAGA,EAAIa,EAAE,OAAQb,IAAKD,EAAIc,EAAEb,CAAC,EAAE,MAAMF,EAAGD,EAAI,CAACE,CAAC,EAAI,CAAC,CAAC,EAAG,OAAOF,EAAIE,EAAID,CAAG,CAAG,CAAE,SAASgB,EAAEC,EAAGF,EAAGjB,EAAGC,EAAG,CAAE,GAAkB,OAAOkB,GAArB,aAA2BlB,GAAgBkB,IAAX,QAAe,MAAM,IAAI,UAAUF,EAAI,UAAYjB,GAAK,MAAQ,eAAiBC,EAAI,GAAK,gBAAgB,EAAG,OAAOkB,CAAG,CAAE,SAASC,EAASD,EAAGF,EAAGjB,EAAGC,EAAGC,EAAGC,EAAGG,EAAGC,EAAGC,EAAGC,EAAGC,EAAG,CAAE,SAASC,EAAEQ,EAAG,CAAE,GAAI,CAACT,EAAES,CAAC,EAAG,MAAM,IAAI,UAAU,qDAAqD,CAAG,CAAE,IAAIN,EAAI,CAAC,EAAE,OAAOI,EAAE,CAAC,CAAC,EAAGF,EAAIE,EAAE,CAAC,EAAGI,EAAI,CAACf,EAAGgB,EAAUpB,IAAN,EAASqB,
|
|
6
|
-
"names": ["RadiantElement", "bindTo", "customElement", "event", "onEvent", "onUpdated", "prop", "query", "nonEmpty", "value", "_initProto", "_initClass", "_init_value", "_init_extra_value", "_init_name", "_init_extra_name", "_init_label", "_init_extra_label", "_init_disabled", "_init_extra_disabled", "_init_radioTargets", "_init_extra_radioTargets", "_init_changeEvent", "_init_extra_changeEvent", "_applyDecs", "n", "r", "o", "i", "a", "c", "u", "s", "f", "l", "p", "d", "m", "h", "y", "v", "g", "t", "b", "e", "applyDec", "w", "D", "S", "j", "E", "I", "P", "k", "F", "_setFunctionName", "N", "O", "T", "z", "A", "H", "_toPropertyKey", "_checkInRHS", "_toPrimitive", "_RuiRadioGroup", "RuiRadioGroup", "RadiantElement", "customElement", "prop", "bindTo", "nonEmpty", "disabled", "query", "event", "onUpdated", "onEvent", "args", "groupName", "radio", "event2", "input", "jsx", "jsxs", "cx", "parts", "RuiRadioGroupControl", "children", "className", "props", "jsx", "cx", "RuiRadio", "value", "name", "disabled", "jsxs", "RuiRadioGroup", "options", "option"]
|
|
4
|
+
"sourcesContent": ["let _initProto, _initClass, _init_value, _init_extra_value, _init_name, _init_extra_name, _init_label, _init_extra_label, _init_disabled, _init_extra_disabled, _init_radioTargets, _init_extra_radioTargets, _init_changeEvent, _init_extra_changeEvent;\nfunction _applyDecs(e, t, n, r, o, i) { var a, c, u, s, f, l, p, d = Symbol.metadata || Symbol.for(\"Symbol.metadata\"), m = Object.defineProperty, h = Object.create, y = [h(null), h(null)], v = t.length; function g(t, n, r) { return function (o, i) { n && (i = o, o = e); for (var a = 0; a < t.length; a++) i = t[a].apply(o, r ? [i] : []); return r ? i : o; }; } function b(e, t, n, r) { if (\"function\" != typeof e && (r || void 0 !== e)) throw new TypeError(t + \" must \" + (n || \"be\") + \" a function\" + (r ? \"\" : \" or undefined\")); return e; } function applyDec(e, t, n, r, o, i, u, s, f, l, p) { function d(e) { if (!p(e)) throw new TypeError(\"Attempted to access private element on non-instance\"); } var h = [].concat(t[0]), v = t[3], w = !u, D = 1 === o, S = 3 === o, j = 4 === o, E = 2 === o; function I(t, n, r) { return function (o, i) { return n && (i = o, o = e), r && r(o), P[t].call(o, i); }; } if (!w) { var P = {}, k = [], F = S ? \"get\" : j || D ? \"set\" : \"value\"; if (f ? (l || D ? P = { get: _setFunctionName(function () { return v(this); }, r, \"get\"), set: function (e) { t[4](this, e); } } : P[F] = v, l || _setFunctionName(P[F], r, E ? \"\" : F)) : l || (P = Object.getOwnPropertyDescriptor(e, r)), !l && !f) { if ((c = y[+s][r]) && 7 !== (c ^ o)) throw Error(\"Decorating two elements with the same name (\" + P[F].name + \") is not supported yet\"); y[+s][r] = o < 3 ? 1 : o; } } for (var N = e, O = h.length - 1; O >= 0; O -= n ? 2 : 1) { var T = b(h[O], \"A decorator\", \"be\", !0), z = n ? h[O - 1] : void 0, A = {}, H = { kind: [\"field\", \"accessor\", \"method\", \"getter\", \"setter\", \"class\"][o], name: r, metadata: a, addInitializer: function (e, t) { if (e.v) throw new TypeError(\"attempted to call addInitializer after decoration was finished\"); b(t, \"An initializer\", \"be\", !0), i.push(t); }.bind(null, A) }; if (w) c = T.call(z, N, H), A.v = 1, b(c, \"class decorators\", \"return\") && (N = c);else if (H.static = s, H.private = f, c = H.access = { has: f ? p.bind() : function (e) { return r in e; } }, j || (c.get = f ? E ? function (e) { return d(e), P.value; } : I(\"get\", 0, d) : function (e) { return e[r]; }), E || S || (c.set = f ? I(\"set\", 0, d) : function (e, t) { e[r] = t; }), N = T.call(z, D ? { get: P.get, set: P.set } : P[F], H), A.v = 1, D) { if (\"object\" == typeof N && N) (c = b(N.get, \"accessor.get\")) && (P.get = c), (c = b(N.set, \"accessor.set\")) && (P.set = c), (c = b(N.init, \"accessor.init\")) && k.unshift(c);else if (void 0 !== N) throw new TypeError(\"accessor decorators must return an object with get, set, or init properties or undefined\"); } else b(N, (l ? \"field\" : \"method\") + \" decorators\", \"return\") && (l ? k.unshift(N) : P[F] = N); } return o < 2 && u.push(g(k, s, 1), g(i, s, 0)), l || w || (f ? D ? u.splice(-1, 0, I(\"get\", s), I(\"set\", s)) : u.push(E ? P[F] : b.call.bind(P[F])) : m(e, r, P)), N; } function w(e) { return m(e, d, { configurable: !0, enumerable: !0, value: a }); } return void 0 !== i && (a = i[d]), a = h(null == a ? null : a), f = [], l = function (e) { e && f.push(g(e)); }, p = function (t, r) { for (var i = 0; i < n.length; i++) { var a = n[i], c = a[1], l = 7 & c; if ((8 & c) == t && !l == r) { var p = a[2], d = !!a[3], m = 16 & c; applyDec(t ? e : e.prototype, a, m, d ? \"#\" + p : _toPropertyKey(p), l, l < 2 ? [] : t ? s = s || [] : u = u || [], f, !!t, d, r, t && d ? function (t) { return _checkInRHS(t) === e; } : o); } } }, p(8, 0), p(0, 0), p(8, 1), p(0, 1), l(u), l(s), c = f, v || w(e), { e: c, get c() { var n = []; return v && [w(e = applyDec(e, [t], r, e.name, 5, n)), g(n, 1)]; } }; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == typeof i ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != typeof i) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nfunction _setFunctionName(e, t, n) { \"symbol\" == typeof t && (t = (t = t.description) ? \"[\" + t + \"]\" : \"\"); try { Object.defineProperty(e, \"name\", { configurable: !0, value: n ? n + \" \" + t : t }); } catch (e) {} return e; }\nfunction _checkInRHS(e) { if (Object(e) !== e) throw TypeError(\"right-hand side of 'in' should be an object, got \" + (null !== e ? typeof e : \"null\")); return e; }\nimport { RadiantElement, bindTo, customElement, event, onEvent, onUpdated, prop, query } from \"@ecopages/radiant\";\nimport { nonEmpty } from \"@/lib/non-empty\";\nlet _RuiRadioGroup;\nclass RuiRadioGroup extends RadiantElement {\n static {\n ({\n e: [_init_value, _init_extra_value, _init_name, _init_extra_name, _init_label, _init_extra_label, _init_disabled, _init_extra_disabled, _init_radioTargets, _init_extra_radioTargets, _init_changeEvent, _init_extra_changeEvent, _initProto],\n c: [_RuiRadioGroup, _initClass]\n } = _applyDecs(this, [customElement(\"rui-radio-group\")], [[prop({\n type: String,\n reflect: true,\n defaultValue: \"\"\n }), 0, \"value\"], [prop({\n type: String,\n defaultValue: \"\"\n }), 0, \"name\"], [[prop({\n type: String,\n defaultValue: \"\"\n }), bindTo({\n selector: \"[data-radio-group-root]\",\n attr: \"aria-label\",\n map: nonEmpty\n })], 0, \"label\"], [[prop({\n type: Boolean,\n reflect: true,\n defaultValue: false\n }), bindTo({\n selector: \"[data-radio-group-root]\",\n attr: \"aria-disabled\",\n map: disabled => disabled ? \"true\" : void 0\n })], 0, \"disabled\"], [query({\n selector: 'input[type=\"radio\"]',\n all: true,\n cache: false\n }), 0, \"radioTargets\"], [event({\n name: \"rui-change\",\n bubbles: true,\n composed: true\n }), 0, \"changeEvent\"], [onUpdated([\"value\", \"name\", \"disabled\"]), 2, \"syncRadios\"], [onEvent({\n selector: 'input[type=\"radio\"]',\n type: \"change\"\n }), 2, \"onRadioChange\"]], 0, void 0, RadiantElement));\n }\n constructor(...args) {\n super(...args);\n _init_extra_changeEvent(this);\n }\n value = (_initProto(this), _init_value(this));\n name = (_init_extra_value(this), _init_name(this));\n label = (_init_extra_name(this), _init_label(this));\n disabled = (_init_extra_label(this), _init_disabled(this));\n radioTargets = (_init_extra_disabled(this), _init_radioTargets(this));\n changeEvent = (_init_extra_radioTargets(this), _init_changeEvent(this));\n onConnected() {\n this.syncRadios();\n }\n syncRadios() {\n const groupName = this.name || this.getAttribute(\"name\") || \"rui-radio-group\";\n for (const radio of this.radioTargets) {\n radio.name = groupName;\n radio.disabled = this.disabled || radio.hasAttribute(\"data-disabled\");\n radio.checked = this.value !== \"\" && radio.value === this.value;\n }\n }\n onRadioChange(event2) {\n const input = event2.target;\n if (!input.checked) return;\n this.value = input.value;\n this.changeEvent.emit({\n value: this.value\n });\n }\n static {\n _initClass();\n }\n}\nexport { _RuiRadioGroup as RuiRadioGroup };", "export function nonEmpty(value) {\n return value || void 0;\n}", "import { jsx, jsxs } from \"@ecopages/jsx/jsx-runtime\";\nimport { cx } from \"@/lib/cx\";\nimport { RuiRadioGroup as RuiRadioGroupElement } from \"./radio-group.script\";\nexport function RuiRadioGroupControl({\n children,\n class: className,\n ...props\n}) {\n return /* @__PURE__ */jsx(\"div\", {\n ...props,\n \"data-radio-group-root\": true,\n class: cx(\"rui-radio-group\", className),\n role: \"radiogroup\",\n \"data-rui-control\": true,\n \"data-rui-control-type\": \"text\",\n children\n });\n}\nexport function RuiRadio({\n children,\n value,\n name,\n disabled,\n class: className,\n ...props\n}) {\n return /* @__PURE__ */jsxs(\"label\", {\n ...props,\n class: cx(\"rui-radio\", className),\n children: [/* @__PURE__ */jsx(\"input\", {\n type: \"radio\",\n class: \"rui-radio__input\",\n value,\n name,\n disabled,\n \"data-disabled\": disabled ? \"\" : void 0\n }), /* @__PURE__ */jsx(\"span\", {\n class: \"rui-radio__control\",\n \"aria-hidden\": \"true\"\n }), /* @__PURE__ */jsx(\"span\", {\n class: \"rui-radio__label\",\n children\n })]\n });\n}\nexport function RuiRadioGroup({\n options,\n children,\n ...props\n}) {\n return /* @__PURE__ */jsx(RuiRadioGroupElement, {\n ...props,\n children: options == null ? children : /* @__PURE__ */jsx(RuiRadioGroupControl, {\n children: options.map(option => /* @__PURE__ */jsx(RuiRadio, {\n value: option.value,\n disabled: option.disabled,\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KAAMC,EAAO,CAC3B,OAAOA,EAAM,OAAO,OAAO,EAAE,KAAK,GAAG,CACvC,CDCO,SAASC,GAAqB,CACnC,SAAAC,EACA,MAAOC,EACP,GAAGC,CACL,EAAG,CACD,OAAsBC,EAAI,MAAO,CAC/B,GAAGD,EACH,wBAAyB,GACzB,MAAOE,EAAG,kBAAmBH,CAAS,EACtC,KAAM,aACN,mBAAoB,GACpB,wBAAyB,OACzB,SAAAD,CACF,CAAC,CACH,CACO,SAASK,GAAS,CACvB,SAAAL,EACA,MAAAM,EACA,KAAAC,EACA,SAAAC,EACA,MAAOP,EACP,GAAGC,CACL,EAAG,CACD,OAAsBO,GAAK,QAAS,CAClC,GAAGP,EACH,MAAOE,EAAG,YAAaH,CAAS,EAChC,SAAU,CAAgBE,EAAI,QAAS,CACrC,KAAM,QACN,MAAO,mBACP,MAAAG,EACA,KAAAC,EACA,SAAAC,EACA,gBAAiBA,EAAW,GAAK,MACnC,CAAC,EAAkBL,EAAI,OAAQ,CAC7B,MAAO,qBACP,cAAe,MACjB,CAAC,EAAkBA,EAAI,OAAQ,CAC7B,MAAO,mBACP,SAAAH,CACF,CAAC,CAAC,CACJ,CAAC,CACH,CACO,SAASU,GAAc,CAC5B,QAAAC,EACA,SAAAX,EACA,GAAGE,CACL,EAAG,CACD,OAAsBC,EAAIS,EAAsB,CAC9C,GAAGV,EACH,SAAUS,GAAW,KAAOX,EAA0BG,EAAIJ,GAAsB,CAC9E,SAAUY,EAAQ,IAAIE,GAAyBV,EAAIE,GAAU,CAC3D,MAAOQ,EAAO,MACd,SAAUA,EAAO,SACjB,SAAUA,EAAO,KACnB,CAAC,CAAC,CACJ,CAAC,CACH,CAAC,CACH",
|
|
6
|
+
"names": ["RadiantElement", "bindTo", "customElement", "event", "onEvent", "onUpdated", "prop", "query", "nonEmpty", "value", "_initProto", "_initClass", "_init_value", "_init_extra_value", "_init_name", "_init_extra_name", "_init_label", "_init_extra_label", "_init_disabled", "_init_extra_disabled", "_init_radioTargets", "_init_extra_radioTargets", "_init_changeEvent", "_init_extra_changeEvent", "_applyDecs", "n", "r", "o", "i", "a", "c", "u", "s", "f", "l", "p", "d", "m", "h", "y", "v", "g", "t", "b", "e", "applyDec", "w", "D", "S", "j", "E", "I", "P", "k", "F", "_setFunctionName", "N", "O", "T", "z", "A", "H", "_toPropertyKey", "_checkInRHS", "_toPrimitive", "_RuiRadioGroup", "RuiRadioGroup", "RadiantElement", "customElement", "prop", "bindTo", "nonEmpty", "disabled", "query", "event", "onUpdated", "onEvent", "args", "groupName", "radio", "event2", "input", "jsx", "jsxs", "cx", "parts", "RuiRadioGroupControl", "children", "className", "props", "jsx", "cx", "RuiRadio", "value", "name", "disabled", "jsxs", "RuiRadioGroup", "options", "_RuiRadioGroup", "option"]
|
|
7
7
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { JsxCustomElementAttributes, JsxElementProps, JsxRenderable } from '@ecopages/jsx';
|
|
2
|
-
import
|
|
3
|
-
import './radio-group.script';
|
|
2
|
+
import { RuiRadioGroup as RuiRadioGroupElement, type RuiRadioGroupProps } from './radio-group.script';
|
|
4
3
|
export type RuiRadioOption = {
|
|
5
4
|
value: string;
|
|
6
5
|
label: JsxRenderable;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { JSX_PROPS } from '@ecopages/jsx';
|
|
1
2
|
import { RadiantElement } from '@ecopages/radiant';
|
|
2
3
|
import type { EventEmitter } from '@ecopages/radiant/tools/event-emitter';
|
|
3
4
|
export type RuiRadioGroupProps = {
|
|
@@ -64,6 +65,7 @@ export type RuiRadioGroupChangeDetail = {
|
|
|
64
65
|
* BEM classes are presentation-only; see view `@cssclass`.
|
|
65
66
|
*/
|
|
66
67
|
export declare class RuiRadioGroup extends RadiantElement {
|
|
68
|
+
readonly [JSX_PROPS]?: RuiRadioGroupProps;
|
|
67
69
|
value: string;
|
|
68
70
|
name: string;
|
|
69
71
|
label: string;
|
|
@@ -74,3 +76,8 @@ export declare class RuiRadioGroup extends RadiantElement {
|
|
|
74
76
|
syncRadios(): void;
|
|
75
77
|
onRadioChange(event: Event): void;
|
|
76
78
|
}
|
|
79
|
+
declare global {
|
|
80
|
+
interface HTMLElementTagNameMap {
|
|
81
|
+
'rui-radio-group': RuiRadioGroup;
|
|
82
|
+
}
|
|
83
|
+
}
|