@openwarelabs/blocks 0.9.0 → 0.10.1
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/README.md +36 -10
- package/dist/app-shells/Shell01/Shell01.d.cts +6 -0
- package/dist/app-shells/Shell01/Shell01.d.ts +6 -0
- package/dist/app-shells/Shell01/Shell01.types.d.cts +48 -0
- package/dist/app-shells/Shell01/Shell01.types.d.ts +48 -0
- package/dist/app-shells/Shell02/Shell02.d.cts +7 -0
- package/dist/app-shells/Shell02/Shell02.d.ts +7 -0
- package/dist/app-shells/Shell02/Shell02.types.d.cts +50 -0
- package/dist/app-shells/Shell02/Shell02.types.d.ts +50 -0
- package/dist/app-shells/Shell03/Shell03.d.cts +6 -0
- package/dist/app-shells/Shell03/Shell03.d.ts +6 -0
- package/dist/app-shells/Shell03/Shell03.types.d.cts +73 -0
- package/dist/app-shells/Shell03/Shell03.types.d.ts +73 -0
- package/dist/app-shells/Shell04/Shell04.d.cts +6 -0
- package/dist/app-shells/Shell04/Shell04.d.ts +6 -0
- package/dist/app-shells/Shell04/Shell04.types.d.cts +68 -0
- package/dist/app-shells/Shell04/Shell04.types.d.ts +68 -0
- package/dist/blog/Blog01/Blog01.d.cts +3 -0
- package/dist/blog/Blog01/Blog01.d.ts +3 -0
- package/dist/blog/Blog01/Blog01.types.d.cts +55 -0
- package/dist/blog/Blog01/Blog01.types.d.ts +55 -0
- package/dist/blog/Blog02/Blog02.d.cts +3 -0
- package/dist/blog/Blog02/Blog02.d.ts +3 -0
- package/dist/blog/Blog02/Blog02.types.d.cts +51 -0
- package/dist/blog/Blog02/Blog02.types.d.ts +51 -0
- package/dist/blog/Blog03/Blog03.d.cts +3 -0
- package/dist/blog/Blog03/Blog03.d.ts +3 -0
- package/dist/blog/Blog03/Blog03.types.d.cts +66 -0
- package/dist/blog/Blog03/Blog03.types.d.ts +66 -0
- package/dist/blog/Blog04/Blog04.d.cts +3 -0
- package/dist/blog/Blog04/Blog04.d.ts +3 -0
- package/dist/blog/Blog04/Blog04.types.d.cts +64 -0
- package/dist/blog/Blog04/Blog04.types.d.ts +64 -0
- package/dist/chat/Chat01/Chat01.d.cts +6 -0
- package/dist/chat/Chat01/Chat01.d.ts +6 -0
- package/dist/chat/Chat01/Chat01.types.d.cts +95 -0
- package/dist/chat/Chat01/Chat01.types.d.ts +95 -0
- package/dist/chat/Chat02/Chat02.d.cts +6 -0
- package/dist/chat/Chat02/Chat02.d.ts +6 -0
- package/dist/chat/Chat02/Chat02.types.d.cts +70 -0
- package/dist/chat/Chat02/Chat02.types.d.ts +70 -0
- package/dist/chat/Chat03/Chat03.d.cts +6 -0
- package/dist/chat/Chat03/Chat03.d.ts +6 -0
- package/dist/chat/Chat03/Chat03.types.d.cts +96 -0
- package/dist/chat/Chat03/Chat03.types.d.ts +96 -0
- package/dist/contact/Contact01/Contact01.d.cts +3 -0
- package/dist/contact/Contact01/Contact01.d.ts +3 -0
- package/dist/contact/Contact01/Contact01.types.d.cts +103 -0
- package/dist/contact/Contact01/Contact01.types.d.ts +103 -0
- package/dist/contact/Contact02/Contact02.d.cts +3 -0
- package/dist/contact/Contact02/Contact02.d.ts +3 -0
- package/dist/contact/Contact02/Contact02.types.d.cts +56 -0
- package/dist/contact/Contact02/Contact02.types.d.ts +56 -0
- package/dist/dashboards/Dashboard01/Dashboard01.d.cts +3 -0
- package/dist/dashboards/Dashboard01/Dashboard01.d.ts +3 -0
- package/dist/dashboards/Dashboard01/Dashboard01.types.d.cts +53 -0
- package/dist/dashboards/Dashboard01/Dashboard01.types.d.ts +53 -0
- package/dist/dashboards/Dashboard02/Dashboard02.d.cts +3 -0
- package/dist/dashboards/Dashboard02/Dashboard02.d.ts +3 -0
- package/dist/dashboards/Dashboard02/Dashboard02.types.d.cts +74 -0
- package/dist/dashboards/Dashboard02/Dashboard02.types.d.ts +74 -0
- package/dist/dashboards/Dashboard03/Dashboard03.d.cts +6 -0
- package/dist/dashboards/Dashboard03/Dashboard03.d.ts +6 -0
- package/dist/dashboards/Dashboard03/Dashboard03.types.d.cts +131 -0
- package/dist/dashboards/Dashboard03/Dashboard03.types.d.ts +131 -0
- package/dist/empty-states/Empty01/Empty01.d.cts +3 -0
- package/dist/empty-states/Empty01/Empty01.d.ts +3 -0
- package/dist/empty-states/Empty01/Empty01.types.d.cts +94 -0
- package/dist/empty-states/Empty01/Empty01.types.d.ts +94 -0
- package/dist/empty-states/Empty02/Empty02.d.cts +3 -0
- package/dist/empty-states/Empty02/Empty02.d.ts +3 -0
- package/dist/empty-states/Empty02/Empty02.types.d.cts +72 -0
- package/dist/empty-states/Empty02/Empty02.types.d.ts +72 -0
- package/dist/empty-states/Empty03/Empty03.d.cts +3 -0
- package/dist/empty-states/Empty03/Empty03.d.ts +3 -0
- package/dist/empty-states/Empty03/Empty03.types.d.cts +72 -0
- package/dist/empty-states/Empty03/Empty03.types.d.ts +72 -0
- package/dist/error-pages/ErrorPage01/ErrorPage01.d.cts +3 -0
- package/dist/error-pages/ErrorPage01/ErrorPage01.d.ts +3 -0
- package/dist/error-pages/ErrorPage01/ErrorPage01.types.d.cts +48 -0
- package/dist/error-pages/ErrorPage01/ErrorPage01.types.d.ts +48 -0
- package/dist/error-pages/ErrorPage02/ErrorPage02.d.cts +3 -0
- package/dist/error-pages/ErrorPage02/ErrorPage02.d.ts +3 -0
- package/dist/error-pages/ErrorPage02/ErrorPage02.types.d.cts +45 -0
- package/dist/error-pages/ErrorPage02/ErrorPage02.types.d.ts +45 -0
- package/dist/error-pages/ErrorPage03/ErrorPage03.d.cts +3 -0
- package/dist/error-pages/ErrorPage03/ErrorPage03.d.ts +3 -0
- package/dist/error-pages/ErrorPage03/ErrorPage03.types.d.cts +45 -0
- package/dist/error-pages/ErrorPage03/ErrorPage03.types.d.ts +45 -0
- package/dist/faq/Faq01/Faq01.d.cts +3 -0
- package/dist/faq/Faq01/Faq01.d.ts +3 -0
- package/dist/faq/Faq01/Faq01.types.d.cts +23 -0
- package/dist/faq/Faq01/Faq01.types.d.ts +23 -0
- package/dist/faq/Faq02/Faq02.d.cts +3 -0
- package/dist/faq/Faq02/Faq02.d.ts +3 -0
- package/dist/faq/Faq02/Faq02.types.d.cts +24 -0
- package/dist/faq/Faq02/Faq02.types.d.ts +24 -0
- package/dist/faq/Faq03/Faq03.d.cts +3 -0
- package/dist/faq/Faq03/Faq03.d.ts +3 -0
- package/dist/faq/Faq03/Faq03.types.d.cts +42 -0
- package/dist/faq/Faq03/Faq03.types.d.ts +42 -0
- package/dist/forms/Form01/Form01.d.cts +3 -0
- package/dist/forms/Form01/Form01.d.ts +3 -0
- package/dist/forms/Form01/Form01.types.d.cts +20 -0
- package/dist/forms/Form01/Form01.types.d.ts +20 -0
- package/dist/forms/Form02/Form02.d.cts +3 -0
- package/dist/forms/Form02/Form02.d.ts +3 -0
- package/dist/forms/Form02/Form02.types.d.cts +38 -0
- package/dist/forms/Form02/Form02.types.d.ts +38 -0
- package/dist/forms/Form03/Form03.d.cts +3 -0
- package/dist/forms/Form03/Form03.d.ts +3 -0
- package/dist/forms/Form03/Form03.types.d.cts +55 -0
- package/dist/forms/Form03/Form03.types.d.ts +55 -0
- package/dist/index.cjs +6190 -22
- package/dist/index.cjs.map +4 -4
- package/dist/index.d.cts +135 -1
- package/dist/index.d.ts +135 -1
- package/dist/index.js +6220 -19
- package/dist/index.js.map +4 -4
- package/dist/lists-and-tables/List01/List01.d.cts +6 -0
- package/dist/lists-and-tables/List01/List01.d.ts +6 -0
- package/dist/lists-and-tables/List01/List01.types.d.cts +60 -0
- package/dist/lists-and-tables/List01/List01.types.d.ts +60 -0
- package/dist/lists-and-tables/List02/List02.d.cts +3 -0
- package/dist/lists-and-tables/List02/List02.d.ts +3 -0
- package/dist/lists-and-tables/List02/List02.types.d.cts +54 -0
- package/dist/lists-and-tables/List02/List02.types.d.ts +54 -0
- package/dist/lists-and-tables/List03/List03.d.cts +3 -0
- package/dist/lists-and-tables/List03/List03.d.ts +3 -0
- package/dist/lists-and-tables/List03/List03.types.d.cts +41 -0
- package/dist/lists-and-tables/List03/List03.types.d.ts +41 -0
- package/dist/lists-and-tables/List04/List04.d.cts +3 -0
- package/dist/lists-and-tables/List04/List04.d.ts +3 -0
- package/dist/lists-and-tables/List04/List04.types.d.cts +67 -0
- package/dist/lists-and-tables/List04/List04.types.d.ts +67 -0
- package/dist/logo-clouds/Logos01/Logos01.d.cts +3 -0
- package/dist/logo-clouds/Logos01/Logos01.d.ts +3 -0
- package/dist/logo-clouds/Logos01/Logos01.types.d.cts +13 -0
- package/dist/logo-clouds/Logos01/Logos01.types.d.ts +13 -0
- package/dist/logo-clouds/Logos02/Logos02.d.cts +3 -0
- package/dist/logo-clouds/Logos02/Logos02.d.ts +3 -0
- package/dist/logo-clouds/Logos02/Logos02.types.d.cts +28 -0
- package/dist/logo-clouds/Logos02/Logos02.types.d.ts +28 -0
- package/dist/logo-clouds/Logos03/Logos03.d.cts +3 -0
- package/dist/logo-clouds/Logos03/Logos03.d.ts +3 -0
- package/dist/logo-clouds/Logos03/Logos03.types.d.cts +23 -0
- package/dist/logo-clouds/Logos03/Logos03.types.d.ts +23 -0
- package/dist/newsletter/Newsletter01/Newsletter01.d.cts +3 -0
- package/dist/newsletter/Newsletter01/Newsletter01.d.ts +3 -0
- package/dist/newsletter/Newsletter01/Newsletter01.types.d.cts +39 -0
- package/dist/newsletter/Newsletter01/Newsletter01.types.d.ts +39 -0
- package/dist/newsletter/Newsletter02/Newsletter02.d.cts +3 -0
- package/dist/newsletter/Newsletter02/Newsletter02.d.ts +3 -0
- package/dist/newsletter/Newsletter02/Newsletter02.types.d.cts +42 -0
- package/dist/newsletter/Newsletter02/Newsletter02.types.d.ts +42 -0
- package/dist/notifications/Notifications01/Notifications01.d.cts +3 -0
- package/dist/notifications/Notifications01/Notifications01.d.ts +3 -0
- package/dist/notifications/Notifications01/Notifications01.types.d.cts +74 -0
- package/dist/notifications/Notifications01/Notifications01.types.d.ts +74 -0
- package/dist/notifications/Notifications02/Notifications02.d.cts +3 -0
- package/dist/notifications/Notifications02/Notifications02.d.ts +3 -0
- package/dist/notifications/Notifications02/Notifications02.types.d.cts +65 -0
- package/dist/notifications/Notifications02/Notifications02.types.d.ts +65 -0
- package/dist/notifications/Notifications03/Notifications03.d.cts +3 -0
- package/dist/notifications/Notifications03/Notifications03.d.ts +3 -0
- package/dist/notifications/Notifications03/Notifications03.types.d.cts +87 -0
- package/dist/notifications/Notifications03/Notifications03.types.d.ts +87 -0
- package/dist/onboarding/Onboarding01/Onboarding01.d.cts +3 -0
- package/dist/onboarding/Onboarding01/Onboarding01.d.ts +3 -0
- package/dist/onboarding/Onboarding01/Onboarding01.types.d.cts +46 -0
- package/dist/onboarding/Onboarding01/Onboarding01.types.d.ts +46 -0
- package/dist/onboarding/Onboarding02/Onboarding02.d.cts +3 -0
- package/dist/onboarding/Onboarding02/Onboarding02.d.ts +3 -0
- package/dist/onboarding/Onboarding02/Onboarding02.types.d.cts +68 -0
- package/dist/onboarding/Onboarding02/Onboarding02.types.d.ts +68 -0
- package/dist/onboarding/Onboarding03/Onboarding03.d.cts +3 -0
- package/dist/onboarding/Onboarding03/Onboarding03.d.ts +3 -0
- package/dist/onboarding/Onboarding03/Onboarding03.types.d.cts +38 -0
- package/dist/onboarding/Onboarding03/Onboarding03.types.d.ts +38 -0
- package/dist/page-headings/PageHeading01/PageHeading01.d.cts +6 -0
- package/dist/page-headings/PageHeading01/PageHeading01.d.ts +6 -0
- package/dist/page-headings/PageHeading01/PageHeading01.types.d.cts +35 -0
- package/dist/page-headings/PageHeading01/PageHeading01.types.d.ts +35 -0
- package/dist/page-headings/PageHeading02/PageHeading02.d.cts +3 -0
- package/dist/page-headings/PageHeading02/PageHeading02.d.ts +3 -0
- package/dist/page-headings/PageHeading02/PageHeading02.types.d.cts +49 -0
- package/dist/page-headings/PageHeading02/PageHeading02.types.d.ts +49 -0
- package/dist/page-headings/PageHeading03/PageHeading03.d.cts +6 -0
- package/dist/page-headings/PageHeading03/PageHeading03.d.ts +6 -0
- package/dist/page-headings/PageHeading03/PageHeading03.types.d.cts +83 -0
- package/dist/page-headings/PageHeading03/PageHeading03.types.d.ts +83 -0
- package/dist/section-headings/SectionHeading01/SectionHeading01.d.cts +3 -0
- package/dist/section-headings/SectionHeading01/SectionHeading01.d.ts +3 -0
- package/dist/section-headings/SectionHeading01/SectionHeading01.types.d.cts +9 -0
- package/dist/section-headings/SectionHeading01/SectionHeading01.types.d.ts +9 -0
- package/dist/section-headings/SectionHeading02/SectionHeading02.d.cts +3 -0
- package/dist/section-headings/SectionHeading02/SectionHeading02.d.ts +3 -0
- package/dist/section-headings/SectionHeading02/SectionHeading02.types.d.cts +12 -0
- package/dist/section-headings/SectionHeading02/SectionHeading02.types.d.ts +12 -0
- package/dist/section-headings/SectionHeading03/SectionHeading03.d.cts +3 -0
- package/dist/section-headings/SectionHeading03/SectionHeading03.d.ts +3 -0
- package/dist/section-headings/SectionHeading03/SectionHeading03.types.d.cts +12 -0
- package/dist/section-headings/SectionHeading03/SectionHeading03.types.d.ts +12 -0
- package/dist/settings/Settings01/Settings01.d.cts +3 -0
- package/dist/settings/Settings01/Settings01.d.ts +3 -0
- package/dist/settings/Settings01/Settings01.types.d.cts +46 -0
- package/dist/settings/Settings01/Settings01.types.d.ts +46 -0
- package/dist/settings/Settings02/Settings02.d.cts +3 -0
- package/dist/settings/Settings02/Settings02.d.ts +3 -0
- package/dist/settings/Settings02/Settings02.types.d.cts +45 -0
- package/dist/settings/Settings02/Settings02.types.d.ts +45 -0
- package/dist/settings/Settings03/Settings03.d.cts +3 -0
- package/dist/settings/Settings03/Settings03.d.ts +3 -0
- package/dist/settings/Settings03/Settings03.types.d.cts +132 -0
- package/dist/settings/Settings03/Settings03.types.d.ts +132 -0
- package/dist/settings/Settings04/Settings04.d.cts +3 -0
- package/dist/settings/Settings04/Settings04.d.ts +3 -0
- package/dist/settings/Settings04/Settings04.types.d.cts +124 -0
- package/dist/settings/Settings04/Settings04.types.d.ts +124 -0
- package/dist/settings/Settings05/Settings05.d.cts +3 -0
- package/dist/settings/Settings05/Settings05.d.ts +3 -0
- package/dist/settings/Settings05/Settings05.types.d.cts +94 -0
- package/dist/settings/Settings05/Settings05.types.d.ts +94 -0
- package/dist/shared/AppWorkspaceItems.d.cts +3 -0
- package/dist/shared/AppWorkspaceItems.d.ts +3 -0
- package/dist/shared/BlockActions.d.cts +1 -1
- package/dist/shared/BlockActions.d.ts +1 -1
- package/dist/shared/BlockMenuItems.d.cts +3 -0
- package/dist/shared/BlockMenuItems.d.ts +3 -0
- package/dist/shared/appShell.d.cts +19 -0
- package/dist/shared/appShell.d.ts +19 -0
- package/dist/shared/icons.d.cts +59 -13
- package/dist/shared/icons.d.ts +59 -13
- package/dist/shared/shared.types.d.cts +128 -0
- package/dist/shared/shared.types.d.ts +128 -0
- package/dist/shared/tableColumns.d.cts +10 -0
- package/dist/shared/tableColumns.d.ts +10 -0
- package/dist/sign-in/SignIn01/SignIn01.d.cts +3 -0
- package/dist/sign-in/SignIn01/SignIn01.d.ts +3 -0
- package/dist/sign-in/SignIn01/SignIn01.types.d.cts +52 -0
- package/dist/sign-in/SignIn01/SignIn01.types.d.ts +52 -0
- package/dist/sign-in/SignIn02/SignIn02.d.cts +3 -0
- package/dist/sign-in/SignIn02/SignIn02.d.ts +3 -0
- package/dist/sign-in/SignIn02/SignIn02.types.d.cts +79 -0
- package/dist/sign-in/SignIn02/SignIn02.types.d.ts +79 -0
- package/dist/sign-in/SignIn03/SignIn03.d.cts +3 -0
- package/dist/sign-in/SignIn03/SignIn03.d.ts +3 -0
- package/dist/sign-in/SignIn03/SignIn03.types.d.cts +51 -0
- package/dist/sign-in/SignIn03/SignIn03.types.d.ts +51 -0
- package/dist/sign-in/SignIn04/SignIn04.d.cts +3 -0
- package/dist/sign-in/SignIn04/SignIn04.d.ts +3 -0
- package/dist/sign-in/SignIn04/SignIn04.types.d.cts +56 -0
- package/dist/sign-in/SignIn04/SignIn04.types.d.ts +56 -0
- package/dist/sign-in/SignIn05/SignIn05.d.cts +3 -0
- package/dist/sign-in/SignIn05/SignIn05.d.ts +3 -0
- package/dist/sign-in/SignIn05/SignIn05.types.d.cts +86 -0
- package/dist/sign-in/SignIn05/SignIn05.types.d.ts +86 -0
- package/dist/stats/Stats01/Stats01.d.cts +3 -0
- package/dist/stats/Stats01/Stats01.d.ts +3 -0
- package/dist/stats/Stats01/Stats01.types.d.cts +19 -0
- package/dist/stats/Stats01/Stats01.types.d.ts +19 -0
- package/dist/stats/Stats02/Stats02.d.cts +3 -0
- package/dist/stats/Stats02/Stats02.d.ts +3 -0
- package/dist/stats/Stats02/Stats02.types.d.cts +30 -0
- package/dist/stats/Stats02/Stats02.types.d.ts +30 -0
- package/dist/stats/Stats03/Stats03.d.cts +3 -0
- package/dist/stats/Stats03/Stats03.d.ts +3 -0
- package/dist/stats/Stats03/Stats03.types.d.cts +24 -0
- package/dist/stats/Stats03/Stats03.types.d.ts +24 -0
- package/dist/styles.css +11992 -2727
- package/dist/team/Team01/Team01.d.cts +3 -0
- package/dist/team/Team01/Team01.d.ts +3 -0
- package/dist/team/Team01/Team01.types.d.cts +25 -0
- package/dist/team/Team01/Team01.types.d.ts +25 -0
- package/dist/team/Team02/Team02.d.cts +3 -0
- package/dist/team/Team02/Team02.d.ts +3 -0
- package/dist/team/Team02/Team02.types.d.cts +37 -0
- package/dist/team/Team02/Team02.types.d.ts +37 -0
- package/dist/testimonials/Testimonial01/Testimonial01.d.cts +3 -0
- package/dist/testimonials/Testimonial01/Testimonial01.d.ts +3 -0
- package/dist/testimonials/Testimonial01/Testimonial01.types.d.cts +21 -0
- package/dist/testimonials/Testimonial01/Testimonial01.types.d.ts +21 -0
- package/dist/testimonials/Testimonial02/Testimonial02.d.cts +3 -0
- package/dist/testimonials/Testimonial02/Testimonial02.d.ts +3 -0
- package/dist/testimonials/Testimonial02/Testimonial02.types.d.cts +25 -0
- package/dist/testimonials/Testimonial02/Testimonial02.types.d.ts +25 -0
- package/dist/testimonials/Testimonial03/Testimonial03.d.cts +3 -0
- package/dist/testimonials/Testimonial03/Testimonial03.d.ts +3 -0
- package/dist/testimonials/Testimonial03/Testimonial03.types.d.cts +45 -0
- package/dist/testimonials/Testimonial03/Testimonial03.types.d.ts +45 -0
- package/package.json +3 -3
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
import type { TableSort } from "@openwarelabs/ui";
|
|
3
|
+
import type { BlockButton, BlockTableColumn } from "../../shared/shared.types.js";
|
|
4
|
+
/** A choice in the budget's editor, such as pausing work when spend reaches it. */
|
|
5
|
+
export interface Dashboard03BudgetOption {
|
|
6
|
+
/** The checkbox's words. */
|
|
7
|
+
label: ReactNode;
|
|
8
|
+
/** A muted line under them. */
|
|
9
|
+
description?: ReactNode;
|
|
10
|
+
/** Whether it starts ticked. @default false */
|
|
11
|
+
defaultChecked?: boolean;
|
|
12
|
+
}
|
|
13
|
+
/** The table of spend, in its own card under the budget. */
|
|
14
|
+
export interface Dashboard03Table<Row> {
|
|
15
|
+
/** The card's heading: "By project". */
|
|
16
|
+
title: ReactNode;
|
|
17
|
+
/** A caption on the right of the heading: "So far this month". */
|
|
18
|
+
description?: ReactNode;
|
|
19
|
+
/** Describes the table for screen readers. */
|
|
20
|
+
caption: string;
|
|
21
|
+
/** Its columns. */
|
|
22
|
+
columns: Array<BlockTableColumn<Row>>;
|
|
23
|
+
/** Its rows. */
|
|
24
|
+
rows: Row[];
|
|
25
|
+
/** The order to start with. */
|
|
26
|
+
defaultSort?: TableSort;
|
|
27
|
+
}
|
|
28
|
+
/** One line of the next invoice. */
|
|
29
|
+
export interface Dashboard03InvoiceLine {
|
|
30
|
+
/** What it's for: "Business plan". */
|
|
31
|
+
label: ReactNode;
|
|
32
|
+
/** A caption under it: "14 people × €24". */
|
|
33
|
+
hint?: ReactNode;
|
|
34
|
+
/** The amount, formatted. */
|
|
35
|
+
amount: ReactNode;
|
|
36
|
+
}
|
|
37
|
+
/** The next invoice, in a card on the right. */
|
|
38
|
+
export interface Dashboard03Invoice {
|
|
39
|
+
/** The card's heading: "Next invoice". */
|
|
40
|
+
title: ReactNode;
|
|
41
|
+
/** A caption under it: when it's due. */
|
|
42
|
+
due?: ReactNode;
|
|
43
|
+
/** Its lines. */
|
|
44
|
+
lines: Dashboard03InvoiceLine[];
|
|
45
|
+
/** The total, under a hairline. */
|
|
46
|
+
total?: {
|
|
47
|
+
label: ReactNode;
|
|
48
|
+
amount: ReactNode;
|
|
49
|
+
};
|
|
50
|
+
/** A caption under the total: "Before VAT". */
|
|
51
|
+
note?: ReactNode;
|
|
52
|
+
/** The card it's paid with, and a button to change it. */
|
|
53
|
+
payment?: {
|
|
54
|
+
label: ReactNode;
|
|
55
|
+
detail?: ReactNode;
|
|
56
|
+
onChange?(): void;
|
|
57
|
+
};
|
|
58
|
+
/** A button at the foot of the card: "Download past invoices". */
|
|
59
|
+
action?: BlockButton;
|
|
60
|
+
}
|
|
61
|
+
/** What the forecast's sentence is made from. */
|
|
62
|
+
export interface Dashboard03Forecast {
|
|
63
|
+
/** The month's forecast spend, formatted in whole units. */
|
|
64
|
+
forecast: string;
|
|
65
|
+
/** How far over or under the budget it is, formatted in whole units. */
|
|
66
|
+
difference: string;
|
|
67
|
+
/** Whether the forecast goes over the budget. */
|
|
68
|
+
over: boolean;
|
|
69
|
+
/** Whether the budget option is ticked. */
|
|
70
|
+
optionChecked: boolean;
|
|
71
|
+
}
|
|
72
|
+
export interface Dashboard03Labels {
|
|
73
|
+
/** The button that opens the budget's editor. @default "Edit budget" */
|
|
74
|
+
editBudget?: string;
|
|
75
|
+
/** The editor's title. @default "Monthly budget" */
|
|
76
|
+
budgetTitle?: string;
|
|
77
|
+
/** The budget field's label. @default "Budget" */
|
|
78
|
+
budgetField?: string;
|
|
79
|
+
/** The field's error when the budget is missing or under 1. @default "Enter a budget of at least €1." */
|
|
80
|
+
budgetError?: string;
|
|
81
|
+
/** @default "Cancel" */
|
|
82
|
+
cancel?: string;
|
|
83
|
+
/** @default "Save budget" */
|
|
84
|
+
saveBudget?: string;
|
|
85
|
+
/** After the amount spent. @default "of a €3,000 budget" */
|
|
86
|
+
ofBudget?(budget: string): ReactNode;
|
|
87
|
+
/** Under the meter, on the left. @default "98% used" */
|
|
88
|
+
used?(percent: number): ReactNode;
|
|
89
|
+
/** Under the meter, on the right. @default "18 days left" */
|
|
90
|
+
daysLeft?(days: number): ReactNode;
|
|
91
|
+
/** Names the meter for screen readers. @default "98% of the budget spent" */
|
|
92
|
+
meter?(percent: number): string;
|
|
93
|
+
/** The sentence under the meter: where spend is heading. @default "At this pace you'll spend about €3,124 by the end of the month, €124 over budget." */
|
|
94
|
+
forecast?(forecast: Dashboard03Forecast): ReactNode;
|
|
95
|
+
/** The button that changes the payment card. @default "Change" */
|
|
96
|
+
changePayment?: string;
|
|
97
|
+
}
|
|
98
|
+
export interface Dashboard03Props<Row extends object> extends Omit<HTMLAttributes<HTMLElement>, "title" | "children"> {
|
|
99
|
+
/** The page's name, as its h1. */
|
|
100
|
+
title: ReactNode;
|
|
101
|
+
/** A line under it: the month and the plan. */
|
|
102
|
+
description?: ReactNode;
|
|
103
|
+
/** The budget card's heading. @default "Spend this month" */
|
|
104
|
+
spendTitle?: ReactNode;
|
|
105
|
+
/** What's been spent so far this month. */
|
|
106
|
+
spent: number;
|
|
107
|
+
/** The month's forecast spend, at the pace so far. */
|
|
108
|
+
forecast: number;
|
|
109
|
+
/** Days left in the month. */
|
|
110
|
+
daysLeft: number;
|
|
111
|
+
/** The monthly budget, when you keep it yourself. */
|
|
112
|
+
budget?: number;
|
|
113
|
+
/** The budget to start with. @default 1000 */
|
|
114
|
+
defaultBudget?: number;
|
|
115
|
+
/** Called when the person saves a new budget, with whether the option is ticked. */
|
|
116
|
+
onBudgetChange?(budget: number, optionChecked: boolean): void;
|
|
117
|
+
/** A checkbox in the budget's editor. */
|
|
118
|
+
budgetOption?: Dashboard03BudgetOption;
|
|
119
|
+
/** A caption in the editor, under the checkbox. */
|
|
120
|
+
budgetNote?: ReactNode;
|
|
121
|
+
/** The currency amounts are in. @default "EUR" */
|
|
122
|
+
currency?: string;
|
|
123
|
+
/** The locale amounts are formatted for. @default "en-IE" */
|
|
124
|
+
locale?: string;
|
|
125
|
+
/** The spend broken down, in a table under the budget. */
|
|
126
|
+
table?: Dashboard03Table<Row>;
|
|
127
|
+
/** The next invoice, on the right. */
|
|
128
|
+
invoice?: Dashboard03Invoice;
|
|
129
|
+
/** Words that aren't content (button labels, the meter's captions, the forecast), in English unless you pass your own. */
|
|
130
|
+
labels?: Dashboard03Labels;
|
|
131
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { Empty01Props } from "./Empty01.types.cjs";
|
|
2
|
+
/** A first-run page: what will be here, the button that makes the first one, and other ways to start. */
|
|
3
|
+
export declare function Empty01({ title, description, icon, emptyTitle, emptyDescription, ways, defaultItems, onCreate, onRemove, namePattern, labels, className, ...props }: Empty01Props): import("react").JSX.Element;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { Empty01Props } from "./Empty01.types.js";
|
|
2
|
+
/** A first-run page: what will be here, the button that makes the first one, and other ways to start. */
|
|
3
|
+
export declare function Empty01({ title, description, icon, emptyTitle, emptyDescription, ways, defaultItems, onCreate, onRemove, namePattern, labels, className, ...props }: Empty01Props): import("react").JSX.Element;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
/** Another way to make the first one, shown as a ChoiceCard under the main button. */
|
|
3
|
+
export interface Empty01Way {
|
|
4
|
+
/** Tells the ways apart; it comes back on the item made this way. */
|
|
5
|
+
id: string;
|
|
6
|
+
/** The card's title, and the dialog's when this way is picked: "Connect a repository". */
|
|
7
|
+
title: string;
|
|
8
|
+
/** A line under it: "Its code, branches and history." */
|
|
9
|
+
description: string;
|
|
10
|
+
/** A 20px icon on the card, usually from lucide-react. */
|
|
11
|
+
icon?: ReactNode;
|
|
12
|
+
/** Marks the card as the recommended way. */
|
|
13
|
+
recommended?: boolean;
|
|
14
|
+
/** What an item made this way says under its name: "Connected repository". */
|
|
15
|
+
source?: ReactNode;
|
|
16
|
+
/** The dialog's title when this way is picked. Defaults to the card's title. */
|
|
17
|
+
dialogTitle?: ReactNode;
|
|
18
|
+
/** A sentence under the dialog's title: "Name the project; you'll pick the repository next." */
|
|
19
|
+
dialogDescription?: ReactNode;
|
|
20
|
+
}
|
|
21
|
+
/** Something made from the empty page, listed once there's one. */
|
|
22
|
+
export interface Empty01Item {
|
|
23
|
+
/** The name it was given. */
|
|
24
|
+
name: string;
|
|
25
|
+
/** How it was made, shown under its name. */
|
|
26
|
+
source?: ReactNode;
|
|
27
|
+
/** The id of the way it was made, or undefined for the main button. */
|
|
28
|
+
way?: string;
|
|
29
|
+
}
|
|
30
|
+
/** The words that aren't content, in English unless you pass your own. */
|
|
31
|
+
export interface Empty01Labels {
|
|
32
|
+
/** The button in the header once there's something. @default "New project" */
|
|
33
|
+
newItem?: string;
|
|
34
|
+
/** The main button, and the dialog's button for it. @default "Create project" */
|
|
35
|
+
create?: string;
|
|
36
|
+
/** The dialog's button for the other ways. @default "Continue" */
|
|
37
|
+
continue?: string;
|
|
38
|
+
/** @default "Cancel" */
|
|
39
|
+
cancel?: string;
|
|
40
|
+
/** The line above the other ways. @default "or start another way" */
|
|
41
|
+
otherWays?: string;
|
|
42
|
+
/** The dialog's title for the main button. @default "Create a project" */
|
|
43
|
+
dialogTitle?: ReactNode;
|
|
44
|
+
/** @default "An empty project. Connect a repository to it whenever you're ready." */
|
|
45
|
+
dialogDescription?: ReactNode;
|
|
46
|
+
/** The name field's label. @default "Project name" */
|
|
47
|
+
name?: string;
|
|
48
|
+
/** @default "Lowercase letters, numbers and dashes." */
|
|
49
|
+
nameHint?: string;
|
|
50
|
+
/** @default "billing-api" */
|
|
51
|
+
placeholder?: string;
|
|
52
|
+
/** @default "Give the project a name." */
|
|
53
|
+
nameRequired?: string;
|
|
54
|
+
/** Shown when the name doesn't match `namePattern`. @default "Use only lowercase letters, numbers and dashes." */
|
|
55
|
+
nameInvalid?: string;
|
|
56
|
+
/** @default (name) => `There's already a project called ${name}.` */
|
|
57
|
+
nameTaken?(name: string): string;
|
|
58
|
+
/** The list's name for screen readers. @default "Projects" */
|
|
59
|
+
list?: string;
|
|
60
|
+
/** What an item made with the main button says under its name. @default "Blank project" */
|
|
61
|
+
blankSource?: string;
|
|
62
|
+
/** @default "Created just now" */
|
|
63
|
+
createdJustNow?: string;
|
|
64
|
+
/** The badge on a new item. @default "New" */
|
|
65
|
+
newBadge?: string;
|
|
66
|
+
/** The toast once it's made. @default (name) => `Created ${name}` */
|
|
67
|
+
created?(name: string): string;
|
|
68
|
+
/** The toast's button that takes it away again. @default "Undo" */
|
|
69
|
+
undo?: string;
|
|
70
|
+
}
|
|
71
|
+
export interface Empty01Props extends Omit<HTMLAttributes<HTMLDivElement>, "title" | "children"> {
|
|
72
|
+
/** The page's heading: "Projects". */
|
|
73
|
+
title: ReactNode;
|
|
74
|
+
/** A sentence under it. */
|
|
75
|
+
description?: ReactNode;
|
|
76
|
+
/** The empty state's 20px icon. */
|
|
77
|
+
icon?: ReactNode;
|
|
78
|
+
/** What's missing, as a plain statement: "No projects yet". */
|
|
79
|
+
emptyTitle: ReactNode;
|
|
80
|
+
/** What will be here, and why to make the first one. */
|
|
81
|
+
emptyDescription?: ReactNode;
|
|
82
|
+
/** Other ways to start, as cards under the main button. */
|
|
83
|
+
ways?: Empty01Way[];
|
|
84
|
+
/** What's there to begin with: leave it empty for the empty state. */
|
|
85
|
+
defaultItems?: Empty01Item[];
|
|
86
|
+
/** Runs when something is made: create it in your app. */
|
|
87
|
+
onCreate?(item: Empty01Item): void;
|
|
88
|
+
/** Runs when the toast's Undo takes it away again. */
|
|
89
|
+
onRemove?(item: Empty01Item): void;
|
|
90
|
+
/** What a name must look like.
|
|
91
|
+
* @default /^[a-z0-9]+(-[a-z0-9]+)*$/ */
|
|
92
|
+
namePattern?: RegExp;
|
|
93
|
+
labels?: Empty01Labels;
|
|
94
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
/** Another way to make the first one, shown as a ChoiceCard under the main button. */
|
|
3
|
+
export interface Empty01Way {
|
|
4
|
+
/** Tells the ways apart; it comes back on the item made this way. */
|
|
5
|
+
id: string;
|
|
6
|
+
/** The card's title, and the dialog's when this way is picked: "Connect a repository". */
|
|
7
|
+
title: string;
|
|
8
|
+
/** A line under it: "Its code, branches and history." */
|
|
9
|
+
description: string;
|
|
10
|
+
/** A 20px icon on the card, usually from lucide-react. */
|
|
11
|
+
icon?: ReactNode;
|
|
12
|
+
/** Marks the card as the recommended way. */
|
|
13
|
+
recommended?: boolean;
|
|
14
|
+
/** What an item made this way says under its name: "Connected repository". */
|
|
15
|
+
source?: ReactNode;
|
|
16
|
+
/** The dialog's title when this way is picked. Defaults to the card's title. */
|
|
17
|
+
dialogTitle?: ReactNode;
|
|
18
|
+
/** A sentence under the dialog's title: "Name the project; you'll pick the repository next." */
|
|
19
|
+
dialogDescription?: ReactNode;
|
|
20
|
+
}
|
|
21
|
+
/** Something made from the empty page, listed once there's one. */
|
|
22
|
+
export interface Empty01Item {
|
|
23
|
+
/** The name it was given. */
|
|
24
|
+
name: string;
|
|
25
|
+
/** How it was made, shown under its name. */
|
|
26
|
+
source?: ReactNode;
|
|
27
|
+
/** The id of the way it was made, or undefined for the main button. */
|
|
28
|
+
way?: string;
|
|
29
|
+
}
|
|
30
|
+
/** The words that aren't content, in English unless you pass your own. */
|
|
31
|
+
export interface Empty01Labels {
|
|
32
|
+
/** The button in the header once there's something. @default "New project" */
|
|
33
|
+
newItem?: string;
|
|
34
|
+
/** The main button, and the dialog's button for it. @default "Create project" */
|
|
35
|
+
create?: string;
|
|
36
|
+
/** The dialog's button for the other ways. @default "Continue" */
|
|
37
|
+
continue?: string;
|
|
38
|
+
/** @default "Cancel" */
|
|
39
|
+
cancel?: string;
|
|
40
|
+
/** The line above the other ways. @default "or start another way" */
|
|
41
|
+
otherWays?: string;
|
|
42
|
+
/** The dialog's title for the main button. @default "Create a project" */
|
|
43
|
+
dialogTitle?: ReactNode;
|
|
44
|
+
/** @default "An empty project. Connect a repository to it whenever you're ready." */
|
|
45
|
+
dialogDescription?: ReactNode;
|
|
46
|
+
/** The name field's label. @default "Project name" */
|
|
47
|
+
name?: string;
|
|
48
|
+
/** @default "Lowercase letters, numbers and dashes." */
|
|
49
|
+
nameHint?: string;
|
|
50
|
+
/** @default "billing-api" */
|
|
51
|
+
placeholder?: string;
|
|
52
|
+
/** @default "Give the project a name." */
|
|
53
|
+
nameRequired?: string;
|
|
54
|
+
/** Shown when the name doesn't match `namePattern`. @default "Use only lowercase letters, numbers and dashes." */
|
|
55
|
+
nameInvalid?: string;
|
|
56
|
+
/** @default (name) => `There's already a project called ${name}.` */
|
|
57
|
+
nameTaken?(name: string): string;
|
|
58
|
+
/** The list's name for screen readers. @default "Projects" */
|
|
59
|
+
list?: string;
|
|
60
|
+
/** What an item made with the main button says under its name. @default "Blank project" */
|
|
61
|
+
blankSource?: string;
|
|
62
|
+
/** @default "Created just now" */
|
|
63
|
+
createdJustNow?: string;
|
|
64
|
+
/** The badge on a new item. @default "New" */
|
|
65
|
+
newBadge?: string;
|
|
66
|
+
/** The toast once it's made. @default (name) => `Created ${name}` */
|
|
67
|
+
created?(name: string): string;
|
|
68
|
+
/** The toast's button that takes it away again. @default "Undo" */
|
|
69
|
+
undo?: string;
|
|
70
|
+
}
|
|
71
|
+
export interface Empty01Props extends Omit<HTMLAttributes<HTMLDivElement>, "title" | "children"> {
|
|
72
|
+
/** The page's heading: "Projects". */
|
|
73
|
+
title: ReactNode;
|
|
74
|
+
/** A sentence under it. */
|
|
75
|
+
description?: ReactNode;
|
|
76
|
+
/** The empty state's 20px icon. */
|
|
77
|
+
icon?: ReactNode;
|
|
78
|
+
/** What's missing, as a plain statement: "No projects yet". */
|
|
79
|
+
emptyTitle: ReactNode;
|
|
80
|
+
/** What will be here, and why to make the first one. */
|
|
81
|
+
emptyDescription?: ReactNode;
|
|
82
|
+
/** Other ways to start, as cards under the main button. */
|
|
83
|
+
ways?: Empty01Way[];
|
|
84
|
+
/** What's there to begin with: leave it empty for the empty state. */
|
|
85
|
+
defaultItems?: Empty01Item[];
|
|
86
|
+
/** Runs when something is made: create it in your app. */
|
|
87
|
+
onCreate?(item: Empty01Item): void;
|
|
88
|
+
/** Runs when the toast's Undo takes it away again. */
|
|
89
|
+
onRemove?(item: Empty01Item): void;
|
|
90
|
+
/** What a name must look like.
|
|
91
|
+
* @default /^[a-z0-9]+(-[a-z0-9]+)*$/ */
|
|
92
|
+
namePattern?: RegExp;
|
|
93
|
+
labels?: Empty01Labels;
|
|
94
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { Empty02Props } from "./Empty02.types.cjs";
|
|
2
|
+
/** A searchable, filterable table that says what was looked for when nothing matches, with the ways back. */
|
|
3
|
+
export declare function Empty02<Row extends object>({ title, description, columns, rows, rowKey, searchText, filters, defaultQuery, defaultFilters, onQueryChange, onFiltersChange, emptyTitle, emptyDescription, labels, className, ...props }: Empty02Props<Row>): import("react").JSX.Element;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { Empty02Props } from "./Empty02.types.js";
|
|
2
|
+
/** A searchable, filterable table that says what was looked for when nothing matches, with the ways back. */
|
|
3
|
+
export declare function Empty02<Row extends object>({ title, description, columns, rows, rowKey, searchText, filters, defaultQuery, defaultFilters, onQueryChange, onFiltersChange, emptyTitle, emptyDescription, labels, className, ...props }: Empty02Props<Row>): import("react").JSX.Element;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
import type { TableColumn, TableProps } from "@openwarelabs/ui";
|
|
3
|
+
/** A filter the toolbar can add: a menu section of values, and a Tag once one is picked. */
|
|
4
|
+
export interface Empty02Filter<Row extends object> {
|
|
5
|
+
/** Tells the filters apart, in `defaultFilters` and `onFiltersChange`. */
|
|
6
|
+
key: string;
|
|
7
|
+
/** Its name, as the menu's heading and on the Tag ("Status: Failed"). */
|
|
8
|
+
label: string;
|
|
9
|
+
/** The values to pick from. */
|
|
10
|
+
options: string[];
|
|
11
|
+
/** The row's value for this filter. */
|
|
12
|
+
value(row: Row): string;
|
|
13
|
+
}
|
|
14
|
+
/** What's being looked for, given to the empty state's words. */
|
|
15
|
+
export interface Empty02Search {
|
|
16
|
+
/** The search, trimmed. Empty when there's none. */
|
|
17
|
+
query: string;
|
|
18
|
+
/** The value picked for each filter that's on, by its key. */
|
|
19
|
+
filters: Record<string, string>;
|
|
20
|
+
}
|
|
21
|
+
/** The words that aren't content, in English unless you pass your own. */
|
|
22
|
+
export interface Empty02Labels {
|
|
23
|
+
/** The search field's name and placeholder. @default "Search" */
|
|
24
|
+
search?: string;
|
|
25
|
+
/** The filters' name for screen readers. @default "Filters" */
|
|
26
|
+
filters?: string;
|
|
27
|
+
/** The filter menu's name. @default "Add a filter" */
|
|
28
|
+
filterMenu?: string;
|
|
29
|
+
/** The filter button with no filter on. @default "Add filter" */
|
|
30
|
+
addFilter?: string;
|
|
31
|
+
/** The filter button once one is on. @default "Filter" */
|
|
32
|
+
filter?: string;
|
|
33
|
+
/** A Tag's remove button. @default (label, value) => `${label.toLowerCase()} filter: ${value}` */
|
|
34
|
+
removeFilter?(label: string, value: string): string;
|
|
35
|
+
/** The count beside the filters. @default (shown, total) => `${shown} of ${total}` */
|
|
36
|
+
count?(shown: number, total: number): ReactNode;
|
|
37
|
+
/** @default "Clear search" */
|
|
38
|
+
clearSearch?: string;
|
|
39
|
+
/** @default "Clear filters" */
|
|
40
|
+
clearFilters?: string;
|
|
41
|
+
}
|
|
42
|
+
export interface Empty02Props<Row extends object> extends Omit<HTMLAttributes<HTMLDivElement>, "title" | "children"> {
|
|
43
|
+
/** The page's heading, and the table's caption for screen readers: "Deploys". */
|
|
44
|
+
title: ReactNode;
|
|
45
|
+
/** A sentence under it. */
|
|
46
|
+
description?: ReactNode;
|
|
47
|
+
/** The table's columns. */
|
|
48
|
+
columns: Array<TableColumn<Row>>;
|
|
49
|
+
/** Every row; the search and the filters narrow them. */
|
|
50
|
+
rows: Row[];
|
|
51
|
+
/** A field name or function giving each row a unique key.
|
|
52
|
+
* @default "id" */
|
|
53
|
+
rowKey?: TableProps<Row>["rowKey"];
|
|
54
|
+
/** The text a row is found by. Every word of the search has to be in it. */
|
|
55
|
+
searchText(row: Row): string;
|
|
56
|
+
/** The filters the toolbar can add. */
|
|
57
|
+
filters?: Array<Empty02Filter<Row>>;
|
|
58
|
+
/** The search to start with. */
|
|
59
|
+
defaultQuery?: string;
|
|
60
|
+
/** The filters on to start with: a value for each filter's key. */
|
|
61
|
+
defaultFilters?: Record<string, string>;
|
|
62
|
+
/** Runs as the search changes. */
|
|
63
|
+
onQueryChange?(query: string): void;
|
|
64
|
+
/** Runs as filters are added and removed. */
|
|
65
|
+
onFiltersChange?(filters: Record<string, string>): void;
|
|
66
|
+
/** The empty state's title when nothing matches.
|
|
67
|
+
* @default `No results match “${query}”`, or "No results match these filters" */
|
|
68
|
+
emptyTitle?(search: Empty02Search): ReactNode;
|
|
69
|
+
/** The empty state's sentence when nothing matches: where you looked, and what to try. */
|
|
70
|
+
emptyDescription?(search: Empty02Search): ReactNode;
|
|
71
|
+
labels?: Empty02Labels;
|
|
72
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
import type { TableColumn, TableProps } from "@openwarelabs/ui";
|
|
3
|
+
/** A filter the toolbar can add: a menu section of values, and a Tag once one is picked. */
|
|
4
|
+
export interface Empty02Filter<Row extends object> {
|
|
5
|
+
/** Tells the filters apart, in `defaultFilters` and `onFiltersChange`. */
|
|
6
|
+
key: string;
|
|
7
|
+
/** Its name, as the menu's heading and on the Tag ("Status: Failed"). */
|
|
8
|
+
label: string;
|
|
9
|
+
/** The values to pick from. */
|
|
10
|
+
options: string[];
|
|
11
|
+
/** The row's value for this filter. */
|
|
12
|
+
value(row: Row): string;
|
|
13
|
+
}
|
|
14
|
+
/** What's being looked for, given to the empty state's words. */
|
|
15
|
+
export interface Empty02Search {
|
|
16
|
+
/** The search, trimmed. Empty when there's none. */
|
|
17
|
+
query: string;
|
|
18
|
+
/** The value picked for each filter that's on, by its key. */
|
|
19
|
+
filters: Record<string, string>;
|
|
20
|
+
}
|
|
21
|
+
/** The words that aren't content, in English unless you pass your own. */
|
|
22
|
+
export interface Empty02Labels {
|
|
23
|
+
/** The search field's name and placeholder. @default "Search" */
|
|
24
|
+
search?: string;
|
|
25
|
+
/** The filters' name for screen readers. @default "Filters" */
|
|
26
|
+
filters?: string;
|
|
27
|
+
/** The filter menu's name. @default "Add a filter" */
|
|
28
|
+
filterMenu?: string;
|
|
29
|
+
/** The filter button with no filter on. @default "Add filter" */
|
|
30
|
+
addFilter?: string;
|
|
31
|
+
/** The filter button once one is on. @default "Filter" */
|
|
32
|
+
filter?: string;
|
|
33
|
+
/** A Tag's remove button. @default (label, value) => `${label.toLowerCase()} filter: ${value}` */
|
|
34
|
+
removeFilter?(label: string, value: string): string;
|
|
35
|
+
/** The count beside the filters. @default (shown, total) => `${shown} of ${total}` */
|
|
36
|
+
count?(shown: number, total: number): ReactNode;
|
|
37
|
+
/** @default "Clear search" */
|
|
38
|
+
clearSearch?: string;
|
|
39
|
+
/** @default "Clear filters" */
|
|
40
|
+
clearFilters?: string;
|
|
41
|
+
}
|
|
42
|
+
export interface Empty02Props<Row extends object> extends Omit<HTMLAttributes<HTMLDivElement>, "title" | "children"> {
|
|
43
|
+
/** The page's heading, and the table's caption for screen readers: "Deploys". */
|
|
44
|
+
title: ReactNode;
|
|
45
|
+
/** A sentence under it. */
|
|
46
|
+
description?: ReactNode;
|
|
47
|
+
/** The table's columns. */
|
|
48
|
+
columns: Array<TableColumn<Row>>;
|
|
49
|
+
/** Every row; the search and the filters narrow them. */
|
|
50
|
+
rows: Row[];
|
|
51
|
+
/** A field name or function giving each row a unique key.
|
|
52
|
+
* @default "id" */
|
|
53
|
+
rowKey?: TableProps<Row>["rowKey"];
|
|
54
|
+
/** The text a row is found by. Every word of the search has to be in it. */
|
|
55
|
+
searchText(row: Row): string;
|
|
56
|
+
/** The filters the toolbar can add. */
|
|
57
|
+
filters?: Array<Empty02Filter<Row>>;
|
|
58
|
+
/** The search to start with. */
|
|
59
|
+
defaultQuery?: string;
|
|
60
|
+
/** The filters on to start with: a value for each filter's key. */
|
|
61
|
+
defaultFilters?: Record<string, string>;
|
|
62
|
+
/** Runs as the search changes. */
|
|
63
|
+
onQueryChange?(query: string): void;
|
|
64
|
+
/** Runs as filters are added and removed. */
|
|
65
|
+
onFiltersChange?(filters: Record<string, string>): void;
|
|
66
|
+
/** The empty state's title when nothing matches.
|
|
67
|
+
* @default `No results match “${query}”`, or "No results match these filters" */
|
|
68
|
+
emptyTitle?(search: Empty02Search): ReactNode;
|
|
69
|
+
/** The empty state's sentence when nothing matches: where you looked, and what to try. */
|
|
70
|
+
emptyDescription?(search: Empty02Search): ReactNode;
|
|
71
|
+
labels?: Empty02Labels;
|
|
72
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { Empty03Props } from "./Empty03.types.cjs";
|
|
2
|
+
/** A card whose list couldn't load: what went wrong, a button to try again, and the list once it comes back. */
|
|
3
|
+
export declare function Empty03({ title, description, cardTitle, views, items, status, defaultStatus, onRetry, errorIcon, errorTitle, errorDescription, errorDetail, secondaryAction, labels, className, ...props }: Empty03Props): import("react").JSX.Element;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { Empty03Props } from "./Empty03.types.js";
|
|
2
|
+
/** A card whose list couldn't load: what went wrong, a button to try again, and the list once it comes back. */
|
|
3
|
+
export declare function Empty03({ title, description, cardTitle, views, items, status, defaultStatus, onRetry, errorIcon, errorTitle, errorDescription, errorDetail, secondaryAction, labels, className, ...props }: Empty03Props): import("react").JSX.Element;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
import type { BadgeVariant } from "@openwarelabs/ui";
|
|
3
|
+
import type { BlockAction } from "../../shared/shared.types.cjs";
|
|
4
|
+
/** Whether the list loaded: the error, the spinner while trying again, or the list. */
|
|
5
|
+
export type Empty03Status = "failed" | "loading" | "loaded";
|
|
6
|
+
/** One row of the list, once it loads. */
|
|
7
|
+
export interface Empty03Item {
|
|
8
|
+
/** Tells the rows apart. Defaults to the row's place in the list. */
|
|
9
|
+
id?: string;
|
|
10
|
+
/** A 15px icon in a circle at the start of the row. */
|
|
11
|
+
icon?: ReactNode;
|
|
12
|
+
/** The row's main line. */
|
|
13
|
+
title: ReactNode;
|
|
14
|
+
/** A caption under it: "billing-api · for Tomás Reyes". */
|
|
15
|
+
meta?: ReactNode;
|
|
16
|
+
/** A short figure on the right, such as how long it took. Hidden on phones. */
|
|
17
|
+
time?: ReactNode;
|
|
18
|
+
/** A badge at the end of the row. */
|
|
19
|
+
status?: {
|
|
20
|
+
label: ReactNode;
|
|
21
|
+
tone?: BadgeVariant;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
/** A view of the list in the card's segmented control. */
|
|
25
|
+
export interface Empty03View {
|
|
26
|
+
value: string;
|
|
27
|
+
label: string;
|
|
28
|
+
/** Which rows it shows. Leave it out for all of them. */
|
|
29
|
+
match?(item: Empty03Item): boolean;
|
|
30
|
+
}
|
|
31
|
+
/** The words that aren't content, in English unless you pass your own. */
|
|
32
|
+
export interface Empty03Labels {
|
|
33
|
+
/** @default "Try again" */
|
|
34
|
+
retry?: string;
|
|
35
|
+
/** Beside the spinner. @default "Loading…" */
|
|
36
|
+
loading?: string;
|
|
37
|
+
/** The views' name for screen readers. @default "Show" */
|
|
38
|
+
views?: string;
|
|
39
|
+
/** The list's name for screen readers. Defaults to the card's title. */
|
|
40
|
+
list?: string;
|
|
41
|
+
}
|
|
42
|
+
export interface Empty03Props extends Omit<HTMLAttributes<HTMLDivElement>, "title" | "children"> {
|
|
43
|
+
/** The page's heading: "Agent runs". */
|
|
44
|
+
title: ReactNode;
|
|
45
|
+
/** A sentence under it. */
|
|
46
|
+
description?: ReactNode;
|
|
47
|
+
/** The card's heading: "Today". */
|
|
48
|
+
cardTitle: ReactNode;
|
|
49
|
+
/** Views of the list, as a segmented control in the card's corner. Off until the list loads. */
|
|
50
|
+
views?: Empty03View[];
|
|
51
|
+
/** The rows, once the list loads. */
|
|
52
|
+
items: Empty03Item[];
|
|
53
|
+
/** Whether the list loaded, for controlled use. */
|
|
54
|
+
status?: Empty03Status;
|
|
55
|
+
/** Where it starts, when it isn't controlled.
|
|
56
|
+
* @default "failed" */
|
|
57
|
+
defaultStatus?: Empty03Status;
|
|
58
|
+
/** Runs on Try again: fetch the list again. While its promise is pending the card shows a spinner; once it resolves
|
|
59
|
+
* the list shows, and if it throws the error comes back. */
|
|
60
|
+
onRetry?(): void | Promise<void>;
|
|
61
|
+
/** The error's 20px icon. @default a cloud with a line through it */
|
|
62
|
+
errorIcon?: ReactNode;
|
|
63
|
+
/** What didn't load: "Couldn't load agent runs". */
|
|
64
|
+
errorTitle: ReactNode;
|
|
65
|
+
/** What went wrong, and what still works. */
|
|
66
|
+
errorDescription?: ReactNode;
|
|
67
|
+
/** A status and request ID for support, in code under the description: "504 · req_8f2c41d9". */
|
|
68
|
+
errorDetail?: ReactNode;
|
|
69
|
+
/** A second button beside Try again, such as "Check status". */
|
|
70
|
+
secondaryAction?: BlockAction;
|
|
71
|
+
labels?: Empty03Labels;
|
|
72
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
import type { BadgeVariant } from "@openwarelabs/ui";
|
|
3
|
+
import type { BlockAction } from "../../shared/shared.types.js";
|
|
4
|
+
/** Whether the list loaded: the error, the spinner while trying again, or the list. */
|
|
5
|
+
export type Empty03Status = "failed" | "loading" | "loaded";
|
|
6
|
+
/** One row of the list, once it loads. */
|
|
7
|
+
export interface Empty03Item {
|
|
8
|
+
/** Tells the rows apart. Defaults to the row's place in the list. */
|
|
9
|
+
id?: string;
|
|
10
|
+
/** A 15px icon in a circle at the start of the row. */
|
|
11
|
+
icon?: ReactNode;
|
|
12
|
+
/** The row's main line. */
|
|
13
|
+
title: ReactNode;
|
|
14
|
+
/** A caption under it: "billing-api · for Tomás Reyes". */
|
|
15
|
+
meta?: ReactNode;
|
|
16
|
+
/** A short figure on the right, such as how long it took. Hidden on phones. */
|
|
17
|
+
time?: ReactNode;
|
|
18
|
+
/** A badge at the end of the row. */
|
|
19
|
+
status?: {
|
|
20
|
+
label: ReactNode;
|
|
21
|
+
tone?: BadgeVariant;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
/** A view of the list in the card's segmented control. */
|
|
25
|
+
export interface Empty03View {
|
|
26
|
+
value: string;
|
|
27
|
+
label: string;
|
|
28
|
+
/** Which rows it shows. Leave it out for all of them. */
|
|
29
|
+
match?(item: Empty03Item): boolean;
|
|
30
|
+
}
|
|
31
|
+
/** The words that aren't content, in English unless you pass your own. */
|
|
32
|
+
export interface Empty03Labels {
|
|
33
|
+
/** @default "Try again" */
|
|
34
|
+
retry?: string;
|
|
35
|
+
/** Beside the spinner. @default "Loading…" */
|
|
36
|
+
loading?: string;
|
|
37
|
+
/** The views' name for screen readers. @default "Show" */
|
|
38
|
+
views?: string;
|
|
39
|
+
/** The list's name for screen readers. Defaults to the card's title. */
|
|
40
|
+
list?: string;
|
|
41
|
+
}
|
|
42
|
+
export interface Empty03Props extends Omit<HTMLAttributes<HTMLDivElement>, "title" | "children"> {
|
|
43
|
+
/** The page's heading: "Agent runs". */
|
|
44
|
+
title: ReactNode;
|
|
45
|
+
/** A sentence under it. */
|
|
46
|
+
description?: ReactNode;
|
|
47
|
+
/** The card's heading: "Today". */
|
|
48
|
+
cardTitle: ReactNode;
|
|
49
|
+
/** Views of the list, as a segmented control in the card's corner. Off until the list loads. */
|
|
50
|
+
views?: Empty03View[];
|
|
51
|
+
/** The rows, once the list loads. */
|
|
52
|
+
items: Empty03Item[];
|
|
53
|
+
/** Whether the list loaded, for controlled use. */
|
|
54
|
+
status?: Empty03Status;
|
|
55
|
+
/** Where it starts, when it isn't controlled.
|
|
56
|
+
* @default "failed" */
|
|
57
|
+
defaultStatus?: Empty03Status;
|
|
58
|
+
/** Runs on Try again: fetch the list again. While its promise is pending the card shows a spinner; once it resolves
|
|
59
|
+
* the list shows, and if it throws the error comes back. */
|
|
60
|
+
onRetry?(): void | Promise<void>;
|
|
61
|
+
/** The error's 20px icon. @default a cloud with a line through it */
|
|
62
|
+
errorIcon?: ReactNode;
|
|
63
|
+
/** What didn't load: "Couldn't load agent runs". */
|
|
64
|
+
errorTitle: ReactNode;
|
|
65
|
+
/** What went wrong, and what still works. */
|
|
66
|
+
errorDescription?: ReactNode;
|
|
67
|
+
/** A status and request ID for support, in code under the description: "504 · req_8f2c41d9". */
|
|
68
|
+
errorDetail?: ReactNode;
|
|
69
|
+
/** A second button beside Try again, such as "Check status". */
|
|
70
|
+
secondaryAction?: BlockAction;
|
|
71
|
+
labels?: Empty03Labels;
|
|
72
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { ErrorPage01Props } from "./ErrorPage01.types.cjs";
|
|
2
|
+
/** A 404 on the dot grid: the zero drawn as an empty orbit, a search field, and links to the main places. */
|
|
3
|
+
export declare function ErrorPage01({ brand, helpLink, title, description, places, maxPlaces, onSearch, labels, className, ...props }: ErrorPage01Props): import("react").JSX.Element;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { ErrorPage01Props } from "./ErrorPage01.types.js";
|
|
2
|
+
/** A 404 on the dot grid: the zero drawn as an empty orbit, a search field, and links to the main places. */
|
|
3
|
+
export declare function ErrorPage01({ brand, helpLink, title, description, places, maxPlaces, onSearch, labels, className, ...props }: ErrorPage01Props): import("react").JSX.Element;
|