@cntrl-site/components 1.0.71 → 1.0.73-alpha.0

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.
@@ -0,0 +1,138 @@
1
+ import { CommonComponentProps } from '../props';
2
+ import { TextStyles } from '../utils/textStylesToCss';
3
+ type BurgerEffect = 'fade' | 'left' | 'top' | 'right' | 'bottom';
4
+ type BurgerLogo = {
5
+ mode?: 'On' | 'Off';
6
+ icon?: string | null;
7
+ };
8
+ type BurgerLogoPosition = 'left' | 'center' | 'right';
9
+ type BurgerLink = {
10
+ mode?: 'page' | 'url';
11
+ page?: string;
12
+ url?: string;
13
+ label?: string;
14
+ anchor?: string;
15
+ openIn?: string;
16
+ showIn?: string;
17
+ };
18
+ type BurgerPosition = 'left-top' | 'center-top' | 'right-top' | 'left-center' | 'center-center' | 'right-center' | 'left-bottom' | 'center-bottom' | 'right-bottom';
19
+ type BurgerSettings = {
20
+ link?: BurgerLink[];
21
+ socialLink?: string[];
22
+ logo?: BurgerLogo | null;
23
+ logoMaxWidth?: number;
24
+ logoMaxHeight?: number;
25
+ logoPosition?: BurgerLogoPosition;
26
+ logoColor?: string;
27
+ panelHeight?: number;
28
+ backgroundColor?: string;
29
+ position?: BurgerPosition;
30
+ horizontalAlign?: 'left' | 'center' | 'right';
31
+ verticalAlign?: 'top' | 'center' | 'bottom';
32
+ iconColor?: string;
33
+ iconSize?: number;
34
+ iconAnimation?: 'a';
35
+ linkColor?: string;
36
+ openLinkColor?: string;
37
+ compactIconColor?: string;
38
+ compactCloseButtonColor?: string;
39
+ compactLinkColor?: string;
40
+ compactLogoColor?: string;
41
+ compactBackgroundColor?: string;
42
+ compactLogoMaxWidth?: number;
43
+ compactLogoMaxHeight?: number;
44
+ compactLogoPosition?: BurgerLogoPosition;
45
+ compactPanelHeight?: number;
46
+ compactIconSize?: number;
47
+ compactIconAnimation?: 'a';
48
+ compactNavTextWidth?: number;
49
+ compactNavGap?: number;
50
+ compactNavPaddingLeft?: number;
51
+ compactNavPaddingRight?: number;
52
+ compactFontFamily?: string;
53
+ compactFontSettings?: {
54
+ fontWeight?: number;
55
+ fontStyle?: string;
56
+ };
57
+ compactFontSize?: number;
58
+ compactLineHeight?: number;
59
+ compactLetterSpacing?: number;
60
+ compactWordSpacing?: number;
61
+ compactTextAlign?: TextStyles['textAlign'];
62
+ compactTextAppearance?: TextStyles['textAppearance'];
63
+ socialIconColor?: string;
64
+ openLogoColor?: string;
65
+ menuBackgroundColor?: string;
66
+ overlayColor?: string;
67
+ closeButtonColor?: string;
68
+ effect?: BurgerEffect;
69
+ textWidth?: number;
70
+ navTextWidth?: number;
71
+ gap?: number;
72
+ navGap?: number;
73
+ navPaddingLeft?: number;
74
+ navPaddingRight?: number;
75
+ textPaddingLeft?: number;
76
+ textPaddingRight?: number;
77
+ textPaddingTop?: number;
78
+ textPaddingBottom?: number;
79
+ fontFamily?: string;
80
+ fontSettings?: {
81
+ fontWeight?: number;
82
+ fontStyle?: string;
83
+ };
84
+ fontSize?: number;
85
+ lineHeight?: number;
86
+ letterSpacing?: number;
87
+ wordSpacing?: number;
88
+ textAlign?: TextStyles['textAlign'];
89
+ textAppearance?: TextStyles['textAppearance'];
90
+ openFontFamily?: string;
91
+ openFontSettings?: {
92
+ fontWeight?: number;
93
+ fontStyle?: string;
94
+ };
95
+ openFontSize?: number;
96
+ openLineHeight?: number;
97
+ openLetterSpacing?: number;
98
+ openWordSpacing?: number;
99
+ openTextAlign?: TextStyles['textAlign'];
100
+ openTextAppearance?: TextStyles['textAppearance'];
101
+ stateOverrides?: Record<string, Partial<Record<'iconColor' | 'closeButtonColor' | 'linkColor' | 'openLinkColor' | 'compactIconColor' | 'compactCloseButtonColor' | 'compactLinkColor' | 'compactLogoColor' | 'compactBackgroundColor' | 'socialIconColor' | 'openLogoColor' | 'menuBackgroundColor' | 'overlayColor' | 'backgroundColor' | 'logoColor', string>>>;
102
+ };
103
+ type BurgerPageRef = {
104
+ id: string;
105
+ slug: string;
106
+ };
107
+ export declare function applyBurgerSettingsChange(nextSettings: BurgerSettings, prevSettings: BurgerSettings): BurgerSettings;
108
+ export type BurgerLinkNavigateEvent = {
109
+ mode: 'page' | 'url';
110
+ href: string;
111
+ page?: string;
112
+ url?: string;
113
+ anchor?: string;
114
+ target?: '_blank';
115
+ };
116
+ type BurgerProps = {
117
+ settings: BurgerSettings;
118
+ content?: unknown;
119
+ isEditor?: boolean;
120
+ isEditMode?: boolean;
121
+ isPreviewMode?: boolean;
122
+ activeEvent?: string;
123
+ /**
124
+ * Editor-controlled visual state (`default` | `compact` | `open`), matching a
125
+ * `statePanels` id. On the published site a navigation wrapper may pin `default`
126
+ * or `compact` (e.g. the `switch` position). When omitted the component
127
+ * watches scroll and click itself.
128
+ */
129
+ currentState?: string | null;
130
+ portalId?: string;
131
+ layoutId?: string;
132
+ pages?: BurgerPageRef[];
133
+ onLinkNavigate?: (event: BurgerLinkNavigateEvent) => void;
134
+ onUpdateSettings?: (settings: BurgerSettings) => void;
135
+ onOpenChange?: (isOpen: boolean) => void;
136
+ } & CommonComponentProps;
137
+ export declare function Burger({ settings: settingsProp, isEditor, isEditMode, isPreviewMode, activeEvent, currentState: currentStateProp, unavailableStates, layoutId, pages, onLinkNavigate, onUpdateSettings, onOpenChange, }: BurgerProps): import("react/jsx-runtime").JSX.Element;
138
+ export {};