@alfadocs/ui-kit 1.30.0 → 1.31.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 (121) hide show
  1. package/dist/_chunks/{address-fields-CZ0pEdEI.js → address-fields-jFfjxOQR.js} +3 -3
  2. package/dist/_chunks/{appointment-card-Dzr3GeVz.js → appointment-card-CvUFFEdS.js} +8 -6
  3. package/dist/_chunks/{appointment-timeline-DhHwmHo1.js → appointment-timeline-DsMZY7U9.js} +2 -2
  4. package/dist/_chunks/{appointment-tray-4FUu_5NX.js → appointment-tray-Z2GaOIYQ.js} +2 -2
  5. package/dist/_chunks/{booking-AabCk7CI.js → booking-jGzRUETo.js} +2 -2
  6. package/dist/_chunks/{calendar-CI9MINcR.js → calendar-BNQKpxhE.js} +494 -438
  7. package/dist/_chunks/{calendar-event-card-66CEEWU6.js → calendar-event-card-DSh-69HT.js} +130 -122
  8. package/dist/_chunks/calendar-workspace-Dy1jHBvG.js +9392 -0
  9. package/dist/_chunks/{clinical-note-card-BBgFd2nB.js → clinical-note-card-yCTR9DB6.js} +185 -188
  10. package/dist/_chunks/{color-picker-CU303VjY.js → color-picker-Bl5f0iK1.js} +28 -25
  11. package/dist/_chunks/{combobox-D7_NLE2Z.js → combobox-DnSdYssy.js} +216 -215
  12. package/dist/_chunks/{country-select-DzbPFktV.js → country-select-CfDNFG5c.js} +2 -2
  13. package/dist/_chunks/{face-scheme-DA2vjqaM.js → face-scheme-l-CQyLs-.js} +2 -2
  14. package/dist/_chunks/notes-panel-am6e-Lwh.js +380 -0
  15. package/dist/_chunks/{patient-details-DYAmq76G.js → patient-details-CdfursHt.js} +3 -3
  16. package/dist/_chunks/{province-select-BBc7s7vR.js → province-select-BaUnkg4S.js} +2 -2
  17. package/dist/_chunks/{rich-text-editor-lSCiE0Zz.js → rich-text-editor-VJATL1Tk.js} +2 -2
  18. package/dist/_chunks/{timeline-r-8IUoBS.js → timeline-u-2t9t_M.js} +37 -35
  19. package/dist/agent-catalog.json +51 -10
  20. package/dist/agent-i18n/en.json +9 -7
  21. package/dist/components/_shared/get-error-message.d.ts +3 -0
  22. package/dist/components/address-fields/index.js +1 -1
  23. package/dist/components/appointment-card/index.js +2 -2
  24. package/dist/components/appointment-timeline/index.js +1 -1
  25. package/dist/components/booking/index.js +1 -1
  26. package/dist/components/calendar/calendar.d.ts +26 -2
  27. package/dist/components/calendar/index.js +1 -1
  28. package/dist/components/calendar-event-card/calendar-event-card.d.ts +9 -0
  29. package/dist/components/calendar-event-card/index.js +1 -1
  30. package/dist/components/clinical-note-card/clinical-note-card.d.ts +16 -1
  31. package/dist/components/clinical-note-card/index.js +1 -1
  32. package/dist/components/color-picker/index.js +1 -1
  33. package/dist/components/combobox/combobox.d.ts +5 -0
  34. package/dist/components/combobox/index.js +1 -1
  35. package/dist/components/country-select/index.js +1 -1
  36. package/dist/components/face-scheme/index.js +1 -1
  37. package/dist/components/notes-panel/index.d.ts +1 -1
  38. package/dist/components/notes-panel/index.js +1 -1
  39. package/dist/components/notes-panel/notes-panel.d.ts +24 -5
  40. package/dist/components/patient-details/index.js +1 -1
  41. package/dist/components/province-select/index.js +1 -1
  42. package/dist/components/rich-text-editor/index.js +1 -1
  43. package/dist/components/timeline/index.js +1 -1
  44. package/dist/components/timeline/timeline.d.ts +2 -0
  45. package/dist/host-compat.css +7 -1
  46. package/dist/i18n/locales/ar.d.ts +50 -0
  47. package/dist/i18n/locales/ar.js +54 -4
  48. package/dist/i18n/locales/de.d.ts +60 -10
  49. package/dist/i18n/locales/de.js +64 -14
  50. package/dist/i18n/locales/el.d.ts +50 -0
  51. package/dist/i18n/locales/el.js +54 -4
  52. package/dist/i18n/locales/en.d.ts +50 -0
  53. package/dist/i18n/locales/en.js +54 -4
  54. package/dist/i18n/locales/es.d.ts +50 -0
  55. package/dist/i18n/locales/es.js +54 -4
  56. package/dist/i18n/locales/fr.d.ts +50 -0
  57. package/dist/i18n/locales/fr.js +53 -3
  58. package/dist/i18n/locales/hi.d.ts +50 -0
  59. package/dist/i18n/locales/hi.js +54 -4
  60. package/dist/i18n/locales/it.d.ts +60 -10
  61. package/dist/i18n/locales/it.js +64 -14
  62. package/dist/i18n/locales/ja.d.ts +50 -0
  63. package/dist/i18n/locales/ja.js +54 -4
  64. package/dist/i18n/locales/nl.d.ts +50 -0
  65. package/dist/i18n/locales/nl.js +54 -4
  66. package/dist/i18n/locales/pl.d.ts +50 -0
  67. package/dist/i18n/locales/pl.js +54 -4
  68. package/dist/i18n/locales/pt.d.ts +50 -0
  69. package/dist/i18n/locales/pt.js +54 -4
  70. package/dist/i18n/locales/ro.d.ts +50 -0
  71. package/dist/i18n/locales/ro.js +53 -3
  72. package/dist/i18n/locales/ru.d.ts +50 -0
  73. package/dist/i18n/locales/ru.js +54 -4
  74. package/dist/i18n/locales/sq.d.ts +50 -0
  75. package/dist/i18n/locales/sq.js +54 -4
  76. package/dist/i18n/locales/sv.d.ts +50 -0
  77. package/dist/i18n/locales/sv.js +54 -4
  78. package/dist/i18n/locales/tr.d.ts +50 -0
  79. package/dist/i18n/locales/tr.js +54 -4
  80. package/dist/i18n/locales/zh.d.ts +50 -0
  81. package/dist/i18n/locales/zh.js +54 -4
  82. package/dist/index.js +91 -90
  83. package/dist/locales/ar.json +54 -4
  84. package/dist/locales/de.json +64 -14
  85. package/dist/locales/el.json +54 -4
  86. package/dist/locales/en.json +54 -4
  87. package/dist/locales/es.json +54 -4
  88. package/dist/locales/fr.json +53 -3
  89. package/dist/locales/hi.json +54 -4
  90. package/dist/locales/it.json +64 -14
  91. package/dist/locales/ja.json +54 -4
  92. package/dist/locales/nl.json +54 -4
  93. package/dist/locales/pl.json +54 -4
  94. package/dist/locales/pt.json +54 -4
  95. package/dist/locales/ro.json +53 -3
  96. package/dist/locales/ru.json +54 -4
  97. package/dist/locales/sq.json +54 -4
  98. package/dist/locales/sv.json +54 -4
  99. package/dist/locales/tr.json +54 -4
  100. package/dist/locales/zh.json +54 -4
  101. package/dist/patterns/calendar/calendar-appointment-details.d.ts +145 -0
  102. package/dist/patterns/calendar/calendar-appointment-details.sections.d.ts +32 -0
  103. package/dist/patterns/calendar/calendar-editor-hydration.d.ts +59 -0
  104. package/dist/patterns/calendar/calendar-notes-tool.d.ts +14 -0
  105. package/dist/patterns/calendar/calendar-patient-picker.d.ts +11 -0
  106. package/dist/patterns/calendar/calendar-series-scope-chooser.d.ts +18 -0
  107. package/dist/patterns/calendar/calendar-workspace.d.ts +26 -1
  108. package/dist/patterns/calendar/calendar-workspace.model.d.ts +8 -5
  109. package/dist/patterns/calendar/calendar.data.d.ts +66 -1
  110. package/dist/patterns/calendar/calendar.host.d.ts +2 -0
  111. package/dist/patterns/calendar/calendar.journey.d.ts +42 -7
  112. package/dist/patterns/calendar/calendar.model.d.ts +54 -5
  113. package/dist/patterns/calendar/calendar.sheets.d.ts +68 -15
  114. package/dist/patterns/calendar/calendar.surface.d.ts +12 -2
  115. package/dist/patterns/calendar/calendar.types.d.ts +29 -1
  116. package/dist/patterns/calendar/index.d.ts +9 -6
  117. package/dist/patterns/calendar/index.js +15 -14
  118. package/dist/tokens.css +10 -2
  119. package/package.json +1 -1
  120. package/dist/_chunks/calendar-workspace-a84AHQwj.js +0 -7506
  121. package/dist/_chunks/notes-panel-CTNpsByN.js +0 -353
@@ -5,9 +5,9 @@ import { c as te } from "./index-D2ZczOXr.js";
5
5
  import { useTranslation as Ne } from "react-i18next";
6
6
  import { u as Ae } from "./form-field-context-B3APVHKx.js";
7
7
  import { S as se } from "./slider-DN1CWkKB.js";
8
- import { u as Se } from "./registry-DvAUVLHh.js";
8
+ import { u as Me } from "./registry-DvAUVLHh.js";
9
9
  import { C as re } from "./check-DrFSN__t.js";
10
- import { X as Me } from "./x-B5YnXwCz.js";
10
+ import { X as Se } from "./x-B5YnXwCz.js";
11
11
  const Te = {
12
12
  id: "color-picker",
13
13
  capabilities: ["set_value"],
@@ -69,10 +69,13 @@ function ne(e, t, r, s) {
69
69
  w = c > 0.5 ? x / (2 - n - d) : x / (n + d), n === e ? m = ((t - r) / x + (t < r ? 6 : 0)) / 6 : n === t ? m = ((r - e) / x + 2) / 6 : m = ((e - t) / x + 4) / 6;
70
70
  }
71
71
  return {
72
- h: Math.round(m * 360),
73
- s: Math.round(w * 100),
74
- l: Math.round(c * 100),
75
- a: Math.round(s * 100) / 100
72
+ // Preserve byte identity through RGB -> HSL -> RGB. Palette colours
73
+ // can be server identifiers, so even one changed channel is a different
74
+ // selection. Round human-facing labels only, never this stored value.
75
+ h: m * 360,
76
+ s: w * 100,
77
+ l: c * 100,
78
+ a: s
76
79
  };
77
80
  }
78
81
  function C(e) {
@@ -103,7 +106,7 @@ function D(e, t) {
103
106
  case "hex":
104
107
  return C(e);
105
108
  case "hsl":
106
- return e.a < 1 ? `hsla(${e.h}, ${e.s}%, ${e.l}%, ${e.a})` : `hsl(${e.h}, ${e.s}%, ${e.l}%)`;
109
+ return e.a < 1 ? `hsla(${Math.round(e.h)}, ${Math.round(e.s)}%, ${Math.round(e.l)}%, ${e.a})` : `hsl(${Math.round(e.h)}, ${Math.round(e.s)}%, ${Math.round(e.l)}%)`;
107
110
  case "rgba":
108
111
  return Le(e);
109
112
  }
@@ -305,7 +308,7 @@ const He = [
305
308
  size: x = "md",
306
309
  disabled: ie = !1,
307
310
  variant: de = "inline",
308
- compact: M = !0,
311
+ compact: S = !0,
309
312
  className: U
310
313
  } = e, { t: g } = Ne(), N = Ae(), le = Pe(), P = N.id || le, v = N.disabled || ie, L = r !== void 0, [X, ce] = T(() => {
311
314
  const a = r ?? s;
@@ -384,15 +387,15 @@ const He = [
384
387
  f = p % u;
385
388
  break;
386
389
  case "PageDown": {
387
- const S = Math.floor((i - 1) / u) * u;
388
- f = Math.min(S + p % u, i - 1);
390
+ const M = Math.floor((i - 1) / u) * u;
391
+ f = Math.min(M + p % u, i - 1);
389
392
  break;
390
393
  }
391
394
  case "Enter":
392
395
  case " ": {
393
396
  a.preventDefault();
394
- const S = y(A[p].hex);
395
- S && b(S);
397
+ const M = y(A[p].hex);
398
+ M && b(M);
396
399
  return;
397
400
  }
398
401
  default:
@@ -409,7 +412,7 @@ const He = [
409
412
  }),
410
413
  [b]
411
414
  );
412
- Se(Te, ve, P);
415
+ Me(Te, ve, P);
413
416
  const I = E(() => {
414
417
  if (!w) return null;
415
418
  const a = y(w);
@@ -428,8 +431,8 @@ const He = [
428
431
  className: "ds:grid ds:grid-cols-6 ds:gap-[var(--spacing-xs)]",
429
432
  children: A.map((a, i) => {
430
433
  const f = Math.floor(i / u) * u;
431
- return i === f ? /* @__PURE__ */ l("div", { role: "row", className: "ds:contents", children: A.slice(f, f + u).map((k, S) => {
432
- const O = f + S, V = O === B;
434
+ return i === f ? /* @__PURE__ */ l("div", { role: "row", className: "ds:contents", children: A.slice(f, f + u).map((k, M) => {
435
+ const O = f + M, V = O === B;
433
436
  return (
434
437
  // eslint-disable-next-line jsx-a11y/click-events-have-key-events -- parent grid handles keyboard navigation via onKeyDown
435
438
  /* @__PURE__ */ l(
@@ -464,7 +467,7 @@ const He = [
464
467
  })
465
468
  }
466
469
  )
467
- ), Ce = M ? null : /* @__PURE__ */ h(ke, { children: [
470
+ ), Ce = S ? null : /* @__PURE__ */ h(ke, { children: [
468
471
  /* @__PURE__ */ h("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
469
472
  /* @__PURE__ */ l(
470
473
  "label",
@@ -497,7 +500,7 @@ const He = [
497
500
  max: 360,
498
501
  value: o.h,
499
502
  onChange: (a) => b({ ...o, h: a }),
500
- formatValue: (a) => `H ${a}°`,
503
+ formatValue: (a) => `H ${Math.round(a)}°`,
501
504
  disabled: v
502
505
  }
503
506
  ),
@@ -510,7 +513,7 @@ const He = [
510
513
  max: 100,
511
514
  value: o.s,
512
515
  onChange: (a) => b({ ...o, s: a }),
513
- formatValue: (a) => `S ${a}%`,
516
+ formatValue: (a) => `S ${Math.round(a)}%`,
514
517
  disabled: v
515
518
  }
516
519
  ),
@@ -523,7 +526,7 @@ const He = [
523
526
  max: 100,
524
527
  value: o.l,
525
528
  onChange: (a) => b({ ...o, l: a }),
526
- formatValue: (a) => `L ${a}%`,
529
+ formatValue: (a) => `L ${Math.round(a)}%`,
527
530
  disabled: v
528
531
  }
529
532
  ),
@@ -593,7 +596,7 @@ const He = [
593
596
  ] }), J = /* @__PURE__ */ h(
594
597
  "div",
595
598
  {
596
- className: M ? x === "sm" ? Ge : Ve : Be,
599
+ className: S ? x === "sm" ? Ge : Ve : Be,
597
600
  children: [
598
601
  be,
599
602
  Ce
@@ -623,7 +626,7 @@ const He = [
623
626
  id: P,
624
627
  "aria-describedby": N.describedBy || void 0,
625
628
  "aria-invalid": N.invalid || void 0,
626
- "aria-label": M ? g("inputs.colorPicker.triggerLabel", "Choose colour") : void 0,
629
+ "aria-label": S ? g("inputs.colorPicker.triggerLabel", "Choose colour") : void 0,
627
630
  className: _e({ size: x, className: U }),
628
631
  "data-component": "color-picker",
629
632
  "data-component-id": P,
@@ -632,12 +635,12 @@ const He = [
632
635
  /* @__PURE__ */ l(
633
636
  "span",
634
637
  {
635
- className: `ds:inline-block ds:size-5 ds:rounded-[var(--radius-sm)] ds:border ds:border-[color:var(--border)] ds:shrink-0 ds:bg-[var(--swatch-bg)]${M ? "" : " ds:me-[var(--spacing-sm)]"}`,
638
+ className: `ds:inline-block ds:size-5 ds:rounded-[var(--radius-sm)] ds:border ds:border-[color:var(--border)] ds:shrink-0 ds:bg-[var(--swatch-bg)]${S ? "" : " ds:me-[var(--spacing-sm)]"}`,
636
639
  "aria-hidden": "true",
637
640
  style: { "--swatch-bg": C(o) }
638
641
  }
639
642
  ),
640
- M ? null : /* @__PURE__ */ l("span", { className: "ds:text-start ds:truncate ds:tabular-nums", children: D(o, d) })
643
+ S ? null : /* @__PURE__ */ l("span", { className: "ds:text-start ds:truncate ds:tabular-nums", children: D(o, d) })
641
644
  ]
642
645
  }
643
646
  ) }),
@@ -675,7 +678,7 @@ function ae({
675
678
  className: "ds:size-4 ds:text-[var(--success)]"
676
679
  }
677
680
  ) : /* @__PURE__ */ l(
678
- Me,
681
+ Se,
679
682
  {
680
683
  "aria-hidden": "true",
681
684
  className: "ds:size-4 ds:text-[var(--destructive)]"
@@ -730,4 +733,4 @@ export {
730
733
  ze as c,
731
734
  Ee as h
732
735
  };
733
- //# sourceMappingURL=color-picker-CU303VjY.js.map
736
+ //# sourceMappingURL=color-picker-Bl5f0iK1.js.map