@orangelogic/design-system 2.175.0 → 2.176.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.
- package/library/chunks/{color-swatch-group.C01UAz1A.js → color-swatch-group.NJnbc24w.js} +696 -699
- package/library/chunks/{color-swatch.DpzAGKQx.js → color-swatch.D6Gg5bpz.js} +1 -1
- package/library/chunks/{folder-select.BgWvY0t0.js → folder-select.Di9wfqIU.js} +77 -72
- package/library/components/color-swatch-group.js +2 -2
- package/library/components/color-swatch.js +1 -1
- package/library/components/copy-button.js +1 -1
- package/library/components/folder-select.js +1 -1
- package/library/components/molecules.js +2 -2
- package/library/components/organisms.js +1 -1
- package/library/components/types.js +13036 -13004
- package/library/package.json +1 -1
- package/library/packages/atoms/src/components/copy-button/copy-button.d.ts +3 -0
- package/library/packages/organisms/src/color-swatch-group/color-swatch-group.constants.d.ts +10 -66
- package/library/packages/organisms/src/content-builder/components/config-form/config-form-controller.d.ts +1 -0
- package/library/packages/organisms/src/content-builder/content-builder.utils.d.ts +9 -0
- package/library/packages/utils/src/font/font.d.ts +23 -8
- package/library/utils.js +322 -311
- package/package.json +1 -1
package/library/package.json
CHANGED
|
@@ -27,6 +27,9 @@ import { default as CxTooltip } from '../tooltip/tooltip';
|
|
|
27
27
|
* @cssproperty --background-color - The background color to use for the button.
|
|
28
28
|
* @cssproperty --color - The color to use for the button.
|
|
29
29
|
* @cssproperty --button-font-size - The font size to use for the button.
|
|
30
|
+
* @cssproperty --button-font-family - The font family to use for the button.
|
|
31
|
+
* @cssproperty --button-font-style - The font style to use for the button.
|
|
32
|
+
* @cssproperty --button-font-weight - The font weight to use for the button.
|
|
30
33
|
* @cssproperty --button-padding - The padding to use for the button.
|
|
31
34
|
* @cssproperty --button-background-color - The background color to use for the button.
|
|
32
35
|
*
|
|
@@ -6,84 +6,29 @@ export declare const validCodes: string[];
|
|
|
6
6
|
export declare const columnDefaults: {
|
|
7
7
|
resizable: boolean;
|
|
8
8
|
};
|
|
9
|
-
|
|
9
|
+
/**
|
|
10
|
+
* A single "Name" column that renders the color swatch and the name together,
|
|
11
|
+
* so the "Name" header spans the whole column instead of truncating inside a
|
|
12
|
+
* narrow swatch-only column.
|
|
13
|
+
*/
|
|
14
|
+
export declare const nameColumn: {
|
|
10
15
|
field: string;
|
|
11
16
|
formatter: (cell: CellComponent) => HTMLDivElement;
|
|
12
17
|
headerHozAlign: string;
|
|
13
18
|
headerSort: boolean;
|
|
14
19
|
hozAlign: string;
|
|
15
20
|
title: string;
|
|
16
|
-
width: number;
|
|
17
|
-
widthGrow?: undefined;
|
|
18
|
-
minWidth?: undefined;
|
|
19
|
-
responsive?: undefined;
|
|
20
|
-
} | {
|
|
21
|
-
field: string;
|
|
22
|
-
headerHozAlign: string;
|
|
23
|
-
headerSort: boolean;
|
|
24
|
-
hozAlign: string;
|
|
25
21
|
widthGrow: number;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
width?: undefined;
|
|
29
|
-
minWidth?: undefined;
|
|
30
|
-
responsive?: undefined;
|
|
31
|
-
} | {
|
|
22
|
+
};
|
|
23
|
+
export declare const codeColumns: ({
|
|
32
24
|
field: string;
|
|
33
25
|
headerHozAlign: string;
|
|
34
26
|
headerSort: boolean;
|
|
35
27
|
hozAlign: string;
|
|
36
28
|
minWidth: number;
|
|
37
29
|
title: string;
|
|
38
|
-
formatter?: undefined;
|
|
39
|
-
width?: undefined;
|
|
40
|
-
widthGrow?: undefined;
|
|
41
|
-
responsive?: undefined;
|
|
42
|
-
} | {
|
|
43
|
-
field: string;
|
|
44
|
-
headerHozAlign: string;
|
|
45
|
-
headerSort: boolean;
|
|
46
|
-
hozAlign: string;
|
|
47
|
-
responsive: number;
|
|
48
|
-
title: string;
|
|
49
|
-
widthGrow: number;
|
|
50
|
-
formatter?: undefined;
|
|
51
|
-
width?: undefined;
|
|
52
|
-
minWidth?: undefined;
|
|
53
|
-
})[];
|
|
54
|
-
export declare const copyableColumns: (localize: LocalizeController, palette: string) => ({
|
|
55
|
-
field: string;
|
|
56
|
-
formatter: (cell: CellComponent) => HTMLDivElement;
|
|
57
|
-
headerHozAlign: string;
|
|
58
|
-
headerSort: boolean;
|
|
59
|
-
hozAlign: string;
|
|
60
|
-
title: string;
|
|
61
|
-
width: number;
|
|
62
|
-
widthGrow?: undefined;
|
|
63
|
-
minWidth?: undefined;
|
|
64
30
|
responsive?: undefined;
|
|
65
|
-
} | {
|
|
66
|
-
field: string;
|
|
67
|
-
headerHozAlign: string;
|
|
68
|
-
headerSort: boolean;
|
|
69
|
-
hozAlign: string;
|
|
70
|
-
widthGrow: number;
|
|
71
|
-
formatter?: undefined;
|
|
72
|
-
title?: undefined;
|
|
73
|
-
width?: undefined;
|
|
74
|
-
minWidth?: undefined;
|
|
75
|
-
responsive?: undefined;
|
|
76
|
-
} | {
|
|
77
|
-
field: string;
|
|
78
|
-
headerHozAlign: string;
|
|
79
|
-
headerSort: boolean;
|
|
80
|
-
hozAlign: string;
|
|
81
|
-
minWidth: number;
|
|
82
|
-
title: string;
|
|
83
|
-
formatter?: undefined;
|
|
84
|
-
width?: undefined;
|
|
85
31
|
widthGrow?: undefined;
|
|
86
|
-
responsive?: undefined;
|
|
87
32
|
} | {
|
|
88
33
|
field: string;
|
|
89
34
|
headerHozAlign: string;
|
|
@@ -92,10 +37,9 @@ export declare const copyableColumns: (localize: LocalizeController, palette: st
|
|
|
92
37
|
responsive: number;
|
|
93
38
|
title: string;
|
|
94
39
|
widthGrow: number;
|
|
95
|
-
formatter?: undefined;
|
|
96
|
-
width?: undefined;
|
|
97
40
|
minWidth?: undefined;
|
|
98
|
-
}
|
|
41
|
+
})[];
|
|
42
|
+
export declare const copyableCodeColumns: (localize: LocalizeController, palette: string) => ({
|
|
99
43
|
field: string;
|
|
100
44
|
formatter: (cell: any) => HTMLElement | null;
|
|
101
45
|
headerHozAlign: string;
|
|
@@ -7,6 +7,7 @@ export declare class ConfigFormController implements ReactiveController {
|
|
|
7
7
|
host: ReactiveControllerHost & CxConfigForm;
|
|
8
8
|
private readonly localize;
|
|
9
9
|
private apiSearchAssets;
|
|
10
|
+
private apiGetTeamSpaceFontFamily;
|
|
10
11
|
private readonly pendingGalleryPickerSaves;
|
|
11
12
|
private readonly fontFamiliesCache;
|
|
12
13
|
private readonly pendingFontFamilyFetches;
|
|
@@ -14,6 +14,15 @@ type FontPickerStoredValues = {
|
|
|
14
14
|
export declare function getTemplateClass(templateId: string): string;
|
|
15
15
|
export declare function getContentConfigs(traits: PropertyConfig[], adHocProperties: string[]): string[];
|
|
16
16
|
export declare function getLimitedBlocks(blockType: BlockType): BlockType[];
|
|
17
|
+
/**
|
|
18
|
+
* The `space-default` typeface inherits the team space's current font, so the
|
|
19
|
+
* backend returns it with no variants of its own. Populate its `families` from
|
|
20
|
+
* the typeface that matches the space's current font (from
|
|
21
|
+
* `apiGetTeamSpaceFontFamily`), so the style dropdown can offer that font's
|
|
22
|
+
* variants. Returns the list unchanged when there is no space font or no
|
|
23
|
+
* matching typeface.
|
|
24
|
+
*/
|
|
25
|
+
export declare function injectSpaceDefaultVariants(typefaces: FontTypeface[], spaceFontFamily: string): FontTypeface[];
|
|
17
26
|
export declare function getFontPickerControlValues({ blockAttributes, keys, typefaces, }: {
|
|
18
27
|
blockAttributes: Record<string, unknown>;
|
|
19
28
|
keys: FontPickerKeys;
|
|
@@ -3,19 +3,34 @@ import { FontFamily, FontTypeface } from '../../../types/src/font-picker';
|
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Stable option value for a typeface. Uses the explicit `value` when provided,
|
|
6
|
-
* otherwise derives a
|
|
6
|
+
* otherwise derives a space-safe identity from the typeface name.
|
|
7
7
|
*/
|
|
8
8
|
export declare function getTypefaceOptionValue(typeface: FontTypeface): string;
|
|
9
9
|
/**
|
|
10
|
-
* Stable
|
|
10
|
+
* Stable option identity for a font-family variant, used only as the
|
|
11
|
+
* `cx-select` option value (never applied as CSS — the real font-family,
|
|
12
|
+
* weight, and style are stored separately). Built from the variant's
|
|
13
|
+
* identifying fields — the CSS `value` (or `name` when it is absent) plus
|
|
14
|
+
* `fontStyle` and `fontWeight` — made space-safe.
|
|
11
15
|
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* `value` for every variant of a typeface (e.g. all "Lato" variants share
|
|
15
|
-
* `value: "Lato"` and differ only by name/weight/style) — in that case the
|
|
16
|
-
* value can't be the selector identity, so fall back to a name-based slug.
|
|
16
|
+
* Two variants that are identical in all of those fields collide by design;
|
|
17
|
+
* that is a backend data problem, not something the picker resolves.
|
|
17
18
|
*/
|
|
18
|
-
export declare function getFontFamilyOptionValue(fontFamily: FontFamily
|
|
19
|
+
export declare function getFontFamilyOptionValue(fontFamily: FontFamily): string;
|
|
20
|
+
/**
|
|
21
|
+
* Quotes a CSS font-family that contains spaces (e.g. `Custom Font 2`) so it
|
|
22
|
+
* stays valid wherever it is substituted into a `font-family` declaration.
|
|
23
|
+
* Names without spaces are already valid identifiers (including generic
|
|
24
|
+
* keywords like `sans-serif`) and are left as-is; an already-quoted value is
|
|
25
|
+
* returned unchanged. Any backslash or single quote inside the name is escaped
|
|
26
|
+
* so a name like `O'Reilly Sans` still produces a valid quoted string.
|
|
27
|
+
*/
|
|
28
|
+
export declare function quoteFontFamily(fontFamily: string): string;
|
|
29
|
+
/**
|
|
30
|
+
* Strips one pair of surrounding quotes and unescapes the content so a stored
|
|
31
|
+
* value matches raw names. Inverse of `quoteFontFamily`.
|
|
32
|
+
*/
|
|
33
|
+
export declare function unquoteFontFamily(fontFamily: string): string;
|
|
19
34
|
/**
|
|
20
35
|
* Test if a specific font configuration is available using a test element
|
|
21
36
|
*/
|