@gem-sdk/components 2.0.0-staging.852 → 2.0.0-staging.854
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/cjs/accordion/common/styles.js +1 -1
- package/dist/cjs/accordion/components/AccordionItem.liquid.js +18 -18
- package/dist/cjs/icon-list-hoz/settings/ItemTemplate.js +1 -1
- package/dist/esm/accordion/common/styles.js +1 -1
- package/dist/esm/accordion/components/AccordionItem.liquid.js +22 -22
- package/dist/esm/icon-list-hoz/settings/ItemTemplate.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var core=require("@gem-sdk/core");const filterStyles=e=>{let t=["--mb","--mb-mobile","--mb-tablet","--d","--d-mobile","--d-tablet"];return t.forEach(t=>{delete e?.[t]}),e},contentSizePaddingSize=e=>core.makeGlobalSize(e?.contentSizePadding),getContainerStyles=(e,t)=>({...filterStyles(e),...contentSizePaddingSize(t).gap,...core.getStyleBackgroundByDevice(e?.backgroundContent),"border-radius":"inherit"}),widthHeightSizeControl=e=>core.makeGlobalSize(e),widthStyle=(e,t,o)=>widthHeightSizeControl(o).width["--w"]?widthHeightSizeControl(o).width:core.makeStyleResponsive("w",core.makeWidth(e,t)),getItemContainerStyles=(e,t)=>{let{borderContent:o,backgroundContent:r,roundedContent:l,accordionShadow:a,width:i,fullWidth:n,widthHeightSize:c,iconColor:g,color:S}=e??{};return{"--icon-expand-hover-color":t?core.getSingleColorVariable(S?.active??S?.normal):core.getSingleColorVariable(S?.hover??S?.normal),"--icon-expand-active-color":core.getSingleColorVariable(S?.active??S?.normal),"--icon-active-color":core.getSingleColorVariable(g?.active??g?.normal),"--icon-hover-color":t?core.getSingleColorVariable(g?.active):core.getSingleColorVariable(g?.hover),...widthStyle(i,n,c),...core.makeStyle({bs:o?.border??o?.border,bw:o?.width??o?.width,bc:core.getSingleColorVariable(o?.color??o?.color)}),...core.makeStyleResponsive("bg",r),...core.getStyleShadow({value:a,styleAppliedFor:"box-shadow",isEnableShadow:a?.enable}),...core.getRadiusStyleActiveState({...l,active:{...l||{},radiusType:"custom"}})}},headerContentPaddingSize=e=>core.makeGlobalSize(e),composePosition=e=>core.makeStyle({fd:"left"===e?"row":"row-reverse",jc:"right"===e?"space-between":""}),getDropdownStyles=(e,t)=>{let{headerContentPadding:o,widthHeightSize:r,itemHeaderSpacing:l,bgColor:a,headerBorder:i}=e??{},{isShow:n,iconPosition:c}=t??{};return{...o&&headerContentPaddingSize(o).padding,...l?.type||o?{}:core.composeSize(l?.custom),...widthHeightSizeControl(r).height,...composePosition(c),...n?core.makeStyle({bgc:core.getSingleColorVariable(a?.active??a?.normal),bs:i?.active?.border,bw:i?.active?.width,bc:core.getSingleColorVariable(i?.active?.color)}):{...core.getGlobalColorStateStyle("bgc",a),...core.handleConvertBorderStyle(i),...core.handleConvertBorderWidth(i),...core.handleConvertBorderColor(i),...core.getGlobalColorStateStyle("bgc",a)}}},getDropdownTextStyles=(e,t)=>({...t?core.makeStyle({c:core.getSingleColorVariable(e?.active??e?.normal)}):{...core.getGlobalColorStateStyle("c",e)}}),getIconRotateStyles=(e,t,o)=>{let{color:r}=e??{};return{...
|
|
1
|
+
"use strict";var core=require("@gem-sdk/core");const filterStyles=e=>{let t=["--mb","--mb-mobile","--mb-tablet","--d","--d-mobile","--d-tablet"];return t.forEach(t=>{delete e?.[t]}),e},contentSizePaddingSize=e=>core.makeGlobalSize(e?.contentSizePadding),getContainerStyles=(e,t)=>({...filterStyles(e),...contentSizePaddingSize(t).gap,...core.getStyleBackgroundByDevice(e?.backgroundContent),"border-radius":"inherit"}),widthHeightSizeControl=e=>core.makeGlobalSize(e),widthStyle=(e,t,o)=>widthHeightSizeControl(o).width["--w"]?widthHeightSizeControl(o).width:core.makeStyleResponsive("w",core.makeWidth(e,t)),getItemContainerStyles=(e,t)=>{let{borderContent:o,backgroundContent:r,roundedContent:l,accordionShadow:a,width:i,fullWidth:n,widthHeightSize:c,iconColor:g,color:S}=e??{};return{"--icon-expand-hover-color":t?core.getSingleColorVariable(S?.active??S?.normal??"transparent"):core.getSingleColorVariable(S?.hover??S?.active??S?.normal??"transparent"),"--icon-expand-active-color":core.getSingleColorVariable(S?.active??S?.normal??"transparent"),"--icon-active-color":core.getSingleColorVariable(g?.active??g?.normal??"text-1"),"--icon-hover-color":t?core.getSingleColorVariable(g?.active):core.getSingleColorVariable(g?.hover),...widthStyle(i,n,c),...core.makeStyle({bs:o?.border??o?.border,bw:o?.width??o?.width,bc:core.getSingleColorVariable(o?.color??o?.color)}),...core.makeStyleResponsive("bg",r),...core.getStyleShadow({value:a,styleAppliedFor:"box-shadow",isEnableShadow:a?.enable}),...core.getRadiusStyleActiveState({...l,active:{...l||{},radiusType:"custom"}})}},headerContentPaddingSize=e=>core.makeGlobalSize(e),composePosition=e=>core.makeStyle({fd:"left"===e?"row":"row-reverse",jc:"right"===e?"space-between":""}),getDropdownStyles=(e,t)=>{let{headerContentPadding:o,widthHeightSize:r,itemHeaderSpacing:l,bgColor:a,headerBorder:i}=e??{},{isShow:n,iconPosition:c}=t??{};return{...o&&headerContentPaddingSize(o).padding,...l?.type||o?{}:core.composeSize(l?.custom),...widthHeightSizeControl(r).height,...composePosition(c),...n?core.makeStyle({bgc:core.getSingleColorVariable(a?.active??a?.normal),bs:i?.active?.border??i?.normal?.border,bw:i?.active?.width??i?.normal?.width,bc:core.getSingleColorVariable(i?.active?.color??i?.normal?.color)}):{...core.getGlobalColorStateStyle("bgc",a),...core.handleConvertBorderStyle(i),...core.handleConvertBorderWidth(i),...core.handleConvertBorderColor(i),...core.getGlobalColorStateStyle("bgc",a)}}},getDropdownTextStyles=(e,t)=>({...t?core.makeStyle({c:core.getSingleColorVariable(e?.active??e?.normal)}):{...core.getGlobalColorStateStyle("c",e)}}),getIconRotateStyles=(e,t,o)=>{let{color:r}=e??{};return{...core.makeStyle({c:core.getSingleColorVariable(t?r?.active??r?.normal??"transparent":r?.normal??"transparent")}),width:`${o??16}px`,height:`${o??16}px`}},composeIconGlobalSize=e=>core.makeGlobalSize(e),getGapStyles=(e,t)=>({...composeIconGlobalSize(e).gap,...core.makeStyleResponsive("jc",t)}),getIconStyles=(e,t)=>{let o=t?`${t}px`:"16px";return{...e,width:o,height:o,"--height":o}},getTemplateRow=e=>({"grid-template-rows":`${+!!e}fr`}),getRenderChildrenStyles=()=>({"grid-template-columns":"minmax(auto, 100%)"}),getIconGlobalSize=e=>core.makeGlobalSize(e)?.padding;exports.getContainerStyles=getContainerStyles,exports.getDropdownStyles=getDropdownStyles,exports.getDropdownTextStyles=getDropdownTextStyles,exports.getGapStyles=getGapStyles,exports.getIconGlobalSize=getIconGlobalSize,exports.getIconRotateStyles=getIconRotateStyles,exports.getIconStyles=getIconStyles,exports.getItemContainerStyles=getItemContainerStyles,exports.getRenderChildrenStyles=getRenderChildrenStyles,exports.getTemplateRow=getTemplateRow;
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var core=require("@gem-sdk/core"),Text_liquid=require("../../text/components/Text.liquid.js"),helpers=require("../common/helpers.js"),system=require("@gem-sdk/system"),classes=require("../common/classes.js"),styles=require("../common/styles.js");const AccordionItem=e=>{let{parentUid:s,childrenIcon:t,rawChildren:
|
|
2
|
-
<div class="${h}" style="${
|
|
3
|
-
<div data-index="${
|
|
4
|
-
<div aria-hidden uid="${r?.uid}" id="${r?.uid}" data-index="${
|
|
5
|
-
class="${q}" style="${
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var core=require("@gem-sdk/core"),Text_liquid=require("../../text/components/Text.liquid.js"),helpers=require("../common/helpers.js"),system=require("@gem-sdk/system"),classes=require("../common/classes.js"),styles=require("../common/styles.js");const AccordionItem=e=>{let{parentUid:s,childrenIcon:t,rawChildren:l,index:a,builderProps:r,title:c}=e,{iconSvg:i,titleTypo:n,layoutHeader:o,iconGlobalSize:y,iconCollapseSize:d,iconCollapse:m,iconExpand:p,alignment:$,configIconSize:g,iconPosition:C}=helpers.getParentSettings(e.parentSetting)??{},{isShow:S,composeContentSizeStyle:u,collapsibleIcon:v,composeIconColor:I,makeIcon:x}=helpers.getSettingItemLiquid(e),h=system.createClass(classes.getItemContainerClasses),q=system.createClass(classes.getDropdownClasses(e.parentStyle,{isShow:S,uniqueId:s,makeIcon:x(),index:a})),f=system.createStyle(styles.getIconGlobalSize(y)),_=system.createClass(classes.getIconClasses),D=system.createClass(classes.getIconRotateClasses(e.parentStyle,{isShow:S,iconExpand:p,iconSvg:i,iconCollapse:m})),T=system.createClass(classes.getContentClasses(s)),w=system.createClass(classes.getGapClasses),R=system.createStyle(styles.getItemContainerStyles(e.parentStyle)),j=system.createStyle(styles.getDropdownStyles(e.parentStyle,{isShow:S,iconPosition:C})),L=system.createStyle(styles.getDropdownTextStyles(e.parentStyle?.textColor,S)),M=system.createStyle(styles.getIconRotateStyles(e.parentStyle,S,d)),b=system.createStyle(styles.getGapStyles(y,$)),k=system.createClass(core.composeClasses("gp-inline-flex")),G=system.createClass(S?{...core.composeClasses("!gp-text-[var(--icon-active-color)]"),...classes.getLayoutIconClasses}:classes.getLayoutIconClasses),N=system.createStyle(styles.getIconStyles(I,g)),A=system.createClass(classes.getRenderChildrenClasses(e.parentStyle,{isShow:S,hasTransitionedIn:!1,isMounted:!1})),F=system.createStyle({...styles.getTemplateRow(S),...styles.getRenderChildrenStyles()}),H=system.createClass(core.composeClasses("gp-accordion-item_body-inner gp-transition-all gp-duration-500 gp-min-h-0")),O=()=>l&&l.length>=helpers.MINIMUM_CHILD?core.RenderChildren({...l[helpers.BODY_CHILD_INDEX]}):"";return core.template`
|
|
2
|
+
<div class="${h}" style="${R}">
|
|
3
|
+
<div data-index="${a?.toString()}" class="${T}">
|
|
4
|
+
<div aria-hidden uid="${r?.uid}" id="${r?.uid}" data-index="${a?.toString()}"
|
|
5
|
+
class="${q}" style="${j}">
|
|
6
6
|
${system.If(!!v,core.template`
|
|
7
7
|
<div class="${_}">
|
|
8
|
-
<span style="${
|
|
9
|
-
data-index="${
|
|
8
|
+
<span style="${M}"
|
|
9
|
+
data-index="${a}"
|
|
10
10
|
class="${D}">
|
|
11
11
|
${v}
|
|
12
12
|
</span>
|
|
13
13
|
</div>
|
|
14
14
|
`)}
|
|
15
|
-
<div class="${
|
|
15
|
+
<div class="${w}" style="${b}">
|
|
16
16
|
${system.If("before-text"===o,core.template`
|
|
17
|
-
<div class="${
|
|
17
|
+
<div class="${k}" style="${{...f}}">
|
|
18
18
|
<span
|
|
19
|
-
class="${
|
|
20
|
-
style="${
|
|
19
|
+
class="${G}"
|
|
20
|
+
style="${N}">
|
|
21
21
|
${t??""}</span>
|
|
22
22
|
</div>
|
|
23
23
|
`)}
|
|
24
|
-
${Text_liquid.default({styles:{typo:n},setting:{htmlTag:"div",text:c,excludeFlex:!0,isForceValue:!0},className:"gp-overflow-hidden"})}
|
|
24
|
+
${Text_liquid.default({styles:{typo:n},setting:{htmlTag:"div",text:c,excludeFlex:!0,isForceValue:!0},className:"gp-overflow-hidden",style:L})}
|
|
25
25
|
${system.If("after-text"===o,core.template`
|
|
26
|
-
<div class="${
|
|
26
|
+
<div class="${k}" style="${{...f}}">
|
|
27
27
|
<span
|
|
28
|
-
class="${
|
|
29
|
-
style="${
|
|
28
|
+
class="${G}"
|
|
29
|
+
style="${N}">
|
|
30
30
|
${t??""}</span>
|
|
31
31
|
</div>
|
|
32
32
|
`)}
|
|
33
33
|
</div>
|
|
34
34
|
</div>
|
|
35
|
-
<div data-index="${
|
|
36
|
-
<div data-index="${
|
|
37
|
-
${
|
|
35
|
+
<div data-index="${a}" data-show="${S}" class="${A}" style="${F}">
|
|
36
|
+
<div data-index="${a}" class="${H}" style="${u()}">
|
|
37
|
+
${O()}
|
|
38
38
|
</div>
|
|
39
39
|
</div>
|
|
40
40
|
</div>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const itemChildrenTemplate={tag:"IconListHozItem",childrens:[{tag:"Icon",settings:{iconSvg:'<svg xmlns="http://www.w3.org/2000/svg" data-name="star-filled" width="20" height="20" fill="currentColor" viewBox="0 0 256 256"><path d="m234.29 114.85-45 38.83L203 211.75a16.4 16.4 0 0 1-24.5 17.82L128 198.49l-50.53 31.08A16.4 16.4 0 0 1 53 211.75l13.76-58.07-45-38.83A16.46 16.46 0 0 1 31.08 86l59-4.76 22.76-55.08a16.36 16.36 0 0 1 30.27 0l22.75 55.08 59 4.76a16.46 16.46 0 0 1 9.37 28.86Z"></path></svg>'},styles:{globalSize:{desktop:{width:"16px",padding:{type:"custom"}}}},childrens:[]}]},itemChildrenHalfStarTemplate={tag:"IconListHozItem",childrens:[{tag:"Icon",settings:{iconSvg:'<svg xmlns="http://www.w3.org/2000/svg" data-name="star-half-filled" width="20" height="20" fill="currentColor" data-id="508414815326765440" viewBox="0 0 256 256"><path d="M239.18 97.26A16.38 16.38 0 0 0 224.92 86l-59-4.76-22.78-55.09a16.36 16.36 0 0 0-30.27 0L90.11 81.23 31.08 86a16.46 16.46 0 0 0-9.37 28.86l45 38.83L53 211.75a16.4 16.4 0 0 0 24.5 17.82l50.5-31.08 50.53 31.08A16.4 16.4 0 0 0 203 211.75l-13.76-58.07 45-38.83a16.43 16.43 0 0 0 4.94-17.59Zm-15.34 5.47-48.7 42a8 8 0 0 0-2.56 7.91l14.88 62.8a.37.37 0 0 1-.17.48c-.18.14-.23.11-.38 0l-54.72-33.65a8 8 0 0 0-4.19-1.17V32c.24 0 .27.08.35.26L153 91.86a8 8 0 0 0 6.75 4.92l63.91 5.16c.16 0 .25 0 .34.29s0 .4-.16.5Z"/></svg>'},styles:{globalSize:{desktop:{width:"16px",padding:{type:"custom"}}}},childrens:[]}]},itemSystemStarTemplate={tag:"IconListHozItem",childrens:[{tag:"Icon",settings:{iconSvg:'<svg xmlns="http://www.w3.org/2000/svg" data-name="star-filled" width="20" height="20" fill="currentColor" viewBox="0 0 256 256"><path d="m234.29 114.85-45 38.83L203 211.75a16.4 16.4 0 0 1-24.5 17.82L128 198.49l-50.53 31.08A16.4 16.4 0 0 1 53 211.75l13.76-58.07-45-38.83A16.46 16.46 0 0 1 31.08 86l59-4.76 22.76-55.08a16.36 16.36 0 0 1 30.27 0l22.75 55.08 59 4.76a16.46 16.46 0 0 1 9.37 28.86Z"></path></svg>'},styles:{globalSize:{desktop:{width:"16px",padding:{type:"custom"}}}},childrens:[]}]},itemControlTemplate={tag:"IconListHozItem",childrens:[{tag:"Icon",label:"Icon",settings:{iconSvg:'<svg xmlns="http://www.w3.org/2000/svg" data-name="star-filled" width="20" height="20" fill="currentColor" viewBox="0 0 256 256"><path d="m234.29 114.85-45 38.83L203 211.75a16.4 16.4 0 0 1-24.5 17.82L128 198.49l-50.53 31.08A16.4 16.4 0 0 1 53 211.75l13.76-58.07-45-38.83A16.46 16.46 0 0 1 31.08 86l59-4.76 22.76-55.08a16.36 16.36 0 0 1 30.27 0l22.75 55.08 59 4.76a16.46 16.46 0 0 1 9.37 28.86Z"></path></svg>',iconLink:{link:"",target:"_self"}},styles:{align:{desktop:"left"},globalSize:{desktop:{width:"16px",padding:{type:"custom"}}},border:{normal:{borderType:"none",border:"none",width:"0px",color:"transparent",isCustom:!1}},bgColor:{normal:"transparent"},color:{normal:"
|
|
1
|
+
"use strict";const itemChildrenTemplate={tag:"IconListHozItem",childrens:[{tag:"Icon",settings:{iconSvg:'<svg xmlns="http://www.w3.org/2000/svg" data-name="star-filled" width="20" height="20" fill="currentColor" viewBox="0 0 256 256"><path d="m234.29 114.85-45 38.83L203 211.75a16.4 16.4 0 0 1-24.5 17.82L128 198.49l-50.53 31.08A16.4 16.4 0 0 1 53 211.75l13.76-58.07-45-38.83A16.46 16.46 0 0 1 31.08 86l59-4.76 22.76-55.08a16.36 16.36 0 0 1 30.27 0l22.75 55.08 59 4.76a16.46 16.46 0 0 1 9.37 28.86Z"></path></svg>'},styles:{globalSize:{desktop:{width:"16px",padding:{type:"custom"}}}},childrens:[]}]},itemChildrenHalfStarTemplate={tag:"IconListHozItem",childrens:[{tag:"Icon",settings:{iconSvg:'<svg xmlns="http://www.w3.org/2000/svg" data-name="star-half-filled" width="20" height="20" fill="currentColor" data-id="508414815326765440" viewBox="0 0 256 256"><path d="M239.18 97.26A16.38 16.38 0 0 0 224.92 86l-59-4.76-22.78-55.09a16.36 16.36 0 0 0-30.27 0L90.11 81.23 31.08 86a16.46 16.46 0 0 0-9.37 28.86l45 38.83L53 211.75a16.4 16.4 0 0 0 24.5 17.82l50.5-31.08 50.53 31.08A16.4 16.4 0 0 0 203 211.75l-13.76-58.07 45-38.83a16.43 16.43 0 0 0 4.94-17.59Zm-15.34 5.47-48.7 42a8 8 0 0 0-2.56 7.91l14.88 62.8a.37.37 0 0 1-.17.48c-.18.14-.23.11-.38 0l-54.72-33.65a8 8 0 0 0-4.19-1.17V32c.24 0 .27.08.35.26L153 91.86a8 8 0 0 0 6.75 4.92l63.91 5.16c.16 0 .25 0 .34.29s0 .4-.16.5Z"/></svg>'},styles:{globalSize:{desktop:{width:"16px",padding:{type:"custom"}}}},childrens:[]}]},itemSystemStarTemplate={tag:"IconListHozItem",childrens:[{tag:"Icon",settings:{iconSvg:'<svg xmlns="http://www.w3.org/2000/svg" data-name="star-filled" width="20" height="20" fill="currentColor" viewBox="0 0 256 256"><path d="m234.29 114.85-45 38.83L203 211.75a16.4 16.4 0 0 1-24.5 17.82L128 198.49l-50.53 31.08A16.4 16.4 0 0 1 53 211.75l13.76-58.07-45-38.83A16.46 16.46 0 0 1 31.08 86l59-4.76 22.76-55.08a16.36 16.36 0 0 1 30.27 0l22.75 55.08 59 4.76a16.46 16.46 0 0 1 9.37 28.86Z"></path></svg>'},styles:{globalSize:{desktop:{width:"16px",padding:{type:"custom"}}}},childrens:[]}]},itemControlTemplate={tag:"IconListHozItem",childrens:[{tag:"Icon",label:"Icon",settings:{iconSvg:'<svg xmlns="http://www.w3.org/2000/svg" data-name="star-filled" width="20" height="20" fill="currentColor" viewBox="0 0 256 256"><path d="m234.29 114.85-45 38.83L203 211.75a16.4 16.4 0 0 1-24.5 17.82L128 198.49l-50.53 31.08A16.4 16.4 0 0 1 53 211.75l13.76-58.07-45-38.83A16.46 16.46 0 0 1 31.08 86l59-4.76 22.76-55.08a16.36 16.36 0 0 1 30.27 0l22.75 55.08 59 4.76a16.46 16.46 0 0 1 9.37 28.86Z"></path></svg>',iconLink:{link:"",target:"_self"}},styles:{align:{desktop:"left"},globalSize:{desktop:{width:"16px",padding:{type:"custom"}}},border:{normal:{borderType:"none",border:"none",width:"0px",color:"transparent",isCustom:!1}},bgColor:{normal:"transparent"},color:{normal:"text-1"},iconRotate:0,spin:!1},advanced:{},childrens:[]}]};exports.itemChildrenHalfStarTemplate=itemChildrenHalfStarTemplate,exports.itemChildrenTemplate=itemChildrenTemplate,exports.itemControlTemplate=itemControlTemplate,exports.itemSystemStarTemplate=itemSystemStarTemplate;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getStyleBackgroundByDevice as e,getSingleColorVariable as t,makeStyle as o,makeStyleResponsive as
|
|
1
|
+
import{getStyleBackgroundByDevice as e,getSingleColorVariable as t,makeStyle as o,makeStyleResponsive as r,getStyleShadow as n,getRadiusStyleActiveState as i,composeSize as a,getGlobalColorStateStyle as l,handleConvertBorderStyle as d,handleConvertBorderWidth as c,handleConvertBorderColor as g,makeGlobalSize as s,makeWidth as h}from"@gem-sdk/core";let filterStyles=e=>{let t=["--mb","--mb-mobile","--mb-tablet","--d","--d-mobile","--d-tablet"];return t.forEach(t=>{delete e?.[t]}),e},contentSizePaddingSize=e=>s(e?.contentSizePadding),getContainerStyles=(t,o)=>({...filterStyles(t),...contentSizePaddingSize(o).gap,...e(t?.backgroundContent),"border-radius":"inherit"}),widthHeightSizeControl=e=>s(e),widthStyle=(e,t,o)=>widthHeightSizeControl(o).width["--w"]?widthHeightSizeControl(o).width:r("w",h(e,t)),getItemContainerStyles=(e,a)=>{let{borderContent:l,backgroundContent:d,roundedContent:c,accordionShadow:g,width:s,fullWidth:h,widthHeightSize:p,iconColor:S,color:m}=e??{};return{"--icon-expand-hover-color":a?t(m?.active??m?.normal??"transparent"):t(m?.hover??m?.active??m?.normal??"transparent"),"--icon-expand-active-color":t(m?.active??m?.normal??"transparent"),"--icon-active-color":t(S?.active??S?.normal??"text-1"),"--icon-hover-color":a?t(S?.active):t(S?.hover),...widthStyle(s,h,p),...o({bs:l?.border??l?.border,bw:l?.width??l?.width,bc:t(l?.color??l?.color)}),...r("bg",d),...n({value:g,styleAppliedFor:"box-shadow",isEnableShadow:g?.enable}),...i({...c,active:{...c||{},radiusType:"custom"}})}},headerContentPaddingSize=e=>s(e),composePosition=e=>o({fd:"left"===e?"row":"row-reverse",jc:"right"===e?"space-between":""}),getDropdownStyles=(e,r)=>{let{headerContentPadding:n,widthHeightSize:i,itemHeaderSpacing:s,bgColor:h,headerBorder:p}=e??{},{isShow:S,iconPosition:m}=r??{};return{...n&&headerContentPaddingSize(n).padding,...s?.type||n?{}:a(s?.custom),...widthHeightSizeControl(i).height,...composePosition(m),...S?o({bgc:t(h?.active??h?.normal),bs:p?.active?.border??p?.normal?.border,bw:p?.active?.width??p?.normal?.width,bc:t(p?.active?.color??p?.normal?.color)}):{...l("bgc",h),...d(p),...c(p),...g(p),...l("bgc",h)}}},getDropdownTextStyles=(e,r)=>({...r?o({c:t(e?.active??e?.normal)}):{...l("c",e)}}),getIconRotateStyles=(e,r,n)=>{let{color:i}=e??{};return{...o({c:t(r?i?.active??i?.normal??"transparent":i?.normal??"transparent")}),width:`${n??16}px`,height:`${n??16}px`}},composeIconGlobalSize=e=>s(e),getGapStyles=(e,t)=>({...composeIconGlobalSize(e).gap,...r("jc",t)}),getIconStyles=(e,t)=>{let o=t?`${t}px`:"16px";return{...e,width:o,height:o,"--height":o}},getTemplateRow=e=>({"grid-template-rows":`${+!!e}fr`}),getRenderChildrenStyles=()=>({"grid-template-columns":"minmax(auto, 100%)"}),getIconGlobalSize=e=>s(e)?.padding;export{getContainerStyles,getDropdownStyles,getDropdownTextStyles,getGapStyles,getIconGlobalSize,getIconRotateStyles,getIconStyles,getItemContainerStyles,getRenderChildrenStyles,getTemplateRow};
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import{composeClasses as t,template as e,RenderChildren as s}from"@gem-sdk/core";import i from"../../text/components/Text.liquid.js";import{getParentSettings as a,getSettingItemLiquid as d,MINIMUM_CHILD as
|
|
2
|
-
<div class="${
|
|
3
|
-
<div data-index="${M?.toString()}" class="${
|
|
1
|
+
import{composeClasses as t,template as e,RenderChildren as s}from"@gem-sdk/core";import i from"../../text/components/Text.liquid.js";import{getParentSettings as a,getSettingItemLiquid as d,MINIMUM_CHILD as l,BODY_CHILD_INDEX as n}from"../common/helpers.js";import{createClass as o,createStyle as r,If as $}from"@gem-sdk/system";import{getItemContainerClasses as c,getDropdownClasses as p,getIconClasses as m,getIconRotateClasses as y,getContentClasses as v,getGapClasses as x,getLayoutIconClasses as g,getRenderChildrenClasses as u}from"../common/classes.js";import{getIconGlobalSize as f,getItemContainerStyles as S,getDropdownStyles as h,getDropdownTextStyles as I,getIconRotateStyles as j,getGapStyles as k,getIconStyles as T,getTemplateRow as b,getRenderChildrenStyles as q}from"../common/styles.js";let AccordionItem=w=>{let{parentUid:A,childrenIcon:F,rawChildren:C,index:M,builderProps:N,title:V}=w,{iconSvg:_,titleTypo:z,layoutHeader:B,iconGlobalSize:D,iconCollapseSize:E,iconCollapse:G,iconExpand:H,alignment:J,configIconSize:K,iconPosition:L}=a(w.parentSetting)??{},{isShow:O,composeContentSizeStyle:P,collapsibleIcon:Q,composeIconColor:R,makeIcon:U}=d(w),W=o(c),X=o(p(w.parentStyle,{isShow:O,uniqueId:A,makeIcon:U(),index:M})),Y=r(f(D)),Z=o(m),tt=o(y(w.parentStyle,{isShow:O,iconExpand:H,iconSvg:_,iconCollapse:G})),te=o(v(A)),ts=o(x),ti=r(S(w.parentStyle)),ta=r(h(w.parentStyle,{isShow:O,iconPosition:L})),td=r(I(w.parentStyle?.textColor,O)),tl=r(j(w.parentStyle,O,E)),tn=r(k(D,J)),to=o(t("gp-inline-flex")),tr=o(O?{...t("!gp-text-[var(--icon-active-color)]"),...g}:g),t$=r(T(R,K)),tc=o(u(w.parentStyle,{isShow:O,hasTransitionedIn:!1,isMounted:!1})),tp=r({...b(O),...q()}),tm=o(t("gp-accordion-item_body-inner gp-transition-all gp-duration-500 gp-min-h-0")),ty=()=>C&&C.length>=l?s({...C[n]}):"";return e`
|
|
2
|
+
<div class="${W}" style="${ti}">
|
|
3
|
+
<div data-index="${M?.toString()}" class="${te}">
|
|
4
4
|
<div aria-hidden uid="${N?.uid}" id="${N?.uid}" data-index="${M?.toString()}"
|
|
5
|
-
class="${
|
|
6
|
-
${$(!!
|
|
7
|
-
<div class="${
|
|
8
|
-
<span style="${
|
|
5
|
+
class="${X}" style="${ta}">
|
|
6
|
+
${$(!!Q,e`
|
|
7
|
+
<div class="${Z}">
|
|
8
|
+
<span style="${tl}"
|
|
9
9
|
data-index="${M}"
|
|
10
|
-
class="${
|
|
11
|
-
${
|
|
10
|
+
class="${tt}">
|
|
11
|
+
${Q}
|
|
12
12
|
</span>
|
|
13
13
|
</div>
|
|
14
14
|
`)}
|
|
15
|
-
<div class="${
|
|
15
|
+
<div class="${ts}" style="${tn}">
|
|
16
16
|
${$("before-text"===B,e`
|
|
17
|
-
<div class="${
|
|
17
|
+
<div class="${to}" style="${{...Y}}">
|
|
18
18
|
<span
|
|
19
|
-
class="${
|
|
20
|
-
style="${
|
|
21
|
-
${
|
|
19
|
+
class="${tr}"
|
|
20
|
+
style="${t$}">
|
|
21
|
+
${F??""}</span>
|
|
22
22
|
</div>
|
|
23
23
|
`)}
|
|
24
|
-
${i({styles:{typo:z},setting:{htmlTag:"div",text:V,excludeFlex:!0,isForceValue:!0},className:"gp-overflow-hidden"})}
|
|
24
|
+
${i({styles:{typo:z},setting:{htmlTag:"div",text:V,excludeFlex:!0,isForceValue:!0},className:"gp-overflow-hidden",style:td})}
|
|
25
25
|
${$("after-text"===B,e`
|
|
26
|
-
<div class="${
|
|
26
|
+
<div class="${to}" style="${{...Y}}">
|
|
27
27
|
<span
|
|
28
|
-
class="${
|
|
29
|
-
style="${
|
|
30
|
-
${
|
|
28
|
+
class="${tr}"
|
|
29
|
+
style="${t$}">
|
|
30
|
+
${F??""}</span>
|
|
31
31
|
</div>
|
|
32
32
|
`)}
|
|
33
33
|
</div>
|
|
34
34
|
</div>
|
|
35
|
-
<div data-index="${M}" data-show="${
|
|
36
|
-
<div data-index="${M}" class="${
|
|
37
|
-
${
|
|
35
|
+
<div data-index="${M}" data-show="${O}" class="${tc}" style="${tp}">
|
|
36
|
+
<div data-index="${M}" class="${tm}" style="${P()}">
|
|
37
|
+
${ty()}
|
|
38
38
|
</div>
|
|
39
39
|
</div>
|
|
40
40
|
</div>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
let itemChildrenTemplate={tag:"IconListHozItem",childrens:[{tag:"Icon",settings:{iconSvg:'<svg xmlns="http://www.w3.org/2000/svg" data-name="star-filled" width="20" height="20" fill="currentColor" viewBox="0 0 256 256"><path d="m234.29 114.85-45 38.83L203 211.75a16.4 16.4 0 0 1-24.5 17.82L128 198.49l-50.53 31.08A16.4 16.4 0 0 1 53 211.75l13.76-58.07-45-38.83A16.46 16.46 0 0 1 31.08 86l59-4.76 22.76-55.08a16.36 16.36 0 0 1 30.27 0l22.75 55.08 59 4.76a16.46 16.46 0 0 1 9.37 28.86Z"></path></svg>'},styles:{globalSize:{desktop:{width:"16px",padding:{type:"custom"}}}},childrens:[]}]},itemChildrenHalfStarTemplate={tag:"IconListHozItem",childrens:[{tag:"Icon",settings:{iconSvg:'<svg xmlns="http://www.w3.org/2000/svg" data-name="star-half-filled" width="20" height="20" fill="currentColor" data-id="508414815326765440" viewBox="0 0 256 256"><path d="M239.18 97.26A16.38 16.38 0 0 0 224.92 86l-59-4.76-22.78-55.09a16.36 16.36 0 0 0-30.27 0L90.11 81.23 31.08 86a16.46 16.46 0 0 0-9.37 28.86l45 38.83L53 211.75a16.4 16.4 0 0 0 24.5 17.82l50.5-31.08 50.53 31.08A16.4 16.4 0 0 0 203 211.75l-13.76-58.07 45-38.83a16.43 16.43 0 0 0 4.94-17.59Zm-15.34 5.47-48.7 42a8 8 0 0 0-2.56 7.91l14.88 62.8a.37.37 0 0 1-.17.48c-.18.14-.23.11-.38 0l-54.72-33.65a8 8 0 0 0-4.19-1.17V32c.24 0 .27.08.35.26L153 91.86a8 8 0 0 0 6.75 4.92l63.91 5.16c.16 0 .25 0 .34.29s0 .4-.16.5Z"/></svg>'},styles:{globalSize:{desktop:{width:"16px",padding:{type:"custom"}}}},childrens:[]}]},itemSystemStarTemplate={tag:"IconListHozItem",childrens:[{tag:"Icon",settings:{iconSvg:'<svg xmlns="http://www.w3.org/2000/svg" data-name="star-filled" width="20" height="20" fill="currentColor" viewBox="0 0 256 256"><path d="m234.29 114.85-45 38.83L203 211.75a16.4 16.4 0 0 1-24.5 17.82L128 198.49l-50.53 31.08A16.4 16.4 0 0 1 53 211.75l13.76-58.07-45-38.83A16.46 16.46 0 0 1 31.08 86l59-4.76 22.76-55.08a16.36 16.36 0 0 1 30.27 0l22.75 55.08 59 4.76a16.46 16.46 0 0 1 9.37 28.86Z"></path></svg>'},styles:{globalSize:{desktop:{width:"16px",padding:{type:"custom"}}}},childrens:[]}]},itemControlTemplate={tag:"IconListHozItem",childrens:[{tag:"Icon",label:"Icon",settings:{iconSvg:'<svg xmlns="http://www.w3.org/2000/svg" data-name="star-filled" width="20" height="20" fill="currentColor" viewBox="0 0 256 256"><path d="m234.29 114.85-45 38.83L203 211.75a16.4 16.4 0 0 1-24.5 17.82L128 198.49l-50.53 31.08A16.4 16.4 0 0 1 53 211.75l13.76-58.07-45-38.83A16.46 16.46 0 0 1 31.08 86l59-4.76 22.76-55.08a16.36 16.36 0 0 1 30.27 0l22.75 55.08 59 4.76a16.46 16.46 0 0 1 9.37 28.86Z"></path></svg>',iconLink:{link:"",target:"_self"}},styles:{align:{desktop:"left"},globalSize:{desktop:{width:"16px",padding:{type:"custom"}}},border:{normal:{borderType:"none",border:"none",width:"0px",color:"transparent",isCustom:!1}},bgColor:{normal:"transparent"},color:{normal:"
|
|
1
|
+
let itemChildrenTemplate={tag:"IconListHozItem",childrens:[{tag:"Icon",settings:{iconSvg:'<svg xmlns="http://www.w3.org/2000/svg" data-name="star-filled" width="20" height="20" fill="currentColor" viewBox="0 0 256 256"><path d="m234.29 114.85-45 38.83L203 211.75a16.4 16.4 0 0 1-24.5 17.82L128 198.49l-50.53 31.08A16.4 16.4 0 0 1 53 211.75l13.76-58.07-45-38.83A16.46 16.46 0 0 1 31.08 86l59-4.76 22.76-55.08a16.36 16.36 0 0 1 30.27 0l22.75 55.08 59 4.76a16.46 16.46 0 0 1 9.37 28.86Z"></path></svg>'},styles:{globalSize:{desktop:{width:"16px",padding:{type:"custom"}}}},childrens:[]}]},itemChildrenHalfStarTemplate={tag:"IconListHozItem",childrens:[{tag:"Icon",settings:{iconSvg:'<svg xmlns="http://www.w3.org/2000/svg" data-name="star-half-filled" width="20" height="20" fill="currentColor" data-id="508414815326765440" viewBox="0 0 256 256"><path d="M239.18 97.26A16.38 16.38 0 0 0 224.92 86l-59-4.76-22.78-55.09a16.36 16.36 0 0 0-30.27 0L90.11 81.23 31.08 86a16.46 16.46 0 0 0-9.37 28.86l45 38.83L53 211.75a16.4 16.4 0 0 0 24.5 17.82l50.5-31.08 50.53 31.08A16.4 16.4 0 0 0 203 211.75l-13.76-58.07 45-38.83a16.43 16.43 0 0 0 4.94-17.59Zm-15.34 5.47-48.7 42a8 8 0 0 0-2.56 7.91l14.88 62.8a.37.37 0 0 1-.17.48c-.18.14-.23.11-.38 0l-54.72-33.65a8 8 0 0 0-4.19-1.17V32c.24 0 .27.08.35.26L153 91.86a8 8 0 0 0 6.75 4.92l63.91 5.16c.16 0 .25 0 .34.29s0 .4-.16.5Z"/></svg>'},styles:{globalSize:{desktop:{width:"16px",padding:{type:"custom"}}}},childrens:[]}]},itemSystemStarTemplate={tag:"IconListHozItem",childrens:[{tag:"Icon",settings:{iconSvg:'<svg xmlns="http://www.w3.org/2000/svg" data-name="star-filled" width="20" height="20" fill="currentColor" viewBox="0 0 256 256"><path d="m234.29 114.85-45 38.83L203 211.75a16.4 16.4 0 0 1-24.5 17.82L128 198.49l-50.53 31.08A16.4 16.4 0 0 1 53 211.75l13.76-58.07-45-38.83A16.46 16.46 0 0 1 31.08 86l59-4.76 22.76-55.08a16.36 16.36 0 0 1 30.27 0l22.75 55.08 59 4.76a16.46 16.46 0 0 1 9.37 28.86Z"></path></svg>'},styles:{globalSize:{desktop:{width:"16px",padding:{type:"custom"}}}},childrens:[]}]},itemControlTemplate={tag:"IconListHozItem",childrens:[{tag:"Icon",label:"Icon",settings:{iconSvg:'<svg xmlns="http://www.w3.org/2000/svg" data-name="star-filled" width="20" height="20" fill="currentColor" viewBox="0 0 256 256"><path d="m234.29 114.85-45 38.83L203 211.75a16.4 16.4 0 0 1-24.5 17.82L128 198.49l-50.53 31.08A16.4 16.4 0 0 1 53 211.75l13.76-58.07-45-38.83A16.46 16.46 0 0 1 31.08 86l59-4.76 22.76-55.08a16.36 16.36 0 0 1 30.27 0l22.75 55.08 59 4.76a16.46 16.46 0 0 1 9.37 28.86Z"></path></svg>',iconLink:{link:"",target:"_self"}},styles:{align:{desktop:"left"},globalSize:{desktop:{width:"16px",padding:{type:"custom"}}},border:{normal:{borderType:"none",border:"none",width:"0px",color:"transparent",isCustom:!1}},bgColor:{normal:"transparent"},color:{normal:"text-1"},iconRotate:0,spin:!1},advanced:{},childrens:[]}]};export{itemChildrenHalfStarTemplate,itemChildrenTemplate,itemControlTemplate,itemSystemStarTemplate};
|