@theroutingcompany/components 0.0.148-alpha.7 → 0.0.149-alpha.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/dist/trc-components.es.js +36 -21
- package/dist/trc-components.es.js.map +1 -1
- package/dist/trc-components.umd.js +5 -4
- package/dist/trc-components.umd.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/types/components/IconButton/IconButton.d.ts +4 -0
- package/types/components/NavigationMenu/NavigationMenu.d.ts +3 -1
|
@@ -1330,7 +1330,8 @@ Valid keys: `+JSON.stringify(Object.keys(D),null," "));var ie=re(oe,X,U,Y,Q+"."
|
|
|
1330
1330
|
color: ${f.color_deprecated_fill_inverse_hover};
|
|
1331
1331
|
}
|
|
1332
1332
|
|
|
1333
|
-
&[data-state~='pressed']
|
|
1333
|
+
&[data-state~='pressed'],
|
|
1334
|
+
&[data-active='true'] {
|
|
1334
1335
|
background: ${f.color_deprecated_fill_primary_pressed};
|
|
1335
1336
|
}
|
|
1336
1337
|
|
|
@@ -1390,7 +1391,7 @@ Valid keys: `+JSON.stringify(Object.keys(D),null," "));var ie=re(oe,X,U,Y,Q+"."
|
|
|
1390
1391
|
&:disabled {
|
|
1391
1392
|
background: ${f.color_deprecated_fill_inverse_disabled};
|
|
1392
1393
|
}
|
|
1393
|
-
`,MF={primary:BF,secondary:FF,danger:IF,inverse:RF},Zi=y.forwardRef((e,t)=>{const n=Qn(t),{label:r,size:o="small",variant:i="primary",shape:u="circle",disabled:a,onClick:l,autoFocus:s,children:c,style:d={},...
|
|
1394
|
+
`,MF={primary:BF,secondary:FF,danger:IF,inverse:RF},Zi=y.forwardRef((e,t)=>{const n=Qn(t),{label:r,size:o="small",variant:i="primary",shape:u="circle",disabled:a,onClick:l,autoFocus:s,children:c,style:d={},as:p,active:h,...v}=e,g=yn(),$=a??g,{buttonProps:x,isPressed:E}=Br({onPress:l,isDisabled:$,autoFocus:s},n),{isFocusVisible:C,focusProps:_}=Ii({autoFocus:s}),P=d3({isFocusVisible:C,isPressed:E}),S=MF[i],k=ay[u],B=cf[o],F=ke(_,v,x,{"data-state":P,"data-active":h?"true":"false"});return m(S,{ref:n,...F,as:p,style:{"--icon-button-size":B,"--icon-button-border-radius":k,...d},children:m(li,{label:r,children:c})})});Zi.displayName="IconButton";const OF=L.default(Rt)`
|
|
1394
1395
|
font-family: ${f.font_family_pingo} !important;
|
|
1395
1396
|
color: ${f.color_black} !important;
|
|
1396
1397
|
font-weight: ${f.font_weight_100};
|
|
@@ -1543,7 +1544,7 @@ Valid keys: `+JSON.stringify(Object.keys(D),null," "));var ie=re(oe,X,U,Y,Q+"."
|
|
|
1543
1544
|
line-height: ${f.line_height_deprecated_133};
|
|
1544
1545
|
font-family: ${f.font_family_pingo};
|
|
1545
1546
|
max-width: ${f.sizing_1000};
|
|
1546
|
-
z-index:
|
|
1547
|
+
z-index: 2100;
|
|
1547
1548
|
animation-duration: 400ms;
|
|
1548
1549
|
animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
|
|
1549
1550
|
|
|
@@ -2455,7 +2456,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
2455
2456
|
`,Ip=e=>{const{label:t,boldLabel:n=!0,autoFocus:r,className:o,excludeFromTabOrder:i,isClearable:u=!0,isDisabled:a,isSelectableAll:l=!1,isAllSelectedText:s,placeholder:c="Select...",tooltipContent:d,tooltipIcon:p,errorMessage:h,isInvalid:v=!1}=e,g=b.default.useRef(null),$=!u,x=jz({...e,disallowEmptySelection:$}),{labelProps:E,triggerProps:C,valueProps:_,menuProps:P,errorMessageProps:S}=zz({...e,disallowEmptySelection:$},x,g),{buttonProps:k}=Br({...C,autoFocus:r,excludeFromTabOrder:i,isDisabled:a},g),B=x.selectionManager.isSelectAll,[F,A]=b.default.useState(!1),O=()=>x.selectionManager.toggleSelectAll(),H=()=>x.selectionManager.setFocusedKey(null),K=(M,N=!1,W)=>m(Rt,{children:N&&W?m("span",{children:W}):m("span",{children:M.map(G=>G.textValue).join(", ")})});return ee(jt,{className:iE("select-wrapper",{"select-wrapper--opens":x.isOpen},o),children:[t?ee(et,{...E,mb:f.spacing_150,onClick:()=>x.open(),bold:n,children:[t,d?m(ft,{icon:p,children:d}):null]}):null,m(G8,{focusRingClass:"select--focused",autoFocus:r,children:ee(Fp,{...k,ref:g,isOpen:x.isOpen,"data-state":v?"invalid":void 0,disabled:a??!1,children:[m("span",{..._,children:x.selectedItems?K(x.selectedItems,B,s):m(Bp,{children:c})}),m(Wz,{children:m(Il,{style:{width:"18px",height:"18px"},"aria-hidden":"true"})})]})}),h?m(Wt,{...S,children:h}):null,x.isOpen?ee(zr,{state:x,targetRef:g,isTargetWidth:!0,children:[l?ee(Ge,{children:[ee(Fl,{onMouseOver:()=>{A(!0),H()},onMouseOut:()=>A(!1),isFocused:F,tabIndex:F?0:-1,onClick:O,"aria-label":"Select All",children:[m(Lf,{isDisabled:a??!1,isSelected:B,"aria-label":"Select All",onChange:O}),ee(Jf,{children:[m(Et,{as:"span",children:s??"All"}),m(Qf,{children:B?m(Le.Check,{"aria-hidden":"true",style:{width:18,height:18}}):null})]})]}),m(t$,{})]}):null,m(IM,{...P,state:x,isSelectableAll:!0})]}):null]})};Ip.displayName="MultiSelectComponent";const lE=({items:e,...t})=>{const{children:n}=t,r=o=>o.textValue?m(zo,{textValue:o.textValue,children:o.textValue},o.id):m(zo,{children:o.name},o.id);if(!e)throw new Error("MultiSelect requires items");return m(Ip,{...t,items:e,children:n||r})};lE.displayName="MultiSelect";const Rp="nav-menu-portal";var sE=(e=>(e.Up="Up",e.Down="Down",e))(sE||{});const Mp=b.default.createContext({direction:"Down",menuRef:null,triggerRef:null,setTriggerRef:function(){throw new Error("Function not implemented.")},open:!1,setOpen:function(){throw new Error("Function not implemented.")}}),Uz=L.default.div`
|
|
2456
2457
|
position: relative;
|
|
2457
2458
|
width: inherit;
|
|
2458
|
-
`,Go=y.forwardRef((e,t)=>{const[n,r]=y.useState(!1),[o,i]=y.useState(null),u=Qn(t);return y.useEffect(()=>{const
|
|
2459
|
+
`,Go=y.forwardRef((e,t)=>{const[n,r]=y.useState(!1),[o,i]=y.useState(null),u=Qn(t),a=e.isOpen!==void 0,l=a?e.isOpen??!1:n,s=y.useCallback(c=>{var d;if(a){const p=typeof c=="function"?c(e.isOpen??!1):c;(d=e.onOpenChange)==null||d.call(e,p)}else r(c)},[a,e]);return y.useEffect(()=>{const c=document.getElementById(Rp);function d(p){const h=p.target;u.current&&!u.current.contains(h)&&!(c!=null&&c.contains(h))&&s(!1)}return document.addEventListener("mousedown",d),()=>{document.removeEventListener("mousedown",d)}},[u,s]),m(Mp.Provider,{value:{menuRef:u,triggerRef:o,setTriggerRef:i,open:l,setOpen:s,direction:e.direction??"Down"},children:m(Uz,{ref:u,role:"menu",children:e.children})})});Go.displayName="NavigationMenu";const Hz=L.default.button`
|
|
2459
2460
|
cursor: pointer;
|
|
2460
2461
|
padding: ${e=>e.padding??"8px"};
|
|
2461
2462
|
border: 1px solid transparent;
|