@uniformdev/csk-components 6.0.104 → 6.0.114-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/dist/accordion-item-QAVKQEB2.mjs +1 -0
- package/dist/accordion-item-Y4PSNOH4.mjs +1 -0
- package/dist/{banner-2B4K5R4N.mjs → banner-EYII7V7X.mjs} +1 -1
- package/dist/carousel-RZ2DV6QX.mjs +1 -0
- package/dist/carousel-YELQRJVB.mjs +1 -0
- package/dist/chunk-7GVG4HLE.mjs +1 -0
- package/dist/{chunk-LA36HQWS.mjs → chunk-B2O55EVA.mjs} +1 -1
- package/dist/chunk-EIEZRPWW.mjs +1 -0
- package/dist/chunk-EOV2LPGC.mjs +1 -0
- package/dist/chunk-EUVKAE6M.mjs +1 -0
- package/dist/chunk-LG7MD2DH.mjs +1 -0
- package/dist/chunk-PMMAALCQ.mjs +1 -0
- package/dist/chunk-RYEXR67P.mjs +1 -0
- package/dist/chunk-TCQTXNKT.mjs +1 -0
- package/dist/{chunk-FPOIJMYT.mjs → chunk-VW2XC3SE.mjs} +1 -1
- package/dist/chunk-WAW7PQYM.mjs +1 -0
- package/dist/components/canvas/emptyPlaceholders.mjs +1 -1
- package/dist/components/canvas/index.d.mts +5 -21
- package/dist/components/canvas/index.mjs +2 -2
- package/dist/components/ui/index.d.mts +48 -25
- package/dist/components/ui/index.mjs +1 -1
- package/dist/content/components/canvas/Accordion/accordion.tsx +6 -12
- package/dist/content/components/canvas/AccordionItem/accordion-item.tsx +23 -36
- package/dist/content/components/canvas/Button/index.tsx +1 -2
- package/dist/content/components/canvas/Card/card.tsx +1 -3
- package/dist/content/components/canvas/Carousel/carousel.tsx +1 -3
- package/dist/content/components/canvas/Container/container.tsx +0 -4
- package/dist/content/components/canvas/Container/parameters.ts +0 -4
- package/dist/content/components/canvas/DemoHero/atoms.tsx +31 -4
- package/dist/content/components/canvas/DemoHero/columns-variant.tsx +1 -7
- package/dist/content/components/canvas/DemoHero/default-variant.tsx +1 -8
- package/dist/content/components/canvas/DemoHero/demo-hero.tsx +2 -4
- package/dist/content/components/canvas/DemoHero/fixed-hero.tsx +57 -65
- package/dist/content/components/canvas/DemoHero/index.tsx +3 -14
- package/dist/content/components/canvas/DemoHero/utils.ts +14 -0
- package/dist/content/components/canvas/Flex/flex.tsx +2 -4
- package/dist/content/components/canvas/Grid/grid.tsx +1 -3
- package/dist/content/components/canvas/Image/image.tsx +13 -2
- package/dist/content/components/canvas/ImageGallery/image-gallery.tsx +1 -3
- package/dist/content/components/canvas/Review/default-variant.tsx +1 -3
- package/dist/content/components/canvas/Review/multi-column-variant.tsx +1 -3
- package/dist/content/components/canvas/Section/columns-variant.tsx +1 -7
- package/dist/content/components/canvas/Section/default-variant.tsx +1 -10
- package/dist/content/components/canvas/Section/section.tsx +0 -4
- package/dist/content/components/canvas/Table/table.tsx +1 -6
- package/dist/content/components/canvas/Tabs/tabs.tsx +1 -6
- package/dist/content/components/canvas/Testimonial/default-variant.tsx +2 -4
- package/dist/content/components/canvas/Testimonial/testimonial.tsx +0 -4
- package/dist/content/components/canvas/Testimonial/with-large-avatar-variant.tsx +2 -4
- package/dist/content/components/canvas/Testimonial/with-overlapping-image-variant.tsx +2 -4
- package/dist/content/components/canvas/Video/index.tsx +0 -2
- package/dist/content/components/canvas/Video/video.tsx +1 -2
- package/dist/content/components/ui/Button/index.ts +2 -5
- package/dist/content/components/ui/Carousel/carousel.tsx +2 -2
- package/dist/content/components/ui/Carousel/index.ts +1 -1
- package/dist/content/components/ui/Container/container.tsx +2 -7
- package/dist/content/components/ui/Container/index.ts +0 -6
- package/dist/content/components/ui/Flex/flex.tsx +19 -27
- package/dist/content/components/ui/Flex/index.ts +1 -5
- package/dist/content/components/ui/Footer/index.ts +1 -1
- package/dist/content/components/ui/Grid/grid.tsx +19 -25
- package/dist/content/components/ui/Grid/index.ts +4 -16
- package/dist/content/components/ui/GridItem/index.ts +4 -10
- package/dist/content/components/ui/Header/index.ts +1 -1
- package/dist/content/components/ui/Text/index.ts +3 -6
- package/dist/image-gallery-AMU6FS7N.mjs +1 -0
- package/dist/{index-B9eeSbLG.d.mts → index-D5cLtaIv.d.mts} +7 -14
- package/dist/{mobile-UAUHHXPH.mjs → mobile-JGZBHQC2.mjs} +1 -1
- package/dist/navigation-flyout-NAU6O2WG.mjs +1 -0
- package/dist/navigation-group-QA65N6AI.mjs +1 -0
- package/dist/tabs-J23TEEQ7.mjs +1 -0
- package/package.json +7 -7
- package/dist/accordion-item-G5CNMERW.mjs +0 -1
- package/dist/carousel-BBEW5P4Y.mjs +0 -1
- package/dist/carousel-ERCHOWUS.mjs +0 -1
- package/dist/chunk-4LWAGTFW.mjs +0 -1
- package/dist/chunk-5VM2Y55L.mjs +0 -1
- package/dist/chunk-AKRWCDDG.mjs +0 -1
- package/dist/chunk-M3BGP5VE.mjs +0 -1
- package/dist/chunk-QHIWJPL6.mjs +0 -1
- package/dist/chunk-TIRCISSU.mjs +0 -1
- package/dist/chunk-TM7Q5NMH.mjs +0 -1
- package/dist/chunk-YUCUJWBO.mjs +0 -1
- package/dist/chunk-Z7JSWSPD.mjs +0 -1
- package/dist/content/components/canvas/AccordionItem/icon-arrow-down.tsx +0 -20
- package/dist/content/components/canvas/AccordionItem/icon-arrow-up.tsx +0 -20
- package/dist/content/components/canvas/Image/placeholder.tsx +0 -20
- package/dist/content/components/ui/Container/utils.ts +0 -18
- package/dist/image-gallery-F6JLG7XW.mjs +0 -1
- package/dist/navigation-flyout-MXIJA6PC.mjs +0 -1
- package/dist/navigation-group-DEN3D2BO.mjs +0 -1
- package/dist/tabs-AQFKYC6M.mjs +0 -1
|
@@ -18,14 +18,12 @@ export const MultiColumnVariant: FC<MultiColumnVariantProps> = ({
|
|
|
18
18
|
spacing,
|
|
19
19
|
border,
|
|
20
20
|
fluidContent,
|
|
21
|
-
fullHeight,
|
|
22
|
-
fitHeight,
|
|
23
21
|
height,
|
|
24
22
|
ReviewImage,
|
|
25
23
|
ReviewPersonInfo,
|
|
26
24
|
ReviewContent,
|
|
27
25
|
}) => (
|
|
28
|
-
<Container {...{ backgroundColor, spacing, border, fluidContent,
|
|
26
|
+
<Container {...{ backgroundColor, spacing, border, fluidContent, height }}>
|
|
29
27
|
<div className="grid md:grid-cols-12">
|
|
30
28
|
<div className="mb-2 md:col-span-4 md:my-0">
|
|
31
29
|
<div className="mb-2 aspect-square size-12 rounded-full">{ReviewImage}</div>
|
|
@@ -8,10 +8,6 @@ type ColumnsVariantProps = {
|
|
|
8
8
|
spacing: SectionParameters['spacing'];
|
|
9
9
|
border: SectionParameters['border'];
|
|
10
10
|
fluidContent: SectionParameters['fluidContent'];
|
|
11
|
-
/** @deprecated Use height prop instead */
|
|
12
|
-
fullHeight: SectionParameters['fullHeight'];
|
|
13
|
-
/** @deprecated Use height prop instead */
|
|
14
|
-
fitHeight: SectionParameters['fitHeight'];
|
|
15
11
|
height: SectionParameters['height'];
|
|
16
12
|
variant: SectionVariants;
|
|
17
13
|
sectionMedia: React.ReactNode;
|
|
@@ -26,8 +22,6 @@ export const ColumnsVariant: FC<ColumnsVariantProps> = ({
|
|
|
26
22
|
spacing,
|
|
27
23
|
border,
|
|
28
24
|
fluidContent,
|
|
29
|
-
fullHeight,
|
|
30
|
-
fitHeight,
|
|
31
25
|
height,
|
|
32
26
|
variant,
|
|
33
27
|
sectionMedia,
|
|
@@ -36,7 +30,7 @@ export const ColumnsVariant: FC<ColumnsVariantProps> = ({
|
|
|
36
30
|
textAlignmentClass,
|
|
37
31
|
buttonAlignmentClass,
|
|
38
32
|
}) => (
|
|
39
|
-
<Container {...{ backgroundColor, spacing, border, fluidContent,
|
|
33
|
+
<Container {...{ backgroundColor, spacing, border, fluidContent, height }}>
|
|
40
34
|
<div className={cn('grid grid-cols-1 items-center gap-4 px-4 lg:grid-cols-2 xl:px-0')}>
|
|
41
35
|
<div className={cn('aspect-square', { 'order-last': variant === SectionVariants.ColumnsReverse })}>
|
|
42
36
|
<div className="flex size-full items-center justify-center overflow-hidden">{sectionMedia}</div>
|
|
@@ -8,10 +8,6 @@ type DefaultVariantProps = {
|
|
|
8
8
|
spacing?: SectionParameters['spacing'];
|
|
9
9
|
border?: SectionParameters['border'];
|
|
10
10
|
fluidContent?: SectionParameters['fluidContent'];
|
|
11
|
-
/** @deprecated Use height prop instead */
|
|
12
|
-
fullHeight?: SectionParameters['fullHeight'];
|
|
13
|
-
/** @deprecated Use height prop instead */
|
|
14
|
-
fitHeight?: SectionParameters['fitHeight'];
|
|
15
11
|
height?: SectionParameters['height'];
|
|
16
12
|
sectionMedia: React.ReactNode;
|
|
17
13
|
sectionContent: React.ReactNode;
|
|
@@ -25,8 +21,6 @@ export const DefaultVariant: FC<DefaultVariantProps> = ({
|
|
|
25
21
|
spacing,
|
|
26
22
|
border,
|
|
27
23
|
fluidContent,
|
|
28
|
-
fullHeight,
|
|
29
|
-
fitHeight,
|
|
30
24
|
height,
|
|
31
25
|
sectionMedia,
|
|
32
26
|
sectionContent,
|
|
@@ -34,10 +28,7 @@ export const DefaultVariant: FC<DefaultVariantProps> = ({
|
|
|
34
28
|
textAlignmentClass,
|
|
35
29
|
buttonAlignmentClass,
|
|
36
30
|
}) => (
|
|
37
|
-
<Container
|
|
38
|
-
className="relative overflow-hidden"
|
|
39
|
-
{...{ backgroundColor, spacing, border, fluidContent, fullHeight, fitHeight, height }}
|
|
40
|
-
>
|
|
31
|
+
<Container className="relative overflow-hidden" {...{ backgroundColor, spacing, border, fluidContent, height }}>
|
|
41
32
|
<div className="absolute left-0 top-0 size-full overflow-hidden">{sectionMedia}</div>
|
|
42
33
|
<Container className="relative flex flex-col gap-8">
|
|
43
34
|
<div className={cn('flex flex-col gap-4', textAlignmentClass)}>{sectionContent}</div>
|
|
@@ -14,8 +14,6 @@ export const Section: FC<SectionProps> = ({
|
|
|
14
14
|
spacing,
|
|
15
15
|
border,
|
|
16
16
|
fluidContent,
|
|
17
|
-
fullHeight,
|
|
18
|
-
fitHeight,
|
|
19
17
|
height,
|
|
20
18
|
}) => {
|
|
21
19
|
const variant = component.variant as SectionVariants;
|
|
@@ -26,8 +24,6 @@ export const Section: FC<SectionProps> = ({
|
|
|
26
24
|
spacing,
|
|
27
25
|
border,
|
|
28
26
|
fluidContent,
|
|
29
|
-
fullHeight,
|
|
30
|
-
fitHeight,
|
|
31
27
|
height,
|
|
32
28
|
textAlignmentClass: getTextAlignmentClass({ contentAlignment }),
|
|
33
29
|
buttonAlignmentClass: getButtonAlignmentClass({ contentAlignment }),
|
|
@@ -14,14 +14,9 @@ export const Table: FC<TableProps> = ({
|
|
|
14
14
|
spacing,
|
|
15
15
|
border,
|
|
16
16
|
fluidContent,
|
|
17
|
-
fullHeight,
|
|
18
|
-
fitHeight,
|
|
19
17
|
height,
|
|
20
18
|
}) => (
|
|
21
|
-
<Container
|
|
22
|
-
className="flex flex-col gap-5"
|
|
23
|
-
{...{ backgroundColor, spacing, border, fluidContent, fullHeight, fitHeight, height }}
|
|
24
|
-
>
|
|
19
|
+
<Container className="flex flex-col gap-5" {...{ backgroundColor, spacing, border, fluidContent, height }}>
|
|
25
20
|
<div className="overflow-x-auto">
|
|
26
21
|
<table className={getTableClasses({ size, textColor })}>
|
|
27
22
|
<thead>
|
|
@@ -16,8 +16,6 @@ export const Tabs: FC<TabsProps> = ({
|
|
|
16
16
|
spacing,
|
|
17
17
|
border,
|
|
18
18
|
fluidContent,
|
|
19
|
-
fullHeight,
|
|
20
|
-
fitHeight,
|
|
21
19
|
height,
|
|
22
20
|
}) => {
|
|
23
21
|
const variant = (component.variant || TabsVariants.Default) as TabsVariants;
|
|
@@ -46,10 +44,7 @@ export const Tabs: FC<TabsProps> = ({
|
|
|
46
44
|
);
|
|
47
45
|
|
|
48
46
|
return (
|
|
49
|
-
<Container
|
|
50
|
-
className="flex flex-col gap-5"
|
|
51
|
-
{...{ backgroundColor, spacing, border, fluidContent, fullHeight, fitHeight, height }}
|
|
52
|
-
>
|
|
47
|
+
<Container className="flex flex-col gap-5" {...{ backgroundColor, spacing, border, fluidContent, height }}>
|
|
53
48
|
<div className={getButtonContainerClasses({ color, variant })}>
|
|
54
49
|
{tabItems.map((tabItem, index) => (
|
|
55
50
|
<button
|
|
@@ -4,7 +4,7 @@ import { TestimonialProps } from '.';
|
|
|
4
4
|
|
|
5
5
|
type WithLargeAvatarVariantProps = Pick<
|
|
6
6
|
TestimonialProps,
|
|
7
|
-
'backgroundColor' | 'spacing' | 'border' | 'fluidContent' | '
|
|
7
|
+
'backgroundColor' | 'spacing' | 'border' | 'fluidContent' | 'height'
|
|
8
8
|
> & {
|
|
9
9
|
testimonialPrimaryImage: React.ReactNode;
|
|
10
10
|
testimonialContent: React.ReactNode;
|
|
@@ -21,11 +21,9 @@ export const DefaultVariant: FC<WithLargeAvatarVariantProps> = ({
|
|
|
21
21
|
spacing,
|
|
22
22
|
border,
|
|
23
23
|
fluidContent,
|
|
24
|
-
fullHeight,
|
|
25
|
-
fitHeight,
|
|
26
24
|
height,
|
|
27
25
|
}) => (
|
|
28
|
-
<Container {...{ backgroundColor, spacing, border, fluidContent,
|
|
26
|
+
<Container {...{ backgroundColor, spacing, border, fluidContent, height }}>
|
|
29
27
|
<div className="mx-auto flex flex-col items-center md:max-w-[80%]">
|
|
30
28
|
<div>{testimonialSecondaryImage}</div>
|
|
31
29
|
<div className="my-8">{testimonialContent}</div>
|
|
@@ -13,8 +13,6 @@ export const Testimonial: FC<TestimonialProps> = ({
|
|
|
13
13
|
spacing,
|
|
14
14
|
border,
|
|
15
15
|
fluidContent,
|
|
16
|
-
fullHeight,
|
|
17
|
-
fitHeight,
|
|
18
16
|
height,
|
|
19
17
|
}) => {
|
|
20
18
|
const variant = component.variant as TestimonialVariants | undefined;
|
|
@@ -24,8 +22,6 @@ export const Testimonial: FC<TestimonialProps> = ({
|
|
|
24
22
|
spacing,
|
|
25
23
|
border,
|
|
26
24
|
fluidContent,
|
|
27
|
-
fullHeight,
|
|
28
|
-
fitHeight,
|
|
29
25
|
height,
|
|
30
26
|
testimonialPrimaryImage: <UniformSlot context={context} data={component} slot={slots.testimonialPrimaryImage} />,
|
|
31
27
|
testimonialContent: <UniformSlot context={context} data={component} slot={slots.testimonialContent} />,
|
|
@@ -4,7 +4,7 @@ import { TestimonialProps } from '.';
|
|
|
4
4
|
|
|
5
5
|
type WithLargeAvatarVariantProps = Pick<
|
|
6
6
|
TestimonialProps,
|
|
7
|
-
'backgroundColor' | 'spacing' | 'border' | 'fluidContent' | '
|
|
7
|
+
'backgroundColor' | 'spacing' | 'border' | 'fluidContent' | 'height'
|
|
8
8
|
> & {
|
|
9
9
|
testimonialPrimaryImage: React.ReactNode;
|
|
10
10
|
testimonialContent: React.ReactNode;
|
|
@@ -21,11 +21,9 @@ export const WithLargeAvatarVariant: FC<WithLargeAvatarVariantProps> = ({
|
|
|
21
21
|
spacing,
|
|
22
22
|
border,
|
|
23
23
|
fluidContent,
|
|
24
|
-
fullHeight,
|
|
25
|
-
fitHeight,
|
|
26
24
|
height,
|
|
27
25
|
}) => (
|
|
28
|
-
<Container {...{ backgroundColor, spacing, border, fluidContent,
|
|
26
|
+
<Container {...{ backgroundColor, spacing, border, fluidContent, height }}>
|
|
29
27
|
<div className="mx-auto flex items-center gap-x-10 md:max-w-[80%]">
|
|
30
28
|
<div className="hidden aspect-square w-full max-w-xs shrink-0 overflow-hidden rounded-xl lg:block">
|
|
31
29
|
{testimonialPrimaryImage}
|
|
@@ -4,7 +4,7 @@ import { TestimonialProps } from '.';
|
|
|
4
4
|
|
|
5
5
|
type WithLargeAvatarVariantProps = Pick<
|
|
6
6
|
TestimonialProps,
|
|
7
|
-
'backgroundColor' | 'spacing' | 'border' | 'fluidContent' | '
|
|
7
|
+
'backgroundColor' | 'spacing' | 'border' | 'fluidContent' | 'height'
|
|
8
8
|
> & {
|
|
9
9
|
testimonialPrimaryImage: React.ReactNode;
|
|
10
10
|
testimonialContent: React.ReactNode;
|
|
@@ -21,11 +21,9 @@ export const WithOverlappingImageVariant: FC<WithLargeAvatarVariantProps> = ({
|
|
|
21
21
|
spacing,
|
|
22
22
|
border,
|
|
23
23
|
fluidContent,
|
|
24
|
-
fullHeight,
|
|
25
|
-
fitHeight,
|
|
26
24
|
height,
|
|
27
25
|
}) => (
|
|
28
|
-
<Container {...{ backgroundColor, spacing, border, fluidContent,
|
|
26
|
+
<Container {...{ backgroundColor, spacing, border, fluidContent, height }}>
|
|
29
27
|
<Container className="pb-10 lg:pb-0">
|
|
30
28
|
<div className="mx-auto flex max-w-2xl flex-col items-center gap-10 lg:max-w-none lg:flex-row">
|
|
31
29
|
<div className="-mt-7 aspect-[2/1] w-full shrink-0 overflow-hidden rounded-xl lg:-my-7 lg:aspect-[1/1.4] lg:max-w-xs">
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { AssetParamValue } from '@uniformdev/assets';
|
|
2
|
-
import { LinkParamValue } from '@uniformdev/canvas';
|
|
3
2
|
import { ComponentProps } from '@uniformdev/canvas-next-rsc/component';
|
|
4
3
|
import { ViewPort } from '@/types/cskTypes';
|
|
5
4
|
|
|
6
5
|
export type VideoParameters = {
|
|
7
6
|
video?: AssetParamValue;
|
|
8
|
-
url?: LinkParamValue; // Deprecated. Please use video parameter instead of url
|
|
9
7
|
placeholderImage?: AssetParamValue;
|
|
10
8
|
autoPlay?: boolean;
|
|
11
9
|
lazyLoad?: boolean;
|
|
@@ -8,7 +8,6 @@ import { VideoPlaceholder } from './placeholder';
|
|
|
8
8
|
|
|
9
9
|
export const Video: FC<VideoProps> = ({
|
|
10
10
|
video,
|
|
11
|
-
url, // Deprecated. Please use video parameter instead of url
|
|
12
11
|
placeholderImage,
|
|
13
12
|
autoPlay,
|
|
14
13
|
lazyLoad,
|
|
@@ -24,7 +23,7 @@ export const Video: FC<VideoProps> = ({
|
|
|
24
23
|
const [resolvedVideo] = resolveAsset(video);
|
|
25
24
|
const [resolvedImage] = resolveAsset(placeholderImage);
|
|
26
25
|
|
|
27
|
-
const resolvedVideoUrl = resolvedVideo?.url
|
|
26
|
+
const resolvedVideoUrl = resolvedVideo?.url;
|
|
28
27
|
|
|
29
28
|
if (!resolvedVideoUrl) {
|
|
30
29
|
return <VideoPlaceholder component={component} context={context} />;
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import { PropsWithChildren, ReactNode } from 'react';
|
|
2
|
-
import { DefaultTheme } from 'tailwindcss/types/generated/default-theme';
|
|
3
2
|
import { ViewPort } from '@/types/cskTypes';
|
|
4
3
|
|
|
5
4
|
export enum ButtonVariant {
|
|
6
5
|
Link = 'link',
|
|
7
6
|
}
|
|
8
7
|
|
|
9
|
-
type TextSize = keyof DefaultTheme['fontSize'];
|
|
10
|
-
|
|
11
8
|
export type ButtonProps = PropsWithChildren<{
|
|
12
9
|
variant?: ButtonVariant;
|
|
13
10
|
href?: string;
|
|
@@ -15,8 +12,8 @@ export type ButtonProps = PropsWithChildren<{
|
|
|
15
12
|
size?: string;
|
|
16
13
|
className?: string;
|
|
17
14
|
textColor?: string;
|
|
18
|
-
textSize?:
|
|
19
|
-
textWeight?:
|
|
15
|
+
textSize?: string | ViewPort<string>;
|
|
16
|
+
textWeight?: string;
|
|
20
17
|
textFont?: 'uppercase' | 'lowercase' | 'capitalize' | 'normal-case';
|
|
21
18
|
textTransform?: string;
|
|
22
19
|
buttonColor?: string;
|
|
@@ -11,7 +11,7 @@ export const Carousel: FC<CarouselProps> = ({
|
|
|
11
11
|
spacing,
|
|
12
12
|
border,
|
|
13
13
|
fluidContent,
|
|
14
|
-
|
|
14
|
+
height,
|
|
15
15
|
itemsPerPage = '1',
|
|
16
16
|
children,
|
|
17
17
|
gapX,
|
|
@@ -116,7 +116,7 @@ export const Carousel: FC<CarouselProps> = ({
|
|
|
116
116
|
});
|
|
117
117
|
|
|
118
118
|
return (
|
|
119
|
-
<BaseContainer {...{ backgroundColor, spacing, border, fluidContent,
|
|
119
|
+
<BaseContainer {...{ backgroundColor, spacing, border, fluidContent, height }}>
|
|
120
120
|
<div
|
|
121
121
|
className={cn('relative', {
|
|
122
122
|
[resolveViewPort(gapX, '-mx-{value}')]: gapX,
|
|
@@ -4,7 +4,7 @@ import { ContainerProps as BaseContainerProps } from '@/components/ui/Container'
|
|
|
4
4
|
|
|
5
5
|
export type CarouselProps = Pick<
|
|
6
6
|
BaseContainerProps,
|
|
7
|
-
'title' | 'backgroundColor' | 'spacing' | 'border' | 'fluidContent' | '
|
|
7
|
+
'title' | 'backgroundColor' | 'spacing' | 'border' | 'fluidContent' | 'height'
|
|
8
8
|
> & {
|
|
9
9
|
countOfItems?: number;
|
|
10
10
|
children: (options: { className?: string; style?: React.CSSProperties }) => ReactElement;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
import { cn, formatSpaceParameterValue, resolveViewPort } from '@/utils/styling';
|
|
3
3
|
import { ContainerProps } from '.';
|
|
4
|
-
import { getHeightValue } from './utils';
|
|
5
4
|
|
|
6
5
|
export const Container: FC<ContainerProps> = ({
|
|
7
6
|
className,
|
|
@@ -12,8 +11,6 @@ export const Container: FC<ContainerProps> = ({
|
|
|
12
11
|
spacing,
|
|
13
12
|
border = '',
|
|
14
13
|
fluidContent = false,
|
|
15
|
-
fullHeight = false,
|
|
16
|
-
fitHeight = false,
|
|
17
14
|
height,
|
|
18
15
|
maxWidth,
|
|
19
16
|
...rest
|
|
@@ -23,8 +20,6 @@ export const Container: FC<ContainerProps> = ({
|
|
|
23
20
|
{ marginTop, marginBottom, marginRight, marginLeft, paddingTop, paddingBottom, paddingRight, paddingLeft },
|
|
24
21
|
] = formatSpaceParameterValue(spacing);
|
|
25
22
|
|
|
26
|
-
const heightValue = getHeightValue({ height, fullHeight, fitHeight });
|
|
27
|
-
|
|
28
23
|
return (
|
|
29
24
|
<div
|
|
30
25
|
className={cn(
|
|
@@ -34,7 +29,7 @@ export const Container: FC<ContainerProps> = ({
|
|
|
34
29
|
'mx-auto w-full': !fluidContent,
|
|
35
30
|
'max-w-7xl max-w-container-width': !maxWidth && !fluidContent,
|
|
36
31
|
[`max-w-${maxWidth}`]: !!maxWidth && !fluidContent,
|
|
37
|
-
[resolveViewPort(
|
|
32
|
+
[resolveViewPort(height, 'h-{value}')]: height,
|
|
38
33
|
},
|
|
39
34
|
wrapperClassName
|
|
40
35
|
)}
|
|
@@ -52,7 +47,7 @@ export const Container: FC<ContainerProps> = ({
|
|
|
52
47
|
[resolveViewPort(paddingRight, 'pr-{value}')]: paddingRight,
|
|
53
48
|
[resolveViewPort(paddingLeft, 'pl-{value}')]: paddingLeft,
|
|
54
49
|
[resolveViewPort(border, '{value}')]: border,
|
|
55
|
-
[resolveViewPort(
|
|
50
|
+
[resolveViewPort(height, 'h-{value}')]: height,
|
|
56
51
|
},
|
|
57
52
|
className
|
|
58
53
|
)}
|
|
@@ -6,15 +6,9 @@ export type ContainerProps = HTMLAttributes<HTMLDivElement> & {
|
|
|
6
6
|
spacing?: SpaceType | ViewPort<SpaceType>;
|
|
7
7
|
border?: string | ViewPort<string>;
|
|
8
8
|
fluidContent?: boolean;
|
|
9
|
-
/** @deprecated Use height prop instead */
|
|
10
|
-
fullHeight?: boolean;
|
|
11
|
-
/** @deprecated Use height prop instead */
|
|
12
|
-
fitHeight?: boolean;
|
|
13
9
|
height?: string | ViewPort<string>;
|
|
14
10
|
wrapperClassName?: string;
|
|
15
11
|
maxWidth?: string;
|
|
16
12
|
};
|
|
17
13
|
|
|
18
|
-
export { getHeightValue } from './utils';
|
|
19
|
-
|
|
20
14
|
export { Container as default } from './container';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
import BaseContainer
|
|
2
|
+
import BaseContainer from '@/components/ui/Container';
|
|
3
3
|
import { cn, resolveViewPort } from '@/utils/styling';
|
|
4
4
|
import { FlexProps } from '.';
|
|
5
5
|
|
|
@@ -14,32 +14,24 @@ export const Flex: FC<FlexProps> = ({
|
|
|
14
14
|
spacing,
|
|
15
15
|
border,
|
|
16
16
|
fluidContent,
|
|
17
|
-
fullHeight,
|
|
18
|
-
fitHeight,
|
|
19
17
|
height,
|
|
20
18
|
children,
|
|
21
|
-
}) =>
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
19
|
+
}) => (
|
|
20
|
+
<BaseContainer {...{ backgroundColor, spacing, border, fluidContent, height, wrapperClassName }}>
|
|
21
|
+
<div
|
|
22
|
+
className={cn(
|
|
23
|
+
'flex',
|
|
24
|
+
{
|
|
25
|
+
[resolveViewPort(direction, 'flex-{value}')]: direction,
|
|
26
|
+
[resolveViewPort(justifyContent, 'justify-{value}')]: justifyContent,
|
|
27
|
+
[resolveViewPort(gap, 'gap-{value}')]: gap,
|
|
28
|
+
[resolveViewPort(alignItems, 'items-{value}')]: alignItems,
|
|
29
|
+
[resolveViewPort(height, 'h-{value}')]: height,
|
|
30
|
+
},
|
|
31
|
+
className
|
|
32
|
+
)}
|
|
27
33
|
>
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
[resolveViewPort(direction, 'flex-{value}')]: direction,
|
|
33
|
-
[resolveViewPort(justifyContent, 'justify-{value}')]: justifyContent,
|
|
34
|
-
[resolveViewPort(gap, 'gap-{value}')]: gap,
|
|
35
|
-
[resolveViewPort(alignItems, 'items-{value}')]: alignItems,
|
|
36
|
-
[resolveViewPort(heightValue, 'h-{value}')]: heightValue,
|
|
37
|
-
},
|
|
38
|
-
className
|
|
39
|
-
)}
|
|
40
|
-
>
|
|
41
|
-
{children}
|
|
42
|
-
</div>
|
|
43
|
-
</BaseContainer>
|
|
44
|
-
);
|
|
45
|
-
};
|
|
34
|
+
{children}
|
|
35
|
+
</div>
|
|
36
|
+
</BaseContainer>
|
|
37
|
+
);
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import { DefaultTheme } from 'tailwindcss/types/generated/default-theme';
|
|
2
1
|
import { ContainerProps as BaseContainerProps } from '@/components/ui/Container';
|
|
3
2
|
import { ViewPort } from '@/types/cskTypes';
|
|
4
3
|
|
|
5
4
|
type Direction = 'row' | 'row-reverse' | 'col' | 'col-reverse';
|
|
6
5
|
type Justify = 'normal' | 'start' | 'end' | 'center' | 'between' | 'around' | 'evenly' | 'stretch';
|
|
7
|
-
type FlexGap = keyof DefaultTheme['spacing'];
|
|
8
6
|
type Align = 'start' | 'end' | 'center' | 'baseline' | 'stretch';
|
|
9
7
|
|
|
10
8
|
export type FlexProps = Pick<
|
|
@@ -16,14 +14,12 @@ export type FlexProps = Pick<
|
|
|
16
14
|
| 'spacing'
|
|
17
15
|
| 'border'
|
|
18
16
|
| 'fluidContent'
|
|
19
|
-
| 'fullHeight'
|
|
20
|
-
| 'fitHeight'
|
|
21
17
|
| 'height'
|
|
22
18
|
| 'children'
|
|
23
19
|
> & {
|
|
24
20
|
direction?: Direction | ViewPort<Direction>;
|
|
25
21
|
justifyContent?: Justify | ViewPort<Justify>;
|
|
26
|
-
gap?:
|
|
22
|
+
gap?: string | ViewPort<string>;
|
|
27
23
|
alignItems?: Align | ViewPort<Align>;
|
|
28
24
|
};
|
|
29
25
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ContainerProps as BaseContainerProps } from '@/components/ui/Container';
|
|
2
2
|
|
|
3
|
-
export type FooterProps = Omit<BaseContainerProps, '
|
|
3
|
+
export type FooterProps = Omit<BaseContainerProps, 'height' | 'content'> & {
|
|
4
4
|
logo?: React.ReactNode;
|
|
5
5
|
copyright?: React.ReactNode;
|
|
6
6
|
content?: React.ReactNode;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
import BaseContainer
|
|
2
|
+
import BaseContainer from '@/components/ui/Container';
|
|
3
3
|
import { cn, resolveViewPort } from '@/utils/styling';
|
|
4
4
|
import { GridProps } from '.';
|
|
5
5
|
|
|
@@ -12,29 +12,23 @@ export const Grid: FC<GridProps> = ({
|
|
|
12
12
|
spacing,
|
|
13
13
|
border,
|
|
14
14
|
fluidContent,
|
|
15
|
-
fullHeight,
|
|
16
|
-
fitHeight,
|
|
17
15
|
height,
|
|
18
16
|
children,
|
|
19
|
-
}) =>
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
'
|
|
27
|
-
{
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
</div>
|
|
38
|
-
</BaseContainer>
|
|
39
|
-
);
|
|
40
|
-
};
|
|
17
|
+
}) => (
|
|
18
|
+
<BaseContainer {...{ backgroundColor, spacing, border, fluidContent, height }}>
|
|
19
|
+
<div
|
|
20
|
+
className={cn(
|
|
21
|
+
'grid',
|
|
22
|
+
{
|
|
23
|
+
[resolveViewPort(columnsCount, 'grid-cols-{value}')]: columnsCount,
|
|
24
|
+
[resolveViewPort(gapX, 'gap-x-{value}')]: gapX,
|
|
25
|
+
[resolveViewPort(gapY, 'gap-y-{value}')]: gapY,
|
|
26
|
+
[resolveViewPort(height, 'h-{value}')]: height,
|
|
27
|
+
},
|
|
28
|
+
className
|
|
29
|
+
)}
|
|
30
|
+
>
|
|
31
|
+
{children}
|
|
32
|
+
</div>
|
|
33
|
+
</BaseContainer>
|
|
34
|
+
);
|
|
@@ -1,25 +1,13 @@
|
|
|
1
|
-
import { DefaultTheme } from 'tailwindcss/types/generated/default-theme';
|
|
2
1
|
import { ContainerProps as BaseContainerProps } from '@/components/ui/Container';
|
|
3
2
|
import { ViewPort } from '@/types/cskTypes';
|
|
4
3
|
|
|
5
|
-
type AvailableColumnsCount = keyof DefaultTheme['gridTemplateColumns'];
|
|
6
|
-
type AvailableGap = keyof DefaultTheme['spacing'];
|
|
7
|
-
|
|
8
4
|
export type GridProps = Pick<
|
|
9
5
|
BaseContainerProps,
|
|
10
|
-
| '
|
|
11
|
-
| 'backgroundColor'
|
|
12
|
-
| 'spacing'
|
|
13
|
-
| 'border'
|
|
14
|
-
| 'fluidContent'
|
|
15
|
-
| 'fullHeight'
|
|
16
|
-
| 'fitHeight'
|
|
17
|
-
| 'children'
|
|
18
|
-
| 'height'
|
|
6
|
+
'title' | 'backgroundColor' | 'spacing' | 'border' | 'fluidContent' | 'children' | 'height'
|
|
19
7
|
> & {
|
|
20
|
-
columnsCount?:
|
|
21
|
-
gapY?:
|
|
22
|
-
gapX?:
|
|
8
|
+
columnsCount?: string | ViewPort<string>;
|
|
9
|
+
gapY?: string | ViewPort<string>;
|
|
10
|
+
gapX?: string | ViewPort<string>;
|
|
23
11
|
className?: string;
|
|
24
12
|
};
|
|
25
13
|
|
|
@@ -1,17 +1,11 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
|
-
import { DefaultTheme } from 'tailwindcss/types/generated/default-theme';
|
|
3
2
|
import { ViewPort } from '@/types/cskTypes';
|
|
4
3
|
|
|
5
|
-
type AvailableColumnStart = keyof DefaultTheme['gridColumnStart'];
|
|
6
|
-
type AvailableColumnSpan = keyof DefaultTheme['gridColumn'];
|
|
7
|
-
type AvailableGridRowStart = keyof DefaultTheme['gridRowStart'];
|
|
8
|
-
type AvailableGridRowSpan = keyof DefaultTheme['gridRow'];
|
|
9
|
-
|
|
10
4
|
export type GridItemProps = HTMLAttributes<HTMLDivElement> & {
|
|
11
|
-
columnStart?:
|
|
12
|
-
columnSpan?:
|
|
13
|
-
rowStart?:
|
|
14
|
-
rowSpan?:
|
|
5
|
+
columnStart?: string | ViewPort<string>;
|
|
6
|
+
columnSpan?: string | ViewPort<string>;
|
|
7
|
+
rowStart?: string | ViewPort<string>;
|
|
8
|
+
rowSpan?: string | ViewPort<string>;
|
|
15
9
|
className?: string;
|
|
16
10
|
};
|
|
17
11
|
|
|
@@ -2,7 +2,7 @@ import { PropsWithChildren, ReactNode } from 'react';
|
|
|
2
2
|
import { ContainerProps as BaseContainerProps } from '@/components/ui/Container';
|
|
3
3
|
|
|
4
4
|
export type HeaderProps = PropsWithChildren &
|
|
5
|
-
Omit<BaseContainerProps, 'fluidContent' | '
|
|
5
|
+
Omit<BaseContainerProps, 'fluidContent' | 'height'> & {
|
|
6
6
|
leftSection?: ReactNode;
|
|
7
7
|
rightSection?: ReactNode;
|
|
8
8
|
color?: string;
|
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
|
-
import { DefaultTheme } from 'tailwindcss/types/generated/default-theme';
|
|
3
2
|
import { ViewPort } from '@/types/cskTypes';
|
|
4
3
|
|
|
5
|
-
type TextSize = keyof DefaultTheme['fontSize'];
|
|
6
|
-
|
|
7
4
|
export type TextProps = {
|
|
8
5
|
className?: string;
|
|
9
|
-
size?:
|
|
6
|
+
size?: string | ViewPort<string>;
|
|
10
7
|
color?: string;
|
|
11
|
-
weight?:
|
|
8
|
+
weight?: string;
|
|
12
9
|
font?: string;
|
|
13
10
|
transform?: 'uppercase' | 'lowercase' | 'capitalize' | 'normal-case';
|
|
14
11
|
decoration?: 'underline' | 'overline' | 'line-through' | 'no-underline';
|
|
15
|
-
letterSpacing?:
|
|
12
|
+
letterSpacing?: string;
|
|
16
13
|
children: ReactElement | string;
|
|
17
14
|
alignment?: 'left' | 'center' | 'right';
|
|
18
15
|
lineCountRestrictions?: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{a as d}from"./chunk-BK7UG4U4.mjs";import{a as I}from"./chunk-7GVG4HLE.mjs";import{a as G}from"./chunk-2YTACEBA.mjs";import{c as h}from"./chunk-S7CSCIW4.mjs";import"./chunk-YEKQJ4YC.mjs";import{UniformSlot as R}from"@uniformdev/canvas-next-rsc/component";import F from"react-responsive-masonry";import{Fragment as v,jsx as y}from"react/jsx-runtime";var g={firstLineCount:2,secondLineCount:3,otherLinesCount:4},L=({slot:n,aspectRatio:s,config:r})=>{let{firstLineCount:i=g.firstLineCount,secondLineCount:p=g.secondLineCount,otherLinesCount:m=g.otherLinesCount}=r||{},{items:f=[]}=n||{},c=f.reduce((e,o,t)=>(t<i?e[0]?.push(o):t<i+p?e[1]?.push(o):e[2]?.push(o),e),[[],[],[]])||[];return y(v,{children:c?.map((e,o)=>e.length?y(F,{columnsCount:o<2||e.length<m?e.length:m,gutter:"4px",children:e.map((t,u)=>y("div",{className:h("flex flex-1 items-center justify-center",{[`aspect-${s}`]:!!s}),children:t},`img-${u}`))},`line-${o}`):null)})};import{jsx as l}from"react/jsx-runtime";var M=({slots:n,aspectRatio:s,items:r,backgroundColor:i,spacing:p,border:m,fluidContent:f,height:c,config:e,context:o,component:t})=>{let u=r?.length?{name:"items",items:G(r)?.map((a,C)=>l(d,{src:a.url,style:{objectFit:"cover"},alt:`Image ${C}`,fill:!0},a?.id||`image-${C}`))||[]}:n.imageGalleryItems,P=!r?.length&&!t?.slots?.imageGalleryItems?.filter(({_id:a})=>!a?.startsWith("placeholder"))?.length;return l(I,{backgroundColor:i,spacing:p,border:m,fluidContent:f,height:c,children:l("div",{className:"flex flex-col gap-1",children:P?l(R,{context:o,slot:n.imageGalleryItems,data:t}):l(L,{slot:u,aspectRatio:s,config:e})})})};export{M as ImageGallery};
|