@total_onion/onion-library 1.0.47 → 1.0.49

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.
@@ -0,0 +1,185 @@
1
+ {
2
+ "key": "group_687e00b45e9a3",
3
+ "title": "Block: Nav Menu Container v3",
4
+ "fields": [
5
+ {
6
+ "key": "field_687e00b466407",
7
+ "label": "Nav Menu",
8
+ "name": "",
9
+ "aria-label": "",
10
+ "type": "tab",
11
+ "instructions": "",
12
+ "required": 0,
13
+ "conditional_logic": 0,
14
+ "wrapper": {
15
+ "width": "",
16
+ "class": "",
17
+ "id": ""
18
+ },
19
+ "wpml_cf_preferences": 3,
20
+ "user_roles": [
21
+ "all"
22
+ ],
23
+ "placement": "top",
24
+ "endpoint": 0,
25
+ "no_preference": 0,
26
+ "selected": 0
27
+ },
28
+ {
29
+ "key": "field_687e00b4668dd",
30
+ "label": "Select menu type",
31
+ "name": "select_menu_type",
32
+ "aria-label": "",
33
+ "type": "select",
34
+ "instructions": "",
35
+ "required": 0,
36
+ "conditional_logic": 0,
37
+ "wrapper": {
38
+ "width": "",
39
+ "class": "",
40
+ "id": ""
41
+ },
42
+ "wpml_cf_preferences": 3,
43
+ "choices": {
44
+ "__slide_in_nav_panel": "Slide In Nav Panel",
45
+ "__classic_nav_items_center": "Classic Nav Items Center"
46
+ },
47
+ "default_value": "__classic_nav_items_center",
48
+ "return_format": "value",
49
+ "multiple": 0,
50
+ "max": "",
51
+ "prepend": "",
52
+ "append": "",
53
+ "allow_null": 0,
54
+ "ui": 0,
55
+ "ajax": 0,
56
+ "placeholder": "",
57
+ "allow_custom": 0,
58
+ "search_placeholder": "",
59
+ "min": ""
60
+ },
61
+ {
62
+ "key": "field_687e00b466c81",
63
+ "label": "Classic Nav Items Center",
64
+ "name": "classic_nav_items_center",
65
+ "aria-label": "",
66
+ "type": "group",
67
+ "instructions": "",
68
+ "required": 0,
69
+ "conditional_logic": [
70
+ [
71
+ {
72
+ "field": "field_687e00b4668dd",
73
+ "operator": "==",
74
+ "value": "__classic_nav_items_center"
75
+ }
76
+ ]
77
+ ],
78
+ "wrapper": {
79
+ "width": "",
80
+ "class": "",
81
+ "id": ""
82
+ },
83
+ "wpml_cf_preferences": 3,
84
+ "layout": "block",
85
+ "acfe_seamless_style": 0,
86
+ "acfe_group_modal": 0,
87
+ "acfe_group_modal_close": 0,
88
+ "acfe_group_modal_button": "",
89
+ "acfe_group_modal_size": "large",
90
+ "sub_fields": [
91
+ {
92
+ "key": "field_687e00b46977c",
93
+ "label": "Classic Nav Items Center",
94
+ "name": "classic_nav_items_center",
95
+ "aria-label": "",
96
+ "type": "clone",
97
+ "instructions": "",
98
+ "required": 0,
99
+ "conditional_logic": 0,
100
+ "wrapper": {
101
+ "width": "",
102
+ "class": "",
103
+ "id": ""
104
+ },
105
+ "wpml_cf_preferences": 3,
106
+ "clone": [
107
+ "group_66a2b63ae5cad"
108
+ ],
109
+ "display": "seamless",
110
+ "layout": "block",
111
+ "prefix_label": 0,
112
+ "prefix_name": 0,
113
+ "acfe_seamless_style": 0,
114
+ "acfe_clone_modal": 0,
115
+ "acfe_clone_modal_close": 0,
116
+ "acfe_clone_modal_button": "",
117
+ "acfe_clone_modal_size": "large"
118
+ }
119
+ ]
120
+ },
121
+ {
122
+ "key": "field_687e00b467072",
123
+ "label": "Slide In Nav Panel",
124
+ "name": "slide_in_nav_panel",
125
+ "aria-label": "",
126
+ "type": "clone",
127
+ "instructions": "",
128
+ "required": 0,
129
+ "conditional_logic": [
130
+ [
131
+ {
132
+ "field": "field_687e00b4668dd",
133
+ "operator": "==",
134
+ "value": "__slide_in_nav_panel"
135
+ }
136
+ ]
137
+ ],
138
+ "wrapper": {
139
+ "width": "",
140
+ "class": "",
141
+ "id": ""
142
+ },
143
+ "wpml_cf_preferences": 3,
144
+ "clone": [
145
+ "group_65db1f6c9cba8"
146
+ ],
147
+ "display": "seamless",
148
+ "layout": "block",
149
+ "prefix_label": 0,
150
+ "prefix_name": 0,
151
+ "acfe_seamless_style": 0,
152
+ "acfe_clone_modal": 0,
153
+ "acfe_clone_modal_close": 0,
154
+ "acfe_clone_modal_button": "",
155
+ "acfe_clone_modal_size": "large"
156
+ }
157
+ ],
158
+ "location": [
159
+ [
160
+ {
161
+ "param": "block",
162
+ "operator": "==",
163
+ "value": "acf\/nav-menu-container-v3"
164
+ }
165
+ ]
166
+ ],
167
+ "menu_order": 0,
168
+ "position": "normal",
169
+ "style": "default",
170
+ "label_placement": "left",
171
+ "instruction_placement": "label",
172
+ "hide_on_screen": "",
173
+ "active": true,
174
+ "description": "",
175
+ "show_in_rest": 0,
176
+ "acfe_autosync": [
177
+ "json"
178
+ ],
179
+ "acfml_field_group_mode": "localization",
180
+ "acfe_form": 0,
181
+ "acfe_display_title": "",
182
+ "acfe_meta": "",
183
+ "acfe_note": "",
184
+ "modified": 1753088249
185
+ }
@@ -0,0 +1,21 @@
1
+ export default function navmenucontainerv3Js(options = {}) {
2
+ try {
3
+ const {block} = options;
4
+
5
+ if (block.dataset.navtype == 'classic_nav_items_center') {
6
+ import('Assets/js/modules/library-modules/classic-nav-items-center/classic-nav-items-center.js').then(
7
+ (module) => {
8
+ module.default({block});
9
+ }
10
+ );
11
+ } else if (block.dataset.navtype == 'slide_in_nav_panel') {
12
+ import(
13
+ 'Assets/js/modules/library-modules/nav-menu-slide-in-panel/nav-menu-slide-in-panel.js'
14
+ ).then((module) => {
15
+ module.default({block});
16
+ });
17
+ }
18
+ } catch (error) {
19
+ console.error(error);
20
+ }
21
+ }
@@ -0,0 +1,14 @@
1
+ <?php
2
+
3
+ acf_register_block_type(
4
+ array(
5
+ 'name' => 'nav-menu-container-v3',
6
+ 'title' => __('Nav menu container v3', 'Global-theme Admin'),
7
+ 'render_callback' => 'athena_block_render_post_object',
8
+ 'category' => 'common',
9
+ 'icon' => get_svg_icon_content('brick.svg'),
10
+ 'keywords' => array('content', 'text'),
11
+ 'mode' => 'preview',
12
+ 'supports' => array('align' => false, 'anchor' => true),
13
+ )
14
+ );
@@ -0,0 +1,8 @@
1
+ @use 'Assets/scss/modules/library-modules/nav-menu-slide-in-panel/nav-menu-slide-in-panel';
2
+ @use 'Assets/scss/modules/library-modules/classic-nav-items-center/classic-nav-items-center';
3
+
4
+ .nav-menu-container-v3 {
5
+ pointer-events: all;
6
+ @include nav-menu-slide-in-panel.navMenuSlideInPanel();
7
+ @include classic-nav-items-center.classicNavItemsCenter();
8
+ }
@@ -0,0 +1,19 @@
1
+ {% set blockClassName = "nav-menu-container-v3" %}
2
+ {% set classNameEntryPoint = include('entry-points/entry-point-classes.twig', { fields, block }, with_context = false) %}
3
+ {% set htmlEntryPoint = include('entry-points/entry-point-html.twig', { fields, block, blockClassName, options, environment, is_preview, nav_menus }, with_context = false) %}
4
+ {% set dataAttributeEntryPoint = include('entry-points/entry-point-data-attribute.twig', { fields, block }, with_context = false) %}
5
+ {% set styleEntryPoint = include('entry-points/entry-point-style.twig', { fields, block, displaytype, is_preview }, with_context = false) %}
6
+ {% set previewEntryPoint = include('entry-points/entry-point-preview-info.twig', { fields, block, displaytype, is_preview }, with_context = false) %}
7
+ {% set menuType = fields.select_menu_type|ru %}
8
+ {% set sectionStyles = styleEntryPoint %}
9
+
10
+ <section
11
+ {{block.anchor ? "id=" ~ block.anchor : ''}} class="{{blockClassName}} {{block.className}} {{classNameEntryPoint}} lazy-fade" {{dataAttributeEntryPoint}} data-blockid="{{block.id}}" style="{{sectionStyles}}" data-assetkey="{{blockClassName}}" data-navtype="{{menuType}}">
12
+ {% if menuType == 'classic_nav_items_center' %}
13
+ {{ include( 'components/classic-nav-items-center.twig', { fields, block, blockClassName, options, nav_menus, current_post}, with_context = false, ignore_missing = true) }}
14
+ {% elseif menuType == 'slide_in_nav_panel'%}
15
+ {{ include( 'components/nav-menu-slide-in-panel.twig', { fields, block, blockClassName, options, nav_menus, current_post}, with_context = false, ignore_missing = true) }}
16
+ {% endif %}
17
+
18
+ {{htmlEntryPoint}}
19
+ </section>
@@ -13,21 +13,21 @@
13
13
  letter-spacing: 0.8em;
14
14
  text-transform: uppercase;
15
15
 
16
- gap: core-functions.fluidSize(10);
17
- margin-inline: core-functions.fluidSize(5, 'mobile');
18
- font-size: core-functions.fontSize(10, 'mobile');
19
-
20
- @include core-mixins.device(breakpoints.$tabPortrait) {
21
- font-size: core-functions.fontSize(10, 'portrait');
22
- margin-inline: core-functions.fluidSize(5, 'portrait');
23
- gap: core-functions.fluidSize(20, 'portrait');
16
+ gap: core-functions-v3.fluidSize(10);
17
+ margin-inline: core-functions-v3.fluidSize(5, 'mobile');
18
+ font-size: core-functions-v3.fontSize(10, 'mobile');
19
+
20
+ @include core-mixins-v3.device(breakpoints.$tabPortrait) {
21
+ font-size: core-functions-v3.fontSize(10, 'portrait');
22
+ margin-inline: core-functions-v3.fluidSize(5, 'portrait');
23
+ gap: core-functions-v3.fluidSize(20, 'portrait');
24
24
  }
25
25
 
26
- @include core-mixins.device(breakpoints.$tabLandscape) {
26
+ @include core-mixins-v3.device(breakpoints.$tabLandscape) {
27
27
  color: var(--accent-text-colour);
28
- font-size: core-functions.fontSize(10, 'desktop');
29
- margin-inline: core-functions.fluidSize(5, 'desktop');
30
- gap: core-functions.fluidSize(20, 'desktop');
28
+ font-size: core-functions-v3.fontSize(10, 'desktop');
29
+ margin-inline: core-functions-v3.fluidSize(5, 'desktop');
30
+ gap: core-functions-v3.fluidSize(20, 'desktop');
31
31
  }
32
32
 
33
33
  &::before,
@@ -37,21 +37,21 @@
37
37
  --accent-text-colour-mobile,
38
38
  var(--default-text-colour-mobile)
39
39
  );
40
- width: core-functions.fluidSize(20, 'mobile');
41
- height: core-functions.fluidSize(2, 'mobile');
40
+ width: core-functions-v3.fluidSize(20, 'mobile');
41
+ height: core-functions-v3.fluidSize(2, 'mobile');
42
42
 
43
- @include core-mixins.device(breakpoints.$tabPortrait) {
44
- width: core-functions.fluidSize(40, 'portrait');
45
- height: core-functions.fluidSize(2, 'portrait');
43
+ @include core-mixins-v3.device(breakpoints.$tabPortrait) {
44
+ width: core-functions-v3.fluidSize(40, 'portrait');
45
+ height: core-functions-v3.fluidSize(2, 'portrait');
46
46
  }
47
47
 
48
- @include core-mixins.device(breakpoints.$tabLandscape) {
48
+ @include core-mixins-v3.device(breakpoints.$tabLandscape) {
49
49
  background-color: var(
50
50
  --accent-text-colour,
51
51
  var(--default-text-colour-desktop)
52
52
  );
53
- width: core-functions.fluidSize(80, 'desktop');
54
- height: core-functions.fluidSize(2, 'desktop');
53
+ width: core-functions-v3.fluidSize(80, 'desktop');
54
+ height: core-functions-v3.fluidSize(2, 'desktop');
55
55
  }
56
56
  }
57
57
 
@@ -1,5 +1,4 @@
1
1
  @use 'Assets/scss/modules/library-modules/core-mixins-v3/core-mixins-v3';
2
- @use 'Assets/scss/modules/library-modules/core-functions-v3/core-functions-v3';
3
2
  @use 'Assets/scss/theme/breakpoints';
4
3
 
5
4
  @mixin navMenuV3() {
@@ -8,11 +7,11 @@
8
7
  width: 100%;
9
8
  justify-content: var(--alignment-mobile);
10
9
  align-items: var(--alignment-mobile);
11
- @include core-mixins.device(breakpoints.$tabPortrait) {
10
+ @include core-mixins-v3.device(breakpoints.$tabPortrait) {
12
11
  justify-content: var(--alignment-portrait);
13
12
  align-items: var(--alignment-portrait);
14
13
  }
15
- @include core-mixins.device(breakpoints.$tabLandscape) {
14
+ @include core-mixins-v3.device(breakpoints.$tabLandscape) {
16
15
  justify-content: var(--alignment-desktop);
17
16
  }
18
17
  }
@@ -25,12 +24,12 @@
25
24
  flex-direction: var(--menu-direction-mobile);
26
25
  align-items: var(--alignment-mobile);
27
26
  gap: calc(var(--global-inline-spacing) * var(--gap-mobile));
28
- @include core-mixins.device(breakpoints.$tabPortrait) {
27
+ @include core-mixins-v3.device(breakpoints.$tabPortrait) {
29
28
  gap: calc(var(--global-inline-spacing) * var(--gap-portrait));
30
29
  flex-direction: var(--menu-direction-portrait);
31
30
  align-items: var(--alignment-portrait);
32
31
  }
33
- @include core-mixins.device(breakpoints.$tabLandscape) {
32
+ @include core-mixins-v3.device(breakpoints.$tabLandscape) {
34
33
  align-items: var(--alignment-desktop);
35
34
  gap: calc(var(--global-inline-spacing) * var(--gap-desktop));
36
35
  flex-direction: var(--menu-direction);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@total_onion/onion-library",
3
- "version": "1.0.47",
3
+ "version": "1.0.49",
4
4
  "description": "Component library",
5
5
  "main": "index.js",
6
6
  "scripts": {