@alfadocs/ui-kit-debug 1.108.0 → 1.110.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 (115) hide show
  1. package/dist/_chunks/{public-footer-3Jy1zHSs.js → public-footer-DGjLTtNK.js} +30 -30
  2. package/dist/_chunks/public-footer-DGjLTtNK.js.map +1 -0
  3. package/dist/_chunks/{reviews-panel-CtrwZOUS.js → reviews-panel-B03auSpQ.js} +210 -207
  4. package/dist/_chunks/reviews-panel-B03auSpQ.js.map +1 -0
  5. package/dist/_chunks/{signature-request-DtLph5Z4.js → signature-request-opW0fQ5P.js} +1032 -1016
  6. package/dist/_chunks/signature-request-opW0fQ5P.js.map +1 -0
  7. package/dist/_chunks/{signed-out-frame-Bs_LSPWe.js → signed-out-frame-CPow3aCZ.js} +2 -2
  8. package/dist/_chunks/{signed-out-frame-Bs_LSPWe.js.map → signed-out-frame-CPow3aCZ.js.map} +1 -1
  9. package/dist/agent-catalog.json +2 -2
  10. package/dist/agent-i18n/en.json +1 -1
  11. package/dist/components/public-footer/index.js +1 -1
  12. package/dist/components/reviews-panel/index.js +1 -1
  13. package/dist/components/reviews-panel/reviews-panel.d.ts +7 -0
  14. package/dist/components/reviews-panel/reviews-panel.d.ts.map +1 -1
  15. package/dist/i18n/locales/ar.d.ts +3 -0
  16. package/dist/i18n/locales/ar.d.ts.map +1 -1
  17. package/dist/i18n/locales/ar.js +3 -0
  18. package/dist/i18n/locales/ar.js.map +1 -1
  19. package/dist/i18n/locales/de.d.ts +3 -0
  20. package/dist/i18n/locales/de.d.ts.map +1 -1
  21. package/dist/i18n/locales/de.js +3 -0
  22. package/dist/i18n/locales/de.js.map +1 -1
  23. package/dist/i18n/locales/el.d.ts +3 -0
  24. package/dist/i18n/locales/el.d.ts.map +1 -1
  25. package/dist/i18n/locales/el.js +3 -0
  26. package/dist/i18n/locales/el.js.map +1 -1
  27. package/dist/i18n/locales/en.d.ts +3 -0
  28. package/dist/i18n/locales/en.d.ts.map +1 -1
  29. package/dist/i18n/locales/en.js +3 -0
  30. package/dist/i18n/locales/en.js.map +1 -1
  31. package/dist/i18n/locales/es.d.ts +3 -0
  32. package/dist/i18n/locales/es.d.ts.map +1 -1
  33. package/dist/i18n/locales/es.js +3 -0
  34. package/dist/i18n/locales/es.js.map +1 -1
  35. package/dist/i18n/locales/fr.d.ts +3 -0
  36. package/dist/i18n/locales/fr.d.ts.map +1 -1
  37. package/dist/i18n/locales/fr.js +3 -0
  38. package/dist/i18n/locales/fr.js.map +1 -1
  39. package/dist/i18n/locales/hi.d.ts +3 -0
  40. package/dist/i18n/locales/hi.d.ts.map +1 -1
  41. package/dist/i18n/locales/hi.js +3 -0
  42. package/dist/i18n/locales/hi.js.map +1 -1
  43. package/dist/i18n/locales/it.d.ts +3 -0
  44. package/dist/i18n/locales/it.d.ts.map +1 -1
  45. package/dist/i18n/locales/it.js +3 -0
  46. package/dist/i18n/locales/it.js.map +1 -1
  47. package/dist/i18n/locales/ja.d.ts +3 -0
  48. package/dist/i18n/locales/ja.d.ts.map +1 -1
  49. package/dist/i18n/locales/ja.js +3 -0
  50. package/dist/i18n/locales/ja.js.map +1 -1
  51. package/dist/i18n/locales/nl.d.ts +3 -0
  52. package/dist/i18n/locales/nl.d.ts.map +1 -1
  53. package/dist/i18n/locales/nl.js +3 -0
  54. package/dist/i18n/locales/nl.js.map +1 -1
  55. package/dist/i18n/locales/pl.d.ts +3 -0
  56. package/dist/i18n/locales/pl.d.ts.map +1 -1
  57. package/dist/i18n/locales/pl.js +3 -0
  58. package/dist/i18n/locales/pl.js.map +1 -1
  59. package/dist/i18n/locales/pt.d.ts +3 -0
  60. package/dist/i18n/locales/pt.d.ts.map +1 -1
  61. package/dist/i18n/locales/pt.js +3 -0
  62. package/dist/i18n/locales/pt.js.map +1 -1
  63. package/dist/i18n/locales/ro.d.ts +3 -0
  64. package/dist/i18n/locales/ro.d.ts.map +1 -1
  65. package/dist/i18n/locales/ro.js +3 -0
  66. package/dist/i18n/locales/ro.js.map +1 -1
  67. package/dist/i18n/locales/ru.d.ts +3 -0
  68. package/dist/i18n/locales/ru.d.ts.map +1 -1
  69. package/dist/i18n/locales/ru.js +3 -0
  70. package/dist/i18n/locales/ru.js.map +1 -1
  71. package/dist/i18n/locales/sq.d.ts +3 -0
  72. package/dist/i18n/locales/sq.d.ts.map +1 -1
  73. package/dist/i18n/locales/sq.js +3 -0
  74. package/dist/i18n/locales/sq.js.map +1 -1
  75. package/dist/i18n/locales/sv.d.ts +3 -0
  76. package/dist/i18n/locales/sv.d.ts.map +1 -1
  77. package/dist/i18n/locales/sv.js +3 -0
  78. package/dist/i18n/locales/sv.js.map +1 -1
  79. package/dist/i18n/locales/tr.d.ts +3 -0
  80. package/dist/i18n/locales/tr.d.ts.map +1 -1
  81. package/dist/i18n/locales/tr.js +3 -0
  82. package/dist/i18n/locales/tr.js.map +1 -1
  83. package/dist/i18n/locales/zh.d.ts +3 -0
  84. package/dist/i18n/locales/zh.d.ts.map +1 -1
  85. package/dist/i18n/locales/zh.js +3 -0
  86. package/dist/i18n/locales/zh.js.map +1 -1
  87. package/dist/index.js +4 -4
  88. package/dist/locales/ar.json +3 -0
  89. package/dist/locales/de.json +3 -0
  90. package/dist/locales/el.json +3 -0
  91. package/dist/locales/en.json +3 -0
  92. package/dist/locales/es.json +3 -0
  93. package/dist/locales/fr.json +3 -0
  94. package/dist/locales/hi.json +3 -0
  95. package/dist/locales/it.json +3 -0
  96. package/dist/locales/ja.json +3 -0
  97. package/dist/locales/nl.json +3 -0
  98. package/dist/locales/pl.json +3 -0
  99. package/dist/locales/pt.json +3 -0
  100. package/dist/locales/ro.json +3 -0
  101. package/dist/locales/ru.json +3 -0
  102. package/dist/locales/sq.json +3 -0
  103. package/dist/locales/sv.json +3 -0
  104. package/dist/locales/tr.json +3 -0
  105. package/dist/locales/zh.json +3 -0
  106. package/dist/patterns/signature-request/index.js +1 -1
  107. package/dist/patterns/signature-request/required-documents.d.ts +7 -3
  108. package/dist/patterns/signature-request/required-documents.d.ts.map +1 -1
  109. package/dist/patterns/signature-request/signature-request.d.ts +27 -21
  110. package/dist/patterns/signature-request/signature-request.d.ts.map +1 -1
  111. package/dist/patterns/signed-out-frame/index.js +1 -1
  112. package/package.json +1 -1
  113. package/dist/_chunks/public-footer-3Jy1zHSs.js.map +0 -1
  114. package/dist/_chunks/reviews-panel-CtrwZOUS.js.map +0 -1
  115. package/dist/_chunks/signature-request-DtLph5Z4.js.map +0 -1
@@ -1,19 +1,19 @@
1
- import { jsx as t, jsxs as r, Fragment as _ } from "react/jsx-runtime";
2
- import { forwardRef as Q, useState as E, useCallback as B, useMemo as C, useRef as F, useImperativeHandle as W, useId as H, useEffect as X } from "react";
3
- import { c as $ } from "./index-D2ZczOXr.js";
4
- import { useTranslation as M } from "react-i18next";
5
- import { u as Y } from "./registry-DvAUVLHh.js";
6
- import { R as P } from "./rating-CGYpg5dj.js";
7
- import { C as A } from "./card-C85_Ndhb.js";
8
- import { C as Z, b as ee, a as te } from "./collapsible-DVPM46bq.js";
1
+ import { jsx as t, jsxs as r, Fragment as $ } from "react/jsx-runtime";
2
+ import { forwardRef as W, useState as M, useCallback as H, useMemo as F, useRef as V, useImperativeHandle as X, useId as E, useEffect as Y } from "react";
3
+ import { c as U } from "./index-D2ZczOXr.js";
4
+ import { useTranslation as O } from "react-i18next";
5
+ import { u as Z } from "./registry-DvAUVLHh.js";
6
+ import { R as N } from "./rating-CGYpg5dj.js";
7
+ import { C as T } from "./card-C85_Ndhb.js";
8
+ import { C as ee, b as te, a as se } from "./collapsible-DVPM46bq.js";
9
9
  import { D as o } from "./description-list-BxzDN9o2.js";
10
- import { E as se } from "./empty-state-DwJ5YNzz.js";
11
- import { S as T } from "./skeleton-tTWJpvAq.js";
12
- import { B as ae } from "./button-DohK_Ak_.js";
13
- import { P as re } from "./panel-header-CbtlTe85.js";
14
- import { S as ne } from "./star-Bf9L2Uot.js";
15
- import { C as ie } from "./chevron-down-DWE7GSq9.js";
16
- const le = {
10
+ import { E as ae } from "./empty-state-DwJ5YNzz.js";
11
+ import { S as C } from "./skeleton-tTWJpvAq.js";
12
+ import { B as re } from "./button-DohK_Ak_.js";
13
+ import { P as ne } from "./panel-header-CbtlTe85.js";
14
+ import { S as ie } from "./star-Bf9L2Uot.js";
15
+ import { C as le } from "./chevron-down-DWE7GSq9.js";
16
+ const oe = {
17
17
  id: "reviews-panel",
18
18
  capabilities: ["filter"],
19
19
  state: {
@@ -55,8 +55,8 @@ const le = {
55
55
  { args: { filter: 5 }, note: "Show only 5-star reviews." },
56
56
  { args: { filter: "all" }, note: "Clear the star filter." }
57
57
  ],
58
- invoke: (e, l) => {
59
- e.setFilter(l.filter);
58
+ invoke: (e, i) => {
59
+ e.setFilter(i.filter);
60
60
  }
61
61
  }
62
62
  },
@@ -72,22 +72,22 @@ const le = {
72
72
  description: "Sourced from the id prop."
73
73
  }
74
74
  }
75
- }, w = ["all", 5, 4, 3, 2, 1];
76
- function U(e) {
75
+ }, y = ["all", 5, 4, 3, 2, 1];
76
+ function q(e) {
77
77
  return Math.min(5, Math.max(1, Math.floor(e)));
78
78
  }
79
- function oe(e) {
80
- const l = {
79
+ function de(e) {
80
+ const i = {
81
81
  1: 0,
82
82
  2: 0,
83
83
  3: 0,
84
84
  4: 0,
85
85
  5: 0
86
86
  };
87
- for (const p of e) l[U(p.overallScore)] += 1;
88
- return l;
87
+ for (const p of e) i[q(p.overallScore)] += 1;
88
+ return i;
89
89
  }
90
- const de = $(
90
+ const ce = U(
91
91
  [
92
92
  "ds:relative ds:inline-flex ds:items-center ds:justify-center",
93
93
  "ds:gap-[var(--spacing-xs)]",
@@ -120,63 +120,64 @@ const de = $(
120
120
  defaultVariants: { state: "idle" }
121
121
  }
122
122
  );
123
- function ce({
123
+ function ue({
124
124
  filter: e,
125
- histogram: l,
125
+ histogram: i,
126
126
  totalCount: p,
127
- onChange: s
127
+ showCounts: l,
128
+ onChange: u
128
129
  }) {
129
- const { t: f } = M("ui"), y = H(), [k, v] = E(
130
- () => Math.max(0, w.indexOf(e))
130
+ const { t: f } = O("ui"), x = E(), [P, d] = M(
131
+ () => Math.max(0, y.indexOf(e))
131
132
  );
132
- X(() => {
133
- const a = w.indexOf(e);
134
- a >= 0 && v(a);
133
+ Y(() => {
134
+ const s = y.indexOf(e);
135
+ s >= 0 && d(s);
135
136
  }, [e]);
136
- const u = F(/* @__PURE__ */ new Map()), m = B((a) => {
137
- var i;
138
- (i = u.current.get(a)) == null || i.focus();
139
- }, []), g = w.length, N = B(
140
- (a, i) => {
141
- switch (a.key) {
137
+ const v = V(/* @__PURE__ */ new Map()), g = H((s) => {
138
+ var n;
139
+ (n = v.current.get(s)) == null || n.focus();
140
+ }, []), w = y.length, k = H(
141
+ (s, n) => {
142
+ switch (s.key) {
142
143
  case "ArrowDown":
143
144
  case "ArrowRight": {
144
- a.preventDefault();
145
- const n = (i + 1) % g;
146
- v(n), m(n), s(w[n]);
145
+ s.preventDefault();
146
+ const a = (n + 1) % w;
147
+ d(a), g(a), u(y[a]);
147
148
  break;
148
149
  }
149
150
  case "ArrowUp":
150
151
  case "ArrowLeft": {
151
- a.preventDefault();
152
- const n = (i - 1 + g) % g;
153
- v(n), m(n), s(w[n]);
152
+ s.preventDefault();
153
+ const a = (n - 1 + w) % w;
154
+ d(a), g(a), u(y[a]);
154
155
  break;
155
156
  }
156
157
  case "Home": {
157
- a.preventDefault(), v(0), m(0), s(w[0]);
158
+ s.preventDefault(), d(0), g(0), u(y[0]);
158
159
  break;
159
160
  }
160
161
  case "End": {
161
- a.preventDefault();
162
- const n = g - 1;
163
- v(n), m(n), s(w[n]);
162
+ s.preventDefault();
163
+ const a = w - 1;
164
+ d(a), g(a), u(y[a]);
164
165
  break;
165
166
  }
166
167
  case "Enter":
167
168
  case " ": {
168
- a.preventDefault(), s(w[i]);
169
+ s.preventDefault(), u(y[n]);
169
170
  break;
170
171
  }
171
172
  }
172
173
  },
173
- [g, m, s]
174
+ [w, g, u]
174
175
  );
175
- return /* @__PURE__ */ r(_, { children: [
176
+ return /* @__PURE__ */ r($, { children: [
176
177
  /* @__PURE__ */ t(
177
178
  "h3",
178
179
  {
179
- id: y,
180
+ id: x,
180
181
  className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0",
181
182
  children: f("reviewsPanel.filterTitle")
182
183
  }
@@ -185,29 +186,29 @@ function ce({
185
186
  "div",
186
187
  {
187
188
  role: "radiogroup",
188
- "aria-labelledby": y,
189
+ "aria-labelledby": x,
189
190
  className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-2xs)]",
190
- children: w.map((a, i) => {
191
- const n = a === "all", d = n ? 0 : a, x = n ? p : l[d], b = a === e, V = k === i, z = n ? f("reviewsPanel.filter.allLabel", { count: x }) : f("reviewsPanel.filter.starsLabel", { stars: d, count: x });
191
+ children: y.map((s, n) => {
192
+ const a = s === "all", c = a ? 0 : s, b = a ? p : i[c], S = s === e, z = P === n, j = l ? a ? f("reviewsPanel.filter.allLabel", { count: b }) : f("reviewsPanel.filter.starsLabel", { stars: c, count: b }) : a ? f("reviewsPanel.filter.allShort") : f("rating.label", { value: c, max: 5 });
192
193
  return /* @__PURE__ */ r(
193
194
  "button",
194
195
  {
195
- ref: (c) => {
196
- c ? u.current.set(i, c) : u.current.delete(i);
196
+ ref: (m) => {
197
+ m ? v.current.set(n, m) : v.current.delete(n);
197
198
  },
198
199
  type: "button",
199
200
  role: "radio",
200
- "aria-checked": b,
201
- "aria-label": z,
202
- tabIndex: V ? 0 : -1,
201
+ "aria-checked": S,
202
+ "aria-label": j,
203
+ tabIndex: z ? 0 : -1,
203
204
  onClick: () => {
204
- v(i), s(a);
205
+ d(n), u(s);
205
206
  },
206
- onFocus: () => v(i),
207
- onKeyDown: (c) => N(c, i),
208
- "data-filter-bucket": String(a),
209
- className: de({
210
- state: b ? "selected" : "idle"
207
+ onFocus: () => d(n),
208
+ onKeyDown: (m) => k(m, n),
209
+ "data-filter-bucket": String(s),
210
+ className: ce({
211
+ state: S ? "selected" : "idle"
211
212
  }),
212
213
  children: [
213
214
  /* @__PURE__ */ t(
@@ -215,10 +216,10 @@ function ce({
215
216
  {
216
217
  "aria-hidden": "true",
217
218
  className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]",
218
- children: n ? /* @__PURE__ */ t("span", { className: "type-label", children: f("reviewsPanel.filter.allShort") }) : /* @__PURE__ */ t(P, { value: d, size: "sm", decorative: !0 })
219
+ children: a ? /* @__PURE__ */ t("span", { className: "type-label", children: f("reviewsPanel.filter.allShort") }) : /* @__PURE__ */ t(N, { value: c, size: "sm", decorative: !0 })
219
220
  }
220
221
  ),
221
- /* @__PURE__ */ t(
222
+ l ? /* @__PURE__ */ t(
222
223
  "span",
223
224
  {
224
225
  "aria-hidden": "true",
@@ -232,57 +233,57 @@ function ce({
232
233
  // text on the violet pill (~3:1, AA-fail). Match the
233
234
  // row's foreground when selected; slight opacity
234
235
  // keeps the count secondary to the label.
235
- b ? "ds:text-[color:var(--primary-foreground)]" : "ds:text-[var(--muted-foreground)]"
236
+ S ? "ds:text-[color:var(--primary-foreground)]" : "ds:text-[var(--muted-foreground)]"
236
237
  ].join(" "),
237
- children: x
238
+ children: b
238
239
  }
239
- )
240
+ ) : null
240
241
  ]
241
242
  },
242
- String(a)
243
+ String(s)
243
244
  );
244
245
  })
245
246
  }
246
247
  )
247
248
  ] });
248
249
  }
249
- function ue({ review: e, locale: l, textLang: p }) {
250
- var i, n, d, x;
251
- const { t: s } = M("ui"), f = H(), y = H(), [k, v] = E(!1), u = !!(e.breakdown && Object.values(e.breakdown).some((b) => b != null)), m = !!e.reply || u || !!e.futureVisit || !!e.recommendation, g = C(() => {
250
+ function me({ review: e, locale: i, textLang: p }) {
251
+ var s, n, a, c;
252
+ const { t: l } = O("ui"), u = E(), f = E(), [x, P] = M(!1), d = !!(e.breakdown && Object.values(e.breakdown).some((b) => b != null)), v = !!e.reply || d || !!e.futureVisit || !!e.recommendation, g = F(() => {
252
253
  if (!e.authoredAt) return "";
253
254
  try {
254
255
  const b = new Date(e.authoredAt);
255
- return Number.isNaN(b.getTime()) ? e.authoredAt : new Intl.DateTimeFormat(l, { dateStyle: "medium" }).format(
256
+ return Number.isNaN(b.getTime()) ? e.authoredAt : new Intl.DateTimeFormat(i, { dateStyle: "medium" }).format(
256
257
  b
257
258
  );
258
259
  } catch {
259
260
  return e.authoredAt;
260
261
  }
261
- }, [e.authoredAt, l]), N = e.pseudonym ?? s("reviewsPanel.anonymous"), a = /* @__PURE__ */ r(
262
- Z,
262
+ }, [e.authoredAt, i]), w = e.pseudonym ?? l("reviewsPanel.anonymous"), k = /* @__PURE__ */ r(
263
+ ee,
263
264
  {
264
- open: m ? k : !1,
265
- onOpenChange: m ? v : void 0,
265
+ open: v ? x : !1,
266
+ onOpenChange: v ? P : void 0,
266
267
  children: [
267
- /* @__PURE__ */ r(A.Footer, { children: [
268
+ /* @__PURE__ */ r(T.Footer, { children: [
268
269
  /* @__PURE__ */ t("span", { className: "type-meta ds:text-[var(--muted-foreground)]", children: g }),
269
- m ? /* @__PURE__ */ t(ee, { asChild: !0, children: /* @__PURE__ */ r(
270
+ v ? /* @__PURE__ */ t(te, { asChild: !0, children: /* @__PURE__ */ r(
270
271
  "button",
271
272
  {
272
- id: f,
273
+ id: u,
273
274
  type: "button",
274
275
  "data-review-trigger": !0,
275
- "aria-controls": y,
276
+ "aria-controls": f,
276
277
  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(--review-details-foreground)] ds:min-w-[var(--min-target-size)] ds:min-h-[var(--min-target-size)] 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]",
277
278
  children: [
278
- s(k ? "reviewsPanel.card.collapse" : "reviewsPanel.card.expand"),
279
+ l(x ? "reviewsPanel.card.collapse" : "reviewsPanel.card.expand"),
279
280
  /* @__PURE__ */ t(
280
- ie,
281
+ le,
281
282
  {
282
283
  "aria-hidden": "true",
283
284
  className: [
284
285
  "ds:size-4 ds:transition-transform ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none",
285
- k ? "ds:rotate-180" : ""
286
+ x ? "ds:rotate-180" : ""
286
287
  ].filter(Boolean).join(" ")
287
288
  }
288
289
  )
@@ -290,12 +291,12 @@ function ue({ review: e, locale: l, textLang: p }) {
290
291
  }
291
292
  ) }) : null
292
293
  ] }),
293
- m ? /* @__PURE__ */ t(te, { id: y, "aria-labelledby": f, children: /* @__PURE__ */ r("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: [
294
- u || e.futureVisit || e.recommendation ? /* @__PURE__ */ r(o, { layout: "inline", density: "compact", children: [
295
- ((i = e.breakdown) == null ? void 0 : i.appointmentScore) != null ? /* @__PURE__ */ r(o.Row, { children: [
296
- /* @__PURE__ */ t(o.Term, { children: s("reviewsPanel.breakdown.appointment") }),
294
+ v ? /* @__PURE__ */ t(se, { id: f, "aria-labelledby": u, children: /* @__PURE__ */ r("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: [
295
+ d || e.futureVisit || e.recommendation ? /* @__PURE__ */ r(o, { layout: "inline", density: "compact", children: [
296
+ ((s = e.breakdown) == null ? void 0 : s.appointmentScore) != null ? /* @__PURE__ */ r(o.Row, { children: [
297
+ /* @__PURE__ */ t(o.Term, { children: l("reviewsPanel.breakdown.appointment") }),
297
298
  /* @__PURE__ */ t(o.Detail, { children: /* @__PURE__ */ t(
298
- P,
299
+ N,
299
300
  {
300
301
  value: e.breakdown.appointmentScore,
301
302
  size: "sm"
@@ -303,34 +304,34 @@ function ue({ review: e, locale: l, textLang: p }) {
303
304
  ) })
304
305
  ] }) : null,
305
306
  ((n = e.breakdown) == null ? void 0 : n.communicationScore) != null ? /* @__PURE__ */ r(o.Row, { children: [
306
- /* @__PURE__ */ t(o.Term, { children: s("reviewsPanel.breakdown.communication") }),
307
+ /* @__PURE__ */ t(o.Term, { children: l("reviewsPanel.breakdown.communication") }),
307
308
  /* @__PURE__ */ t(o.Detail, { children: /* @__PURE__ */ t(
308
- P,
309
+ N,
309
310
  {
310
311
  value: e.breakdown.communicationScore,
311
312
  size: "sm"
312
313
  }
313
314
  ) })
314
315
  ] }) : null,
315
- ((d = e.breakdown) == null ? void 0 : d.staffScore) != null ? /* @__PURE__ */ r(o.Row, { children: [
316
- /* @__PURE__ */ t(o.Term, { children: s("reviewsPanel.breakdown.staff") }),
317
- /* @__PURE__ */ t(o.Detail, { children: /* @__PURE__ */ t(P, { value: e.breakdown.staffScore, size: "sm" }) })
316
+ ((a = e.breakdown) == null ? void 0 : a.staffScore) != null ? /* @__PURE__ */ r(o.Row, { children: [
317
+ /* @__PURE__ */ t(o.Term, { children: l("reviewsPanel.breakdown.staff") }),
318
+ /* @__PURE__ */ t(o.Detail, { children: /* @__PURE__ */ t(N, { value: e.breakdown.staffScore, size: "sm" }) })
318
319
  ] }) : null,
319
- ((x = e.breakdown) == null ? void 0 : x.overallScore) != null ? /* @__PURE__ */ r(o.Row, { children: [
320
- /* @__PURE__ */ t(o.Term, { children: s("reviewsPanel.breakdown.overall") }),
321
- /* @__PURE__ */ t(o.Detail, { children: /* @__PURE__ */ t(P, { value: e.breakdown.overallScore, size: "sm" }) })
320
+ ((c = e.breakdown) == null ? void 0 : c.overallScore) != null ? /* @__PURE__ */ r(o.Row, { children: [
321
+ /* @__PURE__ */ t(o.Term, { children: l("reviewsPanel.breakdown.overall") }),
322
+ /* @__PURE__ */ t(o.Detail, { children: /* @__PURE__ */ t(N, { value: e.breakdown.overallScore, size: "sm" }) })
322
323
  ] }) : null,
323
324
  e.futureVisit ? /* @__PURE__ */ r(o.Row, { children: [
324
- /* @__PURE__ */ t(o.Term, { children: s("reviewsPanel.breakdown.futureVisit") }),
325
- /* @__PURE__ */ t(o.Detail, { children: s(`reviewsPanel.answer.${e.futureVisit}`) })
325
+ /* @__PURE__ */ t(o.Term, { children: l("reviewsPanel.breakdown.futureVisit") }),
326
+ /* @__PURE__ */ t(o.Detail, { children: l(`reviewsPanel.answer.${e.futureVisit}`) })
326
327
  ] }) : null,
327
328
  e.recommendation ? /* @__PURE__ */ r(o.Row, { children: [
328
- /* @__PURE__ */ t(o.Term, { children: s("reviewsPanel.breakdown.recommendation") }),
329
- /* @__PURE__ */ t(o.Detail, { children: s(`reviewsPanel.answer.${e.recommendation}`) })
329
+ /* @__PURE__ */ t(o.Term, { children: l("reviewsPanel.breakdown.recommendation") }),
330
+ /* @__PURE__ */ t(o.Detail, { children: l(`reviewsPanel.answer.${e.recommendation}`) })
330
331
  ] }) : null
331
332
  ] }) : null,
332
333
  e.reply ? /* @__PURE__ */ r("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: [
333
- /* @__PURE__ */ t("p", { className: "type-label ds:m-0 ds:mb-[var(--spacing-2xs)] ds:text-[var(--muted-foreground)] ds:font-[var(--font-weight-semibold)]", children: s("reviewsPanel.replyTitle") }),
334
+ /* @__PURE__ */ t("p", { className: "type-label ds:m-0 ds:mb-[var(--spacing-2xs)] ds:text-[var(--muted-foreground)] ds:font-[var(--font-weight-semibold)]", children: l("reviewsPanel.replyTitle") }),
334
335
  /* @__PURE__ */ t(
335
336
  "p",
336
337
  {
@@ -345,19 +346,19 @@ function ue({ review: e, locale: l, textLang: p }) {
345
346
  ]
346
347
  }
347
348
  );
348
- return /* @__PURE__ */ r(A, { variant: "default", className: "ds:shadow-[var(--shadow-sm)]", children: [
349
- /* @__PURE__ */ t(A.Header, { children: /* @__PURE__ */ r("div", { className: "ds:flex ds:items-start ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
349
+ return /* @__PURE__ */ r(T, { variant: "default", className: "ds:shadow-[var(--shadow-sm)]", children: [
350
+ /* @__PURE__ */ t(T.Header, { children: /* @__PURE__ */ r("div", { className: "ds:flex ds:items-start ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
350
351
  /* @__PURE__ */ t(
351
352
  "h4",
352
353
  {
353
354
  dir: e.pseudonym ? "auto" : void 0,
354
355
  className: "type-title-item ds:m-0 ds:text-[var(--foreground)]",
355
- children: N
356
+ children: w
356
357
  }
357
358
  ),
358
- /* @__PURE__ */ t(P, { value: e.overallScore, size: "sm" })
359
+ /* @__PURE__ */ t(N, { value: e.overallScore, size: "sm" })
359
360
  ] }) }),
360
- e.comment ? /* @__PURE__ */ t(A.Body, { children: /* @__PURE__ */ t(
361
+ e.comment ? /* @__PURE__ */ t(T.Body, { children: /* @__PURE__ */ t(
361
362
  "p",
362
363
  {
363
364
  lang: p,
@@ -366,17 +367,17 @@ function ue({ review: e, locale: l, textLang: p }) {
366
367
  children: e.comment
367
368
  }
368
369
  ) }) : null,
369
- a
370
+ k
370
371
  ] });
371
372
  }
372
- function me({ hideFilter: e }) {
373
+ function pe({ hideFilter: e }) {
373
374
  return /* @__PURE__ */ r("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
374
375
  /* @__PURE__ */ r("div", { className: "ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
375
- /* @__PURE__ */ t(T, { variant: "text", width: "40%" }),
376
- /* @__PURE__ */ t(T, { variant: "text", width: "20%" })
376
+ /* @__PURE__ */ t(C, { variant: "text", width: "40%" }),
377
+ /* @__PURE__ */ t(C, { variant: "text", width: "20%" })
377
378
  ] }),
378
- e ? null : /* @__PURE__ */ t("div", { className: "ds:flex ds:flex-wrap ds:gap-[var(--spacing-xs)]", children: Array.from({ length: 6 }, (l, p) => /* @__PURE__ */ t(
379
- T,
379
+ e ? null : /* @__PURE__ */ t("div", { className: "ds:flex ds:flex-wrap ds:gap-[var(--spacing-xs)]", children: Array.from({ length: 6 }, (i, p) => /* @__PURE__ */ t(
380
+ C,
380
381
  {
381
382
  variant: "rounded",
382
383
  width: "4rem",
@@ -384,10 +385,10 @@ function me({ hideFilter: e }) {
384
385
  },
385
386
  `rp-fs-${p}`
386
387
  )) }),
387
- /* @__PURE__ */ t("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: Array.from({ length: 3 }, (l, p) => /* @__PURE__ */ t(T, { variant: "rounded", height: "6rem" }, `rp-rs-${p}`)) })
388
+ /* @__PURE__ */ t("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: Array.from({ length: 3 }, (i, p) => /* @__PURE__ */ t(C, { variant: "rounded", height: "6rem" }, `rp-rs-${p}`)) })
388
389
  ] });
389
390
  }
390
- const L = $(
391
+ const B = U(
391
392
  // No root padding: the shared `PanelHeader` owns the header's edge
392
393
  // padding (px/pt/pb) and the body wrapper below owns the content
393
394
  // padding, so the header divider can span flush to the panel edge.
@@ -412,131 +413,133 @@ const L = $(
412
413
  },
413
414
  defaultVariants: { surface: "flat" }
414
415
  }
415
- ), pe = Q(
416
+ ), fe = W(
416
417
  ({
417
418
  reviews: e,
418
- aggregate: l,
419
+ aggregate: i,
419
420
  contentLang: p,
420
- filter: s,
421
- onFilterChange: f,
422
- introSlot: y,
423
- headerActionSlot: k,
424
- "aria-label": v,
425
- id: u,
426
- className: m,
421
+ filter: l,
422
+ onFilterChange: u,
423
+ introSlot: f,
424
+ headerActionSlot: x,
425
+ "aria-label": P,
426
+ id: d,
427
+ className: v,
427
428
  hideFilter: g = !1,
428
- surface: N = "flat",
429
- loading: a = !1,
430
- ...i
431
- }, n) => {
432
- const { t: d, i18n: x } = M("ui"), b = x.language ?? "en", [V, z] = E("all"), c = s ?? V, S = B(
429
+ showStarCounts: w = !0,
430
+ surface: k = "flat",
431
+ loading: s = !1,
432
+ ...n
433
+ }, a) => {
434
+ const { t: c, i18n: b } = O("ui"), S = b.language ?? "en", [z, j] = M("all"), m = l ?? z, R = H(
433
435
  (h) => {
434
- s === void 0 && z(h), f == null || f(h);
436
+ l === void 0 && j(h), u == null || u(h);
435
437
  },
436
- [s, f]
437
- ), q = C(
438
- () => l.histogram ?? oe(e),
439
- [l.histogram, e]
440
- ), R = C(() => c === "all" ? e : e.filter((h) => U(h.overallScore) === c), [e, c]), O = F(c);
441
- O.current = c;
442
- const K = F(R.length);
443
- K.current = R.length;
444
- const G = C(
438
+ [l, u]
439
+ ), G = F(
440
+ () => i.histogram ?? de(e),
441
+ [i.histogram, e]
442
+ ), D = F(() => m === "all" ? e : e.filter((h) => q(h.overallScore) === m), [e, m]), K = V(m);
443
+ K.current = m;
444
+ const _ = V(D.length);
445
+ _.current = D.length;
446
+ const J = F(
445
447
  () => ({
446
- getFilter: () => O.current,
447
- setFilter: (h) => S(h),
448
- getVisibleCount: () => K.current
448
+ getFilter: () => K.current,
449
+ setFilter: (h) => R(h),
450
+ getVisibleCount: () => _.current
449
451
  }),
450
- [S]
451
- ), D = F(null);
452
- W(n, () => D.current, []), Y(le, G, u);
453
- const j = v ?? d("reviewsPanel.regionLabel"), I = String(c);
454
- if (a)
452
+ [R]
453
+ ), A = V(null);
454
+ X(a, () => A.current, []), Z(oe, J, d);
455
+ const I = P ?? c("reviewsPanel.regionLabel"), L = String(m);
456
+ if (s)
455
457
  return /* @__PURE__ */ t(
456
458
  "section",
457
459
  {
458
- ref: D,
459
- "aria-label": j,
460
+ ref: A,
461
+ "aria-label": I,
460
462
  "aria-busy": "true",
461
- id: u,
463
+ id: d,
462
464
  "data-component": "reviews-panel",
463
- "data-component-id": u,
464
- "data-filter": I,
465
+ "data-component-id": d,
466
+ "data-filter": L,
465
467
  "data-state": "loading",
466
- className: L({ surface: N, className: m }),
467
- ...i,
468
- children: /* @__PURE__ */ t("div", { className: "ds:p-[var(--spacing-md)]", children: /* @__PURE__ */ t(me, { hideFilter: g }) })
468
+ className: B({ surface: k, className: v }),
469
+ ...n,
470
+ children: /* @__PURE__ */ t("div", { className: "ds:p-[var(--spacing-md)]", children: /* @__PURE__ */ t(pe, { hideFilter: g }) })
469
471
  }
470
472
  );
471
- if (l.count === 0 && e.length === 0)
473
+ if (i.count === 0 && e.length === 0)
472
474
  return /* @__PURE__ */ t(
473
475
  "section",
474
476
  {
475
- ref: D,
476
- "aria-label": j,
477
- id: u,
477
+ ref: A,
478
+ "aria-label": I,
479
+ id: d,
478
480
  "data-component": "reviews-panel",
479
- "data-component-id": u,
480
- "data-filter": I,
481
+ "data-component-id": d,
482
+ "data-filter": L,
481
483
  "data-state": "empty",
482
- className: L({ surface: N, className: m }),
483
- ...i,
484
+ className: B({ surface: k, className: v }),
485
+ ...n,
484
486
  children: /* @__PURE__ */ t("div", { className: "ds:p-[var(--spacing-md)]", children: /* @__PURE__ */ t(
485
- se,
487
+ ae,
486
488
  {
487
489
  variant: "no-results",
488
- title: d("reviewsPanel.empty.title"),
489
- description: d("reviewsPanel.empty.description")
490
+ title: c("reviewsPanel.empty.title"),
491
+ description: c("reviewsPanel.empty.description")
490
492
  }
491
493
  ) })
492
494
  }
493
495
  );
494
- const J = !g;
496
+ const Q = !g;
495
497
  return /* @__PURE__ */ r(
496
498
  "section",
497
499
  {
498
- ref: D,
499
- "aria-label": j,
500
- id: u,
500
+ ref: A,
501
+ "aria-label": I,
502
+ id: d,
501
503
  "data-component": "reviews-panel",
502
- "data-component-id": u,
503
- "data-filter": I,
504
- className: L({ surface: N, className: m }),
505
- ...i,
504
+ "data-component-id": d,
505
+ "data-filter": L,
506
+ className: B({ surface: k, className: v }),
507
+ ...n,
506
508
  children: [
507
509
  /* @__PURE__ */ t(
508
- re,
510
+ ne,
509
511
  {
510
- title: d("reviewsPanel.title"),
511
- icon: /* @__PURE__ */ t(ne, { "aria-hidden": "true" }),
512
+ title: c("reviewsPanel.title"),
513
+ icon: /* @__PURE__ */ t(ie, { "aria-hidden": "true" }),
512
514
  titleScale: "section",
513
515
  sticky: !0,
514
516
  wrapActions: !0,
515
- actions: /* @__PURE__ */ r(_, { children: [
516
- k,
517
+ actions: /* @__PURE__ */ r($, { children: [
518
+ x,
517
519
  /* @__PURE__ */ t(
518
- P,
520
+ N,
519
521
  {
520
- value: l.averageScore,
521
- reviews: { count: l.count },
522
+ value: i.averageScore,
523
+ reviews: { count: i.count },
522
524
  size: "md"
523
525
  }
524
526
  )
525
527
  ] }),
526
- filters: J ? /* @__PURE__ */ t(
527
- ce,
528
+ filters: Q ? /* @__PURE__ */ t(
529
+ ue,
528
530
  {
529
- filter: c,
530
- histogram: q,
531
- totalCount: l.count,
532
- onChange: S
531
+ filter: m,
532
+ histogram: G,
533
+ totalCount: i.count,
534
+ showCounts: w,
535
+ onChange: R
533
536
  }
534
537
  ) : void 0
535
538
  }
536
539
  ),
537
540
  /* @__PURE__ */ r("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)] ds:min-w-0 ds:p-[var(--spacing-md)]", children: [
538
- y || null,
539
- R.length === 0 ? (
541
+ f || null,
542
+ D.length === 0 ? (
540
543
  // `role="status"` already implies `aria-live="polite"` —
541
544
  // declaring both would queue two announcements when the
542
545
  // filter changes (the radio's aria-checked flip + this
@@ -548,16 +551,16 @@ const L = $(
548
551
  "data-state": "no-match",
549
552
  className: "ds:flex ds:flex-col ds:items-center ds:gap-[var(--spacing-sm)] ds:rounded-[var(--radius-md)] ds:border ds:border-dashed ds:border-[var(--border)] ds:p-[var(--spacing-lg)] ds:text-center",
550
553
  children: [
551
- /* @__PURE__ */ t("p", { className: "type-body ds:m-0 ds:text-[var(--muted-foreground)]", children: c === "all" ? d("reviewsPanel.empty.title") : d("reviewsPanel.empty.filterDescription", {
552
- stars: c
554
+ /* @__PURE__ */ t("p", { className: "type-body ds:m-0 ds:text-[var(--muted-foreground)]", children: m === "all" ? c("reviewsPanel.empty.title") : c("reviewsPanel.empty.filterDescription", {
555
+ stars: m
553
556
  }) }),
554
- c !== "all" ? /* @__PURE__ */ t(
555
- ae,
557
+ m !== "all" ? /* @__PURE__ */ t(
558
+ re,
556
559
  {
557
560
  intent: "secondary",
558
561
  size: "sm",
559
- onClick: () => S("all"),
560
- children: d("reviewsPanel.empty.resetFilter")
562
+ onClick: () => R("all"),
563
+ children: c("reviewsPanel.empty.resetFilter")
561
564
  }
562
565
  ) : null
563
566
  ]
@@ -566,13 +569,13 @@ const L = $(
566
569
  ) : /* @__PURE__ */ t(
567
570
  "ol",
568
571
  {
569
- "aria-label": d("reviewsPanel.listLabel"),
572
+ "aria-label": c("reviewsPanel.listLabel"),
570
573
  className: "ds:list-none ds:m-0 ds:p-0 ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
571
- children: R.map((h) => /* @__PURE__ */ t("li", { "data-review-id": h.id, children: /* @__PURE__ */ t(
572
- ue,
574
+ children: D.map((h) => /* @__PURE__ */ t("li", { "data-review-id": h.id, children: /* @__PURE__ */ t(
575
+ me,
573
576
  {
574
577
  review: h,
575
- locale: b,
578
+ locale: S,
576
579
  textLang: h.contentLang ?? p
577
580
  }
578
581
  ) }, h.id))
@@ -584,9 +587,9 @@ const L = $(
584
587
  );
585
588
  }
586
589
  );
587
- pe.displayName = "ReviewsPanel";
590
+ fe.displayName = "ReviewsPanel";
588
591
  export {
589
- pe as R,
590
- le as r
592
+ fe as R,
593
+ oe as r
591
594
  };
592
- //# sourceMappingURL=reviews-panel-CtrwZOUS.js.map
595
+ //# sourceMappingURL=reviews-panel-B03auSpQ.js.map