@vendure-io/ui 2.0.0-beta.9 → 2.0.0-rc.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/LICENSE.md +34 -0
- package/package.json +8 -6
- package/src/components/atoms/alert-dialog.tsx +1 -1
- package/src/components/atoms/alert.tsx +1 -1
- package/src/components/atoms/badge.tsx +1 -1
- package/src/components/atoms/button.tsx +2 -2
- package/src/components/atoms/card.tsx +39 -4
- package/src/components/atoms/checkbox.tsx +1 -1
- package/src/components/atoms/combobox.tsx +24 -5
- package/src/components/atoms/command.tsx +16 -5
- package/src/components/atoms/context-menu.tsx +1 -1
- package/src/components/atoms/dialog.tsx +1 -1
- package/src/components/atoms/drawer.tsx +134 -35
- package/src/components/atoms/dropdown-menu.tsx +1 -1
- package/src/components/atoms/field.tsx +2 -2
- package/src/components/atoms/input.tsx +1 -1
- package/src/components/atoms/item.tsx +4 -1
- package/src/components/atoms/menubar.tsx +1 -1
- package/src/components/atoms/native-select.tsx +1 -1
- package/src/components/atoms/navigation-menu.tsx +8 -2
- package/src/components/atoms/progress.tsx +1 -1
- package/src/components/atoms/radio-group.tsx +1 -1
- package/src/components/atoms/scroll-area.tsx +1 -2
- package/src/components/atoms/select.tsx +1 -1
- package/src/components/atoms/sheet.tsx +1 -1
- package/src/components/atoms/sidebar.tsx +6 -4
- package/src/components/atoms/slider.tsx +2 -2
- package/src/components/atoms/switch.tsx +1 -1
- package/src/components/atoms/table.tsx +34 -2
- package/src/components/atoms/tabs.tsx +64 -1
- package/src/components/atoms/textarea.tsx +1 -1
- package/src/components/atoms/toggle-group.tsx +1 -1
- package/src/components/atoms/toggle.tsx +5 -2
- package/src/components/molecules/chip.tsx +7 -2
- package/src/components/molecules/code-block/file-type-icons.tsx +123 -0
- package/src/components/molecules/code-block/process-code.ts +60 -0
- package/src/components/molecules/code-block/transform-command.tsx +177 -0
- package/src/components/molecules/code-block.tsx +25 -443
- package/src/components/molecules/combobox-free-text.tsx +23 -2
- package/src/components/molecules/copyable-text.tsx +14 -1
- package/src/components/molecules/data-table/data-table-bulk-actions.tsx +12 -13
- package/src/components/molecules/data-table/data-table-types.tsx +50 -2
- package/src/components/molecules/data-table/data-table-view-options.tsx +2 -1
- package/src/components/molecules/data-table/data-table.tsx +188 -96
- package/src/components/molecules/date-picker.tsx +3 -1
- package/src/components/molecules/date-range-picker.tsx +3 -1
- package/src/components/molecules/date-time-picker.tsx +3 -1
- package/src/components/molecules/file-dropzone.tsx +15 -5
- package/src/components/molecules/illustrations/empty-database.tsx +8 -5
- package/src/components/molecules/illustrations/error.tsx +19 -17
- package/src/components/molecules/illustrations/expired.tsx +55 -0
- package/src/components/molecules/illustrations/first-run.tsx +3 -1
- package/src/components/molecules/illustrations/no-activity.tsx +35 -14
- package/src/components/molecules/illustrations/no-customers.tsx +66 -0
- package/src/components/molecules/illustrations/no-documents.tsx +4 -3
- package/src/components/molecules/illustrations/no-invoices.tsx +45 -0
- package/src/components/molecules/illustrations/no-notifications.tsx +7 -8
- package/src/components/molecules/illustrations/no-orders.tsx +25 -17
- package/src/components/molecules/illustrations/no-plugins.tsx +21 -31
- package/src/components/molecules/illustrations/no-products.tsx +53 -0
- package/src/components/molecules/illustrations/no-projects.tsx +54 -0
- package/src/components/molecules/illustrations/no-promotions.tsx +49 -0
- package/src/components/molecules/illustrations/no-subscription.tsx +72 -0
- package/src/components/molecules/illustrations/not-found.tsx +17 -15
- package/src/components/molecules/illustrations/offline.tsx +12 -10
- package/src/components/molecules/illustrations/payment-failed.tsx +53 -0
- package/src/components/molecules/illustrations/success.tsx +43 -0
- package/src/components/molecules/inline-code.tsx +26 -0
- package/src/components/molecules/page-header.tsx +7 -3
- package/src/components/molecules/stat-card.tsx +13 -12
- package/src/components/molecules/state-views/empty-state.tsx +12 -1
- package/src/components/molecules/state-views/loading-state.tsx +7 -3
- package/src/lib/highlight.ts +37 -1
- package/src/lib/state-dictionary.ts +18 -5
- package/src/lib/utils.ts +0 -19
|
@@ -5,7 +5,9 @@ import { cn } from '@vendure-io/ui/lib/utils';
|
|
|
5
5
|
* Two cable connectors that don't meet, with a dashed gap and a spark where
|
|
6
6
|
* the connection failed. The `ErrorState` default — deliberately neutral, not
|
|
7
7
|
* destructive-tinted; the "this failed" weight comes from the state view's
|
|
8
|
-
* `role="alert"` and copy, not the illustration.
|
|
8
|
+
* `role="alert"` and copy, not the illustration. Not for a lost network
|
|
9
|
+
* connection (use `OfflineIllustration`), a 404 (use `NotFoundIllustration`)
|
|
10
|
+
* or a failed payment (use `PaymentFailedIllustration`).
|
|
9
11
|
*/
|
|
10
12
|
function ErrorIllustration({ className, size = 160 }: IllustrationProps) {
|
|
11
13
|
return (
|
|
@@ -24,37 +26,37 @@ function ErrorIllustration({ className, size = 160 }: IllustrationProps) {
|
|
|
24
26
|
<ellipse cx="80" cy="104" rx="30" ry="5" className="fill-muted" />
|
|
25
27
|
|
|
26
28
|
{/* left plug + trailing cable */}
|
|
27
|
-
<path d="
|
|
29
|
+
<path d="M28,64 Q16,64 16,48" className="stroke-muted-foreground" />
|
|
28
30
|
<rect
|
|
29
|
-
x="
|
|
30
|
-
y="
|
|
31
|
-
width="
|
|
32
|
-
height="
|
|
31
|
+
x="28"
|
|
32
|
+
y="53"
|
|
33
|
+
width="34"
|
|
34
|
+
height="22"
|
|
33
35
|
rx="4"
|
|
34
36
|
className="fill-surface stroke-muted-foreground"
|
|
35
37
|
/>
|
|
36
|
-
<rect x="
|
|
37
|
-
<rect x="
|
|
38
|
+
<rect x="60" y="58" width="10" height="3" rx="1.5" className="fill-muted-foreground" />
|
|
39
|
+
<rect x="60" y="66" width="10" height="3" rx="1.5" className="fill-muted-foreground" />
|
|
38
40
|
|
|
39
41
|
{/* right socket + trailing cable */}
|
|
40
|
-
<path d="
|
|
42
|
+
<path d="M132,64 Q144,64 144,48" className="stroke-muted-foreground" />
|
|
41
43
|
<rect
|
|
42
|
-
x="
|
|
43
|
-
y="
|
|
44
|
-
width="
|
|
45
|
-
height="
|
|
44
|
+
x="98"
|
|
45
|
+
y="53"
|
|
46
|
+
width="34"
|
|
47
|
+
height="22"
|
|
46
48
|
rx="4"
|
|
47
49
|
className="fill-surface stroke-muted-foreground"
|
|
48
50
|
/>
|
|
49
|
-
<rect x="
|
|
50
|
-
<rect x="
|
|
51
|
+
<rect x="92" y="58" width="8" height="3" rx="1.5" className="fill-background stroke-border" />
|
|
52
|
+
<rect x="92" y="66" width="8" height="3" rx="1.5" className="fill-background stroke-border" />
|
|
51
53
|
|
|
52
54
|
{/* the gap */}
|
|
53
|
-
<line x1="
|
|
55
|
+
<line x1="72" y1="64" x2="90" y2="64" className="stroke-border" strokeDasharray="2 5" />
|
|
54
56
|
|
|
55
57
|
{/* spark — the one brand accent */}
|
|
56
58
|
<polygon
|
|
57
|
-
points="
|
|
59
|
+
points="81,56 82.5,62.5 89,64 82.5,65.5 81,72 79.5,65.5 73,64 79.5,62.5"
|
|
58
60
|
className="fill-brand"
|
|
59
61
|
/>
|
|
60
62
|
</svg>
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { IllustrationProps } from '@vendure-io/ui/components/molecules/illustrations/illustration-types';
|
|
2
|
+
import { cn } from '@vendure-io/ui/lib/utils';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* A stopwatch whose hand is back at twelve and whose dashed track has run out.
|
|
6
|
+
* For something time-limited that ended: a trial or evaluation, an expired
|
|
7
|
+
* link, or a sign-in request that timed out. Pair it with an action that
|
|
8
|
+
* starts it again. Not for a request still waiting on someone (use
|
|
9
|
+
* `PendingApprovalIllustration`) or a generic failure (use
|
|
10
|
+
* `ErrorIllustration`).
|
|
11
|
+
*/
|
|
12
|
+
function ExpiredIllustration({ className, size = 160 }: IllustrationProps) {
|
|
13
|
+
return (
|
|
14
|
+
<svg
|
|
15
|
+
viewBox="0 0 160 120"
|
|
16
|
+
width={size}
|
|
17
|
+
height={(size * 120) / 160}
|
|
18
|
+
fill="none"
|
|
19
|
+
strokeWidth={1.5}
|
|
20
|
+
strokeLinecap="round"
|
|
21
|
+
strokeLinejoin="round"
|
|
22
|
+
aria-hidden="true"
|
|
23
|
+
focusable="false"
|
|
24
|
+
className={cn('shrink-0', className)}
|
|
25
|
+
>
|
|
26
|
+
<ellipse cx="80" cy="104" rx="28" ry="5" className="fill-muted" />
|
|
27
|
+
|
|
28
|
+
{/* crown stem + side button */}
|
|
29
|
+
<rect
|
|
30
|
+
x="77"
|
|
31
|
+
y="26"
|
|
32
|
+
width="6"
|
|
33
|
+
height="8"
|
|
34
|
+
rx="1"
|
|
35
|
+
className="fill-surface stroke-muted-foreground"
|
|
36
|
+
/>
|
|
37
|
+
<line x1="101" y1="41" x2="105" y2="37" className="stroke-muted-foreground" />
|
|
38
|
+
|
|
39
|
+
{/* body */}
|
|
40
|
+
<circle cx="80" cy="62" r="28" className="fill-surface stroke-muted-foreground" />
|
|
41
|
+
|
|
42
|
+
{/* track, run out */}
|
|
43
|
+
<circle cx="80" cy="62" r="21" className="stroke-border" strokeDasharray="2 4" />
|
|
44
|
+
|
|
45
|
+
{/* hand, back at twelve */}
|
|
46
|
+
<line x1="80" y1="62" x2="80" y2="45" className="stroke-muted-foreground" />
|
|
47
|
+
<circle cx="80" cy="62" r="2.5" className="fill-muted-foreground" />
|
|
48
|
+
|
|
49
|
+
{/* restart button — the one brand accent */}
|
|
50
|
+
<rect x="72" y="19" width="16" height="7" rx="3.5" className="fill-brand" />
|
|
51
|
+
</svg>
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export { ExpiredIllustration };
|
|
@@ -4,7 +4,9 @@ import { cn } from '@vendure-io/ui/lib/utils';
|
|
|
4
4
|
/**
|
|
5
5
|
* A rocket lifting off on a dashed motion trail, with a lit porthole and two
|
|
6
6
|
* drifting sparkles. For genuine first-run/onboarding moments — a feature
|
|
7
|
-
* with nothing set up yet, not a filtered or failed view.
|
|
7
|
+
* with nothing set up yet, not a filtered or failed view. Not for an
|
|
8
|
+
* ordinary list that is still empty (use `EmptyCollectionIllustration`) or a
|
|
9
|
+
* finished task (use `SuccessIllustration`).
|
|
8
10
|
*/
|
|
9
11
|
function FirstRunIllustration({ className, size = 160 }: IllustrationProps) {
|
|
10
12
|
return (
|
|
@@ -2,8 +2,8 @@ import type { IllustrationProps } from '@vendure-io/ui/components/molecules/illu
|
|
|
2
2
|
import { cn } from '@vendure-io/ui/lib/utils';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
* A vertical timeline rail with
|
|
6
|
-
*
|
|
5
|
+
* A vertical timeline rail with hollow nodes and dashed ghost rows beside
|
|
6
|
+
* them — the rail exists but no entries have landed on it yet.
|
|
7
7
|
* For audit logs / history / timeline views with nothing recorded — pass as
|
|
8
8
|
* `illustration` to `EmptyState`. For a generic empty list with no timeline
|
|
9
9
|
* shape, use `EmptyCollectionIllustration` instead.
|
|
@@ -25,23 +25,44 @@ function NoActivityIllustration({ className, size = 160 }: IllustrationProps) {
|
|
|
25
25
|
<ellipse cx="80" cy="104" rx="28" ry="5" className="fill-muted" />
|
|
26
26
|
|
|
27
27
|
{/* the timeline rail itself — present, just nothing on it */}
|
|
28
|
-
<line x1="50" y1="
|
|
28
|
+
<line x1="50" y1="24" x2="50" y2="90" className="stroke-muted-foreground" />
|
|
29
29
|
|
|
30
30
|
{/* nodes, hollow — no entries recorded at any of them */}
|
|
31
|
-
<circle cx="50" cy="
|
|
32
|
-
<circle cx="50" cy="
|
|
33
|
-
<circle cx="50" cy="84" r="
|
|
31
|
+
<circle cx="50" cy="30" r="6" className="fill-surface stroke-muted-foreground" />
|
|
32
|
+
<circle cx="50" cy="57" r="6" className="fill-surface stroke-muted-foreground" />
|
|
33
|
+
<circle cx="50" cy="84" r="6" className="fill-surface stroke-muted-foreground" />
|
|
34
34
|
|
|
35
35
|
{/* newest node — the one brand accent */}
|
|
36
|
-
<circle cx="50" cy="
|
|
36
|
+
<circle cx="50" cy="30" r="2.5" className="fill-brand" />
|
|
37
37
|
|
|
38
|
-
{/*
|
|
39
|
-
<
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
38
|
+
{/* ghost rows beside each node, waiting for content */}
|
|
39
|
+
<rect
|
|
40
|
+
x="64"
|
|
41
|
+
y="25"
|
|
42
|
+
width="50"
|
|
43
|
+
height="10"
|
|
44
|
+
rx="5"
|
|
45
|
+
className="stroke-border"
|
|
46
|
+
strokeDasharray="3 4"
|
|
47
|
+
/>
|
|
48
|
+
<rect
|
|
49
|
+
x="64"
|
|
50
|
+
y="52"
|
|
51
|
+
width="38"
|
|
52
|
+
height="10"
|
|
53
|
+
rx="5"
|
|
54
|
+
className="stroke-border"
|
|
55
|
+
strokeDasharray="3 4"
|
|
56
|
+
/>
|
|
57
|
+
<rect
|
|
58
|
+
x="64"
|
|
59
|
+
y="79"
|
|
60
|
+
width="44"
|
|
61
|
+
height="10"
|
|
62
|
+
rx="5"
|
|
63
|
+
className="stroke-border"
|
|
64
|
+
strokeDasharray="3 4"
|
|
65
|
+
/>
|
|
45
66
|
</svg>
|
|
46
67
|
);
|
|
47
68
|
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import type { IllustrationProps } from '@vendure-io/ui/components/molecules/illustrations/illustration-types';
|
|
2
|
+
import { cn } from '@vendure-io/ui/lib/utils';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* A shop front with an awning and an open door, and a dashed shopper outline
|
|
6
|
+
* where the first customer would stand. For a customer list or customer group
|
|
7
|
+
* with nobody in it yet. Not for a team or member list (use
|
|
8
|
+
* `NoMembersIllustration`) or a customer search that matched nobody (use
|
|
9
|
+
* `NoResultsIllustration`).
|
|
10
|
+
*/
|
|
11
|
+
function NoCustomersIllustration({ className, size = 160 }: IllustrationProps) {
|
|
12
|
+
return (
|
|
13
|
+
<svg
|
|
14
|
+
viewBox="0 0 160 120"
|
|
15
|
+
width={size}
|
|
16
|
+
height={(size * 120) / 160}
|
|
17
|
+
fill="none"
|
|
18
|
+
strokeWidth={1.5}
|
|
19
|
+
strokeLinecap="round"
|
|
20
|
+
strokeLinejoin="round"
|
|
21
|
+
aria-hidden="true"
|
|
22
|
+
focusable="false"
|
|
23
|
+
className={cn('shrink-0', className)}
|
|
24
|
+
>
|
|
25
|
+
<ellipse cx="80" cy="104" rx="36" ry="5" className="fill-muted" />
|
|
26
|
+
|
|
27
|
+
{/* shop */}
|
|
28
|
+
<rect
|
|
29
|
+
x="36"
|
|
30
|
+
y="50"
|
|
31
|
+
width="60"
|
|
32
|
+
height="42"
|
|
33
|
+
rx="2"
|
|
34
|
+
className="fill-surface stroke-muted-foreground"
|
|
35
|
+
/>
|
|
36
|
+
<rect x="44" y="60" width="20" height="14" rx="1" className="stroke-border" />
|
|
37
|
+
<rect
|
|
38
|
+
x="72"
|
|
39
|
+
y="62"
|
|
40
|
+
width="16"
|
|
41
|
+
height="30"
|
|
42
|
+
className="fill-background stroke-muted-foreground"
|
|
43
|
+
/>
|
|
44
|
+
|
|
45
|
+
{/* awning */}
|
|
46
|
+
<polygon points="36,36 96,36 100,50 32,50" className="fill-muted stroke-muted-foreground" />
|
|
47
|
+
<path
|
|
48
|
+
d="M32,50 a5.667,4 0 0,0 11.333,0 a5.667,4 0 0,0 11.333,0 a5.667,4 0 0,0 11.333,0 a5.667,4 0 0,0 11.333,0 a5.667,4 0 0,0 11.333,0 a5.667,4 0 0,0 11.333,0"
|
|
49
|
+
className="fill-muted stroke-muted-foreground"
|
|
50
|
+
/>
|
|
51
|
+
|
|
52
|
+
{/* open sign — the one brand accent */}
|
|
53
|
+
<rect x="74" y="67" width="12" height="6" rx="1.5" className="fill-brand" />
|
|
54
|
+
|
|
55
|
+
{/* first customer, not here yet */}
|
|
56
|
+
<circle cx="118" cy="60" r="7" className="stroke-muted-foreground" strokeDasharray="3 4" />
|
|
57
|
+
<path
|
|
58
|
+
d="M107,92 L107,78 A11,11 0 0,1 129,78 L129,92 Z"
|
|
59
|
+
className="stroke-muted-foreground"
|
|
60
|
+
strokeDasharray="3 4"
|
|
61
|
+
/>
|
|
62
|
+
</svg>
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export { NoCustomersIllustration };
|
|
@@ -3,9 +3,10 @@ import { cn } from '@vendure-io/ui/lib/utils';
|
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* A single document with a folded corner and a seal, with dashed "ghost"
|
|
6
|
-
* pages stacked behind it that never got filled in. For licenses,
|
|
7
|
-
* or
|
|
8
|
-
* (use `
|
|
6
|
+
* pages stacked behind it that never got filled in. For licenses,
|
|
7
|
+
* certificates, or changelog entries that haven't been issued yet. Not for
|
|
8
|
+
* invoices (use `NoInvoicesIllustration`), a generic empty list (use
|
|
9
|
+
* `EmptyCollectionIllustration`) or a 404 (use `NotFoundIllustration`).
|
|
9
10
|
*/
|
|
10
11
|
function NoDocumentsIllustration({ className, size = 160 }: IllustrationProps) {
|
|
11
12
|
return (
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { IllustrationProps } from '@vendure-io/ui/components/molecules/illustrations/illustration-types';
|
|
2
|
+
import { cn } from '@vendure-io/ui/lib/utils';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* A receipt with a torn, zigzag bottom edge and dashed line items, with only
|
|
6
|
+
* the total marked. For a billing page with no invoices or receipts yet. Not
|
|
7
|
+
* for licenses or certificates (use `NoDocumentsIllustration`) or an invoice
|
|
8
|
+
* whose payment failed (use `PaymentFailedIllustration`).
|
|
9
|
+
*/
|
|
10
|
+
function NoInvoicesIllustration({ className, size = 160 }: IllustrationProps) {
|
|
11
|
+
return (
|
|
12
|
+
<svg
|
|
13
|
+
viewBox="0 0 160 120"
|
|
14
|
+
width={size}
|
|
15
|
+
height={(size * 120) / 160}
|
|
16
|
+
fill="none"
|
|
17
|
+
strokeWidth={1.5}
|
|
18
|
+
strokeLinecap="round"
|
|
19
|
+
strokeLinejoin="round"
|
|
20
|
+
aria-hidden="true"
|
|
21
|
+
focusable="false"
|
|
22
|
+
className={cn('shrink-0', className)}
|
|
23
|
+
>
|
|
24
|
+
<ellipse cx="80" cy="104" rx="26" ry="5" className="fill-muted" />
|
|
25
|
+
|
|
26
|
+
{/* receipt, torn bottom edge */}
|
|
27
|
+
<path
|
|
28
|
+
d="M58,22 L102,22 L102,90 L97.6,86 L93.2,90 L88.8,86 L84.4,90 L80,86 L75.6,90 L71.2,86 L66.8,90 L62.4,86 L58,90 Z"
|
|
29
|
+
className="fill-surface stroke-muted-foreground"
|
|
30
|
+
/>
|
|
31
|
+
<line x1="66" y1="32" x2="86" y2="32" className="stroke-muted-foreground" />
|
|
32
|
+
|
|
33
|
+
{/* line items, none yet */}
|
|
34
|
+
<line x1="66" y1="44" x2="94" y2="44" className="stroke-border" strokeDasharray="3 4" />
|
|
35
|
+
<line x1="66" y1="52" x2="88" y2="52" className="stroke-border" strokeDasharray="3 4" />
|
|
36
|
+
<line x1="66" y1="60" x2="94" y2="60" className="stroke-border" strokeDasharray="3 4" />
|
|
37
|
+
<line x1="66" y1="69" x2="94" y2="69" className="stroke-border" />
|
|
38
|
+
|
|
39
|
+
{/* total — the one brand accent */}
|
|
40
|
+
<rect x="80" y="74" width="14" height="5" rx="2.5" className="fill-brand" />
|
|
41
|
+
</svg>
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export { NoInvoicesIllustration };
|
|
@@ -3,7 +3,8 @@ import { cn } from '@vendure-io/ui/lib/utils';
|
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* A bell at rest, its clapper still, with faint dashed arcs trailing off
|
|
6
|
-
* where a ring would sound
|
|
6
|
+
* where a ring would sound and a check badge on its shoulder — nothing new
|
|
7
|
+
* has come in. For an empty
|
|
7
8
|
* notifications/alerts panel where the user is caught up — pass as
|
|
8
9
|
* `illustration` to `EmptyState`. Not for a generic empty list with no bell
|
|
9
10
|
* shape (use `EmptyCollectionIllustration` instead).
|
|
@@ -25,8 +26,8 @@ function NoNotificationsIllustration({ className, size = 160 }: IllustrationProp
|
|
|
25
26
|
<ellipse cx="80" cy="104" rx="28" ry="5" className="fill-muted" />
|
|
26
27
|
|
|
27
28
|
{/* faint arcs where a ring would sound — dashed, trailing off */}
|
|
28
|
-
<path d="
|
|
29
|
-
<path d="
|
|
29
|
+
<path d="M46,46 Q38,54 46,62" className="stroke-border" strokeDasharray="2 5" />
|
|
30
|
+
<path d="M114,50 Q122,58 114,66" className="stroke-border" strokeDasharray="2 5" />
|
|
30
31
|
|
|
31
32
|
{/* hanging loop */}
|
|
32
33
|
<circle cx="80" cy="29" r="3" className="fill-surface stroke-muted-foreground" />
|
|
@@ -40,11 +41,9 @@ function NoNotificationsIllustration({ className, size = 160 }: IllustrationProp
|
|
|
40
41
|
{/* clapper, still and centered — nothing ringing it */}
|
|
41
42
|
<circle cx="80" cy="72" r="2.5" className="fill-muted-foreground" />
|
|
42
43
|
|
|
43
|
-
{/*
|
|
44
|
-
<
|
|
45
|
-
|
|
46
|
-
className="fill-brand"
|
|
47
|
-
/>
|
|
44
|
+
{/* caught-up badge — the one brand accent, with a neutral check */}
|
|
45
|
+
<circle cx="98" cy="38" r="8" className="fill-brand" />
|
|
46
|
+
<path d="M94.5,38 L97,40.5 L101.5,35.5" className="stroke-surface" />
|
|
48
47
|
</svg>
|
|
49
48
|
);
|
|
50
49
|
}
|
|
@@ -2,9 +2,11 @@ import type { IllustrationProps } from '@vendure-io/ui/components/molecules/illu
|
|
|
2
2
|
import { cn } from '@vendure-io/ui/lib/utils';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
* An empty cart
|
|
6
|
-
*
|
|
7
|
-
* them yet.
|
|
5
|
+
* An empty shopping cart parked on the ground, with a dashed parcel outline
|
|
6
|
+
* above the basket where the first order would go. For order/checkout lists
|
|
7
|
+
* with nothing in them yet. Not for a search or filter that matched no orders
|
|
8
|
+
* (use `NoResultsIllustration`) or a generic empty list (use
|
|
9
|
+
* `EmptyCollectionIllustration`).
|
|
8
10
|
*/
|
|
9
11
|
function NoOrdersIllustration({ className, size = 160 }: IllustrationProps) {
|
|
10
12
|
return (
|
|
@@ -20,27 +22,33 @@ function NoOrdersIllustration({ className, size = 160 }: IllustrationProps) {
|
|
|
20
22
|
focusable="false"
|
|
21
23
|
className={cn('shrink-0', className)}
|
|
22
24
|
>
|
|
23
|
-
<ellipse cx="
|
|
25
|
+
<ellipse cx="84" cy="104" rx="32" ry="5" className="fill-muted" />
|
|
24
26
|
|
|
25
|
-
{/*
|
|
26
|
-
<
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
{/* parcel outline, where the first order would go */}
|
|
28
|
+
<rect
|
|
29
|
+
x="76"
|
|
30
|
+
y="20"
|
|
31
|
+
width="30"
|
|
32
|
+
height="20"
|
|
33
|
+
rx="3"
|
|
34
|
+
className="stroke-border"
|
|
35
|
+
strokeDasharray="3 4"
|
|
36
|
+
/>
|
|
29
37
|
|
|
30
38
|
{/* handle */}
|
|
31
|
-
<path d="
|
|
39
|
+
<path d="M52,48 L44,26 L36,26" className="stroke-muted-foreground" />
|
|
32
40
|
|
|
33
|
-
{/* basket */}
|
|
34
|
-
<path d="
|
|
35
|
-
<line x1="
|
|
36
|
-
<line x1="
|
|
41
|
+
{/* basket, empty */}
|
|
42
|
+
<path d="M52,48 L128,48 L118,82 L62,82 Z" className="fill-surface stroke-muted-foreground" />
|
|
43
|
+
<line x1="59" y1="60" x2="121" y2="60" className="stroke-border" strokeDasharray="3 3" />
|
|
44
|
+
<line x1="62" y1="71" x2="118" y2="71" className="stroke-border" strokeDasharray="3 3" />
|
|
37
45
|
|
|
38
46
|
{/* wheels */}
|
|
39
|
-
<circle cx="
|
|
40
|
-
<circle cx="
|
|
47
|
+
<circle cx="70" cy="91" r="6" className="fill-surface stroke-muted-foreground" />
|
|
48
|
+
<circle cx="110" cy="91" r="6" className="fill-surface stroke-muted-foreground" />
|
|
41
49
|
|
|
42
|
-
{/*
|
|
43
|
-
<
|
|
50
|
+
{/* handle grip — the one brand accent */}
|
|
51
|
+
<rect x="26" y="23" width="12" height="6" rx="3" className="fill-brand" />
|
|
44
52
|
</svg>
|
|
45
53
|
);
|
|
46
54
|
}
|
|
@@ -2,8 +2,8 @@ import type { IllustrationProps } from '@vendure-io/ui/components/molecules/illu
|
|
|
2
2
|
import { cn } from '@vendure-io/ui/lib/utils';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
* A module block hovering above a dashed socket
|
|
6
|
-
* an extension point with nothing plugged in. For an empty plugin list, or a
|
|
5
|
+
* A module block with two pins hovering above a dashed socket of the same
|
|
6
|
+
* footprint — an extension point with nothing plugged in. For an empty plugin list, or a
|
|
7
7
|
* plugin catalog with nothing installed — pass as `illustration` to
|
|
8
8
|
* `EmptyState`.
|
|
9
9
|
*
|
|
@@ -26,45 +26,35 @@ function NoPluginsIllustration({ className, size = 160 }: IllustrationProps) {
|
|
|
26
26
|
>
|
|
27
27
|
<ellipse cx="80" cy="104" rx="28" ry="5" className="fill-muted" />
|
|
28
28
|
|
|
29
|
-
{/* module block, hovering */}
|
|
29
|
+
{/* module block, hovering, with its two pins */}
|
|
30
|
+
<rect x="67" y="50" width="6" height="10" rx="1" className="fill-muted-foreground" />
|
|
31
|
+
<rect x="87" y="50" width="6" height="10" rx="1" className="fill-muted-foreground" />
|
|
30
32
|
<rect
|
|
31
|
-
x="
|
|
32
|
-
y="
|
|
33
|
-
width="
|
|
34
|
-
height="
|
|
33
|
+
x="54"
|
|
34
|
+
y="18"
|
|
35
|
+
width="52"
|
|
36
|
+
height="34"
|
|
35
37
|
rx="4"
|
|
36
38
|
className="fill-surface stroke-muted-foreground"
|
|
37
39
|
/>
|
|
38
|
-
<
|
|
39
|
-
|
|
40
|
-
y="46"
|
|
41
|
-
width="12"
|
|
42
|
-
height="12"
|
|
43
|
-
rx="2"
|
|
44
|
-
className="fill-surface stroke-muted-foreground"
|
|
45
|
-
/>
|
|
46
|
-
{/* connector pin — the one brand accent */}
|
|
47
|
-
<circle cx="80" cy="52" r="2.5" className="fill-brand" />
|
|
40
|
+
<line x1="62" y1="28" x2="84" y2="28" className="stroke-border" />
|
|
41
|
+
<line x1="62" y1="36" x2="76" y2="36" className="stroke-border" />
|
|
48
42
|
|
|
49
|
-
{/*
|
|
50
|
-
<
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
width="12"
|
|
54
|
-
height="12"
|
|
55
|
-
rx="2"
|
|
56
|
-
className="stroke-border"
|
|
57
|
-
strokeDasharray="2 4"
|
|
58
|
-
/>
|
|
43
|
+
{/* status light — the one brand accent */}
|
|
44
|
+
<circle cx="96" cy="28" r="3" className="fill-brand" />
|
|
45
|
+
|
|
46
|
+
{/* empty socket, same footprint, waiting below */}
|
|
59
47
|
<rect
|
|
60
|
-
x="
|
|
61
|
-
y="
|
|
62
|
-
width="
|
|
63
|
-
height="
|
|
48
|
+
x="54"
|
|
49
|
+
y="76"
|
|
50
|
+
width="52"
|
|
51
|
+
height="20"
|
|
64
52
|
rx="4"
|
|
65
53
|
className="stroke-border"
|
|
66
54
|
strokeDasharray="3 4"
|
|
67
55
|
/>
|
|
56
|
+
<rect x="67" y="80" width="6" height="8" rx="1" className="stroke-border" />
|
|
57
|
+
<rect x="87" y="80" width="6" height="8" rx="1" className="stroke-border" />
|
|
68
58
|
</svg>
|
|
69
59
|
);
|
|
70
60
|
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { IllustrationProps } from '@vendure-io/ui/components/molecules/illustrations/illustration-types';
|
|
2
|
+
import { cn } from '@vendure-io/ui/lib/utils';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* A price tag on a string with no price written on it, in front of a dashed
|
|
6
|
+
* second tag. For an empty catalog: no products, variants, or collection
|
|
7
|
+
* contents yet. Not for a search or filter that matched no products (use
|
|
8
|
+
* `NoResultsIllustration`) or an empty promotions list (use
|
|
9
|
+
* `NoPromotionsIllustration`).
|
|
10
|
+
*/
|
|
11
|
+
function NoProductsIllustration({ className, size = 160 }: IllustrationProps) {
|
|
12
|
+
return (
|
|
13
|
+
<svg
|
|
14
|
+
viewBox="0 0 160 120"
|
|
15
|
+
width={size}
|
|
16
|
+
height={(size * 120) / 160}
|
|
17
|
+
fill="none"
|
|
18
|
+
strokeWidth={1.5}
|
|
19
|
+
strokeLinecap="round"
|
|
20
|
+
strokeLinejoin="round"
|
|
21
|
+
aria-hidden="true"
|
|
22
|
+
focusable="false"
|
|
23
|
+
className={cn('shrink-0', className)}
|
|
24
|
+
>
|
|
25
|
+
<ellipse cx="80" cy="104" rx="30" ry="5" className="fill-muted" />
|
|
26
|
+
|
|
27
|
+
{/* second tag, not there yet */}
|
|
28
|
+
<path
|
|
29
|
+
d="M68,36 L118,36 Q122,36 122,40 L122,72 Q122,76 118,76 L68,76 L50,56 Z"
|
|
30
|
+
className="stroke-border"
|
|
31
|
+
strokeDasharray="3 4"
|
|
32
|
+
/>
|
|
33
|
+
|
|
34
|
+
{/* string */}
|
|
35
|
+
<path d="M53,68 C42,62 38,48 46,36" className="stroke-muted-foreground" />
|
|
36
|
+
|
|
37
|
+
{/* tag */}
|
|
38
|
+
<path
|
|
39
|
+
d="M58,48 L108,48 Q112,48 112,52 L112,84 Q112,88 108,88 L58,88 L40,68 Z"
|
|
40
|
+
className="fill-surface stroke-muted-foreground"
|
|
41
|
+
/>
|
|
42
|
+
|
|
43
|
+
{/* price, not set */}
|
|
44
|
+
<line x1="66" y1="62" x2="102" y2="62" className="stroke-border" strokeDasharray="3 4" />
|
|
45
|
+
<line x1="66" y1="74" x2="90" y2="74" className="stroke-border" strokeDasharray="3 4" />
|
|
46
|
+
|
|
47
|
+
{/* eyelet — the one brand accent */}
|
|
48
|
+
<circle cx="53" cy="68" r="4" className="fill-brand" />
|
|
49
|
+
</svg>
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export { NoProductsIllustration };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { IllustrationProps } from '@vendure-io/ui/components/molecules/illustrations/illustration-types';
|
|
2
|
+
import { cn } from '@vendure-io/ui/lib/utils';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* An open folder with a dashed sheet inside where the first project would go,
|
|
6
|
+
* and a label on its front. For a list of projects that is empty: a customer
|
|
7
|
+
* with no projects provisioned, or an account whose projects are all
|
|
8
|
+
* archived. Not for the account's first-run "Create your first project"
|
|
9
|
+
* moment (use `FirstRunIllustration`) or a search that matched no projects
|
|
10
|
+
* (use `NoResultsIllustration`).
|
|
11
|
+
*/
|
|
12
|
+
function NoProjectsIllustration({ className, size = 160 }: IllustrationProps) {
|
|
13
|
+
return (
|
|
14
|
+
<svg
|
|
15
|
+
viewBox="0 0 160 120"
|
|
16
|
+
width={size}
|
|
17
|
+
height={(size * 120) / 160}
|
|
18
|
+
fill="none"
|
|
19
|
+
strokeWidth={1.5}
|
|
20
|
+
strokeLinecap="round"
|
|
21
|
+
strokeLinejoin="round"
|
|
22
|
+
aria-hidden="true"
|
|
23
|
+
focusable="false"
|
|
24
|
+
className={cn('shrink-0', className)}
|
|
25
|
+
>
|
|
26
|
+
<ellipse cx="82" cy="104" rx="34" ry="5" className="fill-muted" />
|
|
27
|
+
|
|
28
|
+
{/* back panel with tab */}
|
|
29
|
+
<path
|
|
30
|
+
d="M44,28 L62,28 L68,36 L116,36 C117.1,36 118,36.9 118,38 L118,88 C118,89.1 117.1,90 116,90 L44,90 C42.9,90 42,89.1 42,88 L42,30 C42,28.9 42.9,28 44,28 Z"
|
|
31
|
+
className="fill-muted stroke-muted-foreground"
|
|
32
|
+
/>
|
|
33
|
+
|
|
34
|
+
{/* sheet, not there yet */}
|
|
35
|
+
<rect
|
|
36
|
+
x="64"
|
|
37
|
+
y="22"
|
|
38
|
+
width="44"
|
|
39
|
+
height="40"
|
|
40
|
+
rx="2"
|
|
41
|
+
className="fill-background stroke-border"
|
|
42
|
+
strokeDasharray="3 4"
|
|
43
|
+
/>
|
|
44
|
+
|
|
45
|
+
{/* front flap, tilted open */}
|
|
46
|
+
<path d="M48,56 L124,56 L118,90 L42,90 Z" className="fill-surface stroke-muted-foreground" />
|
|
47
|
+
|
|
48
|
+
{/* label — the one brand accent */}
|
|
49
|
+
<rect x="70" y="68" width="24" height="7" rx="3.5" className="fill-brand" />
|
|
50
|
+
</svg>
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export { NoProjectsIllustration };
|