@total_onion/onion-library 1.0.84 → 1.0.85

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,4 @@
1
+ {{ include('components/noscript.twig', ignore_missing = true) }}
2
+ {{ include('components/core-design-settings-v3.twig', ignore_missing = true) }}
3
+ {{ include('components/speculation-api.twig', ignore_missing = true) }}
4
+ {{ include('components/global-preload.twig', ignore_missing = true) }}
@@ -154,6 +154,9 @@
154
154
  'static'
155
155
  )
156
156
  var(--text-stroke-colour);
157
+ &:last-child {
158
+ margin-bottom: 0;
159
+ }
157
160
  @include core-mixins-v3.defaultThemeTextColours();
158
161
  @include core-mixins-v3.defaultTextTransform();
159
162
  @include core-mixins-v3.defaultTextAlign();
@@ -172,10 +175,6 @@
172
175
  @include core-mixins-v3.defaultFontStyle();
173
176
  }
174
177
 
175
- &:last-child {
176
- margin-bottom: 0;
177
- }
178
-
179
178
  @include core-mixins-v3.device(breakpoints.$tabPortrait) {
180
179
  max-width: var(--wysiwyg-max-width-portrait);
181
180
  }
@@ -0,0 +1,45 @@
1
+ // LIBRARY FILE - Do not modify/override here as your changes will be lost when the package is updated.
2
+ // This is the new version the older mixins should be removed and the blocks use Gradient Overlay mixin instead
3
+ @mixin gradientOverlay() {
4
+ --spread: calc(100% - var(--gradient-spread));
5
+ &__gradient-overlay-element {
6
+ position: absolute;
7
+ inset: 0;
8
+ z-index: var(--gradient-zindex);
9
+ grid-area: var(--gradient-grid-area);
10
+ &::before,
11
+ &:after {
12
+ content: '';
13
+ pointer-events: none;
14
+ position: absolute;
15
+ inset: 0;
16
+ opacity: var(--gradient-opacity);
17
+ }
18
+ &::before {
19
+ background: linear-gradient(
20
+ var(--gradient-origin-before),
21
+ rgba(255, 255, 255, 0) 0%,
22
+ rgba(255, 255, 255, 0)
23
+ calc(var(--spread) - var(--gradient-amount)),
24
+ var(--gradient-colour) calc(100% - var(--gradient-amount))
25
+ );
26
+ }
27
+ &::after {
28
+ content: var(--enable-after);
29
+ background: linear-gradient(
30
+ var(--gradient-origin-after),
31
+ rgba(255, 255, 255, 0) 0%,
32
+ rgba(255, 255, 255, 0)
33
+ calc(var(--spread) - var(--gradient-amount)),
34
+ var(--gradient-colour) calc(100% - var(--gradient-amount))
35
+ );
36
+ }
37
+ }
38
+ &__blur-overlay-element {
39
+ background: var(--blur-colour);
40
+ backdrop-filter: blur(var(--blur-value));
41
+ position: absolute;
42
+ inset: 0;
43
+ z-index: var(--blur-zindex);
44
+ }
45
+ }
@@ -0,0 +1,17 @@
1
+ <?php
2
+ add_action('enqueue_block_assets', 'add_block_editor_assets_v3', 10, true);
3
+ function add_block_editor_assets_v3(): void
4
+ {
5
+ if (is_admin()) {
6
+ wp_enqueue_style('core-wordpress-block-editor-previews', gtp_get_asset_uri('corewordpressblockeditorpreviewcss.css'), array(), null);
7
+ wp_enqueue_script('editorstyles', gtp_get_asset_uri('corewordpressblockeditorpreview.js'), array(), null, true);
8
+ wp_localize_script('editorstyles', 'previewvars', core_design_system());
9
+ wp_localize_script('editorstyles', 'corecta', core_cta());
10
+ wp_localize_script('editorstyles', 'coretypography', core_typography_v3());
11
+ wp_localize_script('editorstyles', 'corefontmodifiers', core_font_modifiers());
12
+ wp_localize_script('editorstyles', 'ctastylenames', []);
13
+ wp_localize_script('editorstyles', 'themenames', []);
14
+ wp_localize_script('editorstyles', 'corethemes', core_themes());
15
+ wp_localize_script('editorstyles', 'colourconfig', create_colour_data());
16
+ }
17
+ }
@@ -0,0 +1,6 @@
1
+ {{function('core_critical_css').0}}
2
+ {{function('core_design_system').0}}
3
+ {{function('core_typography_v3').0}}
4
+ {{function('core_font_modifiers').0}}
5
+ {{function('core_themes').0}}
6
+ {{function('core_cta').0}}
@@ -0,0 +1,44 @@
1
+ <?php
2
+ // @codingStandardsIgnoreStart
3
+ function core_design_system_v3()
4
+ {
5
+ $output = '';
6
+ $current_post = [];
7
+ if (isset($GLOBALS['post'])) {
8
+ $current_post = Timber::get_post($GLOBALS['post']->ID);
9
+ }
10
+ if (defined('GLOBAL_SETTINGS') && is_array(GLOBAL_SETTINGS)) {
11
+ $options = GLOBAL_SETTINGS;
12
+ if ($options) {
13
+ $output = '
14
+ <style id="core-design-system">
15
+ :root {
16
+ --mobile-inline:' . ($options['mobile_inline'] ?? 0) . ';
17
+ --portrait-inline:' . ($options['portrait_inline'] ?? 0) . ';
18
+ --landscape-inline:' . ($options['landscape_inline'] ?? 0) . ';
19
+ --desktop-inline:' . ($options['desktop_inline'] ?? 0) . ';
20
+ --screen-width-fullhd:' . ($options['screen_width_full_hd'] ?? 1920) . ';
21
+ --font-reference-fullhd:' . ($options['font_reference_full_hd'] ?? 1920) . ';
22
+ --screen-width-desktop:' . ($options['screen_width_desktop'] ?? 1440) . ';
23
+ --font-reference-desktop:' . ($options['font_reference_desktop'] ?? 1440) . ';
24
+ --screen-width-landscape:' . ($options['screen_width_landscape'] ?? 1024) . ';
25
+ --font-reference-landscape:' . ($options['font_reference_landscape'] ?? 1024) . ';
26
+ --screen-width-portrait:' . ($options['screen_width_portrait'] ?? 768) . ';
27
+ --font-reference-portrait:' . ($options['font_reference_portrait'] ?? 768) . ';
28
+ --font-reference-mobile:' . ($options['font_reference_mobile'] ?? 375) . ';
29
+ --screen-width-mobile:' . ($options['screen_width_mobile'] ?? 375) . ';
30
+ --screen-width-static:' . ($options['desktop_design_reference'] ?? 1920) . 'px;
31
+ --fullhd-design-reference:' . ($options['full_hd_design_reference'] ?? 1920) . ';
32
+ --desktop-design-reference:' . ($options['desktop_design_reference'] ?? 1440) . ';
33
+ --landscape-design-reference:' . ($options['landscape_design_reference'] ?? 1024) . ';
34
+ --portrait-design-reference:' . ($options['portrait_design_reference'] ?? 1024) . ';
35
+ --mobile-design-reference:' . ($options['mobile_design_reference'] ?? 1024) . ';
36
+ --global-content-max-width-setting:' . ($options['global_content_max_width_setting'] ?? 1024) . ';
37
+ --post-colour:' . ($current_post && (property_exists($current_post, 'meta') && isset($current_post->meta['post_colour'])) ? $current_post->meta['post_colour'] : '') . ';
38
+ --post-text-colour-style:' . ($current_post && (property_exists($current_post, 'meta') && isset($current_post->meta['post_text_colour_style'])) ? remove_underscore($current_post->meta['post_text_colour_style']) : '') . ';
39
+ }</style>';
40
+ }
41
+ }
42
+ return [$output];
43
+ } // END function core_design_vars
44
+ // @codingStandardsIgnoreEnd
@@ -24,8 +24,8 @@ h5,
24
24
  h6 {
25
25
  margin: 0; //reset default margin
26
26
  font-weight: unset; //reset default font weight
27
- @include core-typography-mixins-v3.fontPrimary();
28
27
  margin-top: unset;
28
+ @include core-typography-mixins-v3.fontPrimary();
29
29
  }
30
30
  .override-element-styles {
31
31
  h1,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@total_onion/onion-library",
3
- "version": "1.0.84",
3
+ "version": "1.0.85",
4
4
  "description": "Component library",
5
5
  "main": "index.js",
6
6
  "scripts": {