ioloco-ui
Advanced tools
Comparing version 0.3.105 to 0.3.106
@@ -0,1 +1,2 @@ | ||
"use client"; | ||
import{jsx as l,jsxs as r}from"react/jsx-runtime";import o from"@stylexjs/stylex";const n=n=>{let{size:d="large",color:t,label:i,Icon:u,labelPlacement:b="right",disabled:h,onChange:a,checked:c,style:g}=n;const s=`checkbox-${i.replace(/\s/g,"-")}`,p=l=>{!h&&a&&a(l.target.checked)},v=h?e.disabled:null,x=e[`${d}CheckBox`],m=e[`${d}Icon`],S=e[`${d}Label`],y=e[`${t}Outlined`],_=e[`${t}Icon`],I=e[`${t}Label`],C=()=>l("span",Object.assign({},o.props(x,y),{children:c&&l(u,Object.assign({},o.props(e.iconBase,m,_)))})),k=()=>l("input",Object.assign({id:s,type:"checkbox",disabled:h,checked:c,onChange:p,"aria-checked":c,"aria-disabled":h},{className:"x10l6tqk xg01cxk x1vjfegm xh8yej3 x5yr21d x1ghz6dp x1717udv x1ypdohk"}));return l("div",Object.assign({},o.props(e.container,v,g),{children:(()=>{switch(b){case"top":return r("label",Object.assign({},o.props(e.label,e[`container-${b}`],S,I),{children:[i,r("div",Object.assign({},{className:"x78zum5 x6s0dn4 xl56j7k x1n2onr6"},{style:{margin:"1rem 0rem 0rem 0rem"},children:[l(C,{}),l(k,{})]}))]}));case"right":return r("label",Object.assign({},o.props(e.label,e[`container-${b}`],S,I),{children:[r("div",Object.assign({},{className:"x78zum5 x6s0dn4 xl56j7k x1n2onr6"},{style:{margin:"0rem 1rem 0rem 0rem"},children:[l(C,{}),l(k,{})]})),i]}));case"bottom":return r("label",Object.assign({},o.props(e.label,e[`container-${b}`],S,I),{children:[i,r("div",Object.assign({},{className:"x78zum5 x6s0dn4 xl56j7k x1n2onr6"},{style:{margin:"0rem 0rem 1rem 0rem"},children:[l(C,{}),l(k,{})]}))]}));case"left":return r("label",Object.assign({},o.props(e.label,e[`container-${b}`],S,I),{children:[r("div",Object.assign({},{className:"x78zum5 x6s0dn4 xl56j7k x1n2onr6"},{style:{margin:"0rem 0rem 0rem 1rem"},children:[l(C,{}),l(k,{})]})),i]}));default:return null}})()}))},e={container:{cursor:"x1ypdohk",display:"x78zum5",alignItems:"x6s0dn4",justifyContent:"xlqzeqv",position:"x1n2onr6",margin:"x41wgo0",marginInline:null,marginInlineStart:null,marginLeft:null,marginInlineEnd:null,marginRight:null,marginBlock:null,marginTop:null,marginBottom:null,padding:"x1717udv",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,width:"xh8yej3",$$css:!0},checkboxContainer:{display:"x78zum5",alignItems:"x6s0dn4",justifyContent:"xl56j7k",position:"x1n2onr6",$$css:!0},"container-top":{flexDirection:"xdt5ytf",$$css:!0},"container-right":{flexDirection:"x1q0g3np",$$css:!0},"container-bottom":{flexDirection:"x3ieub6",$$css:!0},"container-left":{flexDirection:"x15zctf7",$$css:!0},label:{cursor:"x1ypdohk",display:"x78zum5",alignItems:"x6s0dn4",justifyContent:"xlqzeqv",margin:"x1oqdnn1",marginInline:null,marginInlineStart:null,marginLeft:null,marginInlineEnd:null,marginRight:null,marginBlock:null,marginTop:null,marginBottom:null,padding:"x1717udv",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,userSelect:"x87ps6o",$$css:!0},labelText:{fontSize:"xml2kzp",padding:"xq3cggq",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,userSelect:"x87ps6o",$$css:!0},iconBase:{position:"x10l6tqk",top:"xwa60dl",left:"x1nrll8i",insetInlineStart:null,insetInlineEnd:null,transform:"x11lhmoz",$$css:!0},disabled:{cursor:"x1h6gzvc",opacity:"xbyyjgo",$$css:!0},input:{position:"x10l6tqk",opacity:"xg01cxk",zIndex:"x1vjfegm",width:"xh8yej3",height:"x5yr21d",margin:"x1ghz6dp",marginInline:null,marginInlineStart:null,marginLeft:null,marginInlineEnd:null,marginRight:null,marginBlock:null,marginTop:null,marginBottom:null,padding:"x1717udv",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,cursor:"x1ypdohk",$$css:!0},checked:{background:"x1md70p1",backgroundAttachment:null,backgroundClip:null,backgroundColor:null,backgroundImage:null,backgroundOrigin:null,backgroundPosition:null,backgroundPositionX:null,backgroundPositionY:null,backgroundRepeat:null,backgroundSize:null,$$css:!0},checkmark:{display:"x1rg5ohu",alignItems:"x6s0dn4",justifyContent:"xl56j7k",backgroundColor:"xjbqb8w",borderRadius:"x1xh8lfz",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,border:"x150ed17",borderWidth:null,borderInlineWidth:null,borderInlineStartWidth:null,borderLeftWidth:null,borderInlineEndWidth:null,borderRightWidth:null,borderBlockWidth:null,borderTopWidth:null,borderBottomWidth:null,borderStyle:null,borderInlineStyle:null,borderInlineStartStyle:null,borderLeftStyle:null,borderInlineEndStyle:null,borderRightStyle:null,borderBlockStyle:null,borderTopStyle:null,borderBottomStyle:null,borderColor:null,borderInlineColor:null,borderInlineStartColor:null,borderLeftColor:null,borderInlineEndColor:null,borderRightColor:null,borderBlockColor:null,borderTopColor:null,borderBottomColor:null,position:"x1n2onr6",$$css:!0},smallIcon:{fontSize:"x1jchvi3",$$css:!0},mediumIcon:{fontSize:"xml2kzp",$$css:!0},largeIcon:{fontSize:"xngnso2",$$css:!0},smallCheckBox:{padding:"xq068xy",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,$$css:!0},mediumCheckBox:{padding:"xl0vs5b",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,$$css:!0},largeCheckBox:{padding:"x1uz70x1",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,$$css:!0},smallLabel:{fontSize:"xvewgow",$$css:!0},mediumLabel:{fontSize:"xml2kzp",$$css:!0},largeLabel:{fontSize:"x1uv3qv7",$$css:!0},whiteLabel:{color:"x1mqxbix xat0y86",$$css:!0},primaryLabel:{color:"x1ee20vk",$$css:!0},secondaryLabel:{color:"xnh76vn",$$css:!0},tertiaryLabel:{color:"x1hpdykb",$$css:!0},whiteIcon:{color:"x1mqxbix xat0y86",$$css:!0},primaryIcon:{color:"x1ee20vk",$$css:!0},secondaryIcon:{color:"xnh76vn",$$css:!0},tertiaryIcon:{color:"x1hpdykb",$$css:!0},whiteOutlined:{color:"x1mqxbix xat0y86",backgroundColor:"xjbqb8w",border:"x14wdoiw xo9qtu7",borderWidth:null,borderInlineWidth:null,borderInlineStartWidth:null,borderLeftWidth:null,borderInlineEndWidth:null,borderRightWidth:null,borderBlockWidth:null,borderTopWidth:null,borderBottomWidth:null,borderStyle:null,borderInlineStyle:null,borderInlineStartStyle:null,borderLeftStyle:null,borderInlineEndStyle:null,borderRightStyle:null,borderBlockStyle:null,borderTopStyle:null,borderBottomStyle:null,borderColor:null,borderInlineColor:null,borderInlineStartColor:null,borderLeftColor:null,borderInlineEndColor:null,borderRightColor:null,borderBlockColor:null,borderTopColor:null,borderBottomColor:null,":hover_color":"x1frr76i x1r2gkrt",":hover_backgroundColor":"xnpqzmy x1rgw4h5",":hover_border":"x130rnt4",":hover_borderWidth":null,":hover_borderInlineWidth":null,":hover_borderInlineStartWidth":null,":hover_borderLeftWidth":null,":hover_borderInlineEndWidth":null,":hover_borderRightWidth":null,":hover_borderBlockWidth":null,":hover_borderTopWidth":null,":hover_borderBottomWidth":null,":hover_borderStyle":null,":hover_borderInlineStyle":null,":hover_borderInlineStartStyle":null,":hover_borderLeftStyle":null,":hover_borderInlineEndStyle":null,":hover_borderRightStyle":null,":hover_borderBlockStyle":null,":hover_borderTopStyle":null,":hover_borderBottomStyle":null,":hover_borderColor":null,":hover_borderInlineColor":null,":hover_borderInlineStartColor":null,":hover_borderLeftColor":null,":hover_borderInlineEndColor":null,":hover_borderRightColor":null,":hover_borderBlockColor":null,":hover_borderTopColor":null,":hover_borderBottomColor":null,$$css:!0},primaryOutlined:{color:"x1ee20vk",backgroundColor:"xjbqb8w",border:"x1bm8wg9",borderWidth:null,borderInlineWidth:null,borderInlineStartWidth:null,borderLeftWidth:null,borderInlineEndWidth:null,borderRightWidth:null,borderBlockWidth:null,borderTopWidth:null,borderBottomWidth:null,borderStyle:null,borderInlineStyle:null,borderInlineStartStyle:null,borderLeftStyle:null,borderInlineEndStyle:null,borderRightStyle:null,borderBlockStyle:null,borderTopStyle:null,borderBottomStyle:null,borderColor:null,borderInlineColor:null,borderInlineStartColor:null,borderLeftColor:null,borderInlineEndColor:null,borderRightColor:null,borderBlockColor:null,borderTopColor:null,borderBottomColor:null,":hover_color":"x1frr76i",":hover_backgroundColor":"xhd74o6",":hover_border":"xj3dvq8",":hover_borderWidth":null,":hover_borderInlineWidth":null,":hover_borderInlineStartWidth":null,":hover_borderLeftWidth":null,":hover_borderInlineEndWidth":null,":hover_borderRightWidth":null,":hover_borderBlockWidth":null,":hover_borderTopWidth":null,":hover_borderBottomWidth":null,":hover_borderStyle":null,":hover_borderInlineStyle":null,":hover_borderInlineStartStyle":null,":hover_borderLeftStyle":null,":hover_borderInlineEndStyle":null,":hover_borderRightStyle":null,":hover_borderBlockStyle":null,":hover_borderTopStyle":null,":hover_borderBottomStyle":null,":hover_borderColor":null,":hover_borderInlineColor":null,":hover_borderInlineStartColor":null,":hover_borderLeftColor":null,":hover_borderInlineEndColor":null,":hover_borderRightColor":null,":hover_borderBlockColor":null,":hover_borderTopColor":null,":hover_borderBottomColor":null,$$css:!0},secondaryOutlined:{color:"xnh76vn",backgroundColor:"xjbqb8w",border:"x1b8m8gk",borderWidth:null,borderInlineWidth:null,borderInlineStartWidth:null,borderLeftWidth:null,borderInlineEndWidth:null,borderRightWidth:null,borderBlockWidth:null,borderTopWidth:null,borderBottomWidth:null,borderStyle:null,borderInlineStyle:null,borderInlineStartStyle:null,borderLeftStyle:null,borderInlineEndStyle:null,borderRightStyle:null,borderBlockStyle:null,borderTopStyle:null,borderBottomStyle:null,borderColor:null,borderInlineColor:null,borderInlineStartColor:null,borderLeftColor:null,borderInlineEndColor:null,borderRightColor:null,borderBlockColor:null,borderTopColor:null,borderBottomColor:null,":hover_color":"x1frr76i",":hover_backgroundColor":"x16xvs8l",":hover_border":"xzdhonn",":hover_borderWidth":null,":hover_borderInlineWidth":null,":hover_borderInlineStartWidth":null,":hover_borderLeftWidth":null,":hover_borderInlineEndWidth":null,":hover_borderRightWidth":null,":hover_borderBlockWidth":null,":hover_borderTopWidth":null,":hover_borderBottomWidth":null,":hover_borderStyle":null,":hover_borderInlineStyle":null,":hover_borderInlineStartStyle":null,":hover_borderLeftStyle":null,":hover_borderInlineEndStyle":null,":hover_borderRightStyle":null,":hover_borderBlockStyle":null,":hover_borderTopStyle":null,":hover_borderBottomStyle":null,":hover_borderColor":null,":hover_borderInlineColor":null,":hover_borderInlineStartColor":null,":hover_borderLeftColor":null,":hover_borderInlineEndColor":null,":hover_borderRightColor":null,":hover_borderBlockColor":null,":hover_borderTopColor":null,":hover_borderBottomColor":null,$$css:!0},tertiaryOutlined:{color:"x1hpdykb",backgroundColor:"xjbqb8w",border:"x1gvysov",borderWidth:null,borderInlineWidth:null,borderInlineStartWidth:null,borderLeftWidth:null,borderInlineEndWidth:null,borderRightWidth:null,borderBlockWidth:null,borderTopWidth:null,borderBottomWidth:null,borderStyle:null,borderInlineStyle:null,borderInlineStartStyle:null,borderLeftStyle:null,borderInlineEndStyle:null,borderRightStyle:null,borderBlockStyle:null,borderTopStyle:null,borderBottomStyle:null,borderColor:null,borderInlineColor:null,borderInlineStartColor:null,borderLeftColor:null,borderInlineEndColor:null,borderRightColor:null,borderBlockColor:null,borderTopColor:null,borderBottomColor:null,":hover_color":"x1frr76i",":hover_backgroundColor":"x11kv0cu",":hover_border":"x1pmr0j6",":hover_borderWidth":null,":hover_borderInlineWidth":null,":hover_borderInlineStartWidth":null,":hover_borderLeftWidth":null,":hover_borderInlineEndWidth":null,":hover_borderRightWidth":null,":hover_borderBlockWidth":null,":hover_borderTopWidth":null,":hover_borderBottomWidth":null,":hover_borderStyle":null,":hover_borderInlineStyle":null,":hover_borderInlineStartStyle":null,":hover_borderLeftStyle":null,":hover_borderInlineEndStyle":null,":hover_borderRightStyle":null,":hover_borderBlockStyle":null,":hover_borderTopStyle":null,":hover_borderBottomStyle":null,":hover_borderColor":null,":hover_borderInlineColor":null,":hover_borderInlineStartColor":null,":hover_borderLeftColor":null,":hover_borderInlineEndColor":null,":hover_borderRightColor":null,":hover_borderBlockColor":null,":hover_borderTopColor":null,":hover_borderBottomColor":null,$$css:!0}};export{n as default}; |
@@ -0,1 +1,2 @@ | ||
"use client"; | ||
import{jsxs as l,jsx as n}from"react/jsx-runtime";import{useState as o,useRef as t,useEffect as r,useCallback as e}from"react";import d from"@stylexjs/stylex";function i(i){let{variant:u="filled",size:s="medium",active:b,tabs:c,children:g,onTabChange:p,ariaLabel:m="Content Tabs"}=i;const[x,h]=o(b),[$,f]=o(x),[y,B]=o(-1),S=t([]),k=Array.isArray(g)?g:[g];r((()=>{const l=setTimeout((()=>f(x)),300);return()=>clearTimeout(l)}),[x]),r((()=>{S.current=S.current.slice(0,c.length)}),[c]);const v=e(((l,n)=>{var o;const t=c.length;let r=n;switch(l.key){case"ArrowRight":case"ArrowDown":r=(n+1)%t,l.preventDefault();break;case"ArrowLeft":case"ArrowUp":r=(n-1+t)%t,l.preventDefault();break;case"Home":r=0,l.preventDefault();break;case"End":r=t-1,l.preventDefault();break;default:return}null===(o=S.current[r])||void 0===o||o.focus(),B(r);const e=c[r];h(e),null==p||p(e)}),[c,p]),C=l=>`tab-${l.toLowerCase()}`,T=l=>`panel-${l.toLowerCase()}`,R=a[`${s}Tab`],w=a[`${u}Container`],W=a[`${u}TabsList`],I=a[`${u}ActiveTab`];return l("div",Object.assign({},d.props(a.container,w),{role:"region","aria-label":m,children:[n("div",Object.assign({},d.props(a.tabs,W),{role:"tablist","aria-label":m,children:null==c?void 0:c.map(((l,o)=>n("button",Object.assign({ref:l=>{S.current[o]=l},id:C(l),role:"tab","aria-selected":x===l,"aria-controls":T(l),tabIndex:x===l?0:-1},d.props([a.tab,R,x===l&&I,y===o&&a[`${u}FocusedTab`]]),{onClick:()=>((l,n)=>{h(l),B(n),null==p||p(l)})(l,o),onKeyDown:l=>v(l,o),children:l}),l)))})),n("div",Object.assign({},{className:"x1n2onr6 xh8yej3"},{children:k.map(((l,o)=>n("div",Object.assign({id:T(c[o]),role:"tabpanel","aria-labelledby":C(c[o]),tabIndex:0},d.props([a.tabPanel,$===c[o]&&a.activePanel]),{children:l}),c[o])))}))]}))}const a={container:{width:"xh8yej3",$$css:!0},tabs:{display:"x78zum5",marginBottom:"x1t84w78",$$css:!0},tab:{cursor:"x1ypdohk",background:"x1md70p1",backgroundAttachment:null,backgroundClip:null,backgroundColor:null,backgroundImage:null,backgroundOrigin:null,backgroundPosition:null,backgroundPositionX:null,backgroundPositionY:null,backgroundRepeat:null,backgroundSize:null,border:"x1gs6z28",borderWidth:null,borderInlineWidth:null,borderInlineStartWidth:null,borderLeftWidth:null,borderInlineEndWidth:null,borderRightWidth:null,borderBlockWidth:null,borderTopWidth:null,borderBottomWidth:null,borderStyle:null,borderInlineStyle:null,borderInlineStartStyle:null,borderLeftStyle:null,borderInlineEndStyle:null,borderRightStyle:null,borderBlockStyle:null,borderTopStyle:null,borderBottomStyle:null,borderColor:null,borderInlineColor:null,borderInlineStartColor:null,borderLeftColor:null,borderInlineEndColor:null,borderRightColor:null,borderBlockColor:null,borderTopColor:null,borderBottomColor:null,fontWeight:"xk50ysn",transition:"x169l3ba",transitionBehavior:null,transitionDelay:null,transitionDuration:null,transitionProperty:null,transitionTimingFunction:null,color:"x6u426u xergv63",$$css:!0},content:{position:"x1n2onr6",width:"xh8yej3",$$css:!0},tabPanel:{display:"x1s85apg",width:"xh8yej3",$$css:!0},activePanel:{display:"x1lliihq",$$css:!0},filledContainer:{$$css:!0},filledTabsList:{borderBottom:"x3iih9a xmu4vb5",borderBottomWidth:null,borderBottomStyle:null,borderBottomColor:null,$$css:!0},filledActiveTab:{color:"xod0wng xxgsoov",backgroundColor:"xas4zb2 x1hr95wy",borderRadius:"xr78m7q",borderStartStartRadius:null,borderStartEndRadius:null,borderEndStartRadius:null,borderEndEndRadius:null,borderTopLeftRadius:null,borderTopRightRadius:null,borderBottomLeftRadius:null,borderBottomRightRadius:null,$$css:!0},filledFocusedTab:{outline:"x1o9r4pz",outlineColor:null,outlineStyle:null,outlineWidth:null,outlineOffset:"x2ssjo2",$$css:!0},elegantContainer:{$$css:!0},elegantTabsList:{borderBottom:"x3iih9a xmu4vb5",borderBottomWidth:null,borderBottomStyle:null,borderBottomColor:null,$$css:!0},elegantActiveTab:{color:"xod0wng xxgsoov",borderBottom:"x1aadtzq x1ch221x",borderBottomWidth:null,borderBottomStyle:null,borderBottomColor:null,$$css:!0},elegantFocusedTab:{borderBottom:"x2xfnqx xtg7bjb",borderBottomWidth:null,borderBottomStyle:null,borderBottomColor:null,outline:"x1a2a7pz",outlineColor:null,outlineOffset:null,outlineStyle:null,outlineWidth:null,$$css:!0},smallTab:{fontSize:"xml2kzp",padding:"xpqh473",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,$$css:!0},mediumTab:{fontSize:"x1uv3qv7",padding:"x17v3l2f",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,$$css:!0},largeTab:{fontSize:"x1elmx46",padding:"xu4qjhp",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,$$css:!0}};export{i as default}; |
{ | ||
"name": "ioloco-ui", | ||
"version": "0.3.105", | ||
"version": "0.3.106", | ||
"description": "Stylex UI components for React", | ||
@@ -83,2 +83,3 @@ "author": { | ||
"rollup-plugin-peer-deps-external": "^2.2.4", | ||
"rollup-plugin-preserve-directives": "^0.4.0", | ||
"storybook": "^8.4.2", | ||
@@ -85,0 +86,0 @@ "storybook-dark-mode": "^4.0.2", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
152498
2131
51