@theroutingcompany/components 0.0.71-alpha.2 → 0.0.71-alpha.3

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.
@@ -1502,7 +1502,6 @@ Valid keys: `+JSON.stringify(Object.keys(R),null," "));var ee=de(q,re,Y,ie,le+"
1502
1502
  --input-border-color: ${f.color_deprecated_outline_danger_enabled};
1503
1503
  }
1504
1504
 
1505
- /* &:active too? */
1506
1505
  &:focus-visible {
1507
1506
  --input-border-color: ${f.color_black};
1508
1507
  background-color: ${f.color_deprecated_overlay_secondary_enabled};
@@ -2352,8 +2351,19 @@ Valid keys: `+JSON.stringify(Object.keys(R),null," "));var ee=de(q,re,Y,ie,le+"
2352
2351
  align-items: center;
2353
2352
  border-radius: 4px;
2354
2353
 
2355
- border: 1px solid ${f.color_black};
2354
+ border: 1px solid
2355
+ var(
2356
+ --input-border-color,
2357
+ ${f.color_deprecated_outline_secondary_enabled}
2358
+ );
2356
2359
  background-color: ${f.color_deprecated_fill_inverse_enabled};
2360
+ border-radius: ${f.border_radius_400};
2361
+
2362
+ &:focus-visible {
2363
+ --input-border-color: ${f.color_black};
2364
+ background-color: ${f.color_deprecated_overlay_secondary_enabled};
2365
+ outline: 1px solid ${f.color_black};
2366
+ }
2357
2367
 
2358
2368
  width: 100%;
2359
2369
  `;function gN({granularity:e="minute",height:t=bl.small,paddingSize:r=Jy.small,...n}){var p;const{locale:o}=Be(),a=new Date,i=Xy({hourCycle:12,granularity:e,defaultValue:n.defaultValue??new zo(a.getFullYear(),a.getMonth()+1,a.getDate(),a.getHours(),a.getMinutes(),a.getSeconds()),...n,locale:o,createCalendar:ud}),l=c.useRef(null),{labelProps:s,fieldProps:d}=Gy(n,i,l),u=w(nD,{...d,ref:l,id:d.id,height:t,paddingSize:r,children:(p=i.segments)==null?void 0:p.filter(m=>!(m.type==="literal"&&m.text===" ")).map((m,h)=>w(e$,{segment:m,state:i},h))});return J(Wd,{children:[w("span",{...s,children:n.label}),u]})}const vN=M.default(Sr)`
@@ -2797,7 +2807,7 @@ ${({lineHeight:e,fontSize:t})=>Qy({lineHeight:e,fontSize:t})}
2797
2807
  `,iV=M.default.span`
2798
2808
  display: inline-flex;
2799
2809
  align-items: center;
2800
- `;function lV(e){const t=tV(e),{placeholder:r="Select...",hideLabel:n,showCaret:o=!0}=e,a=E.useRef(null),{labelProps:i,triggerProps:l,valueProps:s,menuProps:d,errorMessageProps:u}=JK(e,t,a),{buttonProps:p}=Kn(l,a),{focusProps:m,isFocusVisible:h}=Zr();return console.log("state: ",t),J(nn,{children:[e.label?J(We,{...i,srOnly:n,mb:f.spacing_100,children:[e.label,e.tooltipContent?w(Er,{icon:e.tooltipIcon,children:e.tooltipContent}):null]}):null,w(eV,{state:t,triggerRef:a,label:e.label,name:e.name}),J(aV,{...me(p,m),paddingSize:"small",ref:a,isOpen:t.isOpen,isFocusVisible:h,children:[w(iV,{...s,children:t.selectedItem?w(nV,{children:t.selectedItem.rendered}):w(oV,{children:r})}),o?w(rV,{children:w(ve.ArrowDropDown,{})}):null]}),e.errorMessage?J(Dr,{...u,children:[w(ve.Error,{}),e.errorMessage]}):null,t.isOpen?w(gu,{state:t,triggerRef:a,children:w(Mx,{...d,state:t})}):null]})}const bS="Switch",[sV,ej]=Ne(bS),[cV,dV]=sV(bS),uV=c.forwardRef((e,t)=>{const{__scopeSwitch:r,name:n,checked:o,defaultChecked:a,required:i,disabled:l,value:s="on",onCheckedChange:d,...u}=e,[p,m]=c.useState(null),h=he(t,y=>m(y)),b=c.useRef(!1),g=p?!!p.closest("form"):!0,[v=!1,$]=ze({prop:o,defaultProp:a,onChange:d});return c.createElement(cV,{scope:r,checked:v,disabled:l},c.createElement(ce.button,C({type:"button",role:"switch","aria-checked":v,"aria-required":i,"data-state":gS(v),"data-disabled":l?"":void 0,disabled:l,value:s},u,{ref:h,onClick:Q(e.onClick,y=>{$(x=>!x),g&&(b.current=y.isPropagationStopped(),b.current||y.stopPropagation())})})),g&&c.createElement(mV,{control:p,bubbles:!b.current,name:n,value:s,checked:v,required:i,disabled:l,style:{transform:"translateX(-100%)"}}))}),fV="SwitchThumb",pV=c.forwardRef((e,t)=>{const{__scopeSwitch:r,...n}=e,o=dV(fV,r);return c.createElement(ce.span,C({"data-state":gS(o.checked),"data-disabled":o.disabled?"":void 0},n,{ref:t}))}),mV=e=>{const{control:t,checked:r,bubbles:n=!0,...o}=e,a=c.useRef(null),i=sl(r),l=Ti(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:"checkbox","aria-hidden":!0,defaultChecked:r},o,{tabIndex:-1,ref:a,style:{...e.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function gS(e){return e?"checked":"unchecked"}const hV=uV,bV=pV,gV=M.default(hV)`
2810
+ `;function lV(e){const t=tV(e),{placeholder:r="Select...",hideLabel:n,showCaret:o=!0}=e,a=E.useRef(null),{labelProps:i,triggerProps:l,valueProps:s,menuProps:d,errorMessageProps:u}=JK(e,t,a),{buttonProps:p}=Kn(l,a),{focusProps:m,isFocusVisible:h}=Zr();return J(nn,{children:[e.label?J(We,{...i,srOnly:n,mb:f.spacing_100,children:[e.label,e.tooltipContent?w(Er,{icon:e.tooltipIcon,children:e.tooltipContent}):null]}):null,w(eV,{state:t,triggerRef:a,label:e.label,name:e.name}),J(aV,{...me(p,m),paddingSize:"small",ref:a,isOpen:t.isOpen,isFocusVisible:h,children:[w(iV,{...s,children:t.selectedItem?w(nV,{children:t.selectedItem.rendered}):w(oV,{children:r})}),o?w(rV,{children:w(ve.ArrowDropDown,{})}):null]}),e.errorMessage?J(Dr,{...u,children:[w(ve.Error,{}),e.errorMessage]}):null,t.isOpen?w(gu,{state:t,triggerRef:a,children:w(Mx,{...d,state:t})}):null]})}const bS="Switch",[sV,ej]=Ne(bS),[cV,dV]=sV(bS),uV=c.forwardRef((e,t)=>{const{__scopeSwitch:r,name:n,checked:o,defaultChecked:a,required:i,disabled:l,value:s="on",onCheckedChange:d,...u}=e,[p,m]=c.useState(null),h=he(t,y=>m(y)),b=c.useRef(!1),g=p?!!p.closest("form"):!0,[v=!1,$]=ze({prop:o,defaultProp:a,onChange:d});return c.createElement(cV,{scope:r,checked:v,disabled:l},c.createElement(ce.button,C({type:"button",role:"switch","aria-checked":v,"aria-required":i,"data-state":gS(v),"data-disabled":l?"":void 0,disabled:l,value:s},u,{ref:h,onClick:Q(e.onClick,y=>{$(x=>!x),g&&(b.current=y.isPropagationStopped(),b.current||y.stopPropagation())})})),g&&c.createElement(mV,{control:p,bubbles:!b.current,name:n,value:s,checked:v,required:i,disabled:l,style:{transform:"translateX(-100%)"}}))}),fV="SwitchThumb",pV=c.forwardRef((e,t)=>{const{__scopeSwitch:r,...n}=e,o=dV(fV,r);return c.createElement(ce.span,C({"data-state":gS(o.checked),"data-disabled":o.disabled?"":void 0},n,{ref:t}))}),mV=e=>{const{control:t,checked:r,bubbles:n=!0,...o}=e,a=c.useRef(null),i=sl(r),l=Ti(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:"checkbox","aria-hidden":!0,defaultChecked:r},o,{tabIndex:-1,ref:a,style:{...e.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function gS(e){return e?"checked":"unchecked"}const hV=uV,bV=pV,gV=M.default(hV)`
2801
2811
  all: unset;
2802
2812
  width: 40px;
2803
2813
  height: 24px;