@uniformdev/csk-components 6.1.57 → 6.1.63-alpha.1

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.
Files changed (281) hide show
  1. package/README.md +74 -81
  2. package/dist/ThemeSwitcher-EUDUX3QI.mjs +1 -0
  3. package/dist/accordion-item-7IKL6Z6Q.mjs +1 -0
  4. package/dist/accordion-item-MORC2F2Q.mjs +1 -0
  5. package/dist/banner-WOYK426U.mjs +1 -0
  6. package/dist/carousel-ALNEGOPM.mjs +1 -0
  7. package/dist/carousel-HKYR3ZBB.mjs +1 -0
  8. package/dist/chunk-27WJUZYR.mjs +1 -0
  9. package/dist/chunk-3JU2XCD2.mjs +1 -0
  10. package/dist/chunk-47YB4P2Q.mjs +1 -0
  11. package/dist/chunk-6CKVLOIH.mjs +1 -0
  12. package/dist/chunk-7GVG4HLE.mjs +1 -0
  13. package/dist/chunk-AOFJCDRO.mjs +1 -0
  14. package/dist/chunk-AWTML4I7.mjs +1 -0
  15. package/dist/chunk-CZ4X5ZBK.mjs +1 -0
  16. package/dist/chunk-D673IM2U.mjs +1 -0
  17. package/dist/chunk-I6SUO5WR.mjs +1 -0
  18. package/dist/chunk-JT77BVIX.mjs +1 -0
  19. package/dist/chunk-LPAOEOU4.mjs +1 -0
  20. package/dist/chunk-MKOFM4XK.mjs +1 -0
  21. package/dist/chunk-NKINOJY6.mjs +1 -0
  22. package/dist/chunk-OKUDTS22.mjs +1 -0
  23. package/dist/chunk-OL6JBPZ4.mjs +1 -0
  24. package/dist/chunk-OY6ZJNCE.mjs +1 -0
  25. package/dist/chunk-PLKWUEFW.mjs +1 -0
  26. package/dist/chunk-QPQGRQKI.mjs +1 -0
  27. package/dist/chunk-VWWXSA5H.mjs +1 -0
  28. package/dist/chunk-WAW7PQYM.mjs +1 -0
  29. package/dist/chunk-XKCRANRQ.mjs +1 -0
  30. package/dist/chunk-XYU3TGOU.mjs +1 -0
  31. package/dist/chunk-Y337A266.mjs +7 -0
  32. package/dist/chunk-YQYDZJ65.mjs +1 -0
  33. package/dist/chunk-ZAHWFLY4.mjs +1 -0
  34. package/dist/{chunk-V4EBWEG4.mjs → chunk-ZWDCDE5W.mjs} +1 -1
  35. package/dist/components/canvas/emptyPlaceholders.d.mts +5 -4
  36. package/dist/components/canvas/emptyPlaceholders.mjs +1 -1
  37. package/dist/components/canvas/index.d.mts +4 -664
  38. package/dist/components/canvas/index.mjs +1 -2
  39. package/dist/components/canvas/serverClient.d.mts +694 -0
  40. package/dist/components/canvas/serverClient.mjs +1 -0
  41. package/dist/components/canvas/serverOnly.d.mts +41 -0
  42. package/dist/components/canvas/serverOnly.mjs +1 -0
  43. package/dist/components/ui/index.d.mts +81 -54
  44. package/dist/components/ui/index.mjs +1 -1
  45. package/dist/content/components/canvas/Accordion/accordion.tsx +12 -17
  46. package/dist/content/components/canvas/Accordion/index.tsx +2 -2
  47. package/dist/content/components/canvas/AccordionItem/accordion-item.tsx +28 -39
  48. package/dist/content/components/canvas/AccordionItem/index.tsx +4 -6
  49. package/dist/content/components/canvas/Badge/badge.tsx +12 -5
  50. package/dist/content/components/canvas/Badge/index.tsx +2 -3
  51. package/dist/content/components/canvas/Badge/style-utils.ts +6 -6
  52. package/dist/content/components/canvas/Banner/banner.tsx +24 -36
  53. package/dist/content/components/canvas/Banner/index.tsx +7 -11
  54. package/dist/content/components/canvas/Breadcrumbs/breadcrumbs.tsx +21 -22
  55. package/dist/content/components/canvas/Breadcrumbs/index.tsx +4 -7
  56. package/dist/content/components/canvas/Button/button.tsx +19 -11
  57. package/dist/content/components/canvas/Button/index.tsx +4 -7
  58. package/dist/content/components/canvas/Card/card.tsx +10 -12
  59. package/dist/content/components/canvas/Card/index.tsx +3 -3
  60. package/dist/content/components/canvas/Carousel/carousel.tsx +10 -10
  61. package/dist/content/components/canvas/Carousel/index.tsx +4 -4
  62. package/dist/content/components/canvas/Container/container.tsx +7 -10
  63. package/dist/content/components/canvas/Container/index.tsx +3 -3
  64. package/dist/content/components/canvas/Container/parameters.ts +0 -4
  65. package/dist/content/components/canvas/CookieConsent/cookie-consent.tsx +126 -0
  66. package/dist/content/components/canvas/CookieConsent/empty-placeholder.tsx +12 -0
  67. package/dist/content/components/canvas/CookieConsent/index.tsx +26 -0
  68. package/dist/content/components/canvas/Countdown/countdown.tsx +9 -7
  69. package/dist/content/components/canvas/Countdown/index.tsx +2 -3
  70. package/dist/content/components/canvas/DemoHero/atoms.tsx +59 -35
  71. package/dist/content/components/canvas/DemoHero/columns-variant.tsx +5 -11
  72. package/dist/content/components/canvas/DemoHero/default-variant.tsx +5 -12
  73. package/dist/content/components/canvas/DemoHero/demo-hero.tsx +43 -22
  74. package/dist/content/components/canvas/DemoHero/fixed-hero.tsx +63 -65
  75. package/dist/content/components/canvas/DemoHero/flexible-hero.tsx +8 -2
  76. package/dist/content/components/canvas/DemoHero/index.tsx +6 -18
  77. package/dist/content/components/canvas/DemoHero/utils.ts +14 -0
  78. package/dist/content/components/canvas/Divider/divider.tsx +5 -2
  79. package/dist/content/components/canvas/Divider/index.tsx +2 -2
  80. package/dist/content/components/canvas/Flex/flex.tsx +11 -10
  81. package/dist/content/components/canvas/Flex/index.tsx +6 -6
  82. package/dist/content/components/canvas/FlexItem/flex-item.tsx +7 -4
  83. package/dist/content/components/canvas/FlexItem/index.tsx +4 -5
  84. package/dist/content/components/canvas/Footer/footer.tsx +9 -8
  85. package/dist/content/components/canvas/Footer/index.tsx +2 -3
  86. package/dist/content/components/canvas/Grid/grid.tsx +9 -9
  87. package/dist/content/components/canvas/Grid/index.tsx +5 -5
  88. package/dist/content/components/canvas/GridItem/grid-item.tsx +10 -8
  89. package/dist/content/components/canvas/GridItem/index.tsx +5 -5
  90. package/dist/content/components/canvas/Header/header.tsx +10 -7
  91. package/dist/content/components/canvas/Header/index.tsx +2 -3
  92. package/dist/content/components/canvas/IconLabel/icon-label.tsx +16 -8
  93. package/dist/content/components/canvas/IconLabel/index.tsx +4 -5
  94. package/dist/content/components/canvas/Image/image.tsx +25 -8
  95. package/dist/content/components/canvas/Image/index.tsx +2 -3
  96. package/dist/content/components/canvas/ImageGallery/empty-placeholder.tsx +1 -1
  97. package/dist/content/components/canvas/ImageGallery/gallery-inner.tsx +6 -6
  98. package/dist/content/components/canvas/ImageGallery/image-gallery.tsx +21 -36
  99. package/dist/content/components/canvas/ImageGallery/index.tsx +11 -12
  100. package/dist/content/components/canvas/Link/index.tsx +2 -3
  101. package/dist/content/components/canvas/Link/link.tsx +7 -4
  102. package/dist/content/components/canvas/Modal/index.tsx +2 -2
  103. package/dist/content/components/canvas/Modal/modal.tsx +16 -74
  104. package/dist/content/components/canvas/NavigationFlyout/desktop.tsx +9 -13
  105. package/dist/content/components/canvas/NavigationFlyout/index.tsx +21 -3
  106. package/dist/content/components/canvas/NavigationFlyout/mobile.tsx +10 -13
  107. package/dist/content/components/canvas/NavigationFlyout/{navigation-flyout.tsx → navigation-flyout-client.tsx} +26 -20
  108. package/dist/content/components/canvas/NavigationGroup/desktop.tsx +7 -10
  109. package/dist/content/components/canvas/NavigationGroup/index.tsx +20 -3
  110. package/dist/content/components/canvas/NavigationGroup/mobile.tsx +9 -8
  111. package/dist/content/components/canvas/NavigationGroup/{navigation-group.tsx → navigation-group-client.tsx} +21 -18
  112. package/dist/content/components/canvas/NavigationLink/index.tsx +2 -4
  113. package/dist/content/components/canvas/NavigationLink/navigation-link.tsx +12 -9
  114. package/dist/content/components/canvas/Page/index.tsx +7 -7
  115. package/dist/content/components/canvas/Page/page.tsx +9 -18
  116. package/dist/content/components/canvas/Review/default-variant.tsx +3 -5
  117. package/dist/content/components/canvas/Review/empty-placeholder.tsx +6 -3
  118. package/dist/content/components/canvas/Review/index.tsx +6 -6
  119. package/dist/content/components/canvas/Review/multi-column-variant.tsx +3 -5
  120. package/dist/content/components/canvas/Review/review.tsx +11 -11
  121. package/dist/content/components/canvas/RichText/index.tsx +7 -6
  122. package/dist/content/components/canvas/RichText/rich-text.tsx +23 -6
  123. package/dist/content/components/canvas/Section/columns-variant.tsx +5 -11
  124. package/dist/content/components/canvas/Section/default-variant.tsx +7 -16
  125. package/dist/content/components/canvas/Section/empty-placeholder.tsx +5 -2
  126. package/dist/content/components/canvas/Section/index.tsx +2 -2
  127. package/dist/content/components/canvas/Section/section.tsx +11 -16
  128. package/dist/content/components/canvas/SimpleFooter/index.tsx +16 -0
  129. package/dist/content/components/canvas/SimpleFooter/simple-footer.tsx +85 -0
  130. package/dist/content/components/canvas/SimpleHeader/index.tsx +22 -0
  131. package/dist/content/components/canvas/SimpleHeader/simple-header.tsx +63 -0
  132. package/dist/content/components/canvas/Spacer/index.tsx +2 -2
  133. package/dist/content/components/canvas/Spacer/spacer.tsx +5 -2
  134. package/dist/content/components/canvas/Tab/index.tsx +2 -3
  135. package/dist/content/components/canvas/Tab/tab.tsx +6 -5
  136. package/dist/content/components/canvas/Table/index.tsx +2 -2
  137. package/dist/content/components/canvas/Table/table.tsx +9 -13
  138. package/dist/content/components/canvas/TableCustomCell/index.tsx +2 -2
  139. package/dist/content/components/canvas/TableCustomCell/table-custom-cell.tsx +7 -4
  140. package/dist/content/components/canvas/TableDataCell/index.tsx +2 -2
  141. package/dist/content/components/canvas/TableDataCell/table-data-cell.tsx +7 -4
  142. package/dist/content/components/canvas/TableHeaderCell/index.tsx +2 -2
  143. package/dist/content/components/canvas/TableHeaderCell/table-header-cell.tsx +7 -4
  144. package/dist/content/components/canvas/TableRow/index.tsx +5 -3
  145. package/dist/content/components/canvas/TableRow/table-row.tsx +6 -3
  146. package/dist/content/components/canvas/Tabs/index.tsx +7 -7
  147. package/dist/content/components/canvas/Tabs/style-utils.ts +12 -11
  148. package/dist/content/components/canvas/Tabs/tabs.tsx +45 -48
  149. package/dist/content/components/canvas/Testimonial/default-variant.tsx +9 -11
  150. package/dist/content/components/canvas/Testimonial/index.tsx +2 -2
  151. package/dist/content/components/canvas/Testimonial/testimonial.tsx +11 -17
  152. package/dist/content/components/canvas/Testimonial/with-large-avatar-variant.tsx +9 -11
  153. package/dist/content/components/canvas/Testimonial/with-overlapping-image-variant.tsx +9 -11
  154. package/dist/content/components/canvas/Text/index.tsx +2 -3
  155. package/dist/content/components/canvas/Text/text.tsx +21 -15
  156. package/dist/content/components/canvas/ThemeSwitcher/index.tsx +2 -2
  157. package/dist/content/components/canvas/ThemeSwitcher/theme-switcher.tsx +6 -3
  158. package/dist/content/components/canvas/Video/index.tsx +2 -5
  159. package/dist/content/components/canvas/Video/placeholder.tsx +1 -1
  160. package/dist/content/components/canvas/Video/video.tsx +9 -7
  161. package/dist/content/components/ui/Accordion/accordion.tsx +23 -0
  162. package/dist/content/components/ui/Accordion/index.tsx +9 -0
  163. package/dist/content/components/ui/AccordionItem/accordion-item.tsx +41 -0
  164. package/dist/content/components/ui/AccordionItem/index.tsx +16 -0
  165. package/dist/content/components/ui/Banner/banner.tsx +47 -0
  166. package/dist/content/components/ui/Banner/index.tsx +29 -0
  167. package/dist/content/components/{canvas → ui}/Banner/style-utils.ts +1 -2
  168. package/dist/content/components/ui/Button/index.ts +2 -5
  169. package/dist/content/components/ui/Carousel/carousel.tsx +2 -2
  170. package/dist/content/components/ui/Carousel/index.ts +3 -3
  171. package/dist/content/components/ui/ComponentEmptyPlaceholder/component-empty-placeholder.tsx +13 -0
  172. package/dist/content/components/ui/ComponentEmptyPlaceholder/index.ts +6 -0
  173. package/dist/content/components/ui/Container/container.tsx +2 -7
  174. package/dist/content/components/ui/Container/index.ts +0 -6
  175. package/dist/content/components/ui/Flex/flex.tsx +21 -27
  176. package/dist/content/components/ui/Flex/index.ts +3 -5
  177. package/dist/content/components/ui/FlexItem/index.ts +1 -1
  178. package/dist/content/components/ui/Footer/index.ts +5 -4
  179. package/dist/content/components/ui/Grid/grid.tsx +21 -25
  180. package/dist/content/components/ui/Grid/index.ts +6 -15
  181. package/dist/content/components/ui/GridItem/grid-item.tsx +10 -1
  182. package/dist/content/components/ui/GridItem/index.ts +6 -9
  183. package/dist/content/components/ui/Header/index.ts +1 -1
  184. package/dist/content/components/ui/IconLabel/icon-label.tsx +2 -0
  185. package/dist/content/components/ui/IconLabel/index.ts +1 -0
  186. package/dist/content/components/ui/InlineSVG/index.ts +15 -0
  187. package/dist/content/components/ui/InlineSVG/inline-svg.tsx +70 -0
  188. package/dist/content/components/ui/InlineSVG/utils.ts +132 -0
  189. package/dist/content/components/ui/Modal/index.tsx +22 -0
  190. package/dist/content/components/ui/Modal/modal.tsx +89 -0
  191. package/dist/content/components/{canvas → ui}/Modal/style-utils.ts +4 -4
  192. package/dist/content/components/ui/Rating/index.tsx +1 -1
  193. package/dist/content/components/ui/Rating/rating.tsx +1 -1
  194. package/dist/content/components/ui/Text/index.ts +3 -6
  195. package/dist/content/types/cskTypes.ts +32 -9
  196. package/dist/content/utils/assets.ts +3 -18
  197. package/dist/content/utils/createComponentResolver.ts +7 -6
  198. package/dist/content/utils/createEmptyPlaceholderResolver.tsx +4 -8
  199. package/dist/content/utils/getSlotComponents.ts +15 -0
  200. package/dist/content/utils/routing.ts +60 -15
  201. package/dist/content/utils/useCookiesConsent.ts +17 -0
  202. package/dist/content/utils/withFlattenParameters.tsx +17 -0
  203. package/dist/content/utils/withSlotsDataValue.tsx +34 -0
  204. package/dist/cookie-consent-5QJUCW2K.mjs +1 -0
  205. package/dist/countdown-FRQZMVKW.mjs +1 -0
  206. package/dist/image-gallery-HWCMTJL3.mjs +1 -0
  207. package/dist/index-CSSWgmI5.d.mts +90 -0
  208. package/dist/index-CrBZatTs.d.mts +18 -0
  209. package/dist/index.mjs +3 -3
  210. package/dist/mobile-KBYNJEBM.mjs +1 -0
  211. package/dist/modal-4TVVGHWS.mjs +1 -0
  212. package/dist/modal-E5RMA4EO.mjs +1 -0
  213. package/dist/navigation-flyout-client-WUN4A34X.mjs +1 -0
  214. package/dist/navigation-group-client-Y72BOPIH.mjs +1 -0
  215. package/dist/parameters-B8w5Q6Pp.d.mts +29 -0
  216. package/dist/tabs-VMFTATOP.mjs +1 -0
  217. package/dist/theme-switcher-QTX46Z7E.mjs +1 -0
  218. package/dist/theme-switcher-RGY4D3KL.mjs +1 -0
  219. package/dist/types/cskTypes.d.mts +27 -9
  220. package/dist/utils/assets.d.mts +8 -17
  221. package/dist/utils/assets.mjs +1 -1
  222. package/dist/utils/createComponentResolver.d.mts +3 -9
  223. package/dist/utils/createComponentResolver.mjs +1 -1
  224. package/dist/utils/createEmptyPlaceholderResolver.d.mts +4 -2
  225. package/dist/utils/createEmptyPlaceholderResolver.mjs +1 -1
  226. package/dist/utils/getSlotComponents.d.mts +11 -0
  227. package/dist/utils/getSlotComponents.mjs +1 -0
  228. package/dist/utils/routing.d.mts +20 -7
  229. package/dist/utils/routing.mjs +1 -1
  230. package/dist/utils/sitemap.d.mts +21 -0
  231. package/dist/utils/sitemap.mjs +1 -0
  232. package/dist/utils/styling.d.mts +3 -0
  233. package/dist/utils/styling.mjs +1 -1
  234. package/dist/utils/withFlattenParameters.d.mts +10 -0
  235. package/dist/utils/withFlattenParameters.mjs +1 -0
  236. package/dist/utils/withSlotsDataValue.d.mts +12 -0
  237. package/dist/utils/withSlotsDataValue.mjs +1 -0
  238. package/dist/video-VG6ZQCKN.mjs +1 -0
  239. package/package.json +47 -14
  240. package/dist/ThemeSwitcher-6Q7LCO4Q.mjs +0 -1
  241. package/dist/accordion-item-G5CNMERW.mjs +0 -1
  242. package/dist/banner-2B4K5R4N.mjs +0 -1
  243. package/dist/carousel-BBEW5P4Y.mjs +0 -1
  244. package/dist/carousel-ERCHOWUS.mjs +0 -1
  245. package/dist/chunk-2SEOCBRK.mjs +0 -1
  246. package/dist/chunk-2UV7TQNF.mjs +0 -1
  247. package/dist/chunk-2YTACEBA.mjs +0 -1
  248. package/dist/chunk-3PDY7RJC.mjs +0 -7
  249. package/dist/chunk-4LWAGTFW.mjs +0 -1
  250. package/dist/chunk-56OQGKRM.mjs +0 -1
  251. package/dist/chunk-5VM2Y55L.mjs +0 -1
  252. package/dist/chunk-AKRWCDDG.mjs +0 -1
  253. package/dist/chunk-FPOIJMYT.mjs +0 -1
  254. package/dist/chunk-LA36HQWS.mjs +0 -1
  255. package/dist/chunk-M3BGP5VE.mjs +0 -1
  256. package/dist/chunk-MSXDLSXH.mjs +0 -1
  257. package/dist/chunk-QHIWJPL6.mjs +0 -1
  258. package/dist/chunk-RX4IAAQQ.mjs +0 -1
  259. package/dist/chunk-TIRCISSU.mjs +0 -1
  260. package/dist/chunk-TM7Q5NMH.mjs +0 -1
  261. package/dist/chunk-YEKQJ4YC.mjs +0 -1
  262. package/dist/chunk-YUCUJWBO.mjs +0 -1
  263. package/dist/chunk-Z7JSWSPD.mjs +0 -1
  264. package/dist/content/components/canvas/Banner/types.ts +0 -21
  265. package/dist/content/components/canvas/Image/placeholder.tsx +0 -20
  266. package/dist/content/components/ui/Container/utils.ts +0 -18
  267. package/dist/countdown-LYDXJLEE.mjs +0 -1
  268. package/dist/image-gallery-F6JLG7XW.mjs +0 -1
  269. package/dist/index-B9eeSbLG.d.mts +0 -71
  270. package/dist/mobile-UAUHHXPH.mjs +0 -1
  271. package/dist/modal-HKMQGV4B.mjs +0 -1
  272. package/dist/navigation-flyout-MXIJA6PC.mjs +0 -1
  273. package/dist/navigation-group-DEN3D2BO.mjs +0 -1
  274. package/dist/tabs-AQFKYC6M.mjs +0 -1
  275. package/dist/theme-switcher-76F2V343.mjs +0 -1
  276. package/dist/theme-switcher-WO5JIV2W.mjs +0 -1
  277. package/dist/video-RC2QHJS2.mjs +0 -1
  278. /package/dist/content/components/{canvas → ui}/AccordionItem/icon-arrow-down.tsx +0 -0
  279. /package/dist/content/components/{canvas → ui}/AccordionItem/icon-arrow-up.tsx +0 -0
  280. /package/dist/content/components/{canvas → ui}/Banner/close-button.tsx +0 -0
  281. /package/dist/content/components/{canvas → ui}/Modal/close-icon.tsx +0 -0
@@ -0,0 +1,63 @@
1
+ import { FC } from 'react';
2
+ import Image from 'next/image';
3
+ import Link from 'next/link';
4
+ import BaseHeader from '@/components/ui/Header';
5
+ import BaseIconLabel from '@/components/ui/IconLabel';
6
+ import { ReplaceFieldsWithAssets } from '@/types/cskTypes';
7
+ import { cn, resolveViewPort } from '@/utils/styling';
8
+ import { withFlattenParameters } from '@/utils/withFlattenParameters';
9
+ import { SimpleHeaderParameters, SimpleHeaderProps, SimpleHeaderVariants } from '.';
10
+
11
+ const SimpleHeader: FC<SimpleHeaderProps & ReplaceFieldsWithAssets<SimpleHeaderParameters, 'logo'>> = ({
12
+ variant,
13
+ logo,
14
+ links,
15
+ backgroundColor,
16
+ textColor,
17
+ hoverTextColor,
18
+ }) => {
19
+ return (
20
+ <BaseHeader
21
+ sticky={variant === SimpleHeaderVariants.Sticky}
22
+ leftSection={
23
+ logo?.[0]?.url && (
24
+ <Link href="/">
25
+ <Image src={logo?.[0]?.url} alt="Logo" width={50} height={40} />
26
+ </Link>
27
+ )
28
+ }
29
+ backgroundColor={backgroundColor}
30
+ color="general-color-1"
31
+ spacing={{
32
+ paddingTop: 'container-small',
33
+ paddingBottom: 'container-small',
34
+ }}
35
+ border="none"
36
+ >
37
+ {links?.map(link => (
38
+ <Link href={link.link?.path || ''} key={link.title}>
39
+ <BaseIconLabel
40
+ className="group"
41
+ size="base"
42
+ tag="span"
43
+ color={textColor}
44
+ weight="normal"
45
+ font="sans"
46
+ letterSpacing="normal"
47
+ alignment="left"
48
+ >
49
+ <span
50
+ className={cn({
51
+ [resolveViewPort(hoverTextColor, 'group-hover:text-{value}')]: !!hoverTextColor,
52
+ })}
53
+ >
54
+ {link.title}
55
+ </span>
56
+ </BaseIconLabel>
57
+ </Link>
58
+ ))}
59
+ </BaseHeader>
60
+ );
61
+ };
62
+
63
+ export default withFlattenParameters(SimpleHeader);
@@ -1,4 +1,4 @@
1
- import { ComponentProps } from '@uniformdev/canvas-next-rsc/component';
1
+ import { ComponentProps } from '@/types/cskTypes';
2
2
 
3
3
  export type SpacerParameters = {
4
4
  size?: string;
@@ -9,4 +9,4 @@ export enum SpacerVariants {
9
9
 
10
10
  export type SpacerProps = ComponentProps<SpacerParameters>;
11
11
 
12
- export { Spacer as default } from './spacer';
12
+ export { default } from './spacer';
@@ -1,8 +1,9 @@
1
1
  import { FC } from 'react';
2
2
  import { cn } from '@/utils/styling';
3
- import { SpacerProps, SpacerVariants } from '.';
3
+ import { withFlattenParameters } from '@/utils/withFlattenParameters';
4
+ import { SpacerParameters, SpacerProps, SpacerVariants } from '.';
4
5
 
5
- export const Spacer: FC<SpacerProps> = ({ size, component: { variant } }) => {
6
+ export const Spacer: FC<SpacerProps & SpacerParameters> = ({ size, variant }) => {
6
7
  const isHorizontal = variant === SpacerVariants.Horizontal;
7
8
 
8
9
  return (
@@ -14,3 +15,5 @@ export const Spacer: FC<SpacerProps> = ({ size, component: { variant } }) => {
14
15
  />
15
16
  );
16
17
  };
18
+
19
+ export default withFlattenParameters(Spacer);
@@ -1,5 +1,4 @@
1
- import { ComponentProps } from '@uniformdev/canvas-next-rsc/component';
2
- import { Tab } from './tab';
1
+ import { ComponentProps } from '@/types/cskTypes';
3
2
 
4
3
  export type TabParameters = { title?: string };
5
4
 
@@ -9,4 +8,4 @@ export enum TabSlots {
9
8
 
10
9
  export type TabProps = ComponentProps<TabParameters, TabSlots>;
11
10
 
12
- export default Tab;
11
+ export { default } from './tab';
@@ -1,7 +1,8 @@
1
1
  import { FC } from 'react';
2
- import { UniformSlot } from '@uniformdev/canvas-next-rsc/component';
3
- import { TabProps } from '.';
2
+ import { UniformSlot } from '@uniformdev/next-app-router/component';
3
+ import { withFlattenParameters } from '@/utils/withFlattenParameters';
4
+ import { TabParameters, TabProps } from '.';
4
5
 
5
- export const Tab: FC<TabProps> = ({ slots, component, context }) => (
6
- <UniformSlot data={component} context={context} slot={slots.tabContent} />
7
- );
6
+ const Tab: FC<TabProps & TabParameters> = ({ slots }) => <UniformSlot slot={slots.tabContent} />;
7
+
8
+ export default withFlattenParameters(Tab);
@@ -1,5 +1,5 @@
1
- import { ComponentProps } from '@uniformdev/canvas-next-rsc/component';
2
1
  import { ContainerParameters } from '@/components/canvas/Container/parameters';
2
+ import { ComponentProps } from '@/types/cskTypes';
3
3
 
4
4
  export type TableParameters = ContainerParameters & {
5
5
  size?: string;
@@ -13,5 +13,5 @@ export enum TableSlots {
13
13
 
14
14
  export type TableProps = ComponentProps<TableParameters, TableSlots>;
15
15
 
16
- export { Table as default } from './table';
16
+ export { default } from './table';
17
17
  export { TableEmptyPlaceholder } from './empty-placeholder';
@@ -1,36 +1,32 @@
1
1
  import { FC } from 'react';
2
- import { UniformSlot } from '@uniformdev/canvas-next-rsc/component';
2
+ import { UniformSlot } from '@uniformdev/next-app-router/component';
3
3
  import Container from '@/components/ui/Container';
4
- import { TableProps } from '.';
4
+ import { withFlattenParameters } from '@/utils/withFlattenParameters';
5
+ import { TableParameters, TableProps } from '.';
5
6
  import { getTableClasses } from './style-utils';
6
7
 
7
- export const Table: FC<TableProps> = ({
8
+ const Table: FC<TableProps & TableParameters> = ({
8
9
  size,
9
10
  textColor,
10
11
  slots,
11
- component,
12
- context,
13
12
  backgroundColor,
14
13
  spacing,
15
14
  border,
16
15
  fluidContent,
17
- fullHeight,
18
- fitHeight,
19
16
  height,
20
17
  }) => (
21
- <Container
22
- className="flex flex-col gap-5"
23
- {...{ backgroundColor, spacing, border, fluidContent, fullHeight, fitHeight, height }}
24
- >
18
+ <Container className="flex flex-col gap-5" {...{ backgroundColor, spacing, border, fluidContent, height }}>
25
19
  <div className="overflow-x-auto">
26
20
  <table className={getTableClasses({ size, textColor })}>
27
21
  <thead>
28
- <UniformSlot slot={slots.tableHead} context={context} data={component} />
22
+ <UniformSlot slot={slots.tableHead} />
29
23
  </thead>
30
24
  <tbody>
31
- <UniformSlot slot={slots.tableBody} context={context} data={component} />
25
+ <UniformSlot slot={slots.tableBody} />
32
26
  </tbody>
33
27
  </table>
34
28
  </div>
35
29
  </Container>
36
30
  );
31
+
32
+ export default withFlattenParameters(Table);
@@ -1,4 +1,4 @@
1
- import { ComponentProps } from '@uniformdev/canvas-next-rsc/component';
1
+ import { ComponentProps } from '@/types/cskTypes';
2
2
 
3
3
  export const AlignmentMap = {
4
4
  left: 'ml-0',
@@ -16,4 +16,4 @@ export enum TableCustomCellSlots {
16
16
 
17
17
  export type TableCustomCellProps = ComponentProps<TableCustomCellParameters, TableCustomCellSlots>;
18
18
 
19
- export { TableCustomCell as default } from './table-custom-cell';
19
+ export { default } from './table-custom-cell';
@@ -1,12 +1,15 @@
1
1
  import { FC } from 'react';
2
- import { UniformSlot } from '@uniformdev/canvas-next-rsc/component';
2
+ import { UniformSlot } from '@uniformdev/next-app-router/component';
3
3
  import { cn } from '@/utils/styling';
4
- import { AlignmentMap, TableCustomCellProps } from '.';
4
+ import { withFlattenParameters } from '@/utils/withFlattenParameters';
5
+ import { AlignmentMap, TableCustomCellParameters, TableCustomCellProps } from '.';
5
6
 
6
- export const TableCustomCell: FC<TableCustomCellProps> = ({ component, context, slots, alignment }) => (
7
+ const TableCustomCell: FC<TableCustomCellProps & TableCustomCellParameters> = ({ slots, alignment }) => (
7
8
  <td>
8
9
  <div className={cn('w-fit', AlignmentMap[alignment || 'left'])}>
9
- <UniformSlot slot={slots.tableCustomCellContent} context={context} data={component} />
10
+ <UniformSlot slot={slots.tableCustomCellContent} />
10
11
  </div>
11
12
  </td>
12
13
  );
14
+
15
+ export default withFlattenParameters(TableCustomCell);
@@ -1,7 +1,7 @@
1
- import { ComponentProps } from '@uniformdev/canvas-next-rsc/component';
1
+ import { ComponentProps } from '@/types/cskTypes';
2
2
 
3
3
  export type TableDataCellParameters = { value?: string };
4
4
 
5
5
  export type TableDataCellProps = ComponentProps<TableDataCellParameters>;
6
6
 
7
- export { TableDataCell as default } from './table-data-cell';
7
+ export { default } from './table-data-cell';
@@ -1,9 +1,12 @@
1
1
  import { FC } from 'react';
2
- import { UniformText } from '@uniformdev/canvas-next-rsc/component';
3
- import { TableDataCellProps } from '.';
2
+ import { ComponentParameter, UniformText } from '@uniformdev/next-app-router/component';
3
+ import { withFlattenParameters } from '@/utils/withFlattenParameters';
4
+ import { TableDataCellParameters, TableDataCellProps } from '.';
4
5
 
5
- export const TableDataCell: FC<TableDataCellProps> = ({ component, context }) => (
6
+ const TableDataCell: FC<TableDataCellProps & TableDataCellParameters> = ({ parameters, component }) => (
6
7
  <td>
7
- <UniformText component={component} context={context} parameterId="value" placeholder="Value" />
8
+ <UniformText component={component} parameter={parameters.value as ComponentParameter<string>} placeholder="Value" />
8
9
  </td>
9
10
  );
11
+
12
+ export default withFlattenParameters(TableDataCell);
@@ -1,7 +1,7 @@
1
- import { ComponentProps } from '@uniformdev/canvas-next-rsc/component';
1
+ import { ComponentProps } from '@/types/cskTypes';
2
2
 
3
3
  export type TableHeaderCellParameters = { value?: string };
4
4
 
5
5
  export type TableHeaderCellProps = ComponentProps<TableHeaderCellParameters>;
6
6
 
7
- export { TableHeaderCell as default } from './table-header-cell';
7
+ export { default } from './table-header-cell';
@@ -1,9 +1,12 @@
1
1
  import { FC } from 'react';
2
- import { UniformText } from '@uniformdev/canvas-next-rsc/component';
3
- import { TableHeaderCellProps } from '.';
2
+ import { ComponentParameter, UniformText } from '@uniformdev/next-app-router/component';
3
+ import { withFlattenParameters } from '@/utils/withFlattenParameters';
4
+ import { TableHeaderCellParameters, TableHeaderCellProps } from '.';
4
5
 
5
- export const TableHeaderCell: FC<TableHeaderCellProps> = ({ component, context }) => (
6
+ const TableHeaderCell: FC<TableHeaderCellProps & TableHeaderCellParameters> = ({ parameters, component }) => (
6
7
  <th>
7
- <UniformText component={component} context={context} parameterId="value" placeholder="Value" />
8
+ <UniformText component={component} parameter={parameters.value as ComponentParameter<string>} placeholder="Value" />
8
9
  </th>
9
10
  );
11
+
12
+ export default withFlattenParameters(TableHeaderCell);
@@ -1,5 +1,7 @@
1
- import { ComponentProps } from '@uniformdev/canvas-next-rsc/component';
1
+ import { ComponentProps } from '@/types/cskTypes';
2
2
 
3
- export type TableRowProps = ComponentProps;
3
+ export type TableRowParameters = unknown;
4
4
 
5
- export { TableRow as default } from './table-row';
5
+ export type TableRowProps = ComponentProps<TableRowParameters>;
6
+
7
+ export { default } from './table-row';
@@ -1,9 +1,12 @@
1
1
  import { FC } from 'react';
2
- import { UniformSlot } from '@uniformdev/canvas-next-rsc/component';
2
+ import { UniformSlot } from '@uniformdev/next-app-router/component';
3
+ import { withFlattenParameters } from '@/utils/withFlattenParameters';
3
4
  import { TableRowProps } from '.';
4
5
 
5
- export const TableRow: FC<TableRowProps> = ({ slots, component, context }) => (
6
+ const TableRow: FC<TableRowProps> = ({ slots }) => (
6
7
  <tr>
7
- <UniformSlot data={component} context={context} slot={slots.tableRowCells} />
8
+ <UniformSlot slot={slots.tableRowCells} />
8
9
  </tr>
9
10
  );
11
+
12
+ export default withFlattenParameters(TableRow);
@@ -1,21 +1,21 @@
1
1
  import dynamic from 'next/dynamic';
2
- import { ComponentProps } from '@uniformdev/canvas-next-rsc/component';
3
2
  import { ContainerParameters } from '@/components/canvas/Container/parameters';
3
+ import { ComponentProps } from '@/types/cskTypes';
4
+ import { withFlattenParameters } from '@/utils/withFlattenParameters';
5
+ import { withSlotsDataValue } from '@/utils/withSlotsDataValue';
4
6
 
5
7
  export type TabsParameters = ContainerParameters & {
6
8
  color?: string;
7
9
  };
8
10
 
9
- export enum TabsVariants {
10
- Default = 'default',
11
- Bordered = 'bordered',
12
- }
13
-
14
11
  export enum TabsSlots {
15
12
  TabItems = 'tabItems',
16
13
  }
17
14
 
18
15
  export type TabsProps = ComponentProps<TabsParameters, TabsSlots>;
19
16
 
20
- export default dynamic(() => import('./tabs').then(mod => mod.Tabs));
17
+ export { TabsVariants } from './style-utils';
18
+ export default dynamic(() =>
19
+ import('./tabs').then(mod => withSlotsDataValue(withFlattenParameters(mod.Tabs), [TabsSlots.TabItems]))
20
+ );
21
21
  export { TabsEmptyPlaceholder } from './empty-placeholder';
@@ -1,9 +1,13 @@
1
1
  import { cn } from '@/utils/styling';
2
- import { TabsParameters, TabsVariants } from '.';
2
+ import { TabsParameters } from '.';
3
+
4
+ export enum TabsVariants {
5
+ Bordered = 'bordered',
6
+ }
3
7
 
4
8
  type ButtonContainerClassesProps = {
5
9
  color: TabsParameters['color'];
6
- variant: TabsVariants;
10
+ variant?: string;
7
11
  };
8
12
  export const getButtonContainerClasses = ({ color, variant }: ButtonContainerClassesProps) =>
9
13
  cn('flex flex-row overflow-x-auto ', {
@@ -12,17 +16,14 @@ export const getButtonContainerClasses = ({ color, variant }: ButtonContainerCla
12
16
 
13
17
  type ButtonClassesProps = {
14
18
  color: TabsParameters['color'];
15
- variant: TabsVariants;
16
- tabItem: {
17
- id: string;
18
- };
19
- activeTabId: string;
19
+ variant?: string;
20
+ isActiveTab?: boolean;
20
21
  };
21
- export const getButtonClasses = ({ color, variant, tabItem, activeTabId }: ButtonClassesProps) =>
22
+ export const getButtonClasses = ({ color, variant, isActiveTab = false }: ButtonClassesProps) =>
22
23
  cn('text-lg shrink-0 font-medium px-5 py-3', {
23
24
  [`text-${color}`]: color,
24
- [`border-${color}`]: tabItem.id === activeTabId && variant === TabsVariants.Bordered,
25
+ [`border-${color}`]: isActiveTab && variant === TabsVariants.Bordered,
25
26
  'border-b-2': variant === TabsVariants.Bordered,
26
- 'opacity-60 hover:opacity-100': tabItem.id !== activeTabId,
27
- 'border-transparent': tabItem.id !== activeTabId && variant === TabsVariants.Bordered,
27
+ 'opacity-60 hover:opacity-100': !isActiveTab,
28
+ 'border-transparent': !isActiveTab && variant === TabsVariants.Bordered,
28
29
  });
@@ -1,81 +1,78 @@
1
1
  'use client';
2
2
 
3
- import { FC, Fragment, useCallback, useEffect, useMemo, useState } from 'react';
4
- import { flattenValues } from '@uniformdev/canvas';
5
- import { UniformSlot, UniformText } from '@uniformdev/canvas-next-rsc/component';
3
+ import { FC, Fragment, useCallback, useState, MouseEvent, FocusEvent } from 'react';
4
+ import { ComponentInstance, flattenValues } from '@uniformdev/canvas';
5
+ import { UniformSlot, UniformText, ComponentParameter } from '@uniformdev/next-app-router/component';
6
6
  import Container from '@/components/ui/Container';
7
- import { TabsProps, TabsVariants } from '.';
7
+ import { TabsParameters, TabsProps } from '.';
8
8
  import { getButtonClasses, getButtonContainerClasses } from './style-utils';
9
9
 
10
- export const Tabs: FC<TabsProps> = ({
10
+ const TAB_ITEM_TEXT_PARAMETER_ID = 'text';
11
+ const TAB_ITEM_TEXT_PARAMETER_TYPE = 'text';
12
+
13
+ export const Tabs: FC<TabsProps & TabsParameters & { slotData?: Record<string, ComponentInstance[]> }> = ({
11
14
  slots,
12
15
  color,
13
- component,
14
- context,
15
16
  backgroundColor,
16
17
  spacing,
17
18
  border,
18
19
  fluidContent,
19
- fullHeight,
20
- fitHeight,
21
20
  height,
21
+ variant,
22
+ slotData,
23
+ context,
22
24
  }) => {
23
- const variant = (component.variant || TabsVariants.Default) as TabsVariants;
24
- const [activeTabId, setActiveTabId] = useState(component?.slots?.tabItems?.[0]?._id as string);
25
+ const tabItems = slotData?.tabItems?.map(tabComponent => ({
26
+ ...(flattenValues(tabComponent) as { text?: string }),
27
+ id: (tabComponent?._id as string) || '',
28
+ }));
25
29
 
26
- const tabItems = useMemo(() => {
27
- if (!component?.slots?.tabItems) return [];
28
- return component.slots.tabItems.map(tabComponent => ({
29
- ...(flattenValues(tabComponent) as { title?: string }),
30
- id: tabComponent._id as string,
31
- }));
32
- }, [component?.slots?.tabItems]);
30
+ const [activeTabId, setActiveTabId] = useState(tabItems?.[0]?.id || '');
33
31
 
34
- useEffect(() => {
35
- if (!tabItems.length) return;
36
- if (!activeTabId) setActiveTabId(tabItems[0]?.id || '');
37
- }, [tabItems, activeTabId]);
32
+ const handleTabClick = useCallback((event: MouseEvent<HTMLButtonElement>) => {
33
+ const tabId = (event.target as HTMLButtonElement).id;
34
+ setActiveTabId(tabId);
35
+ }, []);
38
36
 
39
37
  const handleContextualEditingTabClick = useCallback(
40
- (tabId: string) => {
38
+ (event: FocusEvent<HTMLButtonElement>) => {
39
+ const tabId = event.target.id;
41
40
  if (!context.isContextualEditing) return;
42
-
43
41
  setActiveTabId(tabId);
44
42
  },
45
43
  [context.isContextualEditing]
46
44
  );
47
45
 
48
46
  return (
49
- <Container
50
- className="flex flex-col gap-5"
51
- {...{ backgroundColor, spacing, border, fluidContent, fullHeight, fitHeight, height }}
52
- >
47
+ <Container className="flex flex-col gap-5" {...{ backgroundColor, spacing, border, fluidContent, height }}>
53
48
  <div className={getButtonContainerClasses({ color, variant })}>
54
- {tabItems.map((tabItem, index) => (
49
+ {tabItems?.map(({ id: currentTabId, [TAB_ITEM_TEXT_PARAMETER_ID]: currentTabText }) => (
55
50
  <button
56
- key={tabItem.id}
57
- onClick={() => setActiveTabId(tabItem.id)}
58
- className={getButtonClasses({ color, variant, tabItem, activeTabId })}
51
+ id={currentTabId}
52
+ key={currentTabId}
53
+ onClick={handleTabClick}
54
+ className={getButtonClasses({ color, variant, isActiveTab: currentTabId === activeTabId })}
59
55
  >
60
- {component?.slots?.tabItems?.[index] && (
61
- <UniformText
62
- onFocus={() => handleContextualEditingTabClick(tabItem.id)}
63
- context={context}
64
- parameterId="text"
65
- component={component?.slots?.tabItems[index]}
66
- placeholder="Tab title"
67
- />
68
- )}
56
+ <UniformText
57
+ id={currentTabId}
58
+ placeholder="Text goes here"
59
+ onFocus={handleContextualEditingTabClick}
60
+ parameter={
61
+ {
62
+ parameterId: TAB_ITEM_TEXT_PARAMETER_ID,
63
+ type: TAB_ITEM_TEXT_PARAMETER_TYPE,
64
+ value: currentTabText,
65
+ _contextualEditing: { isEditable: true },
66
+ } as ComponentParameter<string>
67
+ }
68
+ component={{ _id: currentTabId }}
69
+ />
69
70
  </button>
70
71
  ))}
71
72
  </div>
72
- <UniformSlot data={component} context={context} slot={slots.tabItems}>
73
- {({ child, component: { _id: currentComponentId } }) =>
74
- currentComponentId === activeTabId ? (
75
- <Fragment key={currentComponentId}>{child}</Fragment>
76
- ) : (
77
- <Fragment key={currentComponentId} />
78
- )
73
+ <UniformSlot slot={slots.tabItems}>
74
+ {({ child, _id: currentComponentId, key }) =>
75
+ currentComponentId === activeTabId ? <Fragment key={key}>{child}</Fragment> : <Fragment key={key} />
79
76
  }
80
77
  </UniformSlot>
81
78
  </Container>
@@ -1,15 +1,15 @@
1
- import { FC } from 'react';
1
+ import { FC, ReactNode } from 'react';
2
2
  import Container from '@/components/ui/Container';
3
- import { TestimonialProps } from '.';
3
+ import { TestimonialParameters } from '.';
4
4
 
5
5
  type WithLargeAvatarVariantProps = Pick<
6
- TestimonialProps,
7
- 'backgroundColor' | 'spacing' | 'border' | 'fluidContent' | 'fullHeight' | 'fitHeight' | 'height'
6
+ TestimonialParameters,
7
+ 'backgroundColor' | 'spacing' | 'border' | 'fluidContent' | 'height'
8
8
  > & {
9
- testimonialPrimaryImage: React.ReactNode;
10
- testimonialContent: React.ReactNode;
11
- testimonialAuthor: React.ReactNode;
12
- testimonialSecondaryImage: React.ReactNode;
9
+ testimonialPrimaryImage: ReactNode;
10
+ testimonialContent: ReactNode;
11
+ testimonialAuthor: ReactNode;
12
+ testimonialSecondaryImage: ReactNode;
13
13
  };
14
14
 
15
15
  export const DefaultVariant: FC<WithLargeAvatarVariantProps> = ({
@@ -21,11 +21,9 @@ export const DefaultVariant: FC<WithLargeAvatarVariantProps> = ({
21
21
  spacing,
22
22
  border,
23
23
  fluidContent,
24
- fullHeight,
25
- fitHeight,
26
24
  height,
27
25
  }) => (
28
- <Container {...{ backgroundColor, spacing, border, fluidContent, fullHeight, fitHeight, height }}>
26
+ <Container {...{ backgroundColor, spacing, border, fluidContent, height }}>
29
27
  <div className="mx-auto flex flex-col items-center md:max-w-[80%]">
30
28
  <div>{testimonialSecondaryImage}</div>
31
29
  <div className="my-8">{testimonialContent}</div>
@@ -1,5 +1,5 @@
1
- import { ComponentProps } from '@uniformdev/canvas-next-rsc/component';
2
1
  import { ContainerParameters } from '@/components/canvas/Container/parameters';
2
+ import { ComponentProps } from '@/types/cskTypes';
3
3
 
4
4
  export enum TestimonialVariants {
5
5
  WithLargeAvatar = 'withLargeAvatar',
@@ -17,5 +17,5 @@ export enum TestimonialSlots {
17
17
 
18
18
  export type TestimonialProps = ComponentProps<TestimonialParameters, TestimonialSlots>;
19
19
 
20
- export { Testimonial as default } from './testimonial';
20
+ export { default } from './testimonial';
21
21
  export { TestimonialEmptyPlaceholder } from './empty-placeholder';
@@ -1,38 +1,30 @@
1
1
  import { FC } from 'react';
2
- import { UniformSlot } from '@uniformdev/canvas-next-rsc/component';
3
- import { TestimonialVariants, TestimonialProps } from '.';
2
+ import { UniformSlot } from '@uniformdev/next-app-router/component';
3
+ import { withFlattenParameters } from '@/utils/withFlattenParameters';
4
+ import { TestimonialVariants, TestimonialProps, TestimonialParameters } from '.';
4
5
  import { DefaultVariant } from './default-variant';
5
6
  import { WithLargeAvatarVariant } from './with-large-avatar-variant';
6
7
  import { WithOverlappingImageVariant } from './with-overlapping-image-variant';
7
8
 
8
- export const Testimonial: FC<TestimonialProps> = ({
9
- context,
10
- component,
9
+ const Testimonial: FC<TestimonialProps & TestimonialParameters> = ({
11
10
  slots,
12
11
  backgroundColor,
13
12
  spacing,
14
13
  border,
15
14
  fluidContent,
16
- fullHeight,
17
- fitHeight,
18
15
  height,
16
+ variant,
19
17
  }) => {
20
- const variant = component.variant as TestimonialVariants | undefined;
21
-
22
18
  const variantProps = {
23
19
  backgroundColor,
24
20
  spacing,
25
21
  border,
26
22
  fluidContent,
27
- fullHeight,
28
- fitHeight,
29
23
  height,
30
- testimonialPrimaryImage: <UniformSlot context={context} data={component} slot={slots.testimonialPrimaryImage} />,
31
- testimonialContent: <UniformSlot context={context} data={component} slot={slots.testimonialContent} />,
32
- testimonialAuthor: <UniformSlot context={context} data={component} slot={slots.testimonialAuthor} />,
33
- testimonialSecondaryImage: (
34
- <UniformSlot context={context} data={component} slot={slots.testimonialSecondaryImage} />
35
- ),
24
+ testimonialPrimaryImage: <UniformSlot slot={slots.testimonialPrimaryImage} />,
25
+ testimonialContent: <UniformSlot slot={slots.testimonialContent} />,
26
+ testimonialAuthor: <UniformSlot slot={slots.testimonialAuthor} />,
27
+ testimonialSecondaryImage: <UniformSlot slot={slots.testimonialSecondaryImage} />,
36
28
  };
37
29
 
38
30
  switch (variant) {
@@ -46,3 +38,5 @@ export const Testimonial: FC<TestimonialProps> = ({
46
38
  return <DefaultVariant {...variantProps} />;
47
39
  }
48
40
  };
41
+
42
+ export default withFlattenParameters(Testimonial);
@@ -1,15 +1,15 @@
1
- import { FC } from 'react';
1
+ import { FC, ReactNode } from 'react';
2
2
  import Container from '@/components/ui/Container';
3
- import { TestimonialProps } from '.';
3
+ import { TestimonialParameters } from '.';
4
4
 
5
5
  type WithLargeAvatarVariantProps = Pick<
6
- TestimonialProps,
7
- 'backgroundColor' | 'spacing' | 'border' | 'fluidContent' | 'fullHeight' | 'fitHeight' | 'height'
6
+ TestimonialParameters,
7
+ 'backgroundColor' | 'spacing' | 'border' | 'fluidContent' | 'height'
8
8
  > & {
9
- testimonialPrimaryImage: React.ReactNode;
10
- testimonialContent: React.ReactNode;
11
- testimonialAuthor: React.ReactNode;
12
- testimonialSecondaryImage: React.ReactNode;
9
+ testimonialPrimaryImage: ReactNode;
10
+ testimonialContent: ReactNode;
11
+ testimonialAuthor: ReactNode;
12
+ testimonialSecondaryImage: ReactNode;
13
13
  };
14
14
 
15
15
  export const WithLargeAvatarVariant: FC<WithLargeAvatarVariantProps> = ({
@@ -21,11 +21,9 @@ export const WithLargeAvatarVariant: FC<WithLargeAvatarVariantProps> = ({
21
21
  spacing,
22
22
  border,
23
23
  fluidContent,
24
- fullHeight,
25
- fitHeight,
26
24
  height,
27
25
  }) => (
28
- <Container {...{ backgroundColor, spacing, border, fluidContent, fullHeight, fitHeight, height }}>
26
+ <Container {...{ backgroundColor, spacing, border, fluidContent, height }}>
29
27
  <div className="mx-auto flex items-center gap-x-10 md:max-w-[80%]">
30
28
  <div className="hidden aspect-square w-full max-w-xs shrink-0 overflow-hidden rounded-xl lg:block">
31
29
  {testimonialPrimaryImage}