@thekestongroup/ui 0.12.0 → 0.13.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.
@@ -0,0 +1,33 @@
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
+ /** A few words on what the app is for. */
7
+ description?: string;
8
+ href: string;
9
+ /** An icon component, or the name of one of the Keston app icons (id, admin, work, utilities, design). */
10
+ icon?: Component | string;
11
+ }
12
+ /**
13
+ * The grid button in the header that opens a panel of the Keston Group's apps, so people can move between
14
+ * them. The same in every app: it lists `kestonApps` and marks the one you are in with `current`. In an app
15
+ * built on AppShell, pass `launcher` to AppShell instead of using this directly.
16
+ *
17
+ * Apps open in the same tab, as moving between Keston apps is moving on, not a side trip (the footer's
18
+ * links are the opposite: they open in a new tab).
19
+ */
20
+ export interface AppLauncherProps {
21
+ /** The apps to list. Default: `kestonApps`. */
22
+ apps?: AppLauncherApp[];
23
+ /** The `id` of the app you are in, shown as the current page. */
24
+ current?: string;
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
+ apps: AppLauncherApp[];
33
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
@@ -0,0 +1,3 @@
1
+ import { AppLauncherApp } from './AppLauncher.vue';
2
+ /** The Keston Group's apps, as the launcher lists them by default. Apps can pass their own `apps`. */
3
+ export declare const kestonApps: AppLauncherApp[];
@@ -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) in the header. `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: '…' } }`. */
@@ -100,8 +100,8 @@ declare const __VLS_base: import('vue').DefineComponent<HeaderProps, {}, {}, {},
100
100
  "onSign-in"?: (() => any) | undefined;
101
101
  }>, {
102
102
  menu: boolean;
103
- linkComponent: string | Component;
104
103
  sticky: boolean;
104
+ linkComponent: string | Component;
105
105
  menuOpen: boolean;
106
106
  userActions: HeaderUserAction[];
107
107
  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" | "auto" | "close";
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
@@ -48,6 +48,9 @@ export declare const en: {
48
48
  chip: {
49
49
  remove: string;
50
50
  };
51
+ appLauncher: {
52
+ label: string;
53
+ };
51
54
  footer: {
52
55
  label: string;
53
56
  version: string;
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';