@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
|
@@ -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 { FlexibleHeroParameters } from '.';
|
|
@@ -9,9 +9,9 @@ type DefaultVariantProps = {
|
|
|
9
9
|
border: FlexibleHeroParameters['border'];
|
|
10
10
|
fluidContent: FlexibleHeroParameters['fluidContent'];
|
|
11
11
|
height: FlexibleHeroParameters['height'];
|
|
12
|
-
demoHeroMedia:
|
|
13
|
-
demoHeroContent:
|
|
14
|
-
demoHeroCTA:
|
|
12
|
+
demoHeroMedia: ReactNode;
|
|
13
|
+
demoHeroContent: ReactNode;
|
|
14
|
+
demoHeroCTA: ReactNode;
|
|
15
15
|
textAlignmentClass: string;
|
|
16
16
|
buttonAlignmentClass: string;
|
|
17
17
|
};
|
|
@@ -1,13 +1,34 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
import { UniformSlot } from '@uniformdev/
|
|
3
|
-
import {
|
|
2
|
+
import { UniformSlot } from '@uniformdev/next-app-router/component';
|
|
3
|
+
import { SlotDefinition } from '@uniformdev/next-app-router-shared';
|
|
4
|
+
import { ReplaceFieldsWithAssets } from '@/types/cskTypes';
|
|
5
|
+
import {
|
|
6
|
+
DemoHeroVariants,
|
|
7
|
+
FixedHeroParameters,
|
|
8
|
+
FixedHeroProps,
|
|
9
|
+
FlexibleHeroParameters,
|
|
10
|
+
FlexibleHeroProps,
|
|
11
|
+
FlexibleHeroSlots,
|
|
12
|
+
} from '.';
|
|
4
13
|
import { BaseHeroButton, BaseHeroImage, BaseHeroText } from './atoms';
|
|
5
14
|
import { ColumnsVariant } from './columns-variant';
|
|
6
15
|
import { DefaultVariant } from './default-variant';
|
|
7
16
|
import { getButtonAlignmentClass, getTextAlignmentClass } from './style-utils';
|
|
8
17
|
import { cleanUpPrefix } from './utils';
|
|
9
18
|
|
|
10
|
-
|
|
19
|
+
type FixedHeroComponentProps = {
|
|
20
|
+
isFlexibleHero?: false;
|
|
21
|
+
slots: Record<never, SlotDefinition>;
|
|
22
|
+
} & FixedHeroProps &
|
|
23
|
+
ReplaceFieldsWithAssets<FixedHeroParameters, 'image' | 'primaryButtonIcon'>;
|
|
24
|
+
|
|
25
|
+
type FlexibleHeroComponentProps = {
|
|
26
|
+
isFlexibleHero: true;
|
|
27
|
+
slots: Record<FlexibleHeroSlots, SlotDefinition>;
|
|
28
|
+
} & FlexibleHeroProps &
|
|
29
|
+
ReplaceFieldsWithAssets<FlexibleHeroParameters, 'image' | 'primaryButtonIcon'>;
|
|
30
|
+
|
|
31
|
+
export const DemoHero: FC<FixedHeroComponentProps | FlexibleHeroComponentProps> = ({
|
|
11
32
|
// Eyebrow Text Parameters
|
|
12
33
|
eyebrowTitleText,
|
|
13
34
|
eyebrowTitleTag,
|
|
@@ -79,15 +100,17 @@ export const DemoHero: FC<(FixedHeroProps | FlexibleHeroProps) & { isFlexibleHer
|
|
|
79
100
|
border,
|
|
80
101
|
fluidContent,
|
|
81
102
|
height,
|
|
82
|
-
isFlexibleHero
|
|
103
|
+
isFlexibleHero,
|
|
83
104
|
component,
|
|
84
105
|
context,
|
|
85
106
|
slots,
|
|
107
|
+
variant,
|
|
108
|
+
parameters,
|
|
86
109
|
}) => {
|
|
87
|
-
const
|
|
110
|
+
const isEditorPreviewMode = context.isContextualEditing;
|
|
88
111
|
|
|
89
112
|
const demoHeroContent = isFlexibleHero ? (
|
|
90
|
-
<UniformSlot
|
|
113
|
+
<UniformSlot slot={slots.flexibleHeroContent} />
|
|
91
114
|
) : (
|
|
92
115
|
<>
|
|
93
116
|
<BaseHeroText
|
|
@@ -107,9 +130,9 @@ export const DemoHero: FC<(FixedHeroProps | FlexibleHeroProps) & { isFlexibleHer
|
|
|
107
130
|
},
|
|
108
131
|
'eyebrowTitle'
|
|
109
132
|
)}
|
|
133
|
+
isEditorPreviewMode={isEditorPreviewMode}
|
|
110
134
|
component={component}
|
|
111
|
-
|
|
112
|
-
parameterId="eyebrowTitleText"
|
|
135
|
+
parameter={parameters.eyebrowTitleText}
|
|
113
136
|
/>
|
|
114
137
|
<BaseHeroText
|
|
115
138
|
{...cleanUpPrefix(
|
|
@@ -128,9 +151,9 @@ export const DemoHero: FC<(FixedHeroProps | FlexibleHeroProps) & { isFlexibleHer
|
|
|
128
151
|
},
|
|
129
152
|
'title'
|
|
130
153
|
)}
|
|
154
|
+
isEditorPreviewMode={isEditorPreviewMode}
|
|
131
155
|
component={component}
|
|
132
|
-
|
|
133
|
-
parameterId="titleText"
|
|
156
|
+
parameter={parameters.titleText}
|
|
134
157
|
/>
|
|
135
158
|
<BaseHeroText
|
|
136
159
|
{...cleanUpPrefix(
|
|
@@ -149,15 +172,15 @@ export const DemoHero: FC<(FixedHeroProps | FlexibleHeroProps) & { isFlexibleHer
|
|
|
149
172
|
},
|
|
150
173
|
'description'
|
|
151
174
|
)}
|
|
175
|
+
isEditorPreviewMode={isEditorPreviewMode}
|
|
152
176
|
component={component}
|
|
153
|
-
|
|
154
|
-
parameterId="descriptionText"
|
|
177
|
+
parameter={parameters.descriptionText}
|
|
155
178
|
/>
|
|
156
179
|
</>
|
|
157
180
|
);
|
|
158
181
|
|
|
159
182
|
const demoHeroCTA = isFlexibleHero ? (
|
|
160
|
-
<UniformSlot
|
|
183
|
+
<UniformSlot slot={slots.flexibleHeroCta} />
|
|
161
184
|
) : (
|
|
162
185
|
<>
|
|
163
186
|
<BaseHeroButton
|
|
@@ -181,15 +204,14 @@ export const DemoHero: FC<(FixedHeroProps | FlexibleHeroProps) & { isFlexibleHer
|
|
|
181
204
|
},
|
|
182
205
|
'primaryButton'
|
|
183
206
|
)}
|
|
207
|
+
isEditorPreviewMode={isEditorPreviewMode}
|
|
184
208
|
component={component}
|
|
185
|
-
|
|
186
|
-
parameterId="primaryButtonText"
|
|
209
|
+
parameter={parameters.primaryButtonText}
|
|
187
210
|
/>
|
|
188
211
|
</>
|
|
189
212
|
);
|
|
190
213
|
|
|
191
214
|
const variantProps = {
|
|
192
|
-
variant,
|
|
193
215
|
backgroundColor,
|
|
194
216
|
spacing,
|
|
195
217
|
border,
|
|
@@ -217,7 +239,8 @@ export const DemoHero: FC<(FixedHeroProps | FlexibleHeroProps) & { isFlexibleHer
|
|
|
217
239
|
'image'
|
|
218
240
|
)}
|
|
219
241
|
component={component}
|
|
220
|
-
|
|
242
|
+
isEditorPreviewMode={isEditorPreviewMode}
|
|
243
|
+
variant={variant}
|
|
221
244
|
/>
|
|
222
245
|
</>
|
|
223
246
|
),
|
|
@@ -228,7 +251,7 @@ export const DemoHero: FC<(FixedHeroProps | FlexibleHeroProps) & { isFlexibleHer
|
|
|
228
251
|
switch (variant) {
|
|
229
252
|
case DemoHeroVariants.Columns:
|
|
230
253
|
case DemoHeroVariants.ColumnsReverse:
|
|
231
|
-
return <ColumnsVariant {...variantProps} />;
|
|
254
|
+
return <ColumnsVariant variant={variant} {...variantProps} />;
|
|
232
255
|
default:
|
|
233
256
|
return <DefaultVariant {...variantProps} />;
|
|
234
257
|
}
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { ReplaceFieldsWithAssets } from '@/types/cskTypes';
|
|
3
|
+
import { withFlattenParameters } from '@/utils/withFlattenParameters';
|
|
4
|
+
import { FixedHeroParameters, FixedHeroProps } from '.';
|
|
3
5
|
import { DemoHero } from './demo-hero';
|
|
4
6
|
import { getImageParametersFocalPoint } from './utils';
|
|
5
7
|
|
|
6
|
-
|
|
8
|
+
const FixedHero: FC<FixedHeroProps & ReplaceFieldsWithAssets<FixedHeroParameters, 'image' | 'primaryButtonIcon'>> = ({
|
|
9
|
+
textColor,
|
|
10
|
+
overlayAutoTint,
|
|
11
|
+
...props
|
|
12
|
+
}) => (
|
|
7
13
|
<DemoHero
|
|
8
14
|
{...props}
|
|
9
15
|
// Eyebrow Text Parameters
|
|
@@ -44,9 +50,9 @@ export const FixedHero: FC<FixedHeroProps> = ({ textColor, overlayAutoTint, ...p
|
|
|
44
50
|
imagePriority
|
|
45
51
|
imageObjectFit="cover"
|
|
46
52
|
imageUnoptimized
|
|
47
|
-
imageContrastBaseColor={!props.
|
|
53
|
+
imageContrastBaseColor={!props.variant && overlayAutoTint ? textColor : undefined}
|
|
48
54
|
imageOverlayOpacity={overlayAutoTint}
|
|
49
|
-
{...getImageParametersFocalPoint(!!props.
|
|
55
|
+
{...getImageParametersFocalPoint(!!props.variant)}
|
|
50
56
|
// Presentation Parameters
|
|
51
57
|
spacing={{
|
|
52
58
|
paddingTop: 'container-xlarge',
|
|
@@ -54,7 +60,8 @@ export const FixedHero: FC<FixedHeroProps> = ({ textColor, overlayAutoTint, ...p
|
|
|
54
60
|
paddingRight: 'container-small',
|
|
55
61
|
paddingBottom: 'container-xlarge',
|
|
56
62
|
}}
|
|
57
|
-
fluidContent={!props.
|
|
58
|
-
isFlexibleHero={false}
|
|
63
|
+
fluidContent={!props.variant}
|
|
59
64
|
/>
|
|
60
65
|
);
|
|
66
|
+
|
|
67
|
+
export default withFlattenParameters(FixedHero);
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { ReplaceFieldsWithAssets } from '@/types/cskTypes';
|
|
3
|
+
import { withFlattenParameters } from '@/utils/withFlattenParameters';
|
|
4
|
+
import { FlexibleHeroParameters, FlexibleHeroProps } from '.';
|
|
3
5
|
import { DemoHero } from './demo-hero';
|
|
4
6
|
|
|
5
|
-
export const FlexibleHero: FC<
|
|
7
|
+
export const FlexibleHero: FC<
|
|
8
|
+
FlexibleHeroProps & ReplaceFieldsWithAssets<FlexibleHeroParameters, 'image' | 'primaryButtonIcon'>
|
|
9
|
+
> = props => <DemoHero {...props} isFlexibleHero={true} />;
|
|
10
|
+
|
|
11
|
+
export default withFlattenParameters(FlexibleHero);
|
|
@@ -1,12 +1,11 @@
|
|
|
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 { ContainerParameters } from '@/components/canvas/Container/parameters';
|
|
5
4
|
import { TextParameters } from '@/components/canvas/Text/parameters';
|
|
6
5
|
import { ButtonVariant, ButtonProps as BaseButtonProps } from '@/components/ui/Button';
|
|
7
|
-
import { ViewPort } from '@/types/cskTypes';
|
|
8
|
-
import
|
|
9
|
-
import
|
|
6
|
+
import { ViewPort, ComponentProps } from '@/types/cskTypes';
|
|
7
|
+
import FixedHero from './fixed-hero';
|
|
8
|
+
import FlexibleHero from './flexible-hero';
|
|
10
9
|
import { PrefixedKeys } from './utils';
|
|
11
10
|
|
|
12
11
|
export enum ContentAlignment {
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
import { cn } from '@/utils/styling';
|
|
3
|
-
import {
|
|
3
|
+
import { withFlattenParameters } from '@/utils/withFlattenParameters';
|
|
4
|
+
import { DividerParameters, DividerProps } from '.';
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
const Divider: FC<DividerProps & DividerParameters> = ({ color, thickness, width, alignment }) => (
|
|
6
7
|
<div className={cn('flex w-full', `justify-${alignment || 'center'}`)}>
|
|
7
8
|
<div className={cn({ [`bg-${color}`]: !!color })} style={{ width, height: thickness }} />
|
|
8
9
|
</div>
|
|
9
10
|
);
|
|
11
|
+
|
|
12
|
+
export default withFlattenParameters(Divider);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComponentProps } from '
|
|
1
|
+
import { ComponentProps } from '@/types/cskTypes';
|
|
2
2
|
|
|
3
3
|
export type DividerParameters = {
|
|
4
4
|
color?: string;
|
|
@@ -9,4 +9,4 @@ export type DividerParameters = {
|
|
|
9
9
|
|
|
10
10
|
export type DividerProps = ComponentProps<DividerParameters>;
|
|
11
11
|
|
|
12
|
-
export {
|
|
12
|
+
export { default } from './divider';
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
import { UniformSlot } from '@uniformdev/
|
|
2
|
+
import { UniformSlot } from '@uniformdev/next-app-router/component';
|
|
3
3
|
import BaseFlex from '@/components/ui/Flex';
|
|
4
|
-
import {
|
|
4
|
+
import { withFlattenParameters } from '@/utils/withFlattenParameters';
|
|
5
|
+
import { FlexProps, FlexParameters } from '.';
|
|
5
6
|
|
|
6
|
-
|
|
7
|
+
const Flex: FC<FlexProps & FlexParameters> = ({
|
|
7
8
|
direction,
|
|
8
9
|
justifyContent,
|
|
9
10
|
gap,
|
|
@@ -13,11 +14,10 @@ export const Flex: FC<FlexProps> = ({
|
|
|
13
14
|
border,
|
|
14
15
|
fluidContent,
|
|
15
16
|
slots,
|
|
16
|
-
component,
|
|
17
|
-
context,
|
|
18
17
|
className,
|
|
19
18
|
height,
|
|
20
19
|
wrapperClassName,
|
|
20
|
+
wrap,
|
|
21
21
|
}) => (
|
|
22
22
|
<BaseFlex
|
|
23
23
|
{...{
|
|
@@ -32,8 +32,11 @@ export const Flex: FC<FlexProps> = ({
|
|
|
32
32
|
height,
|
|
33
33
|
wrapperClassName,
|
|
34
34
|
className,
|
|
35
|
+
wrap,
|
|
35
36
|
}}
|
|
36
37
|
>
|
|
37
|
-
<UniformSlot
|
|
38
|
+
<UniformSlot slot={slots.flexItem} />
|
|
38
39
|
</BaseFlex>
|
|
39
40
|
);
|
|
41
|
+
|
|
42
|
+
export default withFlattenParameters(Flex);
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { ComponentProps } from '@uniformdev/canvas-next-rsc/component';
|
|
2
1
|
import { ContainerParameters } from '@/components/canvas/Container/parameters';
|
|
3
|
-
import { ViewPort } from '@/types/cskTypes';
|
|
4
|
-
import { Flex } from './flex';
|
|
2
|
+
import { ViewPort, ComponentProps } from '@/types/cskTypes';
|
|
5
3
|
|
|
6
4
|
type Direction = 'row' | 'row-reverse' | 'col' | 'col-reverse';
|
|
7
5
|
type Justify = 'start' | 'end' | 'center' | 'between';
|
|
8
6
|
type AvailableGap = '2' | '8' | '16';
|
|
9
7
|
type Align = 'start' | 'end' | 'center' | 'stretch';
|
|
8
|
+
type Wrap = 'nowrap' | 'wrap' | 'wrap-reverse';
|
|
10
9
|
|
|
11
10
|
export type FlexAdditionalProps = {
|
|
12
11
|
className?: string;
|
|
@@ -18,12 +17,13 @@ export type FlexParameters = ContainerParameters & {
|
|
|
18
17
|
justifyContent?: Justify | ViewPort<Justify>;
|
|
19
18
|
gap?: AvailableGap | ViewPort<AvailableGap>;
|
|
20
19
|
alignItems?: Align | ViewPort<Align>;
|
|
20
|
+
wrap?: Wrap | ViewPort<Wrap>;
|
|
21
21
|
};
|
|
22
22
|
|
|
23
|
-
enum FlexSlots {
|
|
23
|
+
export enum FlexSlots {
|
|
24
24
|
FlexItem = 'flexItem',
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
export type FlexProps = ComponentProps<FlexParameters & FlexAdditionalProps
|
|
27
|
+
export type FlexProps = ComponentProps<FlexParameters, FlexSlots> & FlexAdditionalProps;
|
|
28
28
|
|
|
29
|
-
export default
|
|
29
|
+
export { default } from './flex';
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
import { UniformSlot } from '@uniformdev/
|
|
2
|
+
import { UniformSlot } from '@uniformdev/next-app-router/component';
|
|
3
3
|
import BaseFlexItem from '@/components/ui/FlexItem';
|
|
4
|
-
import {
|
|
4
|
+
import { withFlattenParameters } from '@/utils/withFlattenParameters';
|
|
5
|
+
import { FlexItemProps, FlexItemParameters } from '.';
|
|
5
6
|
|
|
6
|
-
|
|
7
|
+
const FlexItem: FC<FlexItemProps & FlexItemParameters> = ({ alignSelf, shrink, slots }) => (
|
|
7
8
|
<BaseFlexItem {...{ alignSelf, shrink }}>
|
|
8
|
-
<UniformSlot
|
|
9
|
+
<UniformSlot slot={slots.inner} />
|
|
9
10
|
</BaseFlexItem>
|
|
10
11
|
);
|
|
12
|
+
|
|
13
|
+
export default withFlattenParameters(FlexItem);
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { ComponentProps } from '
|
|
2
|
-
import { ViewPort } from '@/types/cskTypes';
|
|
1
|
+
import { ComponentProps, ViewPort } from '@/types/cskTypes';
|
|
3
2
|
|
|
4
3
|
type AvailableAlignSelf = 'auto' | 'start' | 'end' | 'center' | 'stretch';
|
|
5
4
|
type AvailableShrink = '0' | '1';
|
|
@@ -7,13 +6,13 @@ type AvailableShrink = '0' | '1';
|
|
|
7
6
|
export type FlexItemParameters = {
|
|
8
7
|
displayName?: string;
|
|
9
8
|
alignSelf?: AvailableAlignSelf | ViewPort<AvailableAlignSelf>;
|
|
10
|
-
shrink
|
|
9
|
+
shrink?: AvailableShrink;
|
|
11
10
|
};
|
|
12
11
|
|
|
13
|
-
enum FlexItemSlots {
|
|
12
|
+
export enum FlexItemSlots {
|
|
14
13
|
Inner = 'inner',
|
|
15
14
|
}
|
|
16
15
|
|
|
17
16
|
export type FlexItemProps = ComponentProps<FlexItemParameters, FlexItemSlots>;
|
|
18
17
|
|
|
19
|
-
export {
|
|
18
|
+
export { default } from './flex-item';
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
import { UniformSlot } from '@uniformdev/
|
|
2
|
+
import { UniformSlot } from '@uniformdev/next-app-router/component';
|
|
3
3
|
import BaseFooter from '@/components/ui/Footer';
|
|
4
|
-
import {
|
|
4
|
+
import { withFlattenParameters } from '@/utils/withFlattenParameters';
|
|
5
|
+
import { FooterParameters, FooterProps } from '.';
|
|
5
6
|
|
|
6
|
-
export const Footer: FC<FooterProps> = ({
|
|
7
|
-
context,
|
|
8
|
-
component,
|
|
7
|
+
export const Footer: FC<FooterProps & FooterParameters> = ({
|
|
9
8
|
slots,
|
|
10
9
|
backgroundColor,
|
|
11
10
|
spacing,
|
|
@@ -13,9 +12,11 @@ export const Footer: FC<FooterProps> = ({
|
|
|
13
12
|
fluidContent,
|
|
14
13
|
}) => (
|
|
15
14
|
<BaseFooter
|
|
16
|
-
logo={<UniformSlot
|
|
17
|
-
copyright={<UniformSlot
|
|
18
|
-
content={<UniformSlot
|
|
15
|
+
logo={<UniformSlot slot={slots.footerLogo} />}
|
|
16
|
+
copyright={<UniformSlot slot={slots.footerCopyright} />}
|
|
17
|
+
content={<UniformSlot slot={slots.footerContent} />}
|
|
19
18
|
{...{ backgroundColor, spacing, border, fluidContent }}
|
|
20
19
|
/>
|
|
21
20
|
);
|
|
21
|
+
|
|
22
|
+
export default withFlattenParameters(Footer);
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { ComponentProps } from '@uniformdev/canvas-next-rsc/component';
|
|
2
1
|
import { FooterProps as BaseFooterProps } from '@/components/ui/Footer';
|
|
3
|
-
import {
|
|
2
|
+
import { ComponentProps } from '@/types/cskTypes';
|
|
4
3
|
|
|
5
4
|
export type FooterParameters = BaseFooterProps;
|
|
6
5
|
|
|
@@ -12,5 +11,5 @@ export enum FooterSlots {
|
|
|
12
11
|
|
|
13
12
|
export type FooterProps = ComponentProps<FooterParameters, FooterSlots>;
|
|
14
13
|
|
|
15
|
-
export default
|
|
14
|
+
export { default } from './footer';
|
|
16
15
|
export { FooterEmptyPlaceholder } from './empty-placeholder';
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
import { UniformSlot } from '@uniformdev/
|
|
2
|
+
import { UniformSlot } from '@uniformdev/next-app-router/component';
|
|
3
3
|
import BaseGrid from '@/components/ui/Grid';
|
|
4
|
-
import {
|
|
4
|
+
import { withFlattenParameters } from '@/utils/withFlattenParameters';
|
|
5
|
+
import { GridParameters, GridProps } from '.';
|
|
5
6
|
|
|
6
|
-
|
|
7
|
+
const Grid: FC<GridProps & GridParameters> = ({
|
|
7
8
|
columnsCount,
|
|
8
9
|
gapX,
|
|
9
10
|
gapY,
|
|
@@ -13,14 +14,15 @@ export const Grid: FC<GridProps> = ({
|
|
|
13
14
|
fluidContent,
|
|
14
15
|
height,
|
|
15
16
|
slots,
|
|
16
|
-
component,
|
|
17
|
-
context,
|
|
18
17
|
className,
|
|
18
|
+
alignItems,
|
|
19
19
|
}) => (
|
|
20
20
|
<BaseGrid
|
|
21
21
|
className={className}
|
|
22
|
-
{...{ columnsCount, gapX, gapY, backgroundColor, spacing, border, fluidContent, height }}
|
|
22
|
+
{...{ columnsCount, gapX, gapY, backgroundColor, spacing, border, fluidContent, height, alignItems }}
|
|
23
23
|
>
|
|
24
|
-
<UniformSlot
|
|
24
|
+
<UniformSlot slot={slots.gridInner} />
|
|
25
25
|
</BaseGrid>
|
|
26
26
|
);
|
|
27
|
+
|
|
28
|
+
export default withFlattenParameters(Grid);
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { ComponentProps } from '@uniformdev/canvas-next-rsc/component';
|
|
2
1
|
import { ContainerParameters } from '@/components/canvas/Container/parameters';
|
|
3
|
-
import { ViewPort } from '@/types/cskTypes';
|
|
4
|
-
import { Grid } from './grid';
|
|
2
|
+
import { ComponentProps, ViewPort } from '@/types/cskTypes';
|
|
5
3
|
|
|
6
4
|
type AvailableGridColumnsCount = '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10' | '11' | '12';
|
|
7
5
|
type AvailableGridGap = '2' | '8' | '16';
|
|
6
|
+
type Align = 'start' | 'end' | 'center' | 'baseline' | 'stretch';
|
|
8
7
|
|
|
9
8
|
export type GridAdditionalProps = {
|
|
10
9
|
className?: string;
|
|
@@ -14,12 +13,13 @@ export type GridParameters = ContainerParameters & {
|
|
|
14
13
|
columnsCount?: AvailableGridColumnsCount | ViewPort<AvailableGridColumnsCount>;
|
|
15
14
|
gapY?: AvailableGridGap | ViewPort<AvailableGridGap>;
|
|
16
15
|
gapX?: AvailableGridGap | ViewPort<AvailableGridGap>;
|
|
16
|
+
alignItems?: Align | ViewPort<Align>;
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
export enum GridSlots {
|
|
20
20
|
GridInner = 'gridInner',
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
export type GridProps = ComponentProps<GridParameters & GridAdditionalProps
|
|
23
|
+
export type GridProps = ComponentProps<GridParameters, GridSlots> & GridAdditionalProps;
|
|
24
24
|
|
|
25
|
-
export default
|
|
25
|
+
export { default } from './grid';
|
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
import { UniformSlot } from '@uniformdev/
|
|
2
|
+
import { UniformSlot } from '@uniformdev/next-app-router/component';
|
|
3
3
|
import BaseGridItem from '@/components/ui/GridItem';
|
|
4
|
-
import {
|
|
4
|
+
import { withFlattenParameters } from '@/utils/withFlattenParameters';
|
|
5
|
+
import { GridItemParameters, GridItemProps } from '.';
|
|
5
6
|
|
|
6
|
-
|
|
7
|
+
const GridItem: FC<GridItemProps & GridItemParameters> = ({
|
|
7
8
|
columnStart,
|
|
8
9
|
columnSpan,
|
|
9
10
|
rowStart,
|
|
10
|
-
className,
|
|
11
11
|
rowSpan,
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
alignSelf,
|
|
13
|
+
className,
|
|
14
14
|
slots,
|
|
15
15
|
}) => (
|
|
16
|
-
<BaseGridItem {...{ columnStart, columnSpan, rowStart, rowSpan, className }}>
|
|
17
|
-
<UniformSlot
|
|
16
|
+
<BaseGridItem {...{ columnStart, columnSpan, rowStart, rowSpan, alignSelf, className }}>
|
|
17
|
+
<UniformSlot slot={slots.inner} />
|
|
18
18
|
</BaseGridItem>
|
|
19
19
|
);
|
|
20
|
+
|
|
21
|
+
export default withFlattenParameters(GridItem);
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { ComponentProps } from '
|
|
2
|
-
import { ViewPort } from '@/types/cskTypes';
|
|
3
|
-
import { GridItem } from './grid-item';
|
|
1
|
+
import { ComponentProps, ViewPort } from '@/types/cskTypes';
|
|
4
2
|
|
|
5
3
|
type AvailableGridItemColumnsCount = '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10' | '11' | '12';
|
|
6
4
|
type AvailableGridItemSpan =
|
|
@@ -20,6 +18,7 @@ type AvailableGridItemSpan =
|
|
|
20
18
|
| 'span-full';
|
|
21
19
|
|
|
22
20
|
export type AvailableGridItemRowStart = '1' | '2' | '3' | '4' | '5' | '6';
|
|
21
|
+
type Align = 'start' | 'end' | 'center' | 'baseline' | 'stretch';
|
|
23
22
|
|
|
24
23
|
export type GridItemAdditionalProps = {
|
|
25
24
|
className?: string;
|
|
@@ -31,12 +30,13 @@ export type GridItemParameters = {
|
|
|
31
30
|
columnSpan?: AvailableGridItemSpan | ViewPort<AvailableGridItemSpan>;
|
|
32
31
|
rowStart?: AvailableGridItemRowStart | ViewPort<AvailableGridItemRowStart>;
|
|
33
32
|
rowSpan?: AvailableGridItemSpan | ViewPort<AvailableGridItemSpan>;
|
|
33
|
+
alignSelf?: Align | ViewPort<Align>;
|
|
34
34
|
};
|
|
35
35
|
|
|
36
36
|
export enum GridItemSlots {
|
|
37
37
|
Inner = 'inner',
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
export type GridItemProps = ComponentProps<GridItemParameters & GridItemAdditionalProps
|
|
40
|
+
export type GridItemProps = ComponentProps<GridItemParameters, GridItemSlots> & GridItemAdditionalProps;
|
|
41
41
|
|
|
42
|
-
export default
|
|
42
|
+
export { default } from './grid-item';
|
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
import { UniformSlot } from '@uniformdev/
|
|
2
|
+
import { UniformSlot } from '@uniformdev/next-app-router/component';
|
|
3
3
|
import BaseHeader from '@/components/ui/Header';
|
|
4
|
-
import {
|
|
4
|
+
import { withFlattenParameters } from '@/utils/withFlattenParameters';
|
|
5
|
+
import { HeaderParameters, HeaderProps, HeaderVariants } from '.';
|
|
5
6
|
|
|
6
|
-
|
|
7
|
+
const Header: FC<HeaderProps & HeaderParameters> = ({ backgroundColor, color, spacing, border, slots, variant }) => (
|
|
7
8
|
<BaseHeader
|
|
8
|
-
sticky={
|
|
9
|
-
leftSection={<UniformSlot
|
|
10
|
-
rightSection={<UniformSlot
|
|
9
|
+
sticky={variant === HeaderVariants.Sticky}
|
|
10
|
+
leftSection={<UniformSlot slot={slots.headerLeftContent} />}
|
|
11
|
+
rightSection={<UniformSlot slot={slots.headerRightContent} />}
|
|
11
12
|
{...{ backgroundColor, color, spacing, border }}
|
|
12
13
|
>
|
|
13
|
-
<UniformSlot
|
|
14
|
+
<UniformSlot slot={slots.headerCenterContent} />
|
|
14
15
|
</BaseHeader>
|
|
15
16
|
);
|
|
17
|
+
|
|
18
|
+
export default withFlattenParameters(Header);
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { ComponentProps } from '@uniformdev/canvas-next-rsc/component';
|
|
2
1
|
import { HeaderProps as BaseHeaderProps } from '@/components/ui/Header';
|
|
3
|
-
import {
|
|
2
|
+
import { ComponentProps } from '@/types/cskTypes';
|
|
4
3
|
|
|
5
4
|
export type HeaderParameters = Omit<BaseHeaderProps, 'sticky'>;
|
|
6
5
|
|
|
@@ -16,5 +15,5 @@ export enum HeaderVariants {
|
|
|
16
15
|
|
|
17
16
|
export type HeaderProps = ComponentProps<HeaderParameters, HeaderSlots>;
|
|
18
17
|
|
|
19
|
-
export default
|
|
18
|
+
export { default } from './header';
|
|
20
19
|
export { HeaderEmptyPlaceholder } from './empty-placeholder';
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
import { UniformText } from '@uniformdev/
|
|
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
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { ReplaceFieldsWithAssets } from '@/types/cskTypes';
|
|
6
|
+
import { withFlattenParameters } from '@/utils/withFlattenParameters';
|
|
7
|
+
import { IconLabelParameters, IconLabelProps } from '.';
|
|
7
8
|
|
|
8
|
-
|
|
9
|
+
const IconLabel: FC<IconLabelProps & ReplaceFieldsWithAssets<IconLabelParameters, 'icon'>> = ({
|
|
9
10
|
icon,
|
|
10
11
|
size,
|
|
11
12
|
tag,
|
|
@@ -16,18 +17,25 @@ export const IconLabel: FC<IconLabelProps> = ({
|
|
|
16
17
|
decoration,
|
|
17
18
|
letterSpacing,
|
|
18
19
|
alignment,
|
|
20
|
+
parameters,
|
|
19
21
|
component,
|
|
20
|
-
|
|
22
|
+
iconPosition,
|
|
21
23
|
}) => {
|
|
22
|
-
const [resolvedImage] =
|
|
24
|
+
const [resolvedImage] = icon || [];
|
|
23
25
|
const { url, title = '' } = resolvedImage || {};
|
|
24
26
|
|
|
25
27
|
return (
|
|
26
28
|
<BaseIconLabel
|
|
27
29
|
icon={url ? <BaseImage src={url} alt={title} fill /> : undefined}
|
|
28
|
-
{...{ size, tag, color, weight, font, transform, decoration, letterSpacing, alignment }}
|
|
30
|
+
{...{ size, tag, color, weight, font, transform, decoration, letterSpacing, alignment, iconPosition }}
|
|
29
31
|
>
|
|
30
|
-
<UniformText
|
|
32
|
+
<UniformText
|
|
33
|
+
placeholder="Text goes here"
|
|
34
|
+
parameter={parameters.text as ComponentParameter<string>}
|
|
35
|
+
component={component}
|
|
36
|
+
/>
|
|
31
37
|
</BaseIconLabel>
|
|
32
38
|
);
|
|
33
39
|
};
|
|
40
|
+
|
|
41
|
+
export default withFlattenParameters(IconLabel);
|