@thekestongroup/ui 0.13.1 → 0.15.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.
Files changed (89) hide show
  1. package/dist/components/AppLauncher/AppLauncher.vue.d.ts +3 -2
  2. package/dist/components/AppShell/AppShell.vue.d.ts +1 -1
  3. package/dist/components/Header/Header.vue.d.ts +2 -1
  4. package/dist/components/Popover/popover.d.ts +3 -2
  5. package/dist/components/Spinner/Spinner.vue.d.ts +1 -1
  6. package/dist/keston-ui.js +703 -699
  7. package/package.json +1 -1
  8. package/src/components/AppLauncher/AppLauncher.stories.ts +1 -1
  9. package/src/components/AppLauncher/AppLauncher.vue +9 -12
  10. package/src/components/AppLauncher/apps.ts +5 -5
  11. package/src/components/AppShell/AppShell.stories.ts +2 -2
  12. package/src/components/AppShell/AppShell.vue +10 -9
  13. package/src/components/Avatar/Avatar.vue +3 -3
  14. package/src/components/AvatarGroup/AvatarGroup.vue +4 -4
  15. package/src/components/Badge/Badge.vue +2 -2
  16. package/src/components/Breadcrumb/Breadcrumb.vue +5 -5
  17. package/src/components/Button/Button.stories.ts +1 -1
  18. package/src/components/Button/Button.vue +12 -9
  19. package/src/components/Calendar/Calendar.stories.ts +2 -2
  20. package/src/components/Calendar/Calendar.vue +8 -8
  21. package/src/components/Card/Card.stories.ts +5 -5
  22. package/src/components/Card/Card.vue +3 -3
  23. package/src/components/CardSelect/CardSelect.vue +10 -7
  24. package/src/components/ChangeIndicator/ChangeIndicator.vue +2 -2
  25. package/src/components/Checkbox/Checkbox.vue +5 -5
  26. package/src/components/CheckboxGroup/CheckboxGroup.stories.ts +1 -1
  27. package/src/components/CheckboxGroup/CheckboxGroup.vue +2 -2
  28. package/src/components/Checklist/Checklist.vue +3 -3
  29. package/src/components/Chip/Chip.stories.ts +1 -1
  30. package/src/components/Chip/Chip.vue +2 -2
  31. package/src/components/Divider/Divider.vue +4 -4
  32. package/src/components/EmptyState/EmptyState.vue +3 -3
  33. package/src/components/Footer/Footer.vue +4 -4
  34. package/src/components/FormField/FieldMessage.vue +3 -3
  35. package/src/components/FormField/FormField.stories.ts +1 -1
  36. package/src/components/FormField/FormField.vue +8 -3
  37. package/src/components/Header/Header.stories.ts +8 -8
  38. package/src/components/Header/Header.vue +10 -7
  39. package/src/components/InfoTip/InfoTip.stories.ts +1 -1
  40. package/src/components/InfoTip/InfoTip.vue +1 -1
  41. package/src/components/Input/Input.vue +1 -1
  42. package/src/components/InputCode/InputCode.stories.ts +1 -1
  43. package/src/components/InputCode/InputCode.vue +4 -4
  44. package/src/components/InputDate/InputDate.stories.ts +1 -1
  45. package/src/components/InputDate/InputDate.vue +5 -5
  46. package/src/components/InputNumber/InputNumber.stories.ts +1 -1
  47. package/src/components/InputNumber/InputNumber.vue +6 -6
  48. package/src/components/InputPassword/InputPassword.vue +4 -4
  49. package/src/components/InputRichText/InputRichText.stories.ts +1 -1
  50. package/src/components/InputRichText/InputRichText.vue +3 -3
  51. package/src/components/InputTextArea/InputTextArea.vue +1 -1
  52. package/src/components/Link/Link.stories.ts +4 -4
  53. package/src/components/Link/Link.vue +1 -1
  54. package/src/components/Menu/Menu.vue +6 -5
  55. package/src/components/Notification/Notification.stories.ts +3 -3
  56. package/src/components/Notification/Notification.vue +9 -9
  57. package/src/components/Notification/NotificationPane.vue +3 -3
  58. package/src/components/Notification/Toaster.vue +1 -1
  59. package/src/components/PageHeader/PageHeader.vue +2 -2
  60. package/src/components/Popover/Popover.stories.ts +2 -2
  61. package/src/components/Popover/popover.ts +4 -3
  62. package/src/components/Progress/Progress.vue +1 -1
  63. package/src/components/RadioGroup/RadioGroup.vue +6 -6
  64. package/src/components/RelativeTime/RelativeTime.stories.ts +1 -1
  65. package/src/components/Select/Select.stories.ts +1 -1
  66. package/src/components/Select/Select.vue +22 -18
  67. package/src/components/SettingsRow/SettingsRow.vue +1 -1
  68. package/src/components/Sidebar/Sidebar.stories.ts +2 -2
  69. package/src/components/Sidebar/Sidebar.vue +9 -9
  70. package/src/components/Slideover/Slideover.stories.ts +5 -5
  71. package/src/components/Slideover/Slideover.vue +6 -6
  72. package/src/components/Spinner/Spinner.stories.ts +7 -7
  73. package/src/components/Spinner/Spinner.vue +1 -1
  74. package/src/components/StatTile/StatTile.stories.ts +2 -2
  75. package/src/components/StatTile/StatTile.vue +6 -6
  76. package/src/components/Steps/Steps.vue +2 -2
  77. package/src/components/SummaryList/SummaryList.vue +8 -8
  78. package/src/components/Switch/Switch.vue +3 -3
  79. package/src/components/Table/Table.vue +12 -12
  80. package/src/components/Tabs/Tabs.vue +4 -4
  81. package/src/components/Tooltip/Tooltip.stories.ts +1 -1
  82. package/src/components/Tooltip/Tooltip.vue +1 -1
  83. package/src/components/UnsavedChangesBar/UnsavedChangesBar.stories.ts +1 -1
  84. package/src/components/UnsavedChangesBar/UnsavedChangesBar.vue +1 -1
  85. package/src/examples/AppPages.stories.ts +3 -3
  86. package/src/examples/FormLayout.stories.ts +3 -3
  87. package/src/examples/KestonIdPages.stories.ts +18 -18
  88. package/src/examples/SchoolPages.stories.ts +5 -5
  89. package/src/styles/theme.css +94 -5
@@ -70,7 +70,7 @@ const tone = computed(() => {
70
70
  return 'neutral'
71
71
  })
72
72
 
73
- const toneClasses = { positive: 'text-green', negative: 'text-red', neutral: 'text-black/65' } as const
73
+ const toneClasses = { positive: 'text-green-fg', negative: 'text-red-fg', neutral: 'text-ink/65' } as const
74
74
  const trendIcon = computed(() =>
75
75
  props.trend === 'up' ? ArrowUpRight : props.trend === 'down' ? ArrowDownRight : props.trend === 'flat' ? ArrowRight : undefined
76
76
  )
@@ -90,16 +90,16 @@ const trendWords = computed(() => ({ up: t('ui.statTile.up'), down: t('ui.statTi
90
90
  :class="
91
91
  cn(
92
92
  isLink &&
93
- 'relative h-full transition-[border-color,box-shadow,background-color] duration-150 motion-reduce:transition-none group-hover:border-black/40 group-hover:shadow-md group-active:bg-black/1',
93
+ 'relative h-full transition-[border-color,box-shadow,background-color] duration-150 motion-reduce:transition-none group-hover:border-ink/20 group-hover:shadow-sm group-active:bg-surface-hover',
94
94
  props.class
95
95
  )
96
96
  "
97
97
  :ui="{ body: 'gap-1' }"
98
98
  >
99
99
  <!-- Still, decorative: the link role is what screen readers get. -->
100
- <ArrowUpRight v-if="isLink" class="absolute end-4 top-4 size-4 text-black/65" aria-hidden="true" />
100
+ <ArrowUpRight v-if="isLink" class="absolute end-4 top-4 size-4 text-ink/65" aria-hidden="true" />
101
101
 
102
- <p :class="cn('flex items-center gap-2 text-sm text-black/65', isLink && 'pe-6')">
102
+ <p :class="cn('flex items-center gap-2 text-sm text-ink/65', isLink && 'pe-6')">
103
103
  <component :is="icon" v-if="icon" class="size-4 shrink-0" aria-hidden="true" />
104
104
  {{ label }}
105
105
  </p>
@@ -112,11 +112,11 @@ const trendWords = computed(() => ({ up: t('ui.statTile.up'), down: t('ui.statTi
112
112
  <component :is="trendIcon" v-if="trendIcon" class="size-4 shrink-0" aria-hidden="true" />
113
113
  <span v-if="trend" class="sr-only">{{ trendWords[trend] }}</span>
114
114
  <span v-if="change" class="font-bold tabular-nums">{{ change }}</span>
115
- <span v-if="changeLabel" class="text-black/65">&nbsp;{{ changeLabel }}</span>
115
+ <span v-if="changeLabel" class="text-ink/65">&nbsp;{{ changeLabel }}</span>
116
116
  </p>
117
117
  </div>
118
118
 
119
- <p v-if="description || $slots.description" class="text-sm text-black/65">
119
+ <p v-if="description || $slots.description" class="text-sm text-ink/65">
120
120
  <slot name="description">{{ description }}</slot>
121
121
  </p>
122
122
 
@@ -26,11 +26,11 @@ const props = defineProps<StepsProps>()
26
26
 
27
27
  <template>
28
28
  <div :class="cn('flex flex-col gap-3', props.class)">
29
- <p class="text-sm text-black/65" aria-live="polite">
29
+ <p class="text-sm text-ink/65" aria-live="polite">
30
30
  <I18nT keypath="ui.steps.stepOfNamed" scope="global" tag="span">
31
31
  <template #current>{{ step + 1 }}</template>
32
32
  <template #total>{{ steps.length }}</template>
33
- <template #name><span class="text-black">{{ steps[step] }}</span></template>
33
+ <template #name><span class="text-ink">{{ steps[step] }}</span></template>
34
34
  </I18nT>
35
35
  </p>
36
36
  <Progress :label="label" segments :value="step + 1" :max="steps.length" />
@@ -61,7 +61,7 @@ const labelWidths = {
61
61
  </script>
62
62
 
63
63
  <template>
64
- <div :class="cn('@container text-sm text-black', props.class)">
64
+ <div :class="cn('@container text-sm text-ink', props.class)">
65
65
  <dl
66
66
  :class="
67
67
  cn(
@@ -78,18 +78,18 @@ const labelWidths = {
78
78
  :key="item.label"
79
79
  :class="
80
80
  cn(
81
- 'grid grid-cols-[1fr_auto] gap-x-4 gap-y-1 border-b border-black/15 py-3 first:pt-0 last:border-b-0 last:pb-0',
81
+ 'grid grid-cols-[1fr_auto] gap-x-4 gap-y-1 border-b border-ink/10 py-3 first:pt-0 last:border-b-0 last:pb-0',
82
82
  labelWidths[labelWidth]
83
83
  )
84
84
  "
85
85
  >
86
- <dt class="col-span-2 text-black/65 @sm:col-span-1">{{ item.label }}</dt>
86
+ <dt class="col-span-2 text-ink/65 @sm:col-span-1">{{ item.label }}</dt>
87
87
  <dd :class="cn('min-w-0 break-words', item.emphasis && 'font-bold', !$slots.action && 'col-span-2')">
88
88
  <slot name="value" :item="item" :index="index">
89
89
  <template v-if="!isEmpty(item.value)">{{ item.value }}</template>
90
- <template v-else><span class="text-black/40" aria-hidden="true">—</span><span class="sr-only">{{ emptyLabel ?? t('ui.summaryList.notSet') }}</span></template>
90
+ <template v-else><span class="text-ink/40" aria-hidden="true">—</span><span class="sr-only">{{ emptyLabel ?? t('ui.summaryList.notSet') }}</span></template>
91
91
  </slot>
92
- <span v-if="item.description" class="mt-0.5 block text-black/65">{{ item.description }}</span>
92
+ <span v-if="item.description" class="mt-0.5 block text-ink/65">{{ item.description }}</span>
93
93
  </dd>
94
94
  <dd v-if="$slots.action" class="justify-self-end">
95
95
  <slot name="action" :item="item" :index="index" />
@@ -104,7 +104,7 @@ const labelWidths = {
104
104
  :key="item.label"
105
105
  :class="layout === 'compact' ? 'col-span-2 grid grid-cols-subgrid items-baseline' : 'flex min-w-0 flex-col gap-1'"
106
106
  >
107
- <dt class="text-black/65">{{ item.label }}</dt>
107
+ <dt class="text-ink/65">{{ item.label }}</dt>
108
108
  <dd
109
109
  :class="
110
110
  cn(
@@ -116,9 +116,9 @@ const labelWidths = {
116
116
  >
117
117
  <slot name="value" :item="item" :index="index">
118
118
  <template v-if="!isEmpty(item.value)">{{ item.value }}</template>
119
- <template v-else><span class="text-black/40" aria-hidden="true">—</span><span class="sr-only">{{ emptyLabel ?? t('ui.summaryList.notSet') }}</span></template>
119
+ <template v-else><span class="text-ink/40" aria-hidden="true">—</span><span class="sr-only">{{ emptyLabel ?? t('ui.summaryList.notSet') }}</span></template>
120
120
  </slot>
121
- <span v-if="item.description" class="mt-0.5 block font-normal text-black/65">{{ item.description }}</span>
121
+ <span v-if="item.description" class="mt-0.5 block font-normal text-ink/65">{{ item.description }}</span>
122
122
  <span v-if="$slots.action" class="mt-1 block font-normal"><slot name="action" :item="item" :index="index" /></span>
123
123
  </dd>
124
124
  </div>
@@ -62,7 +62,7 @@ function pressControl(event: MouseEvent, id: string) {
62
62
  // 16px. Off is a mid grey, dark enough to see against the page.
63
63
  const track = [
64
64
  'inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full p-0.5 transition-colors',
65
- 'bg-black/45 not-disabled:hover:bg-black/55 data-[state=checked]:bg-primary data-[state=checked]:hover:bg-primary',
65
+ 'bg-ink/45 not-disabled:hover:bg-ink/55 data-[state=checked]:bg-primary data-[state=checked]:hover:bg-primary',
66
66
  'disabled:cursor-not-allowed',
67
67
  'outline-2 outline-offset-2 outline-transparent focus-visible:outline-focus'
68
68
  ]
@@ -70,7 +70,7 @@ const thumb = 'size-4 rounded-full bg-white shadow-sm transition-transform data-
70
70
  </script>
71
71
 
72
72
  <template>
73
- <div :class="cn('flex flex-col gap-1.5 text-black', disabled && 'opacity-40', props.class)">
73
+ <div :class="cn('flex flex-col gap-1.5 text-ink', disabled && 'opacity-40', props.class)">
74
74
  <div class="flex items-start gap-2">
75
75
  <SwitchRoot
76
76
  :id="controlId"
@@ -88,7 +88,7 @@ const thumb = 'size-4 rounded-full bg-white shadow-sm transition-transform data-
88
88
  @click="pressControl($event, controlId)"
89
89
  >
90
90
  <label :for="controlId" :class="cn('text-sm', disabled ? 'cursor-not-allowed' : 'cursor-pointer')">{{ label }}</label>
91
- <p v-if="description" :id="descriptionId" class="text-xs text-black/65">
91
+ <p v-if="description" :id="descriptionId" class="text-xs text-ink/65">
92
92
  {{ description }}
93
93
  </p>
94
94
  </div>
@@ -175,7 +175,7 @@ const rowLinkClass = [
175
175
  'focus-visible:after:outline-focus forced-colors:not-focus-visible:after:outline-0'
176
176
  ]
177
177
  const linkedRowClass = [
178
- 'cursor-pointer hover:bg-black/5 has-[[data-row-link]:focus-visible]:bg-black/5',
178
+ 'cursor-pointer hover:bg-hover has-[[data-row-link]:focus-visible]:bg-hover',
179
179
  '[&_:is(a,button,input,select,textarea,label,[tabindex]):not([data-row-link],[data-row-overlay])]:relative',
180
180
  '[&_:is(a,button,input,select,textarea,label,[tabindex]):not([data-row-link],[data-row-overlay])]:z-1'
181
181
  ]
@@ -228,19 +228,19 @@ onBeforeUnmount(() => observer?.disconnect())
228
228
  :aria-label="scrolls && !caption && !$slots.caption ? t('ui.table.table') : undefined"
229
229
  >
230
230
  <table
231
- :class="cn('w-full border-separate border-spacing-0 text-left text-sm text-black', ui?.table)"
231
+ :class="cn('w-full border-separate border-spacing-0 text-left text-sm text-ink', ui?.table)"
232
232
  :aria-busy="loading || undefined"
233
233
  >
234
234
  <caption v-if="caption || $slots.caption" :id="captionId" :class="showCaption ? cn('px-4 pt-4 pb-2 text-left text-base font-bold', inset && 'sm:px-6') : 'sr-only'">
235
235
  <slot name="caption">{{ caption }}</slot>
236
236
  </caption>
237
237
 
238
- <thead :class="cn(stickyHeader && 'sticky top-0 z-10 bg-white', ui?.header)">
238
+ <thead :class="cn(stickyHeader && 'sticky top-0 z-10 bg-surface', ui?.header)">
239
239
  <tr>
240
240
  <th
241
241
  v-if="selectable"
242
242
  scope="col"
243
- :class="cn('border-b border-black/15', cellPadding, selectableKeys.length && selectCell)"
243
+ :class="cn('border-b border-ink/10', cellPadding, selectableKeys.length && selectCell)"
244
244
  @click="onCellPress($event, () => selectableKeys.length && setAll(allState !== true))"
245
245
  >
246
246
  <Checkbox
@@ -257,7 +257,7 @@ onBeforeUnmount(() => observer?.disconnect())
257
257
  :key="column.key"
258
258
  scope="col"
259
259
  :aria-sort="ariaSort(column)"
260
- :class="cn('border-b border-black/15 font-bold text-black/65', cellPadding, columnClasses(column))"
260
+ :class="cn('border-b border-ink/10 font-bold text-ink/65', cellPadding, columnClasses(column))"
261
261
  >
262
262
  <slot :name="`header-${column.key}`" :column="column">
263
263
  <span v-if="column.hideLabel" class="sr-only">{{ column.label }}</span>
@@ -266,9 +266,9 @@ onBeforeUnmount(() => observer?.disconnect())
266
266
  type="button"
267
267
  :class="
268
268
  cn(
269
- '-mx-1 inline-flex cursor-pointer items-center gap-1 rounded px-1 font-bold hover:text-black',
269
+ '-mx-1 inline-flex cursor-pointer items-center gap-1 rounded px-1 font-bold hover:text-ink',
270
270
  column.align === 'end' && 'flex-row-reverse',
271
- sort?.key === column.key && 'text-black',
271
+ sort?.key === column.key && 'text-ink',
272
272
  focusRing
273
273
  )
274
274
  "
@@ -277,7 +277,7 @@ onBeforeUnmount(() => observer?.disconnect())
277
277
  {{ column.label }}
278
278
  <ArrowUp v-if="sort?.key === column.key && sort.direction === 'asc'" class="size-4 shrink-0" aria-hidden="true" />
279
279
  <ArrowDown v-else-if="sort?.key === column.key" class="size-4 shrink-0" aria-hidden="true" />
280
- <ChevronsUpDown v-else class="size-4 shrink-0 text-black/40" aria-hidden="true" />
280
+ <ChevronsUpDown v-else class="size-4 shrink-0 text-ink/40" aria-hidden="true" />
281
281
  </button>
282
282
  <template v-else>{{ column.label }}</template>
283
283
  </slot>
@@ -287,7 +287,7 @@ onBeforeUnmount(() => observer?.disconnect())
287
287
 
288
288
  <tbody :class="cn(loading && shownRows.length && 'opacity-50 transition-opacity')">
289
289
  <tr v-if="!shownRows.length">
290
- <td :colspan="colspan" class="px-4 py-8 text-center text-black/65">
290
+ <td :colspan="colspan" class="px-4 py-8 text-center text-ink/65">
291
291
  <span v-if="loading" class="inline-flex items-center gap-2">
292
292
  <Spinner size="sm" />
293
293
  Loading…
@@ -304,7 +304,7 @@ onBeforeUnmount(() => observer?.disconnect())
304
304
  >
305
305
  <td
306
306
  v-if="selectable"
307
- :class="cn('border-b border-black/15 align-middle', !inset && 'group-last/row:border-b-0', cellPadding, canSelect(row) && selectCell)"
307
+ :class="cn('border-b border-ink/10 align-middle', !inset && 'group-last/row:border-b-0', cellPadding, canSelect(row) && selectCell)"
308
308
  @click="canSelect(row) && onCellPress($event, () => setRow(row, index, !isSelected(row, index)))"
309
309
  >
310
310
  <Checkbox
@@ -322,7 +322,7 @@ onBeforeUnmount(() => observer?.disconnect())
322
322
  :scope="column.rowHeader ? 'row' : undefined"
323
323
  :class="
324
324
  cn(
325
- 'border-b border-black/15 align-middle', !inset && 'group-last/row:border-b-0',
325
+ 'border-b border-ink/10 align-middle', !inset && 'group-last/row:border-b-0',
326
326
  column.rowHeader ? 'font-bold' : 'font-normal',
327
327
  column.align === 'end' && 'tabular-nums',
328
328
  cellPadding,
@@ -368,7 +368,7 @@ onBeforeUnmount(() => observer?.disconnect())
368
368
  v-if="$slots.footer"
369
369
  :class="
370
370
  cn(
371
- 'font-bold *:*:border-t *:*:border-black/15',
371
+ 'font-bold *:*:border-t *:*:border-ink/10',
372
372
  size === 'sm' ? '*:*:px-4 *:*:py-2' : '*:*:px-4 *:*:py-3',
373
373
  inset && '*:*:sm:first:pl-6 *:*:sm:last:pr-6'
374
374
  )
@@ -35,10 +35,10 @@ defineSlots<Record<string, () => unknown>>()
35
35
  // Like Sidebar's items: muted until hovered or chosen; the chosen one is
36
36
  // primary, with a bar under it that slides between tabs.
37
37
  const trigger = [
38
- 'relative inline-flex h-10 items-center gap-2 px-3 text-sm whitespace-nowrap text-black/65 outline-none',
38
+ 'relative inline-flex h-10 items-center gap-2 px-3 text-sm whitespace-nowrap text-ink/65 outline-none',
39
39
  '[&_svg]:size-4 [&_svg]:shrink-0',
40
- 'not-data-disabled:hover:text-black',
41
- 'data-[state=active]:font-bold data-[state=active]:text-primary',
40
+ 'not-data-disabled:hover:text-ink',
41
+ 'data-[state=active]:font-bold data-[state=active]:text-primary-fg',
42
42
  'focus-visible:rounded focus-visible:ring-2 focus-visible:ring-primary',
43
43
  'data-disabled:cursor-not-allowed data-disabled:opacity-40'
44
44
  ]
@@ -51,7 +51,7 @@ const trigger = [
51
51
  @update:model-value="model = String($event)"
52
52
  >
53
53
  <!-- Scrolls sideways on narrow screens rather than wrapping. -->
54
- <TabsList :aria-label="label" class="relative flex overflow-x-auto overflow-y-hidden border-b border-black/15">
54
+ <TabsList :aria-label="label" class="relative flex overflow-x-auto overflow-y-hidden border-b border-ink/10">
55
55
  <TabsTrigger v-for="t in tabs" :key="t.value" :value="t.value" :disabled="t.disabled" :class="trigger">
56
56
  <component :is="t.icon" v-if="t.icon" aria-hidden="true" />
57
57
  {{ t.label }}
@@ -50,7 +50,7 @@ export const OnText: Story = {
50
50
  <p class="text-sm">
51
51
  Fees are due by the
52
52
  <Tooltip text="Usually the first school day of each term">
53
- <span tabindex="0" class="underline decoration-black/40 decoration-dotted underline-offset-2 outline-focus focus-visible:outline-2">start of term</span>
53
+ <span tabindex="0" class="underline decoration-ink/40 decoration-dotted underline-offset-2 outline-focus focus-visible:outline-2">start of term</span>
54
54
  </Tooltip>.
55
55
  </p>`,
56
56
  }),
@@ -72,7 +72,7 @@ const MaybeProvider: FunctionalComponent = (_, { slots }) =>
72
72
  :collision-padding="8"
73
73
  :class="
74
74
  cn(
75
- 'z-100 max-w-72 rounded-md bg-gray-900 px-2.5 py-1.5 text-xs/4 font-medium text-white shadow-lg ring-1 ring-white/10',
75
+ 'z-100 max-w-72 rounded-md bg-neutral-900 dark:bg-neutral-700 px-2.5 py-1.5 text-xs/4 font-medium text-white shadow-lg ring-1 ring-white/10',
76
76
  'data-[state=closed]:animate-fade-out data-[state=delayed-open]:animate-fade-in data-[state=instant-open]:animate-fade-in',
77
77
  props.class
78
78
  )
@@ -46,7 +46,7 @@ export const SlidesInAndOut: Story = {
46
46
  <div class="flex flex-col items-start gap-4 p-6">
47
47
  <p class="text-sm">The bar leaves a gap at the end of the page, so nothing is covered.</p>
48
48
  <Button variant="primary" @click="open = true">Make a change</Button>
49
- <div class="h-[60vh] w-full rounded-lg bg-surface" />
49
+ <div class="h-[60vh] w-full rounded-lg bg-surface-muted" />
50
50
  <p class="text-sm">Last line of the page.</p>
51
51
  <UnsavedChangesBar :open="open" :status="status" @discard="open = false" @save="save" />
52
52
  </div>`,
@@ -69,7 +69,7 @@ const saving = computed(() => props.status === 'loading')
69
69
  :class="cn('fixed inset-x-0 bottom-0 z-40 flex justify-center px-4 pb-4 pointer-events-none', props.class)"
70
70
  >
71
71
  <div
72
- class="pointer-events-auto flex w-full max-w-2xl items-center justify-between gap-3 rounded-lg border border-black/15 bg-white p-3 pl-4 shadow-lg"
72
+ class="pointer-events-auto flex w-full max-w-2xl items-center justify-between gap-3 rounded-lg border border-ink/10 bg-surface-elevated p-3 pl-4 shadow-lg"
73
73
  >
74
74
  <p role="status" class="flex items-center gap-2 text-sm font-bold">
75
75
  <span aria-hidden="true" class="size-2 shrink-0 rounded-full bg-yellow" />
@@ -106,7 +106,7 @@ const pageTemplate = `
106
106
 
107
107
  <Card padding="none">
108
108
  <Table :columns="columns" :rows="rows" row-key="name" :caption="current">
109
- <template #cell-date="{ value }"><span class="text-black/65">{{ value }}</span></template>
109
+ <template #cell-date="{ value }"><span class="text-ink/65">{{ value }}</span></template>
110
110
  <template #cell-status="{ row }"><Badge :color="row.color" size="sm">{{ row.status }}</Badge></template>
111
111
  </Table>
112
112
  </Card>
@@ -416,7 +416,7 @@ export const NewSchoolYearSetup: Story = {
416
416
  Start new year
417
417
  </Button>
418
418
  </template>
419
- <p v-if="checked && errorCount" role="alert" class="text-sm text-red">
419
+ <p v-if="checked && errorCount" role="alert" class="text-sm text-red-fg">
420
420
  {{ errorCount === 1 ? 'There is 1 thing' : 'There are ' + errorCount + ' things' }} to fix before the new year can start.
421
421
  </p>
422
422
  </PageHeader>
@@ -487,7 +487,7 @@ export const NewSchoolYearSetup: Story = {
487
487
  <Divider />
488
488
  <div class="flex flex-col gap-2">
489
489
  <h3 class="text-sm font-bold">Sign-off</h3>
490
- <p class="text-sm text-black/65">Starting the year needs one of these people.</p>
490
+ <p class="text-sm text-ink/65">Starting the year needs one of these people.</p>
491
491
  <AvatarGroup :users="signOff" size="sm" label="People who can sign off" />
492
492
  </div>
493
493
  </Card>
@@ -97,10 +97,10 @@ export const AddStudent: Story = {
97
97
  return { form, errors, errorCount, status, formEl, todayIso, check, recheck, submit, reset };
98
98
  },
99
99
  template: `
100
- <form ref="formEl" novalidate class="flex max-w-md flex-col gap-5 text-black" @submit.prevent="submit">
100
+ <form ref="formEl" novalidate class="flex max-w-md flex-col gap-5 text-ink" @submit.prevent="submit">
101
101
  <div>
102
102
  <h2 class="text-lg">Add student</h2>
103
- <p class="text-sm text-black/65">Fields check themselves when you leave them. Try "Create student" with the form empty.</p>
103
+ <p class="text-sm text-ink/65">Fields check themselves when you leave them. Try "Create student" with the form empty.</p>
104
104
  </div>
105
105
 
106
106
  <div class="grid grid-cols-2 items-start gap-3">
@@ -167,7 +167,7 @@ export const AddStudent: Story = {
167
167
  <template #leading><IdCard /></template>
168
168
  </Input>
169
169
 
170
- <div class="flex justify-end gap-2 border-t border-black/15 pt-4">
170
+ <div class="flex justify-end gap-2 border-t border-ink/10 pt-4">
171
171
  <Button @click="reset">Reset</Button>
172
172
  <Button
173
173
  v-model:status="status"
@@ -102,12 +102,12 @@ const appState = () => ({
102
102
  // logo: swap it for the SVG when there is one.
103
103
  const brands = {
104
104
  tkg: `
105
- <div class="flex items-center justify-center gap-2 text-primary">
105
+ <div class="flex items-center justify-center gap-2 text-primary-fg">
106
106
  <span class="flex size-8 items-center justify-center rounded bg-primary text-xs font-bold text-white" aria-hidden="true">TKG</span>
107
107
  <span class="text-lg font-bold">The Keston Group</span>
108
108
  </div>`,
109
109
  kestonId: `
110
- <div class="flex items-center justify-center gap-2 text-primary">
110
+ <div class="flex items-center justify-center gap-2 text-primary-fg">
111
111
  <ShieldCheck class="size-6" aria-hidden="true" />
112
112
  <span class="text-lg font-bold">Keston ID</span>
113
113
  </div>`,
@@ -116,11 +116,11 @@ const brands = {
116
116
  // Every Keston ID page: a narrow column centred on the grey background, with
117
117
  // the branding above the card.
118
118
  const page = (body: string, brand: keyof typeof brands = "kestonId") => `
119
- <div class="flex min-h-screen flex-col items-center bg-background px-4 py-12 text-black">
119
+ <div class="flex min-h-screen flex-col items-center bg-background px-4 py-12 text-ink">
120
120
  <div class="flex w-full max-w-100 flex-col gap-6">
121
121
  ${brands[brand]}
122
122
  ${body}
123
- <nav aria-label="Legal and help" class="flex items-center justify-center gap-2 text-xs text-black/65">
123
+ <nav aria-label="Legal and help" class="flex items-center justify-center gap-2 text-xs text-ink/65">
124
124
  <Link href="#" new-tab class="py-1">Privacy</Link>
125
125
  <span aria-hidden="true">·</span>
126
126
  <Link href="#" new-tab class="py-1">Terms</Link>
@@ -150,7 +150,7 @@ const appName = (headingId: string) => `
150
150
  <button
151
151
  type="button"
152
152
  :aria-label="mark.label"
153
- :class="client.verification === 'owned' ? 'text-kblue' : 'text-blue'"
153
+ :class="client.verification === 'owned' ? 'text-kblue' : 'text-blue-fg'"
154
154
  class="flex cursor-pointer rounded-full outline-2 outline-offset-1 outline-transparent focus-visible:outline-focus"
155
155
  >
156
156
  <BadgeCheck class="size-5" aria-hidden="true" />
@@ -202,14 +202,14 @@ const consentCard = `
202
202
  <div class="flex flex-col gap-6">
203
203
  <div class="flex items-center justify-center gap-3" aria-hidden="true">
204
204
  <Avatar :user="app" size="lg" decorative />
205
- <ArrowLeftRight class="size-5 text-black/55" />
205
+ <ArrowLeftRight class="size-5 text-ink/55" />
206
206
  <Avatar :user="user" size="lg" decorative />
207
207
  </div>
208
208
 
209
209
  <div class="flex flex-col gap-1 text-center">
210
210
  ${appName("consent-heading")}
211
211
  <p class="text-base">wants to access your Keston account</p>
212
- <p class="text-sm text-black/65">An app by {{ client.publisher }}</p>
212
+ <p class="text-sm text-ink/65">An app by {{ client.publisher }}</p>
213
213
  </div>
214
214
 
215
215
  <!-- Who's signed in, as a small Card in a row. -->
@@ -218,7 +218,7 @@ const consentCard = `
218
218
  <Avatar :user="user" size="sm" decorative />
219
219
  <div class="flex min-w-0 flex-col">
220
220
  <span class="truncate text-sm font-bold">{{ user.name }}</span>
221
- <span class="truncate text-xs text-black/65">{{ user.email }}</span>
221
+ <span class="truncate text-xs text-ink/65">{{ user.email }}</span>
222
222
  </div>
223
223
  </div>
224
224
  <Button size="sm" class="shrink-0">Switch account</Button>
@@ -228,10 +228,10 @@ const consentCard = `
228
228
  <h2 class="text-sm font-bold">This will let {{ client.name }}:</h2>
229
229
  <ul class="flex flex-col gap-3">
230
230
  <li v-for="scope in required" :key="scope.id" class="flex items-start gap-3">
231
- <component :is="scope.icon" class="mt-0.5 size-4 shrink-0 text-black/65" aria-hidden="true" />
231
+ <component :is="scope.icon" class="mt-0.5 size-4 shrink-0 text-ink/65" aria-hidden="true" />
232
232
  <div class="flex flex-col gap-0.5">
233
233
  <span class="text-sm">{{ scope.label }}</span>
234
- <span class="text-xs text-black/65">{{ scope.description }}</span>
234
+ <span class="text-xs text-ink/65">{{ scope.description }}</span>
235
235
  </div>
236
236
  </li>
237
237
  </ul>
@@ -250,8 +250,8 @@ const consentCard = `
250
250
 
251
251
  <Divider />
252
252
 
253
- <p class="text-xs text-black/65">
254
- You'll be sent to <span class="font-bold text-black">{{ client.redirectHost }}</span>.
253
+ <p class="text-xs text-ink/65">
254
+ You'll be sent to <span class="font-bold text-ink">{{ client.redirectHost }}</span>.
255
255
  Make sure you trust {{ client.name }}: read its
256
256
  <Link href="#" new-tab>privacy policy</Link>
257
257
  and
@@ -266,7 +266,7 @@ const consentCard = `
266
266
  </Button>
267
267
  </div>
268
268
 
269
- <p v-if="result" class="break-all rounded bg-surface px-3 py-2 font-mono text-xs" role="status">{{ result }}</p>
269
+ <p v-if="result" class="break-all rounded bg-surface-muted px-3 py-2 font-mono text-xs" role="status">{{ result }}</p>
270
270
  </div>
271
271
  </Card>`;
272
272
 
@@ -315,7 +315,7 @@ export const SignIn: Story = {
315
315
  <div class="flex flex-col gap-1 text-center">
316
316
  ${appName("sign-in-heading")}
317
317
  <p class="text-base">Sign in with your Keston account</p>
318
- <p class="text-sm text-black/65">An app by {{ client.publisher }}</p>
318
+ <p class="text-sm text-ink/65">An app by {{ client.publisher }}</p>
319
319
  </div>
320
320
 
321
321
  <form class="flex flex-col gap-4" @submit.prevent="signIn">
@@ -327,7 +327,7 @@ export const SignIn: Story = {
327
327
  <InputPassword v-model="form.password" label="Password" :error-text="error">
328
328
  <template #leading><Lock /></template>
329
329
  <template #label-trailing>
330
- <Link href="#" class="text-black/65">Forgot password?</Link>
330
+ <Link href="#" class="text-ink/65">Forgot password?</Link>
331
331
  </template>
332
332
  </InputPassword>
333
333
  <Button type="submit" variant="primary" :status="status" loading-text="Signing in" success-text="Signed in">
@@ -338,7 +338,7 @@ export const SignIn: Story = {
338
338
  <Button>Sign in with a passkey</Button>
339
339
  </div>
340
340
  <template #footer>
341
- <p class="text-center text-xs text-black/65">
341
+ <p class="text-center text-xs text-ink/65">
342
342
  By signing in, you agree to our <Link href="#" new-tab>terms</Link>
343
343
  and <Link href="#" new-tab>privacy policy</Link>.
344
344
  </p>
@@ -392,8 +392,8 @@ export const TwoStepCode: Story = {
392
392
  <Button type="submit" variant="primary" :disabled="status === 'loading'">Continue</Button>
393
393
  </form>
394
394
  <template #footer>
395
- <Link href="#" class="py-1 text-xs text-black/65">Use a backup code</Link>
396
- <Link href="#" class="py-1 text-xs text-black/65">Email me a code</Link>
395
+ <Link href="#" class="py-1 text-xs text-ink/65">Use a backup code</Link>
396
+ <Link href="#" class="py-1 text-xs text-ink/65">Email me a code</Link>
397
397
  </template>
398
398
  </Card>`, "tkg"),
399
399
  }),
@@ -199,7 +199,7 @@ export const StudentRecord: Story = {
199
199
  <div class="grid grid-cols-1 gap-6 @lg:grid-cols-3">
200
200
  <StatTile label="Attendance" value="96.4%" change="+1.2%" change-label="on last term" trend="up">
201
201
  <template #footer>
202
- <span class="flex items-center gap-1 text-xs text-black/65">
202
+ <span class="flex items-center gap-1 text-xs text-ink/65">
203
203
  This term
204
204
  <InfoTip label="About attendance" text="Sessions attended as a share of possible sessions. Authorised absences count against it." />
205
205
  </span>
@@ -236,7 +236,7 @@ export const StudentRecord: Story = {
236
236
  {{ contact.name }}
237
237
  <Badge v-if="contact.primary" size="sm">Primary</Badge>
238
238
  </span>
239
- <span class="text-xs text-black/65">{{ contact.relation }}</span>
239
+ <span class="text-xs text-ink/65">{{ contact.relation }}</span>
240
240
  </div>
241
241
  </div>
242
242
  <div class="flex flex-wrap gap-2">
@@ -251,7 +251,7 @@ export const StudentRecord: Story = {
251
251
  <ul class="flex flex-col gap-3 text-sm">
252
252
  <li v-for="item in activity" :key="item.text" class="flex flex-col gap-0.5">
253
253
  <span>{{ item.text }}</span>
254
- <span class="text-xs text-black/65">{{ item.by }} · <RelativeTime :date="item.at" :now="now" /></span>
254
+ <span class="text-xs text-ink/65">{{ item.by }} · <RelativeTime :date="item.at" :now="now" /></span>
255
255
  </li>
256
256
  </ul>
257
257
  </Card>
@@ -420,7 +420,7 @@ export const ApplicationReview: Story = {
420
420
 
421
421
  <Card padding="none">
422
422
  <Table v-model:sort="sort" :columns="columns" :rows="applications" row-key="id" caption="Applications">
423
- <template #cell-submitted="{ row }"><span class="text-black/65"><RelativeTime :date="row.submitted" :now="now" /></span></template>
423
+ <template #cell-submitted="{ row }"><span class="text-ink/65"><RelativeTime :date="row.submitted" :now="now" /></span></template>
424
424
  <template #cell-status="{ row }"><Badge :color="statusColour[row.status]" size="sm">{{ row.status }}</Badge></template>
425
425
  <template #cell-review="{ row }">
426
426
  <Button size="sm" :aria-label="'Review ' + row.name" @click="review(row)">Review</Button>
@@ -547,7 +547,7 @@ export const InterviewBooking: Story = {
547
547
  </Card>
548
548
 
549
549
  <Card :title="dayLabel ? 'Times on ' + dayLabel : 'Times'">
550
- <p v-if="weekend" class="text-sm text-black/65">No interviews at weekends. Choose a weekday.</p>
550
+ <p v-if="weekend" class="text-sm text-ink/65">No interviews at weekends. Choose a weekday.</p>
551
551
  <template v-else>
552
552
  <RadioGroup v-model="slot" label="Time" :options="slots" :error-text="slotError" />
553
553
  <Select v-model="interviewer" label="Interviewer" :options="interviewers" placeholder="Choose…" :error-text="interviewerError" />