@cntrl-site/components 1.0.12-alpha.5 → 1.0.12-alpha.6
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/LICENSE +21 -21
- package/README.md +2 -2
- package/dist/Components/Grid/Grid.d.ts +11 -0
- package/dist/Components/List/List.d.ts +12 -8
- package/dist/Components/utils/textStylesToCss.d.ts +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +6601 -6499
- package/dist/index.mjs +9580 -9372
- package/dist/types/SchemaV1.d.ts +6 -1
- package/package.json +85 -85
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2025 GX Platform
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 GX Platform
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
# Control Components
|
|
2
|
-
|
|
1
|
+
# Control Components
|
|
2
|
+
|
|
3
3
|
This is custom components for control editor and public websites.
|
|
@@ -37,6 +37,7 @@ type GridSettings = {
|
|
|
37
37
|
subtitleMarginTop: number;
|
|
38
38
|
titleColor: string;
|
|
39
39
|
subtitleColor: string;
|
|
40
|
+
lightboxCounterColor: string;
|
|
40
41
|
titleFontFamily: string;
|
|
41
42
|
titleFontSettings?: {
|
|
42
43
|
fontWeight: number;
|
|
@@ -57,5 +58,15 @@ type GridSettings = {
|
|
|
57
58
|
subtitleLetterSpacing?: number;
|
|
58
59
|
subtitleWordSpacing?: number;
|
|
59
60
|
subtitleTextAppearance?: TextStyles['textAppearance'];
|
|
61
|
+
lightboxCounterFontFamily: string;
|
|
62
|
+
lightboxCounterFontSettings?: {
|
|
63
|
+
fontWeight: number;
|
|
64
|
+
fontStyle: string;
|
|
65
|
+
};
|
|
66
|
+
lightboxCounterFontSize?: number;
|
|
67
|
+
lightboxCounterLineHeight?: number;
|
|
68
|
+
lightboxCounterLetterSpacing?: number;
|
|
69
|
+
lightboxCounterWordSpacing?: number;
|
|
70
|
+
lightboxCounterTextAppearance?: TextStyles['textAppearance'];
|
|
60
71
|
};
|
|
61
72
|
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CommonComponentProps } from '../props';
|
|
2
2
|
import { TextStyles } from '../utils/textStylesToCss';
|
|
3
|
+
import { LayoutItem, LayoutTab } from '../../types/SchemaV1';
|
|
3
4
|
type ListFontSettings = {
|
|
4
5
|
fontWeight: number;
|
|
5
6
|
fontStyle: string;
|
|
@@ -13,6 +14,7 @@ type ListColumnTextStyleOverrides = {
|
|
|
13
14
|
AColumnTextLineHeight?: number;
|
|
14
15
|
AColumnTextLetterSpacing?: number;
|
|
15
16
|
AColumnTextWordSpacing?: number;
|
|
17
|
+
AColumnTextTextAlign?: 'left' | 'center' | 'right' | 'justify';
|
|
16
18
|
AColumnTextTextAppearance?: TextStyles['textAppearance'];
|
|
17
19
|
BColumnVerticalAlign?: string;
|
|
18
20
|
BColumnTextFontFamily?: string;
|
|
@@ -21,6 +23,7 @@ type ListColumnTextStyleOverrides = {
|
|
|
21
23
|
BColumnTextLineHeight?: number;
|
|
22
24
|
BColumnTextLetterSpacing?: number;
|
|
23
25
|
BColumnTextWordSpacing?: number;
|
|
26
|
+
BColumnTextTextAlign?: 'left' | 'center' | 'right' | 'justify';
|
|
24
27
|
BColumnTextTextAppearance?: TextStyles['textAppearance'];
|
|
25
28
|
CColumnVerticalAlign?: string;
|
|
26
29
|
CColumnTextFontFamily?: string;
|
|
@@ -29,6 +32,7 @@ type ListColumnTextStyleOverrides = {
|
|
|
29
32
|
CColumnTextLineHeight?: number;
|
|
30
33
|
CColumnTextLetterSpacing?: number;
|
|
31
34
|
CColumnTextWordSpacing?: number;
|
|
35
|
+
CColumnTextTextAlign?: 'left' | 'center' | 'right' | 'justify';
|
|
32
36
|
CColumnTextTextAppearance?: TextStyles['textAppearance'];
|
|
33
37
|
DColumnVerticalAlign?: string;
|
|
34
38
|
DColumnTextFontFamily?: string;
|
|
@@ -37,6 +41,7 @@ type ListColumnTextStyleOverrides = {
|
|
|
37
41
|
DColumnTextLineHeight?: number;
|
|
38
42
|
DColumnTextLetterSpacing?: number;
|
|
39
43
|
DColumnTextWordSpacing?: number;
|
|
44
|
+
DColumnTextTextAlign?: 'left' | 'center' | 'right' | 'justify';
|
|
40
45
|
DColumnTextTextAppearance?: TextStyles['textAppearance'];
|
|
41
46
|
EColumnVerticalAlign?: string;
|
|
42
47
|
EColumnTextFontFamily?: string;
|
|
@@ -45,6 +50,7 @@ type ListColumnTextStyleOverrides = {
|
|
|
45
50
|
EColumnTextLineHeight?: number;
|
|
46
51
|
EColumnTextLetterSpacing?: number;
|
|
47
52
|
EColumnTextWordSpacing?: number;
|
|
53
|
+
EColumnTextTextAlign?: 'left' | 'center' | 'right' | 'justify';
|
|
48
54
|
EColumnTextTextAppearance?: TextStyles['textAppearance'];
|
|
49
55
|
cutLabelTextFontFamily?: string;
|
|
50
56
|
cutLabelTextFontSettings?: ListFontSettings;
|
|
@@ -52,7 +58,9 @@ type ListColumnTextStyleOverrides = {
|
|
|
52
58
|
cutLabelTextLineHeight?: number;
|
|
53
59
|
cutLabelTextLetterSpacing?: number;
|
|
54
60
|
cutLabelTextWordSpacing?: number;
|
|
61
|
+
cutLabelTextTextAlign?: 'left' | 'center' | 'right' | 'justify';
|
|
55
62
|
cutLabelTextTextAppearance?: TextStyles['textAppearance'];
|
|
63
|
+
cutLabelVerticalAlign?: string;
|
|
56
64
|
};
|
|
57
65
|
export type ListColumnVerticalAlignKey = `${ListColumnPrefix}VerticalAlign`;
|
|
58
66
|
export type ListSettings = {
|
|
@@ -99,13 +107,6 @@ export type ListSettings = {
|
|
|
99
107
|
columnsOrder?: string[];
|
|
100
108
|
textPaddingLR?: number;
|
|
101
109
|
textColor: string;
|
|
102
|
-
textFontFamily: string;
|
|
103
|
-
textFontSettings?: ListFontSettings;
|
|
104
|
-
textFontSize?: number;
|
|
105
|
-
textLineHeight?: number;
|
|
106
|
-
textLetterSpacing?: number;
|
|
107
|
-
textWordSpacing?: number;
|
|
108
|
-
textTextAppearance?: TextStyles['textAppearance'];
|
|
109
110
|
backgroundColor: string;
|
|
110
111
|
dividerColor: string;
|
|
111
112
|
textHoverColor: string;
|
|
@@ -146,9 +147,12 @@ export declare function isBaselineAnchorColumnVerticalAlign(value: string | unde
|
|
|
146
147
|
export declare function parseBaselineAnchorLetter(value: string | undefined): string | null;
|
|
147
148
|
export declare function isValidColumnBaselineVAlign(value: string | undefined, forColumnLetter: string, settings: ListSettings): boolean;
|
|
148
149
|
export declare function getColumnVerticalAlignOptionsForLetter(columnLetter: string, settings: ListSettings): string[];
|
|
149
|
-
export declare const LIST_GLOBAL_TEXT_STYLE_KEYS: readonly ["textFontFamily", "textFontSettings", "textFontSize", "textLineHeight", "textLetterSpacing", "textWordSpacing", "textTextAppearance"];
|
|
150
|
+
export declare const LIST_GLOBAL_TEXT_STYLE_KEYS: readonly ["textFontFamily", "textFontSettings", "textFontSize", "textLineHeight", "textLetterSpacing", "textWordSpacing", "textTextAlign", "textTextAppearance"];
|
|
150
151
|
export type ListGlobalTextStyleKey = typeof LIST_GLOBAL_TEXT_STYLE_KEYS[number];
|
|
151
152
|
export declare function getListColumnTextSettingKey(prefix: ListTextStylePrefix, globalKey: ListGlobalTextStyleKey): string;
|
|
153
|
+
export declare const LIST_TEXT_STYLE_TAB_LABELS: Record<ListTextStylePrefix, string>;
|
|
154
|
+
export declare function createListTextStyleTabContentItems(prefix: ListTextStylePrefix): LayoutItem[];
|
|
155
|
+
export declare function createListTextStylePanelTab(): LayoutTab;
|
|
152
156
|
declare const COLUMN_WIDTH_KEYS: readonly ["AColumnWidth", "BColumnWidth", "CColumnWidth", "DColumnWidth", "EColumnWidth"];
|
|
153
157
|
type ColumnWidthKey = typeof COLUMN_WIDTH_KEYS[number];
|
|
154
158
|
export declare function getListMinColumnWidth(designWidthPx?: number): number;
|
|
@@ -14,6 +14,7 @@ export type TextStyles = {
|
|
|
14
14
|
textDecoration?: string;
|
|
15
15
|
fontVariant?: string;
|
|
16
16
|
};
|
|
17
|
+
textAlign?: 'left' | 'center' | 'right' | 'justify';
|
|
17
18
|
color: string;
|
|
18
19
|
};
|
|
19
20
|
export declare const normalizeFontFamilyCssValue: (fontFamily?: string) => string | undefined;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { type Component, isSchemaV1 } from './types/Component';
|
|
2
|
-
export type { ComponentSchemaV1, SchemaProperty, PropertyScope, LayoutItem, LayoutRow, LayoutGroup, LayoutSwitcher, SchemaSection, SchemaPanel, SchemaDisplay } from './types/SchemaV1';
|
|
2
|
+
export type { ComponentSchemaV1, SchemaProperty, PropertyScope, LayoutItem, LayoutRow, LayoutGroup, LayoutSwitcher, LayoutTab, SchemaSection, SchemaPanel, SchemaDisplay } from './types/SchemaV1';
|
|
3
3
|
export { components } from './Components/components';
|