@thekestongroup/ui 0.22.0 → 0.23.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thekestongroup/ui",
3
- "version": "0.22.0",
3
+ "version": "0.23.0",
4
4
  "description": "Keston UI — Vue 3 + Reka UI + Tailwind CSS component library",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "repository": {
@@ -30,3 +30,41 @@ export const CustomApps: Story = {
30
30
  ],
31
31
  },
32
32
  };
33
+
34
+ import adminMark from "./icons/admin.svg";
35
+ import adminTile from "./icons/admin-tile.svg";
36
+ import designMark from "./icons/design.svg";
37
+ import designTile from "./icons/design-tile.svg";
38
+ import idMark from "./icons/id.svg";
39
+ import idTile from "./icons/id-tile.svg";
40
+ import kestonMark from "./icons/keston.svg";
41
+ import kestonTile from "./icons/keston-tile.svg";
42
+ import utilitiesTile from "./icons/utilities-tile.svg";
43
+
44
+ const rows = [
45
+ { label: "App icons (the launcher)", images: [idTile, adminTile, kestonTile, utilitiesTile, designTile] },
46
+ { label: "Marks (headers and sign-in, beside the app's name)", images: [idMark, adminMark, kestonMark, designMark] },
47
+ ];
48
+
49
+ /**
50
+ * The Keston apps' icons, on light and on dark: the app-icon tiles the
51
+ * launcher uses, and the plain marks the apps use beside their names.
52
+ */
53
+ export const AppIcons: Story = {
54
+ decorators: [],
55
+ parameters: { layout: "fullscreen" },
56
+ render: () => ({
57
+ setup: () => ({ rows }),
58
+ template: `
59
+ <div class="flex flex-col gap-4 p-4">
60
+ <div v-for="row in rows" :key="row.label" class="flex flex-col gap-2">
61
+ <p class="text-sm font-bold">{{ row.label }}</p>
62
+ <div v-for="mode in ['light', 'dark']" :key="mode"
63
+ :class="['flex flex-wrap items-end gap-4 rounded-lg p-5', mode === 'light' ? 'bg-white' : 'bg-[#262626]']">
64
+ <img v-for="(src, i) in row.images" :key="'s' + i" :src="src" alt="" class="size-5" />
65
+ <img v-for="(src, i) in row.images" :key="'l' + i" :src="src" alt="" class="size-12" />
66
+ </div>
67
+ </div>
68
+ </div>`,
69
+ }),
70
+ };
@@ -1,24 +1,22 @@
1
1
  <script lang="ts">
2
- import adminIcon from './icons/admin.svg'
3
- import adminIconDark from './icons/admin-dark.svg'
4
- import designIcon from './icons/design.svg'
5
- import idIcon from './icons/id.svg'
6
- import idIconDark from './icons/id-dark.svg'
7
- import kestonIcon from './icons/keston.svg'
8
- import kestonIconDark from './icons/keston-dark.svg'
9
- import utilitiesIcon from './icons/utilities.svg'
2
+ import adminTile from './icons/admin-tile.svg'
3
+ import designTile from './icons/design-tile.svg'
4
+ import idTile from './icons/id-tile.svg'
5
+ import kestonTile from './icons/keston-tile.svg'
6
+ import utilitiesTile from './icons/utilities-tile.svg'
10
7
 
11
8
  /** An app's icon as an image, with an optional version for dark mode. */
12
9
  export type AppLauncherImage = { light: string; dark?: string }
13
10
 
14
- // The Keston apps' own marks (never a logo with the name in it: the name is
15
- // beside it). Apps without a mark of their own have The Keston Group's.
11
+ // The Keston apps' icons: a rounded square in the app's colour with its mark
12
+ // in white, like a phone's app icons, so they're clear on light and dark.
13
+ // Apps without a mark of their own have The Keston Group's.
16
14
  const builtInIcons: Record<string, AppLauncherImage> = {
17
- id: { light: idIcon, dark: idIconDark },
18
- admin: { light: adminIcon, dark: adminIconDark },
19
- work: { light: kestonIcon, dark: kestonIconDark },
20
- utilities: { light: utilitiesIcon },
21
- design: { light: designIcon }
15
+ id: { light: idTile },
16
+ admin: { light: adminTile },
17
+ work: { light: kestonTile },
18
+ utilities: { light: utilitiesTile },
19
+ design: { light: designTile }
22
20
  }
23
21
  </script>
24
22
 
@@ -6,5 +6,5 @@ export const kestonApps: AppLauncherApp[] = [
6
6
  { id: 'admin', label: 'Keston Admin', href: 'https://admin.keston.co', icon: 'admin' },
7
7
  { id: 'work', label: 'Work', href: 'https://work.keston.co', icon: 'work' },
8
8
  { id: 'utilities', label: 'Utilities', href: 'https://utilities.keston.co', icon: 'utilities', signsIn: false },
9
- { id: 'design', label: 'Design system', href: 'https://ui.keston.co', icon: 'design', signsIn: false }
9
+ { id: 'design', label: 'Keston UI', href: 'https://ui.keston.co', icon: 'design', signsIn: false }
10
10
  ]
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 120 120" width="240" height="240"><title>Keston Admin app icon</title><rect width="120" height="120" rx="28" fill="#6B3FE0"/><g transform="translate(18 18) scale(0.7)"><path d="M6 60 L30 30 L42 44 L60 8 L78 38 L88 26 L114 60 L60 112 Z" fill="#FFFFFF" stroke="#FFFFFF" stroke-width="4" stroke-linejoin="round"/><path d="M30 46 L52 80 L60 96 L20 62 Z M88 42 L100 62 L60 96 L70 68 Z" fill="#9474EC"/><path d="M60 24 L86 74 L60 96 L34 74 Z" fill="#6B3FE0"/><path d="M60 24 L86 74 L60 96 Z" fill="#4A23B0"/><path d="M48 60 H72 M48 71 H72" stroke="#FFFFFF" stroke-width="4" stroke-linecap="round" fill="none"/><circle cx="54" cy="60" r="4.5" fill="#FFFFFF"/><circle cx="66" cy="71" r="4.5" fill="#FFFFFF"/></g></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 120 120" width="240" height="240"><title>Keston UI app icon</title><rect width="120" height="120" rx="28" fill="#E0A800"/><g transform="translate(18 18) scale(0.7)"><path d="M6 60 L30 30 L42 44 L60 8 L78 38 L88 26 L114 60 L60 112 Z" fill="#FFFFFF" stroke="#FFFFFF" stroke-width="4" stroke-linejoin="round"/><path d="M30 46 L52 80 L60 96 L20 62 Z M88 42 L100 62 L60 96 L70 68 Z" fill="#F2C94A"/><path d="M60 24 L86 74 L60 96 L34 74 Z" fill="#E0A800"/><path d="M60 24 L86 74 L60 96 Z" fill="#B08400"/><path d="M60 26 V61 A6.5 6.5 0 1 1 60 71 V94" fill="none" stroke="#FFFFFF" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/></g></svg>
@@ -1,5 +1 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
2
- <!-- Keston blue rounded square with a white K, drawn as strokes so it doesn't depend on a font. -->
3
- <rect width="32" height="32" rx="6" fill="#023750"/>
4
- <path d="M11 8v16M21.5 8 11.5 17.5M14.5 15l7.5 9" fill="none" stroke="#fafafa" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/>
5
- </svg>
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 120 120" width="240" height="240"><title>Keston UI</title><path d="M6 60 L30 30 L42 44 L60 8 L78 38 L88 26 L114 60 L60 112 Z" fill="#E0A800" stroke="#E0A800" stroke-width="4" stroke-linejoin="round"/><path d="M30 46 L52 80 L60 96 L20 62 Z M88 42 L100 62 L60 96 L70 68 Z" fill="#F5CD57"/><path d="M60 24 L86 74 L60 96 L34 74 Z" fill="#FFFFFF"/><path d="M60 24 L86 74 L60 96 Z" fill="#FEEDB2"/><path d="M60 26 V61 A6.5 6.5 0 1 1 60 71 V94" fill="none" stroke="#E0A800" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 120 120" width="240" height="240"><title>Keston ID app icon</title><rect width="120" height="120" rx="28" fill="#2448FF"/><g transform="translate(18 18) scale(0.7)"><path d="M6 60 L30 30 L42 44 L60 8 L78 38 L88 26 L114 60 L60 112 Z" fill="#FFFFFF" stroke="#FFFFFF" stroke-width="4" stroke-linejoin="round"/><path d="M30 46 L52 80 L60 96 L20 62 Z M88 42 L100 62 L60 96 L70 68 Z" fill="#6B85FF"/><path d="M60 24 L86 74 L60 96 L34 74 Z" fill="#2448FF"/><path d="M60 24 L86 74 L60 96 Z" fill="#1532C8"/><path d="M56.5 57 A5.5 5.5 0 1 1 63.5 57 L66 76 H54 Z" fill="#FFFFFF" stroke="#FFFFFF" stroke-width="4" stroke-linejoin="round" stroke-linecap="round"/></g></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 120 120" width="240" height="240"><title>The Keston Group app icon</title><rect width="120" height="120" rx="28" fill="#14161A"/><g transform="translate(18 18) scale(0.7)"><path d="M6 60 L30 30 L42 44 L60 8 L78 38 L88 26 L114 60 L60 112 Z" fill="#FFFFFF" stroke="#FFFFFF" stroke-width="4" stroke-linejoin="round"/><path d="M30 46 L52 80 L60 96 L20 62 Z M88 42 L100 62 L60 96 L70 68 Z" fill="#4A4F58"/><path d="M60 24 L86 74 L60 96 L34 74 Z" fill="#14161A"/><path d="M60 24 L86 74 L60 96 Z" fill="#000000"/></g></svg>
@@ -4,6 +4,8 @@ import { ref } from "vue";
4
4
  import Button from "../Button/Button.vue";
5
5
  import Header, { type HeaderUser } from "./Header.vue";
6
6
  import ThemeSwitcher from "../ThemeSwitcher/ThemeSwitcher.vue";
7
+ import AppLauncher from "../AppLauncher/AppLauncher.vue";
8
+ import idMark from "../AppLauncher/icons/id.svg";
7
9
 
8
10
  const user: HeaderUser = {
9
11
  name: "Ben Smith",
@@ -215,6 +217,20 @@ export const WithLogo: Story = {
215
217
  args: { logo: sampleIcon, titleTo: "#home" },
216
218
  };
217
219
 
220
+ /**
221
+ * A Keston app's header: its coloured mark beside its name (in colour in dark
222
+ * mode too), and the app launcher at the start. Switch the theme in the
223
+ * toolbar to see it on dark.
224
+ */
225
+ export const KestonApp: Story = {
226
+ args: { title: "Keston ID", logo: idMark, titleTo: "#home" },
227
+ render: (args) => ({
228
+ components: { Header, AppLauncher },
229
+ setup: () => ({ args }),
230
+ template: `<Header v-bind="args"><template #start><AppLauncher current="id" align="start" class="-ml-2.5" /></template></Header>`,
231
+ }),
232
+ };
233
+
218
234
  /**
219
235
  * lockup: icon and name in one image, in place of the title text. Its alt
220
236
  * text is the title.
@@ -1 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 120 120" width="240" height="240"><title>Keston Admin one-colour white</title><defs><mask id="peaks"><rect width="120" height="120" fill="#fff"/><path d="M30 46 L52 80 L60 96 L20 62 Z M88 42 L100 62 L60 96 L70 68 Z" fill="#000"/><path d="M60 24 L86 74 L60 96 L34 74 Z" fill="#000"/></mask></defs><path d="M6 60 L30 30 L42 44 L60 8 L78 38 L88 26 L114 60 L60 112 Z" fill="#FFFFFF" stroke="#FFFFFF" stroke-width="4" stroke-linejoin="round" mask="url(#peaks)"/><path d="M60 24 L86 74 L60 96 L34 74 Z" fill="none" stroke="#FFFFFF" stroke-width="3" stroke-linejoin="round"/><path d="M48 60 H72 M48 71 H72" stroke="#FFFFFF" stroke-width="4" stroke-linecap="round" fill="none"/><circle cx="54" cy="60" r="4.5" fill="#FFFFFF"/><circle cx="66" cy="71" r="4.5" fill="#FFFFFF"/></svg>
@@ -1 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 120 120" width="240" height="240"><title>Keston ID one-colour white</title><path fill-rule="evenodd" d="M58.61 113.44 L58.76 113.57 L58.91 113.68 L59.08 113.77 L59.25 113.85 L59.43 113.92 L59.62 113.96 L59.81 113.99 L60.00 114.00 L60.19 113.99 L60.38 113.96 L60.57 113.92 L60.75 113.85 L60.92 113.77 L61.09 113.68 L61.24 113.57 L61.39 113.44 L115.39 61.44 L115.52 61.30 L115.64 61.15 L115.74 60.98 L115.83 60.81 L115.90 60.63 L115.95 60.44 L115.98 60.25 L116.00 60.05 L116.00 59.86 L115.97 59.67 L115.93 59.48 L115.87 59.29 L115.79 59.11 L115.70 58.94 L115.59 58.79 L89.59 24.79 L89.46 24.63 L89.32 24.49 L89.16 24.37 L88.99 24.26 L88.81 24.17 L88.63 24.10 L88.44 24.05 L88.24 24.01 L88.04 24.00 L87.84 24.01 L87.65 24.03 L87.45 24.08 L87.26 24.14 L87.08 24.22 L86.91 24.32 L86.75 24.44 L86.60 24.57 L86.46 24.72 L78.27 34.56 L61.71 6.97 L61.61 6.81 L61.48 6.66 L61.35 6.52 L61.20 6.40 L61.04 6.29 L60.87 6.20 L60.69 6.12 L60.50 6.06 L60.31 6.02 L60.12 6.00 L59.92 6.00 L59.73 6.02 L59.54 6.05 L59.35 6.11 L59.17 6.18 L59.00 6.27 L58.84 6.37 L58.68 6.49 L58.54 6.63 L58.42 6.78 L58.31 6.94 L58.21 7.11 L41.56 40.41 L31.52 28.70 L31.38 28.56 L31.24 28.43 L31.08 28.32 L30.91 28.22 L30.73 28.14 L30.55 28.08 L30.35 28.03 L30.16 28.01 L29.97 28.00 L29.77 28.01 L29.58 28.04 L29.39 28.10 L29.21 28.16 L29.03 28.25 L28.87 28.35 L28.71 28.47 L28.57 28.60 L28.44 28.75 L4.44 58.75 L4.32 58.91 L4.22 59.08 L4.14 59.26 L4.08 59.45 L4.03 59.64 L4.01 59.83 L4.00 60.03 L4.01 60.23 L4.05 60.42 L4.10 60.61 L4.17 60.80 L4.25 60.97 L4.36 61.14 L4.48 61.30 L4.61 61.44 L58.61 113.44 Z M77.36 57.38 L88.00 42.00 L100.00 62.00 L85.96 73.93 L86.00 74.00 L60.00 96.00 L34.00 74.00 L34.04 73.93 L20.00 62.00 L30.00 46.00 L40.29 61.90 L60.00 24.00 L77.36 57.38 Z" fill="#FFFFFF"/><path d="M56.5 57 A5.5 5.5 0 1 1 63.5 57 L66 76 H54 Z" fill="#FFFFFF" stroke="#FFFFFF" stroke-width="4" stroke-linejoin="round"/></svg>
@@ -1 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 120 120" width="240" height="240"><title>Keston one-colour white</title><path fill-rule="evenodd" d="M58.61 113.44 L58.76 113.57 L58.91 113.68 L59.08 113.77 L59.25 113.85 L59.43 113.92 L59.62 113.96 L59.81 113.99 L60.00 114.00 L60.19 113.99 L60.38 113.96 L60.57 113.92 L60.75 113.85 L60.92 113.77 L61.09 113.68 L61.24 113.57 L61.39 113.44 L115.39 61.44 L115.52 61.30 L115.64 61.15 L115.74 60.98 L115.83 60.81 L115.90 60.63 L115.95 60.44 L115.98 60.25 L116.00 60.05 L116.00 59.86 L115.97 59.67 L115.93 59.48 L115.87 59.29 L115.79 59.11 L115.70 58.94 L115.59 58.79 L89.59 24.79 L89.46 24.63 L89.32 24.49 L89.16 24.37 L88.99 24.26 L88.81 24.17 L88.63 24.10 L88.44 24.05 L88.24 24.01 L88.04 24.00 L87.84 24.01 L87.65 24.03 L87.45 24.08 L87.26 24.14 L87.08 24.22 L86.91 24.32 L86.75 24.44 L86.60 24.57 L86.46 24.72 L78.27 34.56 L61.71 6.97 L61.61 6.81 L61.48 6.66 L61.35 6.52 L61.20 6.40 L61.04 6.29 L60.87 6.20 L60.69 6.12 L60.50 6.06 L60.31 6.02 L60.12 6.00 L59.92 6.00 L59.73 6.02 L59.54 6.05 L59.35 6.11 L59.17 6.18 L59.00 6.27 L58.84 6.37 L58.68 6.49 L58.54 6.63 L58.42 6.78 L58.31 6.94 L58.21 7.11 L41.56 40.41 L31.52 28.70 L31.38 28.56 L31.24 28.43 L31.08 28.32 L30.91 28.22 L30.73 28.14 L30.55 28.08 L30.35 28.03 L30.16 28.01 L29.97 28.00 L29.77 28.01 L29.58 28.04 L29.39 28.10 L29.21 28.16 L29.03 28.25 L28.87 28.35 L28.71 28.47 L28.57 28.60 L28.44 28.75 L4.44 58.75 L4.32 58.91 L4.22 59.08 L4.14 59.26 L4.08 59.45 L4.03 59.64 L4.01 59.83 L4.00 60.03 L4.01 60.23 L4.05 60.42 L4.10 60.61 L4.17 60.80 L4.25 60.97 L4.36 61.14 L4.48 61.30 L4.61 61.44 L58.61 113.44 Z M77.36 57.38 L88.00 42.00 L100.00 62.00 L85.96 73.93 L86.00 74.00 L60.00 96.00 L34.00 74.00 L34.04 73.93 L20.00 62.00 L30.00 46.00 L40.29 61.90 L60.00 24.00 L77.36 57.38 Z" fill="#FFFFFF"/></svg>