@theroutingcompany/components 0.0.68-alpha.0 → 0.0.69-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2512,7 +2512,7 @@ Valid keys: `+JSON.stringify(Object.keys(R),null," "));var ee=ce(q,re,Y,ie,le+"
|
|
|
2512
2512
|
border-radius: ${f.border_radius_800};
|
|
2513
2513
|
border: 1px solid ${f.color_gray_opacity_12};
|
|
2514
2514
|
${({size:e})=>oD(e)}
|
|
2515
|
-
`,ON=S.default.forwardRef(function(t,r){const{"data-id":n,size:o="medium",children:a}=t;return w(aD,{ref:r,"data-id":n,size:o,children:a})}),iD="Radio",[MN,lD]=Ne(iD),[FN,NN]=MN(iD),LN=c.forwardRef((e,t)=>{const{__scopeRadio:r,name:n,checked:o=!1,required:a,disabled:i,value:l="on",onCheck:s,...d}=e,[u,p]=c.useState(null),m=he(t,g=>p(g)),h=c.useRef(!1),b=u?!!u.closest("form"):!0;return c.createElement(FN,{scope:r,checked:o,disabled:i},c.createElement(se.button,C({type:"button",role:"radio","aria-checked":o,"data-state":sD(o),"data-disabled":i?"":void 0,disabled:i,value:l},d,{ref:m,onClick:Q(e.onClick,g=>{o||s==null||s(),b&&(h.current=g.isPropagationStopped(),h.current||g.stopPropagation())})})),b&&c.createElement(KN,{control:u,bubbles:!h.current,name:n,value:l,checked:o,required:a,disabled:i,style:{transform:"translateX(-100%)"}}))}),zN="RadioIndicator",RN=c.forwardRef((e,t)=>{const{__scopeRadio:r,forceMount:n,...o}=e,a=NN(zN,r);return c.createElement(Re,{present:n||a.checked},c.createElement(se.span,C({"data-state":sD(a.checked),"data-disabled":a.disabled?"":void 0},o,{ref:t})))}),KN=e=>{const{control:t,checked:r,bubbles:n=!0,...o}=e,a=c.useRef(null),i=sl(r),l=ki(t);return c.useEffect(()=>{const s=a.current,d=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(d,"checked").set;if(i!==r&&p){const m=new Event("click",{bubbles:n});p.call(s,r),s.dispatchEvent(m)}},[i,r,n]),c.createElement("input",C({type:"radio","aria-hidden":!0,defaultChecked:r},o,{tabIndex:-1,ref:a,style:{...e.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function sD(e){return e?"checked":"unchecked"}const VN=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],cD="RadioGroup",[BN,KB]=Ne(cD,[wr,lD]),dD=wr(),uD=lD(),[jN,UN]=BN(cD),WN=c.forwardRef((e,t)=>{const{__scopeRadioGroup:r,name:n,defaultValue:o,value:a,required:i=!1,disabled:l=!1,orientation:s,dir:d,loop:u=!0,onValueChange:p,...m}=e,h=dD(r),b=Or(d),[g,y]=Le({prop:a,defaultProp:o,onChange:p});return c.createElement(jN,{scope:r,name:n,required:i,disabled:l,value:g,onValueChange:y},c.createElement(el,C({asChild:!0},h,{orientation:s,dir:b,loop:u}),c.createElement(se.div,C({role:"radiogroup","aria-required":i,"aria-orientation":s,"data-disabled":l?"":void 0,dir:b},m,{ref:t}))))}),HN="RadioGroupItem",GN=c.forwardRef((e,t)=>{const{__scopeRadioGroup:r,disabled:n,...o}=e,a=UN(HN,r),i=a.disabled||n,l=dD(r),s=uD(r),d=c.useRef(null),u=he(t,d),p=a.value===o.value,m=c.useRef(!1);return c.useEffect(()=>{const h=g=>{VN.includes(g.key)&&(m.current=!0)},b=()=>m.current=!1;return document.addEventListener("keydown",h),document.addEventListener("keyup",b),()=>{document.removeEventListener("keydown",h),document.removeEventListener("keyup",b)}},[]),c.createElement(tl,C({asChild:!0},l,{focusable:!i,active:p}),c.createElement(LN,C({disabled:i,required:a.required,checked:p},s,o,{name:a.name,ref:u,onCheck:()=>a.onValueChange(o.value),onKeyDown:Q(h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:Q(o.onFocus,()=>{var h;m.current&&((h=d.current)===null||h===void 0||h.click())})})))}),YN=c.forwardRef((e,t)=>{const{__scopeRadioGroup:r,...n}=e,o=uD(r);return c.createElement(RN,C({},o,n,{ref:t}))}),qN=WN,ZN=GN,XN=YN,fD=N.default(ZN)`
|
|
2515
|
+
`,ON=S.default.forwardRef(function(t,r){const{"data-id":n,size:o="medium",children:a,...i}=t;return w(aD,{ref:r,"data-id":n,size:o,...i,children:a})}),iD="Radio",[MN,lD]=Ne(iD),[FN,NN]=MN(iD),LN=c.forwardRef((e,t)=>{const{__scopeRadio:r,name:n,checked:o=!1,required:a,disabled:i,value:l="on",onCheck:s,...d}=e,[u,p]=c.useState(null),m=he(t,g=>p(g)),h=c.useRef(!1),b=u?!!u.closest("form"):!0;return c.createElement(FN,{scope:r,checked:o,disabled:i},c.createElement(se.button,C({type:"button",role:"radio","aria-checked":o,"data-state":sD(o),"data-disabled":i?"":void 0,disabled:i,value:l},d,{ref:m,onClick:Q(e.onClick,g=>{o||s==null||s(),b&&(h.current=g.isPropagationStopped(),h.current||g.stopPropagation())})})),b&&c.createElement(KN,{control:u,bubbles:!h.current,name:n,value:l,checked:o,required:a,disabled:i,style:{transform:"translateX(-100%)"}}))}),zN="RadioIndicator",RN=c.forwardRef((e,t)=>{const{__scopeRadio:r,forceMount:n,...o}=e,a=NN(zN,r);return c.createElement(Re,{present:n||a.checked},c.createElement(se.span,C({"data-state":sD(a.checked),"data-disabled":a.disabled?"":void 0},o,{ref:t})))}),KN=e=>{const{control:t,checked:r,bubbles:n=!0,...o}=e,a=c.useRef(null),i=sl(r),l=ki(t);return c.useEffect(()=>{const s=a.current,d=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(d,"checked").set;if(i!==r&&p){const m=new Event("click",{bubbles:n});p.call(s,r),s.dispatchEvent(m)}},[i,r,n]),c.createElement("input",C({type:"radio","aria-hidden":!0,defaultChecked:r},o,{tabIndex:-1,ref:a,style:{...e.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function sD(e){return e?"checked":"unchecked"}const VN=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],cD="RadioGroup",[BN,KB]=Ne(cD,[wr,lD]),dD=wr(),uD=lD(),[jN,UN]=BN(cD),WN=c.forwardRef((e,t)=>{const{__scopeRadioGroup:r,name:n,defaultValue:o,value:a,required:i=!1,disabled:l=!1,orientation:s,dir:d,loop:u=!0,onValueChange:p,...m}=e,h=dD(r),b=Or(d),[g,y]=Le({prop:a,defaultProp:o,onChange:p});return c.createElement(jN,{scope:r,name:n,required:i,disabled:l,value:g,onValueChange:y},c.createElement(el,C({asChild:!0},h,{orientation:s,dir:b,loop:u}),c.createElement(se.div,C({role:"radiogroup","aria-required":i,"aria-orientation":s,"data-disabled":l?"":void 0,dir:b},m,{ref:t}))))}),HN="RadioGroupItem",GN=c.forwardRef((e,t)=>{const{__scopeRadioGroup:r,disabled:n,...o}=e,a=UN(HN,r),i=a.disabled||n,l=dD(r),s=uD(r),d=c.useRef(null),u=he(t,d),p=a.value===o.value,m=c.useRef(!1);return c.useEffect(()=>{const h=g=>{VN.includes(g.key)&&(m.current=!0)},b=()=>m.current=!1;return document.addEventListener("keydown",h),document.addEventListener("keyup",b),()=>{document.removeEventListener("keydown",h),document.removeEventListener("keyup",b)}},[]),c.createElement(tl,C({asChild:!0},l,{focusable:!i,active:p}),c.createElement(LN,C({disabled:i,required:a.required,checked:p},s,o,{name:a.name,ref:u,onCheck:()=>a.onValueChange(o.value),onKeyDown:Q(h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:Q(o.onFocus,()=>{var h;m.current&&((h=d.current)===null||h===void 0||h.click())})})))}),YN=c.forwardRef((e,t)=>{const{__scopeRadioGroup:r,...n}=e,o=uD(r);return c.createElement(RN,C({},o,n,{ref:t}))}),qN=WN,ZN=GN,XN=YN,fD=N.default(ZN)`
|
|
2516
2516
|
all: unset;
|
|
2517
2517
|
--radio-width: ${f.sizing_600};
|
|
2518
2518
|
--inner-circle-color: ${f.color_white};
|