ioloco-ui
Advanced tools
Comparing version 0.3.81 to 0.3.82
@@ -28,2 +28,3 @@ import type { StyleXStyles } from '@stylexjs/stylex'; | ||
title: string; | ||
duration: string; | ||
children: ContentItem[]; | ||
@@ -38,3 +39,3 @@ isOpen: boolean; | ||
} | ||
export declare const Accordion: ({ title, children, isOpen, toggleAccordion, ChevronUp, ChevronDown, GoPlay, styleHeader, styleContent }: IAccordion) => import("react/jsx-runtime").JSX.Element; | ||
export declare const Accordion: ({ title, duration, children, isOpen, toggleAccordion, ChevronUp, ChevronDown, GoPlay, styleHeader, styleContent }: IAccordion) => import("react/jsx-runtime").JSX.Element; | ||
export {}; |
@@ -1,1 +0,1 @@ | ||
import{jsxs as l,jsx as n}from"react/jsx-runtime";import e from"@stylexjs/stylex";const d=d=>{let{title:o,children:i,isOpen:t,toggleAccordion:a,ChevronUp:s,ChevronDown:u,GoPlay:c,styleHeader:x,styleContent:b}=d;return l("div",Object.assign({},{className:"xyorhqc x1n4e6m5 xr6y930 xhcyo8e x116uinm xh8yej3"},{children:[l("button",Object.assign({},e.props(r.accordionHeader,x),{onClick:a,"aria-expanded":t,children:[l("div",Object.assign({},{className:"x78zum5 x6s0dn4"},{children:[n(t?s:u,Object.assign({},{className:"x579bpy x1jdv62h"})),n("p",Object.assign({},{className:"x579bpy"},{children:o}))]})),c&&n("p",Object.assign({},{className:"x1uv3qv7"},{children:`${i.length} Videos`}))]})),t&&n("div",Object.assign({id:`panel-${o}`},e.props(r.accordionContent,b),{children:i.map(((e,d)=>{var r;return l("div",Object.assign({},{className:"x78zum5 x6s0dn4 x1qughib x1elmx46 xkfvf4r"},{children:[l("div",Object.assign({},{className:"x78zum5 x6s0dn4"},{children:[c&&n(c,Object.assign({},{className:"x579bpy xqbaifs"})),n("p",Object.assign({},{className:"x1mqxbix x1em9nvr xat0y86 xa28oj3 x1us6l5c"},{children:e.title}))]})),(null==e?void 0:e.preview)&&(null==e?void 0:e.videoUrl)&&e.id&&(null===(r=e.generatePreviewButton)||void 0===r?void 0:r.call(e,null==e?void 0:e.id))]}),d)}))}))]}))},r={accordionHeader:{display:"x78zum5",alignItems:"x6s0dn4",justifyContent:"x1qughib",padding:"x3thx8k",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,cursor:"x1ypdohk",width:"xh8yej3",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,color:"x1mqxbix x1em9nvr xat0y86",backgroundColor:"x13256a0 x15kc1tc x1gev39g",":hover_backgroundColor":"x17i8yhk",$$css:!0},accordionContent:{padding:"x7kqcv9",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,width:"xh8yej3",$$css:!0}};export{d as Accordion}; | ||
import{jsxs as l,jsx as n}from"react/jsx-runtime";import e from"@stylexjs/stylex";const d=d=>{let{title:o,duration:i,children:t,isOpen:a,toggleAccordion:s,ChevronUp:u,ChevronDown:c,GoPlay:x,styleHeader:b,styleContent:g}=d;return l("div",Object.assign({},{className:"xyorhqc x1n4e6m5 xr6y930 xhcyo8e x116uinm x1kwpx2w"},{children:[l("button",Object.assign({},e.props(r.accordionHeader,b),{onClick:s,"aria-expanded":a,children:[l("div",Object.assign({},{className:"x78zum5 xh8yej3 x1qughib x6s0dn4"},{children:[l("div",{style:{display:"flex"},children:[n(a?u:c,Object.assign({},{className:"x579bpy x1jdv62h"})),n("p",Object.assign({},{className:"x579bpy"},{children:o}))]}),n("p",Object.assign({},{className:"x579bpy"},{children:i}))]})),x&&n("p",Object.assign({},{className:"x1uv3qv7"},{children:`${t.length} Videos`}))]})),a&&n("div",Object.assign({id:`panel-${o}`},e.props(r.accordionContent,g),{children:t.map(((e,d)=>{var r;return l("div",Object.assign({},{className:"x78zum5 x6s0dn4 x1qughib x1elmx46 xkfvf4r"},{children:[l("div",Object.assign({},{className:"x78zum5 xh8yej3 x1qughib x6s0dn4"},{children:[x&&n(x,Object.assign({},{className:"x579bpy xqbaifs"})),n("p",Object.assign({},{className:"x1mqxbix x1em9nvr xat0y86 xa28oj3 x1us6l5c"},{children:e.title}))]})),(null==e?void 0:e.preview)&&(null==e?void 0:e.videoUrl)&&e.id&&(null===(r=e.generatePreviewButton)||void 0===r?void 0:r.call(e,null==e?void 0:e.id))]}),d)}))}))]}))},r={accordionHeader:{display:"x78zum5",alignItems:"x6s0dn4",justifyContent:"x1qughib",padding:"x3thx8k",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,cursor:"x1ypdohk",width:"xh8yej3",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,color:"x1mqxbix x1em9nvr xat0y86",backgroundColor:"x13256a0 x15kc1tc x1gev39g",":hover_backgroundColor":"x17i8yhk",$$css:!0},accordionContent:{padding:"x7kqcv9",paddingInline:null,paddingStart:null,paddingLeft:null,paddingEnd:null,paddingRight:null,paddingBlock:null,paddingTop:null,paddingBottom:null,width:"xh8yej3",$$css:!0}};export{d as Accordion}; |
@@ -28,2 +28,3 @@ import type { StyleXStyles } from '@stylexjs/stylex'; | ||
title: string; | ||
duration?: string; | ||
content: Content[]; | ||
@@ -30,0 +31,0 @@ }; |
@@ -1,1 +0,1 @@ | ||
import{jsx as e}from"react/jsx-runtime";import{useState as t,useEffect as o}from"react";import{Accordion as n}from"./accordion.js";import r from"@stylexjs/stylex";const s=s=>{let{data:l,expandAll:c=!1,expandIndexes:d=[],ChevronUp:a,ChevronDown:p,GoPlay:x,center:m,styleHeader:y,styleContent:h}=s;const[f,u]=t([]);o((()=>{u(c?l.map(((e,t)=>t)):d)}),[l,c,d]);return e("div",Object.assign({},r.props(i.root,m&&i.center),{children:l.map(((t,o)=>e(n,{title:null==t?void 0:t.title,isOpen:f.includes(o),toggleAccordion:()=>(e=>{u((t=>t.includes(e)?t.filter((t=>t!==e)):[...t,e]))})(o),ChevronUp:a,ChevronDown:p,GoPlay:x,styleHeader:y,styleContent:h,children:t.content},o)))}))},i={root:{display:"x78zum5",flexDirection:"xdt5ytf",width:"xh8yej3",$$css:!0},center:{width:"x3hqpx7",$$css:!0}};export{s as default}; | ||
import{jsx as e}from"react/jsx-runtime";import{useState as t,useEffect as o}from"react";import{Accordion as n}from"./accordion.js";import r from"@stylexjs/stylex";const i=i=>{let{data:s,expandAll:d=!1,expandIndexes:c=[],ChevronUp:a,ChevronDown:p,GoPlay:x,center:m,styleHeader:y,styleContent:h}=i;const[u,f]=t([]);o((()=>{f(d?s.map(((e,t)=>t)):c)}),[s,d,c]);return e("div",Object.assign({},r.props(l.root,m&&l.center),{children:s.map(((t,o)=>e(n,{title:null==t?void 0:t.title,duration:null==t?void 0:t.duration,isOpen:u.includes(o),toggleAccordion:()=>(e=>{f((t=>t.includes(e)?t.filter((t=>t!==e)):[...t,e]))})(o),ChevronUp:a,ChevronDown:p,GoPlay:x,styleHeader:y,styleContent:h,children:t.content},o)))}))},l={root:{display:"x78zum5",flexDirection:"xdt5ytf",width:"xh8yej3",$$css:!0},center:{width:"x3hqpx7",$$css:!0}};export{i as default}; |
{ | ||
"name": "ioloco-ui", | ||
"version": "0.3.81", | ||
"version": "0.3.82", | ||
"description": "Stylex UI components for React", | ||
@@ -5,0 +5,0 @@ "author": { |
Sorry, the diff of this file is not supported yet
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
113040
1613