@alfadocs/ui-kit 0.9.0 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/dist/_chunks/{agenda-card-DU13wUTA.js → agenda-card-CsCm7hQv.js} +2 -2
  2. package/dist/_chunks/{agenda-tray-gQUXklO4.js → agenda-tray-B8QZ3wEp.js} +2 -2
  3. package/dist/_chunks/{combobox-DUpWoPPk.js → combobox-BHhnR3qm.js} +4 -8
  4. package/dist/_chunks/{file-upload-BVbfiANR.js → file-upload-DIecAfC-.js} +4 -8
  5. package/dist/_chunks/{notification-card-CRIE2Cuk.js → notification-card-ejOw5g6g.js} +2 -5
  6. package/dist/_chunks/{notification-tray-CfXNYrxv.js → notification-tray-C3dYdLAF.js} +3 -6
  7. package/dist/_chunks/{patient-shell-BS2V6V1b.js → patient-shell-CL20JnVJ.js} +2 -2
  8. package/dist/_chunks/rating-BRD7O74e.js +171 -0
  9. package/dist/_chunks/{sidebar-CoLHtVrP.js → sidebar-D8Lq065m.js} +107 -121
  10. package/dist/_chunks/{sparkline-D4Np8ikf.js → sparkline-B5Ms55PZ.js} +2 -2
  11. package/dist/_chunks/star-vav0SJ9e.js +20 -0
  12. package/dist/_chunks/{timeline-BaSULpSJ.js → timeline-rmls7dIh.js} +9 -9
  13. package/dist/_chunks/{transaction-chip-eVbolm0B.js → transaction-chip-z9ENE50O.js} +2 -2
  14. package/dist/_chunks/{use-password-requirements-B1M8lE2t.js → use-password-requirements-DbPZMfV9.js} +2 -2
  15. package/dist/agent-catalog.json +15 -1
  16. package/dist/components/agenda-card/index.js +1 -1
  17. package/dist/components/agenda-tray/index.js +1 -1
  18. package/dist/components/combobox/index.js +1 -1
  19. package/dist/components/file-upload/index.js +1 -1
  20. package/dist/components/index.d.ts +1 -0
  21. package/dist/components/notification-card/index.js +1 -1
  22. package/dist/components/notification-tray/index.js +1 -1
  23. package/dist/components/password-input/index.js +1 -1
  24. package/dist/components/rating/index.d.ts +3 -0
  25. package/dist/components/rating/index.js +5 -0
  26. package/dist/components/rating/rating.d.ts +29 -0
  27. package/dist/components/sidebar/index.js +1 -1
  28. package/dist/components/sparkline/index.js +1 -1
  29. package/dist/components/timeline/index.js +1 -1
  30. package/dist/components/transaction-chip/index.js +1 -1
  31. package/dist/i18n/config.d.ts +1 -1
  32. package/dist/i18n/config.js +18 -0
  33. package/dist/i18n/resources.d.ts +15 -0
  34. package/dist/index.js +324 -322
  35. package/dist/locales/de.json +5 -0
  36. package/dist/locales/en.json +5 -0
  37. package/dist/locales/it.json +5 -0
  38. package/dist/patterns/patient-shell/index.js +1 -1
  39. package/dist/tokens.css +1 -1
  40. package/package.json +5 -1
@@ -118,7 +118,7 @@ const k = {
118
118
  size: "sm",
119
119
  withDot: !0,
120
120
  className: "ds:shrink-0",
121
- children: i(`ui.agendaCard.status.${s.status}`, s.status)
121
+ children: i(`agendaCard.status.${s.status}`, s.status)
122
122
  }
123
123
  ) : null,
124
124
  r ? /* @__PURE__ */ e(
@@ -138,4 +138,4 @@ export {
138
138
  T as A,
139
139
  w as i
140
140
  };
141
- //# sourceMappingURL=agenda-card-DU13wUTA.js.map
141
+ //# sourceMappingURL=agenda-card-CsCm7hQv.js.map
@@ -5,7 +5,7 @@ import { useTranslation as j } from "react-i18next";
5
5
  import { I as _ } from "./icon-button-C4CGcYuz.js";
6
6
  import { S as E } from "./skeleton-CZbwyJAA.js";
7
7
  import { E as P } from "./empty-state-3CLJIXSj.js";
8
- import { A as H } from "./agenda-card-DU13wUTA.js";
8
+ import { A as H } from "./agenda-card-CsCm7hQv.js";
9
9
  import { u as K } from "./registry-C9nwlNyL.js";
10
10
  import { c as L } from "./createLucideIcon-CrFbzy84.js";
11
11
  import { P as V } from "./plus-CYKNmfuA.js";
@@ -178,4 +178,4 @@ export {
178
178
  G as A,
179
179
  D as a
180
180
  };
181
- //# sourceMappingURL=agenda-tray-gQUXklO4.js.map
181
+ //# sourceMappingURL=agenda-tray-B8QZ3wEp.js.map
@@ -426,13 +426,9 @@ const ie = $e(
426
426
  at,
427
427
  {
428
428
  search: p,
429
- label: C(
430
- "inputs.combobox.create",
431
- 'Create "{{value}}"',
432
- {
433
- value: p
434
- }
435
- ),
429
+ label: C("inputs.combobox.create", 'Create "{{value}}"', {
430
+ value: p
431
+ }),
436
432
  iconClass: U,
437
433
  size: x,
438
434
  onSelect: Ie
@@ -456,4 +452,4 @@ export {
456
452
  ae as d,
457
453
  et as e
458
454
  };
459
- //# sourceMappingURL=combobox-DUpWoPPk.js.map
455
+ //# sourceMappingURL=combobox-BHhnR3qm.js.map
@@ -448,13 +448,9 @@ const ss = Ne(
448
448
  }
449
449
  return [...l, ...z];
450
450
  }), L == null || L(i, f), U(
451
- o(
452
- "inputs.fileUpload.filesSelected",
453
- "{{count}} file(s) selected",
454
- {
455
- count: i.length
456
- }
457
- )
451
+ o("inputs.fileUpload.filesSelected", "{{count}} file(s) selected", {
452
+ count: i.length
453
+ })
458
454
  );
459
455
  for (const l of z)
460
456
  Y(l);
@@ -826,4 +822,4 @@ export {
826
822
  ss as F,
827
823
  Pe as f
828
824
  };
829
- //# sourceMappingURL=file-upload-BVbfiANR.js.map
825
+ //# sourceMappingURL=file-upload-DIecAfC-.js.map
@@ -237,10 +237,7 @@ const G = M(
237
237
  icon: /* @__PURE__ */ a(H, {}),
238
238
  intent: "ghost",
239
239
  size: "sm",
240
- "aria-label": u(
241
- "notificationCard.dismiss",
242
- "Dismiss notification"
243
- ),
240
+ "aria-label": u("notificationCard.dismiss", "Dismiss notification"),
244
241
  onClick: w
245
242
  }
246
243
  ) }) : null
@@ -254,4 +251,4 @@ export {
254
251
  G as N,
255
252
  q as i
256
253
  };
257
- //# sourceMappingURL=notification-card-CRIE2Cuk.js.map
254
+ //# sourceMappingURL=notification-card-ejOw5g6g.js.map
@@ -7,7 +7,7 @@ import { I as pe } from "./icon-button-C4CGcYuz.js";
7
7
  import { B as W } from "./button-DD_0Xdmr.js";
8
8
  import { S as Y } from "./separator-CYU_bGFn.js";
9
9
  import { S as N } from "./skeleton-CZbwyJAA.js";
10
- import { N as ue } from "./notification-card-CRIE2Cuk.js";
10
+ import { N as ue } from "./notification-card-ejOw5g6g.js";
11
11
  import { u as me } from "./registry-C9nwlNyL.js";
12
12
  import { c as ge } from "./createLucideIcon-CrFbzy84.js";
13
13
  /**
@@ -299,10 +299,7 @@ const we = de(
299
299
  const h = b ?? 0, ae = h > 0 ? r("notificationTray.triggerLabel", {
300
300
  count: h,
301
301
  defaultValue: "Notifications, {{count}} unread"
302
- }) : r(
303
- "notificationTray.triggerLabelNone",
304
- "Notifications, none unread"
305
- ), ne = be(
302
+ }) : r("notificationTray.triggerLabelNone", "Notifications, none unread"), ne = be(
306
303
  h,
307
304
  r("notificationTray.badgeCountOverflow", "99+")
308
305
  ), se = xe({ size: T }), l = f(a);
@@ -445,4 +442,4 @@ export {
445
442
  we as N,
446
443
  ye as n
447
444
  };
448
- //# sourceMappingURL=notification-tray-CfXNYrxv.js.map
445
+ //# sourceMappingURL=notification-tray-C3dYdLAF.js.map
@@ -6,7 +6,7 @@ import { I } from "./icon-button-C4CGcYuz.js";
6
6
  import { D as n } from "./dropdown-menu-dyV7gHh_.js";
7
7
  import { H as L, g as A, f as H, e as x, a as C, c as M, d as B } from "./header-D0ULgQl3.js";
8
8
  import { L as N } from "./logo-_Z-jLq80.js";
9
- import { S as T, a as _, h as O, j as P, k as W, i as j } from "./sidebar-CoLHtVrP.js";
9
+ import { S as T, a as _, h as O, j as P, k as W, i as j } from "./sidebar-D8Lq065m.js";
10
10
  import { T as z } from "./theme-root-CSKD5ZRm.js";
11
11
  import { a as R } from "./tooltip-DHik5yRI.js";
12
12
  import { u as D } from "./use-theme-B1cwAXJR.js";
@@ -185,4 +185,4 @@ V.displayName = "PatientShell";
185
185
  export {
186
186
  V as P
187
187
  };
188
- //# sourceMappingURL=patient-shell-BS2V6V1b.js.map
188
+ //# sourceMappingURL=patient-shell-CL20JnVJ.js.map
@@ -0,0 +1,171 @@
1
+ import { jsxs as x, jsx as l } from "react/jsx-runtime";
2
+ import { forwardRef as v, useMemo as o } from "react";
3
+ import { c as u } from "./index-D2ZczOXr.js";
4
+ import { useTranslation as M } from "react-i18next";
5
+ import { S as b } from "./star-vav0SJ9e.js";
6
+ const R = u(
7
+ [
8
+ "ds:inline-flex ds:items-center ds:align-middle",
9
+ "ds:gap-[var(--spacing-xs)]"
10
+ ].join(" "),
11
+ {
12
+ variants: {
13
+ size: {
14
+ sm: "",
15
+ md: "",
16
+ lg: ""
17
+ }
18
+ },
19
+ defaultVariants: { size: "md" }
20
+ }
21
+ ), S = u(
22
+ [
23
+ "ds:inline-flex ds:items-center ds:leading-none",
24
+ "ds:gap-[var(--spacing-xs)]"
25
+ ].join(" ")
26
+ ), F = u(
27
+ "ds:relative ds:inline-block ds:shrink-0 ds:leading-none",
28
+ {
29
+ variants: {
30
+ size: {
31
+ sm: "ds:size-3.5",
32
+ md: "ds:size-4",
33
+ lg: "ds:size-5"
34
+ }
35
+ },
36
+ defaultVariants: { size: "md" }
37
+ }
38
+ ), $ = u(
39
+ [
40
+ "ds:pointer-events-none ds:absolute ds:start-0 ds:[inset-block:0]",
41
+ "ds:overflow-hidden ds:text-warning"
42
+ ].join(" "),
43
+ {
44
+ variants: {
45
+ fill: {
46
+ none: "ds:hidden",
47
+ half: "ds:[inline-size:50%]",
48
+ full: "ds:[inline-size:100%]"
49
+ }
50
+ },
51
+ defaultVariants: { fill: "none" }
52
+ }
53
+ ), I = u("ds:text-muted-foreground ds:leading-none", {
54
+ variants: {
55
+ size: {
56
+ sm: "type-meta",
57
+ md: "type-body-sm",
58
+ lg: "type-body"
59
+ },
60
+ underlined: {
61
+ true: "ds:underline ds:underline-offset-2",
62
+ false: ""
63
+ }
64
+ },
65
+ defaultVariants: { size: "md", underlined: !1 }
66
+ });
67
+ function T(t, s) {
68
+ const r = Math.max(0, Math.min(t, s)), n = Math.round(r * 2) / 2, e = [];
69
+ let a = n;
70
+ for (let m = 0; m < s; m += 1)
71
+ a >= 1 ? (e.push("full"), a -= 1) : a >= 0.5 ? (e.push("half"), a -= 0.5) : e.push("none");
72
+ return e;
73
+ }
74
+ const W = v(
75
+ ({
76
+ value: t,
77
+ max: s = 5,
78
+ size: r = "md",
79
+ reviews: n,
80
+ underlined: e = !1,
81
+ decorative: a = !1,
82
+ className: m,
83
+ "aria-label": c,
84
+ ...z
85
+ }, y) => {
86
+ const { t: d, i18n: f } = M(), i = o(
87
+ () => new Intl.NumberFormat(f.language, {
88
+ maximumFractionDigits: 1
89
+ }).format(t),
90
+ [t, f.language]
91
+ ), g = o(
92
+ () => new Intl.NumberFormat(f.language).format(s),
93
+ [s, f.language]
94
+ ), N = o(() => {
95
+ if (!a)
96
+ return c || (n ? d("rating.reviews", {
97
+ count: n.count,
98
+ value: i
99
+ }) : d("rating.label", {
100
+ value: i,
101
+ max: g
102
+ }));
103
+ }, [a, c, n, d, i, g]), V = o(() => T(t, s), [t, s]), p = o(() => {
104
+ if (n)
105
+ return n.label ? `${i} · ${n.count} ${n.label}` : d("rating.reviews", {
106
+ count: n.count,
107
+ value: i
108
+ });
109
+ }, [n, i, d]), j = a ? { "aria-hidden": !0 } : { role: "img", "aria-label": N };
110
+ return /* @__PURE__ */ x(
111
+ "span",
112
+ {
113
+ ref: y,
114
+ "data-component": "rating",
115
+ className: R({ size: r, className: m }),
116
+ ...j,
117
+ ...z,
118
+ children: [
119
+ /* @__PURE__ */ l(
120
+ "span",
121
+ {
122
+ "aria-hidden": "true",
123
+ className: S(),
124
+ "data-testid": "rating-stars",
125
+ children: V.map((h, k) => /* @__PURE__ */ x(
126
+ "span",
127
+ {
128
+ className: F({ size: r }),
129
+ "data-fill": h,
130
+ children: [
131
+ /* @__PURE__ */ l(
132
+ b,
133
+ {
134
+ "aria-hidden": "true",
135
+ className: "ds:size-full ds:text-muted-foreground/30",
136
+ strokeWidth: 1.5
137
+ }
138
+ ),
139
+ /* @__PURE__ */ l("span", { className: $({ fill: h }), children: /* @__PURE__ */ l(
140
+ b,
141
+ {
142
+ "aria-hidden": "true",
143
+ className: "ds:size-full ds:text-warning ds:fill-current",
144
+ strokeWidth: 1.5
145
+ }
146
+ ) })
147
+ ]
148
+ },
149
+ k
150
+ ))
151
+ }
152
+ ),
153
+ p ? /* @__PURE__ */ l(
154
+ "span",
155
+ {
156
+ "aria-hidden": "true",
157
+ className: I({ size: r, underlined: e }),
158
+ "data-testid": "rating-summary",
159
+ children: p
160
+ }
161
+ ) : null
162
+ ]
163
+ }
164
+ );
165
+ }
166
+ );
167
+ W.displayName = "Rating";
168
+ export {
169
+ W as R
170
+ };
171
+ //# sourceMappingURL=rating-BRD7O74e.js.map