@thekestongroup/ui 0.12.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/AppLauncher/AppLauncher.vue.d.ts +34 -0
- package/dist/components/AppLauncher/apps.d.ts +3 -0
- package/dist/components/AppShell/AppShell.vue.d.ts +3 -0
- package/dist/components/Header/Header.vue.d.ts +3 -2
- package/dist/components/Slideover/Slideover.vue.d.ts +1 -1
- package/dist/i18n/en.d.ts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/keston-ui.js +997 -899
- package/package.json +1 -1
- package/src/components/AppLauncher/AppLauncher.stories.ts +32 -0
- package/src/components/AppLauncher/AppLauncher.vue +88 -0
- package/src/components/AppLauncher/apps.ts +10 -0
- package/src/components/AppShell/AppShell.stories.ts +5 -0
- package/src/components/AppShell/AppShell.vue +9 -2
- package/src/components/Footer/footer.test.ts +2 -2
- package/src/components/Footer/links.ts +3 -3
- package/src/components/Header/Header.vue +4 -1
- package/src/i18n/en.ts +1 -0
- package/src/index.ts +3 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Component, HTMLAttributes } from 'vue';
|
|
2
|
+
export interface AppLauncherApp {
|
|
3
|
+
/** Matches `current` to mark the app you are in. */
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
href: string;
|
|
7
|
+
/** An icon component, or the name of one of the Keston app icons (id, admin, work, utilities, design). */
|
|
8
|
+
icon?: Component | string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* The grid button in the header that opens a panel of the Keston Group's apps, so people can move between
|
|
12
|
+
* them. The same in every app: it lists `kestonApps` and marks the one you are in with `current`. In an app
|
|
13
|
+
* built on AppShell, pass `launcher` to AppShell instead of using this directly.
|
|
14
|
+
*
|
|
15
|
+
* Apps open in the same tab, as moving between Keston apps is moving on, not a side trip (the footer's
|
|
16
|
+
* links are the opposite: they open in a new tab).
|
|
17
|
+
*/
|
|
18
|
+
export interface AppLauncherProps {
|
|
19
|
+
/** The apps to list. Default: `kestonApps`. */
|
|
20
|
+
apps?: AppLauncherApp[];
|
|
21
|
+
/** The `id` of the app you are in, shown as the current page. */
|
|
22
|
+
current?: string;
|
|
23
|
+
/** Which edge of the button the panel lines up with: `start` when the button is at the left of the header (AppShell), `end` when at the right. Default `end`. */
|
|
24
|
+
align?: 'start' | 'end';
|
|
25
|
+
/** Name of the button for screen readers. Default "Keston apps". */
|
|
26
|
+
label?: string;
|
|
27
|
+
class?: HTMLAttributes['class'];
|
|
28
|
+
}
|
|
29
|
+
declare const _default: typeof __VLS_export;
|
|
30
|
+
export default _default;
|
|
31
|
+
declare const __VLS_export: import('vue').DefineComponent<AppLauncherProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<AppLauncherProps> & Readonly<{}>, {
|
|
32
|
+
align: "end" | "start";
|
|
33
|
+
apps: AppLauncherApp[];
|
|
34
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'vue';
|
|
2
|
+
import { AppLauncherProps } from '../AppLauncher/AppLauncher.vue';
|
|
2
3
|
import { FooterProps } from '../Footer/Footer.vue';
|
|
3
4
|
import { HeaderProps, HeaderUser, HeaderUserAction } from '../Header/Header.vue';
|
|
4
5
|
import { SidebarItem, SidebarProps } from '../Sidebar/Sidebar.vue';
|
|
@@ -49,6 +50,8 @@ export interface AppShellProps {
|
|
|
49
50
|
collapsible?: boolean;
|
|
50
51
|
/** Show the Keston Group footer under the page. The Footer's props: `{ appName, version, … }`. Without it there is no footer. */
|
|
51
52
|
footer?: FooterProps;
|
|
53
|
+
/** Show the app launcher (a grid button for moving between Keston apps) at the left of the header, before the menu button. `true` for the defaults, or the AppLauncher's props: `{ current: 'admin' }`. */
|
|
54
|
+
launcher?: boolean | AppLauncherProps;
|
|
52
55
|
/** Component used for sidebar items with `to`, and the title link, e.g. RouterLink. */
|
|
53
56
|
linkComponent?: SidebarProps['linkComponent'];
|
|
54
57
|
/** Other Header props, e.g. `{ ui: { title: '…' } }`. */
|
|
@@ -15,7 +15,7 @@ export type HeaderUserAction = 'account-settings' | 'switch-account' | 'log-out'
|
|
|
15
15
|
* the right (Account settings, Switch account, Log out). Each part can be
|
|
16
16
|
* overridden with a slot.
|
|
17
17
|
*
|
|
18
|
-
* Slots: leading (before the title, e.g. a logo), title, default (the middle,
|
|
18
|
+
* Slots: start (the very first thing, before the menu button, e.g. the app launcher; give it a `-ml-2.5` button to line up with the padding), leading (before the title, e.g. a logo), title, default (the middle,
|
|
19
19
|
* fills the space between title and trailing), trailing (actions before the
|
|
20
20
|
* account menu), account (replaces the account menu, or the Sign in button),
|
|
21
21
|
* account-menu (extra content in the account menu, above Switch account /
|
|
@@ -74,6 +74,7 @@ export interface HeaderProps {
|
|
|
74
74
|
};
|
|
75
75
|
}
|
|
76
76
|
type __VLS_Slots = {
|
|
77
|
+
start?(): unknown;
|
|
77
78
|
leading?(): unknown;
|
|
78
79
|
title?(): unknown;
|
|
79
80
|
default?(): unknown;
|
|
@@ -100,8 +101,8 @@ declare const __VLS_base: import('vue').DefineComponent<HeaderProps, {}, {}, {},
|
|
|
100
101
|
"onSign-in"?: (() => any) | undefined;
|
|
101
102
|
}>, {
|
|
102
103
|
menu: boolean;
|
|
103
|
-
linkComponent: string | Component;
|
|
104
104
|
sticky: boolean;
|
|
105
|
+
linkComponent: string | Component;
|
|
105
106
|
menuOpen: boolean;
|
|
106
107
|
userActions: HeaderUserAction[];
|
|
107
108
|
signIn: boolean;
|
|
@@ -112,7 +112,7 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, {}, {
|
|
|
112
112
|
modal: boolean;
|
|
113
113
|
close: boolean;
|
|
114
114
|
overlay: boolean;
|
|
115
|
-
initialFocus: "none" | "
|
|
115
|
+
initialFocus: "none" | "close" | "auto";
|
|
116
116
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
117
117
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
118
118
|
declare const _default: typeof __VLS_export;
|
package/dist/i18n/en.d.ts
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -7,6 +7,9 @@ export { default as PageHeader } from './components/PageHeader/PageHeader.vue';
|
|
|
7
7
|
export type { PageHeaderAction, PageHeaderProps } from './components/PageHeader/PageHeader.vue';
|
|
8
8
|
export { default as SettingsRow } from './components/SettingsRow/SettingsRow.vue';
|
|
9
9
|
export type { SettingsRowProps } from './components/SettingsRow/SettingsRow.vue';
|
|
10
|
+
export { default as AppLauncher } from './components/AppLauncher/AppLauncher.vue';
|
|
11
|
+
export type { AppLauncherApp, AppLauncherProps } from './components/AppLauncher/AppLauncher.vue';
|
|
12
|
+
export { kestonApps } from './components/AppLauncher/apps';
|
|
10
13
|
export { default as Footer } from './components/Footer/Footer.vue';
|
|
11
14
|
export type { FooterLink, FooterProps } from './components/Footer/Footer.vue';
|
|
12
15
|
export { kestonFooterLinks, kestonGroupLinks } from './components/Footer/links';
|