@cntrl-site/components 1.0.17 → 1.0.18
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/FAQ/FAQ.d.ts +64 -0
- package/dist/Components/FAQ/FAQComponent.d.ts +28 -0
- package/dist/Components/helpers/PaddingControl/PaddingControl.d.ts +9 -0
- package/dist/index.js +1037 -101
- package/dist/index.mjs +5400 -3507
- package/package.json +1 -1
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { CommonComponentProps } from '../props';
|
|
2
|
+
import { TextStyles } from '../utils/textStylesToCss';
|
|
3
|
+
type FAQContentItem = {
|
|
4
|
+
question?: string;
|
|
5
|
+
answer?: any[];
|
|
6
|
+
};
|
|
7
|
+
type FAQSettings = {
|
|
8
|
+
wrapperWidth?: number;
|
|
9
|
+
cellMinHeight?: number;
|
|
10
|
+
dividerWidth?: number;
|
|
11
|
+
dividerStyle?: 'solid' | 'dashed' | 'dotted';
|
|
12
|
+
entryHoverEffect?: 'none' | 'default';
|
|
13
|
+
autoclose?: 'on' | 'off';
|
|
14
|
+
icon?: string | null;
|
|
15
|
+
iconMaxWidth?: number;
|
|
16
|
+
iconPaddingRight?: number;
|
|
17
|
+
iconAnimation?: 'rotate 180' | 'rotate 90' | 'rotate 45';
|
|
18
|
+
questionColor?: string;
|
|
19
|
+
answerColor?: string;
|
|
20
|
+
dividerColor?: string;
|
|
21
|
+
iconColor?: string;
|
|
22
|
+
questionHoverColor?: string;
|
|
23
|
+
iconHoverColor?: string;
|
|
24
|
+
iconActiveColor?: string;
|
|
25
|
+
dividerHoverColor?: string;
|
|
26
|
+
questionFontFamily?: string;
|
|
27
|
+
questionFontSettings?: {
|
|
28
|
+
fontWeight: number;
|
|
29
|
+
fontStyle: string;
|
|
30
|
+
};
|
|
31
|
+
questionFontSize?: number;
|
|
32
|
+
questionLineHeight?: number;
|
|
33
|
+
questionLetterSpacing?: number;
|
|
34
|
+
questionWordSpacing?: number;
|
|
35
|
+
questionTextAppearance?: TextStyles['textAppearance'];
|
|
36
|
+
answerFontFamily?: string;
|
|
37
|
+
answerFontSettings?: {
|
|
38
|
+
fontWeight: number;
|
|
39
|
+
fontStyle: string;
|
|
40
|
+
};
|
|
41
|
+
answerFontSize?: number;
|
|
42
|
+
answerLineHeight?: number;
|
|
43
|
+
answerLetterSpacing?: number;
|
|
44
|
+
answerWordSpacing?: number;
|
|
45
|
+
answerTextAppearance?: TextStyles['textAppearance'];
|
|
46
|
+
questionPaddingLeft?: number;
|
|
47
|
+
questionPaddingTop?: number;
|
|
48
|
+
questionPaddingBottom?: number;
|
|
49
|
+
answerPaddingLeft?: number;
|
|
50
|
+
answerPaddingRight?: number;
|
|
51
|
+
answerPaddingTop?: number;
|
|
52
|
+
answerPaddingBottom?: number;
|
|
53
|
+
};
|
|
54
|
+
type FAQProps = {
|
|
55
|
+
settings: FAQSettings;
|
|
56
|
+
content?: FAQContentItem[];
|
|
57
|
+
isEditor?: boolean;
|
|
58
|
+
isPreviewMode?: boolean;
|
|
59
|
+
isEditMode?: boolean;
|
|
60
|
+
activeEvent: string | undefined;
|
|
61
|
+
onUpdateSettings?: (settings: FAQSettings) => void;
|
|
62
|
+
} & CommonComponentProps;
|
|
63
|
+
export declare function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, activeEvent }: FAQProps): import("react/jsx-runtime").JSX.Element;
|
|
64
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { FAQ } from './FAQ';
|
|
2
|
+
import { ComponentSchemaV1 } from '../../types/SchemaV1';
|
|
3
|
+
export declare const FAQComponent: {
|
|
4
|
+
element: typeof FAQ;
|
|
5
|
+
id: string;
|
|
6
|
+
name: string;
|
|
7
|
+
category: string;
|
|
8
|
+
layoutMode: "structured";
|
|
9
|
+
preview: {
|
|
10
|
+
type: "image";
|
|
11
|
+
url: string;
|
|
12
|
+
};
|
|
13
|
+
version: number;
|
|
14
|
+
defaultSize: {
|
|
15
|
+
d: {
|
|
16
|
+
width: number;
|
|
17
|
+
height: number;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
assetsPaths: {
|
|
21
|
+
content: never[];
|
|
22
|
+
parameters: {
|
|
23
|
+
path: string;
|
|
24
|
+
}[];
|
|
25
|
+
};
|
|
26
|
+
schema: ComponentSchemaV1;
|
|
27
|
+
sourceCode: string;
|
|
28
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CSSProperties, ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
export type PaddingControlHitPlacement = 'left-y' | 'center-x' | 'center';
|
|
3
|
+
export type PaddingControlProps = {
|
|
4
|
+
className: string;
|
|
5
|
+
areaStyle: CSSProperties;
|
|
6
|
+
hitPlacement: PaddingControlHitPlacement;
|
|
7
|
+
centerXHitTop?: string;
|
|
8
|
+
} & ComponentPropsWithoutRef<'div'>;
|
|
9
|
+
export declare function PaddingControl({ className, areaStyle, hitPlacement, centerXHitTop, ...rest }: PaddingControlProps): import("react/jsx-runtime").JSX.Element;
|