@alfadocs/ui-kit 0.14.1 → 0.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks/carousel.agent-OTn-kMQg.js +1669 -0
- package/dist/_chunks/{header-D0ULgQl3.js → header-DqmKROIY.js} +42 -52
- package/dist/_chunks/{map-view-Dd48BxVB.js → map-view-DVP-Kp9l.js} +445 -444
- package/dist/_chunks/menu-XRhW3_99.js +16 -0
- package/dist/_chunks/{patient-shell-CL20JnVJ.js → patient-shell-BE0CdPOJ.js} +2 -2
- package/dist/_chunks/public-header.agent-ZLBAQ30j.js +242 -0
- package/dist/_chunks/stat-CYEx8sIR.js +317 -0
- package/dist/_chunks/use-count-up-BLLetaZ8.js +109 -0
- package/dist/agent-catalog.json +92 -1
- package/dist/components/carousel/carousel.agent.d.ts +4 -0
- package/dist/components/carousel/carousel.d.ts +45 -0
- package/dist/components/carousel/index.d.ts +3 -0
- package/dist/components/carousel/index.js +6 -0
- package/dist/components/header/index.js +1 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/components/map-view/index.js +1 -1
- package/dist/components/map-view/map-view.d.ts +8 -0
- package/dist/components/public-header/index.d.ts +3 -0
- package/dist/components/public-header/index.js +6 -0
- package/dist/components/public-header/public-header.agent.d.ts +4 -0
- package/dist/components/public-header/public-header.d.ts +43 -0
- package/dist/components/stat/index.js +1 -1
- package/dist/components/stat/stat.d.ts +31 -0
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/index.js +10 -8
- package/dist/hooks/use-count-up.d.ts +88 -0
- package/dist/i18n/config.js +51 -0
- package/dist/i18n/resources.d.ts +51 -0
- package/dist/index.js +367 -361
- package/dist/locales/de.json +17 -0
- package/dist/locales/en.json +17 -0
- package/dist/locales/it.json +17 -0
- package/dist/patterns/patient-shell/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +10 -1
- package/dist/_chunks/stat-CDQ_a0vk.js +0 -228
package/dist/agent-catalog.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"packageVersion": "0.
|
|
3
|
+
"packageVersion": "0.15.1",
|
|
4
4
|
"components": [
|
|
5
5
|
{
|
|
6
6
|
"kind": "component",
|
|
@@ -544,6 +544,59 @@
|
|
|
544
544
|
}
|
|
545
545
|
}
|
|
546
546
|
},
|
|
547
|
+
{
|
|
548
|
+
"kind": "component",
|
|
549
|
+
"id": "carousel",
|
|
550
|
+
"capabilities": [
|
|
551
|
+
"navigate",
|
|
552
|
+
"view_change"
|
|
553
|
+
],
|
|
554
|
+
"state": [
|
|
555
|
+
{
|
|
556
|
+
"name": "activeIndex",
|
|
557
|
+
"type": "number",
|
|
558
|
+
"description": "Zero-based index of the currently snapped slide."
|
|
559
|
+
},
|
|
560
|
+
{
|
|
561
|
+
"name": "count",
|
|
562
|
+
"type": "number",
|
|
563
|
+
"description": "Total slide count."
|
|
564
|
+
}
|
|
565
|
+
],
|
|
566
|
+
"actions": [
|
|
567
|
+
{
|
|
568
|
+
"name": "scroll_to",
|
|
569
|
+
"safety": "read",
|
|
570
|
+
"argsType": "{ index: number }",
|
|
571
|
+
"description": "Scroll to the slide at the given index."
|
|
572
|
+
},
|
|
573
|
+
{
|
|
574
|
+
"name": "scroll_prev",
|
|
575
|
+
"safety": "read",
|
|
576
|
+
"description": "Scroll to the previous slide."
|
|
577
|
+
},
|
|
578
|
+
{
|
|
579
|
+
"name": "scroll_next",
|
|
580
|
+
"safety": "read",
|
|
581
|
+
"description": "Scroll to the next slide."
|
|
582
|
+
}
|
|
583
|
+
],
|
|
584
|
+
"domHooks": {
|
|
585
|
+
"root": {
|
|
586
|
+
"attr": "data-component",
|
|
587
|
+
"value": "carousel"
|
|
588
|
+
},
|
|
589
|
+
"instanceId": {
|
|
590
|
+
"attr": "data-component-id",
|
|
591
|
+
"sourceProp": "id",
|
|
592
|
+
"description": "Sourced from the id prop on Carousel."
|
|
593
|
+
},
|
|
594
|
+
"item": {
|
|
595
|
+
"attr": "data-slide-id",
|
|
596
|
+
"description": "Each Carousel.Item emits its `id` prop as `data-slide-id`. `data-slide-index` carries the zero-based position alongside."
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
},
|
|
547
600
|
{
|
|
548
601
|
"kind": "component",
|
|
549
602
|
"id": "chart",
|
|
@@ -2431,6 +2484,44 @@
|
|
|
2431
2484
|
}
|
|
2432
2485
|
}
|
|
2433
2486
|
},
|
|
2487
|
+
{
|
|
2488
|
+
"kind": "component",
|
|
2489
|
+
"id": "public-header",
|
|
2490
|
+
"capabilities": [
|
|
2491
|
+
"open",
|
|
2492
|
+
"close"
|
|
2493
|
+
],
|
|
2494
|
+
"state": [
|
|
2495
|
+
{
|
|
2496
|
+
"name": "menuOpen",
|
|
2497
|
+
"type": "boolean",
|
|
2498
|
+
"description": "Whether the mobile drawer is currently open."
|
|
2499
|
+
}
|
|
2500
|
+
],
|
|
2501
|
+
"actions": [
|
|
2502
|
+
{
|
|
2503
|
+
"name": "open_menu",
|
|
2504
|
+
"safety": "read",
|
|
2505
|
+
"description": "Open the mobile drawer."
|
|
2506
|
+
},
|
|
2507
|
+
{
|
|
2508
|
+
"name": "close_menu",
|
|
2509
|
+
"safety": "read",
|
|
2510
|
+
"description": "Close the mobile drawer."
|
|
2511
|
+
}
|
|
2512
|
+
],
|
|
2513
|
+
"domHooks": {
|
|
2514
|
+
"root": {
|
|
2515
|
+
"attr": "data-component",
|
|
2516
|
+
"value": "public-header"
|
|
2517
|
+
},
|
|
2518
|
+
"instanceId": {
|
|
2519
|
+
"attr": "data-component-id",
|
|
2520
|
+
"sourceProp": "id",
|
|
2521
|
+
"description": "Sourced from the id prop on PublicHeader."
|
|
2522
|
+
}
|
|
2523
|
+
}
|
|
2524
|
+
},
|
|
2434
2525
|
{
|
|
2435
2526
|
"kind": "component",
|
|
2436
2527
|
"id": "radio",
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { type ComponentPropsWithoutRef, type ReactNode } from 'react';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
export interface CarouselHandle {
|
|
4
|
+
/** Programmatically focus + scroll to the item at index `i`. */
|
|
5
|
+
scrollTo: (index: number) => void;
|
|
6
|
+
/** Currently snapped item index (0-based). */
|
|
7
|
+
getActiveIndex: () => number;
|
|
8
|
+
/** Total slide count. */
|
|
9
|
+
getCount: () => number;
|
|
10
|
+
/** Scroll one slide to the previous direction. */
|
|
11
|
+
scrollPrev: () => void;
|
|
12
|
+
/** Scroll one slide to the next direction. */
|
|
13
|
+
scrollNext: () => void;
|
|
14
|
+
}
|
|
15
|
+
export interface CarouselProps extends Omit<ComponentPropsWithoutRef<'section'>, 'children'>, VariantProps<typeof rootVariants> {
|
|
16
|
+
children: ReactNode;
|
|
17
|
+
/** Accessible label (falls back to `t('carousel.label')`). */
|
|
18
|
+
'aria-label'?: string;
|
|
19
|
+
/** Show prev / next IconButton pair in the header (visible ≥ md). */
|
|
20
|
+
showControls?: boolean;
|
|
21
|
+
/** Show dot indicators below the strip. */
|
|
22
|
+
showIndicators?: boolean;
|
|
23
|
+
/** Optional "view all" affordance on the trailing edge of the default header. */
|
|
24
|
+
viewAllSlot?: ReactNode;
|
|
25
|
+
/** Snap behaviour. Default `mandatory` aligns each item to the start. */
|
|
26
|
+
snap?: 'mandatory' | 'proximity';
|
|
27
|
+
/** Consumer-supplied instance id, surfaced as `data-component-id`. */
|
|
28
|
+
id?: string;
|
|
29
|
+
}
|
|
30
|
+
export interface CarouselItemProps extends ComponentPropsWithoutRef<'div'> {
|
|
31
|
+
children: ReactNode;
|
|
32
|
+
}
|
|
33
|
+
export interface CarouselHeaderProps extends ComponentPropsWithoutRef<'div'> {
|
|
34
|
+
children: ReactNode;
|
|
35
|
+
}
|
|
36
|
+
declare const rootVariants: (props?: ({
|
|
37
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
38
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
39
|
+
export declare const Carousel: import("react").ForwardRefExoticComponent<CarouselProps & import("react").RefAttributes<HTMLElement>> & {
|
|
40
|
+
Header: import("react").ForwardRefExoticComponent<CarouselHeaderProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
41
|
+
Item: import("react").ForwardRefExoticComponent<CarouselItemProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
42
|
+
Controls: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
43
|
+
};
|
|
44
|
+
export {};
|
|
45
|
+
//# sourceMappingURL=carousel.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { H as r, a as d, b as H, c as s, d as n, e as t, f as i, g as o } from "../../_chunks/header-
|
|
1
|
+
import { H as r, a as d, b as H, c as s, d as n, e as t, f as i, g as o } from "../../_chunks/header-DqmKROIY.js";
|
|
2
2
|
export {
|
|
3
3
|
r as Header,
|
|
4
4
|
d as HeaderBrand,
|
|
@@ -38,6 +38,7 @@ export * from './accordion';
|
|
|
38
38
|
export * from './avatar';
|
|
39
39
|
export * from './badge';
|
|
40
40
|
export * from './card';
|
|
41
|
+
export * from './carousel';
|
|
41
42
|
export * from './contact-card';
|
|
42
43
|
export * from './data-table';
|
|
43
44
|
export * from './description-list';
|
|
@@ -61,6 +62,7 @@ export * from './header';
|
|
|
61
62
|
export * from './navigation-menu';
|
|
62
63
|
export * from './link';
|
|
63
64
|
export * from './pagination';
|
|
65
|
+
export * from './public-header';
|
|
64
66
|
export * from './search-bar';
|
|
65
67
|
export * from './sidebar';
|
|
66
68
|
export * from './skip-link';
|
|
@@ -67,11 +67,19 @@ export interface MapViewProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onCl
|
|
|
67
67
|
* paragraph, a localised `<Trans>` instance, etc.
|
|
68
68
|
*/
|
|
69
69
|
consentDescription?: ReactNode;
|
|
70
|
+
/**
|
|
71
|
+
* Visual surface. Default `bordered` (current behaviour: 1px
|
|
72
|
+
* `--border` outline + `--radius-md`). `elevated` replaces the
|
|
73
|
+
* border with `--shadow-card`, matching `<Card variant="elevated">`.
|
|
74
|
+
* `bare` drops both — map is flush against the page canvas.
|
|
75
|
+
*/
|
|
76
|
+
surface?: 'bordered' | 'elevated' | 'bare';
|
|
70
77
|
/** Accessible label for the map region. Falls back to `t('mapView.label')`. */
|
|
71
78
|
ariaLabel?: string;
|
|
72
79
|
}
|
|
73
80
|
declare const mapViewVariants: (props?: ({
|
|
74
81
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
82
|
+
surface?: "elevated" | "bordered" | "bare" | null | undefined;
|
|
75
83
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
76
84
|
export declare const MapView: import("react").ForwardRefExoticComponent<MapViewProps & import("react").RefAttributes<MapViewHandle>>;
|
|
77
85
|
export {};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { type AnchorHTMLAttributes, type ComponentPropsWithoutRef, type ReactNode } from 'react';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
export interface PublicHeaderHandle {
|
|
4
|
+
openMenu: () => void;
|
|
5
|
+
closeMenu: () => void;
|
|
6
|
+
getMenuOpen: () => boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface PublicHeaderProps extends Omit<ComponentPropsWithoutRef<'header'>, 'children'>, VariantProps<typeof rootVariants> {
|
|
9
|
+
/** Logo lockup, typically `<Logo variant="wordmark" tone="primary" size="md" />`. */
|
|
10
|
+
logo: ReactNode;
|
|
11
|
+
/** Optional href for the logo link. Defaults to `/`. */
|
|
12
|
+
homeHref?: string;
|
|
13
|
+
/** Accessible label for the logo link (falls back to `t('publicHeader.homeLabel')`). */
|
|
14
|
+
homeLabel?: string;
|
|
15
|
+
/** Primary nav links rendered inline ≥ md, collapsed into the mobile sheet below md. */
|
|
16
|
+
navSlot?: ReactNode;
|
|
17
|
+
/** Right-side actions (sign-in / register / role-switch CTAs). */
|
|
18
|
+
actionsSlot?: ReactNode;
|
|
19
|
+
/** Sticky behaviour. Default `none`. */
|
|
20
|
+
sticky?: 'none' | 'top' | 'scroll-up';
|
|
21
|
+
/** Pixel offset above which `sticky="scroll-up"` engages and `transparent` fades to default. */
|
|
22
|
+
stickyOffset?: number;
|
|
23
|
+
/** Override the mobile menu trigger's accessible label (`t('publicHeader.openMenu')`). */
|
|
24
|
+
menuLabel?: string;
|
|
25
|
+
/** Override the navigation landmark label (`t('publicHeader.primaryNavLabel')`). */
|
|
26
|
+
navLabel?: string;
|
|
27
|
+
/** Consumer-supplied instance id, surfaced as `data-component-id`. */
|
|
28
|
+
id?: string;
|
|
29
|
+
}
|
|
30
|
+
export interface PublicHeaderNavLinkProps extends Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'children'> {
|
|
31
|
+
href: string;
|
|
32
|
+
active?: boolean;
|
|
33
|
+
children: ReactNode;
|
|
34
|
+
}
|
|
35
|
+
declare const rootVariants: (props?: ({
|
|
36
|
+
variant?: "dark" | "default" | "transparent" | null | undefined;
|
|
37
|
+
sticky?: "none" | "top" | "scroll-up" | null | undefined;
|
|
38
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
39
|
+
export declare const PublicHeader: import("react").ForwardRefExoticComponent<PublicHeaderProps & import("react").RefAttributes<HTMLElement>> & {
|
|
40
|
+
NavLink: import("react").ForwardRefExoticComponent<PublicHeaderNavLinkProps & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
41
|
+
};
|
|
42
|
+
export {};
|
|
43
|
+
//# sourceMappingURL=public-header.d.ts.map
|
|
@@ -26,6 +26,37 @@ export interface StatProps extends HTMLAttributes<HTMLDivElement>, VariantProps<
|
|
|
26
26
|
icon?: ReactNode;
|
|
27
27
|
/** Renders animated skeleton placeholders instead of content. */
|
|
28
28
|
loading?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Animate the numeric value from 0 (or from the captured leading
|
|
31
|
+
* sign) to the final value when the Stat first scrolls into view.
|
|
32
|
+
* Default `false`. Marketing surfaces opt in; dashboards leave it
|
|
33
|
+
* off so live metrics render immediately.
|
|
34
|
+
*/
|
|
35
|
+
animate?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* When `true`, the count-up re-plays every time the Stat scrolls
|
|
38
|
+
* out of view and back in. Default `false` — animate once per
|
|
39
|
+
* element per session, matching the booking-website hero pattern.
|
|
40
|
+
* Ignored under `prefers-reduced-motion: reduce`.
|
|
41
|
+
*/
|
|
42
|
+
animateOnEveryView?: boolean;
|
|
43
|
+
/** Animation duration in milliseconds. Default 1600. */
|
|
44
|
+
animateDurationMs?: number;
|
|
45
|
+
/**
|
|
46
|
+
* BCP 47 locale used for the per-frame count-up formatting. Falls
|
|
47
|
+
* back to `locale`, then to the active i18n language.
|
|
48
|
+
*/
|
|
49
|
+
animateLocale?: string;
|
|
50
|
+
/**
|
|
51
|
+
* Override the locale's thousand / decimal glyphs for the count-up.
|
|
52
|
+
* Wins over locale defaults. Pass partial overrides — `decimal`
|
|
53
|
+
* alone is valid; the unspecified separator stays at the locale
|
|
54
|
+
* default.
|
|
55
|
+
*/
|
|
56
|
+
animateSeparators?: {
|
|
57
|
+
thousand?: string;
|
|
58
|
+
decimal?: string;
|
|
59
|
+
};
|
|
29
60
|
}
|
|
30
61
|
export declare const Stat: import("react").ForwardRefExoticComponent<StatProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
31
62
|
export {};
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -2,6 +2,8 @@ export { usePrefersReducedMotion } from './use-prefers-reduced-motion';
|
|
|
2
2
|
export { useMediaQuery } from './use-media-query';
|
|
3
3
|
export { useScrollToFirstError } from './use-scroll-to-first-error';
|
|
4
4
|
export type { UseScrollToFirstErrorOptions } from './use-scroll-to-first-error';
|
|
5
|
+
export { useCountUp } from './use-count-up';
|
|
6
|
+
export type { UseCountUpOptions, UseCountUpReturn } from './use-count-up';
|
|
5
7
|
export { useLocale } from './use-locale';
|
|
6
8
|
export type { LocaleDir, UseLocaleReturn } from './use-locale';
|
|
7
9
|
export { useTheme, resolveTheme, themeClassList, THEME_STORAGE_KEY, ACCESSIBILITY_STORAGE_KEY, THEME_CLASS, } from './use-theme';
|
package/dist/hooks/index.js
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import { u as r } from "../_chunks/use-prefers-reduced-motion-BMwIQRjB.js";
|
|
2
|
-
import { u as o, a as u, b as
|
|
3
|
-
import {
|
|
2
|
+
import { u as o, a as u, b as t } from "../_chunks/use-locale-C5rS3Xon.js";
|
|
3
|
+
import { u as T } from "../_chunks/use-count-up-BLLetaZ8.js";
|
|
4
|
+
import { A as S, T as f, a as l, r as p, t as A, u as C } from "../_chunks/use-theme-B1cwAXJR.js";
|
|
4
5
|
export {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
S as ACCESSIBILITY_STORAGE_KEY,
|
|
7
|
+
f as THEME_CLASS,
|
|
8
|
+
l as THEME_STORAGE_KEY,
|
|
9
|
+
p as resolveTheme,
|
|
9
10
|
A as themeClassList,
|
|
11
|
+
T as useCountUp,
|
|
10
12
|
o as useLocale,
|
|
11
13
|
u as useMediaQuery,
|
|
12
14
|
r as usePrefersReducedMotion,
|
|
13
|
-
|
|
14
|
-
|
|
15
|
+
t as useScrollToFirstError,
|
|
16
|
+
C as useTheme
|
|
15
17
|
};
|
|
16
18
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
export interface UseCountUpOptions {
|
|
2
|
+
/** Target value the animation lands on. */
|
|
3
|
+
to: number;
|
|
4
|
+
/** Starting value. Defaults to 0. */
|
|
5
|
+
from?: number;
|
|
6
|
+
/** Duration in milliseconds. Defaults to 1600. */
|
|
7
|
+
durationMs?: number;
|
|
8
|
+
/**
|
|
9
|
+
* Attach an `IntersectionObserver` to the ref and only start the
|
|
10
|
+
* animation when the element first crosses the visibility threshold.
|
|
11
|
+
* Defaults to `true`. Set to `false` to start immediately on mount.
|
|
12
|
+
*/
|
|
13
|
+
startOnVisible?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* When `true`, every out-of-view → in-view transition resets to
|
|
16
|
+
* `from` and re-plays the animation. Defaults to `false` — the
|
|
17
|
+
* default is "animate once per element per session", matching the
|
|
18
|
+
* booking-website hero use-case.
|
|
19
|
+
*/
|
|
20
|
+
retriggerOnReEntry?: boolean;
|
|
21
|
+
/** BCP 47 locale. Falls back to `navigator.language` then `'en'`. */
|
|
22
|
+
locale?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Override the locale's default thousand / decimal glyphs. When set,
|
|
25
|
+
* the hook builds a custom formatter on top of `Intl.NumberFormat`
|
|
26
|
+
* via `formatToParts`. Pass partial overrides — `decimal` alone is
|
|
27
|
+
* valid; the unspecified separator stays at the locale default.
|
|
28
|
+
*/
|
|
29
|
+
separators?: {
|
|
30
|
+
thousand?: string;
|
|
31
|
+
decimal?: string;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Full override — when provided, the hook bypasses
|
|
35
|
+
* `Intl.NumberFormat` and runs every frame's numeric value through
|
|
36
|
+
* this function instead. Highest precedence; `locale` and
|
|
37
|
+
* `separators` are ignored for the duration of the animation. The
|
|
38
|
+
* sign is part of the number passed in.
|
|
39
|
+
*/
|
|
40
|
+
formatter?: (n: number) => string;
|
|
41
|
+
/**
|
|
42
|
+
* Forces the reduced-motion branch on. Defaults to reading
|
|
43
|
+
* `prefers-reduced-motion: reduce` via `window.matchMedia`. Useful
|
|
44
|
+
* for unit tests and for callers that already track motion
|
|
45
|
+
* preferences upstream.
|
|
46
|
+
*/
|
|
47
|
+
reduceMotion?: boolean;
|
|
48
|
+
}
|
|
49
|
+
export interface UseCountUpReturn {
|
|
50
|
+
/**
|
|
51
|
+
* Ref callback. Attach to the element that should trigger the
|
|
52
|
+
* animation on viewport entry. Passing `null` (unmounting) cleans
|
|
53
|
+
* up the IntersectionObserver.
|
|
54
|
+
*/
|
|
55
|
+
ref: (el: HTMLElement | null) => void;
|
|
56
|
+
/** Formatted current frame value. */
|
|
57
|
+
value: string;
|
|
58
|
+
/** `true` after the animation lands on `to`. */
|
|
59
|
+
done: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Manually start the animation. Useful when `startOnVisible` is
|
|
62
|
+
* `false` or when re-playing is gated on a non-viewport event.
|
|
63
|
+
*/
|
|
64
|
+
start: () => void;
|
|
65
|
+
/** Reset to `from`; the next `start` (or visibility entry) re-plays. */
|
|
66
|
+
reset: () => void;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Animate a number from `from` to `to` over `durationMs`, optionally
|
|
70
|
+
* gated on viewport entry. Uses raw `requestAnimationFrame` + an
|
|
71
|
+
* `IntersectionObserver`, no third-party dependency.
|
|
72
|
+
*
|
|
73
|
+
* SSR-safe — the first render (server + client first-paint) returns the
|
|
74
|
+
* final formatted value. The IntersectionObserver and the rAF loop are
|
|
75
|
+
* attached inside `useEffect` so SSR markup matches client first-paint
|
|
76
|
+
* and hydration never observes the `from` value.
|
|
77
|
+
*
|
|
78
|
+
* Reduced motion — when `prefers-reduced-motion: reduce` is active (or
|
|
79
|
+
* `reduceMotion: true` is passed) the hook short-circuits to the final
|
|
80
|
+
* value on first paint and never attaches the observer. Honoured even
|
|
81
|
+
* when `retriggerOnReEntry` is set.
|
|
82
|
+
*
|
|
83
|
+
* Direction & negatives — the hook animates from `from` to `to`
|
|
84
|
+
* whichever direction that is. `to` can be negative; the sign is part
|
|
85
|
+
* of the formatted output every frame.
|
|
86
|
+
*/
|
|
87
|
+
export declare function useCountUp(options: UseCountUpOptions): UseCountUpReturn;
|
|
88
|
+
//# sourceMappingURL=use-count-up.d.ts.map
|
package/dist/i18n/config.js
CHANGED
|
@@ -16,6 +16,23 @@ const a = {
|
|
|
16
16
|
buttonGroup: {
|
|
17
17
|
label: "Button group"
|
|
18
18
|
},
|
|
19
|
+
carousel: {
|
|
20
|
+
label: "Carousel",
|
|
21
|
+
roleDescription: "carousel",
|
|
22
|
+
slideRoleDescription: "slide",
|
|
23
|
+
slideLabel: "{{current}} of {{total}}",
|
|
24
|
+
indicatorsLabel: "Slides",
|
|
25
|
+
previous: "Previous slide",
|
|
26
|
+
next: "Next slide",
|
|
27
|
+
goToSlide: "Go to slide {{index}}",
|
|
28
|
+
slideAnnouncement: "Slide {{current}} of {{total}}"
|
|
29
|
+
},
|
|
30
|
+
publicHeader: {
|
|
31
|
+
homeLabel: "AlfaDocs — home",
|
|
32
|
+
primaryNavLabel: "Primary",
|
|
33
|
+
openMenu: "Open menu",
|
|
34
|
+
closeMenu: "Close menu"
|
|
35
|
+
},
|
|
19
36
|
kbd: {
|
|
20
37
|
plus: "+",
|
|
21
38
|
then: "then",
|
|
@@ -1017,6 +1034,23 @@ const a = {
|
|
|
1017
1034
|
buttonGroup: {
|
|
1018
1035
|
label: "Gruppo di pulsanti"
|
|
1019
1036
|
},
|
|
1037
|
+
carousel: {
|
|
1038
|
+
label: "Carosello",
|
|
1039
|
+
roleDescription: "carosello",
|
|
1040
|
+
slideRoleDescription: "diapositiva",
|
|
1041
|
+
slideLabel: "{{current}} di {{total}}",
|
|
1042
|
+
indicatorsLabel: "Diapositive",
|
|
1043
|
+
previous: "Diapositiva precedente",
|
|
1044
|
+
next: "Diapositiva successiva",
|
|
1045
|
+
goToSlide: "Vai alla diapositiva {{index}}",
|
|
1046
|
+
slideAnnouncement: "Diapositiva {{current}} di {{total}}"
|
|
1047
|
+
},
|
|
1048
|
+
publicHeader: {
|
|
1049
|
+
homeLabel: "AlfaDocs — home",
|
|
1050
|
+
primaryNavLabel: "Navigazione principale",
|
|
1051
|
+
openMenu: "Apri menu",
|
|
1052
|
+
closeMenu: "Chiudi menu"
|
|
1053
|
+
},
|
|
1020
1054
|
kbd: {
|
|
1021
1055
|
plus: "+",
|
|
1022
1056
|
then: "poi",
|
|
@@ -1981,6 +2015,23 @@ const a = {
|
|
|
1981
2015
|
buttonGroup: {
|
|
1982
2016
|
label: "Schaltflächengruppe"
|
|
1983
2017
|
},
|
|
2018
|
+
carousel: {
|
|
2019
|
+
label: "Karussell",
|
|
2020
|
+
roleDescription: "Karussell",
|
|
2021
|
+
slideRoleDescription: "Folie",
|
|
2022
|
+
slideLabel: "{{current}} von {{total}}",
|
|
2023
|
+
indicatorsLabel: "Folien",
|
|
2024
|
+
previous: "Vorherige Folie",
|
|
2025
|
+
next: "Nächste Folie",
|
|
2026
|
+
goToSlide: "Zu Folie {{index}} wechseln",
|
|
2027
|
+
slideAnnouncement: "Folie {{current}} von {{total}}"
|
|
2028
|
+
},
|
|
2029
|
+
publicHeader: {
|
|
2030
|
+
homeLabel: "AlfaDocs — Startseite",
|
|
2031
|
+
primaryNavLabel: "Hauptnavigation",
|
|
2032
|
+
openMenu: "Menü öffnen",
|
|
2033
|
+
closeMenu: "Menü schließen"
|
|
2034
|
+
},
|
|
1984
2035
|
kbd: {
|
|
1985
2036
|
plus: "+",
|
|
1986
2037
|
then: "dann",
|
package/dist/i18n/resources.d.ts
CHANGED
|
@@ -14,6 +14,23 @@ export declare const enUi: {
|
|
|
14
14
|
readonly buttonGroup: {
|
|
15
15
|
readonly label: "Button group";
|
|
16
16
|
};
|
|
17
|
+
readonly carousel: {
|
|
18
|
+
readonly label: "Carousel";
|
|
19
|
+
readonly roleDescription: "carousel";
|
|
20
|
+
readonly slideRoleDescription: "slide";
|
|
21
|
+
readonly slideLabel: "{{current}} of {{total}}";
|
|
22
|
+
readonly indicatorsLabel: "Slides";
|
|
23
|
+
readonly previous: "Previous slide";
|
|
24
|
+
readonly next: "Next slide";
|
|
25
|
+
readonly goToSlide: "Go to slide {{index}}";
|
|
26
|
+
readonly slideAnnouncement: "Slide {{current}} of {{total}}";
|
|
27
|
+
};
|
|
28
|
+
readonly publicHeader: {
|
|
29
|
+
readonly homeLabel: "AlfaDocs — home";
|
|
30
|
+
readonly primaryNavLabel: "Primary";
|
|
31
|
+
readonly openMenu: "Open menu";
|
|
32
|
+
readonly closeMenu: "Close menu";
|
|
33
|
+
};
|
|
17
34
|
readonly kbd: {
|
|
18
35
|
readonly plus: "+";
|
|
19
36
|
readonly then: "then";
|
|
@@ -1031,6 +1048,23 @@ export declare const itUi: {
|
|
|
1031
1048
|
readonly buttonGroup: {
|
|
1032
1049
|
readonly label: "Gruppo di pulsanti";
|
|
1033
1050
|
};
|
|
1051
|
+
readonly carousel: {
|
|
1052
|
+
readonly label: "Carosello";
|
|
1053
|
+
readonly roleDescription: "carosello";
|
|
1054
|
+
readonly slideRoleDescription: "diapositiva";
|
|
1055
|
+
readonly slideLabel: "{{current}} di {{total}}";
|
|
1056
|
+
readonly indicatorsLabel: "Diapositive";
|
|
1057
|
+
readonly previous: "Diapositiva precedente";
|
|
1058
|
+
readonly next: "Diapositiva successiva";
|
|
1059
|
+
readonly goToSlide: "Vai alla diapositiva {{index}}";
|
|
1060
|
+
readonly slideAnnouncement: "Diapositiva {{current}} di {{total}}";
|
|
1061
|
+
};
|
|
1062
|
+
readonly publicHeader: {
|
|
1063
|
+
readonly homeLabel: "AlfaDocs — home";
|
|
1064
|
+
readonly primaryNavLabel: "Navigazione principale";
|
|
1065
|
+
readonly openMenu: "Apri menu";
|
|
1066
|
+
readonly closeMenu: "Chiudi menu";
|
|
1067
|
+
};
|
|
1034
1068
|
readonly kbd: {
|
|
1035
1069
|
readonly plus: "+";
|
|
1036
1070
|
readonly then: "poi";
|
|
@@ -2020,6 +2054,23 @@ export declare const deUi: {
|
|
|
2020
2054
|
readonly buttonGroup: {
|
|
2021
2055
|
readonly label: "Schaltflächengruppe";
|
|
2022
2056
|
};
|
|
2057
|
+
readonly carousel: {
|
|
2058
|
+
readonly label: "Karussell";
|
|
2059
|
+
readonly roleDescription: "Karussell";
|
|
2060
|
+
readonly slideRoleDescription: "Folie";
|
|
2061
|
+
readonly slideLabel: "{{current}} von {{total}}";
|
|
2062
|
+
readonly indicatorsLabel: "Folien";
|
|
2063
|
+
readonly previous: "Vorherige Folie";
|
|
2064
|
+
readonly next: "Nächste Folie";
|
|
2065
|
+
readonly goToSlide: "Zu Folie {{index}} wechseln";
|
|
2066
|
+
readonly slideAnnouncement: "Folie {{current}} von {{total}}";
|
|
2067
|
+
};
|
|
2068
|
+
readonly publicHeader: {
|
|
2069
|
+
readonly homeLabel: "AlfaDocs — Startseite";
|
|
2070
|
+
readonly primaryNavLabel: "Hauptnavigation";
|
|
2071
|
+
readonly openMenu: "Menü öffnen";
|
|
2072
|
+
readonly closeMenu: "Menü schließen";
|
|
2073
|
+
};
|
|
2023
2074
|
readonly kbd: {
|
|
2024
2075
|
readonly plus: "+";
|
|
2025
2076
|
readonly then: "dann";
|