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.
- package/.storybook/preview.js +1 -2
- package/CHANGELOG.md +17 -0
- package/package.json +1 -1
- package/src/components/atoms/menu/items/index.js +7 -11
- package/src/components/molecules/sticky/sticky.module.scss +1 -0
- package/src/components/organisms/navigation/navigation.stories.js +43 -44
- package/.storybook/storybook-styles/global.module.scss +0 -4
- package/.storybook/storybook-styles/navigation.module.scss +0 -36
- package/.storybook/storybook-styles.module.scss +0 -5
package/.storybook/preview.js
CHANGED
|
@@ -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
|
|
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
|
@@ -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
|
|
47
|
-
if (
|
|
48
|
-
|
|
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) {
|
|
@@ -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
|
-
<
|
|
203
|
-
<
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
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,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
|
-
}
|