@autobusal/routes-order 1.23.1 → 1.23.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/CHANGELOG.md +5 -0
- package/Found/Dates/styles.ts +12 -4
- package/Step5/Addons/Addons.tsx +9 -5
- package/Step5/Addons/styles.ts +20 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.23.2
|
|
4
|
+
|
|
5
|
+
- Flexible Ticket detail is now behind a small **Read More** link rather than the title. Its own control, so the thing you click to *read* is never next to the thing you click to *buy*. Closed by default; one line — "without it, this ticket cannot be cancelled or changed" — stays outside the collapse, because that is the material fact and hiding it would be a dark pattern rather than a tidy layout.
|
|
6
|
+
- **Date strip: dropped the joining comma.** Above 1024px the day number carried a `::before` comma so the cell would read "Mon, 03 Aug" on one line. The cells are narrow enough that the two parts wrap anyway, so the comma led the second line and every desktop cell rendered as "Mon" over ", 03 Aug". Punctuation that only works when text happens not to wrap will keep breaking.
|
|
7
|
+
|
|
3
8
|
## 1.23.1
|
|
4
9
|
|
|
5
10
|
**Flexible Ticket as a title, a price and an Add button, with the detail collapsed.**
|
package/Found/Dates/styles.ts
CHANGED
|
@@ -99,12 +99,20 @@ export const DayNumber = styled.span`
|
|
|
99
99
|
display: block;
|
|
100
100
|
line-height: 1.2;
|
|
101
101
|
|
|
102
|
+
/*
|
|
103
|
+
* Edited: Ferjolt Ozuni - Date: 2026-08-03
|
|
104
|
+
*
|
|
105
|
+
* NO JOINING COMMA. This carried a ::before comma above 1024px, to read
|
|
106
|
+
* "Mon, 03 Aug" on one line. The cells are narrow enough
|
|
107
|
+
* that the weekday and the date wrap anyway, and the comma then led the
|
|
108
|
+
* second line - every desktop cell rendered as "Mon" over ", 03 Aug".
|
|
109
|
+
*
|
|
110
|
+
* Punctuation that only works when the text happens not to wrap is
|
|
111
|
+
* punctuation that will keep breaking; the two parts read perfectly well
|
|
112
|
+
* stacked without it.
|
|
113
|
+
*/
|
|
102
114
|
@media (min-width: 1024px) {
|
|
103
115
|
display: inline;
|
|
104
|
-
|
|
105
|
-
&::before {
|
|
106
|
-
content: ', ';
|
|
107
|
-
}
|
|
108
116
|
}
|
|
109
117
|
`;
|
|
110
118
|
|
package/Step5/Addons/Addons.tsx
CHANGED
|
@@ -3,7 +3,7 @@ import { useState } from 'react';
|
|
|
3
3
|
import { RiWhatsappLine, RiTelegramLine, RiCalendarCheckLine, RiArrowUpSLine, RiArrowDownSLine } from 'react-icons/ri';
|
|
4
4
|
import { FlexOffer } from '@autobusal/providers/types/routes';
|
|
5
5
|
import { SubTitle } from '../../styles';
|
|
6
|
-
import { Container, Option, Notice, Terms, Term, FlexHeader, FlexToggle, FlexPrice, FlexAdd, FlexDetails } from './styles';
|
|
6
|
+
import { Container, Option, Notice, Terms, Term, FlexHeader, FlexTitle, FlexToggle, FlexPrice, FlexAdd, FlexDetails } from './styles';
|
|
7
7
|
|
|
8
8
|
interface AddonsData {
|
|
9
9
|
whatsapp: { available: boolean, price: number }
|
|
@@ -103,15 +103,13 @@ const Addons = ({ data, flexOffer, currency, whatsapp, whatsappNumber, telegram,
|
|
|
103
103
|
{ hasFlex && (
|
|
104
104
|
<Option>
|
|
105
105
|
<FlexHeader>
|
|
106
|
-
<
|
|
106
|
+
<FlexTitle>
|
|
107
107
|
<RiCalendarCheckLine />
|
|
108
108
|
|
|
109
109
|
{ t('routes_order.step5.flex.title') }
|
|
110
110
|
|
|
111
111
|
<FlexPrice>{ flexOffer?.price_display }</FlexPrice>
|
|
112
|
-
|
|
113
|
-
{ open ? <RiArrowUpSLine /> : <RiArrowDownSLine /> }
|
|
114
|
-
</FlexToggle>
|
|
112
|
+
</FlexTitle>
|
|
115
113
|
|
|
116
114
|
<FlexAdd type="button" $added={ flex } onClick={ () => onChangeFlex(!flex) }>
|
|
117
115
|
{ flex ? t('routes_order.step5.flex.remove') : t('routes_order.step5.flex.add') }
|
|
@@ -128,6 +126,12 @@ const Addons = ({ data, flexOffer, currency, whatsapp, whatsappNumber, telegram,
|
|
|
128
126
|
*/}
|
|
129
127
|
<Notice>{ t('routes_order.step5.flex.default') }</Notice>
|
|
130
128
|
|
|
129
|
+
<FlexToggle type="button" aria-expanded={ open } onClick={ () => setOpen(!open) }>
|
|
130
|
+
{ open ? t('routes_order.step5.flex.less') : t('routes_order.step5.flex.more') }
|
|
131
|
+
|
|
132
|
+
{ open ? <RiArrowUpSLine /> : <RiArrowDownSLine /> }
|
|
133
|
+
</FlexToggle>
|
|
134
|
+
|
|
131
135
|
{ open && (
|
|
132
136
|
<FlexDetails>
|
|
133
137
|
<Terms>
|
package/Step5/Addons/styles.ts
CHANGED
|
@@ -69,19 +69,34 @@ export const FlexHeader = styled.div`
|
|
|
69
69
|
gap: 10px;
|
|
70
70
|
`;
|
|
71
71
|
|
|
72
|
-
export const
|
|
72
|
+
export const FlexTitle = styled.span`
|
|
73
73
|
display: flex;
|
|
74
74
|
align-items: center;
|
|
75
75
|
gap: 6px;
|
|
76
|
+
font-weight: 700;
|
|
77
|
+
`;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* "Read More", small and quiet, under the one line that always shows.
|
|
81
|
+
*
|
|
82
|
+
* Edited: Ferjolt Ozuni - Date: 2026-08-03
|
|
83
|
+
* Its own control rather than the title, so the thing you click to READ is
|
|
84
|
+
* never next to the thing you click to BUY.
|
|
85
|
+
*/
|
|
86
|
+
export const FlexToggle = styled.button`
|
|
87
|
+
display: inline-flex;
|
|
88
|
+
align-items: center;
|
|
89
|
+
gap: 2px;
|
|
90
|
+
margin-top: 4px;
|
|
91
|
+
margin-left: 22px;
|
|
76
92
|
padding: 0;
|
|
77
93
|
border: 0;
|
|
78
94
|
background: none;
|
|
79
|
-
color:
|
|
95
|
+
color: ${ props => props.theme.primary.normal };
|
|
80
96
|
font-family: inherit;
|
|
81
|
-
font-size:
|
|
82
|
-
font-weight: 700;
|
|
97
|
+
font-size: ${ props => props.theme.size.xs };
|
|
83
98
|
cursor: pointer;
|
|
84
|
-
text-
|
|
99
|
+
text-decoration: underline;
|
|
85
100
|
`;
|
|
86
101
|
|
|
87
102
|
export const FlexPrice = styled.span`
|