gatsby-matrix-theme 48.0.5 → 48.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,25 @@
1
+ ## [48.0.7](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v48.0.6...v48.0.7) (2024-07-25)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * updated operator details + theme version ([2d9e752](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/2d9e7521fd6d6b504fce6f69ddb3488998342c03))
7
+
8
+ ## [48.0.6](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v48.0.5...v48.0.6) (2024-07-22)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * change to env demo ([c6c0f9c](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/c6c0f9ce3d22fe97cf0bf977b27c79a3560a70ea))
14
+
15
+
16
+ ### Code Refactoring
17
+
18
+ * changes to horse calc iphone select/tooltip issue ([8b4e7c6](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/8b4e7c6a77f433c0beb4395c2847587507c45b0e))
19
+
20
+
21
+ * Merge branch 'tm-4544-horse-calculator' into 'master' ([f74e490](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/commit/f74e49009d7c54017ad639642125559a189eefcc))
22
+
1
23
  ## [48.0.5](https://git.ilcd.rocks/team-floyd/themes/matrix-theme/compare/v48.0.4...v48.0.5) (2024-07-19)
2
24
 
3
25
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gatsby-matrix-theme",
3
- "version": "48.0.5",
3
+ "version": "48.0.7",
4
4
  "main": "index.js",
5
5
  "description": "Matrix Theme NPM Package",
6
6
  "author": "",
@@ -25,7 +25,7 @@
25
25
  "dependencies": {
26
26
  "@react-icons/all-files": "^4.1.0",
27
27
  "gatsby": "^5.11.0",
28
- "gatsby-core-theme": "35.0.3",
28
+ "gatsby-core-theme": "35.0.5",
29
29
  "gatsby-plugin-sharp": "^5.11.0",
30
30
  "gatsby-transformer-sharp": "^5.11.0",
31
31
  "prop-types": "15.7.2",
@@ -17,13 +17,14 @@ export default function Select({
17
17
  index,
18
18
  tooltip = null,
19
19
  tooltipMinWidth = 10,
20
+ customClass = null,
20
21
  }) {
21
22
  if (!label) {
22
23
  return (
23
24
  <div
24
- className={`${styles?.dropdownStyling || ''} ${
25
- tooltip ? styles.tooltip || '' : styles.fullWidth || ''
26
- }`}
25
+ className={`${styles?.dropdownStyling || ''} ${styles.noLabel || ''} ${
26
+ customClass ? customClass || '' : ''
27
+ } ${tooltip ? styles.tooltip || '' : styles.fullWidth || ''}`}
27
28
  >
28
29
  <select ref={refObj} onChange={(e) => onChangeFunc(e, index)} id={id}>
29
30
  {options.map((option) => option)}
@@ -38,9 +39,9 @@ export default function Select({
38
39
  }
39
40
 
40
41
  return (
41
- <label htmlFor={id}>
42
- <div>
43
- {useTranslate(id, label)}
42
+ <div className={`${styles.selectContainer || ''} ${customClass ? customClass || '' : ''}`}>
43
+ <div className={styles.labelContainer || ''}>
44
+ <label htmlFor={id}>{useTranslate(id, label)}</label>
44
45
  {tooltip && (
45
46
  <Tooltip content={useTranslate(`${id}_tooltip`, tooltip)} minWidth={tooltipMinWidth}>
46
47
  <BsQuestionCircle size="2.6rem" title="Question Icon" />
@@ -56,7 +57,7 @@ export default function Select({
56
57
  {options.map((option) => option)}
57
58
  </select>
58
59
  </div>
59
- </label>
60
+ </div>
60
61
  );
61
62
  }
62
63
 
@@ -69,4 +70,5 @@ Select.propTypes = {
69
70
  index: PropTypes.number,
70
71
  tooltip: PropTypes.string,
71
72
  tooltipMinWidth: PropTypes.number,
73
+ customClass: PropTypes.string,
72
74
  };
@@ -135,31 +135,6 @@
135
135
  gap: 1.6rem;
136
136
  @include flex-direction(column);
137
137
  > label {
138
- > div {
139
- color: #1b1b1c;
140
- font-size: 1.6rem;
141
- font-style: normal;
142
- font-weight: 600;
143
- line-height: 2.4rem;
144
- text-transform: capitalize;
145
- @include flex-direction(row);
146
- @include flex-align(center, start);
147
- gap: 0.8rem;
148
- > div {
149
- width: 2rem;
150
- height: 2rem;
151
- svg {
152
- width: 2rem;
153
- height: 2rem;
154
- fill: #50657a;
155
- }
156
- }
157
- &::after {
158
- right: 1.6rem;
159
- left: auto;
160
- pointer-events: none;
161
- }
162
- }
163
138
  }
164
139
  select {
165
140
  width: 100%;
@@ -181,16 +156,45 @@
181
156
  display: grid;
182
157
  grid-template-columns: repeat(3, 1fr);
183
158
  }
159
+ }
184
160
 
185
- > label {
186
- @include flex-direction(column);
187
- flex-basis: 50%;
188
- gap: 1rem;
189
- font-weight: 700;
190
- font-size: 16px;
191
- line-height: 23px;
161
+ .selectesSelect {
162
+ @include flex-direction(column);
163
+ flex-basis: 50%;
164
+ gap: 1rem;
165
+ font-weight: 700;
166
+ font-size: 16px;
167
+ line-height: 23px;
168
+
169
+ > div {
170
+ color: #1b1b1c;
171
+ font-size: 1.6rem;
172
+ font-style: normal;
173
+ font-weight: 600;
174
+ line-height: 2.4rem;
175
+ text-transform: capitalize;
176
+ @include flex-direction(row);
177
+ @include flex-align(center, start);
178
+ gap: 0.8rem;
179
+
180
+ > div {
181
+ width: 2rem;
182
+ height: 2rem;
183
+ svg {
184
+ width: 2rem;
185
+ height: 2rem;
186
+ fill: #50657a;
187
+ }
188
+ }
189
+
190
+ &::after {
191
+ right: 1.6rem;
192
+ left: auto;
193
+ pointer-events: none;
194
+ }
192
195
  }
193
196
  }
197
+
194
198
  .stakeType {
195
199
  border-radius: 8px;
196
200
  background: #fbfaf9;
@@ -202,6 +206,8 @@
202
206
  display: grid;
203
207
  grid-template-columns: repeat(2, 1fr);
204
208
  }
209
+
210
+ .stakeTypeSelect,
205
211
  label {
206
212
  color: #1b1b1c;
207
213
  font-size: 16px;
@@ -209,10 +215,12 @@
209
215
  font-weight: 600;
210
216
  line-height: 24px;
211
217
  text-transform: capitalize;
218
+ @include flex-direction(column);
219
+ gap: 0.8rem;
220
+
212
221
  > div {
213
222
  select,
214
223
  input {
215
- margin-top: 0.8rem;
216
224
  border-radius: 8px;
217
225
  border: 1px solid #b0d0d0;
218
226
  background: #fff;
@@ -272,6 +272,7 @@ const HorseCalculator = ({ mainTitle = 'Bet Calculator', tooltipMinWidth = 20 })
272
272
  ))}
273
273
  refObj={betTypeRef}
274
274
  tooltipMinWidth={tooltipMinWidth}
275
+ customClass={styles.selectesSelect}
275
276
  />
276
277
 
277
278
  <Select
@@ -286,6 +287,7 @@ const HorseCalculator = ({ mainTitle = 'Bet Calculator', tooltipMinWidth = 20 })
286
287
  </option>,
287
288
  ]}
288
289
  tooltipMinWidth={tooltipMinWidth}
290
+ customClass={styles.selectesSelect}
289
291
  />
290
292
 
291
293
  {eachWay === 'Yes' && activeBetType.multiple_options && (
@@ -309,6 +311,7 @@ const HorseCalculator = ({ mainTitle = 'Bet Calculator', tooltipMinWidth = 20 })
309
311
  </option>,
310
312
  ]}
311
313
  tooltipMinWidth={tooltipMinWidth}
314
+ customClass={styles.selectesSelect}
312
315
  />
313
316
  )}
314
317
 
@@ -323,6 +326,7 @@ const HorseCalculator = ({ mainTitle = 'Bet Calculator', tooltipMinWidth = 20 })
323
326
  ))}
324
327
  refObj={numSelectionRef}
325
328
  tooltipMinWidth={tooltipMinWidth}
329
+ customClass={styles.selectesSelect}
326
330
  />
327
331
  )}
328
332
 
@@ -338,6 +342,7 @@ const HorseCalculator = ({ mainTitle = 'Bet Calculator', tooltipMinWidth = 20 })
338
342
  </option>,
339
343
  ]}
340
344
  tooltipMinWidth={tooltipMinWidth}
345
+ customClass={styles.selectesSelect}
341
346
  />
342
347
  </div>
343
348
  <div className={styles.stakeType}>
@@ -354,6 +359,7 @@ const HorseCalculator = ({ mainTitle = 'Bet Calculator', tooltipMinWidth = 20 })
354
359
  </option>,
355
360
  ]}
356
361
  tooltipMinWidth={tooltipMinWidth}
362
+ customClass={styles.stakeTypeSelect}
357
363
  />
358
364
  {!(activeBetType.name === 'Accumulator' && foldOption === '2') && (
359
365
  <label htmlFor="stake">
@@ -402,6 +408,7 @@ const HorseCalculator = ({ mainTitle = 'Bet Calculator', tooltipMinWidth = 20 })
402
408
  ))}
403
409
  index={index}
404
410
  tooltipMinWidth={tooltipMinWidth}
411
+ customClass={styles.overflowTableSelect}
405
412
  />
406
413
  </td>
407
414
  <td
@@ -438,6 +445,7 @@ const HorseCalculator = ({ mainTitle = 'Bet Calculator', tooltipMinWidth = 20 })
438
445
  <option value={option}>{option}</option>
439
446
  ))}
440
447
  tooltipMinWidth={tooltipMinWidth}
448
+ customClass={styles.overflowTableSelect}
441
449
  />
442
450
  </td>
443
451
  )}
@@ -450,6 +458,7 @@ const HorseCalculator = ({ mainTitle = 'Bet Calculator', tooltipMinWidth = 20 })
450
458
  <option value={option}>{option}</option>
451
459
  ))}
452
460
  tooltipMinWidth={tooltipMinWidth}
461
+ customClass={styles.overflowTableSelect}
453
462
  />
454
463
  </td>
455
464
  )}
@@ -473,6 +482,7 @@ const HorseCalculator = ({ mainTitle = 'Bet Calculator', tooltipMinWidth = 20 })
473
482
  <option value={i + 1}>{i + 1}</option>
474
483
  ))}
475
484
  tooltipMinWidth={tooltipMinWidth}
485
+ customClass={styles.overflowTableSelect}
476
486
  />
477
487
  <Select
478
488
  id="deadheatrunners"
@@ -482,6 +492,7 @@ const HorseCalculator = ({ mainTitle = 'Bet Calculator', tooltipMinWidth = 20 })
482
492
  <option value={i + 1}>{i + 1}</option>
483
493
  ))}
484
494
  tooltipMinWidth={tooltipMinWidth}
495
+ customClass={styles.overflowTableSelect}
485
496
  />
486
497
  <Select
487
498
  id="placesoffered"
@@ -491,6 +502,7 @@ const HorseCalculator = ({ mainTitle = 'Bet Calculator', tooltipMinWidth = 20 })
491
502
  <option value={i + 1}>{i + 1}</option>
492
503
  ))}
493
504
  tooltipMinWidth={tooltipMinWidth}
505
+ customClass={styles.overflowTableSelect}
494
506
  />
495
507
  </div>
496
508
  </td>
@@ -5,6 +5,7 @@ import LazyImage from 'gatsby-core-theme/src/hooks/lazy-image';
5
5
  import Link from 'gatsby-core-theme/src/hooks/link';
6
6
  import { imagePrettyUrl, getAltText } from 'gatsby-core-theme/src/helpers/getters';
7
7
  import StarRating from 'gatsby-core-theme/src/components/molecules/star-rating/one-star';
8
+ import MultiStarRating from 'gatsby-core-theme/src/components/molecules/star-rating/';
8
9
  import ReviewLink from 'gatsby-core-theme/src/components/atoms/review-link';
9
10
  import useTranslate from '~hooks/useTranslate/useTranslate';
10
11
  import Author from '../../atoms/author/template-one';
@@ -24,7 +25,7 @@ const OperatorDetails = ({
24
25
  showAuthorAsLink = true,
25
26
  showRibbon = false,
26
27
  contentRibbon = false,
27
- useOneStarRating = true,
28
+ useOneStarRating = false,
28
29
  showRatingLabel = false,
29
30
  showRatingDecimal = false,
30
31
  authorTemplateTwo = false,
@@ -128,15 +129,24 @@ const OperatorDetails = ({
128
129
  ${(!useOneStarRating && styles.starRatings) || ''}
129
130
  ${(showRatingLabel && useOneStarRating && styles.ratinglabel) || ''}`}
130
131
  >
131
- {showRating && (
132
- <StarRating
133
- numOfStars={5}
134
- rating={rating}
135
- showLabel={showRatingLabel}
136
- showDecimal={showRatingDecimal}
137
- showRoundedRating={showRoundedRating}
138
- />
139
- )}
132
+ {showRating &&
133
+ (useOneStarRating ? (
134
+ <StarRating
135
+ numOfStars={5}
136
+ rating={rating}
137
+ showLabel={showRatingLabel}
138
+ showDecimal={showRatingDecimal}
139
+ showRoundedRating={showRoundedRating}
140
+ />
141
+ ) : (
142
+ <MultiStarRating
143
+ numOfStars={5}
144
+ rating={rating}
145
+ showLabel={showRatingLabel}
146
+ showDecimal={showRatingDecimal}
147
+ showRoundedRating={showRoundedRating}
148
+ />
149
+ ))}
140
150
  {showAuthor && (
141
151
  <Author
142
152
  label={useTranslate('byAuthor', 'By')}