@cntrl-site/components 1.0.11-alpha.8 → 1.0.11-alpha.9

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.
@@ -1,39 +1,5 @@
1
1
  import { CommonComponentProps } from '../props';
2
2
  import { TextStyles } from '../utils/textStylesToCss';
3
- declare const COLUMN_WIDTH_KEYS: readonly ["AColumnWidth", "BColumnWidth", "CColumnWidth", "DColumnWidth", "EColumnWidth"];
4
- type ColumnWidthKey = typeof COLUMN_WIDTH_KEYS[number];
5
- export declare function getListEffectiveContentWidth(settings: Record<string, unknown>): number;
6
- export declare function getEqualListColumnWidthUpdates(columns: number, contentWidth?: number): Record<ColumnWidthKey, number>;
7
- export declare function resolveListColumnPadding(columnWidth: number, paddingLeft: number, paddingRight: number): {
8
- paddingLeft: number;
9
- paddingRight: number;
10
- };
11
- export declare function getEffectiveListColumnWidths(columns: number, wrapperWidth: number, storedWidths: Record<ColumnWidthKey, number>): number[];
12
- export declare function resolveListColumnWidths(columns: number, wrapperWidth: number, storedWidths: Record<ColumnWidthKey, number>): number[];
13
- export declare function applyListSettingsChange(nextSettings: Record<string, unknown>, prevSettings: Record<string, unknown>): Record<string, unknown>;
14
- type ListContentItem = {
15
- AColumn?: string;
16
- BColumnWidth?: string;
17
- CColumnWidth?: string;
18
- DColumnWidth?: string;
19
- EColumnWidth?: string;
20
- image?: {
21
- objectFit?: 'cover' | 'contain';
22
- url: string;
23
- name: string;
24
- };
25
- link?: string;
26
- };
27
- type ListProps = {
28
- layoutId?: string;
29
- settings: ListSettings;
30
- content?: ListContentItem[];
31
- isEditor?: boolean;
32
- isPreviewMode?: boolean;
33
- activeEvent: string | undefined;
34
- onUpdateSettings?: (settings: ListSettings) => void;
35
- } & CommonComponentProps;
36
- export declare function List({ settings, content, isEditor, isPreviewMode, metadata, activeEvent, layoutId, onUpdateSettings }: ListProps): import("react/jsx-runtime").JSX.Element;
37
3
  type ListSettings = {
38
4
  columns: number;
39
5
  type: 'A' | 'B';
@@ -76,6 +42,7 @@ type ListSettings = {
76
42
  EColumnPaddingRight: number;
77
43
  EColumnPaddingBottom: number;
78
44
  columnsOrder?: string[];
45
+ textPaddingLR?: number;
79
46
  textColor: string;
80
47
  textFontFamily: string;
81
48
  textFontSettings?: {
@@ -93,4 +60,46 @@ type ListSettings = {
93
60
  backgroundHoverColor: string;
94
61
  dividerHoverColor: string;
95
62
  };
63
+ type ListContentItem = {
64
+ AColumn?: string;
65
+ BColumnWidth?: string;
66
+ CColumnWidth?: string;
67
+ DColumnWidth?: string;
68
+ EColumnWidth?: string;
69
+ image?: {
70
+ objectFit?: 'cover' | 'contain';
71
+ url: string;
72
+ name: string;
73
+ };
74
+ link?: string;
75
+ };
76
+ type ListProps = {
77
+ layoutId?: string;
78
+ settings: ListSettings;
79
+ content?: ListContentItem[];
80
+ isEditor?: boolean;
81
+ isPreviewMode?: boolean;
82
+ activeEvent: string | undefined;
83
+ onUpdateSettings?: (settings: ListSettings) => void;
84
+ } & CommonComponentProps;
85
+ export declare const COLUMN_CONTENT_KEYS: readonly ["AColumn", "BColumnWidth", "CColumnWidth", "DColumnWidth", "EColumnWidth"];
86
+ export declare const COLUMN_TEXT_PREFIXES: readonly ["AColumn", "BColumn", "CColumn", "DColumn", "EColumn"];
87
+ export declare const LIST_GLOBAL_TEXT_STYLE_KEYS: readonly ["textFontFamily", "textFontSettings", "textFontSize", "textLineHeight", "textLetterSpacing", "textWordSpacing", "textTextAppearance"];
88
+ export type ListGlobalTextStyleKey = typeof LIST_GLOBAL_TEXT_STYLE_KEYS[number];
89
+ export declare function getListColumnTextSettingKey(prefix: typeof COLUMN_TEXT_PREFIXES[number], globalKey: ListGlobalTextStyleKey): string;
90
+ declare const COLUMN_WIDTH_KEYS: readonly ["AColumnWidth", "BColumnWidth", "CColumnWidth", "DColumnWidth", "EColumnWidth"];
91
+ type ColumnWidthKey = typeof COLUMN_WIDTH_KEYS[number];
92
+ export declare function getListMinColumnWidth(designWidthPx?: number): number;
93
+ export declare function getListEffectiveContentWidth(settings: Record<string, unknown>): number;
94
+ export declare function getEqualListColumnWidthUpdates(columns: number, contentWidth?: number): Record<ColumnWidthKey, number>;
95
+ export declare function resolveListColumnPadding(columnWidth: number, paddingLeft: number, paddingRight: number): {
96
+ paddingLeft: number;
97
+ paddingRight: number;
98
+ };
99
+ export declare function getEffectiveListColumnWidths(columns: number, wrapperWidth: number, storedWidths: Record<ColumnWidthKey, number>): number[];
100
+ export declare function resolveListColumnWidths(columns: number, wrapperWidth: number, storedWidths: Record<ColumnWidthKey, number>): number[];
101
+ export declare function applyListSettingsChange(nextSettings: Record<string, unknown>, prevSettings: Record<string, unknown>, options?: {
102
+ designWidth?: number;
103
+ }): Record<string, unknown>;
104
+ export declare function List({ settings, content, isEditor, isPreviewMode, activeEvent, layoutId, onUpdateSettings }: ListProps): import("react/jsx-runtime").JSX.Element;
96
105
  export {};