@uniformdev/csk-components 6.1.57 → 6.1.64-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-CrBZatTs.d.mts +18 -0
  208. package/dist/index-vyIO0XN2.d.mts +90 -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 +21 -8
  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 +4 -1
  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 +48 -15
  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
@@ -1,15 +1,16 @@
1
1
  import { FC } from 'react';
2
- import { UniformText } from '@uniformdev/canvas-next-rsc/component';
2
+ import { ComponentParameter, UniformText } from '@uniformdev/next-app-router/component';
3
3
  import BaseIconLabel from '@/components/ui/IconLabel';
4
4
  import BaseImage from '@/components/ui/Image';
5
5
  import InlineSVG from '@/components/ui/InlineSVG';
6
- import { resolveAsset } from '@/utils/assets';
7
- import { formatUniformLink, isExternalLink, resolveRouteToPath } from '@/utils/routing';
6
+ import { ReplaceFieldsWithAssets } from '@/types/cskTypes';
7
+ import { formatUniformLink, isExternalLink } from '@/utils/routing';
8
8
  import { cn, resolveViewPort } from '@/utils/styling';
9
- import { NavigationLinkProps } from '.';
9
+ import { withFlattenParameters } from '@/utils/withFlattenParameters';
10
+ import { NavigationLinkProps, NavigationLinkParameters } from '.';
10
11
  import { Wrapper } from './wrapper';
11
12
 
12
- export const NavigationLink: FC<NavigationLinkProps> = ({
13
+ const NavigationLink: FC<NavigationLinkProps & ReplaceFieldsWithAssets<NavigationLinkParameters, 'icon'>> = ({
13
14
  icon,
14
15
  link,
15
16
  activeState,
@@ -26,11 +27,12 @@ export const NavigationLink: FC<NavigationLinkProps> = ({
26
27
  context,
27
28
  hoverEffect = '',
28
29
  className,
30
+ parameters,
29
31
  }) => {
30
32
  const href = formatUniformLink(link);
31
- const isActive = activeState && resolveRouteToPath(context.matchedRoute, context.dynamicInputs) === href;
33
+ const isActive = !activeState && context.pageState.routePath === href;
32
34
 
33
- const [resolvedImage] = resolveAsset(icon);
35
+ const [resolvedImage] = icon || [];
34
36
  const { url, title = '' } = resolvedImage || {};
35
37
 
36
38
  const renderUrl = () => {
@@ -55,12 +57,13 @@ export const NavigationLink: FC<NavigationLinkProps> = ({
55
57
  >
56
58
  <UniformText
57
59
  placeholder="Text goes here"
58
- parameterId="text"
60
+ parameter={parameters.text as ComponentParameter<string>}
59
61
  className="whitespace-nowrap"
60
62
  component={component}
61
- context={context}
62
63
  />
63
64
  </BaseIconLabel>
64
65
  </Wrapper>
65
66
  );
66
67
  };
68
+
69
+ export default withFlattenParameters(NavigationLink);
@@ -1,9 +1,9 @@
1
- import { ComponentProps, CustomSlotChildRenderFunc } from '@uniformdev/canvas-next-rsc/component';
2
-
1
+ import { UniformSlotProps } from '@uniformdev/next-app-router/component';
2
+ import { ComponentProps } from '@/types/cskTypes';
3
3
  export type PageAdditionalProps = {
4
- headerCustomRenderer?: CustomSlotChildRenderFunc;
5
- contentCustomRenderer?: CustomSlotChildRenderFunc;
6
- footerCustomRenderer?: CustomSlotChildRenderFunc;
4
+ headerCustomRenderer?: UniformSlotProps['children'];
5
+ contentCustomRenderer?: UniformSlotProps['children'];
6
+ footerCustomRenderer?: UniformSlotProps['children'];
7
7
  };
8
8
 
9
9
  export type PageParameters = {
@@ -17,7 +17,7 @@ export enum CommonPageSlots {
17
17
  PageFooter = 'pageFooter',
18
18
  }
19
19
 
20
- export type PageProps = ComponentProps<PageParameters & PageAdditionalProps, CommonPageSlots>;
20
+ export type PageProps = ComponentProps<PageParameters, CommonPageSlots> & PageAdditionalProps;
21
21
 
22
- export { Page as default } from './page';
22
+ export { default } from './page';
23
23
  export { PageEmptyPlaceholder } from './empty-placeholder';
@@ -1,12 +1,11 @@
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 BasePage from '@/components/ui/Page';
4
- import { PageProps } from '.';
4
+ import { withFlattenParameters } from '@/utils/withFlattenParameters';
5
+ import { PageProps, PageParameters } from '.';
5
6
 
6
- export const Page: FC<PageProps> = ({
7
+ const Page: FC<PageProps & PageParameters> = ({
7
8
  slots,
8
- component,
9
- context,
10
9
  backgroundColor,
11
10
  headerCustomRenderer,
12
11
  contentCustomRenderer,
@@ -14,19 +13,11 @@ export const Page: FC<PageProps> = ({
14
13
  }) => (
15
14
  <BasePage
16
15
  backgroundColor={backgroundColor}
17
- header={
18
- <UniformSlot context={context} slot={slots.pageHeader} data={component}>
19
- {headerCustomRenderer}
20
- </UniformSlot>
21
- }
22
- footer={
23
- <UniformSlot context={context} slot={slots.pageFooter} data={component}>
24
- {footerCustomRenderer}
25
- </UniformSlot>
26
- }
16
+ header={<UniformSlot slot={slots.pageHeader}>{headerCustomRenderer}</UniformSlot>}
17
+ footer={<UniformSlot slot={slots.pageFooter}>{footerCustomRenderer}</UniformSlot>}
27
18
  >
28
- <UniformSlot context={context} slot={slots.pageContent} data={component}>
29
- {contentCustomRenderer}
30
- </UniformSlot>
19
+ <UniformSlot slot={slots.pageContent}>{contentCustomRenderer}</UniformSlot>
31
20
  </BasePage>
32
21
  );
22
+
23
+ export default withFlattenParameters(Page);
@@ -1,7 +1,7 @@
1
1
  import { FC, ReactNode } from 'react';
2
2
  import Container from '@/components/ui/Container';
3
3
  import Rating from '@/components/ui/Rating';
4
- import { ReviewProps } from '.';
4
+ import { ReviewParameters, ReviewProps } from '.';
5
5
 
6
6
  type DefaultVariantProps = ReviewProps & {
7
7
  ReviewImage: ReactNode;
@@ -9,7 +9,7 @@ type DefaultVariantProps = ReviewProps & {
9
9
  ReviewContent: ReactNode;
10
10
  };
11
11
 
12
- export const DefaultVariant: FC<DefaultVariantProps> = ({
12
+ export const DefaultVariant: FC<DefaultVariantProps & ReviewParameters> = ({
13
13
  stars,
14
14
  starsColor,
15
15
  activeStarsColor,
@@ -18,14 +18,12 @@ export const DefaultVariant: FC<DefaultVariantProps> = ({
18
18
  spacing,
19
19
  border,
20
20
  fluidContent,
21
- fullHeight,
22
- fitHeight,
23
21
  height,
24
22
  ReviewImage,
25
23
  ReviewPersonInfo,
26
24
  ReviewContent,
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 lg:max-w-[60%]">
30
28
  <div className="aspect-square size-12 shrink-0 rounded-full">{ReviewImage}</div>
31
29
  <div className="ml-6">
@@ -1,9 +1,12 @@
1
1
  import { ResolveEmptyPlaceholderOptions } from '@/types/cskTypes';
2
2
  import { DEFAULT_EMPTY_PLACEHOLDER } from '@/utils/createEmptyPlaceholderResolver';
3
- import { ReviewSlots, ReviewVariants } from '.';
3
+ import { ReviewSlots } from '.';
4
+
5
+ export const ReviewEmptyPlaceholder = ({ slotName }: ResolveEmptyPlaceholderOptions) => {
6
+ // To show correct empty placeholder for current variant
7
+ // const isMultiColumn = parentComponent?.variant === ReviewVariants.MultiColumn;
8
+ const isMultiColumn = true;
4
9
 
5
- export const ReviewEmptyPlaceholder = ({ parentComponent, slotName }: ResolveEmptyPlaceholderOptions) => {
6
- const isMultiColumn = parentComponent?.variant === ReviewVariants.MultiColumn;
7
10
  switch (slotName) {
8
11
  case ReviewSlots.ReviewImage:
9
12
  return {
@@ -1,11 +1,11 @@
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 ReviewParameters = ContainerParameters & {
5
- stars: number;
6
- starsColor: string;
7
- activeStarsColor: string;
8
- showRatingLabel: boolean;
5
+ stars?: number;
6
+ starsColor?: string;
7
+ activeStarsColor?: string;
8
+ showRatingLabel?: boolean;
9
9
  };
10
10
 
11
11
  export enum ReviewVariants {
@@ -20,5 +20,5 @@ export enum ReviewSlots {
20
20
 
21
21
  export type ReviewProps = ComponentProps<ReviewParameters, ReviewSlots>;
22
22
 
23
- export { Review as default } from './review';
23
+ export { default } from './review';
24
24
  export { ReviewEmptyPlaceholder } from './empty-placeholder';
@@ -1,7 +1,7 @@
1
1
  import { FC, ReactNode } from 'react';
2
2
  import Container from '@/components/ui/Container';
3
3
  import Rating from '@/components/ui/Rating';
4
- import { ReviewProps } from '.';
4
+ import { ReviewParameters, ReviewProps } from '.';
5
5
 
6
6
  type MultiColumnVariantProps = ReviewProps & {
7
7
  ReviewImage: ReactNode;
@@ -9,7 +9,7 @@ type MultiColumnVariantProps = ReviewProps & {
9
9
  ReviewContent: ReactNode;
10
10
  };
11
11
 
12
- export const MultiColumnVariant: FC<MultiColumnVariantProps> = ({
12
+ export const MultiColumnVariant: FC<MultiColumnVariantProps & ReviewParameters> = ({
13
13
  stars,
14
14
  starsColor,
15
15
  activeStarsColor,
@@ -18,14 +18,12 @@ export const MultiColumnVariant: FC<MultiColumnVariantProps> = ({
18
18
  spacing,
19
19
  border,
20
20
  fluidContent,
21
- fullHeight,
22
- fitHeight,
23
21
  height,
24
22
  ReviewImage,
25
23
  ReviewPersonInfo,
26
24
  ReviewContent,
27
25
  }) => (
28
- <Container {...{ backgroundColor, spacing, border, fluidContent, fullHeight, fitHeight, height }}>
26
+ <Container {...{ backgroundColor, spacing, border, fluidContent, height }}>
29
27
  <div className="grid md:grid-cols-12">
30
28
  <div className="mb-2 md:col-span-4 md:my-0">
31
29
  <div className="mb-2 aspect-square size-12 rounded-full">{ReviewImage}</div>
@@ -1,24 +1,24 @@
1
1
  import { FC } from 'react';
2
- import { UniformSlot } from '@uniformdev/canvas-next-rsc/component';
3
- import { ReviewProps, ReviewVariants } from '.';
2
+ import { UniformSlot } from '@uniformdev/next-app-router/component';
3
+ import { withFlattenParameters } from '@/utils/withFlattenParameters';
4
+ import { ReviewParameters, ReviewProps, ReviewVariants } from '.';
4
5
  import { DefaultVariant } from './default-variant';
5
6
  import { MultiColumnVariant } from './multi-column-variant';
6
7
 
7
- export const Review: FC<ReviewProps> = props => {
8
- const { component, context, slots } = props;
9
- const variant = component.variant as ReviewVariants | undefined;
10
-
8
+ const Review: FC<ReviewProps & ReviewParameters> = ({ slots, variant, ...props }) => {
11
9
  const variantProps = {
12
10
  ...props,
13
- ReviewImage: <UniformSlot context={context} data={component} slot={slots.reviewImage} />,
14
- ReviewPersonInfo: <UniformSlot context={context} data={component} slot={slots.reviewPersonInfo} />,
15
- ReviewContent: <UniformSlot context={context} data={component} slot={slots.reviewContent} />,
11
+ ReviewImage: <UniformSlot slot={slots.reviewImage} />,
12
+ ReviewPersonInfo: <UniformSlot slot={slots.reviewPersonInfo} />,
13
+ ReviewContent: <UniformSlot slot={slots.reviewContent} />,
16
14
  };
17
15
 
18
16
  switch (variant) {
19
17
  case ReviewVariants.MultiColumn:
20
- return <MultiColumnVariant {...variantProps} />;
18
+ return <MultiColumnVariant variant={variant} slots={slots} {...variantProps} />;
21
19
  default:
22
- return <DefaultVariant {...variantProps} />;
20
+ return <DefaultVariant variant={variant} slots={slots} {...variantProps} />;
23
21
  }
24
22
  };
23
+
24
+ export default withFlattenParameters(Review);
@@ -1,6 +1,7 @@
1
- import { ComponentProps } from '@uniformdev/canvas-next-rsc/component';
2
1
  import { RichTextNode } from '@uniformdev/richtext';
3
- import { RichText } from './rich-text';
2
+ import { ComponentProps } from '@/types/cskTypes';
3
+
4
+ type Size = 'sm' | 'base' | 'lg' | 'xl' | '2xl';
4
5
 
5
6
  export type RichTextAdditionalProps = {
6
7
  className?: string;
@@ -8,11 +9,11 @@ export type RichTextAdditionalProps = {
8
9
 
9
10
  export type RichTextParameters = {
10
11
  text?: RichTextNode;
12
+ size?: Size;
11
13
  color?: string;
12
14
  font?: string;
13
- lineCountRestrictions: string;
15
+ lineCountRestrictions?: string;
14
16
  };
15
17
 
16
- export type RichTextProps = ComponentProps<RichTextParameters & RichTextAdditionalProps>;
17
-
18
- export default RichText;
18
+ export { default } from './rich-text';
19
+ export type RichTextProps = ComponentProps<RichTextParameters> & RichTextAdditionalProps;
@@ -1,16 +1,33 @@
1
1
  import { FC } from 'react';
2
- import { UniformRichText } from '@uniformdev/canvas-next-rsc/component';
2
+ import { ComponentParameter, UniformRichText } from '@uniformdev/next-app-router/component';
3
3
  import BaseText from '@/components/ui/Text';
4
- import { cn } from '@/utils/styling';
5
- import { RichTextProps } from '.';
4
+ import { cn, resolveViewPort } from '@/utils/styling';
5
+ import { withFlattenParameters } from '@/utils/withFlattenParameters';
6
+ import { RichTextProps, RichTextParameters, RichTextAdditionalProps } from '.';
6
7
 
7
- export const RichText: FC<RichTextProps> = ({ color, lineCountRestrictions, font, component, className }) => (
8
+ const RichText: FC<RichTextProps & RichTextParameters & RichTextAdditionalProps> = ({
9
+ color,
10
+ lineCountRestrictions,
11
+ font,
12
+ size,
13
+ component,
14
+ className,
15
+ parameters,
16
+ }) => (
8
17
  <BaseText lineCountRestrictions={lineCountRestrictions} color={color} font={font}>
9
18
  <UniformRichText
10
- className={cn('prose max-w-full marker:text-current [&_*:not(pre)]:text-current', className)}
11
- parameterId="text"
19
+ className={cn(
20
+ 'prose max-w-full marker:text-current [&_*:not(pre)]:text-current',
21
+ {
22
+ [resolveViewPort(size, 'prose-{value}')]: size,
23
+ },
24
+ className
25
+ )}
26
+ parameter={parameters.text as ComponentParameter<string>}
12
27
  component={component}
13
28
  placeholder="Rich text content goes here..."
14
29
  />
15
30
  </BaseText>
16
31
  );
32
+
33
+ export default withFlattenParameters(RichText);
@@ -1,4 +1,4 @@
1
- import { FC } from 'react';
1
+ import { FC, ReactNode } from 'react';
2
2
  import Container from '@/components/ui/Container';
3
3
  import { cn } from '@/utils/styling';
4
4
  import { SectionParameters, SectionVariants } from '.';
@@ -8,15 +8,11 @@ type ColumnsVariantProps = {
8
8
  spacing: SectionParameters['spacing'];
9
9
  border: SectionParameters['border'];
10
10
  fluidContent: SectionParameters['fluidContent'];
11
- /** @deprecated Use height prop instead */
12
- fullHeight: SectionParameters['fullHeight'];
13
- /** @deprecated Use height prop instead */
14
- fitHeight: SectionParameters['fitHeight'];
15
11
  height: SectionParameters['height'];
16
12
  variant: SectionVariants;
17
- sectionMedia: React.ReactNode;
18
- sectionContent: React.ReactNode;
19
- sectionCTA: React.ReactNode;
13
+ sectionMedia: ReactNode;
14
+ sectionContent: ReactNode;
15
+ sectionCTA: ReactNode;
20
16
  textAlignmentClass: string;
21
17
  buttonAlignmentClass: string;
22
18
  };
@@ -26,8 +22,6 @@ export const ColumnsVariant: FC<ColumnsVariantProps> = ({
26
22
  spacing,
27
23
  border,
28
24
  fluidContent,
29
- fullHeight,
30
- fitHeight,
31
25
  height,
32
26
  variant,
33
27
  sectionMedia,
@@ -36,7 +30,7 @@ export const ColumnsVariant: FC<ColumnsVariantProps> = ({
36
30
  textAlignmentClass,
37
31
  buttonAlignmentClass,
38
32
  }) => (
39
- <Container {...{ backgroundColor, spacing, border, fluidContent, fullHeight, fitHeight, height }}>
33
+ <Container {...{ backgroundColor, spacing, border, fluidContent, height }}>
40
34
  <div className={cn('grid grid-cols-1 items-center gap-4 px-4 lg:grid-cols-2 xl:px-0')}>
41
35
  <div className={cn('aspect-square', { 'order-last': variant === SectionVariants.ColumnsReverse })}>
42
36
  <div className="flex size-full items-center justify-center overflow-hidden">{sectionMedia}</div>
@@ -1,4 +1,4 @@
1
- import { FC } from 'react';
1
+ import { FC, ReactNode } from 'react';
2
2
  import Container from '@/components/ui/Container';
3
3
  import { cn } from '@/utils/styling';
4
4
  import { SectionParameters } from '.';
@@ -8,14 +8,10 @@ type DefaultVariantProps = {
8
8
  spacing?: SectionParameters['spacing'];
9
9
  border?: SectionParameters['border'];
10
10
  fluidContent?: SectionParameters['fluidContent'];
11
- /** @deprecated Use height prop instead */
12
- fullHeight?: SectionParameters['fullHeight'];
13
- /** @deprecated Use height prop instead */
14
- fitHeight?: SectionParameters['fitHeight'];
15
11
  height?: SectionParameters['height'];
16
- sectionMedia: React.ReactNode;
17
- sectionContent: React.ReactNode;
18
- sectionCTA: React.ReactNode;
12
+ sectionMedia: ReactNode;
13
+ sectionContent: ReactNode;
14
+ sectionCTA: ReactNode;
19
15
  textAlignmentClass: string;
20
16
  buttonAlignmentClass: string;
21
17
  };
@@ -25,8 +21,6 @@ export const DefaultVariant: FC<DefaultVariantProps> = ({
25
21
  spacing,
26
22
  border,
27
23
  fluidContent,
28
- fullHeight,
29
- fitHeight,
30
24
  height,
31
25
  sectionMedia,
32
26
  sectionContent,
@@ -34,14 +28,11 @@ export const DefaultVariant: FC<DefaultVariantProps> = ({
34
28
  textAlignmentClass,
35
29
  buttonAlignmentClass,
36
30
  }) => (
37
- <Container
38
- className="relative overflow-hidden"
39
- {...{ backgroundColor, spacing, border, fluidContent, fullHeight, fitHeight, height }}
40
- >
31
+ <Container className="relative overflow-hidden" {...{ backgroundColor, spacing, border, fluidContent, height }}>
41
32
  <div className="absolute left-0 top-0 size-full overflow-hidden">{sectionMedia}</div>
42
33
  <Container className="relative flex flex-col gap-8">
43
- <div className={cn('flex flex-col gap-4', textAlignmentClass)}>{sectionContent}</div>
44
- <div className={cn('flex flex-wrap gap-2', buttonAlignmentClass)}>{sectionCTA}</div>
34
+ {sectionContent && <div className={cn('flex flex-col gap-4', textAlignmentClass)}>{sectionContent}</div>}
35
+ {sectionCTA && <div className={cn('flex flex-wrap gap-2', buttonAlignmentClass)}>{sectionCTA}</div>}
45
36
  </Container>
46
37
  </Container>
47
38
  );
@@ -2,8 +2,11 @@ import { ResolveEmptyPlaceholderOptions } from '@/types/cskTypes';
2
2
  import { DEFAULT_EMPTY_PLACEHOLDER } from '@/utils/createEmptyPlaceholderResolver';
3
3
  import { SectionSlots } from '.';
4
4
 
5
- export const SectionEmptyPlaceholder = ({ parentComponent, slotName }: ResolveEmptyPlaceholderOptions) => {
6
- const isDefault = !parentComponent?.variant;
5
+ export const SectionEmptyPlaceholder = ({ slotName }: ResolveEmptyPlaceholderOptions) => {
6
+ // To show correct empty placeholder for current variant
7
+ //const isDefault = !parentComponent?.variant;
8
+ const isDefault = true;
9
+
7
10
  switch (slotName) {
8
11
  case SectionSlots.SectionMedia:
9
12
  return {
@@ -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 ContentAlignment {
5
5
  Left = 'left',
@@ -24,5 +24,5 @@ export enum SectionSlots {
24
24
 
25
25
  export type SectionProps = ComponentProps<SectionParameters, SectionSlots>;
26
26
 
27
- export { Section as default } from './section';
27
+ export { default } from './section';
28
28
  export { SectionEmptyPlaceholder } from './empty-placeholder';
@@ -1,46 +1,41 @@
1
1
  import { FC } from 'react';
2
- import { UniformSlot } from '@uniformdev/canvas-next-rsc/component';
3
- import { SectionProps, SectionVariants } from '.';
2
+ import { UniformSlot } from '@uniformdev/next-app-router/component';
3
+ import { withFlattenParameters } from '@/utils/withFlattenParameters';
4
+ import { SectionParameters, SectionProps, SectionVariants } from '.';
4
5
  import { ColumnsVariant } from './columns-variant';
5
6
  import { DefaultVariant } from './default-variant';
6
7
  import { getButtonAlignmentClass, getTextAlignmentClass } from './style-utils';
7
8
 
8
- export const Section: FC<SectionProps> = ({
9
+ const Section: FC<SectionProps & SectionParameters> = ({
9
10
  contentAlignment,
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,
17
+ variant,
20
18
  }) => {
21
- const variant = component.variant as SectionVariants;
22
-
23
19
  const variantProps = {
24
- variant,
25
20
  backgroundColor,
26
21
  spacing,
27
22
  border,
28
23
  fluidContent,
29
- fullHeight,
30
- fitHeight,
31
24
  height,
32
25
  textAlignmentClass: getTextAlignmentClass({ contentAlignment }),
33
26
  buttonAlignmentClass: getButtonAlignmentClass({ contentAlignment }),
34
- sectionMedia: <UniformSlot data={component} context={context} slot={slots.sectionMedia} />,
35
- sectionContent: <UniformSlot data={component} context={context} slot={slots.sectionContent} />,
36
- sectionCTA: <UniformSlot data={component} context={context} slot={slots.sectionCTA} />,
27
+ sectionMedia: <UniformSlot slot={slots.sectionMedia} />,
28
+ sectionContent: slots.sectionContent ? <UniformSlot slot={slots.sectionContent} /> : undefined,
29
+ sectionCTA: slots.sectionCTA ? <UniformSlot slot={slots.sectionCTA} /> : undefined,
37
30
  };
38
31
 
39
32
  switch (variant) {
40
33
  case SectionVariants.Columns:
41
34
  case SectionVariants.ColumnsReverse:
42
- return <ColumnsVariant {...variantProps} />;
35
+ return <ColumnsVariant variant={variant} {...variantProps} />;
43
36
  default:
44
37
  return <DefaultVariant {...variantProps} />;
45
38
  }
46
39
  };
40
+
41
+ export default withFlattenParameters(Section);
@@ -0,0 +1,16 @@
1
+ import { AssetParamValue, LinkParamValue, RichTextParamValue } from '@uniformdev/canvas';
2
+ import { ComponentProps } from '@/types/cskTypes';
3
+
4
+ export type SimpleFooterParameters = {
5
+ logo?: AssetParamValue;
6
+ copyright?: RichTextParamValue;
7
+ footerLinkSectionTitle?: string;
8
+ links?: {
9
+ title: string;
10
+ link: LinkParamValue;
11
+ }[];
12
+ };
13
+
14
+ export type SimpleFooterProps = ComponentProps<SimpleFooterParameters>;
15
+
16
+ export { default } from './simple-footer';
@@ -0,0 +1,85 @@
1
+ import { FC } from 'react';
2
+ import Image from 'next/image';
3
+ import Link from 'next/link';
4
+ import { UniformRichText, ComponentParameter, UniformText } from '@uniformdev/next-app-router/component';
5
+ import BaseFooter from '@/components/ui/Footer';
6
+ import { ReplaceFieldsWithAssets } from '@/types/cskTypes';
7
+ import { withFlattenParameters } from '@/utils/withFlattenParameters';
8
+ import { SimpleFooterParameters, SimpleFooterProps } from '.';
9
+
10
+ const GitHubIcon = () => (
11
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" height="30" viewBox="0 0 35 34" width="30">
12
+ <path
13
+ clipRule="evenodd"
14
+ d="M17.5145 0C7.82942 0 0 7.79163 0 17.4309C0 25.1362 5.01658 31.6585 11.9759 33.9669C12.846 34.1405 13.1647 33.5919 13.1647 33.1304C13.1647 32.7263 13.136 31.3411 13.136 29.8979C8.26393 30.937 7.24936 27.82 7.24936 27.82C6.46638 25.7999 5.30626 25.2807 5.30626 25.2807C3.71162 24.2129 5.42241 24.2129 5.42241 24.2129C7.19128 24.3283 8.11946 26.0021 8.11946 26.0021C9.68505 28.6569 12.2079 27.9068 13.2228 27.445C13.3676 26.3194 13.8319 25.5403 14.3248 25.1075C10.439 24.7034 6.35059 23.2028 6.35059 16.5073C6.35059 14.6026 7.04609 13.0443 8.14814 11.8323C7.97426 11.3995 7.36516 9.60992 8.32237 7.2147C8.32237 7.2147 9.80121 6.75287 13.1357 9.00394C14.5633 8.62239 16.0356 8.42829 17.5145 8.42665C18.9933 8.42665 20.5008 8.62888 21.8929 9.00394C25.2277 6.75287 26.7066 7.2147 26.7066 7.2147C27.6638 9.60992 27.0543 11.3995 26.8805 11.8323C28.0116 13.0443 28.6784 14.6026 28.6784 16.5073C28.6784 23.2028 24.59 24.6743 20.6751 25.1075C21.3132 25.6557 21.8639 26.6945 21.8639 28.3396C21.8639 30.6771 21.8352 32.5531 21.8352 33.13C21.8352 33.5919 22.1543 34.1405 23.024 33.9673C29.9833 31.6581 34.9999 25.1362 34.9999 17.4309C35.0286 7.79163 27.1705 0 17.5145 0Z"
15
+ fill="#1E1E1E"
16
+ fillRule="evenodd"
17
+ />
18
+ </svg>
19
+ );
20
+
21
+ const StorybookIcon = () => (
22
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" height="30" viewBox="0 0 29 29" width="30">
23
+ <path d="M29 0H0V29H29V0Z" fill="url(#pattern0_9543_564)" />
24
+ <defs>
25
+ <pattern height="1" id="pattern0_9543_564" patternContentUnits="objectBoundingBox" width="1">
26
+ <use href="#image0_9543_564" transform="scale(0.005)" />
27
+ </pattern>
28
+ <image
29
+ height="200"
30
+ href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAMAAACahl6sAAAC31BMVEVHcEz/R4X/R4VFHi3/R4X/R4X/SIb/R4V/I0N/I0L/R4V/JEP/R4X/R4X/SIV/I0P/R4V/JUZ/I0J/JEP/SYl/I0J/I0J/JEO/PGn/R4X/R4X/SIZ/I0N/I0J/I0N/I0J/I0J/I0J/I0J/J0n/R4X/R4X/R4b/R4X/R4X/R4X/SIZ/T2ByIj5/JkR/I0N/I0J/I0J/I0J/I0J/I0N/JEO/OGW/OGv/T47/R4b/R4X/R4X/R4X/R4b/R4X/R4X/6O9/I0N/I0JwLEN/JUR/I0J/I0J/I0J/I0J/I0J/I0JVLDt/JEK/ZIP/TIn/R4X/R4X/R4X/R4X/SIb/qMV/I0J/I0K/Nm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l770pS+K2fkfKf4tQm6IXkoAAAAASUVORK5CYII"
31
+ id="image0_9543_564"
32
+ width="200"
33
+ />
34
+ </defs>
35
+ </svg>
36
+ );
37
+
38
+ export const Footer: FC<SimpleFooterProps & ReplaceFieldsWithAssets<SimpleFooterParameters, 'logo'>> = ({
39
+ logo,
40
+ links,
41
+ parameters,
42
+ component,
43
+ }) => (
44
+ <BaseFooter
45
+ logo={logo?.[0]?.url && <Image src={logo?.[0]?.url} alt="Logo" width={180} height={47} />}
46
+ copyright={<UniformRichText parameter={parameters.copyright as ComponentParameter<string>} component={component} />}
47
+ content={
48
+ <div className="flex lg:gap-32 md:gap-16 gap-16">
49
+ <div className="flex flex-col gap-2">
50
+ <UniformText
51
+ className="text-text-tertiary lg:text-base font-bold uppercase"
52
+ parameter={parameters.footerLinkSectionTitle as ComponentParameter<string>}
53
+ component={component}
54
+ />
55
+ {links?.map(link => (
56
+ <Link
57
+ className="text-text-primary font-bold transition-all duration-150 whitespace-nowrap"
58
+ href={link.link?.path || ''}
59
+ key={link.title}
60
+ >
61
+ {link.title}
62
+ </Link>
63
+ ))}
64
+ </div>
65
+ <div className="flex gap-4">
66
+ <Link href="https://unfrm.to/csk-sb">
67
+ <StorybookIcon />
68
+ </Link>
69
+ <Link href="https://unfrm.to/csk-repo">
70
+ <GitHubIcon />
71
+ </Link>
72
+ </div>
73
+ </div>
74
+ }
75
+ backgroundColor="general-color-1"
76
+ spacing={{
77
+ paddingTop: 'container-small',
78
+ paddingBottom: 'container-small',
79
+ }}
80
+ border="border-footer"
81
+ fluidContent={false}
82
+ />
83
+ );
84
+
85
+ export default withFlattenParameters(Footer);
@@ -0,0 +1,22 @@
1
+ import { AssetParamValue, LinkParamValue } from '@uniformdev/canvas';
2
+ import { ComponentProps } from '@/types/cskTypes';
3
+
4
+ export type SimpleHeaderParameters = {
5
+ logo?: AssetParamValue;
6
+ color?: string;
7
+ links?: {
8
+ title: string;
9
+ link: LinkParamValue;
10
+ }[];
11
+ backgroundColor?: string;
12
+ textColor?: string;
13
+ hoverTextColor?: string;
14
+ };
15
+
16
+ export enum SimpleHeaderVariants {
17
+ Sticky = 'sticky',
18
+ }
19
+
20
+ export type SimpleHeaderProps = ComponentProps<SimpleHeaderParameters>;
21
+
22
+ export { default } from './simple-header';