@total_onion/onion-library 2.0.53 → 2.0.56

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.
@@ -1494,6 +1494,240 @@
1494
1494
  "acfe_layout_col": "auto",
1495
1495
  "acfe_layout_allowed_col": false
1496
1496
  },
1497
+ "layout_68ee447ea887b": {
1498
+ "key": "layout_68ee447ea887b",
1499
+ "name": "product_colour",
1500
+ "label": "Colour",
1501
+ "display": "block",
1502
+ "sub_fields": [
1503
+ {
1504
+ "key": "field_68ee447ea887e",
1505
+ "label": "Grid Layout",
1506
+ "name": "",
1507
+ "aria-label": "",
1508
+ "type": "tab",
1509
+ "instructions": "",
1510
+ "required": 0,
1511
+ "conditional_logic": 0,
1512
+ "wrapper": {
1513
+ "width": "",
1514
+ "class": "",
1515
+ "id": ""
1516
+ },
1517
+ "wpml_cf_preferences": 3,
1518
+ "placement": "top",
1519
+ "endpoint": 0,
1520
+ "no_preference": 0,
1521
+ "selected": 0
1522
+ },
1523
+ {
1524
+ "key": "field_68ee447ea887f",
1525
+ "label": "Grid layout",
1526
+ "name": "grid_layout",
1527
+ "aria-label": "",
1528
+ "type": "clone",
1529
+ "instructions": "",
1530
+ "required": 0,
1531
+ "conditional_logic": 0,
1532
+ "wrapper": {
1533
+ "width": "",
1534
+ "class": "",
1535
+ "id": ""
1536
+ },
1537
+ "wpml_cf_preferences": 3,
1538
+ "clone": [
1539
+ "group_68822860bda9f"
1540
+ ],
1541
+ "display": "seamless",
1542
+ "layout": "block",
1543
+ "prefix_label": 0,
1544
+ "prefix_name": 0,
1545
+ "acfe_seamless_style": 0,
1546
+ "acfe_clone_modal": 0,
1547
+ "acfe_clone_modal_close": 0,
1548
+ "acfe_clone_modal_button": "",
1549
+ "acfe_clone_modal_size": "large"
1550
+ },
1551
+ {
1552
+ "key": "field_68ee447ea8880",
1553
+ "label": "Style",
1554
+ "name": "",
1555
+ "aria-label": "",
1556
+ "type": "tab",
1557
+ "instructions": "",
1558
+ "required": 0,
1559
+ "conditional_logic": 0,
1560
+ "wrapper": {
1561
+ "width": "",
1562
+ "class": "",
1563
+ "id": ""
1564
+ },
1565
+ "wpml_cf_preferences": 3,
1566
+ "placement": "top",
1567
+ "endpoint": 0,
1568
+ "no_preference": 0,
1569
+ "selected": 0
1570
+ },
1571
+ {
1572
+ "key": "field_68ee447ea8881",
1573
+ "label": "Text editor settings fields",
1574
+ "name": "text_editor_settings_fields",
1575
+ "aria-label": "",
1576
+ "type": "clone",
1577
+ "instructions": "",
1578
+ "required": 0,
1579
+ "conditional_logic": 0,
1580
+ "wrapper": {
1581
+ "width": "",
1582
+ "class": "",
1583
+ "id": ""
1584
+ },
1585
+ "wpml_cf_preferences": 3,
1586
+ "clone": [
1587
+ "group_687a4e2334e37"
1588
+ ],
1589
+ "display": "seamless",
1590
+ "layout": "block",
1591
+ "prefix_label": 0,
1592
+ "prefix_name": 0,
1593
+ "acfe_seamless_style": 0,
1594
+ "acfe_clone_modal": 0,
1595
+ "acfe_clone_modal_close": 0,
1596
+ "acfe_clone_modal_button": "",
1597
+ "acfe_clone_modal_size": "large"
1598
+ }
1599
+ ],
1600
+ "min": "",
1601
+ "max": "",
1602
+ "acfe_flexible_render_template": false,
1603
+ "acfe_flexible_render_style": false,
1604
+ "acfe_flexible_render_script": false,
1605
+ "acfe_flexible_thumbnail": false,
1606
+ "acfe_flexible_settings": false,
1607
+ "acfe_flexible_settings_size": "medium",
1608
+ "acfe_layout_locations": [],
1609
+ "acfe_flexible_modal_edit_size": false,
1610
+ "acfe_flexible_category": false,
1611
+ "acfe_layout_col": "auto",
1612
+ "acfe_layout_allowed_col": false
1613
+ },
1614
+ "layout_68ee4455a8874": {
1615
+ "key": "layout_68ee4455a8874",
1616
+ "name": "product_colour_label",
1617
+ "label": "Colour Label",
1618
+ "display": "block",
1619
+ "sub_fields": [
1620
+ {
1621
+ "key": "field_68ee4455a8877",
1622
+ "label": "Grid Layout",
1623
+ "name": "",
1624
+ "aria-label": "",
1625
+ "type": "tab",
1626
+ "instructions": "",
1627
+ "required": 0,
1628
+ "conditional_logic": 0,
1629
+ "wrapper": {
1630
+ "width": "",
1631
+ "class": "",
1632
+ "id": ""
1633
+ },
1634
+ "wpml_cf_preferences": 3,
1635
+ "placement": "top",
1636
+ "endpoint": 0,
1637
+ "no_preference": 0,
1638
+ "selected": 0
1639
+ },
1640
+ {
1641
+ "key": "field_68ee4455a8878",
1642
+ "label": "Grid layout",
1643
+ "name": "grid_layout",
1644
+ "aria-label": "",
1645
+ "type": "clone",
1646
+ "instructions": "",
1647
+ "required": 0,
1648
+ "conditional_logic": 0,
1649
+ "wrapper": {
1650
+ "width": "",
1651
+ "class": "",
1652
+ "id": ""
1653
+ },
1654
+ "wpml_cf_preferences": 3,
1655
+ "clone": [
1656
+ "group_68822860bda9f"
1657
+ ],
1658
+ "display": "seamless",
1659
+ "layout": "block",
1660
+ "prefix_label": 0,
1661
+ "prefix_name": 0,
1662
+ "acfe_seamless_style": 0,
1663
+ "acfe_clone_modal": 0,
1664
+ "acfe_clone_modal_close": 0,
1665
+ "acfe_clone_modal_button": "",
1666
+ "acfe_clone_modal_size": "large"
1667
+ },
1668
+ {
1669
+ "key": "field_68ee4455a8879",
1670
+ "label": "Style",
1671
+ "name": "",
1672
+ "aria-label": "",
1673
+ "type": "tab",
1674
+ "instructions": "",
1675
+ "required": 0,
1676
+ "conditional_logic": 0,
1677
+ "wrapper": {
1678
+ "width": "",
1679
+ "class": "",
1680
+ "id": ""
1681
+ },
1682
+ "wpml_cf_preferences": 3,
1683
+ "placement": "top",
1684
+ "endpoint": 0,
1685
+ "no_preference": 0,
1686
+ "selected": 0
1687
+ },
1688
+ {
1689
+ "key": "field_68ee4455a887a",
1690
+ "label": "Text editor settings fields",
1691
+ "name": "text_editor_settings_fields",
1692
+ "aria-label": "",
1693
+ "type": "clone",
1694
+ "instructions": "",
1695
+ "required": 0,
1696
+ "conditional_logic": 0,
1697
+ "wrapper": {
1698
+ "width": "",
1699
+ "class": "",
1700
+ "id": ""
1701
+ },
1702
+ "wpml_cf_preferences": 3,
1703
+ "clone": [
1704
+ "group_687a4e2334e37"
1705
+ ],
1706
+ "display": "seamless",
1707
+ "layout": "block",
1708
+ "prefix_label": 0,
1709
+ "prefix_name": 0,
1710
+ "acfe_seamless_style": 0,
1711
+ "acfe_clone_modal": 0,
1712
+ "acfe_clone_modal_close": 0,
1713
+ "acfe_clone_modal_button": "",
1714
+ "acfe_clone_modal_size": "large"
1715
+ }
1716
+ ],
1717
+ "min": "",
1718
+ "max": "",
1719
+ "acfe_flexible_render_template": false,
1720
+ "acfe_flexible_render_style": false,
1721
+ "acfe_flexible_render_script": false,
1722
+ "acfe_flexible_thumbnail": false,
1723
+ "acfe_flexible_settings": false,
1724
+ "acfe_flexible_settings_size": "medium",
1725
+ "acfe_layout_locations": [],
1726
+ "acfe_flexible_modal_edit_size": false,
1727
+ "acfe_flexible_category": false,
1728
+ "acfe_layout_col": "auto",
1729
+ "acfe_layout_allowed_col": false
1730
+ },
1497
1731
  "layout_6890c720b77bf": {
1498
1732
  "key": "layout_6890c720b77bf",
1499
1733
  "name": "product_nose",
@@ -2780,6 +3014,83 @@
2780
3014
  "acfe_flexible_category": false,
2781
3015
  "acfe_layout_col": "auto",
2782
3016
  "acfe_layout_allowed_col": false
3017
+ },
3018
+ "layout_68ee398b832a1": {
3019
+ "key": "layout_68ee398b832a1",
3020
+ "name": "product_image",
3021
+ "label": "Product Image",
3022
+ "display": "block",
3023
+ "sub_fields": [
3024
+ {
3025
+ "key": "field_68ee398b832a5",
3026
+ "label": "Grid layout",
3027
+ "name": "grid_layout",
3028
+ "aria-label": "",
3029
+ "type": "clone",
3030
+ "instructions": "",
3031
+ "required": 0,
3032
+ "conditional_logic": 0,
3033
+ "wrapper": {
3034
+ "width": "",
3035
+ "class": "",
3036
+ "id": ""
3037
+ },
3038
+ "wpml_cf_preferences": 3,
3039
+ "clone": [
3040
+ "group_68822860bda9f"
3041
+ ],
3042
+ "display": "seamless",
3043
+ "layout": "block",
3044
+ "prefix_label": 0,
3045
+ "prefix_name": 0,
3046
+ "acfe_seamless_style": 0,
3047
+ "acfe_clone_modal": 0,
3048
+ "acfe_clone_modal_close": 0,
3049
+ "acfe_clone_modal_button": "",
3050
+ "acfe_clone_modal_size": "large"
3051
+ },
3052
+ {
3053
+ "key": "field_68ee398b832a7",
3054
+ "label": "Product Image Settings Fields",
3055
+ "name": "product_image_settings_fields",
3056
+ "aria-label": "",
3057
+ "type": "clone",
3058
+ "instructions": "",
3059
+ "required": 0,
3060
+ "conditional_logic": 0,
3061
+ "wrapper": {
3062
+ "width": "",
3063
+ "class": "",
3064
+ "id": ""
3065
+ },
3066
+ "wpml_cf_preferences": 3,
3067
+ "clone": [
3068
+ "group_68ee392aa6a26"
3069
+ ],
3070
+ "display": "seamless",
3071
+ "layout": "block",
3072
+ "prefix_label": 0,
3073
+ "prefix_name": 0,
3074
+ "acfe_seamless_style": 0,
3075
+ "acfe_clone_modal": 0,
3076
+ "acfe_clone_modal_close": 0,
3077
+ "acfe_clone_modal_button": "",
3078
+ "acfe_clone_modal_size": "large"
3079
+ }
3080
+ ],
3081
+ "min": "",
3082
+ "max": "",
3083
+ "acfe_flexible_render_template": false,
3084
+ "acfe_flexible_render_style": false,
3085
+ "acfe_flexible_render_script": false,
3086
+ "acfe_flexible_thumbnail": false,
3087
+ "acfe_flexible_settings": false,
3088
+ "acfe_flexible_settings_size": "medium",
3089
+ "acfe_layout_locations": [],
3090
+ "acfe_flexible_modal_edit_size": false,
3091
+ "acfe_flexible_category": false,
3092
+ "acfe_layout_col": "auto",
3093
+ "acfe_layout_allowed_col": false
2783
3094
  }
2784
3095
  },
2785
3096
  "min": "",
@@ -3115,5 +3426,5 @@
3115
3426
  "acfe_display_title": "",
3116
3427
  "acfe_meta": "",
3117
3428
  "acfe_note": "",
3118
- "modified": 1757673908
3429
+ "modified": 1760445581
3119
3430
  }
@@ -0,0 +1,14 @@
1
+ {% set gridLayoutElement = include('components/grid-layout-element-v3.twig', { fields: field, block: block }, with_context = false) %}
2
+ {% set textEditorStyleVars = include('components/text-editor-settings-variables-v3.twig', { fields: field, block, blockClassName, is_preview }, with_context = false) %}
3
+ {% set textEditorContainerClasses = include('components/text-editor-settings-container-classes-v3.twig', { fields: field, block, blockClassName, is_preview }, with_context = false) %}
4
+ {% set textEditorElementClasses = include('components/text-editor-settings-element-classes-v3.twig', { fields: field, block, blockClassName, is_preview }, with_context = false) %}
5
+ {% set elementType = field.element_type|ru %}
6
+ <style>
7
+ .{{blockClassName}}__product-colour-label.{{block.id}}, .{{blockClassName}}__content-container.{{block.id}}{
8
+ {{textEditorStyleVars}}
9
+ {{gridLayoutElement}}
10
+ }
11
+ </style>
12
+ <div class="{{blockClassName}}__content-container {{textEditorContainerClasses}} {{blockClassName}}__info-item {{block.id}}">
13
+ <{{elementType|default('p')}} data-pattern-post-info="colour-label" class="{{blockClassName}}__product-colour-label {{textEditorElementClasses}} {{block.id}}">{{post.product_colour_label}}</{{elementType|default('p')}}>
14
+ </div>
@@ -0,0 +1,14 @@
1
+ {% set gridLayoutElement = include('components/grid-layout-element-v3.twig', { fields: field, block: block }, with_context = false) %}
2
+ {% set textEditorStyleVars = include('components/text-editor-settings-variables-v3.twig', { fields: field, block, blockClassName, is_preview }, with_context = false) %}
3
+ {% set textEditorContainerClasses = include('components/text-editor-settings-container-classes-v3.twig', { fields: field, block, blockClassName, is_preview }, with_context = false) %}
4
+ {% set textEditorElementClasses = include('components/text-editor-settings-element-classes-v3.twig', { fields: field, block, blockClassName, is_preview }, with_context = false) %}
5
+ {% set elementType = field.element_type|ru %}
6
+ <style>
7
+ .{{blockClassName}}__product-colour.{{block.id}}, .{{blockClassName}}__content-container.{{block.id}}{
8
+ {{textEditorStyleVars}}
9
+ {{gridLayoutElement}}
10
+ }
11
+ </style>
12
+ <div class="{{blockClassName}}__content-container {{textEditorContainerClasses}} {{blockClassName}}__info-item {{block.id}}">
13
+ <{{elementType|default('p')}} data-pattern-post-info="colour" class="{{blockClassName}}__product-colour {{textEditorElementClasses}} {{block.id}}">{{post.product_colour}}</{{elementType|default('p')}}>
14
+ </div>
@@ -0,0 +1,43 @@
1
+ {% set gridLayoutElement = include('components/grid-layout-element-v3.twig', { fields: field, block: block }, with_context = false) %}
2
+ {% set imageSelect = field.image_select|ru %}
3
+ {% if imageSelect == 'image_accent' %}
4
+ {% set positionVars = include('components/element-positioning.twig', {fields : field.post_image_positioning, block : block, blockClassName : imageClassname}, with_context = false) %}
5
+ {% endif %}
6
+ {% set imageWidthPercentMobile = '--post-image-width-mobile: ' ~ field.post_image_width ~ '%;' %}
7
+ {% set imageWidthPercentDesktop = '--post-image-width-desktop: ' ~ field.post_image_width ~ '%;' %}
8
+ {% if imageSelect == 'image_accent' %}
9
+ {% set imageWidthPercentMobile = '--post-image-width-mobile: calc(' ~ field.post_image_width_mobile_px ~ ' / var(--mobile-design-reference) * var(--screen-width-mobile));' %}
10
+ {% set imageWidthPercentDesktop = '--post-image-width-desktop: calc(' ~ field.post_image_width_desktop_px ~ ' / var(--desktop-design-reference) * var(--screen-width-desktop));' %}
11
+ {% endif %}
12
+ {% set imageAspectRatioDesktop = '--image-aspect-ratio-desktop:' ~ field.image_aspect_ratio_desktop ~ ';' %}
13
+ {% set imageAspectRatioPortrait = '--image-aspect-ratio-portrait:' ~ field.image_aspect_ratio_portrait ~ ';' %}
14
+ {% set imageAspectRatioMobile = '--image-aspect-ratio-mobile:' ~ field.image_aspect_ratio_mobile ~ ';' %}
15
+ {% set imageFitStyle = '--image-fit-style:' ~ (field.image_fit_style|ru|default('contain')) ~ ';' %}
16
+ {% set styleVars = imageWidthPercentDesktop ~ imageWidthPercentMobile ~ imageWidthPercentMobilePx ~ imageWidthPercentDesktopPx ~ imageAspectRatioDesktop ~ imageAspectRatioPortrait ~ imageAspectRatioMobile ~ imageFitStyle %}
17
+ <style>
18
+ .{{blockClassName}}__post-image-container.{{block.id}}{
19
+ {{styleVars}}
20
+ {{gridLayoutElement}}
21
+ {{positionVars}}
22
+ }
23
+ </style>
24
+ <a aria-label="{{post.title}}" href="{{post.link}}" data-pattern-post-info="link" data-image-select="{{ imageSelect }}" class="{{blockClassName}}__post-image-container {{blockClassName}}__info-item {{blockClassName}}__info-item--{{postType}} {{blockClassName}}__post-image-container--{{imageSelect|replace({'_':'-'})}} {{block.id}}">
25
+ {% set imageSizes = imageSizes|default('(min-width: 1440px) 50vw, (min-width: 768px) 50vw, (min-width: 500px) 50vw, 100vw') %}
26
+ {% set imageFields = [] %}
27
+ {% set imageFields = imageFields|merge({'enable_image' : true}) %}
28
+ {% set imageClassname = 'post-info-v3__post' %}
29
+ {% if attribute(post, 'post_' ~ imageSelect) %}
30
+ {% set imageFields = imageFields|merge({'image' : attribute(post, 'post_' ~ imageSelect)}) %}
31
+ {% elseif attribute(post, postType ~ '_' ~ imageSelect) %}
32
+ {% set imageFields = imageFields|merge({'image' : attribute(post, postType ~ '_' ~ imageSelect)}) %}
33
+ {% elseif attribute(post, 'post_image') %}
34
+ {% set imageFields = imageFields|merge({'image' : attribute(post, 'post_image')}) %}
35
+ {% endif %}
36
+
37
+ {{ include('components/single-image.twig', {
38
+ fields: imageFields,
39
+ block: block,
40
+ blockClassName: imageClassname,
41
+ imageSizes: imageSizes
42
+ }, with_context = false) }}
43
+ </a>
@@ -338,6 +338,48 @@
338
338
  "prepend": "",
339
339
  "append": ""
340
340
  },
341
+ {
342
+ "key": "field_68ee43315e14c",
343
+ "label": "Colour Label",
344
+ "name": "product_colour_label",
345
+ "aria-label": "",
346
+ "type": "text",
347
+ "instructions": "",
348
+ "required": 0,
349
+ "conditional_logic": 0,
350
+ "wrapper": {
351
+ "width": "50",
352
+ "class": "",
353
+ "id": ""
354
+ },
355
+ "wpml_cf_preferences": 2,
356
+ "default_value": "",
357
+ "maxlength": "",
358
+ "placeholder": "",
359
+ "prepend": "",
360
+ "append": ""
361
+ },
362
+ {
363
+ "key": "field_68ee433a5e14d",
364
+ "label": "Colour",
365
+ "name": "product_colour",
366
+ "aria-label": "",
367
+ "type": "text",
368
+ "instructions": "",
369
+ "required": 0,
370
+ "conditional_logic": 0,
371
+ "wrapper": {
372
+ "width": "50",
373
+ "class": "",
374
+ "id": ""
375
+ },
376
+ "wpml_cf_preferences": 2,
377
+ "default_value": "",
378
+ "maxlength": "",
379
+ "placeholder": "",
380
+ "prepend": "",
381
+ "append": ""
382
+ },
341
383
  {
342
384
  "key": "field_68c05157f7a4b",
343
385
  "label": "Palate Label",
@@ -593,5 +635,5 @@
593
635
  "acfe_display_title": "",
594
636
  "acfe_meta": "",
595
637
  "acfe_note": "",
596
- "modified": 1757606887
638
+ "modified": 1760445871
597
639
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@total_onion/onion-library",
3
- "version": "2.0.53",
3
+ "version": "2.0.56",
4
4
  "description": "Component library",
5
5
  "main": "index.js",
6
6
  "scripts": {