@sc-360-v2/storefront-cms-library 0.0.2 → 0.0.4
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/builder.js +2 -0
- package/dist/builder.js.LICENSE.txt +1 -0
- package/dist/css.js +1 -1
- package/dist/icons.js +1 -0
- package/dist/index.js +1 -1
- package/dist/text-editor.scss +320 -0
- package/dist/types/builder/elements/common.d.ts +19 -0
- package/dist/types/builder/elements/extra.d.ts +70 -0
- package/dist/types/builder/elements/grid/index.d.ts +61 -0
- package/dist/types/builder/elements/image/index.d.ts +27 -0
- package/dist/types/builder/elements/section/index.d.ts +55 -0
- package/dist/types/builder/elements/text-editor/index.d.ts +28 -0
- package/dist/types/builder/enums/index.d.ts +44 -0
- package/dist/types/builder/index.d.ts +8 -0
- package/dist/types/builder/interfaces/cms-tools.d.ts +4 -0
- package/dist/types/builder/interfaces/global.d.ts +27 -0
- package/dist/types/builder/utilities/global.d.ts +6 -0
- package/dist/types/css/cssVariables.d.ts +7 -0
- package/dist/types/export.d.ts +3 -0
- package/dist/types/global/attributes.d.ts +125 -0
- package/dist/types/global/index.d.ts +0 -0
- package/dist/types/global/style-properties.d.ts +47 -0
- package/dist/types/global/types.d.ts +30 -0
- package/dist/types/html-elements/element-types.d.ts +121 -0
- package/dist/types/html-elements/elements.d.ts +87 -0
- package/dist/types/icons/cms-svg-icons.d.ts +5 -0
- package/dist/types/icons/icons.d.ts +2 -0
- package/package.json +92 -65
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface Events {
|
|
3
|
+
onCopy?: React.ClipboardEventHandler<HTMLElement>;
|
|
4
|
+
onCut?: React.ClipboardEventHandler<HTMLElement>;
|
|
5
|
+
onPaste?: React.ClipboardEventHandler<HTMLElement>;
|
|
6
|
+
onCompositionEnd?: React.CompositionEventHandler<HTMLElement>;
|
|
7
|
+
onCompositionStart?: React.CompositionEventHandler<HTMLElement>;
|
|
8
|
+
onCompositionUpdate?: React.CompositionEventHandler<HTMLElement>;
|
|
9
|
+
onFocus?: React.FocusEventHandler<HTMLElement>;
|
|
10
|
+
onBlur?: React.FocusEventHandler<HTMLElement>;
|
|
11
|
+
onChange?: React.FormEventHandler<HTMLElement>;
|
|
12
|
+
onInput?: React.FormEventHandler<HTMLElement>;
|
|
13
|
+
onSubmit?: React.FormEventHandler<HTMLElement>;
|
|
14
|
+
onLoad?: React.ReactEventHandler<HTMLElement>;
|
|
15
|
+
onError?: React.ReactEventHandler<HTMLElement>;
|
|
16
|
+
onKeyDown?: React.KeyboardEventHandler<HTMLElement>;
|
|
17
|
+
onKeyPress?: React.KeyboardEventHandler<HTMLElement>;
|
|
18
|
+
onKeyUp?: React.KeyboardEventHandler<HTMLElement>;
|
|
19
|
+
onAbort?: React.ReactEventHandler<HTMLElement>;
|
|
20
|
+
onCanPlay?: React.ReactEventHandler<HTMLElement>;
|
|
21
|
+
onCanPlayThrough?: React.ReactEventHandler<HTMLElement>;
|
|
22
|
+
onDurationChange?: React.ReactEventHandler<HTMLElement>;
|
|
23
|
+
onEmptied?: React.ReactEventHandler<HTMLElement>;
|
|
24
|
+
onEncrypted?: React.ReactEventHandler<HTMLElement>;
|
|
25
|
+
onEnded?: React.ReactEventHandler<HTMLElement>;
|
|
26
|
+
onLoadedData?: React.ReactEventHandler<HTMLElement>;
|
|
27
|
+
onLoadedMetadata?: React.ReactEventHandler<HTMLElement>;
|
|
28
|
+
onLoadStart?: React.ReactEventHandler<HTMLElement>;
|
|
29
|
+
onPause?: React.ReactEventHandler<HTMLElement>;
|
|
30
|
+
onPlay?: React.ReactEventHandler<HTMLElement>;
|
|
31
|
+
onPlaying?: React.ReactEventHandler<HTMLElement>;
|
|
32
|
+
onProgress?: React.ReactEventHandler<HTMLElement>;
|
|
33
|
+
onRateChange?: React.ReactEventHandler<HTMLElement>;
|
|
34
|
+
onSeeked?: React.ReactEventHandler<HTMLElement>;
|
|
35
|
+
onSeeking?: React.ReactEventHandler<HTMLElement>;
|
|
36
|
+
onStalled?: React.ReactEventHandler<HTMLElement>;
|
|
37
|
+
onSuspend?: React.ReactEventHandler<HTMLElement>;
|
|
38
|
+
onTimeUpdate?: React.ReactEventHandler<HTMLElement>;
|
|
39
|
+
onVolumeChange?: React.ReactEventHandler<HTMLElement>;
|
|
40
|
+
onWaiting?: React.ReactEventHandler<HTMLElement>;
|
|
41
|
+
onClick?: React.MouseEventHandler<HTMLElement>;
|
|
42
|
+
onContextMenu?: React.MouseEventHandler<HTMLElement>;
|
|
43
|
+
onDoubleClick?: React.MouseEventHandler<HTMLElement>;
|
|
44
|
+
onDrag?: React.DragEventHandler<HTMLElement>;
|
|
45
|
+
onDragEnd?: React.DragEventHandler<HTMLElement>;
|
|
46
|
+
onDragEnter?: React.DragEventHandler<HTMLElement>;
|
|
47
|
+
onDragExit?: React.DragEventHandler<HTMLElement>;
|
|
48
|
+
onDragLeave?: React.DragEventHandler<HTMLElement>;
|
|
49
|
+
onDragOver?: React.DragEventHandler<HTMLElement>;
|
|
50
|
+
onDragStart?: React.DragEventHandler<HTMLElement>;
|
|
51
|
+
onDrop?: React.DragEventHandler<HTMLElement>;
|
|
52
|
+
onMouseDown?: React.MouseEventHandler<HTMLElement>;
|
|
53
|
+
onMouseEnter?: React.MouseEventHandler<HTMLElement>;
|
|
54
|
+
onMouseLeave?: React.MouseEventHandler<HTMLElement>;
|
|
55
|
+
onMouseMove?: React.MouseEventHandler<HTMLElement>;
|
|
56
|
+
onMouseOut?: React.MouseEventHandler<HTMLElement>;
|
|
57
|
+
onMouseOver?: React.MouseEventHandler<HTMLElement>;
|
|
58
|
+
onMouseUp?: React.MouseEventHandler<HTMLElement>;
|
|
59
|
+
onSelect?: React.ReactEventHandler<HTMLElement>;
|
|
60
|
+
onTouchCancel?: React.TouchEventHandler<HTMLElement>;
|
|
61
|
+
onTouchEnd?: React.TouchEventHandler<HTMLElement>;
|
|
62
|
+
onTouchMove?: React.TouchEventHandler<HTMLElement>;
|
|
63
|
+
onTouchStart?: React.TouchEventHandler<HTMLElement>;
|
|
64
|
+
onScroll?: React.UIEventHandler<HTMLElement>;
|
|
65
|
+
onWheel?: React.WheelEventHandler<HTMLElement>;
|
|
66
|
+
onAnimationStart?: React.AnimationEventHandler<HTMLElement>;
|
|
67
|
+
onAnimationEnd?: React.AnimationEventHandler<HTMLElement>;
|
|
68
|
+
onAnimationIteration?: React.AnimationEventHandler<HTMLElement>;
|
|
69
|
+
onTransitionEnd?: React.TransitionEventHandler<HTMLElement>;
|
|
70
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { CommonStyleProperties } from "../../../global/style-properties";
|
|
2
|
+
import { DisplayValue, ResponsiveBehaviourTypes, SizeTypeValue } from "../../../global/types";
|
|
3
|
+
import { CMSHTMLAttributes } from "../../../global/attributes";
|
|
4
|
+
import { BuilderAttributes } from "../common";
|
|
5
|
+
import { SizeInterface } from "../../interfaces/global";
|
|
6
|
+
export interface GridStyleProperties extends CommonStyleProperties {
|
|
7
|
+
minHeight: string;
|
|
8
|
+
height: string;
|
|
9
|
+
minWidth: string;
|
|
10
|
+
maxWidth: string;
|
|
11
|
+
maxHeight: string;
|
|
12
|
+
gridArea: string;
|
|
13
|
+
display: DisplayValue;
|
|
14
|
+
boxSizing: string;
|
|
15
|
+
rowGap: string;
|
|
16
|
+
columnGap: string;
|
|
17
|
+
gridTemplateRows: string;
|
|
18
|
+
gridTemplateColumns: string;
|
|
19
|
+
}
|
|
20
|
+
export declare const getDefaultStyles: () => GridStyleProperties;
|
|
21
|
+
type AriaRoleValue = "grid" | "gridcell" | "row" | "rowgroup" | "presentation" | "none" | "button" | "link" | string;
|
|
22
|
+
type AriaLabelValue = string;
|
|
23
|
+
type AriaHiddenValue = "true" | "false";
|
|
24
|
+
type AriaLiveValue = "off" | "polite" | "assertive";
|
|
25
|
+
type LangValue = string;
|
|
26
|
+
export interface CommonGridElementAttributes extends CMSHTMLAttributes {
|
|
27
|
+
role?: AriaRoleValue;
|
|
28
|
+
ariaLabel?: AriaLabelValue;
|
|
29
|
+
ariaHidden?: AriaHiddenValue;
|
|
30
|
+
ariaLive?: AriaLiveValue;
|
|
31
|
+
ariaDescribedBy?: string;
|
|
32
|
+
ariaControls?: string;
|
|
33
|
+
lang?: LangValue;
|
|
34
|
+
dataType?: string;
|
|
35
|
+
dataDivType?: string;
|
|
36
|
+
dataElementType?: string;
|
|
37
|
+
dataWidgetType?: string;
|
|
38
|
+
id?: string;
|
|
39
|
+
}
|
|
40
|
+
export interface CMSGridInterface {
|
|
41
|
+
responsiveBehaviour: ResponsiveBehaviourTypes;
|
|
42
|
+
id?: string | number;
|
|
43
|
+
styles: GridStyleProperties;
|
|
44
|
+
children: any;
|
|
45
|
+
attributes: {
|
|
46
|
+
BUILDER?: Pick<BuilderAttributes, "dataDivType" | "dataType">;
|
|
47
|
+
HTML?: CommonGridElementAttributes;
|
|
48
|
+
CUSTOM?: any;
|
|
49
|
+
};
|
|
50
|
+
size?: SizeInterface;
|
|
51
|
+
uniqueSize?: SizeInterface;
|
|
52
|
+
number?: SizeInterface;
|
|
53
|
+
visible?: boolean;
|
|
54
|
+
gtccolorder?: number;
|
|
55
|
+
gtrroworder?: number;
|
|
56
|
+
type?: SizeTypeValue;
|
|
57
|
+
}
|
|
58
|
+
export interface CMSGridsContainer {
|
|
59
|
+
[key: string]: CMSGridInterface;
|
|
60
|
+
}
|
|
61
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { CMSHTMLAttributes } from "../../../global/attributes";
|
|
2
|
+
import { AlignSelfValue, BoxSizingValue, GlobalImageAttributes, GridAreaValue, HeightValue, ImageBuilderAttributes, JustifySelfValue, MarginValue, MaxHeightValue, MaxWidthValue, MinHeightValue, MinWidthValue, PaddingValue } from "../../../global/types";
|
|
3
|
+
import { BuilderAttributes, CMSElementInterface } from "../common";
|
|
4
|
+
export interface ImageStyleProperties {
|
|
5
|
+
minHeight?: MinHeightValue;
|
|
6
|
+
height?: HeightValue;
|
|
7
|
+
minWidth?: MinWidthValue;
|
|
8
|
+
maxWidth?: MaxWidthValue;
|
|
9
|
+
maxHeight?: MaxHeightValue;
|
|
10
|
+
gridArea?: GridAreaValue;
|
|
11
|
+
boxSizing?: BoxSizingValue;
|
|
12
|
+
padding?: PaddingValue;
|
|
13
|
+
marginLeft?: MarginValue;
|
|
14
|
+
marginTop?: MarginValue;
|
|
15
|
+
marginBottom?: MarginValue;
|
|
16
|
+
marginRight?: MarginValue;
|
|
17
|
+
justifySelf?: JustifySelfValue;
|
|
18
|
+
alignSelf?: AlignSelfValue;
|
|
19
|
+
}
|
|
20
|
+
export interface CMSImageInterface extends Omit<CMSElementInterface, "attributes"> {
|
|
21
|
+
attributes: {
|
|
22
|
+
HTML: Pick<CMSHTMLAttributes, GlobalImageAttributes>;
|
|
23
|
+
BUILDER: Pick<BuilderAttributes, ImageBuilderAttributes>;
|
|
24
|
+
CUSTOM: any;
|
|
25
|
+
};
|
|
26
|
+
styles: ImageStyleProperties;
|
|
27
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { CommonStyleProperties } from "../../../global/style-properties";
|
|
2
|
+
import { DisplayValue, ResponsiveBehaviourTypes } from "../../../global/types";
|
|
3
|
+
import { CMSHTMLAttributes } from "../../../global/attributes";
|
|
4
|
+
import { CMSGridsContainer } from "../grid";
|
|
5
|
+
import { BuilderAttributes } from "../common";
|
|
6
|
+
export interface SectionAttributes extends CMSHTMLAttributes {
|
|
7
|
+
role?: string;
|
|
8
|
+
ariaLabel?: string;
|
|
9
|
+
ariaDescribedBy?: string;
|
|
10
|
+
id?: string;
|
|
11
|
+
className?: string;
|
|
12
|
+
lang?: string;
|
|
13
|
+
dataMeta?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface SectionStyleProperties extends CommonStyleProperties {
|
|
16
|
+
minHeight?: string;
|
|
17
|
+
height?: string;
|
|
18
|
+
minWidth?: string;
|
|
19
|
+
maxWidth?: string;
|
|
20
|
+
maxHeight?: string;
|
|
21
|
+
gridArea?: string;
|
|
22
|
+
display?: DisplayValue;
|
|
23
|
+
boxSizing?: string;
|
|
24
|
+
rowGap?: string;
|
|
25
|
+
columnGap?: string;
|
|
26
|
+
gridTemplateRows?: string;
|
|
27
|
+
gridTemplateColumns?: string;
|
|
28
|
+
}
|
|
29
|
+
export declare const getDefaultStyles: () => SectionStyleProperties;
|
|
30
|
+
export interface VariationConditionInterface {
|
|
31
|
+
customer?: any[];
|
|
32
|
+
user?: any[];
|
|
33
|
+
relation?: any;
|
|
34
|
+
}
|
|
35
|
+
export interface SectionVariationInterface {
|
|
36
|
+
condition?: VariationConditionInterface;
|
|
37
|
+
attributes?: {
|
|
38
|
+
BUILDER?: Pick<BuilderAttributes, "dataDivType" | "dataType">;
|
|
39
|
+
HTML?: SectionAttributes;
|
|
40
|
+
CUSTOM?: any;
|
|
41
|
+
};
|
|
42
|
+
styles?: SectionStyleProperties;
|
|
43
|
+
grids?: CMSGridsContainer;
|
|
44
|
+
responsiveBehaviour: ResponsiveBehaviourTypes;
|
|
45
|
+
highestGrid?: number | any;
|
|
46
|
+
gtc?: CMSGridsContainer;
|
|
47
|
+
gtr?: CMSGridsContainer;
|
|
48
|
+
}
|
|
49
|
+
export interface CMSSectionInterface {
|
|
50
|
+
id?: string | number;
|
|
51
|
+
uniqueId?: string | number;
|
|
52
|
+
variations?: {
|
|
53
|
+
[key: string]: SectionVariationInterface;
|
|
54
|
+
};
|
|
55
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { CMSHTMLAttributes } from "../../../global/attributes";
|
|
2
|
+
import { AlignSelfValue, BoxSizingValue, GlobalTextAttributes, GridAreaValue, HeightValue, ImageBuilderAttributes, JustifySelfValue, MarginValue, MaxHeightValue, MaxWidthValue, MinHeightValue, MinWidthValue, PaddingValue } from "../../../global/types";
|
|
3
|
+
import { BuilderAttributes, CMSElementInterface } from "../common";
|
|
4
|
+
export interface TextStyleProperties {
|
|
5
|
+
minHeight?: MinHeightValue;
|
|
6
|
+
height?: HeightValue;
|
|
7
|
+
minWidth?: MinWidthValue;
|
|
8
|
+
maxWidth?: MaxWidthValue;
|
|
9
|
+
maxHeight?: MaxHeightValue;
|
|
10
|
+
gridArea?: GridAreaValue;
|
|
11
|
+
boxSizing?: BoxSizingValue;
|
|
12
|
+
padding?: PaddingValue;
|
|
13
|
+
marginLeft?: MarginValue;
|
|
14
|
+
marginTop?: MarginValue;
|
|
15
|
+
marginBottom?: MarginValue;
|
|
16
|
+
marginRight?: MarginValue;
|
|
17
|
+
justifySelf?: JustifySelfValue;
|
|
18
|
+
alignSelf?: AlignSelfValue;
|
|
19
|
+
}
|
|
20
|
+
export interface CMSTextInterface extends Omit<CMSElementInterface, "attributes"> {
|
|
21
|
+
attributes: {
|
|
22
|
+
HTML: Pick<CMSHTMLAttributes, GlobalTextAttributes>;
|
|
23
|
+
BUILDER: Pick<BuilderAttributes, ImageBuilderAttributes>;
|
|
24
|
+
CUSTOM: any;
|
|
25
|
+
};
|
|
26
|
+
styles: TextStyleProperties;
|
|
27
|
+
content: string;
|
|
28
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export declare enum CMSToolIdTypes {
|
|
2
|
+
playgroundWrapper = "playground_wrapper",
|
|
3
|
+
layers = "CMS Layers",
|
|
4
|
+
addGrid = "AddGrid",
|
|
5
|
+
toolTip = "custom-tooltip",
|
|
6
|
+
customCanvas = "custom-canvas",
|
|
7
|
+
pageId = "cms__template__editor",
|
|
8
|
+
pageWrapper = "page-wrapper",
|
|
9
|
+
iframeContainerDiv = "iframe-container-div",
|
|
10
|
+
iframePlaygroud = "iframe__playground",
|
|
11
|
+
sectionLayersOverlay = "section__layers__overlay",
|
|
12
|
+
gridLayersOverlay = "grid__layers__overlay",
|
|
13
|
+
iframeRoot = "cms-iframe-root",
|
|
14
|
+
addElementTools = "cms-add-element-tools",
|
|
15
|
+
elementPopertiesPopup = "cms-element-properties"
|
|
16
|
+
}
|
|
17
|
+
export declare enum CMSElementSelectors {
|
|
18
|
+
iframeSelector = "iframe[data-title='iframe__playground']",
|
|
19
|
+
templteEditiorSelector = "[data-page-id='cms__template__editor']",
|
|
20
|
+
gridSelector = "section[data-div-type='section'] > .wrapper > div[data-div-type='grid']",
|
|
21
|
+
sectionSelector = "section[data-div-type='section']",
|
|
22
|
+
layersParentSelector = "section[data-div-type='section'] [data-cms-tool='CMS Layers']",
|
|
23
|
+
layersGridSelector = "section[data-div-type='section'] [data-cms-tool='CMS Layers'] > div[data-layer-style-id]",
|
|
24
|
+
sectionLayersOverlay = "[data-div-type = 'section__layers__overlay']",
|
|
25
|
+
gridLayersOverlay = "[data-div-type='grid__layers__overlay']",
|
|
26
|
+
iframeRoot = "#cms-iframe-root",
|
|
27
|
+
playgroundScroll = "playground-srolltop"
|
|
28
|
+
}
|
|
29
|
+
export declare enum CMSToolAttributes {
|
|
30
|
+
id = "data-cms-tool",
|
|
31
|
+
state = "data-cms-state",
|
|
32
|
+
style = "data-style-id",
|
|
33
|
+
pageId = "data-page-id",
|
|
34
|
+
dataDivType = "data-div-type",
|
|
35
|
+
title = "data-title",
|
|
36
|
+
layerStyle = "data-layer-style-id",
|
|
37
|
+
elementClick = "data-has-clicked",
|
|
38
|
+
viewportVisible = "data-viewport-visible",
|
|
39
|
+
playgroundScroll = "data-playground-scroll",
|
|
40
|
+
viewportVisibleTop = "data-viewport-visible-top",
|
|
41
|
+
viewportVisibleRight = "data-viewport-visible-right",
|
|
42
|
+
viewportVisibleBottom = "data-viewport-visible-bottom",
|
|
43
|
+
viewportVisibleLeft = "data-viewport-visible-left"
|
|
44
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import commonFunctions from "./utilities/global";
|
|
2
|
+
import * as interfaces from "./interfaces/global";
|
|
3
|
+
import * as enums from "./enums/index";
|
|
4
|
+
import * as sectionSchema from "./elements/section/index";
|
|
5
|
+
import * as gridSchema from "./elements/grid/index";
|
|
6
|
+
import * as cmsTypes from "../global/types";
|
|
7
|
+
import * as textSchema from "./elements/text-editor/index";
|
|
8
|
+
export { commonFunctions, interfaces, enums, sectionSchema, gridSchema, cmsTypes, textSchema };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import "./cms-tools";
|
|
2
|
+
export interface FontSizeValues {
|
|
3
|
+
px: number[];
|
|
4
|
+
rem: number[];
|
|
5
|
+
}
|
|
6
|
+
export interface DefaultFontSizes {
|
|
7
|
+
fontSize: FontSizeValues | any;
|
|
8
|
+
lineHeight: FontSizeValues | any;
|
|
9
|
+
}
|
|
10
|
+
export interface UtilsInterface {
|
|
11
|
+
defaultFontSizes: DefaultFontSizes;
|
|
12
|
+
}
|
|
13
|
+
export interface CSSUnitOption {
|
|
14
|
+
id: number;
|
|
15
|
+
label: string;
|
|
16
|
+
value: number;
|
|
17
|
+
}
|
|
18
|
+
export interface SizeInterface {
|
|
19
|
+
inline?: number | 0;
|
|
20
|
+
block?: number | 0;
|
|
21
|
+
}
|
|
22
|
+
export interface CMSInsetInterface {
|
|
23
|
+
top?: string | number;
|
|
24
|
+
right?: string | number;
|
|
25
|
+
bottom?: string | number;
|
|
26
|
+
left?: string | number;
|
|
27
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { CSSUnitOption } from "../interfaces/global";
|
|
2
|
+
export declare const CSSUnits: CSSUnitOption[];
|
|
3
|
+
export declare const stylesToString: (styles: any) => string;
|
|
4
|
+
export declare const loadNAppendStyleTag: (styleEle: any, id: string | number, parentEle?: null | any) => void;
|
|
5
|
+
declare const commonFunctions: any;
|
|
6
|
+
export default commonFunctions;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare function convertCamelCaseToCssProperties(inputString: string): string;
|
|
2
|
+
export declare function getCSSVariable(cssProperty: string): string;
|
|
3
|
+
declare const cssFunctions: {
|
|
4
|
+
getCSSVariable: typeof getCSSVariable;
|
|
5
|
+
convertCamelCaseToCssProperties: typeof convertCamelCaseToCssProperties;
|
|
6
|
+
};
|
|
7
|
+
export default cssFunctions;
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface CMSHTMLAttributes {
|
|
3
|
+
accept?: string;
|
|
4
|
+
acceptCharset?: string;
|
|
5
|
+
accessKey?: string;
|
|
6
|
+
action?: string;
|
|
7
|
+
allowFullScreen?: boolean;
|
|
8
|
+
allowTransparency?: boolean;
|
|
9
|
+
alt?: string;
|
|
10
|
+
async?: boolean;
|
|
11
|
+
autoComplete?: string;
|
|
12
|
+
autoFocus?: boolean;
|
|
13
|
+
autoPlay?: boolean;
|
|
14
|
+
capture?: boolean | string;
|
|
15
|
+
cellPadding?: number | string;
|
|
16
|
+
cellSpacing?: number | string;
|
|
17
|
+
charSet?: string;
|
|
18
|
+
challenge?: string;
|
|
19
|
+
checked?: boolean;
|
|
20
|
+
cite?: string;
|
|
21
|
+
classID?: string;
|
|
22
|
+
className?: string;
|
|
23
|
+
cols?: number;
|
|
24
|
+
colSpan?: number;
|
|
25
|
+
content?: string;
|
|
26
|
+
contentEditable?: boolean;
|
|
27
|
+
contextMenu?: string;
|
|
28
|
+
controls?: boolean;
|
|
29
|
+
coords?: string;
|
|
30
|
+
crossOrigin?: string;
|
|
31
|
+
data?: string;
|
|
32
|
+
dateTime?: string;
|
|
33
|
+
default?: boolean;
|
|
34
|
+
defer?: boolean;
|
|
35
|
+
dir?: string;
|
|
36
|
+
disabled?: boolean;
|
|
37
|
+
download?: any;
|
|
38
|
+
draggable?: boolean;
|
|
39
|
+
encType?: string;
|
|
40
|
+
form?: string;
|
|
41
|
+
formAction?: string;
|
|
42
|
+
formEncType?: string;
|
|
43
|
+
formMethod?: string;
|
|
44
|
+
formNoValidate?: boolean;
|
|
45
|
+
formTarget?: string;
|
|
46
|
+
frameBorder?: number | string;
|
|
47
|
+
headers?: string;
|
|
48
|
+
height?: number | string;
|
|
49
|
+
hidden?: boolean;
|
|
50
|
+
high?: number;
|
|
51
|
+
href?: string;
|
|
52
|
+
hrefLang?: string;
|
|
53
|
+
htmlFor?: string;
|
|
54
|
+
httpEquiv?: string;
|
|
55
|
+
icon?: string;
|
|
56
|
+
id?: string;
|
|
57
|
+
inputMode?: string;
|
|
58
|
+
integrity?: string;
|
|
59
|
+
is?: string;
|
|
60
|
+
keyParams?: string;
|
|
61
|
+
keyType?: string;
|
|
62
|
+
kind?: string;
|
|
63
|
+
label?: string;
|
|
64
|
+
lang?: string;
|
|
65
|
+
list?: string;
|
|
66
|
+
loop?: boolean;
|
|
67
|
+
low?: number;
|
|
68
|
+
manifest?: string;
|
|
69
|
+
marginHeight?: number;
|
|
70
|
+
marginWidth?: number;
|
|
71
|
+
max?: number | string;
|
|
72
|
+
maxLength?: number;
|
|
73
|
+
media?: string;
|
|
74
|
+
mediaGroup?: string;
|
|
75
|
+
method?: string;
|
|
76
|
+
min?: number | string;
|
|
77
|
+
minLength?: number;
|
|
78
|
+
multiple?: boolean;
|
|
79
|
+
muted?: boolean;
|
|
80
|
+
name?: string;
|
|
81
|
+
nonce?: string;
|
|
82
|
+
noValidate?: boolean;
|
|
83
|
+
open?: boolean;
|
|
84
|
+
optimum?: number;
|
|
85
|
+
pattern?: string;
|
|
86
|
+
placeholder?: string;
|
|
87
|
+
playsInline?: boolean;
|
|
88
|
+
poster?: string;
|
|
89
|
+
preload?: string;
|
|
90
|
+
readOnly?: boolean;
|
|
91
|
+
rel?: string;
|
|
92
|
+
required?: boolean;
|
|
93
|
+
reversed?: boolean;
|
|
94
|
+
rows?: number;
|
|
95
|
+
rowSpan?: number;
|
|
96
|
+
sandbox?: string;
|
|
97
|
+
scope?: string;
|
|
98
|
+
scoped?: boolean;
|
|
99
|
+
scrolling?: string;
|
|
100
|
+
seamless?: boolean;
|
|
101
|
+
selected?: boolean;
|
|
102
|
+
shape?: string;
|
|
103
|
+
size?: number;
|
|
104
|
+
sizes?: string;
|
|
105
|
+
span?: number;
|
|
106
|
+
spellCheck?: boolean;
|
|
107
|
+
src?: string;
|
|
108
|
+
srcDoc?: string;
|
|
109
|
+
srcLang?: string;
|
|
110
|
+
srcSet?: string;
|
|
111
|
+
start?: number;
|
|
112
|
+
step?: number | string;
|
|
113
|
+
style?: React.CSSProperties;
|
|
114
|
+
summary?: string;
|
|
115
|
+
tabIndex?: number;
|
|
116
|
+
target?: string;
|
|
117
|
+
title?: string;
|
|
118
|
+
type?: string;
|
|
119
|
+
useMap?: string;
|
|
120
|
+
value?: string | string[] | number;
|
|
121
|
+
width?: number | string;
|
|
122
|
+
wmode?: string;
|
|
123
|
+
wrap?: string;
|
|
124
|
+
[key: string]: any;
|
|
125
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { AlignItemsValue, AlignSelfValue, BackgroundRepeatValue, BackgroundSizeValue, CursorValue, DisplayValue, FlexDirectionValue, FlexWrapValue, FontWeightValue, JustifyContentValue, JustifySelfValue, MarginValue, OverflowValue, PositionValue, TextAlignValue, VisibilityValue } from "./types";
|
|
2
|
+
export interface CommonStyleProperties {
|
|
3
|
+
color?: string;
|
|
4
|
+
fontSize?: string;
|
|
5
|
+
fontWeight?: FontWeightValue;
|
|
6
|
+
lineHeight?: string | number;
|
|
7
|
+
fontFamily?: string;
|
|
8
|
+
textAlign?: TextAlignValue;
|
|
9
|
+
textDecoration?: string;
|
|
10
|
+
letterSpacing?: string;
|
|
11
|
+
backgroundColor?: string;
|
|
12
|
+
backgroundImage?: string;
|
|
13
|
+
backgroundSize?: BackgroundSizeValue;
|
|
14
|
+
backgroundRepeat?: BackgroundRepeatValue;
|
|
15
|
+
backgroundPosition?: string;
|
|
16
|
+
display?: DisplayValue;
|
|
17
|
+
width?: string | number;
|
|
18
|
+
height?: string | number;
|
|
19
|
+
margin?: string | number;
|
|
20
|
+
padding?: string | number;
|
|
21
|
+
border?: string;
|
|
22
|
+
borderRadius?: string | number;
|
|
23
|
+
overflow?: OverflowValue;
|
|
24
|
+
marginLeft?: MarginValue;
|
|
25
|
+
marginTop?: MarginValue;
|
|
26
|
+
marginBottom?: MarginValue;
|
|
27
|
+
marginRight?: MarginValue;
|
|
28
|
+
flexDirection?: FlexDirectionValue;
|
|
29
|
+
justifyContent?: JustifyContentValue;
|
|
30
|
+
alignItems?: AlignItemsValue;
|
|
31
|
+
flexWrap?: FlexWrapValue;
|
|
32
|
+
flex?: string | number;
|
|
33
|
+
justifySelf?: JustifySelfValue;
|
|
34
|
+
alignSelf?: AlignSelfValue;
|
|
35
|
+
position?: PositionValue;
|
|
36
|
+
top?: string | number;
|
|
37
|
+
right?: string | number;
|
|
38
|
+
bottom?: string | number;
|
|
39
|
+
left?: string | number;
|
|
40
|
+
zIndex?: number;
|
|
41
|
+
opacity?: number;
|
|
42
|
+
boxShadow?: string;
|
|
43
|
+
cursor?: CursorValue;
|
|
44
|
+
transition?: string;
|
|
45
|
+
transform?: string;
|
|
46
|
+
visibility?: VisibilityValue;
|
|
47
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export type AlignItemsValue = "flex-start" | "flex-end" | "center" | "baseline" | "stretch" | "start" | "end" | string;
|
|
2
|
+
export type AlignSelfValue = "auto" | "flex-start" | "flex-end" | "center" | "baseline" | "stretch" | "start" | "end" | string;
|
|
3
|
+
export type BackgroundRepeatValue = "repeat" | "repeat-x" | "repeat-y" | "no-repeat" | "space" | "round" | string;
|
|
4
|
+
export type BackgroundSizeValue = "auto" | "cover" | "contain" | string;
|
|
5
|
+
export type CursorValue = "auto" | "default" | "none" | "pointer" | "wait" | "text" | "move" | "help" | "progress" | "not-allowed" | "context-menu" | "cell" | "crosshair" | "alias" | "copy" | "grab" | "grabbing" | string;
|
|
6
|
+
export type DisplayValue = "block" | "inline" | "inline-block" | "flex" | "grid" | "none" | "list-item" | "run-in" | "table" | "table-caption" | "table-cell" | "table-column" | "table-column-group" | "table-footer-group" | "table-header-group" | "table-row" | "table-row-group" | string;
|
|
7
|
+
export type FlexDirectionValue = "row" | "row-reverse" | "column" | "column-reverse" | string;
|
|
8
|
+
export type FlexWrapValue = "nowrap" | "wrap" | "wrap-reverse" | string;
|
|
9
|
+
export type FontWeightValue = "normal" | "bold" | "bolder" | "lighter" | string;
|
|
10
|
+
export type JustifyContentValue = "flex-start" | "flex-end" | "center" | "space-between" | "space-around" | "space-evenly" | "start" | "end" | "left" | "right" | string;
|
|
11
|
+
export type JustifySelfValue = "auto" | "start" | "end" | "center" | "stretch" | "baseline" | string;
|
|
12
|
+
export type MarginValue = string | string;
|
|
13
|
+
export type OverflowValue = "visible" | "hidden" | "scroll" | "auto" | string;
|
|
14
|
+
export type PositionValue = "static" | "relative" | "absolute" | "fixed" | "sticky" | string;
|
|
15
|
+
export type TextAlignValue = "left" | "right" | "center" | "justify" | "start" | "end" | string;
|
|
16
|
+
export type VisibilityValue = "visible" | "hidden" | "collapse" | string;
|
|
17
|
+
export type MinHeightValue = string | number;
|
|
18
|
+
export type MinWidthValue = string | number;
|
|
19
|
+
export type HeightValue = string | number;
|
|
20
|
+
export type WidthValue = string | number;
|
|
21
|
+
export type MaxHeightValue = string | number;
|
|
22
|
+
export type MaxWidthValue = string | number;
|
|
23
|
+
export type GridAreaValue = string;
|
|
24
|
+
export type BoxSizingValue = "border-box" | "content-box" | string;
|
|
25
|
+
export type PaddingValue = string | number;
|
|
26
|
+
export type ResponsiveBehaviourTypes = "proportional-scaling" | "fixed-height" | "fit-to-screen" | string | number;
|
|
27
|
+
export type SizeTypeValue = "inline" | "block" | string;
|
|
28
|
+
export type GlobalImageAttributes = "src" | "alt" | "width" | "height" | "loading" | "crossOrigin" | "referrerPolicy";
|
|
29
|
+
export type GlobalTextAttributes = "lang" | "dir" | "title" | "aria-label" | "aria-hidden" | "aria-live" | "tabIndex" | "role";
|
|
30
|
+
export type ImageBuilderAttributes = "dataDivType" | "dataType" | "dataElementType" | "dataWidgetType";
|