@autobusal/routes-search 1.4.0 → 1.4.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.
Files changed (3) hide show
  1. package/package.json +5 -2
  2. package/styles.ts +49 -1
  3. package/CHANGELOG.md +0 -45
package/package.json CHANGED
@@ -1,7 +1,10 @@
1
1
  {
2
2
  "name": "@autobusal/routes-search",
3
- "version": "1.4.0",
3
+ "version": "1.4.2",
4
4
  "author": "Ferjolt Ozuni",
5
5
  "type": "module",
6
- "main": "index.ts"
6
+ "main": "index.ts",
7
+ "publishConfig": {
8
+ "access": "public"
9
+ }
7
10
  }
package/styles.ts CHANGED
@@ -4,12 +4,32 @@ export const Options = styled.div`
4
4
  display: flex;
5
5
  gap: 15px;
6
6
  margin-bottom: 20px;
7
+
8
+ /*
9
+ * Claude - 2026-09-16 (audit): 44px controls under a thumb. The trip-type
10
+ * buttons are the shared 32px "medium", the fields below are the theme's
11
+ * 38px and the search button its 38px default; common is not this
12
+ * package's to edit, so the phone sizes are set from the containers.
13
+ * min-height beats the global height, and the desktop form is untouched.
14
+ */
15
+ @media (max-width: 639px) {
16
+ & > button {
17
+ height: 44px;
18
+ }
19
+ }
7
20
  `;
8
21
 
9
22
  export const Columns = styled.div`
10
23
  display: flex;
11
24
  flex-wrap: wrap;
12
25
  gap: 15px;
26
+
27
+ // the 44px phone fields - see Options above
28
+ @media (max-width: 639px) {
29
+ input:not([type='checkbox']):not([type='radio']), select {
30
+ min-height: 44px;
31
+ }
32
+ }
13
33
  `;
14
34
 
15
35
  export const Column = styled.div`
@@ -32,7 +52,23 @@ export const Item = styled.div`
32
52
  flex: 1;
33
53
  `;
34
54
 
35
- export const Title = styled.h4`
55
+ /*
56
+ * Edited: Claude - Date: 2026-09-16
57
+ *
58
+ * NOT A HEADING. These are the captions over the search fields - "From",
59
+ * "To", "Departure Date", "Passengers" - and they were <h4>s, which told a
60
+ * screen reader the form contained four headings and told PageSpeed the
61
+ * document skips from <h1> to <h4> ("Heading elements are not in a
62
+ * sequentially-descending order", reported on production today). A caption
63
+ * that labels the control under it is not a section title; the fields'
64
+ * accessible names come from the controls themselves.
65
+ *
66
+ * A div rather than a <label>, deliberately: the controls beneath are
67
+ * composite widgets (Autocomplete, Calendar, the passenger picker) that own
68
+ * their own labelling, and a <label> pointing at a wrapper would announce
69
+ * the caption twice. Styling is unchanged.
70
+ */
71
+ export const Title = styled.div`
36
72
  margin-bottom: 8px;
37
73
  font-size: ${ props => props.theme.size.s };
38
74
  `;
@@ -43,6 +79,13 @@ export const Action = styled.div`
43
79
  justify-content: center;
44
80
  align-items: end;
45
81
 
82
+ // the 44px phone search button - see Options above
83
+ @media (max-width: 639px) {
84
+ & > button {
85
+ height: 44px;
86
+ }
87
+ }
88
+
46
89
  @media (min-width: 640px) {
47
90
  justify-content: right;
48
91
  }
@@ -60,6 +103,11 @@ export const PickerContainer = styled.div`
60
103
  height: 38px;
61
104
  display: flex;
62
105
  align-items: center;
106
+
107
+ // the pin stays centred in the taller phone field - see Options above
108
+ @media (max-width: 639px) {
109
+ height: 44px;
110
+ }
63
111
  `;
64
112
 
65
113
  export const PickerField = styled.div`
package/CHANGELOG.md DELETED
@@ -1,45 +0,0 @@
1
- # Changelog
2
-
3
- ## 1.4.0 (2026-08-29)
4
-
5
- - A departure city near the visitor pre-fills From (obtapi /api/geo/origin), applied once and only while the field is untouched; opt-in through the new `suggest` prop.
6
-
7
- ## 1.3.3 (2026-08-29)
8
-
9
- - A city with a single station lists that station instead of an identical "All Stations" entry beside it; the submitted value stays the city's slug, so URLs are unchanged.
10
-
11
- ## 1.2.0
12
-
13
- **The date picker follows the departure city.** Choosing a "from" city now sets the picker's floor to that city's timezone, and a pre-filled form (a shared link, or the search form kept on the results page) sets it on mount rather than waiting for a keystroke.
14
-
15
- An unknown city *clears* the zone rather than keeping the last one — silently flooring a new search on the previous journey's clock is the subtler version of the same bug.
16
-
17
- All notable changes to `@autobusal/routes-search` are documented here. This
18
- project adheres to [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and
19
- [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
20
-
21
- ## [1.1.1] - 2026-08-01
22
-
23
- ### Fixed
24
-
25
- - **The return date could be set before the departure date.** The picker
26
- floored at today, so an invalid pair was selectable and only refused by
27
- an alert after pressing search. It now floors at whatever departure
28
- currently holds, and follows it when that changes.
29
-
30
- ## [1.1.0] - 2026-07-25
31
-
32
- ### Fixed
33
-
34
- - **Recovered as canonical source.** This package was published to npm and
35
- in active use, but had no source anywhere in this monorepo (no
36
- `packages/routes-search` directory, no git history) - the only copy of its
37
- code existed as the published npm artifact. Recreated here,
38
- byte-for-byte identical to the published 1.1.0 tarball (verified via
39
- `diff` against the installed `node_modules/@autobusal/routes-search`), so it
40
- can be edited and republished like every other package instead of
41
- requiring reverse-engineering from `node_modules` or the npm tarball.
42
- History prior to this point is not recoverable - no git log,
43
- changelog, or other record of it exists.
44
-
45
- Authored by Ferjolt Ozuni.