@alfadocs/ui-kit 0.30.0 → 0.30.2

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 (52) hide show
  1. package/dist/_chunks/{booking-BYuc_8HV.js → booking-CBaSujVP.js} +803 -729
  2. package/dist/_chunks/{patient-search-BhlxYAI3.js → patient-search-ZpHN-pgJ.js} +566 -510
  3. package/dist/_chunks/{public-footer.agent-CA29gxHJ.js → public-footer.agent-DivkKdG4.js} +188 -167
  4. package/dist/_chunks/{reviews-panel-CFttsfuC.js → reviews-panel-D-zjPKFL.js} +198 -178
  5. package/dist/agent-catalog.json +1 -1
  6. package/dist/components/booking/booking-types.d.ts +38 -0
  7. package/dist/components/booking/details-form.d.ts +7 -0
  8. package/dist/components/booking/index.js +1 -1
  9. package/dist/components/patient-search/index.js +1 -1
  10. package/dist/components/patient-search/patient-search.d.ts +9 -0
  11. package/dist/components/public-footer/index.js +1 -1
  12. package/dist/components/public-footer/public-footer.d.ts +7 -0
  13. package/dist/components/reviews-panel/index.js +1 -1
  14. package/dist/components/reviews-panel/reviews-panel.d.ts +8 -0
  15. package/dist/i18n/config.js +146 -20
  16. package/dist/i18n/locales/ar.d.ts +7 -0
  17. package/dist/i18n/locales/de.d.ts +7 -0
  18. package/dist/i18n/locales/el.d.ts +7 -0
  19. package/dist/i18n/locales/es.d.ts +7 -0
  20. package/dist/i18n/locales/fr.d.ts +7 -0
  21. package/dist/i18n/locales/hi.d.ts +7 -0
  22. package/dist/i18n/locales/ja.d.ts +7 -0
  23. package/dist/i18n/locales/nl.d.ts +7 -0
  24. package/dist/i18n/locales/pl.d.ts +7 -0
  25. package/dist/i18n/locales/pt.d.ts +7 -0
  26. package/dist/i18n/locales/ro.d.ts +7 -0
  27. package/dist/i18n/locales/ru.d.ts +7 -0
  28. package/dist/i18n/locales/sq.d.ts +7 -0
  29. package/dist/i18n/locales/sv.d.ts +7 -0
  30. package/dist/i18n/locales/tr.d.ts +7 -0
  31. package/dist/i18n/locales/zh.d.ts +7 -0
  32. package/dist/i18n/resources.d.ts +14 -0
  33. package/dist/index.js +4 -4
  34. package/dist/locales/ar.json +8 -1
  35. package/dist/locales/de.json +8 -1
  36. package/dist/locales/el.json +8 -1
  37. package/dist/locales/en.json +8 -1
  38. package/dist/locales/es.json +8 -1
  39. package/dist/locales/fr.json +8 -1
  40. package/dist/locales/hi.json +8 -1
  41. package/dist/locales/it.json +8 -1
  42. package/dist/locales/ja.json +8 -1
  43. package/dist/locales/nl.json +8 -1
  44. package/dist/locales/pl.json +8 -1
  45. package/dist/locales/pt.json +8 -1
  46. package/dist/locales/ro.json +8 -1
  47. package/dist/locales/ru.json +8 -1
  48. package/dist/locales/sq.json +8 -1
  49. package/dist/locales/sv.json +8 -1
  50. package/dist/locales/tr.json +8 -1
  51. package/dist/locales/zh.json +8 -1
  52. package/package.json +5 -1
@@ -1,17 +1,17 @@
1
1
  import { jsx as s, jsxs as t } from "react/jsx-runtime";
2
- import { forwardRef as q, useState as _, useCallback as L, useMemo as V, useRef as F, useImperativeHandle as G, useId as B, useEffect as J } from "react";
2
+ import { forwardRef as G, useState as _, useCallback as L, useMemo as C, useRef as V, useImperativeHandle as J, useId as B, useEffect as Q } from "react";
3
3
  import { c as K } from "./index-D2ZczOXr.js";
4
4
  import { useTranslation as E } from "react-i18next";
5
- import { u as Q } from "./registry-C9nwlNyL.js";
5
+ import { u as W } from "./registry-C9nwlNyL.js";
6
6
  import { R as N } from "./rating-BRD7O74e.js";
7
- import { C as T } from "./card-DKTMLVrw.js";
8
- import { C as W, b as X, a as Y } from "./collapsible-hHiyZp0b.js";
9
- import { D as d } from "./description-list-yl3y3QKg.js";
10
- import { E as Z } from "./empty-state-BLy7tigq.js";
11
- import { S as C } from "./skeleton-CZbwyJAA.js";
12
- import { B as ee } from "./button-DD_0Xdmr.js";
13
- import { C as se } from "./chevron-down-BX_NP2Yh.js";
14
- const ae = {
7
+ import { C as A } from "./card-DKTMLVrw.js";
8
+ import { C as X, b as Y, a as Z } from "./collapsible-hHiyZp0b.js";
9
+ import { D as l } from "./description-list-yl3y3QKg.js";
10
+ import { E as ee } from "./empty-state-BLy7tigq.js";
11
+ import { S as T } from "./skeleton-CZbwyJAA.js";
12
+ import { B as se } from "./button-DD_0Xdmr.js";
13
+ import { C as ae } from "./chevron-down-BX_NP2Yh.js";
14
+ const re = {
15
15
  id: "reviews-panel",
16
16
  capabilities: ["filter"],
17
17
  state: {
@@ -34,8 +34,8 @@ const ae = {
34
34
  argsType: '{ filter: "all" | 1 | 2 | 3 | 4 | 5 }',
35
35
  descriptionKey: "ui.agent.reviewsPanel.actions.setFilter",
36
36
  description: 'Narrow the visible review list to a star bucket, or `"all"` to clear the filter.',
37
- invoke: (e, l) => {
38
- e.setFilter(l.filter);
37
+ invoke: (e, i) => {
38
+ e.setFilter(i.filter);
39
39
  }
40
40
  }
41
41
  },
@@ -51,22 +51,22 @@ const ae = {
51
51
  description: "Sourced from the id prop."
52
52
  }
53
53
  }
54
- }, b = ["all", 5, 4, 3, 2, 1];
54
+ }, x = ["all", 5, 4, 3, 2, 1];
55
55
  function $(e) {
56
56
  return Math.min(5, Math.max(1, Math.floor(e)));
57
57
  }
58
58
  function te(e) {
59
- const l = {
59
+ const i = {
60
60
  1: 0,
61
61
  2: 0,
62
62
  3: 0,
63
63
  4: 0,
64
64
  5: 0
65
65
  };
66
- for (const r of e) l[$(r.overallScore)] += 1;
67
- return l;
66
+ for (const n of e) i[$(n.overallScore)] += 1;
67
+ return i;
68
68
  }
69
- const re = K(
69
+ const ne = K(
70
70
  [
71
71
  "ds:relative ds:flex ds:w-full ds:items-center ds:justify-between",
72
72
  "ds:gap-[var(--spacing-sm)]",
@@ -99,94 +99,94 @@ const re = K(
99
99
  defaultVariants: { state: "idle" }
100
100
  }
101
101
  );
102
- function ne({
102
+ function ie({
103
103
  filter: e,
104
- histogram: l,
105
- totalCount: r,
104
+ histogram: i,
105
+ totalCount: n,
106
106
  onChange: c
107
107
  }) {
108
- const { t: g } = E(), x = B(), [S, o] = _(
109
- () => Math.max(0, b.indexOf(e))
108
+ const { t: h } = E(), w = B(), [k, d] = _(
109
+ () => Math.max(0, x.indexOf(e))
110
110
  );
111
- J(() => {
112
- const n = b.indexOf(e);
113
- n >= 0 && o(n);
111
+ Q(() => {
112
+ const r = x.indexOf(e);
113
+ r >= 0 && d(r);
114
114
  }, [e]);
115
- const m = F(/* @__PURE__ */ new Map()), p = L((n) => {
116
- var a;
117
- (a = m.current.get(n)) == null || a.focus();
118
- }, []), h = b.length, y = L(
119
- (n, a) => {
120
- switch (n.key) {
115
+ const m = V(/* @__PURE__ */ new Map()), f = L((r) => {
116
+ var o;
117
+ (o = m.current.get(r)) == null || o.focus();
118
+ }, []), p = x.length, P = L(
119
+ (r, o) => {
120
+ switch (r.key) {
121
121
  case "ArrowDown":
122
122
  case "ArrowRight": {
123
- n.preventDefault();
124
- const i = (a + 1) % h;
125
- o(i), p(i), c(b[i]);
123
+ r.preventDefault();
124
+ const a = (o + 1) % p;
125
+ d(a), f(a), c(x[a]);
126
126
  break;
127
127
  }
128
128
  case "ArrowUp":
129
129
  case "ArrowLeft": {
130
- n.preventDefault();
131
- const i = (a - 1 + h) % h;
132
- o(i), p(i), c(b[i]);
130
+ r.preventDefault();
131
+ const a = (o - 1 + p) % p;
132
+ d(a), f(a), c(x[a]);
133
133
  break;
134
134
  }
135
135
  case "Home": {
136
- n.preventDefault(), o(0), p(0), c(b[0]);
136
+ r.preventDefault(), d(0), f(0), c(x[0]);
137
137
  break;
138
138
  }
139
139
  case "End": {
140
- n.preventDefault();
141
- const i = h - 1;
142
- o(i), p(i), c(b[i]);
140
+ r.preventDefault();
141
+ const a = p - 1;
142
+ d(a), f(a), c(x[a]);
143
143
  break;
144
144
  }
145
145
  case "Enter":
146
146
  case " ": {
147
- n.preventDefault(), c(b[a]);
147
+ r.preventDefault(), c(x[o]);
148
148
  break;
149
149
  }
150
150
  }
151
151
  },
152
- [h, p, c]
152
+ [p, f, c]
153
153
  );
154
154
  return /* @__PURE__ */ t("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
155
155
  /* @__PURE__ */ s(
156
156
  "h3",
157
157
  {
158
- id: x,
158
+ id: w,
159
159
  className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0",
160
- children: g("reviewsPanel.filterTitle")
160
+ children: h("reviewsPanel.filterTitle")
161
161
  }
162
162
  ),
163
163
  /* @__PURE__ */ s(
164
164
  "div",
165
165
  {
166
166
  role: "radiogroup",
167
- "aria-labelledby": x,
167
+ "aria-labelledby": w,
168
168
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]",
169
- children: b.map((n, a) => {
170
- const i = n === "all", w = i ? 0 : n, f = i ? r : l[w], R = n === e, u = S === a, k = i ? g("reviewsPanel.filter.allLabel", { count: f }) : g("reviewsPanel.filter.starsLabel", { stars: w, count: f });
169
+ children: x.map((r, o) => {
170
+ const a = r === "all", y = a ? 0 : r, v = a ? n : i[y], S = r === e, F = k === o, u = a ? h("reviewsPanel.filter.allLabel", { count: v }) : h("reviewsPanel.filter.starsLabel", { stars: y, count: v });
171
171
  return /* @__PURE__ */ t(
172
172
  "button",
173
173
  {
174
- ref: (P) => {
175
- P ? m.current.set(a, P) : m.current.delete(a);
174
+ ref: (b) => {
175
+ b ? m.current.set(o, b) : m.current.delete(o);
176
176
  },
177
177
  type: "button",
178
178
  role: "radio",
179
- "aria-checked": R,
180
- "aria-label": k,
181
- tabIndex: u ? 0 : -1,
179
+ "aria-checked": S,
180
+ "aria-label": u,
181
+ tabIndex: F ? 0 : -1,
182
182
  onClick: () => {
183
- o(a), c(n);
183
+ d(o), c(r);
184
184
  },
185
- onFocus: () => o(a),
186
- onKeyDown: (P) => y(P, a),
187
- "data-filter-bucket": String(n),
188
- className: re({
189
- state: R ? "selected" : "idle"
185
+ onFocus: () => d(o),
186
+ onKeyDown: (b) => P(b, o),
187
+ "data-filter-bucket": String(r),
188
+ className: ne({
189
+ state: S ? "selected" : "idle"
190
190
  }),
191
191
  children: [
192
192
  /* @__PURE__ */ s(
@@ -194,7 +194,7 @@ function ne({
194
194
  {
195
195
  "aria-hidden": "true",
196
196
  className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]",
197
- children: i ? /* @__PURE__ */ s("span", { className: "type-label", children: g("reviewsPanel.filter.allShort") }) : /* @__PURE__ */ s(N, { value: w, size: "sm", decorative: !0 })
197
+ children: a ? /* @__PURE__ */ s("span", { className: "type-label", children: h("reviewsPanel.filter.allShort") }) : /* @__PURE__ */ s(N, { value: y, size: "sm", decorative: !0 })
198
198
  }
199
199
  ),
200
200
  /* @__PURE__ */ s(
@@ -202,39 +202,39 @@ function ne({
202
202
  {
203
203
  "aria-hidden": "true",
204
204
  className: "type-meta ds:text-[var(--muted-foreground)]",
205
- children: f
205
+ children: v
206
206
  }
207
207
  )
208
208
  ]
209
209
  },
210
- String(n)
210
+ String(r)
211
211
  );
212
212
  })
213
213
  }
214
214
  )
215
215
  ] });
216
216
  }
217
- function ie({ review: e, locale: l }) {
218
- var n, a, i, w;
219
- const { t: r } = E(), c = B(), g = B(), [x, S] = _(!1), o = !!(e.breakdown && Object.values(e.breakdown).some((f) => f != null)), m = !!e.reply || o || !!e.futureVisit || !!e.recommendation, p = V(() => {
217
+ function le({ review: e, locale: i }) {
218
+ var r, o, a, y;
219
+ const { t: n } = E(), c = B(), h = B(), [w, k] = _(!1), d = !!(e.breakdown && Object.values(e.breakdown).some((v) => v != null)), m = !!e.reply || d || !!e.futureVisit || !!e.recommendation, f = C(() => {
220
220
  if (!e.authoredAt) return "";
221
221
  try {
222
- const f = new Date(e.authoredAt);
223
- return Number.isNaN(f.getTime()) ? e.authoredAt : new Intl.DateTimeFormat(l, { dateStyle: "medium" }).format(
224
- f
222
+ const v = new Date(e.authoredAt);
223
+ return Number.isNaN(v.getTime()) ? e.authoredAt : new Intl.DateTimeFormat(i, { dateStyle: "medium" }).format(
224
+ v
225
225
  );
226
226
  } catch {
227
227
  return e.authoredAt;
228
228
  }
229
- }, [e.authoredAt, l]), h = e.pseudonym ?? r("reviewsPanel.anonymous"), y = /* @__PURE__ */ t(
230
- W,
229
+ }, [e.authoredAt, i]), p = e.pseudonym ?? n("reviewsPanel.anonymous"), P = /* @__PURE__ */ t(
230
+ X,
231
231
  {
232
- open: m ? x : !1,
233
- onOpenChange: m ? S : void 0,
232
+ open: m ? w : !1,
233
+ onOpenChange: m ? k : void 0,
234
234
  children: [
235
- /* @__PURE__ */ t(T.Footer, { children: [
236
- /* @__PURE__ */ s("span", { className: "type-meta ds:text-[var(--muted-foreground)]", children: p }),
237
- m ? /* @__PURE__ */ s(X, { asChild: !0, children: /* @__PURE__ */ t(
235
+ /* @__PURE__ */ t(A.Footer, { children: [
236
+ /* @__PURE__ */ s("span", { className: "type-meta ds:text-[var(--muted-foreground)]", children: f }),
237
+ m ? /* @__PURE__ */ s(Y, { asChild: !0, children: /* @__PURE__ */ t(
238
238
  "button",
239
239
  {
240
240
  id: c,
@@ -242,14 +242,14 @@ function ie({ review: e, locale: l }) {
242
242
  "data-review-trigger": !0,
243
243
  className: "ds:ms-auto ds:inline-flex ds:items-center ds:gap-[var(--spacing-2xs)] ds:rounded-[var(--radius-sm)] ds:ps-[var(--spacing-2xs)] ds:pe-[var(--spacing-2xs)] ds:pt-[var(--spacing-2xs)] ds:pb-[var(--spacing-2xs)] ds:bg-transparent ds:border-0 ds:text-[length:var(--font-size-sm)] ds:text-[var(--primary)] ds:hover:underline ds:cursor-pointer ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)] ds:forced-colors:focus-visible:outline-[CanvasText]",
244
244
  children: [
245
- r(x ? "reviewsPanel.card.collapse" : "reviewsPanel.card.expand"),
245
+ n(w ? "reviewsPanel.card.collapse" : "reviewsPanel.card.expand"),
246
246
  /* @__PURE__ */ s(
247
- se,
247
+ ae,
248
248
  {
249
249
  "aria-hidden": "true",
250
250
  className: [
251
251
  "ds:size-4 ds:transition-transform ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none",
252
- x ? "ds:rotate-180" : ""
252
+ w ? "ds:rotate-180" : ""
253
253
  ].filter(Boolean).join(" ")
254
254
  }
255
255
  )
@@ -257,11 +257,11 @@ function ie({ review: e, locale: l }) {
257
257
  }
258
258
  ) }) : null
259
259
  ] }),
260
- m ? /* @__PURE__ */ s(Y, { id: g, "aria-labelledby": c, children: /* @__PURE__ */ t("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)] ds:pb-[var(--spacing-md)]", children: [
261
- o || e.futureVisit || e.recommendation ? /* @__PURE__ */ t(d, { layout: "inline", density: "compact", children: [
262
- ((n = e.breakdown) == null ? void 0 : n.appointmentScore) != null ? /* @__PURE__ */ t(d.Row, { children: [
263
- /* @__PURE__ */ s(d.Term, { children: r("reviewsPanel.breakdown.appointment") }),
264
- /* @__PURE__ */ s(d.Detail, { children: /* @__PURE__ */ s(
260
+ m ? /* @__PURE__ */ s(Z, { id: h, "aria-labelledby": c, children: /* @__PURE__ */ t("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)] ds:pb-[var(--spacing-md)]", children: [
261
+ d || e.futureVisit || e.recommendation ? /* @__PURE__ */ t(l, { layout: "inline", density: "compact", children: [
262
+ ((r = e.breakdown) == null ? void 0 : r.appointmentScore) != null ? /* @__PURE__ */ t(l.Row, { children: [
263
+ /* @__PURE__ */ s(l.Term, { children: n("reviewsPanel.breakdown.appointment") }),
264
+ /* @__PURE__ */ s(l.Detail, { children: /* @__PURE__ */ s(
265
265
  N,
266
266
  {
267
267
  value: e.breakdown.appointmentScore,
@@ -269,9 +269,9 @@ function ie({ review: e, locale: l }) {
269
269
  }
270
270
  ) })
271
271
  ] }) : null,
272
- ((a = e.breakdown) == null ? void 0 : a.communicationScore) != null ? /* @__PURE__ */ t(d.Row, { children: [
273
- /* @__PURE__ */ s(d.Term, { children: r("reviewsPanel.breakdown.communication") }),
274
- /* @__PURE__ */ s(d.Detail, { children: /* @__PURE__ */ s(
272
+ ((o = e.breakdown) == null ? void 0 : o.communicationScore) != null ? /* @__PURE__ */ t(l.Row, { children: [
273
+ /* @__PURE__ */ s(l.Term, { children: n("reviewsPanel.breakdown.communication") }),
274
+ /* @__PURE__ */ s(l.Detail, { children: /* @__PURE__ */ s(
275
275
  N,
276
276
  {
277
277
  value: e.breakdown.communicationScore,
@@ -279,129 +279,149 @@ function ie({ review: e, locale: l }) {
279
279
  }
280
280
  ) })
281
281
  ] }) : null,
282
- ((i = e.breakdown) == null ? void 0 : i.staffScore) != null ? /* @__PURE__ */ t(d.Row, { children: [
283
- /* @__PURE__ */ s(d.Term, { children: r("reviewsPanel.breakdown.staff") }),
284
- /* @__PURE__ */ s(d.Detail, { children: /* @__PURE__ */ s(N, { value: e.breakdown.staffScore, size: "sm" }) })
282
+ ((a = e.breakdown) == null ? void 0 : a.staffScore) != null ? /* @__PURE__ */ t(l.Row, { children: [
283
+ /* @__PURE__ */ s(l.Term, { children: n("reviewsPanel.breakdown.staff") }),
284
+ /* @__PURE__ */ s(l.Detail, { children: /* @__PURE__ */ s(N, { value: e.breakdown.staffScore, size: "sm" }) })
285
285
  ] }) : null,
286
- ((w = e.breakdown) == null ? void 0 : w.overallScore) != null ? /* @__PURE__ */ t(d.Row, { children: [
287
- /* @__PURE__ */ s(d.Term, { children: r("reviewsPanel.breakdown.overall") }),
288
- /* @__PURE__ */ s(d.Detail, { children: /* @__PURE__ */ s(N, { value: e.breakdown.overallScore, size: "sm" }) })
286
+ ((y = e.breakdown) == null ? void 0 : y.overallScore) != null ? /* @__PURE__ */ t(l.Row, { children: [
287
+ /* @__PURE__ */ s(l.Term, { children: n("reviewsPanel.breakdown.overall") }),
288
+ /* @__PURE__ */ s(l.Detail, { children: /* @__PURE__ */ s(N, { value: e.breakdown.overallScore, size: "sm" }) })
289
289
  ] }) : null,
290
- e.futureVisit ? /* @__PURE__ */ t(d.Row, { children: [
291
- /* @__PURE__ */ s(d.Term, { children: r("reviewsPanel.breakdown.futureVisit") }),
292
- /* @__PURE__ */ s(d.Detail, { children: r(`reviewsPanel.answer.${e.futureVisit}`) })
290
+ e.futureVisit ? /* @__PURE__ */ t(l.Row, { children: [
291
+ /* @__PURE__ */ s(l.Term, { children: n("reviewsPanel.breakdown.futureVisit") }),
292
+ /* @__PURE__ */ s(l.Detail, { children: n(`reviewsPanel.answer.${e.futureVisit}`) })
293
293
  ] }) : null,
294
- e.recommendation ? /* @__PURE__ */ t(d.Row, { children: [
295
- /* @__PURE__ */ s(d.Term, { children: r("reviewsPanel.breakdown.recommendation") }),
296
- /* @__PURE__ */ s(d.Detail, { children: r(`reviewsPanel.answer.${e.recommendation}`) })
294
+ e.recommendation ? /* @__PURE__ */ t(l.Row, { children: [
295
+ /* @__PURE__ */ s(l.Term, { children: n("reviewsPanel.breakdown.recommendation") }),
296
+ /* @__PURE__ */ s(l.Detail, { children: n(`reviewsPanel.answer.${e.recommendation}`) })
297
297
  ] }) : null
298
298
  ] }) : null,
299
299
  e.reply ? /* @__PURE__ */ t("div", { className: "ds:rounded-[var(--radius-sm)] ds:bg-[var(--muted)]/40 ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)] ds:pt-[var(--spacing-sm)] ds:pb-[var(--spacing-sm)]", children: [
300
- /* @__PURE__ */ s("p", { className: "type-label ds:m-0 ds:mb-[var(--spacing-2xs)] ds:text-[var(--muted-foreground)] ds:font-[var(--font-weight-semibold)]", children: r("reviewsPanel.replyTitle") }),
300
+ /* @__PURE__ */ s("p", { className: "type-label ds:m-0 ds:mb-[var(--spacing-2xs)] ds:text-[var(--muted-foreground)] ds:font-[var(--font-weight-semibold)]", children: n("reviewsPanel.replyTitle") }),
301
301
  /* @__PURE__ */ s("p", { className: "type-body-sm ds:m-0 ds:text-[var(--foreground)] ds:[white-space:pre-line]", children: e.reply })
302
302
  ] }) : null
303
303
  ] }) }) : null
304
304
  ]
305
305
  }
306
306
  );
307
- return /* @__PURE__ */ t(T, { variant: "default", className: "ds:shadow-[var(--shadow-sm)]", children: [
308
- /* @__PURE__ */ s(T.Header, { children: /* @__PURE__ */ t("div", { className: "ds:flex ds:items-start ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
309
- /* @__PURE__ */ s("h4", { className: "type-title-item ds:m-0 ds:text-[var(--foreground)]", children: h }),
307
+ return /* @__PURE__ */ t(A, { variant: "default", className: "ds:shadow-[var(--shadow-sm)]", children: [
308
+ /* @__PURE__ */ s(A.Header, { children: /* @__PURE__ */ t("div", { className: "ds:flex ds:items-start ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
309
+ /* @__PURE__ */ s("h4", { className: "type-title-item ds:m-0 ds:text-[var(--foreground)]", children: p }),
310
310
  /* @__PURE__ */ s(N, { value: e.overallScore, size: "sm" })
311
311
  ] }) }),
312
- e.comment ? /* @__PURE__ */ s(T.Body, { children: /* @__PURE__ */ s("p", { className: "type-body ds:m-0 ds:text-[var(--foreground)] ds:line-clamp-2", children: e.comment }) }) : null,
313
- y
312
+ e.comment ? /* @__PURE__ */ s(A.Body, { children: /* @__PURE__ */ s("p", { className: "type-body ds:m-0 ds:text-[var(--foreground)] ds:line-clamp-2", children: e.comment }) }) : null,
313
+ P
314
314
  ] });
315
315
  }
316
- function le({ hideFilter: e }) {
316
+ function de({ hideFilter: e }) {
317
317
  return /* @__PURE__ */ t("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
318
318
  /* @__PURE__ */ t("div", { className: "ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
319
- /* @__PURE__ */ s(C, { variant: "text", width: "40%" }),
320
- /* @__PURE__ */ s(C, { variant: "text", width: "20%" })
319
+ /* @__PURE__ */ s(T, { variant: "text", width: "40%" }),
320
+ /* @__PURE__ */ s(T, { variant: "text", width: "20%" })
321
321
  ] }),
322
322
  /* @__PURE__ */ t(
323
323
  "div",
324
324
  {
325
325
  className: e ? "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]" : "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:md:grid-cols-[minmax(0,30%)_minmax(0,1fr)]",
326
326
  children: [
327
- e ? null : /* @__PURE__ */ s("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: Array.from({ length: 6 }, (l, r) => /* @__PURE__ */ s(C, { variant: "rounded", height: "2.5rem" }, `rp-fs-${r}`)) }),
328
- /* @__PURE__ */ s("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: Array.from({ length: 3 }, (l, r) => /* @__PURE__ */ s(C, { variant: "rounded", height: "6rem" }, `rp-rs-${r}`)) })
327
+ e ? null : /* @__PURE__ */ s("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: Array.from({ length: 6 }, (i, n) => /* @__PURE__ */ s(T, { variant: "rounded", height: "2.5rem" }, `rp-fs-${n}`)) }),
328
+ /* @__PURE__ */ s("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: Array.from({ length: 3 }, (i, n) => /* @__PURE__ */ s(T, { variant: "rounded", height: "6rem" }, `rp-rs-${n}`)) })
329
329
  ]
330
330
  }
331
331
  )
332
332
  ] });
333
333
  }
334
- const j = K(
335
- "ds:flex ds:w-full ds:flex-col ds:gap-[var(--spacing-md)] ds:text-[var(--foreground)]"
336
- ), de = q(
334
+ const z = K(
335
+ "ds:flex ds:w-full ds:flex-col ds:gap-[var(--spacing-md)] ds:text-[var(--foreground)]",
336
+ {
337
+ variants: {
338
+ // `surface="elevated"` matches `Card variant="elevated"` — same
339
+ // tokens, same padding, same boundary behaviour — so consumers can
340
+ // drop their own Card wraps without producing a double-card look.
341
+ // Default `'flat'` preserves 0.30.x rendering (no wrapping).
342
+ surface: {
343
+ flat: "",
344
+ elevated: [
345
+ "ds:rounded-[var(--radius-lg)]",
346
+ "ds:bg-[var(--card)] ds:text-[var(--card-foreground)]",
347
+ "ds:border ds:border-[color:var(--card-border)]",
348
+ "ds:shadow-[var(--shadow-card)]",
349
+ "ds:p-[var(--spacing-md)]"
350
+ ].join(" ")
351
+ }
352
+ },
353
+ defaultVariants: { surface: "flat" }
354
+ }
355
+ ), oe = G(
337
356
  ({
338
357
  reviews: e,
339
- aggregate: l,
340
- filter: r,
358
+ aggregate: i,
359
+ filter: n,
341
360
  onFilterChange: c,
342
- introSlot: g,
343
- headerActionSlot: x,
344
- "aria-label": S,
345
- id: o,
361
+ introSlot: h,
362
+ headerActionSlot: w,
363
+ "aria-label": k,
364
+ id: d,
346
365
  className: m,
347
- hideFilter: p = !1,
348
- loading: h = !1,
349
- ...y
350
- }, n) => {
351
- const { t: a, i18n: i } = E(), w = i.language ?? "en", [f, R] = _("all"), u = r ?? f, k = L(
352
- (v) => {
353
- r === void 0 && R(v), c == null || c(v);
366
+ hideFilter: f = !1,
367
+ surface: p = "flat",
368
+ loading: P = !1,
369
+ ...r
370
+ }, o) => {
371
+ const { t: a, i18n: y } = E(), v = y.language ?? "en", [S, F] = _("all"), u = n ?? S, b = L(
372
+ (g) => {
373
+ n === void 0 && F(g), c == null || c(g);
354
374
  },
355
- [r, c]
356
- ), P = V(
357
- () => l.histogram ?? te(e),
358
- [l.histogram, e]
359
- ), D = V(() => u === "all" ? e : e.filter((v) => $(v.overallScore) === u), [e, u]), H = F(u);
375
+ [n, c]
376
+ ), U = C(
377
+ () => i.histogram ?? te(e),
378
+ [i.histogram, e]
379
+ ), R = C(() => u === "all" ? e : e.filter((g) => $(g.overallScore) === u), [e, u]), H = V(u);
360
380
  H.current = u;
361
- const M = F(D.length);
362
- M.current = D.length;
363
- const U = V(
381
+ const M = V(R.length);
382
+ M.current = R.length;
383
+ const q = C(
364
384
  () => ({
365
385
  getFilter: () => H.current,
366
- setFilter: (v) => k(v),
386
+ setFilter: (g) => b(g),
367
387
  getVisibleCount: () => M.current
368
388
  }),
369
- [k]
370
- ), A = F(null);
371
- G(n, () => A.current, []), Q(ae, U, o);
372
- const I = S ?? a("reviewsPanel.regionLabel"), z = String(u);
373
- if (h)
389
+ [b]
390
+ ), D = V(null);
391
+ J(o, () => D.current, []), W(re, q, d);
392
+ const I = k ?? a("reviewsPanel.regionLabel"), j = String(u);
393
+ if (P)
374
394
  return /* @__PURE__ */ s(
375
395
  "section",
376
396
  {
377
- ref: A,
397
+ ref: D,
378
398
  "aria-label": I,
379
399
  "aria-busy": "true",
380
- id: o,
400
+ id: d,
381
401
  "data-component": "reviews-panel",
382
- "data-component-id": o,
383
- "data-filter": z,
402
+ "data-component-id": d,
403
+ "data-filter": j,
384
404
  "data-state": "loading",
385
- className: j({ className: m }),
386
- ...y,
387
- children: /* @__PURE__ */ s(le, { hideFilter: p })
405
+ className: z({ surface: p, className: m }),
406
+ ...r,
407
+ children: /* @__PURE__ */ s(de, { hideFilter: f })
388
408
  }
389
409
  );
390
- if (l.count === 0 && e.length === 0)
410
+ if (i.count === 0 && e.length === 0)
391
411
  return /* @__PURE__ */ s(
392
412
  "section",
393
413
  {
394
- ref: A,
414
+ ref: D,
395
415
  "aria-label": I,
396
- id: o,
416
+ id: d,
397
417
  "data-component": "reviews-panel",
398
- "data-component-id": o,
399
- "data-filter": z,
418
+ "data-component-id": d,
419
+ "data-filter": j,
400
420
  "data-state": "empty",
401
- className: j({ className: m }),
402
- ...y,
421
+ className: z({ surface: p, className: m }),
422
+ ...r,
403
423
  children: /* @__PURE__ */ s(
404
- Z,
424
+ ee,
405
425
  {
406
426
  variant: "no-results",
407
427
  title: a("reviewsPanel.empty.title"),
@@ -410,28 +430,28 @@ const j = K(
410
430
  )
411
431
  }
412
432
  );
413
- const O = !p;
433
+ const O = !f;
414
434
  return /* @__PURE__ */ t(
415
435
  "section",
416
436
  {
417
- ref: A,
437
+ ref: D,
418
438
  "aria-label": I,
419
- id: o,
439
+ id: d,
420
440
  "data-component": "reviews-panel",
421
- "data-component-id": o,
422
- "data-filter": z,
423
- className: j({ className: m }),
424
- ...y,
441
+ "data-component-id": d,
442
+ "data-filter": j,
443
+ className: z({ surface: p, className: m }),
444
+ ...r,
425
445
  children: [
426
446
  /* @__PURE__ */ t("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
427
447
  /* @__PURE__ */ s("h2", { className: "type-title-section ds:m-0 ds:text-[var(--foreground)]", children: a("reviewsPanel.title") }),
428
448
  /* @__PURE__ */ t("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-md)]", children: [
429
- x,
449
+ w,
430
450
  /* @__PURE__ */ s(
431
451
  N,
432
452
  {
433
- value: l.averageScore,
434
- reviews: { count: l.count },
453
+ value: i.averageScore,
454
+ reviews: { count: i.count },
435
455
  size: "md"
436
456
  }
437
457
  )
@@ -443,25 +463,25 @@ const j = K(
443
463
  className: O ? "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:md:grid-cols-[minmax(0,30%)_minmax(0,1fr)]" : "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]",
444
464
  children: [
445
465
  O ? /* @__PURE__ */ s(
446
- ne,
466
+ ie,
447
467
  {
448
468
  filter: u,
449
- histogram: P,
450
- totalCount: l.count,
451
- onChange: k
469
+ histogram: U,
470
+ totalCount: i.count,
471
+ onChange: b
452
472
  }
453
473
  ) : null,
454
474
  /* @__PURE__ */ t("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)] ds:min-w-0", children: [
455
- g ? (
475
+ h ? (
456
476
  // Plain div, not <aside>: axe's
457
477
  // `landmark-complementary-is-top-level` rule fires when an
458
478
  // `<aside>` lands inside another landmark (this panel's
459
479
  // <section role="region">), and the consumer's introSlot
460
480
  // already supplies its own semantics (e.g. an Alert with
461
481
  // role="status").
462
- /* @__PURE__ */ s("div", { className: "ds:rounded-[var(--radius-md)] ds:bg-[color-mix(in_srgb,var(--info)_8%,transparent)] ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)] ds:pt-[var(--spacing-md)] ds:pb-[var(--spacing-md)]", children: g })
482
+ /* @__PURE__ */ s("div", { className: "ds:rounded-[var(--radius-md)] ds:bg-[color-mix(in_srgb,var(--info)_8%,transparent)] ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)] ds:pt-[var(--spacing-md)] ds:pb-[var(--spacing-md)]", children: h })
463
483
  ) : null,
464
- D.length === 0 ? (
484
+ R.length === 0 ? (
465
485
  // `role="status"` already implies `aria-live="polite"` —
466
486
  // declaring both would queue two announcements when the
467
487
  // filter changes (the radio's aria-checked flip + this
@@ -477,11 +497,11 @@ const j = K(
477
497
  stars: u
478
498
  }) }),
479
499
  u !== "all" ? /* @__PURE__ */ s(
480
- ee,
500
+ se,
481
501
  {
482
502
  intent: "secondary",
483
503
  size: "sm",
484
- onClick: () => k("all"),
504
+ onClick: () => b("all"),
485
505
  children: a("reviewsPanel.empty.resetFilter")
486
506
  }
487
507
  ) : null
@@ -493,7 +513,7 @@ const j = K(
493
513
  {
494
514
  "aria-label": a("reviewsPanel.listLabel"),
495
515
  className: "ds:list-none ds:m-0 ds:p-0 ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
496
- children: D.map((v) => /* @__PURE__ */ s("li", { "data-review-id": v.id, children: /* @__PURE__ */ s(ie, { review: v, locale: w }) }, v.id))
516
+ children: R.map((g) => /* @__PURE__ */ s("li", { "data-review-id": g.id, children: /* @__PURE__ */ s(le, { review: g, locale: v }) }, g.id))
497
517
  }
498
518
  )
499
519
  ] })
@@ -505,9 +525,9 @@ const j = K(
505
525
  );
506
526
  }
507
527
  );
508
- de.displayName = "ReviewsPanel";
528
+ oe.displayName = "ReviewsPanel";
509
529
  export {
510
- de as R,
511
- ae as r
530
+ oe as R,
531
+ re as r
512
532
  };
513
- //# sourceMappingURL=reviews-panel-CFttsfuC.js.map
533
+ //# sourceMappingURL=reviews-panel-D-zjPKFL.js.map