@shipfox/client-config 16.0.0 → 21.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-config",
3
3
  "license": "MIT",
4
- "version": "16.0.0",
4
+ "version": "21.0.0",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/ShipfoxHQ/shipfox.git",
@@ -18,7 +18,7 @@
18
18
  },
19
19
  "dependencies": {
20
20
  "@swc/helpers": "^0.5.17",
21
- "@shipfox/react-ui": "1.1.0"
21
+ "@shipfox/react-ui": "2.0.0"
22
22
  },
23
23
  "peerDependencies": {
24
24
  "react": "^19.0.0",
@@ -20,12 +20,18 @@ describe('ConfigErrorScreen', () => {
20
20
  });
21
21
 
22
22
  it('renders the docs link only when a url is given', () => {
23
- const {rerender} = render(<ConfigErrorScreen errors={[apiUrlError]} />);
23
+ const {container, rerender} = render(<ConfigErrorScreen errors={[apiUrlError]} />);
24
24
 
25
25
  expect(screen.queryByRole('link')).toBeNull();
26
26
 
27
27
  rerender(<ConfigErrorScreen errors={[apiUrlError]} docsUrl="https://docs.shipfox.io/config" />);
28
28
 
29
29
  expect(screen.getByRole('link')).toHaveAttribute('href', 'https://docs.shipfox.io/config');
30
+ expect(container.querySelector('[data-slot="panel"]')).toHaveClass('gap-group');
31
+ expect(container.querySelector('[data-slot="panel-body"]')).toHaveClass('flex', 'flex-col');
32
+ expect(container.querySelector('[data-slot="panel-body"] > div')).toHaveClass(
33
+ 'px-row',
34
+ 'py-row',
35
+ );
30
36
  });
31
37
  });
@@ -1,6 +1,6 @@
1
1
  import {ButtonLink} from '@shipfox/react-ui/button';
2
- import {Card, CardContent, CardDescription, CardHeader, CardTitle} from '@shipfox/react-ui/card';
3
2
  import {Icon} from '@shipfox/react-ui/icon';
3
+ import {Panel, PanelBody, PanelHeader, PanelTitle} from '@shipfox/react-ui/panel';
4
4
  import {Code, Text} from '@shipfox/react-ui/typography';
5
5
  import type {ConfigKeyError} from './load-config.js';
6
6
 
@@ -22,23 +22,23 @@ export interface ConfigErrorScreenProps {
22
22
  export function ConfigErrorScreen({errors, docsUrl}: ConfigErrorScreenProps) {
23
23
  return (
24
24
  <main className="flex min-h-screen items-center justify-center bg-background-subtle-base px-frame py-frame">
25
- <Card className="w-full max-w-[512px]">
26
- <CardHeader>
25
+ <Panel className="w-full max-w-[512px] gap-group">
26
+ <PanelHeader variant="plain" className="flex-col items-start gap-inline">
27
27
  <div className="flex items-center gap-inline">
28
28
  <Icon name="errorWarningLine" className="size-20 text-tag-error-icon" />
29
- <CardTitle variant="h2">Configuration error</CardTitle>
29
+ <PanelTitle variant="h2">Configuration error</PanelTitle>
30
30
  </div>
31
- <CardDescription>
31
+ <Text size="sm" className="text-foreground-neutral-muted">
32
32
  The Shipfox client could not start because its configuration is missing or invalid. Set
33
33
  the environment variables below and restart the container.
34
- </CardDescription>
35
- </CardHeader>
34
+ </Text>
35
+ </PanelHeader>
36
36
 
37
- <CardContent className="flex flex-col">
37
+ <PanelBody className="flex flex-col">
38
38
  {errors.map((error) => (
39
39
  <div
40
40
  key={error.key}
41
- className="flex flex-col gap-tight border-t border-border-neutral-base py-row first:border-t-0 first:pt-0"
41
+ className="flex flex-col gap-tight border-t border-border-neutral-base px-row py-row first:border-t-0 first:pt-0"
42
42
  >
43
43
  <Code variant="label" bold className="text-foreground-neutral-base">
44
44
  {error.key}
@@ -64,18 +64,20 @@ export function ConfigErrorScreen({errors, docsUrl}: ConfigErrorScreenProps) {
64
64
  </Text>
65
65
  </div>
66
66
  ))}
67
- </CardContent>
67
+ </PanelBody>
68
68
 
69
69
  {docsUrl ? (
70
- <Text size="sm" className="text-foreground-neutral-muted">
71
- See the{' '}
72
- <ButtonLink href={docsUrl} variant="interactive" underline>
73
- self-hosting configuration guide
74
- </ButtonLink>
75
- .
76
- </Text>
70
+ <div className="p-panel pt-0">
71
+ <Text size="sm" className="text-foreground-neutral-muted">
72
+ See the{' '}
73
+ <ButtonLink href={docsUrl} variant="interactive" underline>
74
+ self-hosting configuration guide
75
+ </ButtonLink>
76
+ .
77
+ </Text>
78
+ </div>
77
79
  ) : null}
78
- </Card>
80
+ </Panel>
79
81
  </main>
80
82
  );
81
83
  }