@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.
Files changed (36) hide show
  1. package/dist/_chunks/carousel.agent-OTn-kMQg.js +1669 -0
  2. package/dist/_chunks/{header-D0ULgQl3.js → header-DqmKROIY.js} +42 -52
  3. package/dist/_chunks/{map-view-Dd48BxVB.js → map-view-DVP-Kp9l.js} +445 -444
  4. package/dist/_chunks/menu-XRhW3_99.js +16 -0
  5. package/dist/_chunks/{patient-shell-CL20JnVJ.js → patient-shell-BE0CdPOJ.js} +2 -2
  6. package/dist/_chunks/public-header.agent-ZLBAQ30j.js +242 -0
  7. package/dist/_chunks/stat-CYEx8sIR.js +317 -0
  8. package/dist/_chunks/use-count-up-BLLetaZ8.js +109 -0
  9. package/dist/agent-catalog.json +92 -1
  10. package/dist/components/carousel/carousel.agent.d.ts +4 -0
  11. package/dist/components/carousel/carousel.d.ts +45 -0
  12. package/dist/components/carousel/index.d.ts +3 -0
  13. package/dist/components/carousel/index.js +6 -0
  14. package/dist/components/header/index.js +1 -1
  15. package/dist/components/index.d.ts +2 -0
  16. package/dist/components/map-view/index.js +1 -1
  17. package/dist/components/map-view/map-view.d.ts +8 -0
  18. package/dist/components/public-header/index.d.ts +3 -0
  19. package/dist/components/public-header/index.js +6 -0
  20. package/dist/components/public-header/public-header.agent.d.ts +4 -0
  21. package/dist/components/public-header/public-header.d.ts +43 -0
  22. package/dist/components/stat/index.js +1 -1
  23. package/dist/components/stat/stat.d.ts +31 -0
  24. package/dist/hooks/index.d.ts +2 -0
  25. package/dist/hooks/index.js +10 -8
  26. package/dist/hooks/use-count-up.d.ts +88 -0
  27. package/dist/i18n/config.js +51 -0
  28. package/dist/i18n/resources.d.ts +51 -0
  29. package/dist/index.js +367 -361
  30. package/dist/locales/de.json +17 -0
  31. package/dist/locales/en.json +17 -0
  32. package/dist/locales/it.json +17 -0
  33. package/dist/patterns/patient-shell/index.js +1 -1
  34. package/dist/tokens.css +1 -1
  35. package/package.json +10 -1
  36. package/dist/_chunks/stat-CDQ_a0vk.js +0 -228
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfadocs/ui-kit",
3
- "version": "0.14.1",
3
+ "version": "0.15.1",
4
4
  "type": "module",
5
5
  "description": "AlfaDocs shared design system — tokens, components, patterns, and translations for platform, booking, and alfascribe.",
6
6
  "license": "BUSL-1.1",
@@ -103,6 +103,10 @@
103
103
  "types": "./dist/components/card/index.d.ts",
104
104
  "import": "./dist/components/card/index.js"
105
105
  },
106
+ "./carousel": {
107
+ "types": "./dist/components/carousel/index.d.ts",
108
+ "import": "./dist/components/carousel/index.js"
109
+ },
106
110
  "./chart": {
107
111
  "types": "./dist/components/chart/index.d.ts",
108
112
  "import": "./dist/components/chart/index.js"
@@ -299,6 +303,10 @@
299
303
  "types": "./dist/components/progress/index.d.ts",
300
304
  "import": "./dist/components/progress/index.js"
301
305
  },
306
+ "./public-header": {
307
+ "types": "./dist/components/public-header/index.d.ts",
308
+ "import": "./dist/components/public-header/index.js"
309
+ },
302
310
  "./radio-group": {
303
311
  "types": "./dist/components/radio-group/index.d.ts",
304
312
  "import": "./dist/components/radio-group/index.js"
@@ -668,6 +676,7 @@
668
676
  "country-flag-icons": "^1.6.16",
669
677
  "date-fns": "^4.1.0",
670
678
  "dompurify": "^3.4.0",
679
+ "embla-carousel-react": "8.6.0",
671
680
  "lucide-react": "^1.8.0",
672
681
  "react-day-picker": "^9.7.0",
673
682
  "react-dropzone": "^15.0.0",
@@ -1,228 +0,0 @@
1
- import { jsxs as c, jsx as e } from "react/jsx-runtime";
2
- import { forwardRef as I, useId as j } from "react";
3
- import { c as p } from "./index-D2ZczOXr.js";
4
- import { useTranslation as h } from "react-i18next";
5
- const y = p("ds:flex ds:flex-col", {
6
- variants: {
7
- variant: {
8
- default: "ds:gap-[var(--spacing-xs)]",
9
- outlined: [
10
- "ds:gap-[var(--spacing-xs)]",
11
- "ds:border ds:border-[color:var(--border)]",
12
- "ds:rounded-[var(--radius-md)]",
13
- "ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]",
14
- "ds:pt-[var(--spacing-md)] ds:pb-[var(--spacing-md)]"
15
- ].join(" "),
16
- // White card surface with the shared card shadow — matches
17
- // `Card variant="elevated"` tokens (`--card` + `--shadow-card`) so
18
- // a grid of elevated Stats reads as a set of shaded panels without
19
- // nesting a Card around each one.
20
- elevated: [
21
- "ds:gap-[var(--spacing-xs)]",
22
- "ds:bg-[var(--card)]",
23
- "ds:text-[var(--card-foreground)]",
24
- "ds:shadow-[var(--shadow-card)]",
25
- "ds:rounded-[var(--radius-lg)]",
26
- "ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]",
27
- "ds:pt-[var(--spacing-md)] ds:pb-[var(--spacing-md)]",
28
- // Forced-colors: UA strips shadow, so render a border as the
29
- // separation cue — mirrors Card's forced-colors behaviour.
30
- "ds:forced-colors:border ds:forced-colors:border-[CanvasText]"
31
- ].join(" "),
32
- compact: "ds:gap-[var(--spacing-none)]"
33
- },
34
- size: {
35
- sm: "",
36
- md: "",
37
- lg: ""
38
- },
39
- align: {
40
- start: "ds:items-start ds:text-start",
41
- center: "ds:items-center ds:text-center",
42
- end: "ds:items-end ds:text-end"
43
- }
44
- },
45
- defaultVariants: {
46
- variant: "default",
47
- size: "md",
48
- align: "start"
49
- }
50
- }), k = p("type-metric ds:text-[var(--foreground)]", {
51
- variants: {
52
- size: {
53
- sm: "ds:[--type-metric-size:var(--font-size-xl)]",
54
- md: "ds:[--type-metric-size:var(--font-size-3xl)]",
55
- lg: "ds:[--type-metric-size:var(--font-size-5xl)]"
56
- },
57
- variant: {
58
- default: "",
59
- outlined: "",
60
- elevated: "",
61
- compact: ""
62
- }
63
- },
64
- compoundVariants: [
65
- {
66
- variant: "compact",
67
- size: "sm",
68
- className: "ds:[--type-metric-size:var(--font-size-lg)]"
69
- },
70
- {
71
- variant: "compact",
72
- size: "md",
73
- className: "ds:[--type-metric-size:var(--font-size-xl)]"
74
- },
75
- {
76
- variant: "compact",
77
- size: "lg",
78
- className: "ds:[--type-metric-size:var(--font-size-2xl)]"
79
- }
80
- ],
81
- defaultVariants: {
82
- size: "md",
83
- variant: "default"
84
- }
85
- }), S = p(
86
- "ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)] type-label",
87
- {
88
- variants: {
89
- trend: {
90
- up: "ds:text-[var(--success)]",
91
- down: "ds:text-[var(--destructive)]",
92
- flat: "ds:text-[var(--muted-foreground)]"
93
- }
94
- },
95
- defaultVariants: {
96
- trend: "flat"
97
- }
98
- }
99
- ), T = { up: "↑", down: "↓", flat: "→" }, F = {
100
- up: "stat.trend.up",
101
- down: "stat.trend.down",
102
- flat: "stat.trend.flat"
103
- };
104
- function R({
105
- trend: s,
106
- delta: a,
107
- deltaFormat: t = "decimal",
108
- locale: l
109
- }) {
110
- const { t: r, i18n: d } = h(), n = typeof a == "string" ? a : new Intl.NumberFormat(l ?? d.language, {
111
- style: t === "percent" ? "percent" : "decimal"
112
- }).format(t === "percent" ? a / 100 : a);
113
- return /* @__PURE__ */ c("span", { className: S({ trend: s }), children: [
114
- /* @__PURE__ */ e("span", { "aria-hidden": "true", children: T[s] }),
115
- /* @__PURE__ */ e("span", { className: "ds:sr-only", children: r(F[s]) }),
116
- n
117
- ] });
118
- }
119
- const D = I(
120
- ({
121
- label: s,
122
- value: a,
123
- format: t,
124
- currency: l,
125
- locale: r,
126
- trend: d,
127
- delta: n,
128
- deltaFormat: N = "decimal",
129
- icon: u,
130
- loading: w = !1,
131
- variant: o = "default",
132
- size: m = "md",
133
- align: v = "start",
134
- className: f,
135
- ...g
136
- }, x) => {
137
- const { i18n: z } = h(), b = j(), V = () => {
138
- if (typeof a == "string") return a;
139
- const i = r ?? z.language;
140
- switch (t) {
141
- case "currency":
142
- return new Intl.NumberFormat(i, {
143
- style: "currency",
144
- currency: l ?? "USD"
145
- }).format(a);
146
- case "percent":
147
- return new Intl.NumberFormat(i, { style: "percent" }).format(
148
- a
149
- );
150
- case "decimal":
151
- return new Intl.NumberFormat(i, { style: "decimal" }).format(
152
- a
153
- );
154
- default:
155
- return new Intl.NumberFormat(i).format(a);
156
- }
157
- };
158
- return w ? /* @__PURE__ */ c(
159
- "div",
160
- {
161
- ref: x,
162
- role: "group",
163
- "aria-busy": "true",
164
- "aria-label": s,
165
- "data-component": "stat",
166
- className: y({ variant: o, size: m, align: v, className: f }),
167
- ...g,
168
- children: [
169
- /* @__PURE__ */ e("div", { className: "ds:h-[var(--skeleton-label-h)] ds:w-[var(--skeleton-label-w)] ds:animate-pulse ds:rounded-[var(--radius-sm)] ds:bg-[var(--muted)]" }),
170
- /* @__PURE__ */ e("div", { className: "ds:h-[var(--skeleton-value-h)] ds:w-[var(--skeleton-value-w)] ds:animate-pulse ds:rounded-[var(--radius-sm)] ds:bg-[var(--muted)]" })
171
- ]
172
- }
173
- ) : /* @__PURE__ */ c(
174
- "div",
175
- {
176
- ref: x,
177
- role: "group",
178
- "aria-labelledby": b,
179
- "data-component": "stat",
180
- className: y({ variant: o, size: m, align: v, className: f }),
181
- ...g,
182
- children: [
183
- /* @__PURE__ */ c("span", { className: "ds:inline-flex ds:items-center", children: [
184
- u && /* @__PURE__ */ e(
185
- "span",
186
- {
187
- "aria-hidden": "true",
188
- className: [
189
- "ds:me-[var(--spacing-xs)] ds:inline-flex ds:shrink-0",
190
- // Accent tint on the leading icon. The icon is decorative
191
- // (aria-hidden), so magenta-500's 3.2:1 contrast on white
192
- // is acceptable here — the Stat label + value still
193
- // carry the accessible name at `--foreground`.
194
- "ds:text-[color:var(--accent)]",
195
- "ds:forced-colors:text-[CanvasText]"
196
- ].join(" "),
197
- children: u
198
- }
199
- ),
200
- /* @__PURE__ */ e(
201
- "span",
202
- {
203
- id: b,
204
- className: "type-label ds:text-[var(--muted-foreground)]",
205
- children: s
206
- }
207
- )
208
- ] }),
209
- /* @__PURE__ */ e("span", { className: k({ size: m, variant: o }), children: V() }),
210
- d != null && n != null && /* @__PURE__ */ e(
211
- R,
212
- {
213
- trend: d,
214
- delta: n,
215
- deltaFormat: N,
216
- locale: r
217
- }
218
- )
219
- ]
220
- }
221
- );
222
- }
223
- );
224
- D.displayName = "Stat";
225
- export {
226
- D as S
227
- };
228
- //# sourceMappingURL=stat-CDQ_a0vk.js.map