PluginProbe
Smart Post – Post Grid, Post Carousel, Post Slider Gutenberg Blocks for Blog & News / 4.0.4
Smart Post – Post Grid, Post Carousel, Post Slider Gutenberg Blocks for Blog & News v4.0.4
4.0.8 4.0.7 4.0.6 4.0.5 4.0.4 4.0.3 4.0.2 4.0.1 2.3.5 2.3.6 2.4.0 2.4.1 2.4.10 2.4.11 2.4.12 2.4.13 2.4.14 2.4.15 2.4.16 2.4.17 2.4.18 2.4.19 2.4.2 2.4.20 2.4.21 All 88 releases
post-carousel / src / controls / constants.js

constants.js in Smart Post – Post Grid, Post Carousel, Post Slider Gutenberg Blocks for Blog & News 4.0.4, at src/controls/constants.js

569 lines 15.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import { __ } from "@wordpress/i18n";
2 import { BgIcon, GradientIcon, Image, Video } from "../components/background/svgIcon";
3 import {
4 ArrowMinimal,
5 ArrowOutline,
6 ArrowSolid,
7 ChevronBold,
8 ChevronBorderLine,
9 ChevronOutline,
10 ChevronSolid,
11 DoubleChevron,
12 DoubleChevronOutline,
13 TriangleOutline,
14 } from "../icons/arrowIcons";
15 import {
16 BottomSpaceIcon,
17 GapHorizontalIcon,
18 GapVerticalIcon,
19 HorizontalAxisSpaceIcon,
20 LeftSpaceIcon,
21 LinkedIcon,
22 RadiusAllIcon,
23 RadiusBottomLeftIcon,
24 RadiusBottomRightIcon,
25 RadiusTopLeftIcon,
26 RadiusTopRightIcon,
27 RightSpaceIcon,
28 TopSpaceIcon,
29 VerticalAxisSpaceIcon,
30 } from "../icons/icons";
31
32 export const availableLargeContent = [
33 "grid-one-layout-six",
34 "grid-one-layout-six-updated",
35 "grid-one-layout-seven",
36 "grid-one-layout-eight",
37 "grid-one-layout-nine",
38 ];
39
40 export const skipItemsForGridTopSection = {
41 "grid-one-layout-one": 0,
42 "grid-one-layout-three": 2,
43 "grid-one-layout-four": 2,
44 "grid-one-layout-five": 0,
45 "grid-one-layout-six": 3,
46 "grid-one-layout-six-updated": 5,
47 "grid-one-layout-seven": 5,
48 "grid-one-layout-eight": 4,
49 "grid-one-layout-nine": 4,
50 };
51
52 export const largeItemPosition = {
53 "grid-one-layout-six": { left: 0, right: 2 },
54 "grid-one-layout-six-updated": { left: 0, right: 4 },
55 "grid-one-layout-seven": { left: 0, right: 3 },
56 "grid-one-layout-eight": { left: 0, right: 1 },
57 "grid-one-layout-nine": { left: 0, right: 2 },
58 };
59
60 export const openLinksOptions = [
61 {
62 label: "Select Details Page Link Type",
63 value: "",
64 disabled: "disabled",
65 },
66 { label: "Current Tab", value: "current-tab" },
67 { label: "New Tab", value: "new-tab" },
68 { label: "Single Popup (Pro)", value: "single-popup", disabled: "disabled"},
69 { label: "Multi Popup (Pro)", value: "multi-popup", disabled: "disabled" },
70 ];
71
72 export const orderByOptions = [
73 { label: "None", value: "all", type: "order_by" },
74 { label: "ID", value: "id", type: "order_by" },
75 { label: "Title", value: "title", type: "order_by" },
76 { label: "Published Date", value: "date", type: "order_by" },
77 { label: "Modified Date", value: "modified", type: "order_by" },
78 {
79 label: "Post In (Drag & Drop) Date",
80 value: "post__in",
81 type: "order_by",
82 },
83 { label: "Post Slug", value: "name", type: "order_by" },
84 { label: "Post Type", value: "post_type", type: "order_by" },
85 { label: "Random", value: "rand", type: "order_by" },
86 { label: "Comment Count", value: "comment_count", type: "order_by" },
87 { label: "Menu Order", value: "menu_order", type: "order_by" },
88 { label: "Author", value: "author", type: "order_by" },
89 { label: "Most Liked (Pro)", value: "most_liked", type: "order_by", disabled: "disabled" },
90 { label: "Most Viewed (Pro)", value: "most_viewed", type: "order_by", disabled: "disabled" },
91 ];
92
93 export const orderDirectionOptions = [
94 { label: "Default", value: "all", type: "order" },
95 { label: "Ascending", value: "ASC", type: "order" },
96 { label: "Descending", value: "DESC", type: "order" },
97 ];
98
99 export const tagNameObj = {
100 button: {
101 parent: "div",
102 child: "button",
103 },
104 radio: {
105 parent: "div",
106 child: "radio",
107 },
108 dropdown: {
109 parent: "div",
110 child: "div",
111 },
112 };
113
114 export const skipItemsForGridThreeTopSection = {
115 "grid-three-layout-one": 2,
116 "grid-three-layout-two": 2,
117 "grid-three-layout-three": 1,
118 "grid-three-layout-four": 0,
119 "grid-three-layout-five": 3,
120 };
121
122 export const skipItemsForGridFourTopSection = {
123 "grid-four-layout-one": 5,
124 "grid-four-layout-two": 5,
125 "grid-four-layout-three": 5,
126 "grid-four-layout-four": 4,
127 "grid-four-layout-five": 4,
128 "grid-four-layout-six": 3,
129 };
130
131 export const gridFourLargeItemPosition = {
132 "grid-four-layout-one": 1,
133 "grid-four-layout-two": 0,
134 "grid-four-layout-three": 2,
135 "grid-four-layout-four": 0,
136 "grid-four-layout-five": 0,
137 "grid-four-layout-six": 0,
138 };
139
140 export const gradientOverlayColor = {
141 "warm-sunset": "linear-gradient(2deg, rgba(244, 66, 70, 0.40) 33.02%, rgba(221, 36, 118, 0.40) 98.51%)",
142 "ocean-breeze": "linear-gradient(1deg, rgba(43, 88, 118, 0.40) 0.5%, rgba(78, 67, 118, 0.40) 99.51%)",
143 "royal-gold": "linear-gradient(1deg, rgba(255, 215, 0, 0.40) 0.5%, rgba(184, 134, 11, 0.40) 99.51%)",
144 "cool-blues": "linear-gradient(1deg, rgba(30, 60, 114, 0.40) 0.5%, rgba(42, 82, 152, 0.40) 99.51%)",
145 "soft-pastel": "linear-gradient(1deg, rgba(252, 227, 138, 0.40) 0.5%, rgba(243, 129, 129, 0.40) 99.51%)",
146 "elegant-purple": "linear-gradient(180deg, rgba(65, 41, 90, 0.40) 0%, rgba(47, 7, 67, 0.40) 100%)",
147 "energetic-orange": "linear-gradient(180deg, rgba(255, 81, 47, 0.40) 0%, rgba(240, 152, 25, 0.40) 100%)",
148 };
149
150 export const boxShadowDefault = [
151 { label: "XS — Subtle (1dp)", value: "xs—subtle-1dp" },
152 { label: "S — Light (2dp)", value: "s-light-2dp" },
153 { label: "M — Medium (4dp)", value: "m-medium-4dp" },
154 { label: "L — Strong (8dp)", value: "l-strong-8dp" },
155 { label: "XL — Deep (12dp)", value: "xl-deep-12dp" },
156 { label: "Card Shadow — 4dp", value: "card-shadow-4dp" },
157 { label: "Card Shadow — 8dp", value: "card-shadow-8dp" },
158 { label: "Button Shadow — 1dp", value: "button-shadow-1dp" },
159 { label: "Button Shadow — 2dp", value: "button-shadow-2dp" },
160 { label: "Button Shadow — 4dp", value: "button-shadow-4dp" },
161 { label: "Custom", value: "custom" },
162 ];
163
164 export const boxShadowDefaultValueAttr = {
165 "xs—subtle-1dp": {
166 top: 0,
167 right: 1,
168 bottom: 2,
169 left: 0,
170 color: " rgba(0, 0, 0, 0.12)",
171 },
172 "s-light-2dp": {
173 top: 0,
174 right: 2,
175 bottom: 4,
176 left: 0,
177 color: "rgba(0, 0, 0, 0.14)",
178 },
179 "m-medium-4dp": {
180 top: 0,
181 right: 4,
182 bottom: 6,
183 left: 0,
184 color: "rgba(0, 0, 0, 0.16)",
185 },
186 "l-strong-8dp": {
187 top: 0,
188 right: 8,
189 bottom: 10,
190 left: 0,
191 color: "rgba(0, 0, 0, 0.18)",
192 },
193 "xl-deep-12dp": {
194 top: 0,
195 right: 12,
196 bottom: 17,
197 left: 0,
198 color: "rgba(0, 0, 0, 0.20)",
199 },
200 "card-shadow-4dp": {
201 top: 0,
202 right: 4,
203 bottom: 6,
204 left: 0,
205 color: "rgba(0, 0, 0, 0.16)",
206 },
207 "card-shadow-8dp": {
208 top: 0,
209 right: 8,
210 bottom: 10,
211 left: 0,
212 color: "rgba(0, 0, 0, 0.18)",
213 },
214 "button-shadow-1dp": {
215 top: 0,
216 right: 1,
217 bottom: 2,
218 left: 0,
219 color: "rgba(0, 0, 0, 0.12)",
220 },
221 "button-shadow-2dp": {
222 top: 0,
223 right: 2,
224 bottom: 4,
225 left: 0,
226 color: "rgba(0, 0, 0, 0.14)",
227 },
228 "button-shadow-4dp": {
229 top: 0,
230 right: 4,
231 bottom: 6,
232 left: 0,
233 color: "rgba(0, 0, 0, 0.16)",
234 },
235 };
236
237 export const paginationDotsStyle = {
238 dots: { width: 12, height: 12 },
239 dynamic: { width: 12, height: 12 },
240 strokes: { width: 12, height: 12 },
241 scrollbar: { width: "", height: 8 },
242 fraction: { width: 36, height: 12 },
243 numbers: { width: 24, height: 24 },
244 };
245
246 export const imageBlandMode = [
247 {
248 label: __("No Bland", "post-carousel"),
249 value: "normal",
250 },
251 {
252 label: __("Multiply", "post-carousel"),
253 value: "multiply",
254 },
255 {
256 label: __("Screen", "post-carousel"),
257 value: "screen",
258 },
259 {
260 label: __("Overlay", "post-carousel"),
261 value: "overlay",
262 },
263 {
264 label: __("Darken", "post-carousel"),
265 value: "darken",
266 },
267 {
268 label: __("Lighten", "post-carousel"),
269 value: "lighten",
270 },
271 {
272 label: __("Color Dodge", "post-carousel"),
273 value: "color-dodge",
274 },
275 {
276 label: __("Saturation", "post-carousel"),
277 value: "saturation",
278 },
279 {
280 label: __("Color", "post-carousel"),
281 value: "color",
282 },
283 {
284 label: __("Luminosity", "post-carousel"),
285 value: "luminosity",
286 },
287 {
288 label: __("Difference", "post-carousel"),
289 value: "difference",
290 },
291 {
292 label: __("Exclusion", "post-carousel"),
293 value: "exclusion",
294 },
295 {
296 label: __("Hue", "post-carousel"),
297 value: "hue",
298 },
299 ];
300
301 export const overlayTypeItems = [
302 {
303 label: __("No Overlay", "post-carousel"),
304 value: "no-overlay",
305 },
306 {
307 label: __("Solid", "post-carousel"),
308 value: "solid-overlay",
309 },
310 {
311 label: __("Gradient", "post-carousel"),
312 value: "gradient-overlay",
313 },
314 ];
315 export const allBgType = [
316 {
317 label: <BgIcon />,
318 value: "bgColor",
319 tooltip: "Solid",
320 },
321 {
322 label: <GradientIcon />,
323 value: "gradient",
324 tooltip: "Gradient",
325 },
326 {
327 label: <Image />,
328 value: "image",
329 tooltip: "Image",
330 },
331 {
332 label: <Video />,
333 value: "video",
334 tooltip: "Video",
335 },
336 ];
337 export const excludeVideoBgType = [
338 {
339 label: <BgIcon />,
340 value: "bgColor",
341 tooltip: "Solid",
342 },
343 {
344 label: <GradientIcon />,
345 value: "gradient",
346 tooltip: "Gradient",
347 },
348 {
349 label: <Image />,
350 value: "image",
351 tooltip: "Image",
352 },
353 ];
354 export const solidGradientBgType = [
355 {
356 label: <BgIcon />,
357 value: "bgColor",
358 tooltip: "Solid",
359 },
360 {
361 label: <GradientIcon />,
362 value: "gradient",
363 tooltip: "Gradient",
364 },
365 ];
366
367 export const arrowIcons = {
368 "chevron-solid": ChevronSolid,
369 "chevron-outline": ChevronOutline,
370 "chevron-bold": ChevronBold,
371 "double-chevron": DoubleChevron,
372 "arrow-solid": ArrowSolid,
373 "arrow-outline": ArrowOutline,
374 "arrow-minimal": ArrowMinimal,
375 "chevron-border-line": ChevronBorderLine,
376 "double-chevron-outline": DoubleChevronOutline,
377 "triangle-outline": TriangleOutline,
378 };
379
380 export const blockPreviewPanelLink = {
381 "post-carousel": "https://wpsmartpost.com/blocks/#demoId3514",
382 "post-carousel-two": "https://wpsmartpost.com/blocks/#demoId3516",
383 "news-ticker": "https://wpsmartpost.com/blocks/#demoId3568",
384 "post-slider": "https://wpsmartpost.com/blocks/#demoId3490",
385 "post-slider-two": "https://wpsmartpost.com/blocks/#demoId3493",
386 "post-thumbnail-slider": "https://wpsmartpost.com/blocks/#demoId3570",
387 "thumbnail-slider-two": "https://wpsmartpost.com/blocks/#demoId3572",
388 "post-grid-one": "https://wpsmartpost.com/blocks/#demoId3497",
389 "post-grid-two": "https://wpsmartpost.com/blocks/#demoId3504",
390 "post-grid-three": "https://wpsmartpost.com/blocks/#demoId3505",
391 "post-grid-four": "https://wpsmartpost.com/blocks/#demoId3506",
392 "post-grid-five": "https://wpsmartpost.com/blocks/#demoId3507",
393 "post-grid-six": "https://wpsmartpost.com/blocks/#demoId3508",
394 "post-list-one": "https://wpsmartpost.com/blocks/#demoId3509",
395 "post-list-two": "https://wpsmartpost.com/blocks/#demoId3511",
396 "post-list-three": "https://wpsmartpost.com/blocks/#demoId3520",
397 "post-timeline-one": "https://wpsmartpost.com/blocks/#demoId3522",
398 "post-timeline-two": "https://wpsmartpost.com/blocks/#demoId3524",
399 "post-timeline-three": "https://wpsmartpost.com/blocks/#demoId3526",
400 "social-profiles": "https://wpsmartpost.com/blocks/#demoId3528",
401 buttons: "https://wpsmartpost.com/blocks/#demoId3588",
402 button: "https://wpsmartpost.com/blocks/#demoId3588",
403 taxonomy: "https://wpsmartpost.com/blocks/#demoId3604",
404 "section-heading": "https://wpsmartpost.com/blocks/#demoId3586",
405 "smart-info-box": "https://wpsmartpost.com/blocks/#demoId3590",
406 "table-of-content": "https://wpsmartpost.com/blocks/#demoId3602",
407 "smart-image": "https://wpsmartpost.com/blocks/#demoId3584",
408 "smart-search": "https://wpsmartpost.com/blocks/#demoId3596",
409 "smart-lists": "https://wpsmartpost.com/blocks/#demoId3592",
410 // container: "https://wpsmartpost.com/blocks/#demoId3580", // currently turn off as recommendation.
411 };
412
413 export const blockDocLink = {
414 "post-carousel": "https://wpsmartpost.com/docs/post-carousel-slider-blocks/post-carousel-01/",
415 "post-carousel-two": "https://wpsmartpost.com/docs/post-carousel-slider-blocks/post-carousel-02/",
416 "news-ticker": "https://wpsmartpost.com/docs/post-carousel-slider-blocks/news-ticker/",
417 "post-slider": "https://wpsmartpost.com/docs/post-carousel-slider-blocks/post-slider-01/",
418 "post-slider-two": "https://wpsmartpost.com/docs/post-carousel-slider-blocks/post-slider-02/",
419 "post-thumbnail-slider": "https://wpsmartpost.com/docs/post-carousel-slider-blocks/thumbnails-slider-01/",
420 "thumbnail-slider-two": "https://wpsmartpost.com/docs/post-carousel-slider-blocks/thumbnails-slider-02/",
421 "post-grid-one": "https://wpsmartpost.com/docs/post-grid-blocks/post-grid-01/",
422 "post-grid-two": "https://wpsmartpost.com/docs/post-grid-blocks/post-grid-02/",
423 "post-grid-three": "https://wpsmartpost.com/docs/post-grid-blocks/post-grid-03/",
424 "post-grid-four": "https://wpsmartpost.com/docs/post-grid-blocks/post-grid-04/",
425 "post-grid-five": "https://wpsmartpost.com/docs/post-grid-blocks/post-grid-05/",
426 "post-grid-six": "https://wpsmartpost.com/docs/post-grid-blocks/post-grid-06/",
427 "post-list-one": "https://wpsmartpost.com/docs/post-list-blocks/post-list-01/",
428 "post-list-two": "https://wpsmartpost.com/docs/post-list-blocks/post-list-02/",
429 "post-list-three": "https://wpsmartpost.com/docs/post-list-blocks/post-list-03/",
430 "post-timeline-one": "https://wpsmartpost.com/docs/post-timeline-blocks/post-timeline-01/",
431 "post-timeline-two": "https://wpsmartpost.com/docs/post-timeline-blocks/post-timeline-02/",
432 "post-timeline-three": "https://wpsmartpost.com/docs/post-timeline-blocks/post-timeline-03/",
433 "social-profiles": "https://wpsmartpost.com/docs/social-profiles/",
434 "social-profile-item": "https://wpsmartpost.com/docs/social-profiles/",
435 buttons: "https://wpsmartpost.com/docs/smart-button/",
436 button: "https://wpsmartpost.com/docs/smart-button/",
437 taxonomy: "https://wpsmartpost.com/docs/taxonomy/",
438 container: "https://wpsmartpost.com/docs/container/",
439 column: "https://wpsmartpost.com/docs/container/",
440 "section-heading": "https://wpsmartpost.com/docs/section-heading/",
441 "live-filter": "https://wpsmartpost.com/docs/smart-frontend-filter/",
442 pagination: "https://wpsmartpost.com/docs/smart-pagination/",
443 "smart-image": "https://wpsmartpost.com/docs/smart-image/",
444 "smart-info-box": "https://wpsmartpost.com/docs/smart-info-box/",
445 "table-of-content": "https://wpsmartpost.com/docs/table-of-contents-toc/",
446 "smart-search": "https://wpsmartpost.com/docs/smart-search/",
447 "smart-lists": "https://wpsmartpost.com/docs/smart-list/",
448 };
449 export const sideAxisIcons = {
450 horizontal: <HorizontalAxisSpaceIcon />,
451 vertical: <VerticalAxisSpaceIcon />,
452 top: <TopSpaceIcon />,
453 right: <RightSpaceIcon />,
454 bottom: <BottomSpaceIcon />,
455 left: <LeftSpaceIcon />,
456 all: <LinkedIcon />,
457 "radius-top": <RadiusTopLeftIcon />,
458 "radius-right": <RadiusTopRightIcon />,
459 "radius-bottom": <RadiusBottomRightIcon />,
460 "radius-left": <RadiusBottomLeftIcon />,
461 "radius-all": <RadiusAllIcon />,
462 "gap-horizontal": <GapHorizontalIcon />,
463 "gap-vertical": <GapVerticalIcon />,
464 };
465 export const shadowTypes = [
466 {
467 id: "xs-subtle-1dp",
468 name: "Subtle (1dp)",
469 style: { boxShadow: "0 1px 2px 0 rgba(0, 0, 0, 0.12)" },
470 },
471 {
472 id: "s-light-2dp",
473 name: "Light (2dp)",
474 style: { boxShadow: "0 2px 4px 0 rgba(0, 0, 0, 0.14)" },
475 },
476 {
477 id: "m-medium-4dp",
478 name: "Medium (4dp)",
479 style: {
480 boxShadow: "0 4px 6px 0 rgba(0, 0, 0, 0.16)",
481 },
482 },
483 {
484 id: "l-strong-8dp",
485 name: "Strong (8dp)",
486 style: {
487 boxShadow: "0 8px 10px 0 rgba(0, 0, 0, 0.18)",
488 },
489 },
490 {
491 id: "xl-deep-12dp",
492 name: "Deep (12dp)",
493 style: {
494 boxShadow: "0 12px 17px 0 rgba(0, 0, 0, 0.20)",
495 },
496 },
497 {
498 id: "2xl",
499 name: "SHARP (4dp)",
500 style: { boxShadow: "6px 6px 0 0 rgba(0, 0, 0, 0.25)" },
501 },
502 ];
503 export const boxShadowDefaultValue = {
504 "xs-subtle-1dp": {
505 top: 0,
506 right: 1,
507 bottom: 2,
508 left: 0,
509 color: "rgba(0, 0, 0, 0.12)",
510 },
511 "s-light-2dp": {
512 top: 0,
513 right: 2,
514 bottom: 4,
515 left: 0,
516 color: "rgba(0, 0, 0, 0.14)",
517 },
518 "m-medium-4dp": {
519 top: 0,
520 right: 4,
521 bottom: 6,
522 left: 0,
523 color: "rgba(0, 0, 0, 0.16)",
524 },
525 "l-strong-8dp": {
526 top: 0,
527 right: 8,
528 bottom: 10,
529 left: 0,
530 color: "rgba(0, 0, 0, 0.18)",
531 },
532 "xl-deep-12dp": {
533 top: 0,
534 right: 12,
535 bottom: 17,
536 left: 0,
537 color: "rgba(0, 0, 0, 0.20)",
538 },
539 "2xl": {
540 top: 6,
541 right: 6,
542 bottom: 0,
543 left: 0,
544 color: "rgba(0, 0, 0, 0.25)",
545 },
546 };
547
548 export const WEBSITE_BUILDER_BLOCKS = [
549 "archive-title",
550 "post-title",
551 "post-featured-image",
552 "post-content",
553 "post-excerpt",
554 "post-meta",
555 "post-category",
556 "smart-post-tag",
557 "post-author-meta",
558 "post-reading-time",
559 "post-like-count",
560 "post-view-count",
561 "post-next-previous",
562 "post-comment-count",
563 "post-author-box",
564 "post-date-meta",
565 "post-breadcrumbs",
566 "post-social-share",
567 "post-comment",
568 ];
569