@autobusal/routes-order 1.23.3 → 1.23.4

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,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.23.4
4
+
5
+ **The route code is a chip rather than a line of grey text.** Rounded, on the neutral background, bold and letter-spaced, with a route glyph (MdOutlineAltRoute) leading it and the word "Route" as its tooltip.
6
+
7
+ A route symbol rather than a bus or a ticket: the code identifies which LINE this is - the same job a flight number does - and a bus icon would only repeat what the whole card already says. The glyph is a size larger than the text beside it, because at this scale the icon carries the meaning and the letters are just the value.
8
+
9
+ Albanian `routes_order.step2.route.name` corrected from "Rruga" (a street) to "Linja" (a line). The key's only consumer is now this tooltip, so it was safe to fix.
10
+
3
11
  ## 1.23.3
4
12
 
5
13
  **The arrival heading was painting over the price.** Measured: the arrival cell is 165px wide and its content needed **215px**, so it ran 50px into the fare beside it.
@@ -3,6 +3,7 @@ import { TFunction } from 'i18next';
3
3
  import { HiOutlineArrowNarrowRight, HiOutlineDocumentText, HiChevronDown, HiChevronUp } from 'react-icons/hi';
4
4
  import { BiHourglass } from 'react-icons/bi';
5
5
  import { RiBus2Line } from 'react-icons/ri';
6
+ import { MdOutlineAltRoute } from 'react-icons/md';
6
7
  import { formatDuration, splitPrice } from '../refine';
7
8
  import { Button, RouteFeature, Information, Rating } from '@autobusal/common';
8
9
  import { Container, ButtonDetails, SpecialOffer, FavoriteStop, Trip, Company, Location, Stop, Iso, Time, Price, Amount, Decimals, Currency, PriceNotice, LinkCompany, CodeCompany, Details, Detail, ButtonPolicy, TitleDetail, FeaturesItems, Leaves } from './styles';
@@ -92,7 +93,10 @@ const Route = ({ data, type, passengers, t, onSave, children }: Props): JSX.Elem
92
93
  identifier of the same kind as the logo above it, and moving it
93
94
  here frees a slot in the details row for things that actually
94
95
  need explaining - customs on a cross-border run, for one. */ }
95
- <CodeCompany to={ bookOnUrl ?? data.link } target="_blank" rel="noopener noreferrer">{ data.code }</CodeCompany>
96
+ <CodeCompany to={ bookOnUrl ?? data.link } target="_blank" rel="noopener noreferrer" title={ t('routes_order.step2.route.name') }>
97
+ <MdOutlineAltRoute />
98
+ { data.code }
99
+ </CodeCompany>
96
100
  </Company>
97
101
 
98
102
  <Location>
@@ -439,9 +439,41 @@ export const LinkCompany = styled(Link)`
439
439
  * frees a slot in the details row for things that genuinely need explaining.
440
440
  */
441
441
  export const CodeCompany = styled(Link)`
442
- font-size: ${ props => props.theme.size.xxs };
442
+ display: inline-flex;
443
+ align-items: center;
444
+ gap: 4px;
445
+ max-width: 100%;
446
+ padding: 2px 8px;
447
+ border: 1px solid ${ props => props.theme.background.neutral };
448
+ border-radius: 100px;
449
+ background: ${ props => props.theme.background.neutral };
443
450
  color: ${ props => props.theme.font.faded };
444
- line-height: 1.2;
451
+ font-size: ${ props => props.theme.size.xxs };
452
+ font-weight: 700;
453
+ line-height: 1.4;
454
+ letter-spacing: .3px;
455
+ white-space: nowrap;
456
+ overflow: hidden;
457
+ text-overflow: ellipsis;
458
+ transition: all .3s ease;
459
+
460
+ /*
461
+ * A route symbol rather than a bus or a ticket. The code identifies which
462
+ * LINE this is - the same job a flight number does - and a bus icon would
463
+ * say the thing the whole card already says. Slightly larger than the text
464
+ * beside it, because at this size the glyph is what carries the meaning
465
+ * and the letters are only the value.
466
+ */
467
+ & > svg {
468
+ flex-shrink: 0;
469
+ font-size: ${ props => props.theme.size.s };
470
+ opacity: .8;
471
+ }
472
+
473
+ &:hover {
474
+ border-color: ${ props => props.theme.primary.normal };
475
+ color: ${ props => props.theme.primary.normal };
476
+ }
445
477
  `;
446
478
 
447
479
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autobusal/routes-order",
3
- "version": "1.23.3",
3
+ "version": "1.23.4",
4
4
  "author": "Ferjolt Ozuni",
5
5
  "type": "module",
6
6
  "main": "index.ts"