@sovereignfs/ui 0.106.0 → 0.107.0

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
@@ -5,6 +5,31 @@ versions follow [semver](https://semver.org/). A version's section is written in
5
5
  and becomes the release notes when the version is published. This file starts at 0.96.0; earlier versions are in the repository's
6
6
  history and tags.
7
7
 
8
+ ## [0.107.0] - 2026-11-23
9
+
10
+ ### Added
11
+
12
+ - `SettingsDialog`: settings as one dialog with a side navigation, the same in core and every app. Sections in groups with a divider
13
+ between them, each with an icon; an optional search; the section scrolling in a frame that never changes size; on a phone, the
14
+ sections, then one with a back arrow. Controlled (`active`, `onSelect`), so that an app gives each section an address.
15
+ - `Dialog`'s `flush`: a body with no padding and no scrolling of its own, for content that scrolls its own regions.
16
+ - Twenty icons for lists, categories and cards beyond groceries: `square-pen`, `shopping-cart`, `store`, `hammer`, `wrench`, `plug`,
17
+ `laptop`, `headphones`, `shirt`, `gift`, `sprout`, `flower-2`, `briefcase`, `paperclip`, `pill`, `baby`, `dog`, `sofa`,
18
+ `wallet-cards` and `scan-barcode`.
19
+ - `MobileFooter`'s `launcherLabel`: the centered button's name, "Apps" by default, for an app whose middle button opens its own
20
+ drawer.
21
+ - `Header`'s `brand`: an app's own wordmark in place of the badge, which stays core's default.
22
+ - `AppSidebar` and `useAppSidebar`: the sidebar every app has, full, a rail of icons or hidden, kept on the device per app and per
23
+ kind of page; blocks of rows with an optional heading, an icon in a colour, a count and a trailing _+ New …_ row. The rules are
24
+ exported (`sidebarStateFor`, `toggleSidebarHidden`, `toggleSidebarRail`, `parseSidebarStored`).
25
+ - `AppFrame`: the frame of an app's signed-in page, wired once. `Header`, `AppSidebar`, the content and a right column on a wide
26
+ screen; `MobileHeader`, `MobileFooter` and a `Drawer` with the same blocks on a phone; the shell root, publishing the header's and
27
+ the footer's heights for overlays. `AppSidebar`'s `placement="drawer"` fills a phone's drawer.
28
+ - `appsLauncherItems`: the apps the Core API's `listMyApps` answers, as `AppsLauncher`'s items, each with its icon or its first letter,
29
+ leaving out the app the launcher is in.
30
+ - `Barcode` and `encodeBarcode`: EAN-13, EAN-8, UPC-A, Code 128 and Code 39 as an SVG, black on white in every theme, with no
31
+ dependency; check digits added or checked.
32
+
8
33
  ## [0.106.0] - 2026-11-22
9
34
 
10
35
  ### Added
@@ -0,0 +1,87 @@
1
+ /* AppFrame — the shell root: a header row, the main area (sidebar, content, right column) and, on a phone, the footer. The main
2
+ * area is as tall as what is left of the viewport and does not scroll itself: its columns do. Tokens only. */
3
+
4
+ .shell {
5
+ /* Until the header has been measured: the design system's Header's height. Overlays stop below it. */
6
+ --sv-shell-header-height: 48px;
7
+ --sv-dialog-inset-top: var(--sv-shell-header-height);
8
+ display: flex;
9
+ flex-direction: column;
10
+ height: 100vh;
11
+ height: 100dvh;
12
+ background-color: var(--sv-color-surface);
13
+ }
14
+
15
+ .headerRow,
16
+ .mobileHeader {
17
+ flex-shrink: 0;
18
+ }
19
+
20
+ .lead {
21
+ display: flex;
22
+ align-items: center;
23
+ gap: var(--sv-space-2);
24
+ min-width: 0;
25
+ }
26
+
27
+ /* The header's sidebar button: drawn in line with the rail's icons beneath it. */
28
+ .toggle {
29
+ display: inline-flex;
30
+ flex-shrink: 0;
31
+ align-items: center;
32
+ justify-content: center;
33
+ width: 2.5rem;
34
+ height: 2.5rem;
35
+ padding: 0;
36
+ margin-left: calc(-1 * var(--sv-space-2));
37
+ color: var(--sv-color-text-primary);
38
+ background: transparent;
39
+ border: 0;
40
+ border-radius: var(--sv-radius-md);
41
+ cursor: pointer;
42
+ }
43
+
44
+ @media (hover: hover) {
45
+ .toggle:hover {
46
+ background: var(--sv-color-surface-sunken);
47
+ }
48
+ }
49
+
50
+ .toggle:focus-visible {
51
+ outline: 2px solid var(--sv-color-focus-ring);
52
+ outline-offset: 2px;
53
+ }
54
+
55
+ .main {
56
+ display: flex;
57
+ flex: 1;
58
+ min-height: 0;
59
+ overflow: hidden;
60
+ }
61
+
62
+ .content {
63
+ flex: 1;
64
+ min-width: 0;
65
+ min-height: 0;
66
+ overflow-y: auto;
67
+ }
68
+
69
+ .detail {
70
+ flex: 0 0 22.5rem;
71
+ min-height: 0;
72
+ overflow-y: auto;
73
+ background: var(--sv-color-surface);
74
+ border-left: var(--sv-border-width-hairline) solid var(--sv-color-border);
75
+ }
76
+
77
+ /* On a phone the right column is the screen: the content stays mounted under it, so that nothing it holds is lost. */
78
+ @media (max-width: 768px) {
79
+ .covered {
80
+ display: none;
81
+ }
82
+
83
+ .detail {
84
+ flex: 1 1 auto;
85
+ border-left: 0;
86
+ }
87
+ }
@@ -0,0 +1,197 @@
1
+ /* AppSidebar — full (a fixed width) or a rail of icons; hidden draws nothing. It sits on the raised surface; the current row and
2
+ * the hovered one are tints of the accent, which show in either theme (as `NavList`'s do). Tokens only. */
3
+
4
+ .sidebar {
5
+ display: flex;
6
+ flex-direction: column;
7
+ flex-shrink: 0;
8
+ gap: var(--sv-space-3);
9
+ width: 17.5rem;
10
+ height: 100%;
11
+ padding: var(--sv-space-3);
12
+ overflow-y: auto;
13
+ background: var(--sv-color-surface-raised);
14
+ border-right: var(--sv-border-width-hairline) solid var(--sv-color-border);
15
+ scrollbar-width: thin;
16
+ scrollbar-color: var(--sv-color-border-strong) transparent;
17
+ }
18
+
19
+ .rail {
20
+ align-items: center;
21
+ width: 3.5rem;
22
+ padding-right: var(--sv-space-1);
23
+ padding-left: var(--sv-space-1);
24
+ }
25
+
26
+ .blocks {
27
+ display: flex;
28
+ flex: 1 1 auto;
29
+ flex-direction: column;
30
+ gap: var(--sv-space-4);
31
+ width: 100%;
32
+ }
33
+
34
+ .block {
35
+ display: flex;
36
+ flex-direction: column;
37
+ gap: var(--sv-space-1);
38
+ }
39
+
40
+ .heading {
41
+ margin: 0;
42
+ padding: var(--sv-space-1) var(--sv-space-3);
43
+ color: var(--sv-color-text-muted);
44
+ font-size: var(--sv-font-size-xs);
45
+ font-weight: var(--sv-font-weight-semibold);
46
+ letter-spacing: 0.04em;
47
+ text-transform: uppercase;
48
+ }
49
+
50
+ .rows {
51
+ display: flex;
52
+ flex-direction: column;
53
+ gap: 2px;
54
+ margin: 0;
55
+ padding: 0;
56
+ list-style: none;
57
+ }
58
+
59
+ .row,
60
+ .action {
61
+ display: flex;
62
+ align-items: center;
63
+ gap: var(--sv-space-3);
64
+ width: 100%;
65
+ min-height: 2.25rem;
66
+ padding: var(--sv-space-2) var(--sv-space-3);
67
+ color: var(--sv-color-text-primary);
68
+ font: inherit;
69
+ font-size: var(--sv-font-size-sm);
70
+ text-align: start;
71
+ text-decoration: none;
72
+ background: transparent;
73
+ border: 0;
74
+ border-radius: var(--sv-radius-md);
75
+ cursor: pointer;
76
+ }
77
+
78
+ .action {
79
+ color: var(--sv-color-text-muted);
80
+ }
81
+
82
+ @media (hover: hover) {
83
+ .row:hover,
84
+ .action:hover {
85
+ color: var(--sv-color-text-primary);
86
+ background-color: color-mix(in srgb, var(--sv-color-accent) 6%, transparent);
87
+ }
88
+ }
89
+
90
+ .row:focus-visible,
91
+ .action:focus-visible,
92
+ .railButton:focus-visible {
93
+ outline: 2px solid var(--sv-color-focus-ring);
94
+ outline-offset: -2px;
95
+ }
96
+
97
+ .rowActive {
98
+ font-weight: var(--sv-font-weight-semibold);
99
+ background-color: var(--sv-color-accent-subtle);
100
+ }
101
+
102
+ .icon {
103
+ display: inline-flex;
104
+ flex-shrink: 0;
105
+ }
106
+
107
+ .initial {
108
+ display: inline-flex;
109
+ flex-shrink: 0;
110
+ align-items: center;
111
+ justify-content: center;
112
+ width: 1rem;
113
+ font-weight: var(--sv-font-weight-semibold);
114
+ }
115
+
116
+ .label {
117
+ display: flex;
118
+ flex: 1;
119
+ flex-direction: column;
120
+ min-width: 0;
121
+ }
122
+
123
+ .name,
124
+ .description {
125
+ min-width: 0;
126
+ overflow: hidden;
127
+ text-overflow: ellipsis;
128
+ white-space: nowrap;
129
+ }
130
+
131
+ .description {
132
+ color: var(--sv-color-text-muted);
133
+ font-size: var(--sv-font-size-xs);
134
+ }
135
+
136
+ /* Counts in tabular figures, so that a column of them lines up. */
137
+ .count {
138
+ flex-shrink: 0;
139
+ color: var(--sv-color-text-muted);
140
+ font-variant-numeric: tabular-nums;
141
+ }
142
+
143
+ .railButton {
144
+ display: inline-flex;
145
+ flex-shrink: 0;
146
+ align-items: center;
147
+ align-self: flex-end;
148
+ justify-content: center;
149
+ width: 2rem;
150
+ height: 2rem;
151
+ padding: 0;
152
+ color: var(--sv-color-text-muted);
153
+ background: transparent;
154
+ border: 0;
155
+ border-radius: var(--sv-radius-md);
156
+ cursor: pointer;
157
+ }
158
+
159
+ @media (hover: hover) {
160
+ .railButton:hover {
161
+ color: var(--sv-color-text-primary);
162
+ background: var(--sv-color-surface-sunken);
163
+ }
164
+ }
165
+
166
+ /* The rail: the icons alone, centred; headings, labels and counts are left out, and each row is named by its label. */
167
+ .rail .heading,
168
+ .rail .label,
169
+ .rail .count {
170
+ display: none;
171
+ }
172
+
173
+ .rail .row,
174
+ .rail .action {
175
+ justify-content: center;
176
+ width: 2.5rem;
177
+ padding: var(--sv-space-2);
178
+ }
179
+
180
+ .rail .railButton {
181
+ align-self: center;
182
+ }
183
+
184
+ /* In a phone's drawer: the drawer is the surface, the width is the drawer's, and every row is a touch target. */
185
+ .drawer {
186
+ width: 100%;
187
+ height: auto;
188
+ padding: var(--sv-space-2) var(--sv-space-3) var(--sv-space-6);
189
+ overflow: visible;
190
+ background: transparent;
191
+ border-right: 0;
192
+ }
193
+
194
+ .drawer .row,
195
+ .drawer .action {
196
+ min-height: var(--sv-touch-target-min);
197
+ }
@@ -0,0 +1,31 @@
1
+ /* A barcode is black on white in every theme: a scanner reads contrast, not a theme (as QrCode). The white is the quiet zone too. */
2
+ .barcode {
3
+ display: block;
4
+ width: 100%;
5
+ margin: 0;
6
+ padding: var(--sv-space-2) 0;
7
+ background: var(--sv-white);
8
+ border-radius: var(--sv-radius-sm);
9
+ }
10
+
11
+ .barcode svg {
12
+ display: block;
13
+ width: 100%;
14
+ height: auto;
15
+ fill: var(--sv-black);
16
+ }
17
+
18
+ .text {
19
+ margin-top: var(--sv-space-1);
20
+ color: var(--sv-black);
21
+ font-family: var(--sv-font-family-mono);
22
+ font-size: var(--sv-font-size-sm);
23
+ letter-spacing: 0.08em;
24
+ text-align: center;
25
+ }
26
+
27
+ .invalid {
28
+ margin: 0;
29
+ color: var(--sv-color-text-muted);
30
+ font-size: var(--sv-font-size-sm);
31
+ }
@@ -128,6 +128,15 @@
128
128
  overscroll-behavior: none;
129
129
  }
130
130
 
131
+ /* `flush`: the body is a frame for content that lays out and scrolls its own regions. */
132
+ .flush {
133
+ display: flex;
134
+ flex-direction: column;
135
+ min-height: 0;
136
+ padding: 0;
137
+ overflow: hidden;
138
+ }
139
+
131
140
  .content::-webkit-scrollbar {
132
141
  width: 8px;
133
142
  }
@@ -0,0 +1,185 @@
1
+ /* SettingsDialog — a side navigation and a section, inside a flush `Dialog`. The frame never changes size: the
2
+ * navigation and the section each scroll on their own. Tokens only. */
3
+
4
+ .frame {
5
+ display: flex;
6
+ flex: 1 1 auto;
7
+ min-height: 0;
8
+ }
9
+
10
+ .sidebar {
11
+ display: flex;
12
+ flex-direction: column;
13
+ flex: 0 0 15rem;
14
+ min-height: 0;
15
+ border-right: var(--sv-border-width-hairline) solid var(--sv-color-border);
16
+ }
17
+
18
+ .search {
19
+ padding: var(--sv-space-4) var(--sv-space-4) 0;
20
+ }
21
+
22
+ .nav {
23
+ flex: 1 1 auto;
24
+ overflow-y: auto;
25
+ padding: var(--sv-space-3);
26
+ scrollbar-width: thin;
27
+ scrollbar-color: var(--sv-color-border-strong) transparent;
28
+ }
29
+
30
+ .group {
31
+ display: flex;
32
+ flex-direction: column;
33
+ gap: 2px;
34
+ margin: 0;
35
+ padding: 0;
36
+ list-style: none;
37
+ }
38
+
39
+ .group + .group {
40
+ margin-top: var(--sv-space-3);
41
+ padding-top: var(--sv-space-3);
42
+ border-top: var(--sv-border-width-hairline) solid var(--sv-color-border);
43
+ }
44
+
45
+ .row {
46
+ display: flex;
47
+ align-items: center;
48
+ gap: var(--sv-space-3);
49
+ width: 100%;
50
+ min-height: var(--sv-touch-target-min);
51
+ padding: var(--sv-space-2) var(--sv-space-3);
52
+ border: none;
53
+ border-radius: var(--sv-radius-md);
54
+ background: transparent;
55
+ color: var(--sv-color-text-muted);
56
+ font: inherit;
57
+ font-size: var(--sv-font-size-sm);
58
+ font-weight: var(--sv-font-weight-medium);
59
+ text-align: start;
60
+ text-decoration: none;
61
+ cursor: pointer;
62
+ }
63
+
64
+ @media (hover: hover) {
65
+ .row:hover {
66
+ background-color: color-mix(in srgb, var(--sv-color-accent) 6%, transparent);
67
+ color: var(--sv-color-text-primary);
68
+ }
69
+ }
70
+
71
+ .row:focus-visible {
72
+ outline: 2px solid var(--sv-color-focus-ring);
73
+ outline-offset: -2px;
74
+ }
75
+
76
+ .rowActive {
77
+ background-color: var(--sv-color-accent-subtle);
78
+ color: var(--sv-color-text-primary);
79
+ font-weight: var(--sv-font-weight-semibold);
80
+ }
81
+
82
+ .icon {
83
+ flex-shrink: 0;
84
+ }
85
+
86
+ .label {
87
+ flex: 1;
88
+ min-width: 0;
89
+ overflow: hidden;
90
+ text-overflow: ellipsis;
91
+ white-space: nowrap;
92
+ }
93
+
94
+ /* The chevron says "opens a section", which only a phone's list of sections needs. */
95
+ .chevron {
96
+ display: none;
97
+ flex-shrink: 0;
98
+ color: var(--sv-color-text-muted);
99
+ }
100
+
101
+ .section {
102
+ display: flex;
103
+ flex-direction: column;
104
+ flex: 1 1 auto;
105
+ min-width: 0;
106
+ min-height: 0;
107
+ }
108
+
109
+ .body {
110
+ flex: 1 1 auto;
111
+ overflow-y: auto;
112
+ overscroll-behavior: none;
113
+ padding: var(--sv-space-6);
114
+ scrollbar-width: thin;
115
+ scrollbar-color: var(--sv-color-border-strong) transparent;
116
+ --sv-page-gutter: 0px;
117
+ }
118
+
119
+ /* The back row is a phone's alone. */
120
+ .back {
121
+ display: none;
122
+ }
123
+
124
+ @media (max-width: 768px) {
125
+ .sidebar {
126
+ flex: 1 1 auto;
127
+ border-right: none;
128
+ }
129
+
130
+ .row {
131
+ color: var(--sv-color-text-primary);
132
+ }
133
+
134
+ .rowActive {
135
+ background-color: transparent;
136
+ font-weight: var(--sv-font-weight-medium);
137
+ }
138
+
139
+ .chevron {
140
+ display: inline-flex;
141
+ }
142
+
143
+ .frame[data-view='sections'] .section {
144
+ display: none;
145
+ }
146
+
147
+ .frame[data-view='section'] .sidebar {
148
+ display: none;
149
+ }
150
+
151
+ .back {
152
+ display: flex;
153
+ align-items: center;
154
+ gap: var(--sv-space-2);
155
+ flex-shrink: 0;
156
+ padding: var(--sv-space-2) var(--sv-space-3);
157
+ border-bottom: var(--sv-border-width-hairline) solid var(--sv-color-border);
158
+ }
159
+
160
+ .backButton {
161
+ display: inline-flex;
162
+ align-items: center;
163
+ justify-content: center;
164
+ width: var(--sv-touch-target-min);
165
+ height: var(--sv-touch-target-min);
166
+ border: none;
167
+ border-radius: var(--sv-radius-md);
168
+ background: transparent;
169
+ color: var(--sv-color-text-primary);
170
+ cursor: pointer;
171
+ }
172
+
173
+ .backButton:focus-visible {
174
+ outline: 2px solid var(--sv-color-focus-ring);
175
+ outline-offset: -2px;
176
+ }
177
+
178
+ .backTitle {
179
+ font-weight: var(--sv-font-weight-semibold);
180
+ }
181
+
182
+ .body {
183
+ padding: var(--sv-space-4);
184
+ }
185
+ }