-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathww-config.js
186 lines (186 loc) · 6.37 KB
/
ww-config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
export default {
editor: {
label: {
en: "Modal",
},
excludedSections: ["sizing", "spacing", "positioning", "background", "styling", "advanced-style", "customCss"],
},
triggerEvents: [{ name: "backdropClick", label: { en: "On backdrop click" } }],
options: {
forceHydration: true,
},
properties: {
display: {
type: "OnOff",
label: {
en: "Display",
fr: "Afficher",
},
bindable: true,
responsive: true,
defaultValue: true,
},
displayInEditor: {
type: "OnOff",
label: {
en: "Force display in editor",
fr: "Forcer l'affichage dans l'éditeur",
},
editorOnly: true,
hidden: (content, sidepanelContent, boundProps) => !boundProps.display,
defaultValue: false,
},
animation: {
type: "TextSelect",
label: {
en: "Animation",
fr: "Animation",
},
options: {
options: [
{ value: "fade", label: { en: "Fade", fr: "Fondu" } },
{ value: "fromTop", label: { en: "Appears from top", fr: "Apparait par le haut" } },
{ value: "fromRight", label: { en: "Appears from right", fr: "Apparait par la droite" } },
{ value: "fromLeft", label: { en: "Appears from left", fr: "Apparait par la gauche" } },
{ value: "fromBottom", label: { en: "Appears from bottom", fr: "Apparait par le bas" } },
{ value: "zoomIn", label: { en: "Zoom in", fr: "Zoom arrière" } },
{ value: "zoomOut", label: { en: "Zoom out", fr: "Zoom avant" } },
],
},
responsive: true,
states: true,
classes: true,
defaultValue: "fade",
},
position: {
type: "TextSelect",
label: {
en: "Position",
fr: "Position",
},
options: {
options: [
{ value: "topLeft", label: { en: "On top left", fr: "En haut à gauche" } },
{ value: "topMiddle", label: { en: "On top middle", fr: "En haut au milieu" } },
{ value: "topRight", label: { en: "On top right", fr: "En haut à droite" } },
{ value: "middleLeft", label: { en: "On middle left", fr: "Au milieu à gauche" } },
{ value: "middle", label: { en: "On middle", fr: "Au milieu" } },
{ value: "middleRight", label: { en: "On middle right", fr: "Au milieu à droite" } },
{ value: "bottomLeft", label: { en: "On bottom left", fr: "En bas à gauche" } },
{ value: "bottomMiddle", label: { en: "On bottom middle", fr: "En bas au milieu" } },
{ value: "bottomRight", label: { en: "On bottom right", fr: "En bas à droite" } },
{ value: "custom", label: { en: "Custom", fr: "Personnalisé" } },
],
},
defaultValue: "middle",
responsive: true,
states: true,
classes: true,
bindable: true,
},
positionLeft: {
hidden: (content) => content.position !== "custom",
label: {
en: "Horizontal",
fr: "Horizontal",
},
type: "Length",
options: {
unitChoices: [
{ value: "%", label: "%", min: 0, max: 100 },
{ value: "px", label: "px", min: 0, max: 1000 },
],
},
defaultValue: "0%",
responsive: true,
bindable: true,
states: true,
classes: true,
},
positionTop: {
hidden: (content) => content.position !== "custom",
label: {
en: "Vertical",
fr: "Vertical",
},
type: "Length",
options: {
unitChoices: [
{ value: "%", label: "%", min: 0, max: 100 },
{ value: "px", label: "px", min: 0, max: 1000 },
],
},
defaultValue: "0%",
responsive: true,
bindable: true,
states: true,
classes: true,
},
zIndex: {
label: {
en: "Z axis",
},
type: "Number",
options: {
min: 0,
max: 100,
},
responsive: true,
bindable: true,
states: true,
classes: true,
bindingValidation: {
markdown: "z-index",
type: "string",
cssSupports: "z-index",
},
},
backdrop: {
type: "OnOff",
label: {
en: "Backdrop",
fr: "Fond",
},
bindable: true,
defaultValue: true,
responsive: true,
states: true,
classes: true,
},
backdropColor: {
type: "Color",
label: {
en: "Backdrop color",
fr: "Couleur du fond",
},
bindable: true,
defaultValue: undefined,
responsive: true,
states: true,
classes: true,
hidden: (content) => !content.backdrop,
},
transition: {
type: "Transitions",
label: {
en: "Transition",
fr: "Transition",
},
options: {
enforcedTransitionProperty: "all",
},
bindable: true,
defaultValue: "all .3s ease",
responsive: true,
classes: true,
},
modalContent: {
defaultValue: [
{
isWwObject: true,
type: "ww-flexbox",
},
],
},
},
};