@uniformdev/csk-components 6.0.123-alpha.1 → 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.
- package/README.md +74 -81
- package/dist/ThemeSwitcher-EUDUX3QI.mjs +1 -0
- package/dist/accordion-item-7IKL6Z6Q.mjs +1 -0
- package/dist/accordion-item-MORC2F2Q.mjs +1 -0
- package/dist/banner-WOYK426U.mjs +1 -0
- package/dist/carousel-ALNEGOPM.mjs +1 -0
- package/dist/carousel-HKYR3ZBB.mjs +1 -0
- package/dist/chunk-27WJUZYR.mjs +1 -0
- package/dist/chunk-3JU2XCD2.mjs +1 -0
- package/dist/chunk-47YB4P2Q.mjs +1 -0
- package/dist/chunk-6CKVLOIH.mjs +1 -0
- package/dist/{chunk-PMMAALCQ.mjs → chunk-AOFJCDRO.mjs} +1 -1
- package/dist/{chunk-2BMAPB63.mjs → chunk-AWTML4I7.mjs} +1 -1
- package/dist/chunk-CZ4X5ZBK.mjs +1 -0
- package/dist/chunk-D673IM2U.mjs +1 -0
- package/dist/chunk-I6SUO5WR.mjs +1 -0
- package/dist/chunk-JT77BVIX.mjs +1 -0
- package/dist/chunk-LPAOEOU4.mjs +1 -0
- package/dist/chunk-MKOFM4XK.mjs +1 -0
- package/dist/chunk-NKINOJY6.mjs +1 -0
- package/dist/chunk-OKUDTS22.mjs +1 -0
- package/dist/chunk-OL6JBPZ4.mjs +1 -0
- package/dist/chunk-OY6ZJNCE.mjs +1 -0
- package/dist/chunk-PLKWUEFW.mjs +1 -0
- package/dist/chunk-QPQGRQKI.mjs +1 -0
- package/dist/chunk-VWWXSA5H.mjs +1 -0
- package/dist/chunk-XKCRANRQ.mjs +1 -0
- package/dist/chunk-XYU3TGOU.mjs +1 -0
- package/dist/chunk-Y337A266.mjs +7 -0
- package/dist/chunk-YQYDZJ65.mjs +1 -0
- package/dist/chunk-ZAHWFLY4.mjs +1 -0
- package/dist/{chunk-V4EBWEG4.mjs → chunk-ZWDCDE5W.mjs} +1 -1
- package/dist/components/canvas/emptyPlaceholders.d.mts +5 -4
- package/dist/components/canvas/emptyPlaceholders.mjs +1 -1
- package/dist/components/canvas/index.d.mts +4 -648
- package/dist/components/canvas/index.mjs +1 -1
- package/dist/components/canvas/serverClient.d.mts +694 -0
- package/dist/components/canvas/serverClient.mjs +1 -0
- package/dist/components/canvas/serverOnly.d.mts +41 -0
- package/dist/components/canvas/serverOnly.mjs +1 -0
- package/dist/components/ui/index.d.mts +24 -33
- package/dist/components/ui/index.mjs +1 -1
- package/dist/content/components/canvas/Accordion/accordion.tsx +8 -7
- package/dist/content/components/canvas/Accordion/index.tsx +2 -2
- package/dist/content/components/canvas/AccordionItem/accordion-item.tsx +9 -7
- package/dist/content/components/canvas/AccordionItem/index.tsx +4 -6
- package/dist/content/components/canvas/Badge/badge.tsx +12 -5
- package/dist/content/components/canvas/Badge/index.tsx +2 -3
- package/dist/content/components/canvas/Badge/style-utils.ts +6 -6
- package/dist/content/components/canvas/Banner/banner.tsx +24 -36
- package/dist/content/components/canvas/Banner/index.tsx +7 -11
- package/dist/content/components/canvas/Breadcrumbs/breadcrumbs.tsx +21 -22
- package/dist/content/components/canvas/Breadcrumbs/index.tsx +4 -7
- package/dist/content/components/canvas/Button/button.tsx +19 -11
- package/dist/content/components/canvas/Button/index.tsx +3 -5
- package/dist/content/components/canvas/Card/card.tsx +9 -9
- package/dist/content/components/canvas/Card/index.tsx +3 -3
- package/dist/content/components/canvas/Carousel/carousel.tsx +9 -7
- package/dist/content/components/canvas/Carousel/index.tsx +4 -4
- package/dist/content/components/canvas/Container/container.tsx +7 -6
- package/dist/content/components/canvas/Container/index.tsx +3 -3
- package/dist/content/components/canvas/CookieConsent/cookie-consent.tsx +126 -0
- package/dist/content/components/canvas/CookieConsent/empty-placeholder.tsx +12 -0
- package/dist/content/components/canvas/CookieConsent/index.tsx +26 -0
- package/dist/content/components/canvas/Countdown/countdown.tsx +9 -7
- package/dist/content/components/canvas/Countdown/index.tsx +2 -3
- package/dist/content/components/canvas/DemoHero/atoms.tsx +29 -32
- package/dist/content/components/canvas/DemoHero/columns-variant.tsx +4 -4
- package/dist/content/components/canvas/DemoHero/default-variant.tsx +4 -4
- package/dist/content/components/canvas/DemoHero/demo-hero.tsx +41 -18
- package/dist/content/components/canvas/DemoHero/fixed-hero.tsx +13 -6
- package/dist/content/components/canvas/DemoHero/flexible-hero.tsx +8 -2
- package/dist/content/components/canvas/DemoHero/index.tsx +3 -4
- package/dist/content/components/canvas/Divider/divider.tsx +5 -2
- package/dist/content/components/canvas/Divider/index.tsx +2 -2
- package/dist/content/components/canvas/Flex/flex.tsx +9 -6
- package/dist/content/components/canvas/Flex/index.tsx +6 -6
- package/dist/content/components/canvas/FlexItem/flex-item.tsx +7 -4
- package/dist/content/components/canvas/FlexItem/index.tsx +4 -5
- package/dist/content/components/canvas/Footer/footer.tsx +9 -8
- package/dist/content/components/canvas/Footer/index.tsx +2 -3
- package/dist/content/components/canvas/Grid/grid.tsx +9 -7
- package/dist/content/components/canvas/Grid/index.tsx +5 -5
- package/dist/content/components/canvas/GridItem/grid-item.tsx +10 -8
- package/dist/content/components/canvas/GridItem/index.tsx +5 -5
- package/dist/content/components/canvas/Header/header.tsx +10 -7
- package/dist/content/components/canvas/Header/index.tsx +2 -3
- package/dist/content/components/canvas/IconLabel/icon-label.tsx +16 -8
- package/dist/content/components/canvas/IconLabel/index.tsx +4 -5
- package/dist/content/components/canvas/Image/image.tsx +13 -7
- package/dist/content/components/canvas/Image/index.tsx +2 -3
- package/dist/content/components/canvas/ImageGallery/empty-placeholder.tsx +1 -1
- package/dist/content/components/canvas/ImageGallery/gallery-inner.tsx +6 -6
- package/dist/content/components/canvas/ImageGallery/image-gallery.tsx +20 -33
- package/dist/content/components/canvas/ImageGallery/index.tsx +11 -12
- package/dist/content/components/canvas/Link/index.tsx +2 -3
- package/dist/content/components/canvas/Link/link.tsx +7 -4
- package/dist/content/components/canvas/Modal/index.tsx +2 -2
- package/dist/content/components/canvas/Modal/modal.tsx +9 -10
- package/dist/content/components/canvas/NavigationFlyout/desktop.tsx +9 -13
- package/dist/content/components/canvas/NavigationFlyout/index.tsx +21 -3
- package/dist/content/components/canvas/NavigationFlyout/mobile.tsx +10 -13
- package/dist/content/components/canvas/NavigationFlyout/{navigation-flyout.tsx → navigation-flyout-client.tsx} +26 -20
- package/dist/content/components/canvas/NavigationGroup/desktop.tsx +7 -10
- package/dist/content/components/canvas/NavigationGroup/index.tsx +20 -3
- package/dist/content/components/canvas/NavigationGroup/mobile.tsx +9 -8
- package/dist/content/components/canvas/NavigationGroup/{navigation-group.tsx → navigation-group-client.tsx} +21 -18
- package/dist/content/components/canvas/NavigationLink/index.tsx +2 -4
- package/dist/content/components/canvas/NavigationLink/navigation-link.tsx +12 -9
- package/dist/content/components/canvas/Page/index.tsx +7 -7
- package/dist/content/components/canvas/Page/page.tsx +9 -18
- package/dist/content/components/canvas/Review/default-variant.tsx +2 -2
- package/dist/content/components/canvas/Review/empty-placeholder.tsx +6 -3
- package/dist/content/components/canvas/Review/index.tsx +6 -6
- package/dist/content/components/canvas/Review/multi-column-variant.tsx +2 -2
- package/dist/content/components/canvas/Review/review.tsx +11 -11
- package/dist/content/components/canvas/RichText/index.tsx +7 -6
- package/dist/content/components/canvas/RichText/rich-text.tsx +23 -6
- package/dist/content/components/canvas/Section/columns-variant.tsx +4 -4
- package/dist/content/components/canvas/Section/default-variant.tsx +6 -6
- package/dist/content/components/canvas/Section/empty-placeholder.tsx +5 -2
- package/dist/content/components/canvas/Section/index.tsx +2 -2
- package/dist/content/components/canvas/Section/section.tsx +11 -12
- package/dist/content/components/canvas/SimpleFooter/index.tsx +16 -0
- package/dist/content/components/canvas/SimpleFooter/simple-footer.tsx +85 -0
- package/dist/content/components/canvas/SimpleHeader/index.tsx +22 -0
- package/dist/content/components/canvas/SimpleHeader/simple-header.tsx +63 -0
- package/dist/content/components/canvas/Spacer/index.tsx +2 -2
- package/dist/content/components/canvas/Spacer/spacer.tsx +5 -2
- package/dist/content/components/canvas/Tab/index.tsx +2 -3
- package/dist/content/components/canvas/Tab/tab.tsx +6 -5
- package/dist/content/components/canvas/Table/index.tsx +2 -2
- package/dist/content/components/canvas/Table/table.tsx +8 -7
- package/dist/content/components/canvas/TableCustomCell/index.tsx +2 -2
- package/dist/content/components/canvas/TableCustomCell/table-custom-cell.tsx +7 -4
- package/dist/content/components/canvas/TableDataCell/index.tsx +2 -2
- package/dist/content/components/canvas/TableDataCell/table-data-cell.tsx +7 -4
- package/dist/content/components/canvas/TableHeaderCell/index.tsx +2 -2
- package/dist/content/components/canvas/TableHeaderCell/table-header-cell.tsx +7 -4
- package/dist/content/components/canvas/TableRow/index.tsx +5 -3
- package/dist/content/components/canvas/TableRow/table-row.tsx +6 -3
- package/dist/content/components/canvas/Tabs/index.tsx +7 -7
- package/dist/content/components/canvas/Tabs/style-utils.ts +12 -11
- package/dist/content/components/canvas/Tabs/tabs.tsx +44 -42
- package/dist/content/components/canvas/Testimonial/default-variant.tsx +7 -7
- package/dist/content/components/canvas/Testimonial/index.tsx +2 -2
- package/dist/content/components/canvas/Testimonial/testimonial.tsx +11 -13
- package/dist/content/components/canvas/Testimonial/with-large-avatar-variant.tsx +7 -7
- package/dist/content/components/canvas/Testimonial/with-overlapping-image-variant.tsx +7 -7
- package/dist/content/components/canvas/Text/index.tsx +2 -3
- package/dist/content/components/canvas/Text/text.tsx +21 -15
- package/dist/content/components/canvas/ThemeSwitcher/index.tsx +2 -2
- package/dist/content/components/canvas/ThemeSwitcher/theme-switcher.tsx +6 -3
- package/dist/content/components/canvas/Video/index.tsx +2 -3
- package/dist/content/components/canvas/Video/placeholder.tsx +1 -1
- package/dist/content/components/canvas/Video/video.tsx +8 -5
- package/dist/content/components/ui/Banner/banner.tsx +47 -0
- package/dist/content/components/ui/Banner/index.tsx +29 -0
- package/dist/content/components/{canvas → ui}/Banner/style-utils.ts +1 -2
- package/dist/content/components/ui/Carousel/index.ts +2 -2
- package/dist/content/components/ui/ComponentEmptyPlaceholder/component-empty-placeholder.tsx +13 -0
- package/dist/content/components/ui/ComponentEmptyPlaceholder/index.ts +6 -0
- package/dist/content/components/ui/Flex/flex.tsx +2 -0
- package/dist/content/components/ui/Flex/index.ts +2 -0
- package/dist/content/components/ui/FlexItem/index.ts +1 -1
- package/dist/content/components/ui/Footer/index.ts +4 -3
- package/dist/content/components/ui/Grid/grid.tsx +2 -0
- package/dist/content/components/ui/Grid/index.ts +3 -0
- package/dist/content/components/ui/GridItem/grid-item.tsx +10 -1
- package/dist/content/components/ui/GridItem/index.ts +3 -0
- package/dist/content/components/ui/IconLabel/icon-label.tsx +2 -0
- package/dist/content/components/ui/IconLabel/index.ts +1 -0
- package/dist/content/components/ui/InlineSVG/index.ts +3 -1
- package/dist/content/components/ui/InlineSVG/inline-svg.tsx +14 -3
- package/dist/content/components/ui/InlineSVG/utils.ts +66 -11
- package/dist/content/components/ui/Rating/index.tsx +1 -1
- package/dist/content/components/ui/Rating/rating.tsx +1 -1
- package/dist/content/types/cskTypes.ts +32 -9
- package/dist/content/utils/assets.ts +3 -18
- package/dist/content/utils/createComponentResolver.ts +7 -6
- package/dist/content/utils/createEmptyPlaceholderResolver.tsx +4 -8
- package/dist/content/utils/getSlotComponents.ts +15 -0
- package/dist/content/utils/routing.ts +60 -15
- package/dist/content/utils/useCookiesConsent.ts +17 -0
- package/dist/content/utils/withFlattenParameters.tsx +17 -0
- package/dist/content/utils/withSlotsDataValue.tsx +34 -0
- package/dist/cookie-consent-5QJUCW2K.mjs +1 -0
- package/dist/countdown-FRQZMVKW.mjs +1 -0
- package/dist/image-gallery-HWCMTJL3.mjs +1 -0
- package/dist/{index-D5cLtaIv.d.mts → index-CSSWgmI5.d.mts} +54 -28
- package/dist/index-CrBZatTs.d.mts +18 -0
- package/dist/index.mjs +3 -3
- package/dist/mobile-KBYNJEBM.mjs +1 -0
- package/dist/modal-4TVVGHWS.mjs +1 -0
- package/dist/modal-E5RMA4EO.mjs +1 -0
- package/dist/navigation-flyout-client-WUN4A34X.mjs +1 -0
- package/dist/navigation-group-client-Y72BOPIH.mjs +1 -0
- package/dist/parameters-B8w5Q6Pp.d.mts +29 -0
- package/dist/tabs-VMFTATOP.mjs +1 -0
- package/dist/theme-switcher-QTX46Z7E.mjs +1 -0
- package/dist/theme-switcher-RGY4D3KL.mjs +1 -0
- package/dist/types/cskTypes.d.mts +27 -9
- package/dist/utils/assets.d.mts +8 -17
- package/dist/utils/assets.mjs +1 -1
- package/dist/utils/createComponentResolver.d.mts +3 -9
- package/dist/utils/createComponentResolver.mjs +1 -1
- package/dist/utils/createEmptyPlaceholderResolver.d.mts +4 -2
- package/dist/utils/createEmptyPlaceholderResolver.mjs +1 -1
- package/dist/utils/getSlotComponents.d.mts +11 -0
- package/dist/utils/getSlotComponents.mjs +1 -0
- package/dist/utils/routing.d.mts +20 -7
- package/dist/utils/routing.mjs +1 -1
- package/dist/utils/sitemap.mjs +1 -1
- package/dist/utils/styling.d.mts +3 -0
- package/dist/utils/styling.mjs +1 -1
- package/dist/utils/withFlattenParameters.d.mts +10 -0
- package/dist/utils/withFlattenParameters.mjs +1 -0
- package/dist/utils/withSlotsDataValue.d.mts +12 -0
- package/dist/utils/withSlotsDataValue.mjs +1 -0
- package/dist/video-VG6ZQCKN.mjs +1 -0
- package/package.json +43 -14
- package/dist/ThemeSwitcher-6Q7LCO4Q.mjs +0 -1
- package/dist/accordion-item-QAVKQEB2.mjs +0 -1
- package/dist/accordion-item-Y4PSNOH4.mjs +0 -1
- package/dist/banner-EYII7V7X.mjs +0 -1
- package/dist/carousel-RZ2DV6QX.mjs +0 -1
- package/dist/carousel-YELQRJVB.mjs +0 -1
- package/dist/chunk-2UV7TQNF.mjs +0 -1
- package/dist/chunk-2YTACEBA.mjs +0 -1
- package/dist/chunk-56OQGKRM.mjs +0 -1
- package/dist/chunk-ABORGLS6.mjs +0 -2
- package/dist/chunk-B2O55EVA.mjs +0 -1
- package/dist/chunk-EOV2LPGC.mjs +0 -1
- package/dist/chunk-EUVKAE6M.mjs +0 -1
- package/dist/chunk-FIN5US3Q.mjs +0 -1
- package/dist/chunk-LZOK42EM.mjs +0 -1
- package/dist/chunk-MSXDLSXH.mjs +0 -1
- package/dist/chunk-RX4IAAQQ.mjs +0 -1
- package/dist/chunk-RYEXR67P.mjs +0 -1
- package/dist/chunk-TCQTXNKT.mjs +0 -1
- package/dist/chunk-TFA6HYP4.mjs +0 -7
- package/dist/chunk-VW2XC3SE.mjs +0 -1
- package/dist/chunk-YEKQJ4YC.mjs +0 -1
- package/dist/content/components/canvas/Banner/types.ts +0 -21
- package/dist/countdown-LYDXJLEE.mjs +0 -1
- package/dist/image-gallery-AMU6FS7N.mjs +0 -1
- package/dist/mobile-JGZBHQC2.mjs +0 -1
- package/dist/modal-43IHAVWB.mjs +0 -1
- package/dist/modal-5FNTFSTN.mjs +0 -1
- package/dist/navigation-flyout-EPIOXRWJ.mjs +0 -1
- package/dist/navigation-group-OCZ35QI2.mjs +0 -1
- package/dist/tabs-J23TEEQ7.mjs +0 -1
- package/dist/theme-switcher-76F2V343.mjs +0 -1
- package/dist/theme-switcher-WO5JIV2W.mjs +0 -1
- package/dist/video-RC2QHJS2.mjs +0 -1
- /package/dist/content/components/{canvas → ui}/Banner/close-button.tsx +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{A as ue,B as xe,C as Ce,D as Se,E as ce,F as Te,G as ge,a as J,b as K,c as O,d as Q,e as U,f as W,g as X,h as Y,i as Z,j as _,k as $,l as ee,m as te,n as re,o as ae,p as oe,q as pe,r as se,s as le,t as me,u as ne,v as ie,w as de,x as ye,y as Pe,z as fe}from"../../chunk-JT77BVIX.mjs";import{B as H,C as v,E as w,G,I as A,J as h,L as B,M as V,N as L,P as R,Q as D,R as N,S as k,U as M,V as E,X as j,Y as q,Z as z,a as t,b as r,d as o,e as p,f as s,g as l,h as m,j as n,k as i,m as f,n as u,o as x,p as C,r as S,s as c,u as T,v as g,w as b,y as F,z as I}from"../../chunk-3JU2XCD2.mjs";import{a as d,b as y,c as P}from"../../chunk-YQYDZJ65.mjs";import"../../chunk-OL6JBPZ4.mjs";import"../../chunk-6CKVLOIH.mjs";import"../../chunk-MKOFM4XK.mjs";import"../../chunk-6TUDWIYU.mjs";import{a}from"../../chunk-VWWXSA5H.mjs";import"../../chunk-NKINOJY6.mjs";import"../../chunk-BK7UG4U4.mjs";import"../../chunk-7GVG4HLE.mjs";import"../../chunk-WAW7PQYM.mjs";import"../../chunk-QPQGRQKI.mjs";import"../../chunk-S7CSCIW4.mjs";import"../../chunk-XYU3TGOU.mjs";import{a as e}from"../../chunk-CZ4X5ZBK.mjs";import"../../chunk-OKUDTS22.mjs";import"../../chunk-LPAOEOU4.mjs";import"../../chunk-27WJUZYR.mjs";export{t as Accordion,K as AccordionItem,J as AccordionItemSlots,r as AccordionSlots,O as Badge,o as Banner,a as BannerContentAlignment,p as BannerSlots,Q as Button,s as Card,m as CardSlots,l as CardVariants,i as Carousel,n as CarouselSlots,h as CommonPageSlots,e as ComponentEmptyPlaceholder,U as Container,W as ContainerSlots,P as Countdown,d as CountdownSlots,y as CountdownVariants,C as DemoHero,f as DemoHeroContentAlignment,u as DemoHeroVariants,X as Divider,Y as Flex,Z as FlexItem,x as FlexibleHeroSlots,S as Footer,c as FooterSlots,_ as Grid,ee as GridItem,te as GridItemSlots,$ as GridSlots,T as Header,g as HeaderSlots,b as HeaderVariants,re as IconLabel,ae as Image,I as ImageGallery,F as ImageGallerySlots,oe as Link,pe as LinkSlots,v as Modal,H as ModalSlots,w as NavigationFlyout,G as NavigationGroup,se as NavigationLink,A as Page,B as Review,L as ReviewSlots,V as ReviewVariants,le as RichText,R as Section,D as SectionContentAlignment,k as SectionSlots,N as SectionVariants,me as SimpleFooter,ne as SimpleHeader,ie as Spacer,de as SpacerVariants,ye as Tab,Pe as TabSlots,M as Table,fe as TableCustomCell,ue as TableCustomCellSlots,xe as TableDataCell,Ce as TableHeaderCell,Se as TableRow,E as TableSlots,j as Testimonial,z as TestimonialSlots,q as TestimonialVariants,ce as Text,Te as ThemeSwitcher,ge as Video};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { LinkParamValue, DataWithProperties } from '@uniformdev/canvas';
|
|
2
|
+
import { T as TextParameters, C as ContainerParameters } from '../../parameters-B8w5Q6Pp.mjs';
|
|
3
|
+
import { ComponentProps } from '../../types/cskTypes.mjs';
|
|
4
|
+
import * as react from 'react';
|
|
5
|
+
import '../../index-CrBZatTs.mjs';
|
|
6
|
+
import '@uniformdev/next-app-router/component';
|
|
7
|
+
import '@uniformdev/next-app-router';
|
|
8
|
+
import '@uniformdev/next-app-router-shared';
|
|
9
|
+
|
|
10
|
+
declare const _default$1: react.ComponentType<BreadcrumbsProps & Omit<BreadcrumbsParameters, "links"> & {
|
|
11
|
+
links?: {
|
|
12
|
+
title?: string;
|
|
13
|
+
link?: LinkParamValue;
|
|
14
|
+
}[];
|
|
15
|
+
}>;
|
|
16
|
+
|
|
17
|
+
type BreadcrumbsParameters = {
|
|
18
|
+
title?: string;
|
|
19
|
+
separator?: 'slash' | 'chevron';
|
|
20
|
+
links?: DataWithProperties[];
|
|
21
|
+
autoGenerate?: boolean;
|
|
22
|
+
} & Pick<TextParameters, 'size' | 'color' | 'font' | 'transform'>;
|
|
23
|
+
type BreadcrumbsProps = ComponentProps<BreadcrumbsParameters>;
|
|
24
|
+
|
|
25
|
+
declare enum TabsVariants {
|
|
26
|
+
Bordered = "bordered"
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
type TabsParameters = ContainerParameters & {
|
|
30
|
+
color?: string;
|
|
31
|
+
};
|
|
32
|
+
declare enum TabsSlots {
|
|
33
|
+
TabItems = "tabItems"
|
|
34
|
+
}
|
|
35
|
+
type TabsProps = ComponentProps<TabsParameters, TabsSlots>;
|
|
36
|
+
|
|
37
|
+
declare const _default: react.ComponentType<TabsProps & ContainerParameters & {
|
|
38
|
+
color?: string;
|
|
39
|
+
}>;
|
|
40
|
+
|
|
41
|
+
export { _default$1 as Breadcrumbs, type BreadcrumbsParameters, type BreadcrumbsProps, _default as Tabs, type TabsParameters, type TabsProps, TabsSlots, TabsVariants };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e}from"../../chunk-ZAHWFLY4.mjs";import{a as r,b as s}from"../../chunk-XKCRANRQ.mjs";import{a}from"../../chunk-OY6ZJNCE.mjs";import"../../chunk-D673IM2U.mjs";import"../../chunk-WAW7PQYM.mjs";import"../../chunk-QPQGRQKI.mjs";import"../../chunk-S7CSCIW4.mjs";import"../../chunk-OKUDTS22.mjs";import"../../chunk-LPAOEOU4.mjs";import"../../chunk-I6SUO5WR.mjs";import"../../chunk-27WJUZYR.mjs";export{e as Breadcrumbs,s as Tabs,r as TabsSlots,a as TabsVariants};
|
|
@@ -1,22 +1,28 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { FC, SVGProps, ReactElement, HTMLAttributes,
|
|
3
|
-
import {
|
|
4
|
-
export { a as ButtonVariant } from '../../index-
|
|
2
|
+
import { FC, SVGProps, CSSProperties, ReactElement, HTMLAttributes, PropsWithChildren, ReactNode } from 'react';
|
|
3
|
+
import { C as ContainerProps, B as ButtonProps, F as FooterProps, H as HeaderProps, I as IconLabelProps } from '../../index-CSSWgmI5.mjs';
|
|
4
|
+
export { _ as Banner, b as BannerProps, a as ButtonVariant, c as ContentAlignment } from '../../index-CSSWgmI5.mjs';
|
|
5
5
|
import { ViewPort } from '../../types/cskTypes.mjs';
|
|
6
6
|
import { ImageProps as ImageProps$1 } from 'next/image';
|
|
7
|
+
import { T as TextProps } from '../../index-CrBZatTs.mjs';
|
|
7
8
|
import { ReactPlayerProps } from 'react-player';
|
|
9
|
+
import '@uniformdev/next-app-router/component';
|
|
8
10
|
import '@uniformdev/canvas';
|
|
11
|
+
import '@uniformdev/next-app-router';
|
|
12
|
+
import '@uniformdev/next-app-router-shared';
|
|
9
13
|
|
|
10
14
|
declare const Text: FC<TextProps>;
|
|
11
15
|
|
|
12
|
-
declare const Button: FC<ButtonProps>;
|
|
13
|
-
|
|
14
16
|
declare const Container: FC<ContainerProps>;
|
|
15
17
|
|
|
18
|
+
declare const Button: FC<ButtonProps>;
|
|
19
|
+
|
|
16
20
|
declare const Footer: FC<FooterProps>;
|
|
17
21
|
|
|
18
22
|
declare const Header: FC<HeaderProps>;
|
|
19
23
|
|
|
24
|
+
declare const IconLabel: FC<IconLabelProps>;
|
|
25
|
+
|
|
20
26
|
declare const Arrow: FC<SVGProps<SVGElement>>;
|
|
21
27
|
|
|
22
28
|
declare const ImageIcon: FC<SVGProps<SVGSVGElement>>;
|
|
@@ -27,7 +33,7 @@ type CarouselProps = Pick<ContainerProps, 'title' | 'backgroundColor' | 'spacing
|
|
|
27
33
|
countOfItems?: number;
|
|
28
34
|
children: (options: {
|
|
29
35
|
className?: string;
|
|
30
|
-
style?:
|
|
36
|
+
style?: CSSProperties;
|
|
31
37
|
}) => ReactElement;
|
|
32
38
|
itemsPerPage?: string;
|
|
33
39
|
gapX?: string;
|
|
@@ -39,12 +45,14 @@ declare const Flex: FC<FlexProps>;
|
|
|
39
45
|
|
|
40
46
|
type Direction = 'row' | 'row-reverse' | 'col' | 'col-reverse';
|
|
41
47
|
type Justify = 'normal' | 'start' | 'end' | 'center' | 'between' | 'around' | 'evenly' | 'stretch';
|
|
42
|
-
type Align = 'start' | 'end' | 'center' | 'baseline' | 'stretch';
|
|
48
|
+
type Align$2 = 'start' | 'end' | 'center' | 'baseline' | 'stretch';
|
|
49
|
+
type Wrap = 'nowrap' | 'wrap' | 'wrap-reverse';
|
|
43
50
|
type FlexProps = Pick<ContainerProps, 'className' | 'wrapperClassName' | 'title' | 'backgroundColor' | 'spacing' | 'border' | 'fluidContent' | 'height' | 'children'> & {
|
|
44
51
|
direction?: Direction | ViewPort<Direction>;
|
|
45
52
|
justifyContent?: Justify | ViewPort<Justify>;
|
|
46
53
|
gap?: string | ViewPort<string>;
|
|
47
|
-
alignItems?: Align | ViewPort<Align>;
|
|
54
|
+
alignItems?: Align$2 | ViewPort<Align$2>;
|
|
55
|
+
wrap?: Wrap | ViewPort<Wrap>;
|
|
48
56
|
};
|
|
49
57
|
|
|
50
58
|
declare const FlexItem: FC<FlexItemProps>;
|
|
@@ -53,47 +61,30 @@ type AvailableAlignSelf = 'auto' | 'start' | 'end' | 'center' | 'stretch';
|
|
|
53
61
|
type AvailableShrink = '0' | '1';
|
|
54
62
|
type FlexItemProps = HTMLAttributes<HTMLDivElement> & {
|
|
55
63
|
alignSelf?: AvailableAlignSelf | ViewPort<AvailableAlignSelf>;
|
|
56
|
-
shrink
|
|
64
|
+
shrink?: AvailableShrink;
|
|
57
65
|
};
|
|
58
66
|
|
|
59
67
|
declare const Grid: FC<GridProps>;
|
|
60
68
|
|
|
69
|
+
type Align$1 = 'start' | 'end' | 'center' | 'baseline' | 'stretch';
|
|
61
70
|
type GridProps = Pick<ContainerProps, 'title' | 'backgroundColor' | 'spacing' | 'border' | 'fluidContent' | 'children' | 'height'> & {
|
|
62
71
|
columnsCount?: string | ViewPort<string>;
|
|
63
72
|
gapY?: string | ViewPort<string>;
|
|
64
73
|
gapX?: string | ViewPort<string>;
|
|
74
|
+
alignItems?: Align$1 | ViewPort<Align$1>;
|
|
65
75
|
className?: string;
|
|
66
76
|
};
|
|
67
77
|
|
|
68
78
|
declare const GridItem: FC<GridItemProps>;
|
|
69
79
|
|
|
80
|
+
type Align = 'start' | 'end' | 'center' | 'baseline' | 'stretch';
|
|
70
81
|
type GridItemProps = HTMLAttributes<HTMLDivElement> & {
|
|
71
82
|
columnStart?: string | ViewPort<string>;
|
|
72
83
|
columnSpan?: string | ViewPort<string>;
|
|
73
84
|
rowStart?: string | ViewPort<string>;
|
|
74
85
|
rowSpan?: string | ViewPort<string>;
|
|
75
86
|
className?: string;
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
declare const IconLabel: FC<IconLabelProps>;
|
|
79
|
-
|
|
80
|
-
type IconLabelProps = {
|
|
81
|
-
icon?: ReactNode;
|
|
82
|
-
children: ReactElement | string;
|
|
83
|
-
textClassName?: string;
|
|
84
|
-
iconClassName?: string;
|
|
85
|
-
className?: string;
|
|
86
|
-
text?: string;
|
|
87
|
-
tag?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'span';
|
|
88
|
-
size?: TextProps['size'];
|
|
89
|
-
color?: string;
|
|
90
|
-
weight?: TextProps['weight'];
|
|
91
|
-
font?: string;
|
|
92
|
-
alignment?: TextProps['alignment'];
|
|
93
|
-
transform?: TextProps['transform'];
|
|
94
|
-
decoration?: TextProps['decoration'];
|
|
95
|
-
letterSpacing?: TextProps['letterSpacing'];
|
|
96
|
-
lineCountRestrictions?: string;
|
|
87
|
+
alignSelf?: Align | ViewPort<Align>;
|
|
97
88
|
};
|
|
98
89
|
|
|
99
90
|
declare const Image: FC<ImageProps>;
|
|
@@ -133,7 +124,7 @@ type PageProps = HTMLAttributes<HTMLDivElement> & {
|
|
|
133
124
|
declare const Rating: FC<RatingProps>;
|
|
134
125
|
|
|
135
126
|
type RatingProps = {
|
|
136
|
-
rating
|
|
127
|
+
rating?: number;
|
|
137
128
|
showReviewLabel?: boolean;
|
|
138
129
|
starsColor?: string;
|
|
139
130
|
activeStarsColor?: string;
|
|
@@ -164,7 +155,7 @@ type InlineSVGProps = {
|
|
|
164
155
|
width?: number;
|
|
165
156
|
height?: number;
|
|
166
157
|
sanitize?: boolean;
|
|
167
|
-
fallback?:
|
|
158
|
+
fallback?: ReactNode;
|
|
168
159
|
useCurrentColor?: boolean;
|
|
169
160
|
alt?: string;
|
|
170
161
|
};
|
|
@@ -199,4 +190,4 @@ type ModalProps = {
|
|
|
199
190
|
};
|
|
200
191
|
declare const _default: react.ComponentType<ModalProps>;
|
|
201
192
|
|
|
202
|
-
export { Accordion, _default$1 as AccordionItem, type AccordionItemProps, type AccordionProps, Arrow as ArrowIcon, Button, ButtonProps, _default$4 as Carousel, type CarouselProps, Container, ContainerProps, Flex, FlexItem, type FlexItemProps, type FlexProps, Footer, FooterProps, Grid, GridItem, type GridItemProps, type GridProps, Header, HeaderProps, IconLabel,
|
|
193
|
+
export { Accordion, _default$1 as AccordionItem, type AccordionItemProps, type AccordionProps, Arrow as ArrowIcon, Button, ButtonProps, _default$4 as Carousel, type CarouselProps, Container, ContainerProps, Flex, FlexItem, type FlexItemProps, type FlexProps, Footer, FooterProps, Grid, GridItem, type GridItemProps, type GridProps, Header, HeaderProps, IconLabel, IconLabelProps, Image, ImageIcon, type ImageProps, InlineSVG, type InlineSVGProps, Link, type LinkProps, MediaPlaceholder, type MediaPlaceholderType, _default as Modal, type ModalProps, Page, type PageProps, Rating, type RatingProps, Text, TextProps, _default$3 as ThemeSwitcher, type ThemeSwitcherProps, _default$2 as Video, VideoIcon, type VideoProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as
|
|
1
|
+
import{a as G}from"../../chunk-AOFJCDRO.mjs";import{a as C}from"../../chunk-ZWDCDE5W.mjs";import{a}from"../../chunk-PLKWUEFW.mjs";import{b as I}from"../../chunk-AWTML4I7.mjs";import{a as V,b as B,c as T}from"../../chunk-OL6JBPZ4.mjs";import{a as h}from"../../chunk-6CKVLOIH.mjs";import{a as o,b as u,c as P,d as c,e as g,f as A,g as F}from"../../chunk-MKOFM4XK.mjs";import{a as l,b as m,c as n}from"../../chunk-6TUDWIYU.mjs";import{a as t,b as r}from"../../chunk-VWWXSA5H.mjs";import{a as i,b as y}from"../../chunk-NKINOJY6.mjs";import{a as d}from"../../chunk-BK7UG4U4.mjs";import{a as e}from"../../chunk-7GVG4HLE.mjs";import{a as x}from"../../chunk-WAW7PQYM.mjs";import{a as p,b as f,c as s}from"../../chunk-QPQGRQKI.mjs";import"../../chunk-S7CSCIW4.mjs";import"../../chunk-27WJUZYR.mjs";export{o as Accordion,G as AccordionItem,l as ArrowIcon,r as Banner,f as Button,s as ButtonVariant,a as Carousel,e as Container,t as ContentAlignment,V as Flex,B as FlexItem,P as Footer,i as Grid,y as GridItem,c as Header,h as IconLabel,d as Image,m as ImageIcon,g as InlineSVG,p as Link,u as MediaPlaceholder,I as Modal,A as Page,F as Rating,x as Text,C as ThemeSwitcher,T as Video,n as VideoIcon};
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
import { UniformSlot } from '@uniformdev/
|
|
2
|
+
import { UniformSlot } from '@uniformdev/next-app-router/component';
|
|
3
3
|
import BaseAccordion from '@/components/ui/Accordion';
|
|
4
|
-
import {
|
|
4
|
+
import { withFlattenParameters } from '@/utils/withFlattenParameters';
|
|
5
|
+
import { AccordionParameters, AccordionProps } from '.';
|
|
5
6
|
|
|
6
|
-
|
|
7
|
+
const Accordion: FC<AccordionProps & AccordionParameters> = ({
|
|
7
8
|
slots,
|
|
8
|
-
component,
|
|
9
|
-
context,
|
|
10
9
|
backgroundColor,
|
|
11
10
|
spacing,
|
|
12
11
|
border,
|
|
@@ -14,8 +13,10 @@ export const Accordion: FC<AccordionProps> = ({
|
|
|
14
13
|
height,
|
|
15
14
|
}) => (
|
|
16
15
|
<BaseAccordion
|
|
17
|
-
accordionContent={<UniformSlot
|
|
18
|
-
accordionItems={<UniformSlot
|
|
16
|
+
accordionContent={<UniformSlot slot={slots.accordionContent} />}
|
|
17
|
+
accordionItems={<UniformSlot slot={slots.accordionItems} />}
|
|
19
18
|
{...{ backgroundColor, spacing, border, fluidContent, height }}
|
|
20
19
|
/>
|
|
21
20
|
);
|
|
21
|
+
|
|
22
|
+
export default withFlattenParameters(Accordion);
|
|
@@ -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 AccordionParameters = ContainerParameters;
|
|
5
5
|
|
|
@@ -10,5 +10,5 @@ export enum AccordionSlots {
|
|
|
10
10
|
|
|
11
11
|
export type AccordionProps = ComponentProps<AccordionParameters, AccordionSlots>;
|
|
12
12
|
|
|
13
|
-
export {
|
|
13
|
+
export { default } from './accordion';
|
|
14
14
|
export { AccordionEmptyPlaceholder } from './empty-placeholder';
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import { FC } from 'react';
|
|
4
|
-
import { UniformSlot, UniformText } from '@uniformdev/
|
|
4
|
+
import { ComponentParameter, UniformSlot, UniformText } from '@uniformdev/next-app-router/component';
|
|
5
5
|
import BaseAccordionItem from '@/components/ui/AccordionItem';
|
|
6
6
|
import BaseText from '@/components/ui/Text';
|
|
7
|
-
import {
|
|
7
|
+
import { withFlattenParameters } from '@/utils/withFlattenParameters';
|
|
8
|
+
import { AccordionItemParameters, AccordionItemProps } from '.';
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
const AccordionItem: FC<AccordionItemProps & AccordionItemParameters> = ({
|
|
10
11
|
tag,
|
|
11
12
|
alignment,
|
|
12
13
|
color,
|
|
@@ -18,10 +19,10 @@ export const AccordionItem: FC<AccordionItemProps> = ({
|
|
|
18
19
|
letterSpacing,
|
|
19
20
|
slots,
|
|
20
21
|
component,
|
|
21
|
-
context,
|
|
22
22
|
backgroundColor,
|
|
23
23
|
spacing,
|
|
24
24
|
className,
|
|
25
|
+
parameters,
|
|
25
26
|
}) => (
|
|
26
27
|
<BaseAccordionItem
|
|
27
28
|
{...{
|
|
@@ -33,13 +34,14 @@ export const AccordionItem: FC<AccordionItemProps> = ({
|
|
|
33
34
|
<BaseText {...{ alignment, color, size, font, weight, transform, decoration, letterSpacing }}>
|
|
34
35
|
<UniformText
|
|
35
36
|
placeholder="Text goes here"
|
|
36
|
-
|
|
37
|
+
parameter={parameters.text as ComponentParameter<string>}
|
|
37
38
|
as={tag || undefined}
|
|
38
39
|
component={component}
|
|
39
|
-
context={context}
|
|
40
40
|
/>
|
|
41
41
|
</BaseText>
|
|
42
42
|
}
|
|
43
|
-
accordionItemContent={<UniformSlot
|
|
43
|
+
accordionItemContent={<UniformSlot slot={slots.accordionItemContent} />}
|
|
44
44
|
/>
|
|
45
45
|
);
|
|
46
|
+
|
|
47
|
+
export default withFlattenParameters(AccordionItem);
|
|
@@ -1,7 +1,7 @@
|
|
|
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';
|
|
4
3
|
import { TextParameters } from '@/components/canvas/Text/parameters';
|
|
4
|
+
import { ComponentProps } from '@/types/cskTypes';
|
|
5
5
|
|
|
6
6
|
export type AccordionItemParameters = Pick<ContainerParameters, 'backgroundColor' | 'spacing' | 'border'> &
|
|
7
7
|
TextParameters;
|
|
@@ -14,9 +14,7 @@ export enum AccordionItemSlots {
|
|
|
14
14
|
AccordionItemContent = 'accordionItemContent',
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
export type AccordionItemProps = ComponentProps<
|
|
18
|
-
|
|
19
|
-
AccordionItemSlots
|
|
20
|
-
>;
|
|
17
|
+
export type AccordionItemProps = ComponentProps<AccordionItemParameters, AccordionItemSlots> &
|
|
18
|
+
AccordionItemAdditionalProps;
|
|
21
19
|
|
|
22
|
-
export default dynamic(() => import('./accordion-item').then(mod => mod.
|
|
20
|
+
export default dynamic(() => import('./accordion-item').then(mod => mod.default));
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
import { UniformText } from '@uniformdev/
|
|
2
|
+
import { ComponentParameter, UniformText } from '@uniformdev/next-app-router/component';
|
|
3
3
|
import BaseText from '@/components/ui/Text';
|
|
4
4
|
import { cn } from '@/utils/styling';
|
|
5
|
-
import {
|
|
5
|
+
import { withFlattenParameters } from '@/utils/withFlattenParameters';
|
|
6
|
+
import { BadgeParameters, BadgeProps } from '.';
|
|
6
7
|
import { Dot } from './dot';
|
|
7
8
|
import { getBadgeClass } from './style-utils';
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
const Badge: FC<BadgeProps & BadgeParameters> = ({
|
|
10
11
|
component,
|
|
11
|
-
context,
|
|
12
12
|
textColor,
|
|
13
13
|
backgroundColor,
|
|
14
14
|
borderColor,
|
|
15
15
|
dotColor,
|
|
16
16
|
pill = false,
|
|
17
17
|
size,
|
|
18
|
+
parameters,
|
|
18
19
|
}) => (
|
|
19
20
|
<div className={getBadgeClass({ pill, size, dotColor, borderColor, backgroundColor })}>
|
|
20
21
|
{dotColor && (
|
|
@@ -25,7 +26,13 @@ export const Badge: FC<BadgeProps> = ({
|
|
|
25
26
|
/>
|
|
26
27
|
)}
|
|
27
28
|
<BaseText color={textColor} size="xs">
|
|
28
|
-
<UniformText
|
|
29
|
+
<UniformText
|
|
30
|
+
placeholder="Badge text goes here"
|
|
31
|
+
parameter={parameters.text as ComponentParameter<string>}
|
|
32
|
+
component={component}
|
|
33
|
+
/>
|
|
29
34
|
</BaseText>
|
|
30
35
|
</div>
|
|
31
36
|
);
|
|
37
|
+
|
|
38
|
+
export default withFlattenParameters(Badge);
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { ComponentProps } from '
|
|
2
|
-
import { Badge } from './badge';
|
|
1
|
+
import { ComponentProps } from '@/types/cskTypes';
|
|
3
2
|
|
|
4
3
|
export type BadgeParameters = {
|
|
5
4
|
text?: string;
|
|
@@ -13,4 +12,4 @@ export type BadgeParameters = {
|
|
|
13
12
|
|
|
14
13
|
export type BadgeProps = ComponentProps<BadgeParameters>;
|
|
15
14
|
|
|
16
|
-
export default
|
|
15
|
+
export { default } from './badge';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { cn } from '@/utils/styling';
|
|
2
|
-
import {
|
|
2
|
+
import { BadgeParameters } from '.';
|
|
3
3
|
|
|
4
4
|
type BadgeClass = {
|
|
5
|
-
pill:
|
|
6
|
-
size:
|
|
7
|
-
dotColor:
|
|
8
|
-
borderColor:
|
|
9
|
-
backgroundColor:
|
|
5
|
+
pill: BadgeParameters['pill'];
|
|
6
|
+
size: BadgeParameters['size'];
|
|
7
|
+
dotColor: BadgeParameters['dotColor'];
|
|
8
|
+
borderColor: BadgeParameters['borderColor'];
|
|
9
|
+
backgroundColor: BadgeParameters['backgroundColor'];
|
|
10
10
|
};
|
|
11
11
|
export const getBadgeClass = ({ pill, size, dotColor, borderColor, backgroundColor }: BadgeClass) =>
|
|
12
12
|
cn('inline-flex items-center w-fit', {
|
|
@@ -1,48 +1,36 @@
|
|
|
1
|
-
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { UniformSlot } from '@uniformdev/next-app-router/component';
|
|
3
|
+
import BaseBanner, { BannerVariants, ContentAlignment } from '@/components/ui/Banner';
|
|
4
|
+
import { withFlattenParameters } from '@/utils/withFlattenParameters';
|
|
5
|
+
import { BannerProps, BannerParameters } from '.';
|
|
2
6
|
|
|
3
|
-
|
|
4
|
-
import { UniformSlot } from '@uniformdev/canvas-next-rsc/component';
|
|
5
|
-
import Container from '@/components/ui/Container';
|
|
6
|
-
import { cn } from '@/utils/styling';
|
|
7
|
-
import { ContentAlignment, BannerProps } from '.';
|
|
8
|
-
import CloseButton from './close-button';
|
|
9
|
-
import { getContentClasses, getPositionClasses } from './style-utils';
|
|
10
|
-
import { BannerVariants } from './types';
|
|
11
|
-
|
|
12
|
-
export const Banner: FC<BannerProps> = ({
|
|
13
|
-
component,
|
|
14
|
-
context,
|
|
7
|
+
const Banner: FC<BannerProps & BannerParameters> = ({
|
|
15
8
|
backgroundColor,
|
|
16
9
|
spacing,
|
|
17
10
|
border,
|
|
18
11
|
fluidContent,
|
|
19
|
-
slots,
|
|
20
12
|
iconColor,
|
|
21
13
|
contentAlignment = ContentAlignment.Center,
|
|
22
14
|
floating = false,
|
|
15
|
+
slots,
|
|
16
|
+
variant,
|
|
23
17
|
}) => {
|
|
24
|
-
const [isOpen, setIsOpen] = useState(true);
|
|
25
|
-
|
|
26
|
-
const handleClose = useCallback(() => {
|
|
27
|
-
setIsOpen(false);
|
|
28
|
-
}, []);
|
|
29
|
-
|
|
30
|
-
if (!isOpen) return null;
|
|
31
|
-
|
|
32
|
-
const positionClasses = getPositionClasses({ variant: component.variant as BannerVariants, floating });
|
|
33
|
-
const contentClasses = getContentClasses({ contentAlignment, iconColor, fluidContent, floating });
|
|
34
|
-
|
|
35
18
|
return (
|
|
36
|
-
<
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
fluidContent
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
19
|
+
<BaseBanner
|
|
20
|
+
{...{
|
|
21
|
+
backgroundColor,
|
|
22
|
+
spacing,
|
|
23
|
+
border,
|
|
24
|
+
fluidContent,
|
|
25
|
+
iconColor,
|
|
26
|
+
contentAlignment,
|
|
27
|
+
floating,
|
|
28
|
+
variant: variant as BannerVariants,
|
|
29
|
+
}}
|
|
30
|
+
>
|
|
31
|
+
<UniformSlot slot={slots.bannerContent} />
|
|
32
|
+
</BaseBanner>
|
|
47
33
|
);
|
|
48
34
|
};
|
|
35
|
+
|
|
36
|
+
export default withFlattenParameters(Banner);
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import dynamic from 'next/dynamic';
|
|
2
|
-
import { ComponentProps } from '@uniformdev/canvas-next-rsc/component';
|
|
3
1
|
import { ContainerParameters } from '@/components/canvas/Container/parameters';
|
|
2
|
+
import { ContentAlignment } from '@/components/ui/Banner';
|
|
3
|
+
import { ComponentProps } from '@/types/cskTypes';
|
|
4
4
|
|
|
5
|
-
export enum
|
|
6
|
-
|
|
7
|
-
Center = 'center',
|
|
8
|
-
Right = 'right',
|
|
5
|
+
export enum BannerSlots {
|
|
6
|
+
BannerContent = 'bannerContent',
|
|
9
7
|
}
|
|
10
8
|
|
|
11
9
|
export type BannerParameters = ContainerParameters & {
|
|
@@ -13,11 +11,9 @@ export type BannerParameters = ContainerParameters & {
|
|
|
13
11
|
contentAlignment?: ContentAlignment;
|
|
14
12
|
floating?: boolean;
|
|
15
13
|
};
|
|
16
|
-
export enum BannerSlots {
|
|
17
|
-
BannerContent = 'bannerContent',
|
|
18
|
-
}
|
|
19
14
|
|
|
20
15
|
export type BannerProps = ComponentProps<BannerParameters, BannerSlots>;
|
|
21
16
|
|
|
22
|
-
export
|
|
23
|
-
|
|
17
|
+
export { ContentAlignment };
|
|
18
|
+
|
|
19
|
+
export { default } from './banner';
|
|
@@ -1,34 +1,24 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { LinkParamValue, CanvasClient, flattenValues } from '@uniformdev/canvas';
|
|
3
3
|
import { ProjectMapClient } from '@uniformdev/project-map';
|
|
4
4
|
import BaseButton, { ButtonVariant } from '@/components/ui/Button';
|
|
5
5
|
import BaseText from '@/components/ui/Text';
|
|
6
|
+
import { compositionCache } from '@/utils/getSlotComponents';
|
|
6
7
|
import { formatUniformLink, resolveRouteToPath } from '@/utils/routing';
|
|
7
8
|
import { cn } from '@/utils/styling';
|
|
8
|
-
import {
|
|
9
|
+
import { withFlattenParameters } from '@/utils/withFlattenParameters';
|
|
10
|
+
import { BreadcrumbLink, BreadcrumbsParameters, BreadcrumbsProps } from '.';
|
|
9
11
|
import { getSeparator } from './helpers';
|
|
10
12
|
|
|
11
|
-
export const Breadcrumbs: FC<
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
size,
|
|
15
|
-
color,
|
|
16
|
-
font,
|
|
17
|
-
transform,
|
|
18
|
-
autoGenerate,
|
|
19
|
-
context,
|
|
20
|
-
}) => {
|
|
13
|
+
export const Breadcrumbs: FC<
|
|
14
|
+
BreadcrumbsProps & Omit<BreadcrumbsParameters, 'links'> & { links?: { title?: string; link?: LinkParamValue }[] }
|
|
15
|
+
> = async ({ separator, links, size, color, font, transform, autoGenerate, context }) => {
|
|
21
16
|
// Matched route is 'composition' — this means we're in the composition pattern,
|
|
22
17
|
// so we don't have access to the project map at this point.
|
|
23
|
-
const isInPattern = !context?.
|
|
18
|
+
const isInPattern = !context?.type || context?.type !== 'page';
|
|
24
19
|
|
|
25
20
|
const getManualBreadcrumbs = async (): Promise<BreadcrumbLink[]> =>
|
|
26
|
-
links?.reduce<BreadcrumbLink[]>((acc,
|
|
27
|
-
const { title, link } = flattenValues(item) as {
|
|
28
|
-
title?: string;
|
|
29
|
-
link?: LinkParamValue;
|
|
30
|
-
};
|
|
31
|
-
|
|
21
|
+
links?.filter(Boolean).reduce<BreadcrumbLink[]>((acc, { title, link }) => {
|
|
32
22
|
if (!title) return acc;
|
|
33
23
|
|
|
34
24
|
return [...acc, { title, link: formatUniformLink(link) }];
|
|
@@ -36,15 +26,19 @@ export const Breadcrumbs: FC<BreadcrumbsProps> = async ({
|
|
|
36
26
|
|
|
37
27
|
const getAutoBreadcrumbs = async (): Promise<BreadcrumbLink[]> => {
|
|
38
28
|
if (isInPattern) return [];
|
|
39
|
-
|
|
40
29
|
const client = new ProjectMapClient({
|
|
41
30
|
projectId: process.env.UNIFORM_PROJECT_ID,
|
|
42
31
|
apiKey: process.env.UNIFORM_API_KEY,
|
|
32
|
+
apiHost: process.env.UNIFORM_CLI_BASE_URL || 'https://uniform.app',
|
|
43
33
|
});
|
|
44
34
|
|
|
35
|
+
const { projectMapNodes } = compositionCache.getUniformComposition({ id: context?._id }) || {};
|
|
36
|
+
if (!projectMapNodes || !projectMapNodes[0]) return [];
|
|
37
|
+
|
|
45
38
|
const { nodes } = await client.getNodes({
|
|
46
|
-
path:
|
|
39
|
+
path: projectMapNodes[0].path,
|
|
47
40
|
includeAncestors: true,
|
|
41
|
+
depth: 0,
|
|
48
42
|
});
|
|
49
43
|
|
|
50
44
|
if (!nodes?.length) return [];
|
|
@@ -58,6 +52,8 @@ export const Breadcrumbs: FC<BreadcrumbsProps> = async ({
|
|
|
58
52
|
? await new CanvasClient({
|
|
59
53
|
projectId: process.env.UNIFORM_PROJECT_ID,
|
|
60
54
|
apiKey: process.env.UNIFORM_API_KEY,
|
|
55
|
+
apiHost: process.env.UNIFORM_CLI_BASE_URL || 'https://uniform.app',
|
|
56
|
+
edgeApiHost: process.env.UNIFORM_CLI_BASE_EDGE_URL || 'https://uniform.global',
|
|
61
57
|
})
|
|
62
58
|
.getCompositionById({ compositionId: node.compositionId })
|
|
63
59
|
.then(({ composition }) => {
|
|
@@ -68,7 +64,8 @@ export const Breadcrumbs: FC<BreadcrumbsProps> = async ({
|
|
|
68
64
|
.catch(() => node.name)
|
|
69
65
|
: node.name;
|
|
70
66
|
|
|
71
|
-
const link =
|
|
67
|
+
const link =
|
|
68
|
+
node.type === 'placeholder' ? undefined : resolveRouteToPath(node.path, context.pageState.routePath);
|
|
72
69
|
|
|
73
70
|
return { title, link };
|
|
74
71
|
})
|
|
@@ -127,3 +124,5 @@ export const Breadcrumbs: FC<BreadcrumbsProps> = async ({
|
|
|
127
124
|
</ul>
|
|
128
125
|
);
|
|
129
126
|
};
|
|
127
|
+
|
|
128
|
+
export default withFlattenParameters(Breadcrumbs);
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { DataWithProperties } from '@uniformdev/canvas';
|
|
2
|
-
import { ComponentProps } from '@uniformdev/canvas-next-rsc/component';
|
|
3
2
|
import { TextParameters } from '@/components/canvas/Text/parameters';
|
|
4
|
-
import {
|
|
3
|
+
import { ComponentProps } from '@/types/cskTypes';
|
|
5
4
|
|
|
6
5
|
export type BreadcrumbLink = {
|
|
7
6
|
title: string;
|
|
@@ -13,10 +12,8 @@ export type BreadcrumbsParameters = {
|
|
|
13
12
|
separator?: 'slash' | 'chevron';
|
|
14
13
|
links?: DataWithProperties[];
|
|
15
14
|
autoGenerate?: boolean;
|
|
16
|
-
}
|
|
15
|
+
} & Pick<TextParameters, 'size' | 'color' | 'font' | 'transform'>;
|
|
17
16
|
|
|
18
|
-
export type BreadcrumbsProps = ComponentProps<
|
|
19
|
-
BreadcrumbsParameters & Pick<TextParameters, 'size' | 'color' | 'font' | 'transform'>
|
|
20
|
-
>;
|
|
17
|
+
export type BreadcrumbsProps = ComponentProps<BreadcrumbsParameters>;
|
|
21
18
|
|
|
22
|
-
export default
|
|
19
|
+
export { default } from './breadcrumbs';
|