@cntrl-site/components 1.0.9 → 1.0.11-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/Components/ControlSlider/ControlSlider.d.ts +2 -25
- package/dist/Components/Form/FormComponent.d.ts +3 -9
- package/dist/Components/Grid/Grid.d.ts +61 -0
- package/dist/Components/Grid/GridComponent.d.ts +39 -0
- package/dist/Components/Lightbox/Lightbox.d.ts +2 -25
- package/dist/Components/List/List.d.ts +61 -0
- package/dist/Components/List/ListComponent.d.ts +39 -0
- package/dist/Components/OnelinerForm/OnelinerFormComponent.d.ts +3 -14
- package/dist/Components/utils/getMainFontBaseOnSystem.d.ts +1 -0
- package/dist/index.js +1312 -18
- package/dist/index.mjs +5770 -2797
- package/dist/types/SchemaV1.d.ts +2 -1
- package/dist/types/TextElementStyles.d.ts +24 -0
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CommonComponentProps } from '../props';
|
|
2
|
+
import { TextElementStyles } from '../../types/TextElementStyles';
|
|
2
3
|
type SliderProps = {
|
|
3
4
|
settings: SliderSettings;
|
|
4
5
|
content: SliderItem[];
|
|
@@ -63,31 +64,7 @@ type SliderSettings = {
|
|
|
63
64
|
imageCaption: SliderCaption;
|
|
64
65
|
triggers: Triggers;
|
|
65
66
|
};
|
|
66
|
-
type CaptionStyles = {
|
|
67
|
-
fontSettings: {
|
|
68
|
-
fontFamily: string;
|
|
69
|
-
fontWeight: number;
|
|
70
|
-
fontStyle: string;
|
|
71
|
-
};
|
|
72
|
-
widthSettings: {
|
|
73
|
-
width: number;
|
|
74
|
-
sizing: 'auto' | 'manual';
|
|
75
|
-
};
|
|
76
|
-
letterSpacing: number;
|
|
77
|
-
textAlign: 'left' | 'center' | 'right';
|
|
78
|
-
wordSpacing: number;
|
|
79
|
-
fontSizeLineHeight: {
|
|
80
|
-
fontSize: number;
|
|
81
|
-
lineHeight: number;
|
|
82
|
-
};
|
|
83
|
-
textAppearance: {
|
|
84
|
-
textTransform: 'none' | 'uppercase' | 'lowercase';
|
|
85
|
-
textDecoration: 'none' | 'underline';
|
|
86
|
-
fontVariant: 'normal' | 'small-caps';
|
|
87
|
-
};
|
|
88
|
-
color: string;
|
|
89
|
-
};
|
|
90
67
|
type SliderStyles = {
|
|
91
|
-
imageCaption:
|
|
68
|
+
imageCaption: TextElementStyles;
|
|
92
69
|
};
|
|
93
70
|
export {};
|
|
@@ -702,17 +702,11 @@ export declare const FormComponent: {
|
|
|
702
702
|
} | {
|
|
703
703
|
type: "group";
|
|
704
704
|
title: string;
|
|
705
|
-
items:
|
|
705
|
+
items: {
|
|
706
706
|
type: "row";
|
|
707
|
+
title: string;
|
|
707
708
|
items: string[];
|
|
708
|
-
}
|
|
709
|
-
type: "row";
|
|
710
|
-
items: {
|
|
711
|
-
type: "group";
|
|
712
|
-
title: string;
|
|
713
|
-
items: string[];
|
|
714
|
-
}[];
|
|
715
|
-
})[];
|
|
709
|
+
}[];
|
|
716
710
|
})[];
|
|
717
711
|
})[];
|
|
718
712
|
} | {
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { CommonComponentProps } from '../props';
|
|
2
|
+
import { TextStyles } from '../utils/textStylesToCss';
|
|
3
|
+
type GridProps = {
|
|
4
|
+
layoutId?: string;
|
|
5
|
+
settings: GridSettings;
|
|
6
|
+
content?: any;
|
|
7
|
+
isEditor?: boolean;
|
|
8
|
+
isPreviewMode?: boolean;
|
|
9
|
+
activeEvent: string | undefined;
|
|
10
|
+
onUpdateSettings?: (settings: GridSettings) => void;
|
|
11
|
+
} & CommonComponentProps;
|
|
12
|
+
export declare function Grid({ settings, content, isEditor, isPreviewMode, metadata, activeEvent, layoutId }: GridProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
type GridLayoutConfig = {
|
|
14
|
+
entryWidth: number;
|
|
15
|
+
horizontalGap: number;
|
|
16
|
+
wrapperWidth: number;
|
|
17
|
+
columnsCount: number;
|
|
18
|
+
lockedParam?: 'wrapperWidth' | 'entryWidth' | 'horizontalGap' | null;
|
|
19
|
+
};
|
|
20
|
+
type GridSettings = {
|
|
21
|
+
type: 'A' | 'B';
|
|
22
|
+
gridLayout: GridLayoutConfig;
|
|
23
|
+
textBoxWidth: number;
|
|
24
|
+
verticalGap: number;
|
|
25
|
+
entriesCount: number;
|
|
26
|
+
lightbox: 'On' | 'Off';
|
|
27
|
+
imageDisplay: {
|
|
28
|
+
display: 'Fit' | 'Cover';
|
|
29
|
+
ratioValue: '1:1' | '2:3' | '3:4' | '4:5' | '16:9';
|
|
30
|
+
reversed: boolean;
|
|
31
|
+
};
|
|
32
|
+
slider: 'On' | 'Off';
|
|
33
|
+
sliderTiming: number;
|
|
34
|
+
direction: 'Horizontal' | 'Vertical' | 'Random';
|
|
35
|
+
transition: 'Fade' | 'Slide';
|
|
36
|
+
titleMarginTop: number;
|
|
37
|
+
subtitleMarginTop: number;
|
|
38
|
+
titleColor: string;
|
|
39
|
+
subtitleColor: string;
|
|
40
|
+
titleFontFamily: string;
|
|
41
|
+
titleFontSettings?: {
|
|
42
|
+
fontWeight: number;
|
|
43
|
+
fontStyle: string;
|
|
44
|
+
};
|
|
45
|
+
titleFontSize?: number;
|
|
46
|
+
titleLineHeight?: number;
|
|
47
|
+
titleLetterSpacing?: number;
|
|
48
|
+
titleWordSpacing?: number;
|
|
49
|
+
titleTextAppearance?: TextStyles['textAppearance'];
|
|
50
|
+
subtitleFontFamily: string;
|
|
51
|
+
subtitleFontSettings?: {
|
|
52
|
+
fontWeight: number;
|
|
53
|
+
fontStyle: string;
|
|
54
|
+
};
|
|
55
|
+
subtitleFontSize?: number;
|
|
56
|
+
subtitleLineHeight?: number;
|
|
57
|
+
subtitleLetterSpacing?: number;
|
|
58
|
+
subtitleWordSpacing?: number;
|
|
59
|
+
subtitleTextAppearance?: TextStyles['textAppearance'];
|
|
60
|
+
};
|
|
61
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Grid } from './Grid';
|
|
2
|
+
import { ComponentSchemaV1 } from '../../types/SchemaV1';
|
|
3
|
+
type GridSchema = ComponentSchemaV1 & {
|
|
4
|
+
properties: {
|
|
5
|
+
content: {
|
|
6
|
+
type: 'array';
|
|
7
|
+
settings?: {
|
|
8
|
+
addItemFromFileExplorer?: boolean;
|
|
9
|
+
};
|
|
10
|
+
items: any;
|
|
11
|
+
default: any[];
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export declare const GridComponent: {
|
|
16
|
+
element: typeof Grid;
|
|
17
|
+
id: string;
|
|
18
|
+
name: string;
|
|
19
|
+
category: string;
|
|
20
|
+
preview: {
|
|
21
|
+
type: "image";
|
|
22
|
+
url: string;
|
|
23
|
+
};
|
|
24
|
+
version: number;
|
|
25
|
+
defaultSize: {
|
|
26
|
+
width: number;
|
|
27
|
+
height: number;
|
|
28
|
+
};
|
|
29
|
+
assetsPaths: {
|
|
30
|
+
content: {
|
|
31
|
+
path: string;
|
|
32
|
+
placeholderEnabled: boolean;
|
|
33
|
+
}[];
|
|
34
|
+
parameters: never[];
|
|
35
|
+
};
|
|
36
|
+
schema: GridSchema;
|
|
37
|
+
sourceCode: string;
|
|
38
|
+
};
|
|
39
|
+
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Alignment, Offset } from '../utils/getPositionStyles';
|
|
2
|
+
import { TextElementStyles } from '../../types/TextElementStyles';
|
|
2
3
|
type LightboxGalleryProps = {
|
|
3
4
|
settings: LightboxSettings;
|
|
4
5
|
content: LightboxImage[];
|
|
@@ -98,30 +99,6 @@ type LightboxSettings = {
|
|
|
98
99
|
};
|
|
99
100
|
};
|
|
100
101
|
type LightboxStyles = {
|
|
101
|
-
imageCaption:
|
|
102
|
-
};
|
|
103
|
-
type CaptionStyles = {
|
|
104
|
-
fontSettings: {
|
|
105
|
-
fontFamily: string;
|
|
106
|
-
fontWeight: number;
|
|
107
|
-
fontStyle: string;
|
|
108
|
-
};
|
|
109
|
-
widthSettings: {
|
|
110
|
-
width: number;
|
|
111
|
-
sizing: 'auto' | 'manual';
|
|
112
|
-
};
|
|
113
|
-
letterSpacing: number;
|
|
114
|
-
textAlign: 'left' | 'center' | 'right';
|
|
115
|
-
wordSpacing: number;
|
|
116
|
-
fontSizeLineHeight: {
|
|
117
|
-
fontSize: number;
|
|
118
|
-
lineHeight: number;
|
|
119
|
-
};
|
|
120
|
-
textAppearance: {
|
|
121
|
-
textTransform: 'none' | 'uppercase' | 'lowercase';
|
|
122
|
-
textDecoration: 'none' | 'underline';
|
|
123
|
-
fontVariant: 'normal' | 'small-caps';
|
|
124
|
-
};
|
|
125
|
-
color: string;
|
|
102
|
+
imageCaption: TextElementStyles;
|
|
126
103
|
};
|
|
127
104
|
export {};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { CommonComponentProps } from '../props';
|
|
2
|
+
import { TextStyles } from '../utils/textStylesToCss';
|
|
3
|
+
type ListContentItem = {
|
|
4
|
+
firstColumn?: string;
|
|
5
|
+
secondColumn?: string;
|
|
6
|
+
thirdColumn?: string;
|
|
7
|
+
fourthColumn?: string;
|
|
8
|
+
fifthColumn?: string;
|
|
9
|
+
image?: {
|
|
10
|
+
objectFit?: 'cover' | 'contain';
|
|
11
|
+
url: string;
|
|
12
|
+
name: string;
|
|
13
|
+
};
|
|
14
|
+
link?: string;
|
|
15
|
+
};
|
|
16
|
+
type ListProps = {
|
|
17
|
+
layoutId?: string;
|
|
18
|
+
settings: ListSettings;
|
|
19
|
+
content?: ListContentItem[];
|
|
20
|
+
isEditor?: boolean;
|
|
21
|
+
isPreviewMode?: boolean;
|
|
22
|
+
activeEvent: string | undefined;
|
|
23
|
+
onUpdateSettings?: (settings: ListSettings) => void;
|
|
24
|
+
} & CommonComponentProps;
|
|
25
|
+
export declare function List({ settings, content, isEditor, isPreviewMode, metadata, activeEvent, layoutId }: ListProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
type ListSettings = {
|
|
27
|
+
columns: number;
|
|
28
|
+
wrapperWidth: number;
|
|
29
|
+
entriesCount: number;
|
|
30
|
+
cellMinHeight: number;
|
|
31
|
+
imageOnHover: 'On' | 'Off';
|
|
32
|
+
imageSize?: {
|
|
33
|
+
min: number;
|
|
34
|
+
max: number;
|
|
35
|
+
};
|
|
36
|
+
dividerWidth: number;
|
|
37
|
+
cut: number;
|
|
38
|
+
entryHoverEffect: 'None' | 'Default' | 'Blinds';
|
|
39
|
+
firstColumnWidth: number;
|
|
40
|
+
secondColumnWidth: number;
|
|
41
|
+
thirdColumnWidth: number;
|
|
42
|
+
fourthColumnWidth: number;
|
|
43
|
+
fifthColumnWidth: number;
|
|
44
|
+
textColor: string;
|
|
45
|
+
textFontFamily: string;
|
|
46
|
+
textFontSettings?: {
|
|
47
|
+
fontWeight: number;
|
|
48
|
+
fontStyle: string;
|
|
49
|
+
};
|
|
50
|
+
textFontSize?: number;
|
|
51
|
+
textLineHeight?: number;
|
|
52
|
+
textLetterSpacing?: number;
|
|
53
|
+
textWordSpacing?: number;
|
|
54
|
+
textTextAppearance?: TextStyles['textAppearance'];
|
|
55
|
+
backgroundColor: string;
|
|
56
|
+
dividerColor: string;
|
|
57
|
+
textHoverColor: string;
|
|
58
|
+
backgroundHoverColor: string;
|
|
59
|
+
dividerHoverColor: string;
|
|
60
|
+
};
|
|
61
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { List } from './List';
|
|
2
|
+
import { ComponentSchemaV1 } from '../../types/SchemaV1';
|
|
3
|
+
type GridSchema = ComponentSchemaV1 & {
|
|
4
|
+
properties: {
|
|
5
|
+
content: {
|
|
6
|
+
type: 'array';
|
|
7
|
+
settings?: {
|
|
8
|
+
addItemFromFileExplorer?: boolean;
|
|
9
|
+
};
|
|
10
|
+
items: any;
|
|
11
|
+
default: any[];
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export declare const ListComponent: {
|
|
16
|
+
element: typeof List;
|
|
17
|
+
id: string;
|
|
18
|
+
name: string;
|
|
19
|
+
category: string;
|
|
20
|
+
preview: {
|
|
21
|
+
type: "image";
|
|
22
|
+
url: string;
|
|
23
|
+
};
|
|
24
|
+
version: number;
|
|
25
|
+
defaultSize: {
|
|
26
|
+
width: number;
|
|
27
|
+
height: number;
|
|
28
|
+
};
|
|
29
|
+
assetsPaths: {
|
|
30
|
+
content: {
|
|
31
|
+
path: string;
|
|
32
|
+
placeholderEnabled: boolean;
|
|
33
|
+
}[];
|
|
34
|
+
parameters: never[];
|
|
35
|
+
};
|
|
36
|
+
schema: GridSchema;
|
|
37
|
+
sourceCode: string;
|
|
38
|
+
};
|
|
39
|
+
export {};
|
|
@@ -575,22 +575,11 @@ export declare const OnelinerFormComponent: {
|
|
|
575
575
|
layout: (string | {
|
|
576
576
|
type: "row";
|
|
577
577
|
items: string[];
|
|
578
|
+
title?: undefined;
|
|
578
579
|
} | {
|
|
579
580
|
type: "row";
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
title: string;
|
|
583
|
-
items: string[];
|
|
584
|
-
options?: undefined;
|
|
585
|
-
} | {
|
|
586
|
-
type: "switcher";
|
|
587
|
-
title: string;
|
|
588
|
-
options: {
|
|
589
|
-
Input: string[];
|
|
590
|
-
Button: string[];
|
|
591
|
-
};
|
|
592
|
-
items?: undefined;
|
|
593
|
-
})[];
|
|
581
|
+
title: string;
|
|
582
|
+
items: string[];
|
|
594
583
|
})[];
|
|
595
584
|
} | {
|
|
596
585
|
id: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getFontBasedOnSystem(): string;
|