rei-kit 0.17.2 → 0.18.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/README.md +8 -8
- package/dist/index.js +1 -1
- package/dist/styles.css +236 -0
- package/dist/web/BaseBreadcrumb.vue.d.ts +26 -0
- package/dist/web/BaseDisclosure.vue.d.ts +59 -0
- package/dist/web/BasePagination.vue.d.ts +43 -0
- package/dist/web/BaseTabs.vue.d.ts +37 -0
- package/dist/web/BaseTooltip.vue.d.ts +45 -0
- package/dist/web/index.d.ts +21 -10
- package/dist/web.js +310 -21
- package/dist/web.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -44,14 +44,14 @@ the app, and not a matter of taste.
|
|
|
44
44
|
|
|
45
45
|
## Status
|
|
46
46
|
|
|
47
|
-
**v0.
|
|
48
|
-
|
|
49
|
-
| |
|
|
50
|
-
| ------------ |
|
|
51
|
-
| Components |
|
|
52
|
-
| Composables | 14 (`useToast`, `useTheme`, `useToday`, `useMediaQuery`, `useInstall`, `watchInstallability`, `createTabTransition`, `useThemeSync`, `useVisualViewport`, etc.)
|
|
53
|
-
| Utilities | 27 (`applyTheme`, `formatDate`, `fieldErrors`, `toAuthMessageKey`, `createAuthGuard`, `createQueryDefaults`, `createWriteReport`, `toRedirectPath`, `Supabase error mapper`, i18n runtime, etc.)
|
|
54
|
-
| Entry Points | `rei-kit`, `rei-kit/app`, `rei-kit/web`, `rei-kit/pwa`, `rei-kit/shell/mobile.css`, `rei-kit/shell/web.css`
|
|
47
|
+
**v0.18.0 — three consumers.**
|
|
48
|
+
|
|
49
|
+
| | |
|
|
50
|
+
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
51
|
+
| Components | 42 (`AuthForm`, `TabShell`, `BaseModal`, `BaseTabs`, `BaseTooltip`, `BasePagination`, `BaseBreadcrumb`, `BaseDisclosure`, `BaseAccordion`, `NavLinks`, `OfflineBanner`, `FabButton`, `BaseButton`, `BaseCard`, `BaseInput`, `BaseSelect`, `BaseTextarea`, `BaseCheckbox`, `BaseRadioGroup`, `BaseAlert`, `BaseBadge`, `BaseSheet`, `ProgressBar`, `PriceCard`, `ToastHost`, `TabBar`, `GoogleButton`, `LocaleLinks`, `LocaleSheet`, `AuthShell`, `TourShell`, `InstallPrompt`, `UpdatePrompt`, `InstallSettings`, `SkeletonList`, `PageContainer`, `ErrorBoundary`, etc.) |
|
|
52
|
+
| Composables | 14 (`useToast`, `useTheme`, `useToday`, `useMediaQuery`, `useInstall`, `watchInstallability`, `createTabTransition`, `useThemeSync`, `useVisualViewport`, etc.) |
|
|
53
|
+
| Utilities | 27 (`applyTheme`, `formatDate`, `fieldErrors`, `toAuthMessageKey`, `createAuthGuard`, `createQueryDefaults`, `createWriteReport`, `toRedirectPath`, `Supabase error mapper`, i18n runtime, etc.) |
|
|
54
|
+
| Entry Points | `rei-kit`, `rei-kit/app`, `rei-kit/web`, `rei-kit/pwa`, `rei-kit/shell/mobile.css`, `rei-kit/shell/web.css` |
|
|
55
55
|
|
|
56
56
|
| | |
|
|
57
57
|
| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
package/dist/index.js
CHANGED
|
@@ -1342,7 +1342,7 @@ function createI18nRuntime(options) {
|
|
|
1342
1342
|
*
|
|
1343
1343
|
* The fallback keeps `vitest` and `vite dev` honest, where no define runs.
|
|
1344
1344
|
*/
|
|
1345
|
-
var VERSION = "0.
|
|
1345
|
+
var VERSION = "0.18.0";
|
|
1346
1346
|
//#endregion
|
|
1347
1347
|
export { AppError, BaseAlert_default as BaseAlert, BaseBadge_default as BaseBadge, BaseButton_default as BaseButton, BaseCard_default as BaseCard, BaseCheckbox_default as BaseCheckbox, BaseInput_default as BaseInput, BaseRadioGroup_default as BaseRadioGroup, BaseSelect_default as BaseSelect, BaseSheet_default as BaseSheet, BaseTextarea_default as BaseTextarea, EmptyState_default as EmptyState, ErrorBoundary_default as ErrorBoundary, FormField_default as FormField, GoogleButton_default as GoogleButton, LocaleLinks_default as LocaleLinks, PageContainer_default as PageContainer, PageHeader_default as PageHeader, PriceCard_default as PriceCard, ProgressBar_default as ProgressBar, SectionHeading_default as SectionHeading, SegmentedControl_default as SegmentedControl, SettingsGroup_default as SettingsGroup, SettingsRow_default as SettingsRow, SkeletonList_default as SkeletonList, StatCard_default as StatCard, TabBar_default as TabBar, ToastHost_default as ToastHost, ToneDot_default as ToneDot, VERSION, addDays, applyTheme, createI18nRuntime, downloadJson, eachDayOfYear, formatDate, fromDateKey, isApplePortable, isInstalled, isThemePreference, lastNDays, leadingBlanks, needsIosInstall, readStoredTheme, registerErrorMapper, relativeDayLabel, safeRedirect, setFormatLocale, setThemeStorageKey, startOfWeek, tapFeedback, toAppError, toDateKey, toRedirectPath, todayKey, useDebouncedCallback, useDragScroll, useMediaQuery, useOnline, useTheme, useToast, useToday, useVisualViewport };
|
|
1348
1348
|
|
package/dist/styles.css
CHANGED
|
@@ -700,6 +700,115 @@
|
|
|
700
700
|
}
|
|
701
701
|
}
|
|
702
702
|
|
|
703
|
+
.rk-crumbs[data-v-85ee4b4e] {
|
|
704
|
+
display: flex;
|
|
705
|
+
flex-wrap: wrap;
|
|
706
|
+
align-items: center;
|
|
707
|
+
gap: 0.5rem;
|
|
708
|
+
font-size: 0.8125rem;
|
|
709
|
+
}
|
|
710
|
+
.rk-crumb[data-v-85ee4b4e] {
|
|
711
|
+
display: flex;
|
|
712
|
+
align-items: center;
|
|
713
|
+
gap: 0.5rem;
|
|
714
|
+
}
|
|
715
|
+
.rk-crumb-link[data-v-85ee4b4e] {
|
|
716
|
+
color: var(--color-ink-soft);
|
|
717
|
+
transition: color 150ms;
|
|
718
|
+
}
|
|
719
|
+
.rk-crumb-link[data-v-85ee4b4e]:hover {
|
|
720
|
+
color: var(--color-ink);
|
|
721
|
+
}
|
|
722
|
+
.rk-crumb-link[data-v-85ee4b4e]:focus-visible {
|
|
723
|
+
outline: 2px solid var(--color-primary);
|
|
724
|
+
outline-offset: 2px;
|
|
725
|
+
border-radius: 2px;
|
|
726
|
+
}
|
|
727
|
+
.rk-crumb-current[data-v-85ee4b4e] {
|
|
728
|
+
color: var(--color-ink);
|
|
729
|
+
font-weight: 500;
|
|
730
|
+
}
|
|
731
|
+
.rk-crumb-sep[data-v-85ee4b4e] {
|
|
732
|
+
color: var(--color-hair);
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
.rk-disclosure-control[data-v-fef7de4d] {
|
|
736
|
+
display: flex;
|
|
737
|
+
width: 100%;
|
|
738
|
+
cursor: pointer;
|
|
739
|
+
align-items: center;
|
|
740
|
+
justify-content: space-between;
|
|
741
|
+
gap: 1.5rem;
|
|
742
|
+
padding: 1.25rem 0;
|
|
743
|
+
text-align: left;
|
|
744
|
+
transition: color 150ms;
|
|
745
|
+
}
|
|
746
|
+
.rk-disclosure-control[data-v-fef7de4d]:hover {
|
|
747
|
+
color: var(--color-primary);
|
|
748
|
+
}
|
|
749
|
+
.rk-disclosure-control[data-v-fef7de4d]:focus-visible {
|
|
750
|
+
outline: 2px solid var(--color-primary);
|
|
751
|
+
outline-offset: 2px;
|
|
752
|
+
}
|
|
753
|
+
.rk-disclosure-title[data-v-fef7de4d] {
|
|
754
|
+
color: var(--color-ink);
|
|
755
|
+
font-size: 1rem;
|
|
756
|
+
font-weight: 500;
|
|
757
|
+
}
|
|
758
|
+
.rk-disclosure-mark[data-v-fef7de4d] {
|
|
759
|
+
position: relative;
|
|
760
|
+
display: grid;
|
|
761
|
+
place-items: center;
|
|
762
|
+
flex-shrink: 0;
|
|
763
|
+
width: 1.5rem;
|
|
764
|
+
height: 1.5rem;
|
|
765
|
+
}
|
|
766
|
+
.rk-disclosure-bar[data-v-fef7de4d] {
|
|
767
|
+
position: absolute;
|
|
768
|
+
height: 1px;
|
|
769
|
+
width: 0.875rem;
|
|
770
|
+
background: var(--color-ink-soft);
|
|
771
|
+
}
|
|
772
|
+
.rk-disclosure-turn[data-v-fef7de4d] {
|
|
773
|
+
transform: rotate(90deg);
|
|
774
|
+
transition: transform 420ms ease-out;
|
|
775
|
+
}
|
|
776
|
+
.rk-disclosure-turn.is-open[data-v-fef7de4d] {
|
|
777
|
+
transform: rotate(0deg);
|
|
778
|
+
}
|
|
779
|
+
|
|
780
|
+
/* 0fr to 1fr is the whole trick: a grid row can be animated to a height that
|
|
781
|
+
was never measured, which `height: auto` cannot do. */
|
|
782
|
+
.rk-disclosure-panel[data-v-fef7de4d] {
|
|
783
|
+
display: grid;
|
|
784
|
+
grid-template-rows: 0fr;
|
|
785
|
+
transition: grid-template-rows 420ms ease-out;
|
|
786
|
+
}
|
|
787
|
+
.rk-disclosure-panel.is-open[data-v-fef7de4d] {
|
|
788
|
+
grid-template-rows: 1fr;
|
|
789
|
+
}
|
|
790
|
+
.rk-disclosure-clip[data-v-fef7de4d] {
|
|
791
|
+
overflow: hidden;
|
|
792
|
+
}
|
|
793
|
+
.rk-disclosure-body[data-v-fef7de4d] {
|
|
794
|
+
max-width: 68ch;
|
|
795
|
+
padding-bottom: 1.5rem;
|
|
796
|
+
color: var(--color-ink-soft);
|
|
797
|
+
line-height: 1.625;
|
|
798
|
+
opacity: 0;
|
|
799
|
+
transition: opacity 300ms;
|
|
800
|
+
}
|
|
801
|
+
.rk-disclosure-body.is-open[data-v-fef7de4d] {
|
|
802
|
+
opacity: 1;
|
|
803
|
+
}
|
|
804
|
+
@media (prefers-reduced-motion: reduce) {
|
|
805
|
+
.rk-disclosure-panel[data-v-fef7de4d],
|
|
806
|
+
.rk-disclosure-turn[data-v-fef7de4d],
|
|
807
|
+
.rk-disclosure-body[data-v-fef7de4d] {
|
|
808
|
+
transition: none;
|
|
809
|
+
}
|
|
810
|
+
}
|
|
811
|
+
|
|
703
812
|
.rk-modal-scrim[data-v-e092f731] {
|
|
704
813
|
position: fixed;
|
|
705
814
|
inset: 0;
|
|
@@ -800,6 +909,133 @@
|
|
|
800
909
|
}
|
|
801
910
|
}
|
|
802
911
|
|
|
912
|
+
.rk-pager[data-v-cc4bbb58] {
|
|
913
|
+
display: flex;
|
|
914
|
+
align-items: center;
|
|
915
|
+
gap: 0.25rem;
|
|
916
|
+
}
|
|
917
|
+
.rk-pager-step[data-v-cc4bbb58],
|
|
918
|
+
.rk-pager-page[data-v-cc4bbb58] {
|
|
919
|
+
display: grid;
|
|
920
|
+
place-items: center;
|
|
921
|
+
min-width: 2rem;
|
|
922
|
+
height: 2rem;
|
|
923
|
+
padding: 0 0.5rem;
|
|
924
|
+
border-radius: var(--radius-cell);
|
|
925
|
+
font-size: 0.875rem;
|
|
926
|
+
color: var(--color-ink-soft);
|
|
927
|
+
transition:
|
|
928
|
+
background-color 150ms,
|
|
929
|
+
color 150ms;
|
|
930
|
+
}
|
|
931
|
+
.rk-pager-step[data-v-cc4bbb58]:hover:not(:disabled),
|
|
932
|
+
.rk-pager-page[data-v-cc4bbb58]:hover {
|
|
933
|
+
background: var(--color-muted);
|
|
934
|
+
color: var(--color-ink);
|
|
935
|
+
}
|
|
936
|
+
.rk-pager-step[data-v-cc4bbb58]:focus-visible,
|
|
937
|
+
.rk-pager-page[data-v-cc4bbb58]:focus-visible {
|
|
938
|
+
outline: 2px solid var(--color-primary);
|
|
939
|
+
outline-offset: 2px;
|
|
940
|
+
}
|
|
941
|
+
.rk-pager-step[data-v-cc4bbb58]:disabled {
|
|
942
|
+
opacity: 0.4;
|
|
943
|
+
pointer-events: none;
|
|
944
|
+
}
|
|
945
|
+
.rk-pager-page.is-active[data-v-cc4bbb58] {
|
|
946
|
+
background: var(--color-primary);
|
|
947
|
+
color: #fff;
|
|
948
|
+
font-weight: 500;
|
|
949
|
+
}
|
|
950
|
+
.rk-pager-gap[data-v-cc4bbb58] {
|
|
951
|
+
display: grid;
|
|
952
|
+
place-items: center;
|
|
953
|
+
min-width: 2rem;
|
|
954
|
+
height: 2rem;
|
|
955
|
+
color: var(--color-ink-soft);
|
|
956
|
+
}
|
|
957
|
+
|
|
958
|
+
.rk-tabs[data-v-b854e7f5] {
|
|
959
|
+
display: flex;
|
|
960
|
+
align-items: center;
|
|
961
|
+
gap: 0.25rem;
|
|
962
|
+
border-bottom: 1px solid color-mix(in srgb, var(--color-hair) 70%, transparent);
|
|
963
|
+
}
|
|
964
|
+
.rk-tab[data-v-b854e7f5] {
|
|
965
|
+
position: relative;
|
|
966
|
+
padding: 0.625rem 0.875rem;
|
|
967
|
+
font-size: 0.875rem;
|
|
968
|
+
color: var(--color-ink-soft);
|
|
969
|
+
transition: color 150ms;
|
|
970
|
+
}
|
|
971
|
+
.rk-tab[data-v-b854e7f5]:hover {
|
|
972
|
+
color: var(--color-ink);
|
|
973
|
+
}
|
|
974
|
+
.rk-tab[data-v-b854e7f5]:focus-visible {
|
|
975
|
+
outline: 2px solid var(--color-primary);
|
|
976
|
+
outline-offset: -2px;
|
|
977
|
+
border-radius: var(--radius-cell);
|
|
978
|
+
}
|
|
979
|
+
.rk-tab.is-active[data-v-b854e7f5] {
|
|
980
|
+
color: var(--color-ink);
|
|
981
|
+
font-weight: 500;
|
|
982
|
+
}
|
|
983
|
+
.rk-tab.is-active[data-v-b854e7f5]::after {
|
|
984
|
+
content: '';
|
|
985
|
+
position: absolute;
|
|
986
|
+
inset-inline: 0.5rem;
|
|
987
|
+
bottom: -1px;
|
|
988
|
+
height: 2px;
|
|
989
|
+
border-radius: 9999px;
|
|
990
|
+
background: var(--color-primary);
|
|
991
|
+
}
|
|
992
|
+
.rk-tabpanel[data-v-b854e7f5] {
|
|
993
|
+
padding-top: 1rem;
|
|
994
|
+
}
|
|
995
|
+
.rk-tabpanel[data-v-b854e7f5]:focus-visible {
|
|
996
|
+
outline: 2px solid var(--color-primary);
|
|
997
|
+
outline-offset: 2px;
|
|
998
|
+
}
|
|
999
|
+
|
|
1000
|
+
.rk-tip[data-v-3ed61bd4] {
|
|
1001
|
+
position: relative;
|
|
1002
|
+
display: inline-flex;
|
|
1003
|
+
}
|
|
1004
|
+
.rk-tip-bubble[data-v-3ed61bd4] {
|
|
1005
|
+
position: absolute;
|
|
1006
|
+
left: 50%;
|
|
1007
|
+
z-index: 60;
|
|
1008
|
+
width: max-content;
|
|
1009
|
+
max-width: 16rem;
|
|
1010
|
+
transform: translateX(-50%);
|
|
1011
|
+
border-radius: var(--radius-cell);
|
|
1012
|
+
background: var(--color-ink);
|
|
1013
|
+
padding: 0.375rem 0.5rem;
|
|
1014
|
+
font-size: 0.75rem;
|
|
1015
|
+
line-height: 1.4;
|
|
1016
|
+
color: var(--color-canvas);
|
|
1017
|
+
opacity: 0;
|
|
1018
|
+
/* Out of the hit area while hidden, or it would swallow the pointer on its
|
|
1019
|
+
way to the control it describes. */
|
|
1020
|
+
pointer-events: none;
|
|
1021
|
+
transition: opacity 150ms ease;
|
|
1022
|
+
}
|
|
1023
|
+
.rk-tip-bubble.is-top[data-v-3ed61bd4] {
|
|
1024
|
+
bottom: calc(100% + 0.375rem);
|
|
1025
|
+
}
|
|
1026
|
+
.rk-tip-bubble.is-bottom[data-v-3ed61bd4] {
|
|
1027
|
+
top: calc(100% + 0.375rem);
|
|
1028
|
+
}
|
|
1029
|
+
.rk-tip:hover .rk-tip-bubble[data-v-3ed61bd4],
|
|
1030
|
+
.rk-tip:focus-within .rk-tip-bubble[data-v-3ed61bd4] {
|
|
1031
|
+
opacity: 1;
|
|
1032
|
+
}
|
|
1033
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1034
|
+
.rk-tip-bubble[data-v-3ed61bd4] {
|
|
1035
|
+
transition: none;
|
|
1036
|
+
}
|
|
1037
|
+
}
|
|
1038
|
+
|
|
803
1039
|
/* The root carries no layout of its own, and that is the fix for a real bug
|
|
804
1040
|
rather than a style preference.
|
|
805
1041
|
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export interface Crumb {
|
|
2
|
+
/** Already translated. */
|
|
3
|
+
label: string;
|
|
4
|
+
/** Omitted for the current page, which is not a link to itself. */
|
|
5
|
+
to?: string | undefined;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Where this page sits, and the way back up.
|
|
9
|
+
*
|
|
10
|
+
* An ordered list inside a `nav`, because the order is the meaning. The last
|
|
11
|
+
* crumb is the current page and is deliberately not a link: a link to the page
|
|
12
|
+
* you are on is a control that does nothing, and `aria-current="page"` is what
|
|
13
|
+
* says so to everyone else.
|
|
14
|
+
*
|
|
15
|
+
* The separators are `aria-hidden`. A screen reader announces a list and its
|
|
16
|
+
* position in it; reading "slash" between every item is noise on top of
|
|
17
|
+
* information the reader already has.
|
|
18
|
+
*/
|
|
19
|
+
type __VLS_Props = {
|
|
20
|
+
items: readonly Crumb[];
|
|
21
|
+
/** Accessible name for the landmark. */
|
|
22
|
+
label?: string | undefined;
|
|
23
|
+
};
|
|
24
|
+
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
25
|
+
declare const _default: typeof __VLS_export;
|
|
26
|
+
export default _default;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One section that opens and closes.
|
|
3
|
+
*
|
|
4
|
+
* `BaseAccordion` is a list of these with the rule that only one stays open.
|
|
5
|
+
* This is the same row on its own, for the common case where the list belongs
|
|
6
|
+
* to the app — because it is staggered as it scrolls in, or interleaved with
|
|
7
|
+
* something else, or rendered from a source the accordion cannot know about.
|
|
8
|
+
*
|
|
9
|
+
* That case is not hypothetical: the first list this kit met decorated every
|
|
10
|
+
* row with a reveal directive, which has to sit on the element the accordion
|
|
11
|
+
* would have owned. Shipping only the list would have meant choosing between
|
|
12
|
+
* the component and the design.
|
|
13
|
+
*
|
|
14
|
+
* ## Why not `<details>`
|
|
15
|
+
*
|
|
16
|
+
* A browser removes `<details>` content from layout entirely when closed, so
|
|
17
|
+
* there is nothing to animate between — the panel can only appear. Faking it by
|
|
18
|
+
* leaving `open` set and hiding with CSS tells a screen reader the section is
|
|
19
|
+
* expanded while a sighted reader sees it shut, which is worse than no
|
|
20
|
+
* animation.
|
|
21
|
+
*
|
|
22
|
+
* So: a button carrying `aria-expanded`, the content always in the markup —
|
|
23
|
+
* which is what a crawler and a reader without JavaScript get — and a grid row
|
|
24
|
+
* travelling from `0fr` to `1fr`, the one way to animate to a height nobody has
|
|
25
|
+
* measured.
|
|
26
|
+
*/
|
|
27
|
+
type __VLS_Props = {
|
|
28
|
+
/** The question. Already translated. */
|
|
29
|
+
title: string;
|
|
30
|
+
/**
|
|
31
|
+
* Which heading the control sits inside.
|
|
32
|
+
*
|
|
33
|
+
* A heading, always — it is how a screen reader user moves between sections
|
|
34
|
+
* without opening any of them. The level depends on what is above it on the
|
|
35
|
+
* page, and getting it wrong breaks the outline.
|
|
36
|
+
*/
|
|
37
|
+
headingLevel?: 2 | 3 | 4 | undefined;
|
|
38
|
+
};
|
|
39
|
+
type __VLS_Slots = {
|
|
40
|
+
/** The answer. */
|
|
41
|
+
default: () => unknown;
|
|
42
|
+
};
|
|
43
|
+
type __VLS_ModelProps = {
|
|
44
|
+
modelValue?: boolean;
|
|
45
|
+
};
|
|
46
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
47
|
+
declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
48
|
+
"update:modelValue": (value: boolean) => any;
|
|
49
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
50
|
+
"onUpdate:modelValue"?: (value: boolean) => any;
|
|
51
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
52
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
53
|
+
declare const _default: typeof __VLS_export;
|
|
54
|
+
export default _default;
|
|
55
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
56
|
+
new (): {
|
|
57
|
+
$slots: S;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Moving between pages of a list.
|
|
3
|
+
*
|
|
4
|
+
* A `nav` of buttons rather than links, because this component does not know
|
|
5
|
+
* whether the app pages by route, by query or in memory. It emits a number and
|
|
6
|
+
* the app decides what that means.
|
|
7
|
+
*
|
|
8
|
+
* ## The ellipsis
|
|
9
|
+
*
|
|
10
|
+
* Every page number is unusable past about a dozen, and cutting to
|
|
11
|
+
* "1 … 7 8 9 … 40" is what every list does. The window is a fixed size around
|
|
12
|
+
* the current page and the first and last are always present, so the control
|
|
13
|
+
* never changes width as you move through it — a row of numbers that reflows
|
|
14
|
+
* under the pointer is a row you have to re-aim at.
|
|
15
|
+
*
|
|
16
|
+
* The gap is a `<span>`, not a disabled button: it is not a control, and
|
|
17
|
+
* announcing it as one gives a screen reader something to try to press.
|
|
18
|
+
*/
|
|
19
|
+
type __VLS_Props = {
|
|
20
|
+
/** Current page, 1-based. */
|
|
21
|
+
page: number;
|
|
22
|
+
/** How many there are. */
|
|
23
|
+
pages: number;
|
|
24
|
+
/** How many numbers to show either side of the current one. */
|
|
25
|
+
siblings?: number | undefined;
|
|
26
|
+
/** Accessible name for the landmark. */
|
|
27
|
+
label?: string | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* Names for the arrows, already translated.
|
|
30
|
+
*
|
|
31
|
+
* Required, because `‹` is a glyph and not a word: a screen reader reading
|
|
32
|
+
* the arrow announces nothing a person can act on.
|
|
33
|
+
*/
|
|
34
|
+
previousLabel: string;
|
|
35
|
+
nextLabel: string;
|
|
36
|
+
};
|
|
37
|
+
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
38
|
+
change: (page: number) => any;
|
|
39
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
40
|
+
onChange?: (page: number) => any;
|
|
41
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
42
|
+
declare const _default: typeof __VLS_export;
|
|
43
|
+
export default _default;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export interface TabPanel<K extends string> {
|
|
2
|
+
key: K;
|
|
3
|
+
/** Already translated. */
|
|
4
|
+
label: string;
|
|
5
|
+
}
|
|
6
|
+
declare const __VLS_export: <K extends string>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
7
|
+
props: import('vue').PublicProps & __VLS_PrettifyLocal<({
|
|
8
|
+
items: readonly TabPanel<K>[];
|
|
9
|
+
/** Accessible name for the tablist. */
|
|
10
|
+
label?: string | undefined;
|
|
11
|
+
} & {
|
|
12
|
+
modelValue: K;
|
|
13
|
+
}) & {
|
|
14
|
+
"onUpdate:modelValue"?: (value: K) => any;
|
|
15
|
+
}> & (typeof globalThis extends {
|
|
16
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
17
|
+
} ? P : {});
|
|
18
|
+
expose: (exposed: {}) => void;
|
|
19
|
+
attrs: any;
|
|
20
|
+
slots: {
|
|
21
|
+
/** The panel for the selected tab. */
|
|
22
|
+
default: (props: {
|
|
23
|
+
item: TabPanel<K>;
|
|
24
|
+
active: K;
|
|
25
|
+
}) => unknown;
|
|
26
|
+
};
|
|
27
|
+
emit: (event: "update:modelValue", value: K) => void;
|
|
28
|
+
}>) => import('vue').VNode & {
|
|
29
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
30
|
+
};
|
|
31
|
+
declare const _default: typeof __VLS_export;
|
|
32
|
+
export default _default;
|
|
33
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
34
|
+
[K in keyof T]: T[K];
|
|
35
|
+
} : {
|
|
36
|
+
[K in keyof T as K]: T[K];
|
|
37
|
+
}) & {};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A short label that appears beside a control.
|
|
3
|
+
*
|
|
4
|
+
* ## CSS, not JavaScript, and that is a decision
|
|
5
|
+
*
|
|
6
|
+
* The bubble is shown by `:hover` and `:focus-within` in the stylesheet. No
|
|
7
|
+
* listener, no state, no positioning library. That costs collision detection —
|
|
8
|
+
* a tooltip near the right edge is clipped rather than flipped — and buys the
|
|
9
|
+
* only thing that matters more: it works in a prerendered page, before the
|
|
10
|
+
* bundle has arrived, and with JavaScript switched off entirely.
|
|
11
|
+
*
|
|
12
|
+
* `:focus-within` rather than `:hover` alone is the part people leave out. A
|
|
13
|
+
* tooltip that only answers a mouse is a tooltip that does not exist for anyone
|
|
14
|
+
* using a keyboard, and the content is usually the only explanation of what the
|
|
15
|
+
* control does.
|
|
16
|
+
*
|
|
17
|
+
* The bubble is wired with `aria-describedby`, so a screen reader reads it as a
|
|
18
|
+
* description of the control rather than as loose text nearby. That is why the
|
|
19
|
+
* trigger goes in a slot: the component has to own the id on both ends.
|
|
20
|
+
*
|
|
21
|
+
* ## When not to use it
|
|
22
|
+
*
|
|
23
|
+
* For anything the reader must have. A tooltip is unreachable on a touch screen
|
|
24
|
+
* without a hover state, so text that changes a decision belongs on the page.
|
|
25
|
+
*/
|
|
26
|
+
type __VLS_Props = {
|
|
27
|
+
/** The description. Already translated. */
|
|
28
|
+
label: string;
|
|
29
|
+
placement?: 'top' | 'bottom' | undefined;
|
|
30
|
+
};
|
|
31
|
+
type __VLS_Slots = {
|
|
32
|
+
/** The control being described. */
|
|
33
|
+
default: (props: {
|
|
34
|
+
describedBy: string;
|
|
35
|
+
}) => unknown;
|
|
36
|
+
};
|
|
37
|
+
declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
38
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
39
|
+
declare const _default: typeof __VLS_export;
|
|
40
|
+
export default _default;
|
|
41
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
42
|
+
new (): {
|
|
43
|
+
$slots: S;
|
|
44
|
+
};
|
|
45
|
+
};
|
package/dist/web/index.d.ts
CHANGED
|
@@ -5,19 +5,26 @@
|
|
|
5
5
|
* assume a page with a header, a mouse and room to spare. A phone app importing
|
|
6
6
|
* the kit should not download them.
|
|
7
7
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* CSS-only on purpose, because a tooltip that needs JavaScript to appear does
|
|
16
|
-
* not appear in a prerendered page. Shipping a JavaScript one would have been
|
|
17
|
-
* shipping the wrong answer in a nicer package.
|
|
8
|
+
* Everything a wide site is normally built from is here whether or not a
|
|
9
|
+
* consumer has reached for it yet. That is the rule in `AGENTS.md` — no waiting
|
|
10
|
+
* for a second consumer and no counting of call sites — and 0.17.0 broke it by
|
|
11
|
+
* shipping three of eight planned components on the grounds that the other five
|
|
12
|
+
* had no users. A kit is a separate project: somebody installing it should not
|
|
13
|
+
* have to hand-write a pagination control because the apps that happen to exist
|
|
14
|
+
* today do not paginate.
|
|
18
15
|
*/
|
|
19
16
|
export { default as BaseAccordion } from './BaseAccordion.vue';
|
|
20
17
|
export type { AccordionItem } from './BaseAccordion.vue';
|
|
18
|
+
export { default as BaseBreadcrumb } from './BaseBreadcrumb.vue';
|
|
19
|
+
export type { Crumb } from './BaseBreadcrumb.vue';
|
|
20
|
+
/**
|
|
21
|
+
* One accordion row on its own.
|
|
22
|
+
*
|
|
23
|
+
* For the common case where the list belongs to the app — staggered as it
|
|
24
|
+
* scrolls in, interleaved with something else, or built from a source the
|
|
25
|
+
* accordion cannot know about.
|
|
26
|
+
*/
|
|
27
|
+
export { default as BaseDisclosure } from './BaseDisclosure.vue';
|
|
21
28
|
/**
|
|
22
29
|
* `BaseModal`, beside `BaseSheet` rather than named `Modal` on its own.
|
|
23
30
|
*
|
|
@@ -26,5 +33,9 @@ export type { AccordionItem } from './BaseAccordion.vue';
|
|
|
26
33
|
* to make somebody reaching for one notice the other exists.
|
|
27
34
|
*/
|
|
28
35
|
export { default as BaseModal } from './BaseModal.vue';
|
|
36
|
+
export { default as BasePagination } from './BasePagination.vue';
|
|
37
|
+
export { default as BaseTabs } from './BaseTabs.vue';
|
|
38
|
+
export type { TabPanel } from './BaseTabs.vue';
|
|
39
|
+
export { default as BaseTooltip } from './BaseTooltip.vue';
|
|
29
40
|
export { default as NavLinks } from './NavLinks.vue';
|
|
30
41
|
export type { NavLinkItem } from './NavLinks.vue';
|
package/dist/web.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper-BOaGB7Aw.js";
|
|
2
|
-
import { Fragment, Teleport, Transition, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, mergeModels, nextTick, normalizeClass, onBeforeUnmount, openBlock, ref, renderList, renderSlot, resolveDynamicComponent, shallowRef, toDisplayString, unref, useId, useModel, watch, withCtx, withModifiers } from "vue";
|
|
2
|
+
import { Fragment, Teleport, Transition, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, mergeModels, nextTick, normalizeClass, onBeforeUnmount, openBlock, ref, renderList, renderSlot, resolveDynamicComponent, shallowRef, toDisplayString, unref, useId, useModel, vShow, watch, withCtx, withDirectives, withModifiers } from "vue";
|
|
3
3
|
import { RouterLink } from "vue-router";
|
|
4
4
|
//#region src/web/BaseAccordion.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
-
var _hoisted_1$
|
|
6
|
-
var _hoisted_2$
|
|
5
|
+
var _hoisted_1$7 = { class: "rk-accordion" };
|
|
6
|
+
var _hoisted_2$7 = [
|
|
7
7
|
"aria-expanded",
|
|
8
8
|
"aria-controls",
|
|
9
9
|
"onClick"
|
|
10
10
|
];
|
|
11
|
-
var _hoisted_3$
|
|
12
|
-
var _hoisted_4$
|
|
11
|
+
var _hoisted_3$5 = { class: "rk-accordion-title" };
|
|
12
|
+
var _hoisted_4$4 = {
|
|
13
13
|
class: "rk-accordion-mark",
|
|
14
14
|
"aria-hidden": "true"
|
|
15
15
|
};
|
|
16
|
-
var _hoisted_5$
|
|
17
|
-
var _hoisted_6$
|
|
16
|
+
var _hoisted_5$3 = ["id"];
|
|
17
|
+
var _hoisted_6$2 = { class: "rk-accordion-clip" };
|
|
18
18
|
//#endregion
|
|
19
19
|
//#region src/web/BaseAccordion.vue
|
|
20
20
|
var BaseAccordion_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
@@ -36,7 +36,7 @@ var BaseAccordion_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @
|
|
|
36
36
|
else open.value = __props.multiple ? [...open.value, key] : [key];
|
|
37
37
|
}
|
|
38
38
|
return (_ctx, _cache) => {
|
|
39
|
-
return openBlock(), createElementBlock("ul", _hoisted_1$
|
|
39
|
+
return openBlock(), createElementBlock("ul", _hoisted_1$7, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.items, (item) => {
|
|
40
40
|
return openBlock(), createElementBlock("li", {
|
|
41
41
|
key: item.key,
|
|
42
42
|
class: "rk-accordion-item"
|
|
@@ -47,26 +47,112 @@ var BaseAccordion_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @
|
|
|
47
47
|
"aria-expanded": isOpen(item.key),
|
|
48
48
|
"aria-controls": `${unref(uid)}-${item.key}`,
|
|
49
49
|
onClick: ($event) => toggle(item.key)
|
|
50
|
-
}, [createElementVNode("span", _hoisted_3$
|
|
50
|
+
}, [createElementVNode("span", _hoisted_3$5, toDisplayString(item.title), 1), createElementVNode("span", _hoisted_4$4, [_cache[0] || (_cache[0] = createElementVNode("span", { class: "rk-accordion-bar" }, null, -1)), createElementVNode("span", { class: normalizeClass(["rk-accordion-bar rk-accordion-bar-turn", { "is-open": isOpen(item.key) }]) }, null, 2)])], 8, _hoisted_2$7)]),
|
|
51
51
|
_: 2
|
|
52
52
|
}, 1024)), createElementVNode("div", {
|
|
53
53
|
id: `${unref(uid)}-${item.key}`,
|
|
54
54
|
class: normalizeClass(["rk-accordion-panel", { "is-open": isOpen(item.key) }])
|
|
55
|
-
}, [createElementVNode("div", _hoisted_6$
|
|
55
|
+
}, [createElementVNode("div", _hoisted_6$2, [createElementVNode("div", { class: normalizeClass(["rk-accordion-body", { "is-open": isOpen(item.key) }]) }, [renderSlot(_ctx.$slots, "default", {
|
|
56
56
|
item,
|
|
57
57
|
open: isOpen(item.key)
|
|
58
|
-
}, void 0, true)], 2)])], 10, _hoisted_5$
|
|
58
|
+
}, void 0, true)], 2)])], 10, _hoisted_5$3)]);
|
|
59
59
|
}), 128))]);
|
|
60
60
|
};
|
|
61
61
|
}
|
|
62
62
|
}), [["__scopeId", "data-v-00091812"]]);
|
|
63
63
|
//#endregion
|
|
64
|
+
//#region src/web/BaseBreadcrumb.vue?vue&type=script&setup=true&lang.ts
|
|
65
|
+
var _hoisted_1$6 = ["aria-label"];
|
|
66
|
+
var _hoisted_2$6 = { class: "rk-crumbs" };
|
|
67
|
+
var _hoisted_3$4 = {
|
|
68
|
+
key: 1,
|
|
69
|
+
class: "rk-crumb-current",
|
|
70
|
+
"aria-current": "page"
|
|
71
|
+
};
|
|
72
|
+
var _hoisted_4$3 = {
|
|
73
|
+
key: 2,
|
|
74
|
+
class: "rk-crumb-sep",
|
|
75
|
+
"aria-hidden": "true"
|
|
76
|
+
};
|
|
77
|
+
//#endregion
|
|
78
|
+
//#region src/web/BaseBreadcrumb.vue
|
|
79
|
+
var BaseBreadcrumb_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
80
|
+
__name: "BaseBreadcrumb",
|
|
81
|
+
props: {
|
|
82
|
+
items: {},
|
|
83
|
+
label: { default: "" }
|
|
84
|
+
},
|
|
85
|
+
setup(__props) {
|
|
86
|
+
return (_ctx, _cache) => {
|
|
87
|
+
return openBlock(), createElementBlock("nav", { "aria-label": __props.label || void 0 }, [createElementVNode("ol", _hoisted_2$6, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.items, (item, index) => {
|
|
88
|
+
return openBlock(), createElementBlock("li", {
|
|
89
|
+
key: item.label,
|
|
90
|
+
class: "rk-crumb"
|
|
91
|
+
}, [item.to ? (openBlock(), createBlock(unref(RouterLink), {
|
|
92
|
+
key: 0,
|
|
93
|
+
to: item.to,
|
|
94
|
+
class: "rk-crumb-link"
|
|
95
|
+
}, {
|
|
96
|
+
default: withCtx(() => [createTextVNode(toDisplayString(item.label), 1)]),
|
|
97
|
+
_: 2
|
|
98
|
+
}, 1032, ["to"])) : (openBlock(), createElementBlock("span", _hoisted_3$4, toDisplayString(item.label), 1)), index < __props.items.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_4$3, "/")) : createCommentVNode("", true)]);
|
|
99
|
+
}), 128))])], 8, _hoisted_1$6);
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
}), [["__scopeId", "data-v-85ee4b4e"]]);
|
|
103
|
+
//#endregion
|
|
104
|
+
//#region src/web/BaseDisclosure.vue?vue&type=script&setup=true&lang.ts
|
|
105
|
+
var _hoisted_1$5 = { class: "rk-disclosure" };
|
|
106
|
+
var _hoisted_2$5 = ["aria-expanded", "aria-controls"];
|
|
107
|
+
var _hoisted_3$3 = { class: "rk-disclosure-title" };
|
|
108
|
+
var _hoisted_4$2 = {
|
|
109
|
+
class: "rk-disclosure-mark",
|
|
110
|
+
"aria-hidden": "true"
|
|
111
|
+
};
|
|
112
|
+
var _hoisted_5$2 = ["id"];
|
|
113
|
+
var _hoisted_6$1 = { class: "rk-disclosure-clip" };
|
|
114
|
+
//#endregion
|
|
115
|
+
//#region src/web/BaseDisclosure.vue
|
|
116
|
+
var BaseDisclosure_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
117
|
+
__name: "BaseDisclosure",
|
|
118
|
+
props: /*@__PURE__*/ mergeModels({
|
|
119
|
+
title: {},
|
|
120
|
+
headingLevel: { default: 3 }
|
|
121
|
+
}, {
|
|
122
|
+
"modelValue": {
|
|
123
|
+
type: Boolean,
|
|
124
|
+
default: false
|
|
125
|
+
},
|
|
126
|
+
"modelModifiers": {}
|
|
127
|
+
}),
|
|
128
|
+
emits: ["update:modelValue"],
|
|
129
|
+
setup(__props) {
|
|
130
|
+
const open = useModel(__props, "modelValue");
|
|
131
|
+
const id = useId();
|
|
132
|
+
return (_ctx, _cache) => {
|
|
133
|
+
return openBlock(), createElementBlock("div", _hoisted_1$5, [(openBlock(), createBlock(resolveDynamicComponent(`h${__props.headingLevel}`), null, {
|
|
134
|
+
default: withCtx(() => [createElementVNode("button", {
|
|
135
|
+
type: "button",
|
|
136
|
+
class: "rk-disclosure-control",
|
|
137
|
+
"aria-expanded": open.value,
|
|
138
|
+
"aria-controls": unref(id),
|
|
139
|
+
onClick: _cache[0] || (_cache[0] = ($event) => open.value = !open.value)
|
|
140
|
+
}, [createElementVNode("span", _hoisted_3$3, toDisplayString(__props.title), 1), createElementVNode("span", _hoisted_4$2, [_cache[1] || (_cache[1] = createElementVNode("span", { class: "rk-disclosure-bar" }, null, -1)), createElementVNode("span", { class: normalizeClass(["rk-disclosure-bar rk-disclosure-turn", { "is-open": open.value }]) }, null, 2)])], 8, _hoisted_2$5)]),
|
|
141
|
+
_: 1
|
|
142
|
+
})), createElementVNode("div", {
|
|
143
|
+
id: unref(id),
|
|
144
|
+
class: normalizeClass(["rk-disclosure-panel", { "is-open": open.value }])
|
|
145
|
+
}, [createElementVNode("div", _hoisted_6$1, [createElementVNode("div", { class: normalizeClass(["rk-disclosure-body", { "is-open": open.value }]) }, [renderSlot(_ctx.$slots, "default", {}, void 0, true)], 2)])], 10, _hoisted_5$2)]);
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
}), [["__scopeId", "data-v-fef7de4d"]]);
|
|
149
|
+
//#endregion
|
|
64
150
|
//#region src/web/BaseModal.vue?vue&type=script&setup=true&lang.ts
|
|
65
|
-
var _hoisted_1$
|
|
66
|
-
var _hoisted_2$
|
|
67
|
-
var _hoisted_3 = { class: "rk-modal-title" };
|
|
68
|
-
var _hoisted_4 = ["aria-label"];
|
|
69
|
-
var _hoisted_5 = { class: "rk-modal-body" };
|
|
151
|
+
var _hoisted_1$4 = ["role", "aria-label"];
|
|
152
|
+
var _hoisted_2$4 = { class: "rk-modal-head" };
|
|
153
|
+
var _hoisted_3$2 = { class: "rk-modal-title" };
|
|
154
|
+
var _hoisted_4$1 = ["aria-label"];
|
|
155
|
+
var _hoisted_5$1 = { class: "rk-modal-body" };
|
|
70
156
|
var _hoisted_6 = {
|
|
71
157
|
key: 0,
|
|
72
158
|
class: "rk-modal-actions"
|
|
@@ -180,7 +266,7 @@ var BaseModal_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PU
|
|
|
180
266
|
"aria-label": __props.title,
|
|
181
267
|
tabindex: "-1"
|
|
182
268
|
}, [
|
|
183
|
-
createElementVNode("div", _hoisted_2$
|
|
269
|
+
createElementVNode("div", _hoisted_2$4, [createElementVNode("h2", _hoisted_3$2, toDisplayString(__props.title), 1), __props.dismissible ? (openBlock(), createElementBlock("button", {
|
|
184
270
|
key: 0,
|
|
185
271
|
type: "button",
|
|
186
272
|
class: "rk-modal-close",
|
|
@@ -194,16 +280,219 @@ var BaseModal_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PU
|
|
|
194
280
|
}, [createElementVNode("path", {
|
|
195
281
|
d: "M18 6 6 18M6 6l12 12",
|
|
196
282
|
"stroke-linecap": "round"
|
|
197
|
-
})], -1)])], 8, _hoisted_4)) : createCommentVNode("", true)]),
|
|
198
|
-
createElementVNode("div", _hoisted_5, [renderSlot(_ctx.$slots, "default", {}, void 0, true)]),
|
|
283
|
+
})], -1)])], 8, _hoisted_4$1)) : createCommentVNode("", true)]),
|
|
284
|
+
createElementVNode("div", _hoisted_5$1, [renderSlot(_ctx.$slots, "default", {}, void 0, true)]),
|
|
199
285
|
_ctx.$slots.actions ? (openBlock(), createElementBlock("div", _hoisted_6, [renderSlot(_ctx.$slots, "actions", {}, void 0, true)])) : createCommentVNode("", true)
|
|
200
|
-
], 8, _hoisted_1$
|
|
286
|
+
], 8, _hoisted_1$4)], 32)) : createCommentVNode("", true)]),
|
|
201
287
|
_: 3
|
|
202
288
|
})]);
|
|
203
289
|
};
|
|
204
290
|
}
|
|
205
291
|
}), [["__scopeId", "data-v-e092f731"]]);
|
|
206
292
|
//#endregion
|
|
293
|
+
//#region src/web/BasePagination.vue?vue&type=script&setup=true&lang.ts
|
|
294
|
+
var _hoisted_1$3 = ["aria-label"];
|
|
295
|
+
var _hoisted_2$3 = ["disabled", "aria-label"];
|
|
296
|
+
var _hoisted_3$1 = {
|
|
297
|
+
key: 0,
|
|
298
|
+
class: "rk-pager-gap",
|
|
299
|
+
"aria-hidden": "true"
|
|
300
|
+
};
|
|
301
|
+
var _hoisted_4 = ["aria-current", "onClick"];
|
|
302
|
+
var _hoisted_5 = ["disabled", "aria-label"];
|
|
303
|
+
/**
|
|
304
|
+
* Moving between pages of a list.
|
|
305
|
+
*
|
|
306
|
+
* A `nav` of buttons rather than links, because this component does not know
|
|
307
|
+
* whether the app pages by route, by query or in memory. It emits a number and
|
|
308
|
+
* the app decides what that means.
|
|
309
|
+
*
|
|
310
|
+
* ## The ellipsis
|
|
311
|
+
*
|
|
312
|
+
* Every page number is unusable past about a dozen, and cutting to
|
|
313
|
+
* "1 … 7 8 9 … 40" is what every list does. The window is a fixed size around
|
|
314
|
+
* the current page and the first and last are always present, so the control
|
|
315
|
+
* never changes width as you move through it — a row of numbers that reflows
|
|
316
|
+
* under the pointer is a row you have to re-aim at.
|
|
317
|
+
*
|
|
318
|
+
* The gap is a `<span>`, not a disabled button: it is not a control, and
|
|
319
|
+
* announcing it as one gives a screen reader something to try to press.
|
|
320
|
+
*/
|
|
321
|
+
var GAP = "gap";
|
|
322
|
+
//#endregion
|
|
323
|
+
//#region src/web/BasePagination.vue
|
|
324
|
+
var BasePagination_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
325
|
+
__name: "BasePagination",
|
|
326
|
+
props: {
|
|
327
|
+
page: {},
|
|
328
|
+
pages: {},
|
|
329
|
+
siblings: { default: 1 },
|
|
330
|
+
label: { default: "" },
|
|
331
|
+
previousLabel: {},
|
|
332
|
+
nextLabel: {}
|
|
333
|
+
},
|
|
334
|
+
emits: ["change"],
|
|
335
|
+
setup(__props, { emit: __emit }) {
|
|
336
|
+
const emit = __emit;
|
|
337
|
+
const slots = computed(() => {
|
|
338
|
+
if (__props.pages <= 1) return [1];
|
|
339
|
+
const first = 1;
|
|
340
|
+
const last = __props.pages;
|
|
341
|
+
if (__props.pages <= __props.siblings * 2 + 5) return Array.from({ length: __props.pages }, (_, i) => i + 1);
|
|
342
|
+
const from = Math.max(2, __props.page - __props.siblings);
|
|
343
|
+
const to = Math.min(last - 1, __props.page + __props.siblings);
|
|
344
|
+
const out = [first];
|
|
345
|
+
if (from > 2) out.push(GAP);
|
|
346
|
+
for (let n = from; n <= to; n++) out.push(n);
|
|
347
|
+
if (to < last - 1) out.push(GAP);
|
|
348
|
+
if (last > first) out.push(last);
|
|
349
|
+
return out;
|
|
350
|
+
});
|
|
351
|
+
const go = (next) => {
|
|
352
|
+
if (next >= 1 && next <= __props.pages && next !== __props.page) emit("change", next);
|
|
353
|
+
};
|
|
354
|
+
return (_ctx, _cache) => {
|
|
355
|
+
return openBlock(), createElementBlock("nav", {
|
|
356
|
+
class: "rk-pager",
|
|
357
|
+
"aria-label": __props.label || void 0
|
|
358
|
+
}, [
|
|
359
|
+
createElementVNode("button", {
|
|
360
|
+
type: "button",
|
|
361
|
+
class: "rk-pager-step",
|
|
362
|
+
disabled: __props.page <= 1,
|
|
363
|
+
"aria-label": __props.previousLabel,
|
|
364
|
+
onClick: _cache[0] || (_cache[0] = ($event) => go(__props.page - 1))
|
|
365
|
+
}, " ‹ ", 8, _hoisted_2$3),
|
|
366
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(slots.value, (slot, index) => {
|
|
367
|
+
return openBlock(), createElementBlock(Fragment, { key: `${slot}-${index}` }, [slot === "gap" ? (openBlock(), createElementBlock("span", _hoisted_3$1, "…")) : (openBlock(), createElementBlock("button", {
|
|
368
|
+
key: 1,
|
|
369
|
+
type: "button",
|
|
370
|
+
class: normalizeClass(["rk-pager-page", { "is-active": slot === __props.page }]),
|
|
371
|
+
"aria-current": slot === __props.page ? "page" : void 0,
|
|
372
|
+
onClick: ($event) => go(slot)
|
|
373
|
+
}, toDisplayString(slot), 11, _hoisted_4))], 64);
|
|
374
|
+
}), 128)),
|
|
375
|
+
createElementVNode("button", {
|
|
376
|
+
type: "button",
|
|
377
|
+
class: "rk-pager-step",
|
|
378
|
+
disabled: __props.page >= __props.pages,
|
|
379
|
+
"aria-label": __props.nextLabel,
|
|
380
|
+
onClick: _cache[1] || (_cache[1] = ($event) => go(__props.page + 1))
|
|
381
|
+
}, " › ", 8, _hoisted_5)
|
|
382
|
+
], 8, _hoisted_1$3);
|
|
383
|
+
};
|
|
384
|
+
}
|
|
385
|
+
}), [["__scopeId", "data-v-cc4bbb58"]]);
|
|
386
|
+
//#endregion
|
|
387
|
+
//#region src/web/BaseTabs.vue?vue&type=script&setup=true&lang.ts
|
|
388
|
+
var _hoisted_1$2 = ["aria-label"];
|
|
389
|
+
var _hoisted_2$2 = [
|
|
390
|
+
"id",
|
|
391
|
+
"aria-selected",
|
|
392
|
+
"aria-controls",
|
|
393
|
+
"tabindex",
|
|
394
|
+
"onClick"
|
|
395
|
+
];
|
|
396
|
+
var _hoisted_3 = ["id", "aria-labelledby"];
|
|
397
|
+
//#endregion
|
|
398
|
+
//#region src/web/BaseTabs.vue
|
|
399
|
+
var BaseTabs_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
400
|
+
__name: "BaseTabs",
|
|
401
|
+
props: /*@__PURE__*/ mergeModels({
|
|
402
|
+
items: {},
|
|
403
|
+
label: { default: "" }
|
|
404
|
+
}, {
|
|
405
|
+
"modelValue": { required: true },
|
|
406
|
+
"modelModifiers": {}
|
|
407
|
+
}),
|
|
408
|
+
emits: ["update:modelValue"],
|
|
409
|
+
setup(__props) {
|
|
410
|
+
const active = useModel(__props, "modelValue");
|
|
411
|
+
const uid = useId();
|
|
412
|
+
const tabs = ref([]);
|
|
413
|
+
const tabId = (key) => `${uid}-tab-${key}`;
|
|
414
|
+
const panelId = (key) => `${uid}-panel-${key}`;
|
|
415
|
+
function select(key, focus = false) {
|
|
416
|
+
active.value = key;
|
|
417
|
+
if (!focus) return;
|
|
418
|
+
const index = __props.items.findIndex((item) => item.key === key);
|
|
419
|
+
requestAnimationFrame(() => tabs.value[index]?.focus());
|
|
420
|
+
}
|
|
421
|
+
function onKeydown(event) {
|
|
422
|
+
const index = __props.items.findIndex((item) => item.key === active.value);
|
|
423
|
+
if (index < 0) return;
|
|
424
|
+
const last = __props.items.length - 1;
|
|
425
|
+
let next;
|
|
426
|
+
if (event.key === "ArrowRight") next = index === last ? 0 : index + 1;
|
|
427
|
+
else if (event.key === "ArrowLeft") next = index === 0 ? last : index - 1;
|
|
428
|
+
else if (event.key === "Home") next = 0;
|
|
429
|
+
else if (event.key === "End") next = last;
|
|
430
|
+
else return;
|
|
431
|
+
event.preventDefault();
|
|
432
|
+
const item = __props.items[next];
|
|
433
|
+
if (item) select(item.key, true);
|
|
434
|
+
}
|
|
435
|
+
return (_ctx, _cache) => {
|
|
436
|
+
return openBlock(), createElementBlock("div", null, [createElementVNode("div", {
|
|
437
|
+
class: "rk-tabs",
|
|
438
|
+
role: "tablist",
|
|
439
|
+
"aria-label": __props.label || void 0,
|
|
440
|
+
onKeydown
|
|
441
|
+
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.items, (item) => {
|
|
442
|
+
return openBlock(), createElementBlock("button", {
|
|
443
|
+
key: item.key,
|
|
444
|
+
ref_for: true,
|
|
445
|
+
ref_key: "tabs",
|
|
446
|
+
ref: tabs,
|
|
447
|
+
type: "button",
|
|
448
|
+
role: "tab",
|
|
449
|
+
class: normalizeClass(["rk-tab", { "is-active": item.key === active.value }]),
|
|
450
|
+
id: tabId(item.key),
|
|
451
|
+
"aria-selected": item.key === active.value,
|
|
452
|
+
"aria-controls": panelId(item.key),
|
|
453
|
+
tabindex: item.key === active.value ? 0 : -1,
|
|
454
|
+
onClick: ($event) => select(item.key)
|
|
455
|
+
}, toDisplayString(item.label), 11, _hoisted_2$2);
|
|
456
|
+
}), 128))], 40, _hoisted_1$2), (openBlock(true), createElementBlock(Fragment, null, renderList(__props.items, (item) => {
|
|
457
|
+
return withDirectives((openBlock(), createElementBlock("div", {
|
|
458
|
+
key: item.key,
|
|
459
|
+
role: "tabpanel",
|
|
460
|
+
class: "rk-tabpanel",
|
|
461
|
+
id: panelId(item.key),
|
|
462
|
+
"aria-labelledby": tabId(item.key),
|
|
463
|
+
tabindex: "0"
|
|
464
|
+
}, [renderSlot(_ctx.$slots, "default", {
|
|
465
|
+
item,
|
|
466
|
+
active: active.value
|
|
467
|
+
}, void 0, true)], 8, _hoisted_3)), [[vShow, item.key === active.value]]);
|
|
468
|
+
}), 128))]);
|
|
469
|
+
};
|
|
470
|
+
}
|
|
471
|
+
}), [["__scopeId", "data-v-b854e7f5"]]);
|
|
472
|
+
//#endregion
|
|
473
|
+
//#region src/web/BaseTooltip.vue?vue&type=script&setup=true&lang.ts
|
|
474
|
+
var _hoisted_1$1 = { class: "rk-tip" };
|
|
475
|
+
var _hoisted_2$1 = ["id"];
|
|
476
|
+
//#endregion
|
|
477
|
+
//#region src/web/BaseTooltip.vue
|
|
478
|
+
var BaseTooltip_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
479
|
+
__name: "BaseTooltip",
|
|
480
|
+
props: {
|
|
481
|
+
label: {},
|
|
482
|
+
placement: { default: "top" }
|
|
483
|
+
},
|
|
484
|
+
setup(__props) {
|
|
485
|
+
const id = useId();
|
|
486
|
+
return (_ctx, _cache) => {
|
|
487
|
+
return openBlock(), createElementBlock("span", _hoisted_1$1, [renderSlot(_ctx.$slots, "default", { describedBy: unref(id) }, void 0, true), createElementVNode("span", {
|
|
488
|
+
id: unref(id),
|
|
489
|
+
role: "tooltip",
|
|
490
|
+
class: normalizeClass(["rk-tip-bubble", `is-${__props.placement}`])
|
|
491
|
+
}, toDisplayString(__props.label), 11, _hoisted_2$1)]);
|
|
492
|
+
};
|
|
493
|
+
}
|
|
494
|
+
}), [["__scopeId", "data-v-3ed61bd4"]]);
|
|
495
|
+
//#endregion
|
|
207
496
|
//#region src/web/NavLinks.vue?vue&type=script&setup=true&lang.ts
|
|
208
497
|
var _hoisted_1 = ["aria-label"];
|
|
209
498
|
var _hoisted_2 = { class: "rk-nav-inner" };
|
|
@@ -240,6 +529,6 @@ var NavLinks_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PUR
|
|
|
240
529
|
}
|
|
241
530
|
}), [["__scopeId", "data-v-5e640548"]]);
|
|
242
531
|
//#endregion
|
|
243
|
-
export { BaseAccordion_default as BaseAccordion, BaseModal_default as BaseModal, NavLinks_default as NavLinks };
|
|
532
|
+
export { BaseAccordion_default as BaseAccordion, BaseBreadcrumb_default as BaseBreadcrumb, BaseDisclosure_default as BaseDisclosure, BaseModal_default as BaseModal, BasePagination_default as BasePagination, BaseTabs_default as BaseTabs, BaseTooltip_default as BaseTooltip, NavLinks_default as NavLinks };
|
|
244
533
|
|
|
245
534
|
//# sourceMappingURL=web.js.map
|
package/dist/web.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web.js","names":["$slots"],"sources":["../src/web/BaseAccordion.vue","../src/web/BaseAccordion.vue","../src/web/BaseModal.vue","../src/web/BaseModal.vue","../src/web/NavLinks.vue","../src/web/NavLinks.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"K extends string\">\nimport { shallowRef, useId } from 'vue'\n\nexport interface AccordionItem<K extends string> {\n key: K\n /** The question. Already translated. */\n title: string\n}\n\n/**\n * A list that opens one section at a time.\n *\n * ## Why not `<details>`\n *\n * `<details>` is the honest element for this and it was the first choice. A\n * browser removes its content from layout entirely when closed, so there is\n * nothing to animate between — the panel can only appear. Faking it by leaving\n * `open` set and hiding with CSS tells a screen reader the section is expanded\n * while a sighted reader sees it shut, which is worse than no animation.\n *\n * So: a button carrying `aria-expanded`, the answer always in the markup — the\n * prerendered HTML carries every answer, which is what a crawler and a reader\n * without JavaScript get — and a grid row that travels from `0fr` to `1fr`,\n * which is the one way to animate to a height nobody has measured.\n *\n * The content is always present, so anything expensive in it is paid for on\n * first paint. That is the trade: a section a crawler can read costs a section\n * that is never lazy.\n */\nconst {\n items,\n multiple = false,\n headingLevel = 3,\n} = defineProps<{\n items: readonly AccordionItem<K>[]\n /** Allow several open at once. Off by default, which is what makes it an accordion. */\n multiple?: boolean | undefined\n /**\n * Which heading the control sits inside.\n *\n * A heading, always — it is how a screen reader user moves between sections\n * without opening any of them. The level is a prop because it depends on what\n * is above it on the page, and getting it wrong breaks the outline.\n */\n headingLevel?: 2 | 3 | 4 | undefined\n}>()\n\ndefineSlots<{\n /** The answer, per item. */\n default: (props: { item: AccordionItem<K>; open: boolean }) => unknown\n}>()\n\nconst uid = useId()\n/* `shallowRef` because the list is replaced wholesale rather than mutated, and\n because a deep ref unwraps a generic key type into something TypeScript can\n no longer match against `K`. */\nconst open = shallowRef<K[]>([])\n\nconst isOpen = (key: K) => open.value.includes(key)\n\nfunction toggle(key: K) {\n if (isOpen(key)) {\n open.value = open.value.filter((k) => k !== key)\n } else {\n open.value = multiple ? [...open.value, key] : [key]\n }\n}\n</script>\n\n<template>\n <ul class=\"rk-accordion\">\n <li v-for=\"item in items\" :key=\"item.key\" class=\"rk-accordion-item\">\n <component :is=\"`h${headingLevel}`\">\n <button\n type=\"button\"\n class=\"rk-accordion-control\"\n :aria-expanded=\"isOpen(item.key)\"\n :aria-controls=\"`${uid}-${item.key}`\"\n @click=\"toggle(item.key)\"\n >\n <span class=\"rk-accordion-title\">{{ item.title }}</span>\n\n <!-- A plus that becomes a minus: one stroke turns, so the control\n keeps its place while it changes meaning. -->\n <span class=\"rk-accordion-mark\" aria-hidden=\"true\">\n <span class=\"rk-accordion-bar\" />\n <span\n class=\"rk-accordion-bar rk-accordion-bar-turn\"\n :class=\"{ 'is-open': isOpen(item.key) }\"\n />\n </span>\n </button>\n </component>\n\n <div\n :id=\"`${uid}-${item.key}`\"\n class=\"rk-accordion-panel\"\n :class=\"{ 'is-open': isOpen(item.key) }\"\n >\n <div class=\"rk-accordion-clip\">\n <div class=\"rk-accordion-body\" :class=\"{ 'is-open': isOpen(item.key) }\">\n <slot :item=\"item\" :open=\"isOpen(item.key)\" />\n </div>\n </div>\n </div>\n </li>\n </ul>\n</template>\n\n<style scoped>\n.rk-accordion {\n border-top: 1px solid color-mix(in srgb, var(--color-hair) 70%, transparent);\n}\n\n.rk-accordion-item {\n border-bottom: 1px solid color-mix(in srgb, var(--color-hair) 70%, transparent);\n}\n\n.rk-accordion-control {\n display: flex;\n width: 100%;\n cursor: pointer;\n align-items: center;\n justify-content: space-between;\n gap: 1.5rem;\n padding: 1.25rem 0;\n text-align: left;\n transition: color 150ms;\n}\n\n.rk-accordion-control:hover {\n color: var(--color-primary);\n}\n\n.rk-accordion-control:focus-visible {\n outline: 2px solid var(--color-primary);\n outline-offset: 2px;\n}\n\n.rk-accordion-title {\n color: var(--color-ink);\n font-size: 1rem;\n font-weight: 500;\n}\n\n.rk-accordion-mark {\n position: relative;\n display: grid;\n place-items: center;\n flex-shrink: 0;\n width: 1.5rem;\n height: 1.5rem;\n}\n\n.rk-accordion-bar {\n position: absolute;\n height: 1px;\n width: 0.875rem;\n background: var(--color-ink-soft);\n}\n\n.rk-accordion-bar-turn {\n transform: rotate(90deg);\n transition: transform 420ms ease-out;\n}\n\n.rk-accordion-bar-turn.is-open {\n transform: rotate(0deg);\n}\n\n/* 0fr to 1fr is the whole trick: a grid row can be animated to a height that\n was never measured, which is what `height: auto` cannot do. */\n.rk-accordion-panel {\n display: grid;\n grid-template-rows: 0fr;\n transition: grid-template-rows 420ms ease-out;\n}\n\n.rk-accordion-panel.is-open {\n grid-template-rows: 1fr;\n}\n\n.rk-accordion-clip {\n overflow: hidden;\n}\n\n.rk-accordion-body {\n max-width: 68ch;\n padding-bottom: 1.5rem;\n color: var(--color-ink-soft);\n line-height: 1.625;\n opacity: 0;\n transition: opacity 300ms;\n}\n\n.rk-accordion-body.is-open {\n opacity: 1;\n}\n\n@media (prefers-reduced-motion: reduce) {\n .rk-accordion-panel,\n .rk-accordion-bar-turn,\n .rk-accordion-body {\n transition: none;\n }\n}\n</style>\n","<script setup lang=\"ts\" generic=\"K extends string\">\nimport { shallowRef, useId } from 'vue'\n\nexport interface AccordionItem<K extends string> {\n key: K\n /** The question. Already translated. */\n title: string\n}\n\n/**\n * A list that opens one section at a time.\n *\n * ## Why not `<details>`\n *\n * `<details>` is the honest element for this and it was the first choice. A\n * browser removes its content from layout entirely when closed, so there is\n * nothing to animate between — the panel can only appear. Faking it by leaving\n * `open` set and hiding with CSS tells a screen reader the section is expanded\n * while a sighted reader sees it shut, which is worse than no animation.\n *\n * So: a button carrying `aria-expanded`, the answer always in the markup — the\n * prerendered HTML carries every answer, which is what a crawler and a reader\n * without JavaScript get — and a grid row that travels from `0fr` to `1fr`,\n * which is the one way to animate to a height nobody has measured.\n *\n * The content is always present, so anything expensive in it is paid for on\n * first paint. That is the trade: a section a crawler can read costs a section\n * that is never lazy.\n */\nconst {\n items,\n multiple = false,\n headingLevel = 3,\n} = defineProps<{\n items: readonly AccordionItem<K>[]\n /** Allow several open at once. Off by default, which is what makes it an accordion. */\n multiple?: boolean | undefined\n /**\n * Which heading the control sits inside.\n *\n * A heading, always — it is how a screen reader user moves between sections\n * without opening any of them. The level is a prop because it depends on what\n * is above it on the page, and getting it wrong breaks the outline.\n */\n headingLevel?: 2 | 3 | 4 | undefined\n}>()\n\ndefineSlots<{\n /** The answer, per item. */\n default: (props: { item: AccordionItem<K>; open: boolean }) => unknown\n}>()\n\nconst uid = useId()\n/* `shallowRef` because the list is replaced wholesale rather than mutated, and\n because a deep ref unwraps a generic key type into something TypeScript can\n no longer match against `K`. */\nconst open = shallowRef<K[]>([])\n\nconst isOpen = (key: K) => open.value.includes(key)\n\nfunction toggle(key: K) {\n if (isOpen(key)) {\n open.value = open.value.filter((k) => k !== key)\n } else {\n open.value = multiple ? [...open.value, key] : [key]\n }\n}\n</script>\n\n<template>\n <ul class=\"rk-accordion\">\n <li v-for=\"item in items\" :key=\"item.key\" class=\"rk-accordion-item\">\n <component :is=\"`h${headingLevel}`\">\n <button\n type=\"button\"\n class=\"rk-accordion-control\"\n :aria-expanded=\"isOpen(item.key)\"\n :aria-controls=\"`${uid}-${item.key}`\"\n @click=\"toggle(item.key)\"\n >\n <span class=\"rk-accordion-title\">{{ item.title }}</span>\n\n <!-- A plus that becomes a minus: one stroke turns, so the control\n keeps its place while it changes meaning. -->\n <span class=\"rk-accordion-mark\" aria-hidden=\"true\">\n <span class=\"rk-accordion-bar\" />\n <span\n class=\"rk-accordion-bar rk-accordion-bar-turn\"\n :class=\"{ 'is-open': isOpen(item.key) }\"\n />\n </span>\n </button>\n </component>\n\n <div\n :id=\"`${uid}-${item.key}`\"\n class=\"rk-accordion-panel\"\n :class=\"{ 'is-open': isOpen(item.key) }\"\n >\n <div class=\"rk-accordion-clip\">\n <div class=\"rk-accordion-body\" :class=\"{ 'is-open': isOpen(item.key) }\">\n <slot :item=\"item\" :open=\"isOpen(item.key)\" />\n </div>\n </div>\n </div>\n </li>\n </ul>\n</template>\n\n<style scoped>\n.rk-accordion {\n border-top: 1px solid color-mix(in srgb, var(--color-hair) 70%, transparent);\n}\n\n.rk-accordion-item {\n border-bottom: 1px solid color-mix(in srgb, var(--color-hair) 70%, transparent);\n}\n\n.rk-accordion-control {\n display: flex;\n width: 100%;\n cursor: pointer;\n align-items: center;\n justify-content: space-between;\n gap: 1.5rem;\n padding: 1.25rem 0;\n text-align: left;\n transition: color 150ms;\n}\n\n.rk-accordion-control:hover {\n color: var(--color-primary);\n}\n\n.rk-accordion-control:focus-visible {\n outline: 2px solid var(--color-primary);\n outline-offset: 2px;\n}\n\n.rk-accordion-title {\n color: var(--color-ink);\n font-size: 1rem;\n font-weight: 500;\n}\n\n.rk-accordion-mark {\n position: relative;\n display: grid;\n place-items: center;\n flex-shrink: 0;\n width: 1.5rem;\n height: 1.5rem;\n}\n\n.rk-accordion-bar {\n position: absolute;\n height: 1px;\n width: 0.875rem;\n background: var(--color-ink-soft);\n}\n\n.rk-accordion-bar-turn {\n transform: rotate(90deg);\n transition: transform 420ms ease-out;\n}\n\n.rk-accordion-bar-turn.is-open {\n transform: rotate(0deg);\n}\n\n/* 0fr to 1fr is the whole trick: a grid row can be animated to a height that\n was never measured, which is what `height: auto` cannot do. */\n.rk-accordion-panel {\n display: grid;\n grid-template-rows: 0fr;\n transition: grid-template-rows 420ms ease-out;\n}\n\n.rk-accordion-panel.is-open {\n grid-template-rows: 1fr;\n}\n\n.rk-accordion-clip {\n overflow: hidden;\n}\n\n.rk-accordion-body {\n max-width: 68ch;\n padding-bottom: 1.5rem;\n color: var(--color-ink-soft);\n line-height: 1.625;\n opacity: 0;\n transition: opacity 300ms;\n}\n\n.rk-accordion-body.is-open {\n opacity: 1;\n}\n\n@media (prefers-reduced-motion: reduce) {\n .rk-accordion-panel,\n .rk-accordion-bar-turn,\n .rk-accordion-body {\n transition: none;\n }\n}\n</style>\n","<script setup lang=\"ts\">\nimport { nextTick, onBeforeUnmount, ref, watch } from 'vue'\n\n/**\n * A dialog that arrives from nowhere.\n *\n * Not `BaseSheet` with different padding. A sheet slides up from the bottom\n * edge, is dismissed by dragging it back down, and belongs to a thumb; a modal\n * appears in the middle of what you were reading and is dismissed by leaving\n * it. They are two answers to two questions and merging them would give a\n * component that is wrong on a phone and wrong on a desktop.\n *\n * ## The parts that are easy to get wrong\n *\n * This is why it exists rather than being written per dialog, which is what the\n * one wide consumer was doing in two places. None of the following is visible\n * on screen when it is missing:\n *\n * - **Focus moves in and comes back.** Opening without moving focus leaves a\n * keyboard user behind the dialog, operating a page they cannot see. Closing\n * without restoring it drops them at the top of the document.\n * - **Tab does not leave.** A dialog you can Tab out of is a dialog that is\n * modal only to somebody using a mouse.\n * - **Escape closes.** Every dialog in every application does this.\n * - **The page underneath does not scroll.** Otherwise dismissing the dialog\n * returns you somewhere else.\n * - **The backdrop closes it, the panel does not.** A click that starts inside\n * the panel and ends on the backdrop is not a click on the backdrop, which is\n * why this listens for a press on the backdrop itself rather than any click\n * that reaches it.\n */\nconst {\n title,\n closeLabel,\n tone = 'default',\n dismissible = true,\n} = defineProps<{\n /** Names the dialog for assistive tech. Required; an unnamed dialog is a box. */\n title: string\n /** Accessible name for the close button. */\n closeLabel: string\n /**\n * `alert` marks it as a decision that interrupts — `role=\"alertdialog\"`,\n * which a screen reader announces immediately rather than on arrival.\n */\n tone?: 'default' | 'alert' | undefined\n /**\n * Whether Escape and the backdrop close it.\n *\n * Off for a dialog that must be answered — but never off as a way of forcing\n * a reader to a decision they have not been given the information for.\n */\n dismissible?: boolean | undefined\n}>()\n\nconst open = defineModel<boolean>({ default: false })\n\ndefineSlots<{\n /** The body. */\n default: () => unknown\n /** Buttons, at the foot. */\n actions?: () => unknown\n}>()\n\nconst panel = ref<HTMLElement | null>(null)\n/** Who had focus before this opened, so it can be given back. */\nlet restoreTo: HTMLElement | null = null\n\nconst FOCUSABLE =\n 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])'\n\nfunction focusable(): HTMLElement[] {\n if (!panel.value) return []\n\n return Array.from(panel.value.querySelectorAll<HTMLElement>(FOCUSABLE))\n}\n\nfunction onKeydown(event: KeyboardEvent) {\n if (event.key === 'Escape' && dismissible) {\n event.stopPropagation()\n open.value = false\n\n return\n }\n\n if (event.key !== 'Tab') return\n\n const items = focusable()\n if (items.length === 0) return event.preventDefault()\n\n const first = items[0]!\n const last = items[items.length - 1]!\n const active = document.activeElement\n\n // The wrap has to be done by hand: the browser's own Tab order is the whole\n // document, and the dialog is only part of it.\n if (event.shiftKey && (active === first || !panel.value?.contains(active))) {\n event.preventDefault()\n last.focus()\n } else if (!event.shiftKey && active === last) {\n event.preventDefault()\n first.focus()\n }\n}\n\nwatch(open, async (isOpen) => {\n if (isOpen) {\n restoreTo = document.activeElement as HTMLElement | null\n document.body.style.overflow = 'hidden'\n await nextTick()\n // The panel itself when it holds nothing focusable, so focus is at least\n // inside the dialog rather than behind it.\n ;(focusable()[0] ?? panel.value)?.focus()\n } else {\n document.body.style.overflow = ''\n restoreTo?.focus()\n restoreTo = null\n }\n})\n\n// A dialog unmounted while open would otherwise leave the page unscrollable,\n// with nothing on screen to explain why.\nonBeforeUnmount(() => {\n if (open.value) document.body.style.overflow = ''\n})\n</script>\n\n<template>\n <Teleport to=\"body\">\n <Transition name=\"rk-modal\">\n <div\n v-if=\"open\"\n class=\"rk-modal-scrim\"\n @keydown=\"onKeydown\"\n @mousedown.self=\"dismissible && (open = false)\"\n >\n <div\n ref=\"panel\"\n class=\"rk-modal-panel\"\n :role=\"tone === 'alert' ? 'alertdialog' : 'dialog'\"\n aria-modal=\"true\"\n :aria-label=\"title\"\n tabindex=\"-1\"\n >\n <div class=\"rk-modal-head\">\n <h2 class=\"rk-modal-title\">{{ title }}</h2>\n\n <button\n v-if=\"dismissible\"\n type=\"button\"\n class=\"rk-modal-close\"\n :aria-label=\"closeLabel\"\n @click=\"open = false\"\n >\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <path d=\"M18 6 6 18M6 6l12 12\" stroke-linecap=\"round\" />\n </svg>\n </button>\n </div>\n\n <div class=\"rk-modal-body\"><slot /></div>\n\n <div v-if=\"$slots.actions\" class=\"rk-modal-actions\"><slot name=\"actions\" /></div>\n </div>\n </div>\n </Transition>\n </Teleport>\n</template>\n\n<style scoped>\n.rk-modal-scrim {\n position: fixed;\n inset: 0;\n z-index: 50;\n display: grid;\n place-items: center;\n padding: 1.5rem;\n background: color-mix(in srgb, var(--color-ink) 70%, transparent);\n backdrop-filter: blur(4px);\n}\n\n.rk-modal-panel {\n width: 100%;\n max-width: 28rem;\n max-height: 85vh;\n overflow-y: auto;\n border-radius: var(--radius-card);\n background: var(--color-surface);\n padding: 1.5rem;\n box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.2);\n}\n\n.rk-modal-panel:focus {\n outline: none;\n}\n\n.rk-modal-head {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: 1rem;\n}\n\n.rk-modal-title {\n font-size: 1.0625rem;\n font-weight: 600;\n color: var(--color-ink);\n}\n\n.rk-modal-close {\n display: grid;\n place-items: center;\n flex-shrink: 0;\n width: 2rem;\n height: 2rem;\n border-radius: 9999px;\n color: var(--color-ink-soft);\n transition: background-color 150ms;\n}\n\n.rk-modal-close:hover {\n background: var(--color-muted);\n}\n\n.rk-modal-close:focus-visible {\n outline: 2px solid var(--color-primary);\n outline-offset: 2px;\n}\n\n.rk-modal-close svg {\n width: 1rem;\n height: 1rem;\n}\n\n.rk-modal-body {\n margin-top: 0.75rem;\n color: var(--color-ink-soft);\n font-size: 0.875rem;\n line-height: 1.625;\n}\n\n.rk-modal-actions {\n margin-top: 1.5rem;\n display: flex;\n justify-content: flex-end;\n gap: 0.5rem;\n}\n\n.rk-modal-enter-active,\n.rk-modal-leave-active {\n transition: opacity 180ms ease;\n}\n\n.rk-modal-enter-active .rk-modal-panel,\n.rk-modal-leave-active .rk-modal-panel {\n transition:\n transform 180ms cubic-bezier(0.32, 0.72, 0, 1),\n opacity 180ms ease;\n}\n\n.rk-modal-enter-from,\n.rk-modal-leave-to {\n opacity: 0;\n}\n\n/* From nowhere, not from an edge: a scale is what separates this from a sheet. */\n.rk-modal-enter-from .rk-modal-panel,\n.rk-modal-leave-to .rk-modal-panel {\n transform: scale(0.96);\n opacity: 0;\n}\n\n@media (prefers-reduced-motion: reduce) {\n .rk-modal-enter-active .rk-modal-panel,\n .rk-modal-leave-active .rk-modal-panel {\n transition: opacity 180ms ease;\n transform: none;\n }\n\n .rk-modal-enter-from .rk-modal-panel,\n .rk-modal-leave-to .rk-modal-panel {\n transform: none;\n }\n}\n</style>\n","<script setup lang=\"ts\">\nimport { nextTick, onBeforeUnmount, ref, watch } from 'vue'\n\n/**\n * A dialog that arrives from nowhere.\n *\n * Not `BaseSheet` with different padding. A sheet slides up from the bottom\n * edge, is dismissed by dragging it back down, and belongs to a thumb; a modal\n * appears in the middle of what you were reading and is dismissed by leaving\n * it. They are two answers to two questions and merging them would give a\n * component that is wrong on a phone and wrong on a desktop.\n *\n * ## The parts that are easy to get wrong\n *\n * This is why it exists rather than being written per dialog, which is what the\n * one wide consumer was doing in two places. None of the following is visible\n * on screen when it is missing:\n *\n * - **Focus moves in and comes back.** Opening without moving focus leaves a\n * keyboard user behind the dialog, operating a page they cannot see. Closing\n * without restoring it drops them at the top of the document.\n * - **Tab does not leave.** A dialog you can Tab out of is a dialog that is\n * modal only to somebody using a mouse.\n * - **Escape closes.** Every dialog in every application does this.\n * - **The page underneath does not scroll.** Otherwise dismissing the dialog\n * returns you somewhere else.\n * - **The backdrop closes it, the panel does not.** A click that starts inside\n * the panel and ends on the backdrop is not a click on the backdrop, which is\n * why this listens for a press on the backdrop itself rather than any click\n * that reaches it.\n */\nconst {\n title,\n closeLabel,\n tone = 'default',\n dismissible = true,\n} = defineProps<{\n /** Names the dialog for assistive tech. Required; an unnamed dialog is a box. */\n title: string\n /** Accessible name for the close button. */\n closeLabel: string\n /**\n * `alert` marks it as a decision that interrupts — `role=\"alertdialog\"`,\n * which a screen reader announces immediately rather than on arrival.\n */\n tone?: 'default' | 'alert' | undefined\n /**\n * Whether Escape and the backdrop close it.\n *\n * Off for a dialog that must be answered — but never off as a way of forcing\n * a reader to a decision they have not been given the information for.\n */\n dismissible?: boolean | undefined\n}>()\n\nconst open = defineModel<boolean>({ default: false })\n\ndefineSlots<{\n /** The body. */\n default: () => unknown\n /** Buttons, at the foot. */\n actions?: () => unknown\n}>()\n\nconst panel = ref<HTMLElement | null>(null)\n/** Who had focus before this opened, so it can be given back. */\nlet restoreTo: HTMLElement | null = null\n\nconst FOCUSABLE =\n 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])'\n\nfunction focusable(): HTMLElement[] {\n if (!panel.value) return []\n\n return Array.from(panel.value.querySelectorAll<HTMLElement>(FOCUSABLE))\n}\n\nfunction onKeydown(event: KeyboardEvent) {\n if (event.key === 'Escape' && dismissible) {\n event.stopPropagation()\n open.value = false\n\n return\n }\n\n if (event.key !== 'Tab') return\n\n const items = focusable()\n if (items.length === 0) return event.preventDefault()\n\n const first = items[0]!\n const last = items[items.length - 1]!\n const active = document.activeElement\n\n // The wrap has to be done by hand: the browser's own Tab order is the whole\n // document, and the dialog is only part of it.\n if (event.shiftKey && (active === first || !panel.value?.contains(active))) {\n event.preventDefault()\n last.focus()\n } else if (!event.shiftKey && active === last) {\n event.preventDefault()\n first.focus()\n }\n}\n\nwatch(open, async (isOpen) => {\n if (isOpen) {\n restoreTo = document.activeElement as HTMLElement | null\n document.body.style.overflow = 'hidden'\n await nextTick()\n // The panel itself when it holds nothing focusable, so focus is at least\n // inside the dialog rather than behind it.\n ;(focusable()[0] ?? panel.value)?.focus()\n } else {\n document.body.style.overflow = ''\n restoreTo?.focus()\n restoreTo = null\n }\n})\n\n// A dialog unmounted while open would otherwise leave the page unscrollable,\n// with nothing on screen to explain why.\nonBeforeUnmount(() => {\n if (open.value) document.body.style.overflow = ''\n})\n</script>\n\n<template>\n <Teleport to=\"body\">\n <Transition name=\"rk-modal\">\n <div\n v-if=\"open\"\n class=\"rk-modal-scrim\"\n @keydown=\"onKeydown\"\n @mousedown.self=\"dismissible && (open = false)\"\n >\n <div\n ref=\"panel\"\n class=\"rk-modal-panel\"\n :role=\"tone === 'alert' ? 'alertdialog' : 'dialog'\"\n aria-modal=\"true\"\n :aria-label=\"title\"\n tabindex=\"-1\"\n >\n <div class=\"rk-modal-head\">\n <h2 class=\"rk-modal-title\">{{ title }}</h2>\n\n <button\n v-if=\"dismissible\"\n type=\"button\"\n class=\"rk-modal-close\"\n :aria-label=\"closeLabel\"\n @click=\"open = false\"\n >\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <path d=\"M18 6 6 18M6 6l12 12\" stroke-linecap=\"round\" />\n </svg>\n </button>\n </div>\n\n <div class=\"rk-modal-body\"><slot /></div>\n\n <div v-if=\"$slots.actions\" class=\"rk-modal-actions\"><slot name=\"actions\" /></div>\n </div>\n </div>\n </Transition>\n </Teleport>\n</template>\n\n<style scoped>\n.rk-modal-scrim {\n position: fixed;\n inset: 0;\n z-index: 50;\n display: grid;\n place-items: center;\n padding: 1.5rem;\n background: color-mix(in srgb, var(--color-ink) 70%, transparent);\n backdrop-filter: blur(4px);\n}\n\n.rk-modal-panel {\n width: 100%;\n max-width: 28rem;\n max-height: 85vh;\n overflow-y: auto;\n border-radius: var(--radius-card);\n background: var(--color-surface);\n padding: 1.5rem;\n box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.2);\n}\n\n.rk-modal-panel:focus {\n outline: none;\n}\n\n.rk-modal-head {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: 1rem;\n}\n\n.rk-modal-title {\n font-size: 1.0625rem;\n font-weight: 600;\n color: var(--color-ink);\n}\n\n.rk-modal-close {\n display: grid;\n place-items: center;\n flex-shrink: 0;\n width: 2rem;\n height: 2rem;\n border-radius: 9999px;\n color: var(--color-ink-soft);\n transition: background-color 150ms;\n}\n\n.rk-modal-close:hover {\n background: var(--color-muted);\n}\n\n.rk-modal-close:focus-visible {\n outline: 2px solid var(--color-primary);\n outline-offset: 2px;\n}\n\n.rk-modal-close svg {\n width: 1rem;\n height: 1rem;\n}\n\n.rk-modal-body {\n margin-top: 0.75rem;\n color: var(--color-ink-soft);\n font-size: 0.875rem;\n line-height: 1.625;\n}\n\n.rk-modal-actions {\n margin-top: 1.5rem;\n display: flex;\n justify-content: flex-end;\n gap: 0.5rem;\n}\n\n.rk-modal-enter-active,\n.rk-modal-leave-active {\n transition: opacity 180ms ease;\n}\n\n.rk-modal-enter-active .rk-modal-panel,\n.rk-modal-leave-active .rk-modal-panel {\n transition:\n transform 180ms cubic-bezier(0.32, 0.72, 0, 1),\n opacity 180ms ease;\n}\n\n.rk-modal-enter-from,\n.rk-modal-leave-to {\n opacity: 0;\n}\n\n/* From nowhere, not from an edge: a scale is what separates this from a sheet. */\n.rk-modal-enter-from .rk-modal-panel,\n.rk-modal-leave-to .rk-modal-panel {\n transform: scale(0.96);\n opacity: 0;\n}\n\n@media (prefers-reduced-motion: reduce) {\n .rk-modal-enter-active .rk-modal-panel,\n .rk-modal-leave-active .rk-modal-panel {\n transition: opacity 180ms ease;\n transform: none;\n }\n\n .rk-modal-enter-from .rk-modal-panel,\n .rk-modal-leave-to .rk-modal-panel {\n transform: none;\n }\n}\n</style>\n","<script setup lang=\"ts\" generic=\"K extends string\">\nimport { RouterLink } from 'vue-router'\n\nexport interface NavLinkItem<K extends string> {\n /** Identity, compared against `active`. */\n key: K\n /** Router destination. */\n to: string\n /** Already translated. */\n label: string\n}\n\n/**\n * The primary navigation of a wide site.\n *\n * The same contract as `TabBar` minus the icon, so moving an app between a\n * bottom bar and a top one is a change of component and not of data. That is\n * the whole reason the shapes match.\n *\n * A rule under the current section rather than a filled pill: at this size a\n * pill reads as a button, and these are not buttons — they are where you are.\n * The rule is a scaled element rather than a border so it can travel, and it is\n * `aria-hidden` because `aria-current` already says the same thing to anyone not\n * looking at it.\n */\nconst {\n items,\n active,\n label = '',\n} = defineProps<{\n items: readonly NavLinkItem<K>[]\n /** Which item is current. Usually derived from the route. */\n active?: K | undefined\n /** Accessible name for the navigation landmark. */\n label?: string | undefined\n}>()\n</script>\n\n<template>\n <nav :aria-label=\"label || undefined\">\n <div class=\"rk-nav-inner\">\n <RouterLink\n v-for=\"item in items\"\n :key=\"item.key\"\n :to=\"item.to\"\n class=\"rk-nav-link\"\n :class=\"{ 'is-active': item.key === active }\"\n :aria-current=\"item.key === active ? 'page' : undefined\"\n >\n {{ item.label }}\n <span class=\"rk-nav-rule\" aria-hidden=\"true\" />\n </RouterLink>\n </div>\n </nav>\n</template>\n\n<style scoped>\n/* The root carries no layout of its own, and that is the fix for a real bug\n rather than a style preference.\n\n A rule on the root loses to nothing: Vue's scoped CSS compiles `.rk-nav` to\n `.rk-nav[data-v-hash]`, which outranks a utility class like Tailwind's\n `hidden` outright — so `class=\"hidden sm:flex\"` did nothing and the nav\n appeared on a phone, on top of the call to action. `:where()` does not save\n it either; the scoping attribute puts the specificity back.\n\n So the flex row lives on an element the caller does not own, and the root is\n left for them to style. `TabBar` is built the same way for the same reason. */\n.rk-nav-inner {\n display: flex;\n align-items: center;\n gap: 0.25rem;\n}\n\n.rk-nav-link {\n position: relative;\n border-radius: var(--radius-cell);\n padding: 0.5rem 0.75rem;\n font-size: 0.875rem;\n color: var(--color-ink-soft);\n transition: color 150ms;\n}\n\n.rk-nav-link:hover {\n color: var(--color-ink);\n}\n\n.rk-nav-link:focus-visible {\n outline: 2px solid var(--color-primary);\n outline-offset: 2px;\n}\n\n.rk-nav-link.is-active {\n color: var(--color-ink);\n font-weight: 500;\n}\n\n.rk-nav-rule {\n position: absolute;\n inset-inline: 0.75rem;\n bottom: -1px;\n height: 2px;\n border-radius: 9999px;\n background: var(--color-primary);\n transform: scaleX(0);\n transform-origin: left;\n transition: transform 300ms;\n}\n\n.rk-nav-link.is-active .rk-nav-rule {\n transform: scaleX(1);\n}\n\n@media (prefers-reduced-motion: reduce) {\n .rk-nav-rule {\n transition: none;\n }\n}\n</style>\n","<script setup lang=\"ts\" generic=\"K extends string\">\nimport { RouterLink } from 'vue-router'\n\nexport interface NavLinkItem<K extends string> {\n /** Identity, compared against `active`. */\n key: K\n /** Router destination. */\n to: string\n /** Already translated. */\n label: string\n}\n\n/**\n * The primary navigation of a wide site.\n *\n * The same contract as `TabBar` minus the icon, so moving an app between a\n * bottom bar and a top one is a change of component and not of data. That is\n * the whole reason the shapes match.\n *\n * A rule under the current section rather than a filled pill: at this size a\n * pill reads as a button, and these are not buttons — they are where you are.\n * The rule is a scaled element rather than a border so it can travel, and it is\n * `aria-hidden` because `aria-current` already says the same thing to anyone not\n * looking at it.\n */\nconst {\n items,\n active,\n label = '',\n} = defineProps<{\n items: readonly NavLinkItem<K>[]\n /** Which item is current. Usually derived from the route. */\n active?: K | undefined\n /** Accessible name for the navigation landmark. */\n label?: string | undefined\n}>()\n</script>\n\n<template>\n <nav :aria-label=\"label || undefined\">\n <div class=\"rk-nav-inner\">\n <RouterLink\n v-for=\"item in items\"\n :key=\"item.key\"\n :to=\"item.to\"\n class=\"rk-nav-link\"\n :class=\"{ 'is-active': item.key === active }\"\n :aria-current=\"item.key === active ? 'page' : undefined\"\n >\n {{ item.label }}\n <span class=\"rk-nav-rule\" aria-hidden=\"true\" />\n </RouterLink>\n </div>\n </nav>\n</template>\n\n<style scoped>\n/* The root carries no layout of its own, and that is the fix for a real bug\n rather than a style preference.\n\n A rule on the root loses to nothing: Vue's scoped CSS compiles `.rk-nav` to\n `.rk-nav[data-v-hash]`, which outranks a utility class like Tailwind's\n `hidden` outright — so `class=\"hidden sm:flex\"` did nothing and the nav\n appeared on a phone, on top of the call to action. `:where()` does not save\n it either; the scoping attribute puts the specificity back.\n\n So the flex row lives on an element the caller does not own, and the root is\n left for them to style. `TabBar` is built the same way for the same reason. */\n.rk-nav-inner {\n display: flex;\n align-items: center;\n gap: 0.25rem;\n}\n\n.rk-nav-link {\n position: relative;\n border-radius: var(--radius-cell);\n padding: 0.5rem 0.75rem;\n font-size: 0.875rem;\n color: var(--color-ink-soft);\n transition: color 150ms;\n}\n\n.rk-nav-link:hover {\n color: var(--color-ink);\n}\n\n.rk-nav-link:focus-visible {\n outline: 2px solid var(--color-primary);\n outline-offset: 2px;\n}\n\n.rk-nav-link.is-active {\n color: var(--color-ink);\n font-weight: 500;\n}\n\n.rk-nav-rule {\n position: absolute;\n inset-inline: 0.75rem;\n bottom: -1px;\n height: 2px;\n border-radius: 9999px;\n background: var(--color-primary);\n transform: scaleX(0);\n transform-origin: left;\n transition: transform 300ms;\n}\n\n.rk-nav-link.is-active .rk-nav-rule {\n transform: scaleX(1);\n}\n\n@media (prefers-reduced-motion: reduce) {\n .rk-nav-rule {\n transition: none;\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoDA,MAAM,MAAM,MAAM;EAIlB,MAAM,OAAO,WAAgB,CAAC,CAAC;EAE/B,MAAM,UAAU,QAAW,KAAK,MAAM,SAAS,GAAG;EAElD,SAAS,OAAO,KAAQ;GACtB,IAAI,OAAO,GAAG,GACZ,KAAK,QAAQ,KAAK,MAAM,QAAQ,MAAM,MAAM,GAAG;QAE/C,KAAK,QAAQ,QAAA,WAAW,CAAC,GAAG,KAAK,OAAO,GAAG,IAAI,CAAC,GAAG;EAEvD;;GAIE,OAAA,UAAA,GAAA,mBAoCK,MApCL,cAoCK,EAnCH,UAAA,IAAA,GAAA,mBAkCK,UAAA,MAAA,WAlCc,QAAA,QAAR,SAAI;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M,CAAA,CAAA;KACzC,gBAAc,KAAK,QAAQ,QAAA,SAAM,SAAY,KAAA;;KAE9C,SAAA,cAAgB,CAAb,gBAAA,gBAAA,KAAK,KAAK,IAAG,KAChB,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,mBAA+C,QAAA;MAAzC,OAAM;MAAc,eAAY"}
|
|
1
|
+
{"version":3,"file":"web.js","names":["$slots"],"sources":["../src/web/BaseAccordion.vue","../src/web/BaseAccordion.vue","../src/web/BaseBreadcrumb.vue","../src/web/BaseBreadcrumb.vue","../src/web/BaseDisclosure.vue","../src/web/BaseDisclosure.vue","../src/web/BaseModal.vue","../src/web/BaseModal.vue","../src/web/BasePagination.vue","../src/web/BasePagination.vue","../src/web/BaseTabs.vue","../src/web/BaseTabs.vue","../src/web/BaseTooltip.vue","../src/web/BaseTooltip.vue","../src/web/NavLinks.vue","../src/web/NavLinks.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"K extends string\">\nimport { shallowRef, useId } from 'vue'\n\nexport interface AccordionItem<K extends string> {\n key: K\n /** The question. Already translated. */\n title: string\n}\n\n/**\n * A list that opens one section at a time.\n *\n * ## Why not `<details>`\n *\n * `<details>` is the honest element for this and it was the first choice. A\n * browser removes its content from layout entirely when closed, so there is\n * nothing to animate between — the panel can only appear. Faking it by leaving\n * `open` set and hiding with CSS tells a screen reader the section is expanded\n * while a sighted reader sees it shut, which is worse than no animation.\n *\n * So: a button carrying `aria-expanded`, the answer always in the markup — the\n * prerendered HTML carries every answer, which is what a crawler and a reader\n * without JavaScript get — and a grid row that travels from `0fr` to `1fr`,\n * which is the one way to animate to a height nobody has measured.\n *\n * The content is always present, so anything expensive in it is paid for on\n * first paint. That is the trade: a section a crawler can read costs a section\n * that is never lazy.\n */\nconst {\n items,\n multiple = false,\n headingLevel = 3,\n} = defineProps<{\n items: readonly AccordionItem<K>[]\n /** Allow several open at once. Off by default, which is what makes it an accordion. */\n multiple?: boolean | undefined\n /**\n * Which heading the control sits inside.\n *\n * A heading, always — it is how a screen reader user moves between sections\n * without opening any of them. The level is a prop because it depends on what\n * is above it on the page, and getting it wrong breaks the outline.\n */\n headingLevel?: 2 | 3 | 4 | undefined\n}>()\n\ndefineSlots<{\n /** The answer, per item. */\n default: (props: { item: AccordionItem<K>; open: boolean }) => unknown\n}>()\n\nconst uid = useId()\n/* `shallowRef` because the list is replaced wholesale rather than mutated, and\n because a deep ref unwraps a generic key type into something TypeScript can\n no longer match against `K`. */\nconst open = shallowRef<K[]>([])\n\nconst isOpen = (key: K) => open.value.includes(key)\n\nfunction toggle(key: K) {\n if (isOpen(key)) {\n open.value = open.value.filter((k) => k !== key)\n } else {\n open.value = multiple ? [...open.value, key] : [key]\n }\n}\n</script>\n\n<template>\n <ul class=\"rk-accordion\">\n <li v-for=\"item in items\" :key=\"item.key\" class=\"rk-accordion-item\">\n <component :is=\"`h${headingLevel}`\">\n <button\n type=\"button\"\n class=\"rk-accordion-control\"\n :aria-expanded=\"isOpen(item.key)\"\n :aria-controls=\"`${uid}-${item.key}`\"\n @click=\"toggle(item.key)\"\n >\n <span class=\"rk-accordion-title\">{{ item.title }}</span>\n\n <!-- A plus that becomes a minus: one stroke turns, so the control\n keeps its place while it changes meaning. -->\n <span class=\"rk-accordion-mark\" aria-hidden=\"true\">\n <span class=\"rk-accordion-bar\" />\n <span\n class=\"rk-accordion-bar rk-accordion-bar-turn\"\n :class=\"{ 'is-open': isOpen(item.key) }\"\n />\n </span>\n </button>\n </component>\n\n <div\n :id=\"`${uid}-${item.key}`\"\n class=\"rk-accordion-panel\"\n :class=\"{ 'is-open': isOpen(item.key) }\"\n >\n <div class=\"rk-accordion-clip\">\n <div class=\"rk-accordion-body\" :class=\"{ 'is-open': isOpen(item.key) }\">\n <slot :item=\"item\" :open=\"isOpen(item.key)\" />\n </div>\n </div>\n </div>\n </li>\n </ul>\n</template>\n\n<style scoped>\n.rk-accordion {\n border-top: 1px solid color-mix(in srgb, var(--color-hair) 70%, transparent);\n}\n\n.rk-accordion-item {\n border-bottom: 1px solid color-mix(in srgb, var(--color-hair) 70%, transparent);\n}\n\n.rk-accordion-control {\n display: flex;\n width: 100%;\n cursor: pointer;\n align-items: center;\n justify-content: space-between;\n gap: 1.5rem;\n padding: 1.25rem 0;\n text-align: left;\n transition: color 150ms;\n}\n\n.rk-accordion-control:hover {\n color: var(--color-primary);\n}\n\n.rk-accordion-control:focus-visible {\n outline: 2px solid var(--color-primary);\n outline-offset: 2px;\n}\n\n.rk-accordion-title {\n color: var(--color-ink);\n font-size: 1rem;\n font-weight: 500;\n}\n\n.rk-accordion-mark {\n position: relative;\n display: grid;\n place-items: center;\n flex-shrink: 0;\n width: 1.5rem;\n height: 1.5rem;\n}\n\n.rk-accordion-bar {\n position: absolute;\n height: 1px;\n width: 0.875rem;\n background: var(--color-ink-soft);\n}\n\n.rk-accordion-bar-turn {\n transform: rotate(90deg);\n transition: transform 420ms ease-out;\n}\n\n.rk-accordion-bar-turn.is-open {\n transform: rotate(0deg);\n}\n\n/* 0fr to 1fr is the whole trick: a grid row can be animated to a height that\n was never measured, which is what `height: auto` cannot do. */\n.rk-accordion-panel {\n display: grid;\n grid-template-rows: 0fr;\n transition: grid-template-rows 420ms ease-out;\n}\n\n.rk-accordion-panel.is-open {\n grid-template-rows: 1fr;\n}\n\n.rk-accordion-clip {\n overflow: hidden;\n}\n\n.rk-accordion-body {\n max-width: 68ch;\n padding-bottom: 1.5rem;\n color: var(--color-ink-soft);\n line-height: 1.625;\n opacity: 0;\n transition: opacity 300ms;\n}\n\n.rk-accordion-body.is-open {\n opacity: 1;\n}\n\n@media (prefers-reduced-motion: reduce) {\n .rk-accordion-panel,\n .rk-accordion-bar-turn,\n .rk-accordion-body {\n transition: none;\n }\n}\n</style>\n","<script setup lang=\"ts\" generic=\"K extends string\">\nimport { shallowRef, useId } from 'vue'\n\nexport interface AccordionItem<K extends string> {\n key: K\n /** The question. Already translated. */\n title: string\n}\n\n/**\n * A list that opens one section at a time.\n *\n * ## Why not `<details>`\n *\n * `<details>` is the honest element for this and it was the first choice. A\n * browser removes its content from layout entirely when closed, so there is\n * nothing to animate between — the panel can only appear. Faking it by leaving\n * `open` set and hiding with CSS tells a screen reader the section is expanded\n * while a sighted reader sees it shut, which is worse than no animation.\n *\n * So: a button carrying `aria-expanded`, the answer always in the markup — the\n * prerendered HTML carries every answer, which is what a crawler and a reader\n * without JavaScript get — and a grid row that travels from `0fr` to `1fr`,\n * which is the one way to animate to a height nobody has measured.\n *\n * The content is always present, so anything expensive in it is paid for on\n * first paint. That is the trade: a section a crawler can read costs a section\n * that is never lazy.\n */\nconst {\n items,\n multiple = false,\n headingLevel = 3,\n} = defineProps<{\n items: readonly AccordionItem<K>[]\n /** Allow several open at once. Off by default, which is what makes it an accordion. */\n multiple?: boolean | undefined\n /**\n * Which heading the control sits inside.\n *\n * A heading, always — it is how a screen reader user moves between sections\n * without opening any of them. The level is a prop because it depends on what\n * is above it on the page, and getting it wrong breaks the outline.\n */\n headingLevel?: 2 | 3 | 4 | undefined\n}>()\n\ndefineSlots<{\n /** The answer, per item. */\n default: (props: { item: AccordionItem<K>; open: boolean }) => unknown\n}>()\n\nconst uid = useId()\n/* `shallowRef` because the list is replaced wholesale rather than mutated, and\n because a deep ref unwraps a generic key type into something TypeScript can\n no longer match against `K`. */\nconst open = shallowRef<K[]>([])\n\nconst isOpen = (key: K) => open.value.includes(key)\n\nfunction toggle(key: K) {\n if (isOpen(key)) {\n open.value = open.value.filter((k) => k !== key)\n } else {\n open.value = multiple ? [...open.value, key] : [key]\n }\n}\n</script>\n\n<template>\n <ul class=\"rk-accordion\">\n <li v-for=\"item in items\" :key=\"item.key\" class=\"rk-accordion-item\">\n <component :is=\"`h${headingLevel}`\">\n <button\n type=\"button\"\n class=\"rk-accordion-control\"\n :aria-expanded=\"isOpen(item.key)\"\n :aria-controls=\"`${uid}-${item.key}`\"\n @click=\"toggle(item.key)\"\n >\n <span class=\"rk-accordion-title\">{{ item.title }}</span>\n\n <!-- A plus that becomes a minus: one stroke turns, so the control\n keeps its place while it changes meaning. -->\n <span class=\"rk-accordion-mark\" aria-hidden=\"true\">\n <span class=\"rk-accordion-bar\" />\n <span\n class=\"rk-accordion-bar rk-accordion-bar-turn\"\n :class=\"{ 'is-open': isOpen(item.key) }\"\n />\n </span>\n </button>\n </component>\n\n <div\n :id=\"`${uid}-${item.key}`\"\n class=\"rk-accordion-panel\"\n :class=\"{ 'is-open': isOpen(item.key) }\"\n >\n <div class=\"rk-accordion-clip\">\n <div class=\"rk-accordion-body\" :class=\"{ 'is-open': isOpen(item.key) }\">\n <slot :item=\"item\" :open=\"isOpen(item.key)\" />\n </div>\n </div>\n </div>\n </li>\n </ul>\n</template>\n\n<style scoped>\n.rk-accordion {\n border-top: 1px solid color-mix(in srgb, var(--color-hair) 70%, transparent);\n}\n\n.rk-accordion-item {\n border-bottom: 1px solid color-mix(in srgb, var(--color-hair) 70%, transparent);\n}\n\n.rk-accordion-control {\n display: flex;\n width: 100%;\n cursor: pointer;\n align-items: center;\n justify-content: space-between;\n gap: 1.5rem;\n padding: 1.25rem 0;\n text-align: left;\n transition: color 150ms;\n}\n\n.rk-accordion-control:hover {\n color: var(--color-primary);\n}\n\n.rk-accordion-control:focus-visible {\n outline: 2px solid var(--color-primary);\n outline-offset: 2px;\n}\n\n.rk-accordion-title {\n color: var(--color-ink);\n font-size: 1rem;\n font-weight: 500;\n}\n\n.rk-accordion-mark {\n position: relative;\n display: grid;\n place-items: center;\n flex-shrink: 0;\n width: 1.5rem;\n height: 1.5rem;\n}\n\n.rk-accordion-bar {\n position: absolute;\n height: 1px;\n width: 0.875rem;\n background: var(--color-ink-soft);\n}\n\n.rk-accordion-bar-turn {\n transform: rotate(90deg);\n transition: transform 420ms ease-out;\n}\n\n.rk-accordion-bar-turn.is-open {\n transform: rotate(0deg);\n}\n\n/* 0fr to 1fr is the whole trick: a grid row can be animated to a height that\n was never measured, which is what `height: auto` cannot do. */\n.rk-accordion-panel {\n display: grid;\n grid-template-rows: 0fr;\n transition: grid-template-rows 420ms ease-out;\n}\n\n.rk-accordion-panel.is-open {\n grid-template-rows: 1fr;\n}\n\n.rk-accordion-clip {\n overflow: hidden;\n}\n\n.rk-accordion-body {\n max-width: 68ch;\n padding-bottom: 1.5rem;\n color: var(--color-ink-soft);\n line-height: 1.625;\n opacity: 0;\n transition: opacity 300ms;\n}\n\n.rk-accordion-body.is-open {\n opacity: 1;\n}\n\n@media (prefers-reduced-motion: reduce) {\n .rk-accordion-panel,\n .rk-accordion-bar-turn,\n .rk-accordion-body {\n transition: none;\n }\n}\n</style>\n","<script setup lang=\"ts\">\nimport { RouterLink } from 'vue-router'\n\nexport interface Crumb {\n /** Already translated. */\n label: string\n /** Omitted for the current page, which is not a link to itself. */\n to?: string | undefined\n}\n\n/**\n * Where this page sits, and the way back up.\n *\n * An ordered list inside a `nav`, because the order is the meaning. The last\n * crumb is the current page and is deliberately not a link: a link to the page\n * you are on is a control that does nothing, and `aria-current=\"page\"` is what\n * says so to everyone else.\n *\n * The separators are `aria-hidden`. A screen reader announces a list and its\n * position in it; reading \"slash\" between every item is noise on top of\n * information the reader already has.\n */\nconst { items, label = '' } = defineProps<{\n items: readonly Crumb[]\n /** Accessible name for the landmark. */\n label?: string | undefined\n}>()\n</script>\n\n<template>\n <nav :aria-label=\"label || undefined\">\n <ol class=\"rk-crumbs\">\n <li v-for=\"(item, index) in items\" :key=\"item.label\" class=\"rk-crumb\">\n <RouterLink v-if=\"item.to\" :to=\"item.to\" class=\"rk-crumb-link\">\n {{ item.label }}\n </RouterLink>\n <span v-else class=\"rk-crumb-current\" aria-current=\"page\">{{ item.label }}</span>\n\n <span v-if=\"index < items.length - 1\" class=\"rk-crumb-sep\" aria-hidden=\"true\">/</span>\n </li>\n </ol>\n </nav>\n</template>\n\n<style scoped>\n.rk-crumbs {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 0.5rem;\n font-size: 0.8125rem;\n}\n\n.rk-crumb {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n}\n\n.rk-crumb-link {\n color: var(--color-ink-soft);\n transition: color 150ms;\n}\n\n.rk-crumb-link:hover {\n color: var(--color-ink);\n}\n\n.rk-crumb-link:focus-visible {\n outline: 2px solid var(--color-primary);\n outline-offset: 2px;\n border-radius: 2px;\n}\n\n.rk-crumb-current {\n color: var(--color-ink);\n font-weight: 500;\n}\n\n.rk-crumb-sep {\n color: var(--color-hair);\n}\n</style>\n","<script setup lang=\"ts\">\nimport { RouterLink } from 'vue-router'\n\nexport interface Crumb {\n /** Already translated. */\n label: string\n /** Omitted for the current page, which is not a link to itself. */\n to?: string | undefined\n}\n\n/**\n * Where this page sits, and the way back up.\n *\n * An ordered list inside a `nav`, because the order is the meaning. The last\n * crumb is the current page and is deliberately not a link: a link to the page\n * you are on is a control that does nothing, and `aria-current=\"page\"` is what\n * says so to everyone else.\n *\n * The separators are `aria-hidden`. A screen reader announces a list and its\n * position in it; reading \"slash\" between every item is noise on top of\n * information the reader already has.\n */\nconst { items, label = '' } = defineProps<{\n items: readonly Crumb[]\n /** Accessible name for the landmark. */\n label?: string | undefined\n}>()\n</script>\n\n<template>\n <nav :aria-label=\"label || undefined\">\n <ol class=\"rk-crumbs\">\n <li v-for=\"(item, index) in items\" :key=\"item.label\" class=\"rk-crumb\">\n <RouterLink v-if=\"item.to\" :to=\"item.to\" class=\"rk-crumb-link\">\n {{ item.label }}\n </RouterLink>\n <span v-else class=\"rk-crumb-current\" aria-current=\"page\">{{ item.label }}</span>\n\n <span v-if=\"index < items.length - 1\" class=\"rk-crumb-sep\" aria-hidden=\"true\">/</span>\n </li>\n </ol>\n </nav>\n</template>\n\n<style scoped>\n.rk-crumbs {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 0.5rem;\n font-size: 0.8125rem;\n}\n\n.rk-crumb {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n}\n\n.rk-crumb-link {\n color: var(--color-ink-soft);\n transition: color 150ms;\n}\n\n.rk-crumb-link:hover {\n color: var(--color-ink);\n}\n\n.rk-crumb-link:focus-visible {\n outline: 2px solid var(--color-primary);\n outline-offset: 2px;\n border-radius: 2px;\n}\n\n.rk-crumb-current {\n color: var(--color-ink);\n font-weight: 500;\n}\n\n.rk-crumb-sep {\n color: var(--color-hair);\n}\n</style>\n","<script setup lang=\"ts\">\nimport { useId } from 'vue'\n\n/**\n * One section that opens and closes.\n *\n * `BaseAccordion` is a list of these with the rule that only one stays open.\n * This is the same row on its own, for the common case where the list belongs\n * to the app — because it is staggered as it scrolls in, or interleaved with\n * something else, or rendered from a source the accordion cannot know about.\n *\n * That case is not hypothetical: the first list this kit met decorated every\n * row with a reveal directive, which has to sit on the element the accordion\n * would have owned. Shipping only the list would have meant choosing between\n * the component and the design.\n *\n * ## Why not `<details>`\n *\n * A browser removes `<details>` content from layout entirely when closed, so\n * there is nothing to animate between — the panel can only appear. Faking it by\n * leaving `open` set and hiding with CSS tells a screen reader the section is\n * expanded while a sighted reader sees it shut, which is worse than no\n * animation.\n *\n * So: a button carrying `aria-expanded`, the content always in the markup —\n * which is what a crawler and a reader without JavaScript get — and a grid row\n * travelling from `0fr` to `1fr`, the one way to animate to a height nobody has\n * measured.\n */\nconst { title, headingLevel = 3 } = defineProps<{\n /** The question. Already translated. */\n title: string\n /**\n * Which heading the control sits inside.\n *\n * A heading, always — it is how a screen reader user moves between sections\n * without opening any of them. The level depends on what is above it on the\n * page, and getting it wrong breaks the outline.\n */\n headingLevel?: 2 | 3 | 4 | undefined\n}>()\n\nconst open = defineModel<boolean>({ default: false })\n\ndefineSlots<{\n /** The answer. */\n default: () => unknown\n}>()\n\nconst id = useId()\n</script>\n\n<template>\n <div class=\"rk-disclosure\">\n <component :is=\"`h${headingLevel}`\">\n <button\n type=\"button\"\n class=\"rk-disclosure-control\"\n :aria-expanded=\"open\"\n :aria-controls=\"id\"\n @click=\"open = !open\"\n >\n <span class=\"rk-disclosure-title\">{{ title }}</span>\n\n <!-- A plus that becomes a minus: one stroke turns, so the control keeps\n its place while it changes meaning. -->\n <span class=\"rk-disclosure-mark\" aria-hidden=\"true\">\n <span class=\"rk-disclosure-bar\" />\n <span class=\"rk-disclosure-bar rk-disclosure-turn\" :class=\"{ 'is-open': open }\" />\n </span>\n </button>\n </component>\n\n <div :id=\"id\" class=\"rk-disclosure-panel\" :class=\"{ 'is-open': open }\">\n <div class=\"rk-disclosure-clip\">\n <div class=\"rk-disclosure-body\" :class=\"{ 'is-open': open }\"><slot /></div>\n </div>\n </div>\n </div>\n</template>\n\n<style scoped>\n.rk-disclosure-control {\n display: flex;\n width: 100%;\n cursor: pointer;\n align-items: center;\n justify-content: space-between;\n gap: 1.5rem;\n padding: 1.25rem 0;\n text-align: left;\n transition: color 150ms;\n}\n\n.rk-disclosure-control:hover {\n color: var(--color-primary);\n}\n\n.rk-disclosure-control:focus-visible {\n outline: 2px solid var(--color-primary);\n outline-offset: 2px;\n}\n\n.rk-disclosure-title {\n color: var(--color-ink);\n font-size: 1rem;\n font-weight: 500;\n}\n\n.rk-disclosure-mark {\n position: relative;\n display: grid;\n place-items: center;\n flex-shrink: 0;\n width: 1.5rem;\n height: 1.5rem;\n}\n\n.rk-disclosure-bar {\n position: absolute;\n height: 1px;\n width: 0.875rem;\n background: var(--color-ink-soft);\n}\n\n.rk-disclosure-turn {\n transform: rotate(90deg);\n transition: transform 420ms ease-out;\n}\n\n.rk-disclosure-turn.is-open {\n transform: rotate(0deg);\n}\n\n/* 0fr to 1fr is the whole trick: a grid row can be animated to a height that\n was never measured, which `height: auto` cannot do. */\n.rk-disclosure-panel {\n display: grid;\n grid-template-rows: 0fr;\n transition: grid-template-rows 420ms ease-out;\n}\n\n.rk-disclosure-panel.is-open {\n grid-template-rows: 1fr;\n}\n\n.rk-disclosure-clip {\n overflow: hidden;\n}\n\n.rk-disclosure-body {\n max-width: 68ch;\n padding-bottom: 1.5rem;\n color: var(--color-ink-soft);\n line-height: 1.625;\n opacity: 0;\n transition: opacity 300ms;\n}\n\n.rk-disclosure-body.is-open {\n opacity: 1;\n}\n\n@media (prefers-reduced-motion: reduce) {\n .rk-disclosure-panel,\n .rk-disclosure-turn,\n .rk-disclosure-body {\n transition: none;\n }\n}\n</style>\n","<script setup lang=\"ts\">\nimport { useId } from 'vue'\n\n/**\n * One section that opens and closes.\n *\n * `BaseAccordion` is a list of these with the rule that only one stays open.\n * This is the same row on its own, for the common case where the list belongs\n * to the app — because it is staggered as it scrolls in, or interleaved with\n * something else, or rendered from a source the accordion cannot know about.\n *\n * That case is not hypothetical: the first list this kit met decorated every\n * row with a reveal directive, which has to sit on the element the accordion\n * would have owned. Shipping only the list would have meant choosing between\n * the component and the design.\n *\n * ## Why not `<details>`\n *\n * A browser removes `<details>` content from layout entirely when closed, so\n * there is nothing to animate between — the panel can only appear. Faking it by\n * leaving `open` set and hiding with CSS tells a screen reader the section is\n * expanded while a sighted reader sees it shut, which is worse than no\n * animation.\n *\n * So: a button carrying `aria-expanded`, the content always in the markup —\n * which is what a crawler and a reader without JavaScript get — and a grid row\n * travelling from `0fr` to `1fr`, the one way to animate to a height nobody has\n * measured.\n */\nconst { title, headingLevel = 3 } = defineProps<{\n /** The question. Already translated. */\n title: string\n /**\n * Which heading the control sits inside.\n *\n * A heading, always — it is how a screen reader user moves between sections\n * without opening any of them. The level depends on what is above it on the\n * page, and getting it wrong breaks the outline.\n */\n headingLevel?: 2 | 3 | 4 | undefined\n}>()\n\nconst open = defineModel<boolean>({ default: false })\n\ndefineSlots<{\n /** The answer. */\n default: () => unknown\n}>()\n\nconst id = useId()\n</script>\n\n<template>\n <div class=\"rk-disclosure\">\n <component :is=\"`h${headingLevel}`\">\n <button\n type=\"button\"\n class=\"rk-disclosure-control\"\n :aria-expanded=\"open\"\n :aria-controls=\"id\"\n @click=\"open = !open\"\n >\n <span class=\"rk-disclosure-title\">{{ title }}</span>\n\n <!-- A plus that becomes a minus: one stroke turns, so the control keeps\n its place while it changes meaning. -->\n <span class=\"rk-disclosure-mark\" aria-hidden=\"true\">\n <span class=\"rk-disclosure-bar\" />\n <span class=\"rk-disclosure-bar rk-disclosure-turn\" :class=\"{ 'is-open': open }\" />\n </span>\n </button>\n </component>\n\n <div :id=\"id\" class=\"rk-disclosure-panel\" :class=\"{ 'is-open': open }\">\n <div class=\"rk-disclosure-clip\">\n <div class=\"rk-disclosure-body\" :class=\"{ 'is-open': open }\"><slot /></div>\n </div>\n </div>\n </div>\n</template>\n\n<style scoped>\n.rk-disclosure-control {\n display: flex;\n width: 100%;\n cursor: pointer;\n align-items: center;\n justify-content: space-between;\n gap: 1.5rem;\n padding: 1.25rem 0;\n text-align: left;\n transition: color 150ms;\n}\n\n.rk-disclosure-control:hover {\n color: var(--color-primary);\n}\n\n.rk-disclosure-control:focus-visible {\n outline: 2px solid var(--color-primary);\n outline-offset: 2px;\n}\n\n.rk-disclosure-title {\n color: var(--color-ink);\n font-size: 1rem;\n font-weight: 500;\n}\n\n.rk-disclosure-mark {\n position: relative;\n display: grid;\n place-items: center;\n flex-shrink: 0;\n width: 1.5rem;\n height: 1.5rem;\n}\n\n.rk-disclosure-bar {\n position: absolute;\n height: 1px;\n width: 0.875rem;\n background: var(--color-ink-soft);\n}\n\n.rk-disclosure-turn {\n transform: rotate(90deg);\n transition: transform 420ms ease-out;\n}\n\n.rk-disclosure-turn.is-open {\n transform: rotate(0deg);\n}\n\n/* 0fr to 1fr is the whole trick: a grid row can be animated to a height that\n was never measured, which `height: auto` cannot do. */\n.rk-disclosure-panel {\n display: grid;\n grid-template-rows: 0fr;\n transition: grid-template-rows 420ms ease-out;\n}\n\n.rk-disclosure-panel.is-open {\n grid-template-rows: 1fr;\n}\n\n.rk-disclosure-clip {\n overflow: hidden;\n}\n\n.rk-disclosure-body {\n max-width: 68ch;\n padding-bottom: 1.5rem;\n color: var(--color-ink-soft);\n line-height: 1.625;\n opacity: 0;\n transition: opacity 300ms;\n}\n\n.rk-disclosure-body.is-open {\n opacity: 1;\n}\n\n@media (prefers-reduced-motion: reduce) {\n .rk-disclosure-panel,\n .rk-disclosure-turn,\n .rk-disclosure-body {\n transition: none;\n }\n}\n</style>\n","<script setup lang=\"ts\">\nimport { nextTick, onBeforeUnmount, ref, watch } from 'vue'\n\n/**\n * A dialog that arrives from nowhere.\n *\n * Not `BaseSheet` with different padding. A sheet slides up from the bottom\n * edge, is dismissed by dragging it back down, and belongs to a thumb; a modal\n * appears in the middle of what you were reading and is dismissed by leaving\n * it. They are two answers to two questions and merging them would give a\n * component that is wrong on a phone and wrong on a desktop.\n *\n * ## The parts that are easy to get wrong\n *\n * This is why it exists rather than being written per dialog, which is what the\n * one wide consumer was doing in two places. None of the following is visible\n * on screen when it is missing:\n *\n * - **Focus moves in and comes back.** Opening without moving focus leaves a\n * keyboard user behind the dialog, operating a page they cannot see. Closing\n * without restoring it drops them at the top of the document.\n * - **Tab does not leave.** A dialog you can Tab out of is a dialog that is\n * modal only to somebody using a mouse.\n * - **Escape closes.** Every dialog in every application does this.\n * - **The page underneath does not scroll.** Otherwise dismissing the dialog\n * returns you somewhere else.\n * - **The backdrop closes it, the panel does not.** A click that starts inside\n * the panel and ends on the backdrop is not a click on the backdrop, which is\n * why this listens for a press on the backdrop itself rather than any click\n * that reaches it.\n */\nconst {\n title,\n closeLabel,\n tone = 'default',\n dismissible = true,\n} = defineProps<{\n /** Names the dialog for assistive tech. Required; an unnamed dialog is a box. */\n title: string\n /** Accessible name for the close button. */\n closeLabel: string\n /**\n * `alert` marks it as a decision that interrupts — `role=\"alertdialog\"`,\n * which a screen reader announces immediately rather than on arrival.\n */\n tone?: 'default' | 'alert' | undefined\n /**\n * Whether Escape and the backdrop close it.\n *\n * Off for a dialog that must be answered — but never off as a way of forcing\n * a reader to a decision they have not been given the information for.\n */\n dismissible?: boolean | undefined\n}>()\n\nconst open = defineModel<boolean>({ default: false })\n\ndefineSlots<{\n /** The body. */\n default: () => unknown\n /** Buttons, at the foot. */\n actions?: () => unknown\n}>()\n\nconst panel = ref<HTMLElement | null>(null)\n/** Who had focus before this opened, so it can be given back. */\nlet restoreTo: HTMLElement | null = null\n\nconst FOCUSABLE =\n 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])'\n\nfunction focusable(): HTMLElement[] {\n if (!panel.value) return []\n\n return Array.from(panel.value.querySelectorAll<HTMLElement>(FOCUSABLE))\n}\n\nfunction onKeydown(event: KeyboardEvent) {\n if (event.key === 'Escape' && dismissible) {\n event.stopPropagation()\n open.value = false\n\n return\n }\n\n if (event.key !== 'Tab') return\n\n const items = focusable()\n if (items.length === 0) return event.preventDefault()\n\n const first = items[0]!\n const last = items[items.length - 1]!\n const active = document.activeElement\n\n // The wrap has to be done by hand: the browser's own Tab order is the whole\n // document, and the dialog is only part of it.\n if (event.shiftKey && (active === first || !panel.value?.contains(active))) {\n event.preventDefault()\n last.focus()\n } else if (!event.shiftKey && active === last) {\n event.preventDefault()\n first.focus()\n }\n}\n\nwatch(open, async (isOpen) => {\n if (isOpen) {\n restoreTo = document.activeElement as HTMLElement | null\n document.body.style.overflow = 'hidden'\n await nextTick()\n // The panel itself when it holds nothing focusable, so focus is at least\n // inside the dialog rather than behind it.\n ;(focusable()[0] ?? panel.value)?.focus()\n } else {\n document.body.style.overflow = ''\n restoreTo?.focus()\n restoreTo = null\n }\n})\n\n// A dialog unmounted while open would otherwise leave the page unscrollable,\n// with nothing on screen to explain why.\nonBeforeUnmount(() => {\n if (open.value) document.body.style.overflow = ''\n})\n</script>\n\n<template>\n <Teleport to=\"body\">\n <Transition name=\"rk-modal\">\n <div\n v-if=\"open\"\n class=\"rk-modal-scrim\"\n @keydown=\"onKeydown\"\n @mousedown.self=\"dismissible && (open = false)\"\n >\n <div\n ref=\"panel\"\n class=\"rk-modal-panel\"\n :role=\"tone === 'alert' ? 'alertdialog' : 'dialog'\"\n aria-modal=\"true\"\n :aria-label=\"title\"\n tabindex=\"-1\"\n >\n <div class=\"rk-modal-head\">\n <h2 class=\"rk-modal-title\">{{ title }}</h2>\n\n <button\n v-if=\"dismissible\"\n type=\"button\"\n class=\"rk-modal-close\"\n :aria-label=\"closeLabel\"\n @click=\"open = false\"\n >\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <path d=\"M18 6 6 18M6 6l12 12\" stroke-linecap=\"round\" />\n </svg>\n </button>\n </div>\n\n <div class=\"rk-modal-body\"><slot /></div>\n\n <div v-if=\"$slots.actions\" class=\"rk-modal-actions\"><slot name=\"actions\" /></div>\n </div>\n </div>\n </Transition>\n </Teleport>\n</template>\n\n<style scoped>\n.rk-modal-scrim {\n position: fixed;\n inset: 0;\n z-index: 50;\n display: grid;\n place-items: center;\n padding: 1.5rem;\n background: color-mix(in srgb, var(--color-ink) 70%, transparent);\n backdrop-filter: blur(4px);\n}\n\n.rk-modal-panel {\n width: 100%;\n max-width: 28rem;\n max-height: 85vh;\n overflow-y: auto;\n border-radius: var(--radius-card);\n background: var(--color-surface);\n padding: 1.5rem;\n box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.2);\n}\n\n.rk-modal-panel:focus {\n outline: none;\n}\n\n.rk-modal-head {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: 1rem;\n}\n\n.rk-modal-title {\n font-size: 1.0625rem;\n font-weight: 600;\n color: var(--color-ink);\n}\n\n.rk-modal-close {\n display: grid;\n place-items: center;\n flex-shrink: 0;\n width: 2rem;\n height: 2rem;\n border-radius: 9999px;\n color: var(--color-ink-soft);\n transition: background-color 150ms;\n}\n\n.rk-modal-close:hover {\n background: var(--color-muted);\n}\n\n.rk-modal-close:focus-visible {\n outline: 2px solid var(--color-primary);\n outline-offset: 2px;\n}\n\n.rk-modal-close svg {\n width: 1rem;\n height: 1rem;\n}\n\n.rk-modal-body {\n margin-top: 0.75rem;\n color: var(--color-ink-soft);\n font-size: 0.875rem;\n line-height: 1.625;\n}\n\n.rk-modal-actions {\n margin-top: 1.5rem;\n display: flex;\n justify-content: flex-end;\n gap: 0.5rem;\n}\n\n.rk-modal-enter-active,\n.rk-modal-leave-active {\n transition: opacity 180ms ease;\n}\n\n.rk-modal-enter-active .rk-modal-panel,\n.rk-modal-leave-active .rk-modal-panel {\n transition:\n transform 180ms cubic-bezier(0.32, 0.72, 0, 1),\n opacity 180ms ease;\n}\n\n.rk-modal-enter-from,\n.rk-modal-leave-to {\n opacity: 0;\n}\n\n/* From nowhere, not from an edge: a scale is what separates this from a sheet. */\n.rk-modal-enter-from .rk-modal-panel,\n.rk-modal-leave-to .rk-modal-panel {\n transform: scale(0.96);\n opacity: 0;\n}\n\n@media (prefers-reduced-motion: reduce) {\n .rk-modal-enter-active .rk-modal-panel,\n .rk-modal-leave-active .rk-modal-panel {\n transition: opacity 180ms ease;\n transform: none;\n }\n\n .rk-modal-enter-from .rk-modal-panel,\n .rk-modal-leave-to .rk-modal-panel {\n transform: none;\n }\n}\n</style>\n","<script setup lang=\"ts\">\nimport { nextTick, onBeforeUnmount, ref, watch } from 'vue'\n\n/**\n * A dialog that arrives from nowhere.\n *\n * Not `BaseSheet` with different padding. A sheet slides up from the bottom\n * edge, is dismissed by dragging it back down, and belongs to a thumb; a modal\n * appears in the middle of what you were reading and is dismissed by leaving\n * it. They are two answers to two questions and merging them would give a\n * component that is wrong on a phone and wrong on a desktop.\n *\n * ## The parts that are easy to get wrong\n *\n * This is why it exists rather than being written per dialog, which is what the\n * one wide consumer was doing in two places. None of the following is visible\n * on screen when it is missing:\n *\n * - **Focus moves in and comes back.** Opening without moving focus leaves a\n * keyboard user behind the dialog, operating a page they cannot see. Closing\n * without restoring it drops them at the top of the document.\n * - **Tab does not leave.** A dialog you can Tab out of is a dialog that is\n * modal only to somebody using a mouse.\n * - **Escape closes.** Every dialog in every application does this.\n * - **The page underneath does not scroll.** Otherwise dismissing the dialog\n * returns you somewhere else.\n * - **The backdrop closes it, the panel does not.** A click that starts inside\n * the panel and ends on the backdrop is not a click on the backdrop, which is\n * why this listens for a press on the backdrop itself rather than any click\n * that reaches it.\n */\nconst {\n title,\n closeLabel,\n tone = 'default',\n dismissible = true,\n} = defineProps<{\n /** Names the dialog for assistive tech. Required; an unnamed dialog is a box. */\n title: string\n /** Accessible name for the close button. */\n closeLabel: string\n /**\n * `alert` marks it as a decision that interrupts — `role=\"alertdialog\"`,\n * which a screen reader announces immediately rather than on arrival.\n */\n tone?: 'default' | 'alert' | undefined\n /**\n * Whether Escape and the backdrop close it.\n *\n * Off for a dialog that must be answered — but never off as a way of forcing\n * a reader to a decision they have not been given the information for.\n */\n dismissible?: boolean | undefined\n}>()\n\nconst open = defineModel<boolean>({ default: false })\n\ndefineSlots<{\n /** The body. */\n default: () => unknown\n /** Buttons, at the foot. */\n actions?: () => unknown\n}>()\n\nconst panel = ref<HTMLElement | null>(null)\n/** Who had focus before this opened, so it can be given back. */\nlet restoreTo: HTMLElement | null = null\n\nconst FOCUSABLE =\n 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])'\n\nfunction focusable(): HTMLElement[] {\n if (!panel.value) return []\n\n return Array.from(panel.value.querySelectorAll<HTMLElement>(FOCUSABLE))\n}\n\nfunction onKeydown(event: KeyboardEvent) {\n if (event.key === 'Escape' && dismissible) {\n event.stopPropagation()\n open.value = false\n\n return\n }\n\n if (event.key !== 'Tab') return\n\n const items = focusable()\n if (items.length === 0) return event.preventDefault()\n\n const first = items[0]!\n const last = items[items.length - 1]!\n const active = document.activeElement\n\n // The wrap has to be done by hand: the browser's own Tab order is the whole\n // document, and the dialog is only part of it.\n if (event.shiftKey && (active === first || !panel.value?.contains(active))) {\n event.preventDefault()\n last.focus()\n } else if (!event.shiftKey && active === last) {\n event.preventDefault()\n first.focus()\n }\n}\n\nwatch(open, async (isOpen) => {\n if (isOpen) {\n restoreTo = document.activeElement as HTMLElement | null\n document.body.style.overflow = 'hidden'\n await nextTick()\n // The panel itself when it holds nothing focusable, so focus is at least\n // inside the dialog rather than behind it.\n ;(focusable()[0] ?? panel.value)?.focus()\n } else {\n document.body.style.overflow = ''\n restoreTo?.focus()\n restoreTo = null\n }\n})\n\n// A dialog unmounted while open would otherwise leave the page unscrollable,\n// with nothing on screen to explain why.\nonBeforeUnmount(() => {\n if (open.value) document.body.style.overflow = ''\n})\n</script>\n\n<template>\n <Teleport to=\"body\">\n <Transition name=\"rk-modal\">\n <div\n v-if=\"open\"\n class=\"rk-modal-scrim\"\n @keydown=\"onKeydown\"\n @mousedown.self=\"dismissible && (open = false)\"\n >\n <div\n ref=\"panel\"\n class=\"rk-modal-panel\"\n :role=\"tone === 'alert' ? 'alertdialog' : 'dialog'\"\n aria-modal=\"true\"\n :aria-label=\"title\"\n tabindex=\"-1\"\n >\n <div class=\"rk-modal-head\">\n <h2 class=\"rk-modal-title\">{{ title }}</h2>\n\n <button\n v-if=\"dismissible\"\n type=\"button\"\n class=\"rk-modal-close\"\n :aria-label=\"closeLabel\"\n @click=\"open = false\"\n >\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <path d=\"M18 6 6 18M6 6l12 12\" stroke-linecap=\"round\" />\n </svg>\n </button>\n </div>\n\n <div class=\"rk-modal-body\"><slot /></div>\n\n <div v-if=\"$slots.actions\" class=\"rk-modal-actions\"><slot name=\"actions\" /></div>\n </div>\n </div>\n </Transition>\n </Teleport>\n</template>\n\n<style scoped>\n.rk-modal-scrim {\n position: fixed;\n inset: 0;\n z-index: 50;\n display: grid;\n place-items: center;\n padding: 1.5rem;\n background: color-mix(in srgb, var(--color-ink) 70%, transparent);\n backdrop-filter: blur(4px);\n}\n\n.rk-modal-panel {\n width: 100%;\n max-width: 28rem;\n max-height: 85vh;\n overflow-y: auto;\n border-radius: var(--radius-card);\n background: var(--color-surface);\n padding: 1.5rem;\n box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.2);\n}\n\n.rk-modal-panel:focus {\n outline: none;\n}\n\n.rk-modal-head {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: 1rem;\n}\n\n.rk-modal-title {\n font-size: 1.0625rem;\n font-weight: 600;\n color: var(--color-ink);\n}\n\n.rk-modal-close {\n display: grid;\n place-items: center;\n flex-shrink: 0;\n width: 2rem;\n height: 2rem;\n border-radius: 9999px;\n color: var(--color-ink-soft);\n transition: background-color 150ms;\n}\n\n.rk-modal-close:hover {\n background: var(--color-muted);\n}\n\n.rk-modal-close:focus-visible {\n outline: 2px solid var(--color-primary);\n outline-offset: 2px;\n}\n\n.rk-modal-close svg {\n width: 1rem;\n height: 1rem;\n}\n\n.rk-modal-body {\n margin-top: 0.75rem;\n color: var(--color-ink-soft);\n font-size: 0.875rem;\n line-height: 1.625;\n}\n\n.rk-modal-actions {\n margin-top: 1.5rem;\n display: flex;\n justify-content: flex-end;\n gap: 0.5rem;\n}\n\n.rk-modal-enter-active,\n.rk-modal-leave-active {\n transition: opacity 180ms ease;\n}\n\n.rk-modal-enter-active .rk-modal-panel,\n.rk-modal-leave-active .rk-modal-panel {\n transition:\n transform 180ms cubic-bezier(0.32, 0.72, 0, 1),\n opacity 180ms ease;\n}\n\n.rk-modal-enter-from,\n.rk-modal-leave-to {\n opacity: 0;\n}\n\n/* From nowhere, not from an edge: a scale is what separates this from a sheet. */\n.rk-modal-enter-from .rk-modal-panel,\n.rk-modal-leave-to .rk-modal-panel {\n transform: scale(0.96);\n opacity: 0;\n}\n\n@media (prefers-reduced-motion: reduce) {\n .rk-modal-enter-active .rk-modal-panel,\n .rk-modal-leave-active .rk-modal-panel {\n transition: opacity 180ms ease;\n transform: none;\n }\n\n .rk-modal-enter-from .rk-modal-panel,\n .rk-modal-leave-to .rk-modal-panel {\n transform: none;\n }\n}\n</style>\n","<script setup lang=\"ts\">\nimport { computed } from 'vue'\n\n/**\n * Moving between pages of a list.\n *\n * A `nav` of buttons rather than links, because this component does not know\n * whether the app pages by route, by query or in memory. It emits a number and\n * the app decides what that means.\n *\n * ## The ellipsis\n *\n * Every page number is unusable past about a dozen, and cutting to\n * \"1 … 7 8 9 … 40\" is what every list does. The window is a fixed size around\n * the current page and the first and last are always present, so the control\n * never changes width as you move through it — a row of numbers that reflows\n * under the pointer is a row you have to re-aim at.\n *\n * The gap is a `<span>`, not a disabled button: it is not a control, and\n * announcing it as one gives a screen reader something to try to press.\n */\nconst {\n page,\n pages,\n siblings = 1,\n label = '',\n previousLabel,\n nextLabel,\n} = defineProps<{\n /** Current page, 1-based. */\n page: number\n /** How many there are. */\n pages: number\n /** How many numbers to show either side of the current one. */\n siblings?: number | undefined\n /** Accessible name for the landmark. */\n label?: string | undefined\n /**\n * Names for the arrows, already translated.\n *\n * Required, because `‹` is a glyph and not a word: a screen reader reading\n * the arrow announces nothing a person can act on.\n */\n previousLabel: string\n nextLabel: string\n}>()\n\nconst emit = defineEmits<{ change: [page: number] }>()\n\nconst GAP = 'gap' as const\n\nconst slots = computed<(number | typeof GAP)[]>(() => {\n if (pages <= 1) return [1]\n\n const first = 1\n const last = pages\n\n /* The widest the windowed form ever gets: first, last, the current page, its\n siblings either side, and the two gaps. Below that the window saves\n nothing, and \"1 2 … 5\" is a worse control than \"1 2 3 4 5\" — so short lists\n are shown whole rather than cut on principle. */\n if (pages <= siblings * 2 + 5) {\n return Array.from({ length: pages }, (_, i) => i + 1)\n }\n const from = Math.max(first + 1, page - siblings)\n const to = Math.min(last - 1, page + siblings)\n\n const out: (number | typeof GAP)[] = [first]\n // A gap standing in for a single page is longer than the page it replaces.\n if (from > first + 1) out.push(GAP)\n for (let n = from; n <= to; n++) out.push(n)\n if (to < last - 1) out.push(GAP)\n if (last > first) out.push(last)\n\n return out\n})\n\nconst go = (next: number) => {\n if (next >= 1 && next <= pages && next !== page) emit('change', next)\n}\n</script>\n\n<template>\n <nav class=\"rk-pager\" :aria-label=\"label || undefined\">\n <button\n type=\"button\"\n class=\"rk-pager-step\"\n :disabled=\"page <= 1\"\n :aria-label=\"previousLabel\"\n @click=\"go(page - 1)\"\n >\n ‹\n </button>\n\n <template v-for=\"(slot, index) in slots\" :key=\"`${slot}-${index}`\">\n <span v-if=\"slot === 'gap'\" class=\"rk-pager-gap\" aria-hidden=\"true\">…</span>\n <button\n v-else\n type=\"button\"\n class=\"rk-pager-page\"\n :class=\"{ 'is-active': slot === page }\"\n :aria-current=\"slot === page ? 'page' : undefined\"\n @click=\"go(slot)\"\n >\n {{ slot }}\n </button>\n </template>\n\n <button\n type=\"button\"\n class=\"rk-pager-step\"\n :disabled=\"page >= pages\"\n :aria-label=\"nextLabel\"\n @click=\"go(page + 1)\"\n >\n ›\n </button>\n </nav>\n</template>\n\n<style scoped>\n.rk-pager {\n display: flex;\n align-items: center;\n gap: 0.25rem;\n}\n\n.rk-pager-step,\n.rk-pager-page {\n display: grid;\n place-items: center;\n min-width: 2rem;\n height: 2rem;\n padding: 0 0.5rem;\n border-radius: var(--radius-cell);\n font-size: 0.875rem;\n color: var(--color-ink-soft);\n transition:\n background-color 150ms,\n color 150ms;\n}\n\n.rk-pager-step:hover:not(:disabled),\n.rk-pager-page:hover {\n background: var(--color-muted);\n color: var(--color-ink);\n}\n\n.rk-pager-step:focus-visible,\n.rk-pager-page:focus-visible {\n outline: 2px solid var(--color-primary);\n outline-offset: 2px;\n}\n\n.rk-pager-step:disabled {\n opacity: 0.4;\n pointer-events: none;\n}\n\n.rk-pager-page.is-active {\n background: var(--color-primary);\n color: #fff;\n font-weight: 500;\n}\n\n.rk-pager-gap {\n display: grid;\n place-items: center;\n min-width: 2rem;\n height: 2rem;\n color: var(--color-ink-soft);\n}\n</style>\n","<script setup lang=\"ts\">\nimport { computed } from 'vue'\n\n/**\n * Moving between pages of a list.\n *\n * A `nav` of buttons rather than links, because this component does not know\n * whether the app pages by route, by query or in memory. It emits a number and\n * the app decides what that means.\n *\n * ## The ellipsis\n *\n * Every page number is unusable past about a dozen, and cutting to\n * \"1 … 7 8 9 … 40\" is what every list does. The window is a fixed size around\n * the current page and the first and last are always present, so the control\n * never changes width as you move through it — a row of numbers that reflows\n * under the pointer is a row you have to re-aim at.\n *\n * The gap is a `<span>`, not a disabled button: it is not a control, and\n * announcing it as one gives a screen reader something to try to press.\n */\nconst {\n page,\n pages,\n siblings = 1,\n label = '',\n previousLabel,\n nextLabel,\n} = defineProps<{\n /** Current page, 1-based. */\n page: number\n /** How many there are. */\n pages: number\n /** How many numbers to show either side of the current one. */\n siblings?: number | undefined\n /** Accessible name for the landmark. */\n label?: string | undefined\n /**\n * Names for the arrows, already translated.\n *\n * Required, because `‹` is a glyph and not a word: a screen reader reading\n * the arrow announces nothing a person can act on.\n */\n previousLabel: string\n nextLabel: string\n}>()\n\nconst emit = defineEmits<{ change: [page: number] }>()\n\nconst GAP = 'gap' as const\n\nconst slots = computed<(number | typeof GAP)[]>(() => {\n if (pages <= 1) return [1]\n\n const first = 1\n const last = pages\n\n /* The widest the windowed form ever gets: first, last, the current page, its\n siblings either side, and the two gaps. Below that the window saves\n nothing, and \"1 2 … 5\" is a worse control than \"1 2 3 4 5\" — so short lists\n are shown whole rather than cut on principle. */\n if (pages <= siblings * 2 + 5) {\n return Array.from({ length: pages }, (_, i) => i + 1)\n }\n const from = Math.max(first + 1, page - siblings)\n const to = Math.min(last - 1, page + siblings)\n\n const out: (number | typeof GAP)[] = [first]\n // A gap standing in for a single page is longer than the page it replaces.\n if (from > first + 1) out.push(GAP)\n for (let n = from; n <= to; n++) out.push(n)\n if (to < last - 1) out.push(GAP)\n if (last > first) out.push(last)\n\n return out\n})\n\nconst go = (next: number) => {\n if (next >= 1 && next <= pages && next !== page) emit('change', next)\n}\n</script>\n\n<template>\n <nav class=\"rk-pager\" :aria-label=\"label || undefined\">\n <button\n type=\"button\"\n class=\"rk-pager-step\"\n :disabled=\"page <= 1\"\n :aria-label=\"previousLabel\"\n @click=\"go(page - 1)\"\n >\n ‹\n </button>\n\n <template v-for=\"(slot, index) in slots\" :key=\"`${slot}-${index}`\">\n <span v-if=\"slot === 'gap'\" class=\"rk-pager-gap\" aria-hidden=\"true\">…</span>\n <button\n v-else\n type=\"button\"\n class=\"rk-pager-page\"\n :class=\"{ 'is-active': slot === page }\"\n :aria-current=\"slot === page ? 'page' : undefined\"\n @click=\"go(slot)\"\n >\n {{ slot }}\n </button>\n </template>\n\n <button\n type=\"button\"\n class=\"rk-pager-step\"\n :disabled=\"page >= pages\"\n :aria-label=\"nextLabel\"\n @click=\"go(page + 1)\"\n >\n ›\n </button>\n </nav>\n</template>\n\n<style scoped>\n.rk-pager {\n display: flex;\n align-items: center;\n gap: 0.25rem;\n}\n\n.rk-pager-step,\n.rk-pager-page {\n display: grid;\n place-items: center;\n min-width: 2rem;\n height: 2rem;\n padding: 0 0.5rem;\n border-radius: var(--radius-cell);\n font-size: 0.875rem;\n color: var(--color-ink-soft);\n transition:\n background-color 150ms,\n color 150ms;\n}\n\n.rk-pager-step:hover:not(:disabled),\n.rk-pager-page:hover {\n background: var(--color-muted);\n color: var(--color-ink);\n}\n\n.rk-pager-step:focus-visible,\n.rk-pager-page:focus-visible {\n outline: 2px solid var(--color-primary);\n outline-offset: 2px;\n}\n\n.rk-pager-step:disabled {\n opacity: 0.4;\n pointer-events: none;\n}\n\n.rk-pager-page.is-active {\n background: var(--color-primary);\n color: #fff;\n font-weight: 500;\n}\n\n.rk-pager-gap {\n display: grid;\n place-items: center;\n min-width: 2rem;\n height: 2rem;\n color: var(--color-ink-soft);\n}\n</style>\n","<script setup lang=\"ts\" generic=\"K extends string\">\nimport { ref, useId } from 'vue'\n\nexport interface TabPanel<K extends string> {\n key: K\n /** Already translated. */\n label: string\n}\n\n/**\n * Sections of one page, one visible at a time.\n *\n * Not `TabBar` and not `NavLinks`: those navigate, and the browser's back\n * button undoes them. These switch a panel inside a page that does not change,\n * so there is no history entry and no route.\n *\n * ## The keyboard, which is the whole reason this is a component\n *\n * The pattern is prescribed and it is not what a row of buttons does by\n * default. Tab enters the tablist once and leaves it once — it does not walk\n * through every tab — and the arrow keys move between them. That is roving\n * tabindex: exactly one tab is reachable by Tab at a time, and moving the\n * selection moves it. Home and End jump to the ends, and the selection wraps,\n * because a list with no edges is faster than one you can fall off.\n *\n * Hand-written tabs almost always get this wrong in the same way: every tab is\n * tabbable, so a keyboard user presses Tab six times to reach the content.\n */\nconst { items, label = '' } = defineProps<{\n items: readonly TabPanel<K>[]\n /** Accessible name for the tablist. */\n label?: string | undefined\n}>()\n\ndefineSlots<{\n /** The panel for the selected tab. */\n default: (props: { item: TabPanel<K>; active: K }) => unknown\n}>()\n\nconst active = defineModel<K>({ required: true })\n\nconst uid = useId()\nconst tabs = ref<HTMLElement[]>([])\n\nconst tabId = (key: K) => `${uid}-tab-${key}`\nconst panelId = (key: K) => `${uid}-panel-${key}`\n\nfunction select(key: K, focus = false) {\n active.value = key\n if (!focus) return\n\n // Focus follows selection, which is what the arrow keys are for. The element\n // is looked up after the update so the new tab is the one that is reachable.\n const index = items.findIndex((item) => item.key === key)\n requestAnimationFrame(() => tabs.value[index]?.focus())\n}\n\nfunction onKeydown(event: KeyboardEvent) {\n const index = items.findIndex((item) => item.key === active.value)\n if (index < 0) return\n\n const last = items.length - 1\n let next: number | undefined\n\n if (event.key === 'ArrowRight') next = index === last ? 0 : index + 1\n else if (event.key === 'ArrowLeft') next = index === 0 ? last : index - 1\n else if (event.key === 'Home') next = 0\n else if (event.key === 'End') next = last\n else return\n\n event.preventDefault()\n const item = items[next]\n if (item) select(item.key, true)\n}\n</script>\n\n<template>\n <div>\n <div class=\"rk-tabs\" role=\"tablist\" :aria-label=\"label || undefined\" @keydown=\"onKeydown\">\n <button\n v-for=\"item in items\"\n :key=\"item.key\"\n ref=\"tabs\"\n type=\"button\"\n role=\"tab\"\n class=\"rk-tab\"\n :class=\"{ 'is-active': item.key === active }\"\n :id=\"tabId(item.key)\"\n :aria-selected=\"item.key === active\"\n :aria-controls=\"panelId(item.key)\"\n :tabindex=\"item.key === active ? 0 : -1\"\n @click=\"select(item.key)\"\n >\n {{ item.label }}\n </button>\n </div>\n\n <div\n v-for=\"item in items\"\n v-show=\"item.key === active\"\n :key=\"item.key\"\n role=\"tabpanel\"\n class=\"rk-tabpanel\"\n :id=\"panelId(item.key)\"\n :aria-labelledby=\"tabId(item.key)\"\n tabindex=\"0\"\n >\n <!-- Every panel is rendered and hidden rather than swapped, so the page\n keeps its height and a crawler sees all of it. -->\n <slot :item=\"item\" :active=\"active\" />\n </div>\n </div>\n</template>\n\n<style scoped>\n.rk-tabs {\n display: flex;\n align-items: center;\n gap: 0.25rem;\n border-bottom: 1px solid color-mix(in srgb, var(--color-hair) 70%, transparent);\n}\n\n.rk-tab {\n position: relative;\n padding: 0.625rem 0.875rem;\n font-size: 0.875rem;\n color: var(--color-ink-soft);\n transition: color 150ms;\n}\n\n.rk-tab:hover {\n color: var(--color-ink);\n}\n\n.rk-tab:focus-visible {\n outline: 2px solid var(--color-primary);\n outline-offset: -2px;\n border-radius: var(--radius-cell);\n}\n\n.rk-tab.is-active {\n color: var(--color-ink);\n font-weight: 500;\n}\n\n.rk-tab.is-active::after {\n content: '';\n position: absolute;\n inset-inline: 0.5rem;\n bottom: -1px;\n height: 2px;\n border-radius: 9999px;\n background: var(--color-primary);\n}\n\n.rk-tabpanel {\n padding-top: 1rem;\n}\n\n.rk-tabpanel:focus-visible {\n outline: 2px solid var(--color-primary);\n outline-offset: 2px;\n}\n</style>\n","<script setup lang=\"ts\" generic=\"K extends string\">\nimport { ref, useId } from 'vue'\n\nexport interface TabPanel<K extends string> {\n key: K\n /** Already translated. */\n label: string\n}\n\n/**\n * Sections of one page, one visible at a time.\n *\n * Not `TabBar` and not `NavLinks`: those navigate, and the browser's back\n * button undoes them. These switch a panel inside a page that does not change,\n * so there is no history entry and no route.\n *\n * ## The keyboard, which is the whole reason this is a component\n *\n * The pattern is prescribed and it is not what a row of buttons does by\n * default. Tab enters the tablist once and leaves it once — it does not walk\n * through every tab — and the arrow keys move between them. That is roving\n * tabindex: exactly one tab is reachable by Tab at a time, and moving the\n * selection moves it. Home and End jump to the ends, and the selection wraps,\n * because a list with no edges is faster than one you can fall off.\n *\n * Hand-written tabs almost always get this wrong in the same way: every tab is\n * tabbable, so a keyboard user presses Tab six times to reach the content.\n */\nconst { items, label = '' } = defineProps<{\n items: readonly TabPanel<K>[]\n /** Accessible name for the tablist. */\n label?: string | undefined\n}>()\n\ndefineSlots<{\n /** The panel for the selected tab. */\n default: (props: { item: TabPanel<K>; active: K }) => unknown\n}>()\n\nconst active = defineModel<K>({ required: true })\n\nconst uid = useId()\nconst tabs = ref<HTMLElement[]>([])\n\nconst tabId = (key: K) => `${uid}-tab-${key}`\nconst panelId = (key: K) => `${uid}-panel-${key}`\n\nfunction select(key: K, focus = false) {\n active.value = key\n if (!focus) return\n\n // Focus follows selection, which is what the arrow keys are for. The element\n // is looked up after the update so the new tab is the one that is reachable.\n const index = items.findIndex((item) => item.key === key)\n requestAnimationFrame(() => tabs.value[index]?.focus())\n}\n\nfunction onKeydown(event: KeyboardEvent) {\n const index = items.findIndex((item) => item.key === active.value)\n if (index < 0) return\n\n const last = items.length - 1\n let next: number | undefined\n\n if (event.key === 'ArrowRight') next = index === last ? 0 : index + 1\n else if (event.key === 'ArrowLeft') next = index === 0 ? last : index - 1\n else if (event.key === 'Home') next = 0\n else if (event.key === 'End') next = last\n else return\n\n event.preventDefault()\n const item = items[next]\n if (item) select(item.key, true)\n}\n</script>\n\n<template>\n <div>\n <div class=\"rk-tabs\" role=\"tablist\" :aria-label=\"label || undefined\" @keydown=\"onKeydown\">\n <button\n v-for=\"item in items\"\n :key=\"item.key\"\n ref=\"tabs\"\n type=\"button\"\n role=\"tab\"\n class=\"rk-tab\"\n :class=\"{ 'is-active': item.key === active }\"\n :id=\"tabId(item.key)\"\n :aria-selected=\"item.key === active\"\n :aria-controls=\"panelId(item.key)\"\n :tabindex=\"item.key === active ? 0 : -1\"\n @click=\"select(item.key)\"\n >\n {{ item.label }}\n </button>\n </div>\n\n <div\n v-for=\"item in items\"\n v-show=\"item.key === active\"\n :key=\"item.key\"\n role=\"tabpanel\"\n class=\"rk-tabpanel\"\n :id=\"panelId(item.key)\"\n :aria-labelledby=\"tabId(item.key)\"\n tabindex=\"0\"\n >\n <!-- Every panel is rendered and hidden rather than swapped, so the page\n keeps its height and a crawler sees all of it. -->\n <slot :item=\"item\" :active=\"active\" />\n </div>\n </div>\n</template>\n\n<style scoped>\n.rk-tabs {\n display: flex;\n align-items: center;\n gap: 0.25rem;\n border-bottom: 1px solid color-mix(in srgb, var(--color-hair) 70%, transparent);\n}\n\n.rk-tab {\n position: relative;\n padding: 0.625rem 0.875rem;\n font-size: 0.875rem;\n color: var(--color-ink-soft);\n transition: color 150ms;\n}\n\n.rk-tab:hover {\n color: var(--color-ink);\n}\n\n.rk-tab:focus-visible {\n outline: 2px solid var(--color-primary);\n outline-offset: -2px;\n border-radius: var(--radius-cell);\n}\n\n.rk-tab.is-active {\n color: var(--color-ink);\n font-weight: 500;\n}\n\n.rk-tab.is-active::after {\n content: '';\n position: absolute;\n inset-inline: 0.5rem;\n bottom: -1px;\n height: 2px;\n border-radius: 9999px;\n background: var(--color-primary);\n}\n\n.rk-tabpanel {\n padding-top: 1rem;\n}\n\n.rk-tabpanel:focus-visible {\n outline: 2px solid var(--color-primary);\n outline-offset: 2px;\n}\n</style>\n","<script setup lang=\"ts\">\nimport { useId } from 'vue'\n\n/**\n * A short label that appears beside a control.\n *\n * ## CSS, not JavaScript, and that is a decision\n *\n * The bubble is shown by `:hover` and `:focus-within` in the stylesheet. No\n * listener, no state, no positioning library. That costs collision detection —\n * a tooltip near the right edge is clipped rather than flipped — and buys the\n * only thing that matters more: it works in a prerendered page, before the\n * bundle has arrived, and with JavaScript switched off entirely.\n *\n * `:focus-within` rather than `:hover` alone is the part people leave out. A\n * tooltip that only answers a mouse is a tooltip that does not exist for anyone\n * using a keyboard, and the content is usually the only explanation of what the\n * control does.\n *\n * The bubble is wired with `aria-describedby`, so a screen reader reads it as a\n * description of the control rather than as loose text nearby. That is why the\n * trigger goes in a slot: the component has to own the id on both ends.\n *\n * ## When not to use it\n *\n * For anything the reader must have. A tooltip is unreachable on a touch screen\n * without a hover state, so text that changes a decision belongs on the page.\n */\nconst { label, placement = 'top' } = defineProps<{\n /** The description. Already translated. */\n label: string\n placement?: 'top' | 'bottom' | undefined\n}>()\n\ndefineSlots<{\n /** The control being described. */\n default: (props: { describedBy: string }) => unknown\n}>()\n\nconst id = useId()\n</script>\n\n<template>\n <span class=\"rk-tip\">\n <slot :described-by=\"id\" />\n\n <!-- `role=\"tooltip\"` and the id, so the control can point at it. Not\n `aria-hidden`: it is the description, not decoration. -->\n <span :id=\"id\" role=\"tooltip\" class=\"rk-tip-bubble\" :class=\"`is-${placement}`\">\n {{ label }}\n </span>\n </span>\n</template>\n\n<style scoped>\n.rk-tip {\n position: relative;\n display: inline-flex;\n}\n\n.rk-tip-bubble {\n position: absolute;\n left: 50%;\n z-index: 60;\n width: max-content;\n max-width: 16rem;\n transform: translateX(-50%);\n border-radius: var(--radius-cell);\n background: var(--color-ink);\n padding: 0.375rem 0.5rem;\n font-size: 0.75rem;\n line-height: 1.4;\n color: var(--color-canvas);\n opacity: 0;\n /* Out of the hit area while hidden, or it would swallow the pointer on its\n way to the control it describes. */\n pointer-events: none;\n transition: opacity 150ms ease;\n}\n\n.rk-tip-bubble.is-top {\n bottom: calc(100% + 0.375rem);\n}\n\n.rk-tip-bubble.is-bottom {\n top: calc(100% + 0.375rem);\n}\n\n.rk-tip:hover .rk-tip-bubble,\n.rk-tip:focus-within .rk-tip-bubble {\n opacity: 1;\n}\n\n@media (prefers-reduced-motion: reduce) {\n .rk-tip-bubble {\n transition: none;\n }\n}\n</style>\n","<script setup lang=\"ts\">\nimport { useId } from 'vue'\n\n/**\n * A short label that appears beside a control.\n *\n * ## CSS, not JavaScript, and that is a decision\n *\n * The bubble is shown by `:hover` and `:focus-within` in the stylesheet. No\n * listener, no state, no positioning library. That costs collision detection —\n * a tooltip near the right edge is clipped rather than flipped — and buys the\n * only thing that matters more: it works in a prerendered page, before the\n * bundle has arrived, and with JavaScript switched off entirely.\n *\n * `:focus-within` rather than `:hover` alone is the part people leave out. A\n * tooltip that only answers a mouse is a tooltip that does not exist for anyone\n * using a keyboard, and the content is usually the only explanation of what the\n * control does.\n *\n * The bubble is wired with `aria-describedby`, so a screen reader reads it as a\n * description of the control rather than as loose text nearby. That is why the\n * trigger goes in a slot: the component has to own the id on both ends.\n *\n * ## When not to use it\n *\n * For anything the reader must have. A tooltip is unreachable on a touch screen\n * without a hover state, so text that changes a decision belongs on the page.\n */\nconst { label, placement = 'top' } = defineProps<{\n /** The description. Already translated. */\n label: string\n placement?: 'top' | 'bottom' | undefined\n}>()\n\ndefineSlots<{\n /** The control being described. */\n default: (props: { describedBy: string }) => unknown\n}>()\n\nconst id = useId()\n</script>\n\n<template>\n <span class=\"rk-tip\">\n <slot :described-by=\"id\" />\n\n <!-- `role=\"tooltip\"` and the id, so the control can point at it. Not\n `aria-hidden`: it is the description, not decoration. -->\n <span :id=\"id\" role=\"tooltip\" class=\"rk-tip-bubble\" :class=\"`is-${placement}`\">\n {{ label }}\n </span>\n </span>\n</template>\n\n<style scoped>\n.rk-tip {\n position: relative;\n display: inline-flex;\n}\n\n.rk-tip-bubble {\n position: absolute;\n left: 50%;\n z-index: 60;\n width: max-content;\n max-width: 16rem;\n transform: translateX(-50%);\n border-radius: var(--radius-cell);\n background: var(--color-ink);\n padding: 0.375rem 0.5rem;\n font-size: 0.75rem;\n line-height: 1.4;\n color: var(--color-canvas);\n opacity: 0;\n /* Out of the hit area while hidden, or it would swallow the pointer on its\n way to the control it describes. */\n pointer-events: none;\n transition: opacity 150ms ease;\n}\n\n.rk-tip-bubble.is-top {\n bottom: calc(100% + 0.375rem);\n}\n\n.rk-tip-bubble.is-bottom {\n top: calc(100% + 0.375rem);\n}\n\n.rk-tip:hover .rk-tip-bubble,\n.rk-tip:focus-within .rk-tip-bubble {\n opacity: 1;\n}\n\n@media (prefers-reduced-motion: reduce) {\n .rk-tip-bubble {\n transition: none;\n }\n}\n</style>\n","<script setup lang=\"ts\" generic=\"K extends string\">\nimport { RouterLink } from 'vue-router'\n\nexport interface NavLinkItem<K extends string> {\n /** Identity, compared against `active`. */\n key: K\n /** Router destination. */\n to: string\n /** Already translated. */\n label: string\n}\n\n/**\n * The primary navigation of a wide site.\n *\n * The same contract as `TabBar` minus the icon, so moving an app between a\n * bottom bar and a top one is a change of component and not of data. That is\n * the whole reason the shapes match.\n *\n * A rule under the current section rather than a filled pill: at this size a\n * pill reads as a button, and these are not buttons — they are where you are.\n * The rule is a scaled element rather than a border so it can travel, and it is\n * `aria-hidden` because `aria-current` already says the same thing to anyone not\n * looking at it.\n */\nconst {\n items,\n active,\n label = '',\n} = defineProps<{\n items: readonly NavLinkItem<K>[]\n /** Which item is current. Usually derived from the route. */\n active?: K | undefined\n /** Accessible name for the navigation landmark. */\n label?: string | undefined\n}>()\n</script>\n\n<template>\n <nav :aria-label=\"label || undefined\">\n <div class=\"rk-nav-inner\">\n <RouterLink\n v-for=\"item in items\"\n :key=\"item.key\"\n :to=\"item.to\"\n class=\"rk-nav-link\"\n :class=\"{ 'is-active': item.key === active }\"\n :aria-current=\"item.key === active ? 'page' : undefined\"\n >\n {{ item.label }}\n <span class=\"rk-nav-rule\" aria-hidden=\"true\" />\n </RouterLink>\n </div>\n </nav>\n</template>\n\n<style scoped>\n/* The root carries no layout of its own, and that is the fix for a real bug\n rather than a style preference.\n\n A rule on the root loses to nothing: Vue's scoped CSS compiles `.rk-nav` to\n `.rk-nav[data-v-hash]`, which outranks a utility class like Tailwind's\n `hidden` outright — so `class=\"hidden sm:flex\"` did nothing and the nav\n appeared on a phone, on top of the call to action. `:where()` does not save\n it either; the scoping attribute puts the specificity back.\n\n So the flex row lives on an element the caller does not own, and the root is\n left for them to style. `TabBar` is built the same way for the same reason. */\n.rk-nav-inner {\n display: flex;\n align-items: center;\n gap: 0.25rem;\n}\n\n.rk-nav-link {\n position: relative;\n border-radius: var(--radius-cell);\n padding: 0.5rem 0.75rem;\n font-size: 0.875rem;\n color: var(--color-ink-soft);\n transition: color 150ms;\n}\n\n.rk-nav-link:hover {\n color: var(--color-ink);\n}\n\n.rk-nav-link:focus-visible {\n outline: 2px solid var(--color-primary);\n outline-offset: 2px;\n}\n\n.rk-nav-link.is-active {\n color: var(--color-ink);\n font-weight: 500;\n}\n\n.rk-nav-rule {\n position: absolute;\n inset-inline: 0.75rem;\n bottom: -1px;\n height: 2px;\n border-radius: 9999px;\n background: var(--color-primary);\n transform: scaleX(0);\n transform-origin: left;\n transition: transform 300ms;\n}\n\n.rk-nav-link.is-active .rk-nav-rule {\n transform: scaleX(1);\n}\n\n@media (prefers-reduced-motion: reduce) {\n .rk-nav-rule {\n transition: none;\n }\n}\n</style>\n","<script setup lang=\"ts\" generic=\"K extends string\">\nimport { RouterLink } from 'vue-router'\n\nexport interface NavLinkItem<K extends string> {\n /** Identity, compared against `active`. */\n key: K\n /** Router destination. */\n to: string\n /** Already translated. */\n label: string\n}\n\n/**\n * The primary navigation of a wide site.\n *\n * The same contract as `TabBar` minus the icon, so moving an app between a\n * bottom bar and a top one is a change of component and not of data. That is\n * the whole reason the shapes match.\n *\n * A rule under the current section rather than a filled pill: at this size a\n * pill reads as a button, and these are not buttons — they are where you are.\n * The rule is a scaled element rather than a border so it can travel, and it is\n * `aria-hidden` because `aria-current` already says the same thing to anyone not\n * looking at it.\n */\nconst {\n items,\n active,\n label = '',\n} = defineProps<{\n items: readonly NavLinkItem<K>[]\n /** Which item is current. Usually derived from the route. */\n active?: K | undefined\n /** Accessible name for the navigation landmark. */\n label?: string | undefined\n}>()\n</script>\n\n<template>\n <nav :aria-label=\"label || undefined\">\n <div class=\"rk-nav-inner\">\n <RouterLink\n v-for=\"item in items\"\n :key=\"item.key\"\n :to=\"item.to\"\n class=\"rk-nav-link\"\n :class=\"{ 'is-active': item.key === active }\"\n :aria-current=\"item.key === active ? 'page' : undefined\"\n >\n {{ item.label }}\n <span class=\"rk-nav-rule\" aria-hidden=\"true\" />\n </RouterLink>\n </div>\n </nav>\n</template>\n\n<style scoped>\n/* The root carries no layout of its own, and that is the fix for a real bug\n rather than a style preference.\n\n A rule on the root loses to nothing: Vue's scoped CSS compiles `.rk-nav` to\n `.rk-nav[data-v-hash]`, which outranks a utility class like Tailwind's\n `hidden` outright — so `class=\"hidden sm:flex\"` did nothing and the nav\n appeared on a phone, on top of the call to action. `:where()` does not save\n it either; the scoping attribute puts the specificity back.\n\n So the flex row lives on an element the caller does not own, and the root is\n left for them to style. `TabBar` is built the same way for the same reason. */\n.rk-nav-inner {\n display: flex;\n align-items: center;\n gap: 0.25rem;\n}\n\n.rk-nav-link {\n position: relative;\n border-radius: var(--radius-cell);\n padding: 0.5rem 0.75rem;\n font-size: 0.875rem;\n color: var(--color-ink-soft);\n transition: color 150ms;\n}\n\n.rk-nav-link:hover {\n color: var(--color-ink);\n}\n\n.rk-nav-link:focus-visible {\n outline: 2px solid var(--color-primary);\n outline-offset: 2px;\n}\n\n.rk-nav-link.is-active {\n color: var(--color-ink);\n font-weight: 500;\n}\n\n.rk-nav-rule {\n position: absolute;\n inset-inline: 0.75rem;\n bottom: -1px;\n height: 2px;\n border-radius: 9999px;\n background: var(--color-primary);\n transform: scaleX(0);\n transform-origin: left;\n transition: transform 300ms;\n}\n\n.rk-nav-link.is-active .rk-nav-rule {\n transform: scaleX(1);\n}\n\n@media (prefers-reduced-motion: reduce) {\n .rk-nav-rule {\n transition: none;\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoDA,MAAM,MAAM,MAAM;EAIlB,MAAM,OAAO,WAAgB,CAAC,CAAC;EAE/B,MAAM,UAAU,QAAW,KAAK,MAAM,SAAS,GAAG;EAElD,SAAS,OAAO,KAAQ;GACtB,IAAI,OAAO,GAAG,GACZ,KAAK,QAAQ,KAAK,MAAM,QAAQ,MAAM,MAAM,GAAG;QAE/C,KAAK,QAAQ,QAAA,WAAW,CAAC,GAAG,KAAK,OAAO,GAAG,IAAI,CAAC,GAAG;EAEvD;;GAIE,OAAA,UAAA,GAAA,mBAoCK,MApCL,cAoCK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