@@ -595,7 +595,7 @@ export function create9(component: KupCard): VNode {
595
595
}
596
596
597
597
/**
598
- * 9th scalable card layout, tile view.
598
+ * 10th scalable card layout, tile view.
599
599
* @param {KupCard } component - Card component.
600
600
* @returns {VNode } 8th scalable layout virtual node.
601
601
*/
@@ -615,11 +615,21 @@ export function create10(component: KupCard): VNode {
615
615
component . data . color && component . data . color . length > 2
616
616
? component . data . color [ 2 ]
617
617
: `var(${ KupThemeColorValues . TEXT } )` ;
618
+ //Icon
619
+ const imageArray : GenericObject [ ] = component . data [ 'image' ]
620
+ ? component . data [ 'image' ]
621
+ : [ ] ;
622
+ //Image color
623
+
624
+ const colorArray : string [ ] = component . data [ 'color' ]
625
+ ? component . data [ 'color' ]
626
+ : [ ] ;
618
627
// Main text
619
628
const mainText =
620
629
component . data . text && component . data . text . length > 0
621
630
? component . data . text [ 0 ]
622
631
: null ;
632
+
623
633
// Sub text
624
634
const subText =
625
635
component . data . text && component . data . text . length > 1
@@ -647,12 +657,88 @@ export function create10(component: KupCard): VNode {
647
657
class = { `scalable-layout-${ component . layoutNumber } ` }
648
658
style = { CSSVariables }
649
659
>
650
- < div class = "section-1" > </ div >
651
- < div class = "section-2" >
652
- < div class = "scalable-card" >
653
- < div class = "text scalable-element" >
654
- < div class = "value" > { mainText } </ div >
655
- < div class = "descr" > { subText } </ div >
660
+ < div class = "scalable-card" >
661
+ < div class = "text scalable-element" >
662
+ < div class = "title" > { mainText } </ div >
663
+ < div class = "number" >
664
+ < div >
665
+ < div class = "icon" >
666
+ { imageArray [ 0 ] ? (
667
+ < FImage
668
+ color = {
669
+ colorArray [ 0 ]
670
+ ? colorArray [ 0 ]
671
+ : `var(${ KupThemeColorValues . PRIMARY } )`
672
+ }
673
+ id = "image1"
674
+ { ...imageArray [ 0 ] }
675
+ sizeX = "1.25em"
676
+ sizeY = "1.25em"
677
+ > </ FImage >
678
+ ) : null }
679
+ </ div >
680
+ </ div >
681
+ < div > { subText } </ div >
682
+ </ div >
683
+ </ div >
684
+ </ div >
685
+ </ div >
686
+ ) ;
687
+ }
688
+
689
+ /**
690
+ * 11th scalable card layout, icon with title and subtitle.
691
+ * @param {KupCard } component - Card component.
692
+ * @returns {VNode } 8th scalable layout virtual node.
693
+ */
694
+ export function create11 ( component : KupCard ) : VNode {
695
+ //Image color
696
+ const colorArray : string [ ] = component . data [ 'color' ]
697
+ ? component . data [ 'color' ]
698
+ : [ ] ;
699
+ //Icon
700
+ const imageArray : GenericObject [ ] = component . data [ 'image' ]
701
+ ? component . data [ 'image' ]
702
+ : [ ] ;
703
+ //Title, subtitle
704
+ let textIndex : number = 0 ;
705
+ const textArray : string [ ] = component . data [ 'text' ]
706
+ ? component . data [ 'text' ]
707
+ : [ ] ;
708
+ return (
709
+ < div class = { `scalable-layout-${ component . layoutNumber } scalable-card` } >
710
+ < div class = "scalable-element" >
711
+ < div class = "icon" >
712
+ { imageArray [ 0 ] ? (
713
+ < FImage
714
+ color = {
715
+ colorArray [ 0 ]
716
+ ? colorArray [ 0 ]
717
+ : `var(${ KupThemeColorValues . PRIMARY } )`
718
+ }
719
+ id = "image1"
720
+ { ...imageArray [ 0 ] }
721
+ sizeX = "1em"
722
+ sizeY = "1em"
723
+ > </ FImage >
724
+ ) : null }
725
+ </ div >
726
+ < div class = "value" >
727
+ < div
728
+ style = {
729
+ colorArray [ 1 ] ? { color : colorArray [ 1 ] } : undefined
730
+ }
731
+ >
732
+ { textArray [ textIndex ] ? textArray [ textIndex ] : '' }
733
+ </ div >
734
+ </ div >
735
+ < div class = "descr" >
736
+ < div
737
+ style = {
738
+ colorArray [ 2 ] ? { color : colorArray [ 2 ] } : undefined
739
+ }
740
+ >
741
+ { textArray [ ++ textIndex ] ? textArray [ textIndex ] : '' }
656
742
</ div >
657
743
</ div >
658
744
</ div >
0 commit comments