rei-kit 2.5.0 → 2.6.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # rei-kit
2
2
 
3
- **One kit. Every look.** 65 accessible components for Vue 3 and Tailwind 4.
3
+ **One kit. Every look.** 67 accessible components for Vue 3 and Tailwind 4.
4
4
  Change the **material** with one attribute and the **palette** with another —
5
5
  every component follows, and none of them knows your brand.
6
6
 
@@ -112,7 +112,7 @@ Each claim here is enforced by something that fails, not by a promise.
112
112
 
113
113
  | Standard | How it is held |
114
114
  | ---------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
115
- | **Open for extension, closed for edits** | A new look is a token, a material or a palette — never an edit to a component. Materials and palettes restyle all 65 without touching one, and a test fails if a component holds a colour. |
115
+ | **Open for extension, closed for edits** | A new look is a token, a material or a palette — never an edit to a component. Materials and palettes restyle all 67 without touching one, and a test fails if a component holds a colour. |
116
116
  | **Single responsibility** | One part, one job. Label-and-error wiring lives in `FormField`, not in five inputs; taking the page behind a layer out of reach lives in one helper the modal, the sheet and the guide share. |
117
117
  | **Depend on roles, not values** | Components read `primary`, `surface`, `--shadow-card` — never a hex or a pixel shadow. An app's brand wins in both modes, tested. |
118
118
  | **WAI-ARIA Authoring Practices** | Menus, comboboxes, tabs, sliders, dialogs and accordions follow their APG pattern: arrows move, Tab leaves, Escape closes, focus returns. Behaviour tests drive each with the keyboard. |
@@ -124,11 +124,11 @@ Each claim here is enforced by something that fails, not by a promise.
124
124
 
125
125
  ## Status
126
126
 
127
- **v2.5.0 — three consumers.**
127
+ **v2.6.0 — three consumers.**
128
128
 
129
129
  | | |
130
130
  | ------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
131
- | Components | 65 (`AuthForm`, `BaseTable`, `BaseCombobox`, `BaseSlider`, `TabShell`, `BaseModal`, `BaseTabs`, `BaseTooltip`, `BasePagination`, `BaseBreadcrumb`, `BaseDisclosure`, `BaseAccordion`, `NavLinks`, `OfflineBanner`, `FabButton`, `BaseButton`, `BaseCard`, `BaseInput`, `BaseSelect`, `BaseTextarea`, `BaseCheckbox`, `BaseSwitch`, `BaseRadioGroup`, `BaseMenu`, `BaseAvatar`, `BaseSpinner`, `BaseAlert`, `BaseBadge`, `BaseSheet`, `ProgressBar`, `PriceCard`, `ToastHost`, `TabBar`, `GoogleButton`, `LocaleLinks`, `LocaleSheet`, `AuthShell`, `TourShell`, `InstallPrompt`, `UpdatePrompt`, `InstallSettings`, `SkeletonList`, `PageContainer`, `ErrorBoundary`, etc.) |
131
+ | Components | 67 (`AuthForm`, `BaseTable`, `BaseCombobox`, `BaseSlider`, `TabShell`, `BaseModal`, `BaseTabs`, `BaseTooltip`, `BasePagination`, `BaseBreadcrumb`, `BaseDisclosure`, `BaseAccordion`, `NavLinks`, `OfflineBanner`, `FabButton`, `BaseButton`, `BaseCard`, `BaseInput`, `BaseSelect`, `BaseTextarea`, `BaseCheckbox`, `BaseSwitch`, `BaseRadioGroup`, `BaseMenu`, `BaseAvatar`, `BaseSpinner`, `BaseAlert`, `BaseBadge`, `BaseSheet`, `ProgressBar`, `PriceCard`, `ToastHost`, `TabBar`, `GoogleButton`, `LocaleLinks`, `LocaleSheet`, `AuthShell`, `TourShell`, `InstallPrompt`, `UpdatePrompt`, `InstallSettings`, `SkeletonList`, `PageContainer`, `ErrorBoundary`, etc.) |
132
132
  | Composables | 16 (`useToast`, `useTheme`, `useMaterial`, `usePalette`, `useToday`, `useMediaQuery`, `useInstall`, `watchInstallability`, `createTabTransition`, `useThemeSync`, `useVisualViewport`, etc.) |
133
133
  | Utilities | 33 (`applyTheme`, `applyMaterial`, `applyPalette`, `MATERIALS`, `PALETTES`, `formatDate`, `fieldErrors`, `toAuthMessageKey`, `createAuthGuard`, `createQueryDefaults`, `createWriteReport`, `toRedirectPath`, `Supabase error mapper`, i18n runtime, etc.) |
134
134
  | Entry Points | `rei-kit`, `rei-kit/app`, `rei-kit/web`, `rei-kit/pwa`, `rei-kit/supabase`, `rei-kit/mobile.css`, `rei-kit/web.css`, and each stylesheet on its own |
@@ -0,0 +1,45 @@
1
+ import { WeekStart } from '../utils/date';
2
+ export interface DateRange {
3
+ /** `YYYY-MM-DD`, always local. */
4
+ start: string;
5
+ end: string;
6
+ }
7
+ declare const __VLS_export: <M extends "single" | "range" = "single">(__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<{
8
+ props: import('vue').PublicProps & __VLS_PrettifyLocal<({
9
+ /** One day, or a stretch from one day to another. */
10
+ mode?: M | undefined;
11
+ /** The earliest day that can be chosen, as `YYYY-MM-DD`. */
12
+ min?: string | undefined;
13
+ max?: string | undefined;
14
+ /** Days to rule out inside the range — weekends, days already booked. */
15
+ isDisabled?: ((key: string) => boolean) | undefined;
16
+ /** `1` Monday, `0` Sunday. */
17
+ weekStartsOn?: WeekStart | undefined;
18
+ /** Accessible name of the back arrow, e.g. "Previous month". */
19
+ previousLabel: string;
20
+ /** Accessible name of the forward arrow. */
21
+ nextLabel: string;
22
+ /** Which day is marked as today. Given, so a test or a demo can fix it. */
23
+ today?: string | undefined;
24
+ } & {
25
+ /** The chosen day, or the chosen range, with `v-model`. */
26
+ modelValue?: (M extends "range" ? DateRange : string) | undefined;
27
+ }) & {
28
+ "onUpdate:modelValue"?: (value: (M extends "range" ? DateRange : string) | undefined) => any;
29
+ }> & (typeof globalThis extends {
30
+ __VLS_PROPS_FALLBACK: infer P;
31
+ } ? P : {});
32
+ expose: (exposed: {}) => void;
33
+ attrs: any;
34
+ slots: {};
35
+ emit: (event: "update:modelValue", value: (M extends "range" ? DateRange : string) | undefined) => void;
36
+ }>) => import('vue').VNode & {
37
+ __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
38
+ };
39
+ declare const _default: typeof __VLS_export;
40
+ export default _default;
41
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
42
+ [K in keyof T]: T[K];
43
+ } : {
44
+ [K in keyof T as K]: T[K];
45
+ }) & {};
@@ -0,0 +1,58 @@
1
+ import { DateRange } from './BaseCalendar.vue';
2
+ import { WeekStart } from '../utils/date';
3
+ export interface DatePreset {
4
+ /** Already translated: "Last 7 days", "This month". */
5
+ label: string;
6
+ /** The days it stands for, built when it is pressed — so "today" is today. */
7
+ value: () => string | DateRange;
8
+ }
9
+ declare const __VLS_export: <M extends "single" | "range" = "single">(__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<{
10
+ props: import('vue').PublicProps & __VLS_PrettifyLocal<({
11
+ label: string;
12
+ /** One day, or a stretch from one day to another. */
13
+ mode?: M | undefined;
14
+ /** What the field shows while nothing is chosen. */
15
+ placeholder?: string | undefined;
16
+ /** How the chosen date reads, through `Intl.DateTimeFormat`. */
17
+ format?: Intl.DateTimeFormatOptions | undefined;
18
+ /** Ready-made answers beside the calendar: "Last 7 days", "This month". */
19
+ presets?: readonly DatePreset[] | undefined;
20
+ /** Given, the field grows a button that empties it. Its accessible name. */
21
+ clearLabel?: string | undefined;
22
+ min?: string | undefined;
23
+ max?: string | undefined;
24
+ isDisabled?: ((key: string) => boolean) | undefined;
25
+ weekStartsOn?: WeekStart | undefined;
26
+ /** Accessible name of the calendar's back arrow. */
27
+ previousLabel: string;
28
+ /** Accessible name of the calendar's forward arrow. */
29
+ nextLabel: string;
30
+ /** Which day the calendar marks as today. Given, so a demo or a test can fix it. */
31
+ today?: string | undefined;
32
+ error?: string | undefined;
33
+ hint?: string | undefined;
34
+ size?: "sm" | "md" | undefined;
35
+ labelHidden?: boolean | undefined;
36
+ disabled?: boolean | undefined;
37
+ } & {
38
+ /** The chosen day, or range, with `v-model`. */
39
+ modelValue?: (M extends "range" ? DateRange : string) | undefined;
40
+ }) & {
41
+ "onUpdate:modelValue"?: (value: (M extends "range" ? DateRange : string) | undefined) => any;
42
+ }> & (typeof globalThis extends {
43
+ __VLS_PROPS_FALLBACK: infer P;
44
+ } ? P : {});
45
+ expose: (exposed: {}) => void;
46
+ attrs: any;
47
+ slots: {};
48
+ emit: (event: "update:modelValue", value: (M extends "range" ? DateRange : string) | undefined) => void;
49
+ }>) => import('vue').VNode & {
50
+ __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
51
+ };
52
+ declare const _default: typeof __VLS_export;
53
+ export default _default;
54
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
55
+ [K in keyof T]: T[K];
56
+ } : {
57
+ [K in keyof T as K]: T[K];
58
+ }) & {};
package/dist/index.d.ts CHANGED
@@ -85,6 +85,10 @@ export { default as LocaleLinks } from './components/LocaleLinks.vue';
85
85
  export { default as GoogleButton } from './components/GoogleButton.vue';
86
86
  export { default as TabBar } from './components/TabBar.vue';
87
87
  export type { TabItem } from './components/TabBar.vue';
88
+ export { default as BaseCalendar } from './components/BaseCalendar.vue';
89
+ export type { DateRange } from './components/BaseCalendar.vue';
90
+ export { default as BaseDatePicker } from './components/BaseDatePicker.vue';
91
+ export type { DatePreset } from './components/BaseDatePicker.vue';
88
92
  export { default as BasePopover } from './components/BasePopover.vue';
89
93
  export type { PopoverTriggerProps } from './components/BasePopover.vue';
90
94
  export { default as ToggleGroup } from './components/ToggleGroup.vue';