@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,27 +1,26 @@
1
1
  import dynamic from 'next/dynamic';
2
2
  import { AssetParamValue } from '@uniformdev/assets';
3
- import { ComponentProps } from '@uniformdev/canvas-next-rsc/component';
4
3
  import { ContainerParameters } from '@/components/canvas/Container/parameters';
4
+ import { ComponentProps } from '@/types/cskTypes';
5
5
 
6
6
  export type ImageGalleryParameters = ContainerParameters & {
7
7
  aspectRatio?: 'square' | 'video';
8
8
  items?: AssetParamValue;
9
9
  };
10
10
 
11
+ export type ImageGalleryAdditionalProps = {
12
+ config?: {
13
+ firstLineCount: number;
14
+ secondLineCount: number;
15
+ otherLinesCount: number;
16
+ };
17
+ };
18
+
11
19
  export enum ImageGallerySlots {
12
20
  Items = 'imageGalleryItems',
13
21
  }
14
22
 
15
- export type ImageGalleryProps = ComponentProps<
16
- ImageGalleryParameters & {
17
- config?: {
18
- firstLineCount: number;
19
- secondLineCount: number;
20
- otherLinesCount: number;
21
- };
22
- },
23
- ImageGallerySlots
24
- >;
23
+ export type ImageGalleryProps = ComponentProps<ImageGalleryParameters, ImageGallerySlots> & ImageGalleryAdditionalProps;
25
24
 
26
- export default dynamic(() => import('./image-gallery').then(mod => mod.ImageGallery));
25
+ export default dynamic(() => import('./image-gallery').then(mod => mod.default));
27
26
  export { ImageGalleryEmptyPlaceholder } from './empty-placeholder';
@@ -1,6 +1,5 @@
1
1
  import { LinkParamValue } from '@uniformdev/canvas';
2
- import { ComponentProps } from '@uniformdev/canvas-next-rsc/component';
3
- import { Link } from './link';
2
+ import { ComponentProps } from '@/types/cskTypes';
4
3
 
5
4
  export type LinkParameters = {
6
5
  displayName?: string;
@@ -14,4 +13,4 @@ export enum LinkSlots {
14
13
 
15
14
  export type LinkProps = ComponentProps<LinkParameters, LinkSlots>;
16
15
 
17
- export default Link;
16
+ export { default } from './link';
@@ -1,11 +1,14 @@
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 BaseLink from '@/components/ui/Link';
4
4
  import { formatUniformLink } from '@/utils/routing';
5
- import { LinkProps } from '.';
5
+ import { withFlattenParameters } from '@/utils/withFlattenParameters';
6
+ import { LinkProps, LinkParameters } from '.';
6
7
 
7
- export const Link: FC<LinkProps> = ({ component, context, slots, link, openInNewTab }) => (
8
+ export const Link: FC<LinkProps & LinkParameters> = ({ slots, link, openInNewTab }) => (
8
9
  <BaseLink link={formatUniformLink(link)} openInNewTab={openInNewTab}>
9
- <UniformSlot data={component} context={context} slot={slots.linkContent} />
10
+ <UniformSlot slot={slots.linkContent} />
10
11
  </BaseLink>
11
12
  );
13
+
14
+ export default withFlattenParameters(Link);
@@ -1,5 +1,5 @@
1
1
  import dynamic from 'next/dynamic';
2
- import { ComponentProps } from '@uniformdev/canvas-next-rsc/component';
2
+ import { ComponentProps } from '@/types/cskTypes';
3
3
 
4
4
  export const MaxWidthMap = {
5
5
  small: 'max-w-xl',
@@ -22,5 +22,5 @@ export enum ModalSlots {
22
22
 
23
23
  export type ModalProps = ComponentProps<ModalParameters, ModalSlots>;
24
24
 
25
- export default dynamic(() => import('./modal').then(mod => mod.Modal));
25
+ export default dynamic(() => import('./modal').then(mod => mod.default));
26
26
  export { ModalEmptyPlaceholder } from './empty-placeholder';
@@ -1,82 +1,24 @@
1
1
  'use client';
2
2
 
3
- import { FC, useCallback, useState, MouseEvent, useRef, useEffect } from 'react';
4
- import { UniformSlot } from '@uniformdev/canvas-next-rsc/component';
5
- import { cn } from '@/utils/styling';
6
- import { ModalProps } from '.';
7
- import { CloseIcon } from './close-icon';
8
- import { getCloseButtonClasses, getDialogClasses, getFormClasses } from './style-utils';
3
+ import { FC } from 'react';
4
+ import { UniformSlot } from '@uniformdev/next-app-router/component';
5
+ import BaseModal from '@/components/ui/Modal';
6
+ import { withFlattenParameters } from '@/utils/withFlattenParameters';
7
+ import { ModalParameters, ModalProps } from '.';
9
8
 
10
- export const Modal: FC<ModalProps> = ({
9
+ const Modal: FC<ModalProps & ModalParameters> = ({
11
10
  slots,
12
- component,
13
- context,
14
11
  maxWidth,
15
12
  backgroundColor,
16
13
  closeIconColor,
17
14
  disableCloseModalOnClickOutside,
18
- }) => {
19
- const modalActionsRef = useRef<HTMLDivElement>(null);
20
- const [showModal, setShowModal] = useState(false);
21
-
22
- const handleClickOutside = useCallback(() => {
23
- if (!disableCloseModalOnClickOutside) setShowModal(false);
24
- }, [disableCloseModalOnClickOutside]);
25
-
26
- const toggleModal = useCallback(() => {
27
- setShowModal(prev => !prev);
28
- }, []);
29
-
30
- const handleClickContent = useCallback((e: MouseEvent<HTMLFormElement>) => {
31
- e.stopPropagation();
32
- }, []);
33
-
34
- useEffect(() => {
35
- if (!modalActionsRef.current) return;
36
- const currentActions = modalActionsRef.current.querySelectorAll('button, a');
37
- const handleClickButton = () => setShowModal(false);
38
-
39
- currentActions.forEach(button => {
40
- button.addEventListener('click', handleClickButton);
41
- });
42
- return () =>
43
- currentActions.forEach(button => {
44
- button.removeEventListener('click', handleClickButton);
45
- });
46
- }, []);
47
-
48
- return (
49
- <div>
50
- <div onClick={toggleModal}>
51
- <UniformSlot data={component} context={context} slot={slots.trigger} />
52
- </div>
53
- <div className={getDialogClasses({ showModal })}>
54
- <dialog
55
- open={showModal}
56
- onClick={handleClickOutside}
57
- aria-label="Close modal"
58
- aria-modal="true"
59
- className="flex size-full items-center justify-center bg-black/50 px-4"
60
- >
61
- <form method="dialog" className={getFormClasses({ maxWidth, backgroundColor })} onClick={handleClickContent}>
62
- <button onClick={toggleModal} className={getCloseButtonClasses({ disableCloseModalOnClickOutside })}>
63
- <CloseIcon
64
- className={cn({
65
- [`fill-${closeIconColor}`]: closeIconColor,
66
- })}
67
- />
68
- </button>
69
- <div className="p-6 md:p-8">
70
- <UniformSlot data={component} context={context} slot={slots.modalContent} />
71
- </div>
72
- {slots?.modalActions?.items?.length && (
73
- <div ref={modalActionsRef} className="border-t p-6 md:p-8">
74
- <UniformSlot data={component} context={context} slot={slots.modalActions} />
75
- </div>
76
- )}
77
- </form>
78
- </dialog>
79
- </div>
80
- </div>
81
- );
82
- };
15
+ }) => (
16
+ <BaseModal
17
+ {...{ maxWidth, backgroundColor, closeIconColor, disableCloseModalOnClickOutside }}
18
+ trigger={<UniformSlot slot={slots.trigger} />}
19
+ content={<UniformSlot slot={slots.modalContent} />}
20
+ actions={slots?.modalActions?.items?.length && <UniformSlot slot={slots.modalActions} />}
21
+ />
22
+ );
23
+
24
+ export default withFlattenParameters(Modal);
@@ -1,25 +1,21 @@
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 Grid from '@/components/ui/Grid';
4
4
  import GridItem from '@/components/ui/GridItem';
5
5
  import { cn, resolveViewPort } from '@/utils/styling';
6
- import { NavigationFlyoutProps } from '.';
6
+ import { NavigationFlyoutProps, NavigationFlyoutParameters } from '.';
7
7
 
8
- type NavigationFlyoutPropsDesktopContentProps = Pick<
9
- NavigationFlyoutProps,
10
- 'backgroundColor' | 'border' | 'context' | 'slots' | 'component'
11
- > & {
12
- isOpen: boolean;
13
- hasRightContent: boolean;
14
- };
8
+ type NavigationFlyoutPropsDesktopContentProps = Pick<NavigationFlyoutProps, 'context' | 'slots' | 'component'> &
9
+ Pick<NavigationFlyoutParameters, 'backgroundColor' | 'border'> & {
10
+ isOpen: boolean;
11
+ hasRightContent: boolean;
12
+ };
15
13
 
16
14
  export const NavigationFlyoutPropsDesktopContent: FC<NavigationFlyoutPropsDesktopContentProps> = ({
17
15
  isOpen,
18
16
  backgroundColor,
19
- context,
20
17
  slots,
21
18
  border,
22
- component,
23
19
  hasRightContent,
24
20
  }) => (
25
21
  <div
@@ -39,11 +35,11 @@ export const NavigationFlyoutPropsDesktopContent: FC<NavigationFlyoutPropsDeskto
39
35
  <Grid columnsCount="2" gapX="4">
40
36
  <GridItem>
41
37
  <div className="flex flex-col gap-y-4">
42
- <UniformSlot context={context} data={component} slot={slots.navigationFlyoutLeftContent} />
38
+ <UniformSlot slot={slots.navigationFlyoutLeftContent} />
43
39
  </div>
44
40
  </GridItem>
45
41
  <GridItem>
46
- <UniformSlot context={context} data={component} slot={slots.navigationFlyoutRightContent} />
42
+ <UniformSlot slot={slots.navigationFlyoutRightContent} />
47
43
  </GridItem>
48
44
  </Grid>
49
45
  </div>
@@ -1,9 +1,13 @@
1
1
  import dynamic from 'next/dynamic';
2
2
  import { AssetParamValue } from '@uniformdev/assets';
3
3
  import { LinkParamValue } from '@uniformdev/canvas';
4
- import { ComponentProps } from '@uniformdev/canvas-next-rsc/component';
5
4
  import { TextParameters } from '@/components/canvas/Text/parameters';
6
- import { ViewPort } from '@/types/cskTypes';
5
+ import BaseImage from '@/components/ui/Image';
6
+ import InlineSVG from '@/components/ui/InlineSVG';
7
+ import { ComponentProps, ViewPort } from '@/types/cskTypes';
8
+ import { resolveAsset } from '@/utils/assets';
9
+
10
+ const NavigationFlyoutClient = dynamic(() => import('./navigation-flyout-client').then(mod => mod.default));
7
11
 
8
12
  export type NavigationFlyoutParameters = TextParameters & {
9
13
  icon?: AssetParamValue;
@@ -22,5 +26,19 @@ export enum NavigationFlyoutSlots {
22
26
 
23
27
  export type NavigationFlyoutProps = ComponentProps<NavigationFlyoutParameters, NavigationFlyoutSlots>;
24
28
 
25
- export default dynamic(() => import('./navigation-flyout').then(mod => mod.NavigationFlyout));
29
+ const NavigationFlyout = (props: NavigationFlyoutProps) => {
30
+ const [resolvedImage] = resolveAsset(props.parameters.icon?.value);
31
+ const { url, title = '' } = resolvedImage || {};
32
+
33
+ const renderUrl = () => {
34
+ if (!url) return null;
35
+
36
+ return url.endsWith('.svg') ? <InlineSVG src={url} alt={title} fill /> : <BaseImage src={url} alt={title} fill />;
37
+ };
38
+
39
+ return <NavigationFlyoutClient icon={renderUrl()} {...props} />;
40
+ };
41
+
42
+ export default NavigationFlyout;
43
+
26
44
  export { NavigationFlyoutEmptyPlaceholder } from './empty-placeholder';
@@ -1,16 +1,14 @@
1
1
  import { FC, useEffect, useState } from 'react';
2
- import { UniformSlot } from '@uniformdev/canvas-next-rsc/component';
2
+ import { UniformSlot } from '@uniformdev/next-app-router/component';
3
3
  import { ArrowIcon } from '@/components/ui/_icons';
4
4
  import { cn } from '@/utils/styling';
5
- import { NavigationFlyoutProps } from '.';
5
+ import { NavigationFlyoutProps, NavigationFlyoutParameters } from '.';
6
6
 
7
- type NavigationFlyoutPropsMobileContentProps = Pick<
8
- NavigationFlyoutProps,
9
- 'backgroundColor' | 'context' | 'slots' | 'component'
10
- > & {
11
- isOpen: boolean;
12
- onClose: () => void;
13
- };
7
+ type NavigationFlyoutPropsMobileContentProps = Pick<NavigationFlyoutProps, 'context' | 'slots' | 'component'> &
8
+ Pick<NavigationFlyoutParameters, 'backgroundColor'> & {
9
+ isOpen: boolean;
10
+ onClose: () => void;
11
+ };
14
12
 
15
13
  const useHeaderHeight = () => {
16
14
  const [headerHeight, setHeaderHeight] = useState(0);
@@ -18,6 +16,7 @@ const useHeaderHeight = () => {
18
16
  useEffect(() => {
19
17
  const header = document.getElementById('mobile-header');
20
18
  if (header) {
19
+ // eslint-disable-next-line react-hooks/set-state-in-effect
21
20
  setHeaderHeight(header.offsetHeight);
22
21
  }
23
22
  }, []);
@@ -28,10 +27,8 @@ const useHeaderHeight = () => {
28
27
  export const NavigationFlyoutPropsMobileContent: FC<NavigationFlyoutPropsMobileContentProps> = ({
29
28
  isOpen,
30
29
  backgroundColor,
31
- context,
32
30
  slots,
33
31
  onClose,
34
- component,
35
32
  }) => {
36
33
  const headerHeight = useHeaderHeight();
37
34
 
@@ -49,8 +46,8 @@ export const NavigationFlyoutPropsMobileContent: FC<NavigationFlyoutPropsMobileC
49
46
  </button>
50
47
 
51
48
  <div className="flex flex-col items-center justify-center gap-y-8 p-4">
52
- <UniformSlot context={context} data={component} slot={slots.navigationFlyoutLeftContent} />
53
- <UniformSlot context={context} data={component} slot={slots.navigationFlyoutRightContent} />
49
+ <UniformSlot slot={slots.navigationFlyoutLeftContent} />
50
+ <UniformSlot slot={slots.navigationFlyoutRightContent} />
54
51
  </div>
55
52
  </div>
56
53
  );
@@ -1,18 +1,23 @@
1
1
  'use client';
2
2
 
3
- import { FC, useCallback, useMemo, useState } from 'react';
4
- import { UniformText } from '@uniformdev/canvas-next-rsc/component';
3
+ import { FC, ReactNode, useCallback, useMemo, useState } from 'react';
4
+ import { ComponentParameter, UniformText } from '@uniformdev/next-app-router/component';
5
5
  import BaseIconLabel from '@/components/ui/IconLabel';
6
6
  import BaseImage from '@/components/ui/Image';
7
- import InlineSVG from '@/components/ui/InlineSVG';
8
- import { resolveAsset } from '@/utils/assets';
7
+ import { ReplaceFieldsWithAssets } from '@/types/cskTypes';
9
8
  import { cn, resolveViewPort } from '@/utils/styling';
10
- import { NavigationFlyoutProps } from '.';
9
+ import { withFlattenParameters } from '@/utils/withFlattenParameters';
10
+ import { NavigationFlyoutParameters, NavigationFlyoutProps } from '.';
11
11
  import { NavigationFlyoutPropsDesktopContent } from './desktop';
12
12
  import { NavigationFlyoutPropsMobileContent } from './mobile';
13
13
  import { getButtonClasses, getCaretClasses } from './style-utils';
14
14
 
15
- export const NavigationFlyout: FC<NavigationFlyoutProps> = ({
15
+ type NavigationFlyoutClientProps = NavigationFlyoutProps &
16
+ Omit<ReplaceFieldsWithAssets<NavigationFlyoutParameters, 'caretIcon'>, 'icon'> & {
17
+ icon: ReactNode | null;
18
+ };
19
+
20
+ const NavigationFlyoutClient: FC<NavigationFlyoutClientProps> = ({
16
21
  icon,
17
22
  caretIcon,
18
23
  backgroundColor,
@@ -31,6 +36,7 @@ export const NavigationFlyout: FC<NavigationFlyoutProps> = ({
31
36
  slots,
32
37
  hoverEffect = '',
33
38
  className,
39
+ parameters,
34
40
  }) => {
35
41
  const [isOpen, setIsOpen] = useState(false);
36
42
 
@@ -38,37 +44,35 @@ export const NavigationFlyout: FC<NavigationFlyoutProps> = ({
38
44
  const closeFlyout = useCallback(() => setIsOpen(false), []);
39
45
 
40
46
  const hasRightContent = useMemo(
41
- () => Boolean(component.slots?.navigationFlyoutRightContent?.length),
42
- [component.slots]
47
+ () =>
48
+ Boolean(
49
+ slots?.navigationFlyoutRightContent?.items?.filter(item => !item?._id.startsWith('placeholder_'))?.length
50
+ ),
51
+ [slots]
43
52
  );
44
53
 
45
- const [resolvedImage] = resolveAsset(icon);
46
- const { url, title = '' } = resolvedImage || {};
47
-
48
- const renderUrl = () => {
49
- if (!url) return null;
50
-
51
- return url.endsWith('.svg') ? <InlineSVG src={url} alt={title} fill /> : <BaseImage src={url} alt={title} fill />;
52
- };
53
-
54
54
  const actionClassName = cn('transition-all duration-150', {
55
55
  [resolveViewPort(hoverEffect, 'group-hover:{value}')]: !!hoverEffect,
56
56
  });
57
57
 
58
- const [resolvedCaretIcon] = resolveAsset(caretIcon);
58
+ const [resolvedCaretIcon] = caretIcon || [];
59
59
  const { url: caretUrl, title: caretTitle = '' } = resolvedCaretIcon || {};
60
60
 
61
61
  return (
62
62
  <div className="relative" onMouseLeave={closeFlyout}>
63
63
  <button onMouseEnter={openFlyout} className={getButtonClasses({ color })}>
64
64
  <BaseIconLabel
65
- icon={renderUrl()}
65
+ icon={icon}
66
66
  className={cn('group', className)}
67
67
  iconClassName={actionClassName}
68
68
  textClassName={actionClassName}
69
69
  {...{ size, tag, color, weight, font, transform, decoration, letterSpacing, alignment }}
70
70
  >
71
- <UniformText placeholder="Text goes here" parameterId="text" component={component} context={context} />
71
+ <UniformText
72
+ placeholder="Text goes here"
73
+ parameter={parameters.text as ComponentParameter<string>}
74
+ component={component}
75
+ />
72
76
  </BaseIconLabel>
73
77
  {caretUrl && (
74
78
  <div
@@ -99,3 +103,5 @@ export const NavigationFlyout: FC<NavigationFlyoutProps> = ({
99
103
  </div>
100
104
  );
101
105
  };
106
+
107
+ export default withFlattenParameters(NavigationFlyoutClient);
@@ -1,19 +1,16 @@
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, resolveViewPort } from '@/utils/styling';
4
- import { NavigationGroupProps } from '.';
4
+ import { NavigationGroupParameters, NavigationGroupProps } from '.';
5
5
 
6
- type NavigationGroupDesktopContentProps = Pick<
7
- NavigationGroupProps,
8
- 'backgroundColor' | 'border' | 'context' | 'slots'
9
- > & {
10
- isOpen: boolean;
11
- };
6
+ type NavigationGroupDesktopContentProps = Pick<NavigationGroupProps, 'context' | 'slots'> &
7
+ Pick<NavigationGroupParameters, 'backgroundColor' | 'border'> & {
8
+ isOpen: boolean;
9
+ };
12
10
 
13
11
  export const NavigationGroupDesktopContent: FC<NavigationGroupDesktopContentProps> = ({
14
12
  isOpen,
15
13
  backgroundColor,
16
- context,
17
14
  slots,
18
15
  border,
19
16
  }) => (
@@ -30,7 +27,7 @@ export const NavigationGroupDesktopContent: FC<NavigationGroupDesktopContentProp
30
27
  })}
31
28
  >
32
29
  <div className="flex flex-col gap-y-4 p-4">
33
- <UniformSlot data={context} slot={slots.links} context={context} />
30
+ <UniformSlot slot={slots.links} />
34
31
  </div>
35
32
  </div>
36
33
  </div>
@@ -1,9 +1,13 @@
1
1
  import dynamic from 'next/dynamic';
2
2
  import { AssetParamValue } from '@uniformdev/assets';
3
3
  import { LinkParamValue } from '@uniformdev/canvas';
4
- import { ComponentProps } from '@uniformdev/canvas-next-rsc/component';
5
4
  import { TextParameters } from '@/components/canvas/Text/parameters';
6
- import { ViewPort } from '@/types/cskTypes';
5
+ import BaseImage from '@/components/ui/Image';
6
+ import InlineSVG from '@/components/ui/InlineSVG';
7
+ import { ComponentProps, ViewPort } from '@/types/cskTypes';
8
+ import { resolveAsset } from '@/utils/assets';
9
+
10
+ const NavigationGroupClient = dynamic(() => import('./navigation-group-client').then(mod => mod.default));
7
11
 
8
12
  export type NavigationGroupParameters = TextParameters & {
9
13
  icon?: AssetParamValue;
@@ -21,5 +25,18 @@ export enum NavigationGroupSlots {
21
25
 
22
26
  export type NavigationGroupProps = ComponentProps<NavigationGroupParameters, NavigationGroupSlots>;
23
27
 
24
- export default dynamic(() => import('./navigation-group').then(mod => mod.NavigationGroup));
28
+ const NavigationGroup = (props: NavigationGroupProps) => {
29
+ const [resolvedImage] = resolveAsset(props.parameters.icon?.value);
30
+ const { url, title = '' } = resolvedImage || {};
31
+
32
+ const renderUrl = () => {
33
+ if (!url) return null;
34
+
35
+ return url.endsWith('.svg') ? <InlineSVG src={url} alt={title} fill /> : <BaseImage src={url} alt={title} fill />;
36
+ };
37
+
38
+ return <NavigationGroupClient icon={renderUrl()} {...props} />;
39
+ };
40
+
41
+ export default NavigationGroup;
25
42
  export { NavigationGroupEmptyPlaceholder } from './empty-placeholder';
@@ -1,13 +1,14 @@
1
1
  import { FC, useEffect, useState } from 'react';
2
- import { UniformSlot } from '@uniformdev/canvas-next-rsc/component';
2
+ import { UniformSlot } from '@uniformdev/next-app-router/component';
3
3
  import { ArrowIcon } from '@/components/ui/_icons';
4
4
  import { cn } from '@/utils/styling';
5
- import { NavigationGroupProps } from '.';
5
+ import { NavigationGroupParameters, NavigationGroupProps } from '.';
6
6
 
7
- type NavigationGroupMobileContentProps = Pick<NavigationGroupProps, 'backgroundColor' | 'context' | 'slots'> & {
8
- isOpen: boolean;
9
- onClose: () => void;
10
- };
7
+ type NavigationGroupMobileContentProps = Pick<NavigationGroupProps, 'context' | 'slots'> &
8
+ Pick<NavigationGroupParameters, 'backgroundColor'> & {
9
+ isOpen: boolean;
10
+ onClose: () => void;
11
+ };
11
12
 
12
13
  const useHeaderHeight = () => {
13
14
  const [headerHeight, setHeaderHeight] = useState(0);
@@ -15,6 +16,7 @@ const useHeaderHeight = () => {
15
16
  useEffect(() => {
16
17
  const header = document.getElementById('mobile-header');
17
18
  if (header) {
19
+ // eslint-disable-next-line react-hooks/set-state-in-effect
18
20
  setHeaderHeight(header.offsetHeight);
19
21
  }
20
22
  }, []);
@@ -25,7 +27,6 @@ const useHeaderHeight = () => {
25
27
  export const NavigationGroupMobileContent: FC<NavigationGroupMobileContentProps> = ({
26
28
  isOpen,
27
29
  backgroundColor,
28
- context,
29
30
  slots,
30
31
  onClose,
31
32
  }) => {
@@ -45,7 +46,7 @@ export const NavigationGroupMobileContent: FC<NavigationGroupMobileContentProps>
45
46
  </button>
46
47
 
47
48
  <div className="flex flex-col items-center gap-y-4 p-4">
48
- <UniformSlot data={context} slot={slots.links} context={context} />
49
+ <UniformSlot slot={slots.links} />
49
50
  </div>
50
51
  </div>
51
52
  );
@@ -1,18 +1,23 @@
1
1
  'use client';
2
2
 
3
- import { FC, useCallback, useState } from 'react';
4
- import { UniformText } from '@uniformdev/canvas-next-rsc/component';
3
+ import { FC, ReactNode, useCallback, useState } from 'react';
4
+ import { ComponentParameter, UniformText } from '@uniformdev/next-app-router/component';
5
5
  import BaseIconLabel from '@/components/ui/IconLabel';
6
6
  import BaseImage from '@/components/ui/Image';
7
- import InlineSVG from '@/components/ui/InlineSVG';
8
- import { resolveAsset } from '@/utils/assets';
7
+ import { ReplaceFieldsWithAssets } from '@/types/cskTypes';
9
8
  import { cn, resolveViewPort } from '@/utils/styling';
10
- import { NavigationGroupProps } from '.';
9
+ import { withFlattenParameters } from '@/utils/withFlattenParameters';
10
+ import { NavigationGroupParameters, NavigationGroupProps } from '.';
11
11
  import { NavigationGroupDesktopContent } from './desktop';
12
12
  import { NavigationGroupMobileContent } from './mobile';
13
13
  import { getButtonClasses, getCaretClasses } from './style-utils';
14
14
 
15
- export const NavigationGroup: FC<NavigationGroupProps> = ({
15
+ type NavigationGroupClientProps = NavigationGroupProps &
16
+ Omit<ReplaceFieldsWithAssets<NavigationGroupParameters, 'caretIcon'>, 'icon'> & {
17
+ icon: ReactNode | null;
18
+ };
19
+
20
+ const NavigationGroupClient: FC<NavigationGroupClientProps> = ({
16
21
  icon,
17
22
  caretIcon,
18
23
  backgroundColor,
@@ -31,39 +36,35 @@ export const NavigationGroup: FC<NavigationGroupProps> = ({
31
36
  slots,
32
37
  hoverEffect = '',
33
38
  className,
39
+ parameters,
34
40
  }) => {
35
41
  const [isOpen, setIsOpen] = useState(false);
36
42
 
37
43
  const openFlyout = useCallback(() => setIsOpen(true), []);
38
44
  const closeFlyout = useCallback(() => setIsOpen(false), []);
39
45
 
40
- const [resolvedImage] = resolveAsset(icon);
41
- const { url, title = '' } = resolvedImage || {};
42
-
43
- const renderUrl = () => {
44
- if (!url) return null;
45
-
46
- return url.endsWith('.svg') ? <InlineSVG src={url} alt={title} fill /> : <BaseImage src={url} alt={title} fill />;
47
- };
48
-
49
46
  const actionClassName = cn('transition-all duration-150', {
50
47
  [resolveViewPort(hoverEffect, 'group-hover:{value}')]: !!hoverEffect,
51
48
  });
52
49
 
53
- const [resolvedCaretIcon] = resolveAsset(caretIcon);
50
+ const [resolvedCaretIcon] = caretIcon || [];
54
51
  const { url: caretUrl, title: caretTitle = '' } = resolvedCaretIcon || {};
55
52
 
56
53
  return (
57
54
  <div className="relative" onMouseLeave={closeFlyout}>
58
55
  <button onMouseEnter={openFlyout} onClick={openFlyout} className={getButtonClasses({ color })}>
59
56
  <BaseIconLabel
60
- icon={renderUrl()}
57
+ icon={icon}
61
58
  className={cn('group', className)}
62
59
  iconClassName={actionClassName}
63
60
  textClassName={actionClassName}
64
61
  {...{ size, tag, color, weight, font, transform, decoration, letterSpacing, alignment }}
65
62
  >
66
- <UniformText placeholder="Text goes here" parameterId="text" component={component} context={context} />
63
+ <UniformText
64
+ placeholder="Text goes here"
65
+ parameter={parameters.text as ComponentParameter<string>}
66
+ component={component}
67
+ />
67
68
  </BaseIconLabel>
68
69
  {caretUrl && (
69
70
  <div
@@ -86,3 +87,5 @@ export const NavigationGroup: FC<NavigationGroupProps> = ({
86
87
  </div>
87
88
  );
88
89
  };
90
+
91
+ export default withFlattenParameters(NavigationGroupClient);
@@ -1,9 +1,7 @@
1
1
  import { AssetParamValue } from '@uniformdev/assets';
2
2
  import { LinkParamValue } from '@uniformdev/canvas';
3
- import { ComponentProps } from '@uniformdev/canvas-next-rsc/component';
4
3
  import { TextParameters } from '@/components/canvas/Text/parameters';
5
- import { ViewPort } from '@/types/cskTypes';
6
- import { NavigationLink } from './navigation-link';
4
+ import { ComponentProps, ViewPort } from '@/types/cskTypes';
7
5
 
8
6
  export type NavigationLinkParameters = TextParameters & {
9
7
  icon?: AssetParamValue;
@@ -15,4 +13,4 @@ export type NavigationLinkParameters = TextParameters & {
15
13
 
16
14
  export type NavigationLinkProps = ComponentProps<NavigationLinkParameters>;
17
15
 
18
- export default NavigationLink;
16
+ export { default } from './navigation-link';