gatsby-core-theme 35.0.5 → 35.0.7

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/CHANGELOG.md CHANGED
@@ -1,3 +1,27 @@
1
+ ## [35.0.7](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v35.0.6...v35.0.7) (2024-07-26)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * qa fixes ([ed24307](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/ed2430714cc4778624ef9403deaa91ec8f7b3325))
7
+
8
+
9
+ * Merge branch 'tm-4071-market-dropdown' into 'master' ([1eae8bb](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/1eae8bbf04314adf5cd35d8765d8b449bad5c66b))
10
+ * Merge branch 'master' into tm-4071-market-dropdown ([a1148fa](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/a1148fa995863a4de4a15d6d94c39edfd495b64d))
11
+
12
+ ## [35.0.6](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v35.0.5...v35.0.6) (2024-07-26)
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * moved cookie from matrix to core ([f9a46dc](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/f9a46dcb3884d6b4d56008c453f3fe1b41ed4136))
18
+ * storybook ([940d628](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/940d62857be4aef2906a7635b7a7937be14efa59))
19
+ * storybook images ([8a8768f](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/8a8768f61bbb795839ac350f26bde45ab76dcd5b))
20
+ * storybook images ([ab3b4a1](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/ab3b4a12bd146765695f52ebaf46d6c1db323abf))
21
+
22
+
23
+ * Merge branch 'tm-4595-cookie-consent-body' into 'master' ([a185198](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/a185198117b92f2002b89003fac8f28ec645c655))
24
+
1
25
  ## [35.0.5](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v35.0.4...v35.0.5) (2024-07-25)
2
26
 
3
27
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gatsby-core-theme",
3
- "version": "35.0.5",
3
+ "version": "35.0.7",
4
4
  "description": "Gatsby Theme NPM Package",
5
5
  "author": "",
6
6
  "license": "ISC",
@@ -15,25 +15,29 @@
15
15
  .dropdownInner{
16
16
  cursor: pointer;
17
17
  background-color: #F4F4F4;
18
- padding: .4rem;
18
+ padding: .7rem 0.4rem;
19
19
 
20
20
  @include flex-direction(row);
21
21
  @include flex-align(center, center);
22
22
 
23
- gap: .4rem;
23
+ gap: 1.1rem;
24
24
  border-radius:.8rem;
25
25
 
26
- &::after{
27
- @include arrow(rgba(27, 27, 28, 1), 0.8rem, down, false, translateY(-50%));
28
-
29
- margin: .8rem .4rem .4rem;
26
+ @include min(tablet){
27
+ &::after{
28
+ @include arrow(rgba(27, 27, 28, 1), 0.8rem, down, false, translateY(-50%));
29
+
30
+ margin: .8rem .4rem .4rem;
31
+ }
30
32
  }
31
33
  }
32
34
 
33
- .dropdownActive::after{
34
- @include arrow(rgba(27, 27, 28, 1), 0.8rem, up, false, translateY(50%));
35
+ @include min(tablet){
36
+ .dropdownActive::after{
37
+ @include arrow(rgba(27, 27, 28, 1), 0.8rem, up, false, translateY(50%));
35
38
 
36
- margin: .4rem .4rem .8rem;
39
+ margin: .4rem .4rem .8rem;
40
+ }
37
41
  }
38
42
 
39
43
  .dropdownOptions {
@@ -41,7 +45,7 @@
41
45
  background-color: #fff;
42
46
  top: 100%;
43
47
  padding: 1.6rem;
44
- border-radius: 0.4rem;
48
+ border-radius: 0.8rem;
45
49
  gap: 0.6rem;
46
50
  flex-direction: column;
47
51
  height: 100dvh;
@@ -49,6 +53,8 @@
49
53
  right: 0;
50
54
  display: none !important;
51
55
  box-shadow: 0 20px 24px -4px rgb(27 27 28 / 5%);
56
+ overflow-y: auto;
57
+ padding-bottom: 50dvh;
52
58
 
53
59
  @include flex-align(start, start);
54
60
 
@@ -92,12 +98,13 @@
92
98
  background-color: rgb(244 244 244 / 100%);
93
99
  padding: .9rem .4rem;
94
100
  border-radius: .8rem;
95
- color: #0f172a;
101
+ color: #1B1B1C;
96
102
  text-transform: capitalize;
97
103
  gap: .4rem;
104
+ font-weight: 400;
98
105
 
99
106
  &:hover{
100
- background-color: #fff;
107
+ font-weight: 700;
101
108
  }
102
109
 
103
110
  > img {
@@ -108,7 +115,6 @@
108
115
  > span {
109
116
  font-size: 14px;
110
117
  font-style: normal;
111
- font-weight: 400;
112
118
  line-height: 22px;
113
119
  }
114
120
 
@@ -0,0 +1,37 @@
1
+ /* eslint-disable jsx-a11y/click-events-have-key-events */
2
+ /* eslint-disable jsx-a11y/no-static-element-interactions */
3
+ import React from 'react';
4
+ import PropTypes from 'prop-types';
5
+ import styles from './toggle-button.module.scss';
6
+
7
+ const ToggleButton = ({ icon1, icons2, state, setStateFunc }) => (
8
+ <div className={styles?.wrgtoggle || ''} onClick={() => setStateFunc(!state)}>
9
+ <div
10
+ className={`${styles?.wrgtogglecontainer || ''} ${
11
+ state ? styles?.wrgtogglecontainerOn || '' : ''
12
+ }`}
13
+ >
14
+ <div className={styles?.wrgtogglecheck || ''}>
15
+ <span>{icon1}</span>
16
+ </div>
17
+ <div className={styles?.wrgtoggleuncheck || ''}>
18
+ <span>{icons2}</span>
19
+ </div>
20
+ </div>
21
+
22
+ <div
23
+ className={`${styles?.wrgtogglecircle || ''} ${
24
+ state ? styles?.wrgtogglecircleAgreed || '' : ''
25
+ }`}
26
+ />
27
+ </div>
28
+ );
29
+
30
+ ToggleButton.propTypes = {
31
+ icon1: PropTypes.elementType,
32
+ icons2: PropTypes.elementType,
33
+ state: PropTypes.bool,
34
+ setStateFunc: PropTypes.func,
35
+ };
36
+
37
+ export default ToggleButton;
@@ -0,0 +1,56 @@
1
+ .wrgtoggle {
2
+ touch-action: pan-x;
3
+ display: inline-block;
4
+ position: relative;
5
+ cursor: pointer;
6
+ background-color: transparent;
7
+ border: 0;
8
+ padding: 0;
9
+ -webkit-touch-callout: none;
10
+ -webkit-user-select: none;
11
+ -ms-user-select: none;
12
+ user-select: none;
13
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
14
+ -webkit-tap-highlight-color: transparent;
15
+ }
16
+
17
+ .wrgtoggleuncheck span,
18
+ .wrgtogglecheck span {
19
+ align-items: center;
20
+ display: flex;
21
+ height: 10px;
22
+ justify-content: center;
23
+ position: relative;
24
+ width: 10px;
25
+ }
26
+
27
+ .wrgtogglecontainer {
28
+ width: 4.8rem;
29
+ height: 2.4rem;
30
+ padding: 0;
31
+ border-radius: 30px;
32
+ background-color: var(--cookie-input-bg, #ced0dd);
33
+ transition: all 0.2s ease;
34
+ }
35
+
36
+ .wrgtogglecontainerOn {
37
+ background-color: var(--cookie-input-on-bg, #4DD792);
38
+ }
39
+
40
+ .wrgtogglecircle {
41
+ transition: all 0.2s cubic-bezier(0.23, 1, 0.32, 1) 0ms;
42
+ position: absolute;
43
+ top: 1px;
44
+ left: 1px;
45
+ width: 22px;
46
+ height: 22px;
47
+ border-radius: 50%;
48
+ background-color: var(--cookie-input-circle-bg, #fafafa);
49
+ box-sizing: border-box;
50
+ transition: all 0.2s ease;
51
+ }
52
+
53
+ .wrgtogglecircleAgreed {
54
+ right: 1px;
55
+ left: auto;
56
+ }
@@ -0,0 +1,76 @@
1
+ .categoryBox {
2
+ height: var(--categoryBox-height, 4.3rem);
3
+ overflow-y: hidden;
4
+ background-color: #f3f2f2;
5
+ border-radius: 0.8rem;
6
+ margin-top: 0.8rem;
7
+
8
+ .categoryHeader {
9
+ display: flex;
10
+ justify-content: space-between;
11
+ align-items: center;
12
+ padding: var(--categoryBox-padding, 0.8rem 1.6rem);
13
+ font-weight: 700;
14
+ font-size: 1.6rem;
15
+ line-height: 2.7rem;
16
+ color: #1b1b1c;
17
+
18
+ > p {
19
+ font-weight: 700;
20
+ font-size: 1.4rem;
21
+ line-height: 2.2rem;
22
+ text-align: right;
23
+ }
24
+
25
+ .boxTitle {
26
+ display: flex;
27
+ align-items: center;
28
+ white-space: nowrap;
29
+ overflow: hidden;
30
+ text-overflow: ellipsis;
31
+ > span {
32
+ margin: 0px;
33
+ padding-left: 0.8rem;
34
+ font-weight: 700;
35
+ font-size: 16px;
36
+ line-height: 24px;
37
+ white-space: nowrap;
38
+ overflow: hidden;
39
+ text-overflow: ellipsis;
40
+ }
41
+ }
42
+ }
43
+
44
+ .categoryText {
45
+ background-color: white;
46
+ margin: 1.5px;
47
+ padding: 1.6rem;
48
+ font-weight: 400;
49
+ font-size: 1.4rem;
50
+ line-height: 2.2rem;
51
+ color: var(--categoryText-color, #515156);
52
+ max-height: 10rem;
53
+ overflow-y: auto;
54
+
55
+ @include min(tablet){
56
+ &::-webkit-scrollbar {
57
+ height: 4px;
58
+ width: 4px;
59
+ }
60
+
61
+ /* Track */
62
+ &::-webkit-scrollbar-track {
63
+ background: white;
64
+ }
65
+
66
+ /* Handle */
67
+ &::-webkit-scrollbar-thumb {
68
+ background: #d4d7da;
69
+ }
70
+ }
71
+ }
72
+ }
73
+
74
+ .showFullCategory {
75
+ height: auto;
76
+ }
@@ -0,0 +1,60 @@
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import { AiOutlinePlus } from '@react-icons/all-files/ai/AiOutlinePlus';
4
+ import { AiOutlineMinus } from '@react-icons/all-files/ai/AiOutlineMinus';
5
+ import useTranslate from '~hooks/useTranslate/useTranslate';
6
+ import ToggleButton from '../../../atoms/toggle-button';
7
+
8
+ import styles from './category.module.scss';
9
+
10
+ const CategoryContainer = ({
11
+ obj,
12
+ index,
13
+ currentState,
14
+ updateState,
15
+ currentSection,
16
+ setCurrentSection,
17
+ openSign = <AiOutlineMinus title="Minus Icon" />,
18
+ closeSign = <AiOutlinePlus title="Plus Icon" />,
19
+ }) => (
20
+ <div>
21
+ <div
22
+ aria-hidden="true"
23
+ className={`${styles.categoryBox} ${currentSection === index && styles.showFullCategory}`}
24
+ onClick={() => setCurrentSection(index)}
25
+ >
26
+ <div className={styles.categoryHeader}>
27
+ <div className={styles.boxTitle}>
28
+ {currentSection === index ? openSign : closeSign}
29
+ <span>{useTranslate(obj?.translateKey, obj?.altTranslation)}</span>
30
+ </div>
31
+ {obj?.button ? (
32
+ <ToggleButton state={currentState} setStateFunc={updateState} />
33
+ ) : (
34
+ <p>{useTranslate('cookie_container_always_text', 'Always Enabled')}</p>
35
+ )}
36
+ </div>
37
+ <div className={styles.categoryText}>{useTranslate(obj?.textKey, obj?.defaultText)}</div>
38
+ </div>
39
+ </div>
40
+ );
41
+
42
+ CategoryContainer.propTypes = {
43
+ obj: PropTypes.shape({
44
+ translateKey: PropTypes.string,
45
+ altTranslation: PropTypes.string,
46
+ textKey: PropTypes.string,
47
+ button: PropTypes.bool,
48
+ defaultText: PropTypes.string,
49
+ }),
50
+ index: PropTypes.number,
51
+ currentState: PropTypes.bool,
52
+ updateState: PropTypes.func,
53
+ currentSection: PropTypes.number,
54
+ setCurrentSection: PropTypes.func,
55
+ translations: PropTypes.shape({}),
56
+ openSign: PropTypes.shape({}),
57
+ closeSign: PropTypes.shape({}),
58
+ };
59
+
60
+ export default CategoryContainer;
@@ -0,0 +1,57 @@
1
+ import React from 'react';
2
+ // eslint-disable-next-line import/no-extraneous-dependencies
3
+ import {
4
+ Title,
5
+ Description,
6
+ Primary,
7
+ PRIMARY_STORY,
8
+ ArgsTable,
9
+ } from '@storybook/addon-docs/blocks';
10
+ import logoImg from '../../../../static/images/logo.svg';
11
+ import CookieModal from '.';
12
+
13
+ export default {
14
+ title: 'Theme/Layout/Cookie/Settings/Template Two',
15
+ component: CookieModal,
16
+ args: {
17
+ translations: {
18
+ privacy_preference_title: 'Privacy Preference Center',
19
+ privacy_preference_text:
20
+ "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged",
21
+ neccesary_cookie_title: 'Necessary',
22
+ neccesary_cookie_text: 'Lorem Ipsum',
23
+ analytical_cookie_title: 'Analytical And Stadistical',
24
+ analytical_cookie_text: 'Lorem Ipsum',
25
+ marketing_cookie_title: 'Marketing',
26
+ marketing_cookie_text: 'Lorem Ipsum',
27
+ },
28
+ cookieLink: {
29
+ title: 'Cookie Consent Text',
30
+ path: '/cookie',
31
+ },
32
+ },
33
+
34
+ argTypes: {},
35
+ parameters: {
36
+ docs: {
37
+ description: {
38
+ component: 'A component that displays Cookie Modal',
39
+ },
40
+ page: () => (
41
+ <>
42
+ <Title />
43
+ <Description />
44
+ <Primary />
45
+ <ArgsTable story={PRIMARY_STORY} />
46
+ </>
47
+ ),
48
+ },
49
+ },
50
+ };
51
+
52
+ const Template = (args) => <CookieModal {...args} />;
53
+ export const Default = Template.bind({});
54
+ Default.args = {
55
+ logo: logoImg,
56
+ templateTwo: true,
57
+ };