gatsby-core-theme 23.0.0 → 23.0.2

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.
@@ -1,6 +1,5 @@
1
1
  import '../gatsby-browser';
2
2
  import React from 'react';
3
- import styles from './storybook-styles.module.scss';
4
3
 
5
4
  global.___loader = {
6
5
  enqueue: () => {},
@@ -28,7 +27,7 @@ export const parameters = {
28
27
  // Global decorators for stories
29
28
  export const decorators = [
30
29
  (Story) => (
31
- <div className={styles.storyMainContainer}>
30
+ <div>
32
31
  <Story />
33
32
  </div>
34
33
  ),
package/CHANGELOG.md CHANGED
@@ -1,3 +1,20 @@
1
+ ## [23.0.2](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v23.0.1...v23.0.2) (2023-06-23)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * fix for ltr sites ([cce6e0d](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/cce6e0dc0d96250f1cf7f79e1a80d38250d7a8e2))
7
+
8
+
9
+ * Merge branch 'tm-3475-main-menu' into 'master' ([93f61fb](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/93f61fb0644bf8c7ace8e0cf0ed455f8e623207b))
10
+
11
+ ## [23.0.1](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v23.0.0...v23.0.1) (2023-06-23)
12
+
13
+
14
+ ### Bug Fixes
15
+
16
+ * storybook styling ([96b0148](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/96b01489b2da7663fb5afba205e79f71bf0cdff2))
17
+
1
18
  # [23.0.0](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v22.0.15...v23.0.0) (2023-06-23)
2
19
 
3
20
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gatsby-core-theme",
3
- "version": "23.0.0",
3
+ "version": "23.0.2",
4
4
  "description": "Gatsby Theme NPM Package",
5
5
  "main": "index.js",
6
6
  "GATSBY_RECAPTCHA_SITEKEY": "6LfoyvMUAAAAAO4nl_MQnqHb4XdHxEiu5cXgIqeB",
@@ -41,19 +41,15 @@ const Items = ({
41
41
 
42
42
  const onClick = (e) => {
43
43
  const { target } = e;
44
- const { width } = target.getBoundingClientRect();
45
44
 
46
- // check if clicked within the arrow area which has a padding of 4.8rem on the li tag
47
- if (e.nativeEvent.layerX > width - dropdownButtonWidth) {
48
- // check if multiple submenus can be opened at same time, if not close them
49
- if (!canOpenAllSubMenus) {
50
- closeOtherMenus(target);
51
- }
52
-
53
- // toggle the clicked menu item
54
- target.classList.toggle(styles.showSubMenu);
55
- target.getElementsByTagName('UL')[0]?.classList.toggle(styles.show);
45
+ // check if multiple submenus can be opened at same time, if not close them
46
+ if (!canOpenAllSubMenus) {
47
+ closeOtherMenus(target);
56
48
  }
49
+
50
+ // toggle the clicked menu item
51
+ target.classList.toggle(styles.showSubMenu);
52
+ target.getElementsByTagName('UL')[0]?.classList.toggle(styles.show);
57
53
  };
58
54
 
59
55
  if (item.children) {
@@ -6,6 +6,7 @@
6
6
 
7
7
  &.top {
8
8
  top: 0;
9
+ left: 0;
9
10
  bottom: auto;
10
11
  }
11
12
 
@@ -10,7 +10,7 @@ import {
10
10
 
11
11
  import MainProvider from '~context/MainProvider';
12
12
  import Navigation from '.';
13
- import styles from '../../../../.storybook/storybook-styles/navigation.module.scss';
13
+ // import styles from '../../../../.storybook/storybook-styles/navigation.module.scss';
14
14
  import mlogo from '../../../../static/images/logo.svg';
15
15
  import getNavigation from '~tests/factories/sections/navigationStatic.factory';
16
16
 
@@ -199,49 +199,48 @@ export default {
199
199
  };
200
200
 
201
201
  const Template = (args) => (
202
- <div className={styles.navStoryContainer}>
203
- <MainProvider value={{}}>
204
- <Navigation {...args} />
205
- <main>
206
- <div className={styles.dummyContent}>
207
- <h2>
208
- Dummy content added for testing purposes. Toggle the controls <pre>Sticky</pre> (both
209
- desktop and mobile) and <pre>stopScrollOnOpen</pre> and <pre>mobileAnimation</pre> (for
210
- mobile) and then scroll this page to see the difference.
211
- <br />
212
- May have to refresh storybook to see this
213
- </h2>
214
- </div>
215
- <div className={styles.dummyContent}>
216
- Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has
217
- been the industrys standard dummy text ever since the 1500s, when an unknown printer took
218
- a galley of type and scrambled it to make a type specimen book. It has survived not only
219
- five centuries, but also the leap into electronic typesetting, remaining essentially
220
- unchanged. It was popularised in the 1960s with the release of Letraset sheets containing
221
- Lorem Ipsum passages, and more recently with desktop publishing software like Aldus
222
- PageMaker including versions of Lorem Ipsum.
223
- </div>
224
- <div className={styles.dummyContent}>
225
- Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has
226
- been the industrys standard dummy text ever since the 1500s, when an unknown printer took
227
- a galley of type and scrambled it to make a type specimen book. It has survived not only
228
- five centuries, but also the leap into electronic typesetting, remaining essentially
229
- unchanged. It was popularised in the 1960s with the release of Letraset sheets containing
230
- Lorem Ipsum passages, and more recently with desktop publishing software like Aldus
231
- PageMaker including versions of Lorem Ipsum.
232
- </div>
233
- <div className={styles.dummyContent}>
234
- Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has
235
- been the industrys standard dummy text ever since the 1500s, when an unknown printer took
236
- a galley of type and scrambled it to make a type specimen book. It has survived not only
237
- five centuries, but also the leap into electronic typesetting, remaining essentially
238
- unchanged. It was popularised in the 1960s with the release of Letraset sheets containing
239
- Lorem Ipsum passages, and more recently with desktop publishing software like Aldus
240
- PageMaker including versions of Lorem Ipsum.
241
- </div>
242
- </main>
243
- </MainProvider>
244
- </div>
202
+ <MainProvider value={{}}>
203
+ <Navigation {...args} />
204
+
205
+ <main>
206
+ <div>
207
+ <h2>
208
+ Dummy content added for testing purposes. Toggle the controls <pre>Sticky</pre> (both
209
+ desktop and mobile) and <pre>stopScrollOnOpen</pre> and <pre>mobileAnimation</pre> (for
210
+ mobile) and then scroll this page to see the difference.
211
+ <br />
212
+ May have to refresh storybook to see this
213
+ </h2>
214
+ </div>
215
+ <div>
216
+ Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has
217
+ been the industrys standard dummy text ever since the 1500s, when an unknown printer took a
218
+ galley of type and scrambled it to make a type specimen book. It has survived not only five
219
+ centuries, but also the leap into electronic typesetting, remaining essentially unchanged.
220
+ It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum
221
+ passages, and more recently with desktop publishing software like Aldus PageMaker including
222
+ versions of Lorem Ipsum.
223
+ </div>
224
+ <div>
225
+ Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has
226
+ been the industrys standard dummy text ever since the 1500s, when an unknown printer took a
227
+ galley of type and scrambled it to make a type specimen book. It has survived not only five
228
+ centuries, but also the leap into electronic typesetting, remaining essentially unchanged.
229
+ It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum
230
+ passages, and more recently with desktop publishing software like Aldus PageMaker including
231
+ versions of Lorem Ipsum.
232
+ </div>
233
+ <div>
234
+ Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has
235
+ been the industrys standard dummy text ever since the 1500s, when an unknown printer took a
236
+ galley of type and scrambled it to make a type specimen book. It has survived not only five
237
+ centuries, but also the leap into electronic typesetting, remaining essentially unchanged.
238
+ It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum
239
+ passages, and more recently with desktop publishing software like Aldus PageMaker including
240
+ versions of Lorem Ipsum.
241
+ </div>
242
+ </main>
243
+ </MainProvider>
245
244
  );
246
245
  export const Default = Template.bind({});
247
246
  Default.args = {};
@@ -1,4 +0,0 @@
1
- .storyMainContainer {
2
- margin: 1.5rem auto 0;
3
- max-width: 96rem;
4
- }
@@ -1,36 +0,0 @@
1
- .navStoryContainer {
2
- position: relative;
3
- width: 100%;
4
- height: calc(100vh - 5rem);
5
-
6
- // added so that nav is visible on storybook without stretched beyond the viewport due to position:fixed
7
- > div {
8
- max-width: 96rem;
9
- width: calc(100vw - 20px);
10
- }
11
-
12
- nav {
13
- padding: 0 10px;
14
- }
15
-
16
- // dummy content styles
17
- main {
18
- padding-top: var(--nav-height);
19
- background-color: var(--color-4);
20
-
21
- pre {
22
- display: inline;
23
- }
24
-
25
- .dummyContent {
26
- letter-spacing: 0.2rem;
27
- margin: 5rem auto;
28
- width: 80vw;
29
-
30
- @include min(laptop) {
31
- margin: 10rem auto;
32
- width: 60vw;
33
- }
34
- }
35
- }
36
- }
@@ -1,5 +0,0 @@
1
- // Storybook styles extended in each theme
2
-
3
- // Storybook Styles
4
- @import './storybook-styles/global.module.scss';
5
- @import './storybook-styles/navigation.module.scss';