@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,19 @@
|
|
|
1
|
+
import type { Command } from "@openwarelabs/ui";
|
|
2
|
+
import type { AppShellStateOptions, BlockMenuItem } from "./shared.types.js";
|
|
3
|
+
/**
|
|
4
|
+
* What every app shell keeps: the current place (its own, unless `current` is given), the phone drawer, and the
|
|
5
|
+
* search, which ⌘K or Ctrl+K opens from anywhere when there are commands. Choosing a place closes the drawer.
|
|
6
|
+
*/
|
|
7
|
+
export declare function useAppShell({ current, defaultCurrent, onNavigate, commands }: AppShellStateOptions): {
|
|
8
|
+
active: string | undefined;
|
|
9
|
+
navigate: (id: string) => void;
|
|
10
|
+
navOpen: boolean;
|
|
11
|
+
setNavOpen: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
12
|
+
searchOpen: boolean;
|
|
13
|
+
setSearchOpen: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
14
|
+
hasSearch: boolean;
|
|
15
|
+
paletteCommands: Command[];
|
|
16
|
+
afterMenuSelect: (item: BlockMenuItem & {
|
|
17
|
+
page?: string;
|
|
18
|
+
}) => void;
|
|
19
|
+
};
|
package/dist/shared/icons.d.cts
CHANGED
|
@@ -1,14 +1,60 @@
|
|
|
1
1
|
import type { BlockIconProps } from "./shared.types.cjs";
|
|
2
|
-
export declare const CheckIcon: ({ size, strokeWidth }: BlockIconProps) => import("react").JSX.Element;
|
|
3
|
-
export declare const MailIcon: ({ size, strokeWidth }: BlockIconProps) => import("react").JSX.Element;
|
|
4
|
-
export declare const DownloadIcon: ({ size, strokeWidth }: BlockIconProps) => import("react").JSX.Element;
|
|
5
|
-
export declare const MenuIcon: ({ size, strokeWidth }: BlockIconProps) => import("react").JSX.Element;
|
|
6
|
-
export declare const XIcon: ({ size, strokeWidth }: BlockIconProps) => import("react").JSX.Element;
|
|
7
|
-
export declare const ChevronDownIcon: ({ size, strokeWidth }: BlockIconProps) => import("react").JSX.Element;
|
|
8
|
-
export declare const ChevronRightIcon: ({ size, strokeWidth }: BlockIconProps) => import("react").JSX.Element;
|
|
9
|
-
export declare const ArrowRightIcon: ({ size, strokeWidth }: BlockIconProps) => import("react").JSX.Element;
|
|
10
|
-
export declare const MinusIcon: ({ size, strokeWidth }: BlockIconProps) => import("react").JSX.Element;
|
|
11
|
-
export declare const SunIcon: ({ size, strokeWidth }: BlockIconProps) => import("react").JSX.Element;
|
|
12
|
-
export declare const MoonIcon: ({ size, strokeWidth }: BlockIconProps) => import("react").JSX.Element;
|
|
13
|
-
export declare const MonitorIcon: ({ size, strokeWidth }: BlockIconProps) => import("react").JSX.Element;
|
|
14
|
-
export declare const CircleCheckIcon: ({ size, strokeWidth }: BlockIconProps) => import("react").JSX.Element;
|
|
2
|
+
export declare const CheckIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
3
|
+
export declare const MailIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
4
|
+
export declare const DownloadIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
5
|
+
export declare const MenuIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
6
|
+
export declare const XIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
7
|
+
export declare const ChevronDownIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
8
|
+
export declare const ChevronRightIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
9
|
+
export declare const ArrowRightIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
10
|
+
export declare const MinusIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
11
|
+
export declare const SunIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
12
|
+
export declare const MoonIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
13
|
+
export declare const MonitorIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
14
|
+
export declare const CircleCheckIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
15
|
+
export declare const PauseIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
16
|
+
export declare const PlayIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
17
|
+
export declare const QuoteIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
18
|
+
export declare const ArrowLeftIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
19
|
+
export declare const CalendarDaysIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
20
|
+
export declare const ClockIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
21
|
+
export declare const MapPinIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
22
|
+
export declare const LinkIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
23
|
+
export declare const MailCheckIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
24
|
+
export declare const ShieldCheckIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
25
|
+
export declare const KeyRoundIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
26
|
+
export declare const EyeIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
27
|
+
export declare const EyeOffIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
28
|
+
export declare const PlusIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
29
|
+
export declare const EllipsisIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
30
|
+
export declare const CopyIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
31
|
+
export declare const UserMinusIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
32
|
+
export declare const RotateCwIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
33
|
+
export declare const SendIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
34
|
+
export declare const Trash2Icon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
35
|
+
export declare const ArchiveIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
36
|
+
export declare const ArchiveRestoreIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
37
|
+
export declare const ArrowLeftRightIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
38
|
+
export declare const RotateCcwIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
39
|
+
export declare const SearchIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
40
|
+
export declare const ChevronsUpDownIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
41
|
+
export declare const ChevronLeftIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
42
|
+
export declare const PanelRightIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
43
|
+
export declare const PanelLeftOpenIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
44
|
+
export declare const PanelLeftCloseIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
45
|
+
export declare const SearchXIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
46
|
+
export declare const MessageSquareIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
47
|
+
export declare const PencilIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
48
|
+
export declare const TriangleAlertIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
49
|
+
export declare const CreditCardIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
50
|
+
export declare const ArrowUpIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
51
|
+
export declare const CircleStopIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
52
|
+
export declare const SquarePenIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
53
|
+
export declare const StarIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
54
|
+
export declare const ListFilterIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
55
|
+
export declare const CloudOffIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
56
|
+
export declare const ArrowUpRightIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
57
|
+
export declare const BellRingIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
58
|
+
export declare const BellIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
59
|
+
export declare const CheckCheckIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
60
|
+
export declare const SettingsIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
package/dist/shared/icons.d.ts
CHANGED
|
@@ -1,14 +1,60 @@
|
|
|
1
1
|
import type { BlockIconProps } from "./shared.types.js";
|
|
2
|
-
export declare const CheckIcon: ({ size, strokeWidth }: BlockIconProps) => import("react").JSX.Element;
|
|
3
|
-
export declare const MailIcon: ({ size, strokeWidth }: BlockIconProps) => import("react").JSX.Element;
|
|
4
|
-
export declare const DownloadIcon: ({ size, strokeWidth }: BlockIconProps) => import("react").JSX.Element;
|
|
5
|
-
export declare const MenuIcon: ({ size, strokeWidth }: BlockIconProps) => import("react").JSX.Element;
|
|
6
|
-
export declare const XIcon: ({ size, strokeWidth }: BlockIconProps) => import("react").JSX.Element;
|
|
7
|
-
export declare const ChevronDownIcon: ({ size, strokeWidth }: BlockIconProps) => import("react").JSX.Element;
|
|
8
|
-
export declare const ChevronRightIcon: ({ size, strokeWidth }: BlockIconProps) => import("react").JSX.Element;
|
|
9
|
-
export declare const ArrowRightIcon: ({ size, strokeWidth }: BlockIconProps) => import("react").JSX.Element;
|
|
10
|
-
export declare const MinusIcon: ({ size, strokeWidth }: BlockIconProps) => import("react").JSX.Element;
|
|
11
|
-
export declare const SunIcon: ({ size, strokeWidth }: BlockIconProps) => import("react").JSX.Element;
|
|
12
|
-
export declare const MoonIcon: ({ size, strokeWidth }: BlockIconProps) => import("react").JSX.Element;
|
|
13
|
-
export declare const MonitorIcon: ({ size, strokeWidth }: BlockIconProps) => import("react").JSX.Element;
|
|
14
|
-
export declare const CircleCheckIcon: ({ size, strokeWidth }: BlockIconProps) => import("react").JSX.Element;
|
|
2
|
+
export declare const CheckIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
3
|
+
export declare const MailIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
4
|
+
export declare const DownloadIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
5
|
+
export declare const MenuIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
6
|
+
export declare const XIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
7
|
+
export declare const ChevronDownIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
8
|
+
export declare const ChevronRightIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
9
|
+
export declare const ArrowRightIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
10
|
+
export declare const MinusIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
11
|
+
export declare const SunIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
12
|
+
export declare const MoonIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
13
|
+
export declare const MonitorIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
14
|
+
export declare const CircleCheckIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
15
|
+
export declare const PauseIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
16
|
+
export declare const PlayIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
17
|
+
export declare const QuoteIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
18
|
+
export declare const ArrowLeftIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
19
|
+
export declare const CalendarDaysIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
20
|
+
export declare const ClockIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
21
|
+
export declare const MapPinIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
22
|
+
export declare const LinkIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
23
|
+
export declare const MailCheckIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
24
|
+
export declare const ShieldCheckIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
25
|
+
export declare const KeyRoundIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
26
|
+
export declare const EyeIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
27
|
+
export declare const EyeOffIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
28
|
+
export declare const PlusIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
29
|
+
export declare const EllipsisIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
30
|
+
export declare const CopyIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
31
|
+
export declare const UserMinusIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
32
|
+
export declare const RotateCwIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
33
|
+
export declare const SendIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
34
|
+
export declare const Trash2Icon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
35
|
+
export declare const ArchiveIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
36
|
+
export declare const ArchiveRestoreIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
37
|
+
export declare const ArrowLeftRightIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
38
|
+
export declare const RotateCcwIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
39
|
+
export declare const SearchIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
40
|
+
export declare const ChevronsUpDownIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
41
|
+
export declare const ChevronLeftIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
42
|
+
export declare const PanelRightIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
43
|
+
export declare const PanelLeftOpenIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
44
|
+
export declare const PanelLeftCloseIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
45
|
+
export declare const SearchXIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
46
|
+
export declare const MessageSquareIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
47
|
+
export declare const PencilIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
48
|
+
export declare const TriangleAlertIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
49
|
+
export declare const CreditCardIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
50
|
+
export declare const ArrowUpIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
51
|
+
export declare const CircleStopIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
52
|
+
export declare const SquarePenIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
53
|
+
export declare const StarIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
54
|
+
export declare const ListFilterIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
55
|
+
export declare const CloudOffIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
56
|
+
export declare const ArrowUpRightIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
57
|
+
export declare const BellRingIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
58
|
+
export declare const BellIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
59
|
+
export declare const CheckCheckIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
60
|
+
export declare const SettingsIcon: ({ size, strokeWidth, className }: BlockIconProps) => import("react").JSX.Element;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { MouseEvent, ReactNode } from "react";
|
|
2
|
+
import type { BadgeVariant, Command, TableColumn } from "@openwarelabs/ui";
|
|
2
3
|
/**
|
|
3
4
|
* A call to action. With `href` it's a link styled as a button, so it works with any router's links as an
|
|
4
5
|
* ordinary <a>; without one it's a button that runs `onClick`.
|
|
@@ -57,6 +58,9 @@ export interface BlockActionButtonProps {
|
|
|
57
58
|
/** lg for heroes and calls to action, sm for headers.
|
|
58
59
|
* @default "lg" */
|
|
59
60
|
size?: "sm" | "md" | "lg";
|
|
61
|
+
/** pill for marketing pages, rounded for application pages.
|
|
62
|
+
* @default "pill" */
|
|
63
|
+
shape?: "pill" | "rounded";
|
|
60
64
|
className?: string;
|
|
61
65
|
/** Runs after the action's own onClick, such as closing a menu. */
|
|
62
66
|
onAfterClick?(): void;
|
|
@@ -72,6 +76,7 @@ export interface BlockIconProps {
|
|
|
72
76
|
size?: number;
|
|
73
77
|
/** @default 2 */
|
|
74
78
|
strokeWidth?: number;
|
|
79
|
+
className?: string;
|
|
75
80
|
}
|
|
76
81
|
export interface BlockBrandLinkProps {
|
|
77
82
|
brand: BlockBrand;
|
|
@@ -84,3 +89,126 @@ export interface FooterColumnsProps {
|
|
|
84
89
|
/** For a link's badge. */
|
|
85
90
|
badgeClassName?: string;
|
|
86
91
|
}
|
|
92
|
+
/** A way in with another account, such as GitHub or Google, as a button above the email form. */
|
|
93
|
+
export interface SignInProvider {
|
|
94
|
+
/** Passed back to `onProviderSelect`: "github", "google". */
|
|
95
|
+
id: string;
|
|
96
|
+
/** The button's words: "Continue with GitHub". */
|
|
97
|
+
label: ReactNode;
|
|
98
|
+
/** A 16px mark before them. */
|
|
99
|
+
icon?: ReactNode;
|
|
100
|
+
}
|
|
101
|
+
/** One choice in a menu of actions. */
|
|
102
|
+
export interface BlockMenuItem {
|
|
103
|
+
/** The item's words: name the action, in sentence case ("Archive project"). */
|
|
104
|
+
label: ReactNode;
|
|
105
|
+
/** A 15px icon before the label, usually from lucide-react. */
|
|
106
|
+
icon?: ReactNode;
|
|
107
|
+
/** What it does; the menu closes after it. */
|
|
108
|
+
onSelect?(): void;
|
|
109
|
+
/** Shows the item greyed out, so it can't be chosen right now. */
|
|
110
|
+
disabled?: boolean;
|
|
111
|
+
/** Red, for actions that delete or can't be undone. */
|
|
112
|
+
destructive?: boolean;
|
|
113
|
+
/** Draws a line above the item, starting a new group. */
|
|
114
|
+
separatorBefore?: boolean;
|
|
115
|
+
}
|
|
116
|
+
/** A button in an app's page: a page's primary action, a toolbar's button. */
|
|
117
|
+
export interface BlockButton {
|
|
118
|
+
/** The button's words: name the action ("Deploy", "Invite people"). */
|
|
119
|
+
label: ReactNode;
|
|
120
|
+
/** A 16px icon before the label, usually from lucide-react. */
|
|
121
|
+
icon?: ReactNode;
|
|
122
|
+
/** What it does. */
|
|
123
|
+
onClick?(): void;
|
|
124
|
+
/** Shows it greyed out. */
|
|
125
|
+
disabled?: boolean;
|
|
126
|
+
/** Shows a spinner while what it started is under way. */
|
|
127
|
+
loading?: boolean;
|
|
128
|
+
}
|
|
129
|
+
/** A status shown as a badge: "Live", "Needs review". */
|
|
130
|
+
export interface BlockStatus {
|
|
131
|
+
/** The badge's words. */
|
|
132
|
+
label: ReactNode;
|
|
133
|
+
/** Its colour: success, warning, danger, active (in progress) or neutral.
|
|
134
|
+
* @default "neutral" */
|
|
135
|
+
tone?: BadgeVariant;
|
|
136
|
+
}
|
|
137
|
+
/** A place in an app's navigation. */
|
|
138
|
+
export interface AppNavItem {
|
|
139
|
+
/** Unique in the navigation; what `current` and `onNavigate` use. */
|
|
140
|
+
id: string;
|
|
141
|
+
/** Its name, as the item shows it. */
|
|
142
|
+
label: string;
|
|
143
|
+
/** A 15px icon before the label, usually from lucide-react, or a small coloured dot for a project. */
|
|
144
|
+
icon?: ReactNode;
|
|
145
|
+
/** A count or a badge at the item's end: unread messages, open reviews. */
|
|
146
|
+
count?: ReactNode;
|
|
147
|
+
/** Makes the item a link to this address instead of a button. */
|
|
148
|
+
href?: string;
|
|
149
|
+
}
|
|
150
|
+
/** A group of places in an app's navigation, under an optional heading. */
|
|
151
|
+
export interface AppNavGroup {
|
|
152
|
+
/** Names the group for screen readers ("Workspace", "Projects"). */
|
|
153
|
+
label: string;
|
|
154
|
+
/** A small heading shown above the group. */
|
|
155
|
+
heading?: ReactNode;
|
|
156
|
+
/** Its places, in order. */
|
|
157
|
+
items: AppNavItem[];
|
|
158
|
+
}
|
|
159
|
+
/** A workspace the person can switch to, in the workspace menu. */
|
|
160
|
+
export interface AppWorkspace {
|
|
161
|
+
/** Its name. */
|
|
162
|
+
name: string;
|
|
163
|
+
/** The one they're in: ticked in the menu. */
|
|
164
|
+
current?: boolean;
|
|
165
|
+
/** Switches to it. */
|
|
166
|
+
onSelect?(): void;
|
|
167
|
+
}
|
|
168
|
+
/** The person who's signed in. */
|
|
169
|
+
export interface AppAccount {
|
|
170
|
+
/** Their name; its initials show when there's no picture. */
|
|
171
|
+
name: string;
|
|
172
|
+
/** Their email address, under the name. */
|
|
173
|
+
email?: string;
|
|
174
|
+
/** A photo URL. */
|
|
175
|
+
avatar?: string;
|
|
176
|
+
}
|
|
177
|
+
/** A choice in an app shell's menus. With `page`, choosing it opens that place, as a navigation item would. */
|
|
178
|
+
export interface AppMenuItem extends BlockMenuItem {
|
|
179
|
+
/** The id of the place it opens ("settings"): it becomes current and the phone drawer closes. */
|
|
180
|
+
page?: string;
|
|
181
|
+
}
|
|
182
|
+
/** A command in an app shell's search (⌘K). With `page`, running it opens that place. */
|
|
183
|
+
export interface AppCommand extends Omit<Command, "run"> {
|
|
184
|
+
/** What it does. */
|
|
185
|
+
run?(): void;
|
|
186
|
+
/** The id of the place it opens: it becomes current and the phone drawer closes. */
|
|
187
|
+
page?: string;
|
|
188
|
+
}
|
|
189
|
+
export interface BlockMenuItemsProps {
|
|
190
|
+
items: BlockMenuItem[];
|
|
191
|
+
/** Runs after an item's own onSelect. */
|
|
192
|
+
onAfterSelect?(item: BlockMenuItem): void;
|
|
193
|
+
}
|
|
194
|
+
/** A column of a block's table: a Table column that can step aside on smaller screens. */
|
|
195
|
+
export interface BlockTableColumn<Row> extends TableColumn<Row> {
|
|
196
|
+
/** Hides the column under 1024px wide ("tablet") or under 760px ("phone"), to keep the table readable there. */
|
|
197
|
+
hideBelow?: "tablet" | "phone";
|
|
198
|
+
}
|
|
199
|
+
export interface AppShellStateOptions {
|
|
200
|
+
current?: string;
|
|
201
|
+
defaultCurrent?: string;
|
|
202
|
+
onNavigate?(id: string): void;
|
|
203
|
+
commands?: AppCommand[];
|
|
204
|
+
}
|
|
205
|
+
export interface AppWorkspaceItemsProps {
|
|
206
|
+
workspaces: AppWorkspace[];
|
|
207
|
+
onNewWorkspace?(): void;
|
|
208
|
+
/** The menu's heading. */
|
|
209
|
+
heading: ReactNode;
|
|
210
|
+
/** The last item's words. */
|
|
211
|
+
newWorkspace: ReactNode;
|
|
212
|
+
/** Keeps the unticked workspaces' names in line with the ticked one's. */
|
|
213
|
+
spacerClassName: string;
|
|
214
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { MouseEvent, ReactNode } from "react";
|
|
2
|
+
import type { BadgeVariant, Command, TableColumn } from "@openwarelabs/ui";
|
|
2
3
|
/**
|
|
3
4
|
* A call to action. With `href` it's a link styled as a button, so it works with any router's links as an
|
|
4
5
|
* ordinary <a>; without one it's a button that runs `onClick`.
|
|
@@ -57,6 +58,9 @@ export interface BlockActionButtonProps {
|
|
|
57
58
|
/** lg for heroes and calls to action, sm for headers.
|
|
58
59
|
* @default "lg" */
|
|
59
60
|
size?: "sm" | "md" | "lg";
|
|
61
|
+
/** pill for marketing pages, rounded for application pages.
|
|
62
|
+
* @default "pill" */
|
|
63
|
+
shape?: "pill" | "rounded";
|
|
60
64
|
className?: string;
|
|
61
65
|
/** Runs after the action's own onClick, such as closing a menu. */
|
|
62
66
|
onAfterClick?(): void;
|
|
@@ -72,6 +76,7 @@ export interface BlockIconProps {
|
|
|
72
76
|
size?: number;
|
|
73
77
|
/** @default 2 */
|
|
74
78
|
strokeWidth?: number;
|
|
79
|
+
className?: string;
|
|
75
80
|
}
|
|
76
81
|
export interface BlockBrandLinkProps {
|
|
77
82
|
brand: BlockBrand;
|
|
@@ -84,3 +89,126 @@ export interface FooterColumnsProps {
|
|
|
84
89
|
/** For a link's badge. */
|
|
85
90
|
badgeClassName?: string;
|
|
86
91
|
}
|
|
92
|
+
/** A way in with another account, such as GitHub or Google, as a button above the email form. */
|
|
93
|
+
export interface SignInProvider {
|
|
94
|
+
/** Passed back to `onProviderSelect`: "github", "google". */
|
|
95
|
+
id: string;
|
|
96
|
+
/** The button's words: "Continue with GitHub". */
|
|
97
|
+
label: ReactNode;
|
|
98
|
+
/** A 16px mark before them. */
|
|
99
|
+
icon?: ReactNode;
|
|
100
|
+
}
|
|
101
|
+
/** One choice in a menu of actions. */
|
|
102
|
+
export interface BlockMenuItem {
|
|
103
|
+
/** The item's words: name the action, in sentence case ("Archive project"). */
|
|
104
|
+
label: ReactNode;
|
|
105
|
+
/** A 15px icon before the label, usually from lucide-react. */
|
|
106
|
+
icon?: ReactNode;
|
|
107
|
+
/** What it does; the menu closes after it. */
|
|
108
|
+
onSelect?(): void;
|
|
109
|
+
/** Shows the item greyed out, so it can't be chosen right now. */
|
|
110
|
+
disabled?: boolean;
|
|
111
|
+
/** Red, for actions that delete or can't be undone. */
|
|
112
|
+
destructive?: boolean;
|
|
113
|
+
/** Draws a line above the item, starting a new group. */
|
|
114
|
+
separatorBefore?: boolean;
|
|
115
|
+
}
|
|
116
|
+
/** A button in an app's page: a page's primary action, a toolbar's button. */
|
|
117
|
+
export interface BlockButton {
|
|
118
|
+
/** The button's words: name the action ("Deploy", "Invite people"). */
|
|
119
|
+
label: ReactNode;
|
|
120
|
+
/** A 16px icon before the label, usually from lucide-react. */
|
|
121
|
+
icon?: ReactNode;
|
|
122
|
+
/** What it does. */
|
|
123
|
+
onClick?(): void;
|
|
124
|
+
/** Shows it greyed out. */
|
|
125
|
+
disabled?: boolean;
|
|
126
|
+
/** Shows a spinner while what it started is under way. */
|
|
127
|
+
loading?: boolean;
|
|
128
|
+
}
|
|
129
|
+
/** A status shown as a badge: "Live", "Needs review". */
|
|
130
|
+
export interface BlockStatus {
|
|
131
|
+
/** The badge's words. */
|
|
132
|
+
label: ReactNode;
|
|
133
|
+
/** Its colour: success, warning, danger, active (in progress) or neutral.
|
|
134
|
+
* @default "neutral" */
|
|
135
|
+
tone?: BadgeVariant;
|
|
136
|
+
}
|
|
137
|
+
/** A place in an app's navigation. */
|
|
138
|
+
export interface AppNavItem {
|
|
139
|
+
/** Unique in the navigation; what `current` and `onNavigate` use. */
|
|
140
|
+
id: string;
|
|
141
|
+
/** Its name, as the item shows it. */
|
|
142
|
+
label: string;
|
|
143
|
+
/** A 15px icon before the label, usually from lucide-react, or a small coloured dot for a project. */
|
|
144
|
+
icon?: ReactNode;
|
|
145
|
+
/** A count or a badge at the item's end: unread messages, open reviews. */
|
|
146
|
+
count?: ReactNode;
|
|
147
|
+
/** Makes the item a link to this address instead of a button. */
|
|
148
|
+
href?: string;
|
|
149
|
+
}
|
|
150
|
+
/** A group of places in an app's navigation, under an optional heading. */
|
|
151
|
+
export interface AppNavGroup {
|
|
152
|
+
/** Names the group for screen readers ("Workspace", "Projects"). */
|
|
153
|
+
label: string;
|
|
154
|
+
/** A small heading shown above the group. */
|
|
155
|
+
heading?: ReactNode;
|
|
156
|
+
/** Its places, in order. */
|
|
157
|
+
items: AppNavItem[];
|
|
158
|
+
}
|
|
159
|
+
/** A workspace the person can switch to, in the workspace menu. */
|
|
160
|
+
export interface AppWorkspace {
|
|
161
|
+
/** Its name. */
|
|
162
|
+
name: string;
|
|
163
|
+
/** The one they're in: ticked in the menu. */
|
|
164
|
+
current?: boolean;
|
|
165
|
+
/** Switches to it. */
|
|
166
|
+
onSelect?(): void;
|
|
167
|
+
}
|
|
168
|
+
/** The person who's signed in. */
|
|
169
|
+
export interface AppAccount {
|
|
170
|
+
/** Their name; its initials show when there's no picture. */
|
|
171
|
+
name: string;
|
|
172
|
+
/** Their email address, under the name. */
|
|
173
|
+
email?: string;
|
|
174
|
+
/** A photo URL. */
|
|
175
|
+
avatar?: string;
|
|
176
|
+
}
|
|
177
|
+
/** A choice in an app shell's menus. With `page`, choosing it opens that place, as a navigation item would. */
|
|
178
|
+
export interface AppMenuItem extends BlockMenuItem {
|
|
179
|
+
/** The id of the place it opens ("settings"): it becomes current and the phone drawer closes. */
|
|
180
|
+
page?: string;
|
|
181
|
+
}
|
|
182
|
+
/** A command in an app shell's search (⌘K). With `page`, running it opens that place. */
|
|
183
|
+
export interface AppCommand extends Omit<Command, "run"> {
|
|
184
|
+
/** What it does. */
|
|
185
|
+
run?(): void;
|
|
186
|
+
/** The id of the place it opens: it becomes current and the phone drawer closes. */
|
|
187
|
+
page?: string;
|
|
188
|
+
}
|
|
189
|
+
export interface BlockMenuItemsProps {
|
|
190
|
+
items: BlockMenuItem[];
|
|
191
|
+
/** Runs after an item's own onSelect. */
|
|
192
|
+
onAfterSelect?(item: BlockMenuItem): void;
|
|
193
|
+
}
|
|
194
|
+
/** A column of a block's table: a Table column that can step aside on smaller screens. */
|
|
195
|
+
export interface BlockTableColumn<Row> extends TableColumn<Row> {
|
|
196
|
+
/** Hides the column under 1024px wide ("tablet") or under 760px ("phone"), to keep the table readable there. */
|
|
197
|
+
hideBelow?: "tablet" | "phone";
|
|
198
|
+
}
|
|
199
|
+
export interface AppShellStateOptions {
|
|
200
|
+
current?: string;
|
|
201
|
+
defaultCurrent?: string;
|
|
202
|
+
onNavigate?(id: string): void;
|
|
203
|
+
commands?: AppCommand[];
|
|
204
|
+
}
|
|
205
|
+
export interface AppWorkspaceItemsProps {
|
|
206
|
+
workspaces: AppWorkspace[];
|
|
207
|
+
onNewWorkspace?(): void;
|
|
208
|
+
/** The menu's heading. */
|
|
209
|
+
heading: ReactNode;
|
|
210
|
+
/** The last item's words. */
|
|
211
|
+
newWorkspace: ReactNode;
|
|
212
|
+
/** Keeps the unticked workspaces' names in line with the ticked one's. */
|
|
213
|
+
spacerClassName: string;
|
|
214
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { BlockTableColumn } from "./shared.types.cjs";
|
|
2
|
+
/**
|
|
3
|
+
* The data attributes that hide a table's columns on smaller screens: the positions of the columns to hide under
|
|
4
|
+
* 1024px and under 760px, counted as the cells are (from 1, after `offset` cells of its own such as checkboxes).
|
|
5
|
+
* Each block's stylesheet turns them into `display: none` for those cells.
|
|
6
|
+
*/
|
|
7
|
+
export declare function hiddenColumns<Row>(columns: Array<BlockTableColumn<Row>>, offset?: number): {
|
|
8
|
+
"data-hide-tablet": string | undefined;
|
|
9
|
+
"data-hide-phone": string | undefined;
|
|
10
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { BlockTableColumn } from "./shared.types.js";
|
|
2
|
+
/**
|
|
3
|
+
* The data attributes that hide a table's columns on smaller screens: the positions of the columns to hide under
|
|
4
|
+
* 1024px and under 760px, counted as the cells are (from 1, after `offset` cells of its own such as checkboxes).
|
|
5
|
+
* Each block's stylesheet turns them into `display: none` for those cells.
|
|
6
|
+
*/
|
|
7
|
+
export declare function hiddenColumns<Row>(columns: Array<BlockTableColumn<Row>>, offset?: number): {
|
|
8
|
+
"data-hide-tablet": string | undefined;
|
|
9
|
+
"data-hide-phone": string | undefined;
|
|
10
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { SignIn01Props } from "./SignIn01.types.cjs";
|
|
2
|
+
/** One card in the middle of the window: the mark and heading above it, other accounts and the email form on it. */
|
|
3
|
+
export declare function SignIn01({ title, description, logo, providers, onProviderSelect, onSubmit, forgotPasswordHref, footer, labels, className, ...props }: SignIn01Props): import("react").JSX.Element;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { SignIn01Props } from "./SignIn01.types.js";
|
|
2
|
+
/** One card in the middle of the window: the mark and heading above it, other accounts and the email form on it. */
|
|
3
|
+
export declare function SignIn01({ title, description, logo, providers, onProviderSelect, onSubmit, forgotPasswordHref, footer, labels, className, ...props }: SignIn01Props): import("react").JSX.Element;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
import type { SignInProvider } from "../../shared/shared.types.cjs";
|
|
3
|
+
export interface SignIn01Labels {
|
|
4
|
+
/** @default "Email" */
|
|
5
|
+
email?: string;
|
|
6
|
+
/** @default "maya@example.com" */
|
|
7
|
+
emailPlaceholder?: string;
|
|
8
|
+
/** @default "Password" */
|
|
9
|
+
password?: string;
|
|
10
|
+
/** The link beside the password's label. @default "Forgot password?" */
|
|
11
|
+
forgotPassword?: string;
|
|
12
|
+
/** The form's button. @default "Sign in" */
|
|
13
|
+
submit?: string;
|
|
14
|
+
/** The word on the line between the providers and the form. @default "or" */
|
|
15
|
+
separator?: string;
|
|
16
|
+
/** @default "Enter the email address you signed up with." */
|
|
17
|
+
emailEmpty?: string;
|
|
18
|
+
/** @default "That doesn't look like an email address." */
|
|
19
|
+
emailInvalid?: string;
|
|
20
|
+
/** @default "Enter your password." */
|
|
21
|
+
passwordEmpty?: string;
|
|
22
|
+
}
|
|
23
|
+
/** What was typed into the form. */
|
|
24
|
+
export interface SignIn01Values {
|
|
25
|
+
/** The email address, trimmed. */
|
|
26
|
+
email: string;
|
|
27
|
+
password: string;
|
|
28
|
+
}
|
|
29
|
+
export interface SignIn01Props extends Omit<HTMLAttributes<HTMLElement>, "title" | "children" | "onSubmit"> {
|
|
30
|
+
/** The page's heading: "Sign in to Acme". */
|
|
31
|
+
title: ReactNode;
|
|
32
|
+
/** A line under it. */
|
|
33
|
+
description?: ReactNode;
|
|
34
|
+
/** The product's mark above the heading: an `<img>` or an inline SVG about 40px square. */
|
|
35
|
+
logo?: ReactNode;
|
|
36
|
+
/** Buttons above the form for signing in with another account. Leave it out for the form alone. */
|
|
37
|
+
providers?: SignInProvider[];
|
|
38
|
+
/** Starts signing in with a provider, usually by sending the browser there. While its promise is pending the button shows a spinner. */
|
|
39
|
+
onProviderSelect?(id: string): void | Promise<void>;
|
|
40
|
+
/** Signs in with the email and password, once both are filled in. While its promise is pending the button shows a spinner; if it throws, its message shows under the password. */
|
|
41
|
+
onSubmit?(values: SignIn01Values): void | Promise<void>;
|
|
42
|
+
/** Where "Forgot password?" goes. Without it there's no link. */
|
|
43
|
+
forgotPasswordHref?: string;
|
|
44
|
+
/** A line under the card, such as "New to Acme? Create an account" with its link. */
|
|
45
|
+
footer?: ReactNode;
|
|
46
|
+
/** Words that aren't content (the fields' labels, the button, the messages), in English unless you pass your own. */
|
|
47
|
+
labels?: SignIn01Labels;
|
|
48
|
+
}
|
|
49
|
+
export interface SignIn01Errors {
|
|
50
|
+
email?: string;
|
|
51
|
+
password?: string;
|
|
52
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
import type { SignInProvider } from "../../shared/shared.types.js";
|
|
3
|
+
export interface SignIn01Labels {
|
|
4
|
+
/** @default "Email" */
|
|
5
|
+
email?: string;
|
|
6
|
+
/** @default "maya@example.com" */
|
|
7
|
+
emailPlaceholder?: string;
|
|
8
|
+
/** @default "Password" */
|
|
9
|
+
password?: string;
|
|
10
|
+
/** The link beside the password's label. @default "Forgot password?" */
|
|
11
|
+
forgotPassword?: string;
|
|
12
|
+
/** The form's button. @default "Sign in" */
|
|
13
|
+
submit?: string;
|
|
14
|
+
/** The word on the line between the providers and the form. @default "or" */
|
|
15
|
+
separator?: string;
|
|
16
|
+
/** @default "Enter the email address you signed up with." */
|
|
17
|
+
emailEmpty?: string;
|
|
18
|
+
/** @default "That doesn't look like an email address." */
|
|
19
|
+
emailInvalid?: string;
|
|
20
|
+
/** @default "Enter your password." */
|
|
21
|
+
passwordEmpty?: string;
|
|
22
|
+
}
|
|
23
|
+
/** What was typed into the form. */
|
|
24
|
+
export interface SignIn01Values {
|
|
25
|
+
/** The email address, trimmed. */
|
|
26
|
+
email: string;
|
|
27
|
+
password: string;
|
|
28
|
+
}
|
|
29
|
+
export interface SignIn01Props extends Omit<HTMLAttributes<HTMLElement>, "title" | "children" | "onSubmit"> {
|
|
30
|
+
/** The page's heading: "Sign in to Acme". */
|
|
31
|
+
title: ReactNode;
|
|
32
|
+
/** A line under it. */
|
|
33
|
+
description?: ReactNode;
|
|
34
|
+
/** The product's mark above the heading: an `<img>` or an inline SVG about 40px square. */
|
|
35
|
+
logo?: ReactNode;
|
|
36
|
+
/** Buttons above the form for signing in with another account. Leave it out for the form alone. */
|
|
37
|
+
providers?: SignInProvider[];
|
|
38
|
+
/** Starts signing in with a provider, usually by sending the browser there. While its promise is pending the button shows a spinner. */
|
|
39
|
+
onProviderSelect?(id: string): void | Promise<void>;
|
|
40
|
+
/** Signs in with the email and password, once both are filled in. While its promise is pending the button shows a spinner; if it throws, its message shows under the password. */
|
|
41
|
+
onSubmit?(values: SignIn01Values): void | Promise<void>;
|
|
42
|
+
/** Where "Forgot password?" goes. Without it there's no link. */
|
|
43
|
+
forgotPasswordHref?: string;
|
|
44
|
+
/** A line under the card, such as "New to Acme? Create an account" with its link. */
|
|
45
|
+
footer?: ReactNode;
|
|
46
|
+
/** Words that aren't content (the fields' labels, the button, the messages), in English unless you pass your own. */
|
|
47
|
+
labels?: SignIn01Labels;
|
|
48
|
+
}
|
|
49
|
+
export interface SignIn01Errors {
|
|
50
|
+
email?: string;
|
|
51
|
+
password?: string;
|
|
52
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { SignIn02Props } from "./SignIn02.types.cjs";
|
|
2
|
+
/** Signing up: the form on one side of the window, a midnight plate with the product and a quote on the other. */
|
|
3
|
+
export declare function SignIn02({ brand, title, description, providers, onProviderSelect, onSubmit, passwordMinLength, terms, footer, eyebrow, headline, visual, quote, labels, className, ...props }: SignIn02Props): import("react").JSX.Element;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { SignIn02Props } from "./SignIn02.types.js";
|
|
2
|
+
/** Signing up: the form on one side of the window, a midnight plate with the product and a quote on the other. */
|
|
3
|
+
export declare function SignIn02({ brand, title, description, providers, onProviderSelect, onSubmit, passwordMinLength, terms, footer, eyebrow, headline, visual, quote, labels, className, ...props }: SignIn02Props): import("react").JSX.Element;
|