@shipfox/client-workspace-settings 17.0.0 → 22.0.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@shipfox/client-workspace-settings",
3
3
  "license": "MIT",
4
- "version": "17.0.0",
4
+ "version": "22.0.0",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/ShipfoxHQ/shipfox.git",
@@ -27,12 +27,12 @@
27
27
  "dependencies": {
28
28
  "@swc/helpers": "^0.5.17",
29
29
  "@tanstack/react-form": "^1.32.0",
30
- "@shipfox/client-api": "6.0.1",
31
- "@shipfox/client-shell": "17.0.0",
32
30
  "@shipfox/api-workspaces-dto": "12.0.0",
33
- "@shipfox/client-auth": "17.0.0",
34
- "@shipfox/client-ui": "17.0.0",
35
- "@shipfox/react-ui": "1.2.0"
31
+ "@shipfox/client-api": "6.0.1",
32
+ "@shipfox/client-auth": "22.0.0",
33
+ "@shipfox/client-shell": "22.0.0",
34
+ "@shipfox/react-ui": "2.1.0",
35
+ "@shipfox/client-ui": "22.0.0"
36
36
  },
37
37
  "peerDependencies": {
38
38
  "@tanstack/react-query": "^5.101.0",
@@ -16,6 +16,7 @@ import {
16
16
  ModalTitle,
17
17
  ModalTrigger,
18
18
  } from '@shipfox/react-ui/modal';
19
+ import {Panel} from '@shipfox/react-ui/panel';
19
20
  import {Skeleton} from '@shipfox/react-ui/skeleton';
20
21
  import {
21
22
  Table,
@@ -81,35 +82,39 @@ function MembersSection({
81
82
  </Text>
82
83
  </div>
83
84
 
84
- {query.isPending ? <TableSkeleton rows={3} cols={3} /> : null}
85
+ {query.isPending ? <TableSkeleton rows={3} cols={3} label="Loading members" /> : null}
85
86
 
86
87
  {query.isError && query.data === undefined ? (
87
- <QueryLoadError query={query} subject="members" />
88
+ <Panel>
89
+ <QueryLoadError query={query} subject="members" variant="panel" />
90
+ </Panel>
88
91
  ) : null}
89
92
 
90
93
  {members.length > 0 ? (
91
- <Table>
92
- <TableHeader>
93
- <TableRow>
94
- <TableHead>Name</TableHead>
95
- <TableHead>Email</TableHead>
96
- <TableHead>Joined</TableHead>
97
- <TableHead className="w-80 text-right">Actions</TableHead>
98
- </TableRow>
99
- </TableHeader>
100
- <TableBody>
101
- {members.map((member) => (
102
- <MemberRow
103
- key={member.id}
104
- member={member}
105
- members={members}
106
- currentUserId={auth.user?.id}
107
- workspaceId={workspaceId}
108
- workspaceName={workspaceName}
109
- />
110
- ))}
111
- </TableBody>
112
- </Table>
94
+ <Panel>
95
+ <Table>
96
+ <TableHeader>
97
+ <TableRow>
98
+ <TableHead>Name</TableHead>
99
+ <TableHead>Email</TableHead>
100
+ <TableHead>Joined</TableHead>
101
+ <TableHead className="w-80 text-right">Actions</TableHead>
102
+ </TableRow>
103
+ </TableHeader>
104
+ <TableBody>
105
+ {members.map((member) => (
106
+ <MemberRow
107
+ key={member.id}
108
+ member={member}
109
+ members={members}
110
+ currentUserId={auth.user?.id}
111
+ workspaceId={workspaceId}
112
+ workspaceName={workspaceName}
113
+ />
114
+ ))}
115
+ </TableBody>
116
+ </Table>
117
+ </Panel>
113
118
  ) : null}
114
119
  </section>
115
120
  );
@@ -224,34 +229,42 @@ function PendingInvitationsSection({
224
229
  />
225
230
  </div>
226
231
 
227
- {query.isPending ? <TableSkeleton rows={2} cols={3} /> : null}
232
+ {query.isPending ? <TableSkeleton rows={2} cols={3} label="Loading invitations" /> : null}
228
233
 
229
234
  {query.isError && query.data === undefined ? (
230
- <QueryLoadError query={query} subject="invitations" />
235
+ <Panel>
236
+ <QueryLoadError query={query} subject="invitations" variant="panel" />
237
+ </Panel>
231
238
  ) : null}
232
239
 
233
- {query.data !== undefined && invitations.length === 0 ? <EmptyInvitations /> : null}
240
+ {query.data !== undefined && invitations.length === 0 ? (
241
+ <Panel>
242
+ <EmptyInvitations />
243
+ </Panel>
244
+ ) : null}
234
245
 
235
246
  {invitations.length > 0 ? (
236
- <Table>
237
- <TableHeader>
238
- <TableRow>
239
- <TableHead>Email</TableHead>
240
- <TableHead>Invited by</TableHead>
241
- <TableHead>Expires</TableHead>
242
- <TableHead className="w-80 text-right">Actions</TableHead>
243
- </TableRow>
244
- </TableHeader>
245
- <TableBody>
246
- {invitations.map((invitation) => (
247
- <InvitationRow
248
- key={invitation.id}
249
- invitation={invitation}
250
- workspaceId={workspaceId}
251
- />
252
- ))}
253
- </TableBody>
254
- </Table>
247
+ <Panel>
248
+ <Table>
249
+ <TableHeader>
250
+ <TableRow>
251
+ <TableHead>Email</TableHead>
252
+ <TableHead>Invited by</TableHead>
253
+ <TableHead>Expires</TableHead>
254
+ <TableHead className="w-80 text-right">Actions</TableHead>
255
+ </TableRow>
256
+ </TableHeader>
257
+ <TableBody>
258
+ {invitations.map((invitation) => (
259
+ <InvitationRow
260
+ key={invitation.id}
261
+ invitation={invitation}
262
+ workspaceId={workspaceId}
263
+ />
264
+ ))}
265
+ </TableBody>
266
+ </Table>
267
+ </Panel>
255
268
  ) : null}
256
269
  </section>
257
270
  );
@@ -453,22 +466,26 @@ function EmptyInvitations() {
453
466
  icon="mailLine"
454
467
  title="No pending invitations."
455
468
  description="Invite someone above to grow your workspace."
469
+ variant="panel"
456
470
  />
457
471
  );
458
472
  }
459
473
 
460
- function TableSkeleton({rows, cols}: {rows: number; cols: number}) {
474
+ function TableSkeleton({rows, cols, label}: {rows: number; cols: number; label: string}) {
461
475
  return (
462
- <div className="flex flex-col gap-cluster">
476
+ <Panel role="status" aria-label={label} className="divide-y">
463
477
  {Array.from({length: rows}).map((_, rowIdx) => (
464
- // biome-ignore lint/suspicious/noArrayIndexKey: stable placeholder rows
465
- <div key={rowIdx} className="grid grid-cols-3 gap-group">
478
+ <div
479
+ // biome-ignore lint/suspicious/noArrayIndexKey: stable placeholder rows
480
+ key={rowIdx}
481
+ className="grid min-h-44 grid-cols-3 gap-group px-row py-row"
482
+ >
466
483
  {Array.from({length: cols}).map((__, colIdx) => (
467
484
  // biome-ignore lint/suspicious/noArrayIndexKey: stable placeholder cells
468
485
  <Skeleton key={colIdx} className="h-20" />
469
486
  ))}
470
487
  </div>
471
488
  ))}
472
- </div>
489
+ </Panel>
473
490
  );
474
491
  }
@@ -1,4 +1,7 @@
1
1
  import {defineRoute} from '@shipfox/client-shell/runtime';
2
2
  import {GeneralSettingsPage} from '#pages/general-settings-page.js';
3
3
 
4
- export default defineRoute({component: GeneralSettingsPage});
4
+ export default defineRoute({
5
+ staticData: {frame: 'content'},
6
+ component: GeneralSettingsPage,
7
+ });
@@ -2,6 +2,7 @@ import {defineRoute} from '@shipfox/client-shell/runtime';
2
2
  import {redirect} from '@tanstack/react-router';
3
3
 
4
4
  export default defineRoute({
5
+ staticData: {frame: 'content'},
5
6
  beforeLoad: ({params}: {params: {workspaceSlug: string}}) => {
6
7
  throw redirect({
7
8
  to: '/w/$workspaceSlug/settings/members',
@@ -1,3 +1,6 @@
1
1
  import {defineRoute} from '@shipfox/client-shell/runtime';
2
2
  import {MembersSettingsPage} from '#pages/members-settings-page.js';
3
- export default defineRoute({component: MembersSettingsPage});
3
+ export default defineRoute({
4
+ staticData: {frame: 'content'},
5
+ component: MembersSettingsPage,
6
+ });