@total_onion/onion-library 2.0.35 → 2.0.36

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,458 @@
1
+ {
2
+ "key": "group_6617ecc987ddd",
3
+ "title": "Block: Responsive Table v3",
4
+ "fields": [
5
+ {
6
+ "key": "field_6617ecc9e0805",
7
+ "label": "Content",
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_661f9ea2d7059",
30
+ "label": "Headings",
31
+ "name": "headings",
32
+ "aria-label": "",
33
+ "type": "repeater",
34
+ "instructions": "",
35
+ "required": 0,
36
+ "conditional_logic": 0,
37
+ "wrapper": {
38
+ "width": "",
39
+ "class": "",
40
+ "id": ""
41
+ },
42
+ "wpml_cf_preferences": 3,
43
+ "user_roles": [
44
+ "all"
45
+ ],
46
+ "layout": "block",
47
+ "pagination": 0,
48
+ "min": 0,
49
+ "max": 0,
50
+ "collapsed": "",
51
+ "button_label": "Add Row",
52
+ "rows_per_page": 20,
53
+ "acfe_repeater_stylised_button": 0,
54
+ "sub_fields": [
55
+ {
56
+ "key": "field_661f9eb4d705a",
57
+ "label": "Heading",
58
+ "name": "heading",
59
+ "aria-label": "",
60
+ "type": "text",
61
+ "instructions": "",
62
+ "required": 0,
63
+ "conditional_logic": 0,
64
+ "wrapper": {
65
+ "width": "",
66
+ "class": "",
67
+ "id": ""
68
+ },
69
+ "wpml_cf_preferences": 2,
70
+ "default_value": "",
71
+ "maxlength": "",
72
+ "placeholder": "",
73
+ "prepend": "",
74
+ "append": "",
75
+ "parent_repeater": "field_661f9ea2d7059"
76
+ }
77
+ ]
78
+ },
79
+ {
80
+ "key": "field_661fac6493d8e",
81
+ "label": "Items",
82
+ "name": "items",
83
+ "aria-label": "",
84
+ "type": "repeater",
85
+ "instructions": "",
86
+ "required": 0,
87
+ "conditional_logic": 0,
88
+ "wrapper": {
89
+ "width": "",
90
+ "class": "",
91
+ "id": ""
92
+ },
93
+ "wpml_cf_preferences": 3,
94
+ "user_roles": [
95
+ "all"
96
+ ],
97
+ "layout": "block",
98
+ "pagination": 0,
99
+ "min": 0,
100
+ "max": 0,
101
+ "collapsed": "",
102
+ "button_label": "Add Row",
103
+ "rows_per_page": 20,
104
+ "acfe_repeater_stylised_button": 0,
105
+ "sub_fields": [
106
+ {
107
+ "key": "field_661fed2a7739a",
108
+ "label": "Item",
109
+ "name": "item",
110
+ "aria-label": "",
111
+ "type": "repeater",
112
+ "instructions": "",
113
+ "required": 0,
114
+ "conditional_logic": 0,
115
+ "wrapper": {
116
+ "width": "",
117
+ "class": "",
118
+ "id": ""
119
+ },
120
+ "wpml_cf_preferences": 3,
121
+ "layout": "block",
122
+ "pagination": 0,
123
+ "min": 0,
124
+ "max": 0,
125
+ "collapsed": "",
126
+ "button_label": "Add Row",
127
+ "rows_per_page": 20,
128
+ "parent_repeater": "field_661fac6493d8e",
129
+ "acfe_repeater_stylised_button": 0,
130
+ "sub_fields": [
131
+ {
132
+ "key": "field_6620fa81c99a8",
133
+ "label": "Item value",
134
+ "name": "item_value",
135
+ "aria-label": "",
136
+ "type": "wysiwyg",
137
+ "instructions": "",
138
+ "required": 0,
139
+ "conditional_logic": 0,
140
+ "wrapper": {
141
+ "width": "",
142
+ "class": "",
143
+ "id": ""
144
+ },
145
+ "wpml_cf_preferences": 2,
146
+ "default_value": "",
147
+ "acfe_wysiwyg_auto_init": 0,
148
+ "acfe_wysiwyg_height": 300,
149
+ "acfe_wysiwyg_max_height": "",
150
+ "acfe_wysiwyg_valid_elements": "",
151
+ "acfe_wysiwyg_custom_style": "",
152
+ "acfe_wysiwyg_disable_wp_style": 0,
153
+ "acfe_wysiwyg_autoresize": 0,
154
+ "acfe_wysiwyg_disable_resize": 0,
155
+ "acfe_wysiwyg_remove_path": 0,
156
+ "acfe_wysiwyg_menubar": 0,
157
+ "acfe_wysiwyg_transparent": 0,
158
+ "acfe_wysiwyg_merge_toolbar": 0,
159
+ "acfe_wysiwyg_custom_toolbar": 0,
160
+ "tabs": "visual",
161
+ "toolbar": "formatselect_align_bold_italic_underline_link_removeformat",
162
+ "media_upload": 0,
163
+ "delay": 0,
164
+ "acfe_wysiwyg_min_height": 300,
165
+ "acfe_wysiwyg_toolbar_buttons": [],
166
+ "parent_repeater": "field_661fed2a7739a"
167
+ }
168
+ ]
169
+ }
170
+ ]
171
+ },
172
+ {
173
+ "key": "field_661ff114afbc0",
174
+ "label": "Table Settings",
175
+ "name": "",
176
+ "aria-label": "",
177
+ "type": "tab",
178
+ "instructions": "",
179
+ "required": 0,
180
+ "conditional_logic": 0,
181
+ "wrapper": {
182
+ "width": "",
183
+ "class": "",
184
+ "id": ""
185
+ },
186
+ "wpml_cf_preferences": 3,
187
+ "user_roles": [
188
+ "all"
189
+ ],
190
+ "placement": "top",
191
+ "endpoint": 0,
192
+ "no_preference": 0,
193
+ "selected": 0
194
+ },
195
+ {
196
+ "key": "field_661d6c6e1d10e",
197
+ "label": "Background Colour Headers",
198
+ "name": "background_column_headers",
199
+ "aria-label": "",
200
+ "type": "color_picker",
201
+ "instructions": "",
202
+ "required": 0,
203
+ "conditional_logic": 0,
204
+ "wrapper": {
205
+ "width": "",
206
+ "class": "",
207
+ "id": ""
208
+ },
209
+ "wpml_cf_preferences": 3,
210
+ "user_roles": [
211
+ "all"
212
+ ],
213
+ "default_value": "",
214
+ "enable_opacity": 0,
215
+ "return_format": "string",
216
+ "display": "default",
217
+ "button_label": "Select Color",
218
+ "color_picker": true,
219
+ "absolute": false,
220
+ "input": true,
221
+ "allow_null": true,
222
+ "theme_colors": false,
223
+ "colors": []
224
+ },
225
+ {
226
+ "key": "field_661ff6e53541b",
227
+ "label": "Background Colour Items",
228
+ "name": "background_colour_items",
229
+ "aria-label": "",
230
+ "type": "color_picker",
231
+ "instructions": "",
232
+ "required": 0,
233
+ "conditional_logic": 0,
234
+ "wrapper": {
235
+ "width": "",
236
+ "class": "",
237
+ "id": ""
238
+ },
239
+ "wpml_cf_preferences": 3,
240
+ "user_roles": [
241
+ "all"
242
+ ],
243
+ "default_value": "",
244
+ "enable_opacity": 0,
245
+ "return_format": "string",
246
+ "display": "default",
247
+ "button_label": "Select Color",
248
+ "color_picker": true,
249
+ "absolute": false,
250
+ "input": true,
251
+ "allow_null": true,
252
+ "theme_colors": false,
253
+ "colors": []
254
+ },
255
+ {
256
+ "key": "field_661ffbf23ba2f",
257
+ "label": "Table Spacing gap",
258
+ "name": "table_spacing_gap",
259
+ "aria-label": "",
260
+ "type": "number",
261
+ "instructions": "",
262
+ "required": 0,
263
+ "conditional_logic": 0,
264
+ "wrapper": {
265
+ "width": "",
266
+ "class": "",
267
+ "id": ""
268
+ },
269
+ "wpml_cf_preferences": 3,
270
+ "user_roles": [
271
+ "all"
272
+ ],
273
+ "default_value": "0.5",
274
+ "min": 0,
275
+ "max": 4,
276
+ "placeholder": "",
277
+ "step": "0.125",
278
+ "prepend": "",
279
+ "append": ""
280
+ },
281
+ {
282
+ "key": "field_6617edbb6d83c",
283
+ "label": "Block Settings",
284
+ "name": "",
285
+ "aria-label": "",
286
+ "type": "tab",
287
+ "instructions": "",
288
+ "required": 0,
289
+ "conditional_logic": 0,
290
+ "wrapper": {
291
+ "width": "",
292
+ "class": "",
293
+ "id": ""
294
+ },
295
+ "wpml_cf_preferences": 3,
296
+ "user_roles": [
297
+ "all"
298
+ ],
299
+ "placement": "top",
300
+ "endpoint": 0,
301
+ "no_preference": 0,
302
+ "selected": 0
303
+ },
304
+ {
305
+ "key": "field_6617ee196d83d",
306
+ "label": "Block",
307
+ "name": "",
308
+ "aria-label": "",
309
+ "type": "accordion",
310
+ "instructions": "",
311
+ "required": 0,
312
+ "conditional_logic": 0,
313
+ "wrapper": {
314
+ "width": "",
315
+ "class": "",
316
+ "id": ""
317
+ },
318
+ "wpml_cf_preferences": 3,
319
+ "user_roles": [
320
+ "all"
321
+ ],
322
+ "open": 0,
323
+ "multi_expand": 0,
324
+ "endpoint": 0
325
+ },
326
+ {
327
+ "key": "field_6617ee366d83e",
328
+ "label": "Block Settings",
329
+ "name": "block_settings",
330
+ "aria-label": "",
331
+ "type": "clone",
332
+ "instructions": "",
333
+ "required": 0,
334
+ "conditional_logic": 0,
335
+ "wrapper": {
336
+ "width": "",
337
+ "class": "",
338
+ "id": ""
339
+ },
340
+ "wpml_cf_preferences": 3,
341
+ "clone": [
342
+ "group_689f649af2ac4"
343
+ ],
344
+ "display": "seamless",
345
+ "layout": "block",
346
+ "prefix_label": 0,
347
+ "prefix_name": 0,
348
+ "acfe_seamless_style": 0,
349
+ "acfe_clone_modal": 0,
350
+ "acfe_clone_modal_close": 0,
351
+ "acfe_clone_modal_button": "",
352
+ "acfe_clone_modal_size": "large"
353
+ },
354
+ {
355
+ "key": "field_6617ee9f749c9",
356
+ "label": "Block end",
357
+ "name": "",
358
+ "aria-label": "",
359
+ "type": "accordion",
360
+ "instructions": "",
361
+ "required": 0,
362
+ "conditional_logic": 0,
363
+ "wrapper": {
364
+ "width": "",
365
+ "class": "",
366
+ "id": ""
367
+ },
368
+ "wpml_cf_preferences": 3,
369
+ "user_roles": [
370
+ "all"
371
+ ],
372
+ "open": 0,
373
+ "multi_expand": 0,
374
+ "endpoint": 1
375
+ },
376
+ {
377
+ "key": "field_6617f00de88a6",
378
+ "label": "Block Padding",
379
+ "name": "",
380
+ "aria-label": "",
381
+ "type": "tab",
382
+ "instructions": "",
383
+ "required": 0,
384
+ "conditional_logic": 0,
385
+ "wrapper": {
386
+ "width": "",
387
+ "class": "",
388
+ "id": ""
389
+ },
390
+ "wpml_cf_preferences": 3,
391
+ "user_roles": [
392
+ "all"
393
+ ],
394
+ "placement": "top",
395
+ "endpoint": 0,
396
+ "no_preference": 0,
397
+ "selected": 0
398
+ },
399
+ {
400
+ "key": "field_6617f032e88a7",
401
+ "label": "block padding fields",
402
+ "name": "block_padding_fields",
403
+ "aria-label": "",
404
+ "type": "clone",
405
+ "instructions": "",
406
+ "required": 0,
407
+ "conditional_logic": 0,
408
+ "wrapper": {
409
+ "width": "",
410
+ "class": "",
411
+ "id": ""
412
+ },
413
+ "wpml_cf_preferences": 3,
414
+ "user_roles": [
415
+ "all"
416
+ ],
417
+ "clone": [
418
+ "group_638f4148bc10b"
419
+ ],
420
+ "display": "seamless",
421
+ "layout": "block",
422
+ "prefix_label": 0,
423
+ "prefix_name": 0,
424
+ "acfe_seamless_style": 0,
425
+ "acfe_clone_modal": 0,
426
+ "acfe_clone_modal_close": 0,
427
+ "acfe_clone_modal_button": "",
428
+ "acfe_clone_modal_size": "large"
429
+ }
430
+ ],
431
+ "location": [
432
+ [
433
+ {
434
+ "param": "block",
435
+ "operator": "==",
436
+ "value": "acf\/responsive-table-v3"
437
+ }
438
+ ]
439
+ ],
440
+ "menu_order": 0,
441
+ "position": "normal",
442
+ "style": "default",
443
+ "label_placement": "top",
444
+ "instruction_placement": "label",
445
+ "hide_on_screen": "",
446
+ "active": true,
447
+ "description": "",
448
+ "show_in_rest": 0,
449
+ "acfe_autosync": [
450
+ "json"
451
+ ],
452
+ "acfml_field_group_mode": "localization",
453
+ "acfe_form": 0,
454
+ "acfe_display_title": "",
455
+ "acfe_meta": "",
456
+ "acfe_note": "",
457
+ "modified": 1760027002
458
+ }
@@ -0,0 +1,7 @@
1
+ export default function responsivetableJs(options = {}) {
2
+ try {
3
+ const {block} = options;
4
+ } catch (error) {
5
+ console.error(error);
6
+ }
7
+ }
@@ -0,0 +1,14 @@
1
+ <?php
2
+
3
+ acf_register_block_type(
4
+ array(
5
+ 'name' => 'responsive-table-v3',
6
+ 'title' => __('Responsive table v3', 'Global-theme Admin'),
7
+ 'render_callback' => 'athena_block_render_post_object_v3',
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,51 @@
1
+ @use 'Assets/scss/modules/library-modules/core-mixins/core-mixins';
2
+ @use 'Assets/scss/modules/library-modules/core-functions/core-functions';
3
+ @use 'Assets/scss/theme/breakpoints';
4
+ @use 'Assets/scss/blocks/responsive-table/responsive-table-extra';
5
+
6
+ .responsive-table-v3 {
7
+ &__wrapper {
8
+ display: grid;
9
+ grid-auto-flow: column;
10
+ gap: calc(
11
+ var(--global-inline-spacing) * var(--table-spacing-gap-desktop)
12
+ );
13
+ overflow: auto;
14
+ }
15
+ &__headings {
16
+ display: grid;
17
+ grid-auto-flow: column;
18
+ grid-column: 1/ (var(--headings));
19
+ grid-template-columns: subgrid;
20
+ }
21
+
22
+ &__heading {
23
+ grid-row: 1;
24
+ background-color: var(--background-column-headers);
25
+ padding: core-functions.fluidSize(5, 'mobile');
26
+ @include core-mixins.device(breakpoints.$tabPortrait) {
27
+ padding: core-functions.fluidSize(5, 'portrait');
28
+ }
29
+ @include core-mixins.device(breakpoints.$tabLandscape) {
30
+ padding: core-functions.fluidSize(5, 'desktop');
31
+ }
32
+ }
33
+ &__item {
34
+ display: grid;
35
+ grid-auto-flow: column;
36
+ grid-column: 1/ (var(--headings));
37
+ grid-template-columns: subgrid;
38
+ }
39
+ &__item-value {
40
+ background-color: var(--background-colour-items);
41
+ padding: core-functions.fluidSize(5, 'mobile');
42
+ @include core-mixins.device(breakpoints.$tabPortrait) {
43
+ padding: core-functions.fluidSize(5, 'portrait');
44
+ }
45
+ @include core-mixins.device(breakpoints.$tabLandscape) {
46
+ padding: core-functions.fluidSize(5, 'desktop');
47
+ }
48
+ }
49
+
50
+ @include responsive-table-extra.additionalStyles();
51
+ }
@@ -0,0 +1,45 @@
1
+ {% set blockClassName = "responsive-table-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-v3.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-v3.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
+
8
+ {% set columnsLimit = fields.headings|length %}
9
+ {% set TabCellFlexDirection = fields.table_cell_direction|ru %}
10
+ {% set columnCount = '--headings: ' ~ (columnsLimit + 1) ~ ';' %}
11
+ {% set bgColourHeader = '--background-column-headers: ' ~ fields.background_column_headers|ru ~ ';' %}
12
+ {% set bgColourItems = '--background-colour-items:' ~ fields.background_colour_items|ru ~ ';' %}
13
+ {% set spacingGapDesktop = '--table-spacing-gap-desktop:' ~ fields.table_spacing_gap|ru ~ ';' %}
14
+
15
+
16
+ {% set textStyle = include('components/text-style.twig', {field, post}) %}
17
+
18
+ {% set elementStyles = textStyle %}
19
+
20
+
21
+ {% set sectionStyles = styleEntryPoint ~ elementStyles ~ columnCount ~ bgColourItems ~ bgColourHeader ~ spacingGapDesktop %}
22
+
23
+
24
+ <section {{block.anchor ? "id=" ~ block.anchor : ''}} class="{{blockClassName}} {{block.className}} {{classNameEntryPoint}} lazy-fade" {{dataAttributeEntryPoint}} data-jsload="false" data-blockid="{{block.id}}" style="{{sectionStyles}}" data-assetkey="{{blockClassName}}">
25
+ <div class="{{ blockClassName }}__wrapper" style=" {{columnCount}}" aria-hidden="true">
26
+ <div class="{{ blockClassName }}__headings ">
27
+ {% for field in fields.headings %}
28
+ <div class="{{ blockClassName }}__heading" aria-hidden="true">
29
+ {{field.heading}}</div>
30
+ {% endfor %}
31
+ </div>
32
+
33
+ {% for field in fields.items %}
34
+ <div class="{{ blockClassName }}__item" aria-hidden="true">
35
+ {% for element in field.item|slice(0, columnsLimit) %}
36
+ <div class="{{ blockClassName }}__item-value">{{element.item_value}}</div>
37
+ {% endfor %}
38
+ </div>
39
+
40
+ {% endfor %}
41
+
42
+
43
+ </div>
44
+ {{htmlEntryPoint}}
45
+ </section>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@total_onion/onion-library",
3
- "version": "2.0.35",
3
+ "version": "2.0.36",
4
4
  "description": "Component library",
5
5
  "main": "index.js",
6
6
  "scripts": {