@alfadocs/ui-kit 0.17.0 → 0.17.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 (105) hide show
  1. package/dist/_chunks/{accordion-DOmxGEWU.js → accordion-CNcodXuO.js} +6 -6
  2. package/dist/_chunks/{ai-prompt-input-DEiQwIMn.js → ai-prompt-input-B-w5Rx3V.js} +184 -181
  3. package/dist/_chunks/{alert-pgdXrEO5.js → alert-DBnawbmf.js} +64 -59
  4. package/dist/_chunks/{audio-recorder-CRh4uyFL.js → audio-recorder-DNkQLW1G.js} +3 -3
  5. package/dist/_chunks/{autocomplete-mOg7WLOh.js → autocomplete-BxfabhZ8.js} +167 -164
  6. package/dist/_chunks/{balance-cell-renderer-DWWtX-VM.js → balance-cell-renderer-DJB6WDPe.js} +2 -2
  7. package/dist/_chunks/{carousel.agent-OTn-kMQg.js → carousel.agent-Xuw9LPZN.js} +14 -7
  8. package/dist/_chunks/{chat-input-UK-bXU7u.js → chat-input-B3XmFGDw.js} +123 -122
  9. package/dist/_chunks/checkbox-group-Bwmt1ovQ.js +213 -0
  10. package/dist/_chunks/{checkbox-D5EHnB14.js → checkbox-mwbrPZDY.js} +75 -70
  11. package/dist/_chunks/{collapsible-CuxUBoHJ.js → collapsible-hHiyZp0b.js} +61 -63
  12. package/dist/_chunks/{color-picker-BPfcByHH.js → color-picker-Bm-gzpsh.js} +2 -2
  13. package/dist/_chunks/{combobox-D5tWe0t_.js → combobox-Da9eq00i.js} +214 -211
  14. package/dist/_chunks/{copy-field-BCHAZ8QV.js → copy-field-BAF4mt9h.js} +95 -132
  15. package/dist/_chunks/{date-picker-BlhtBhPo.js → date-picker-BIoSLRly.js} +222 -219
  16. package/dist/_chunks/{date-range-picker-C2hRu_Ke.js → date-range-picker-9gANFNG9.js} +81 -78
  17. package/dist/_chunks/{date-time-picker-B67mPZmP.js → date-time-picker-DG7BiGdb.js} +98 -95
  18. package/dist/_chunks/{dialog-DRp6Dejy.js → dialog-DUomPCRS.js} +69 -71
  19. package/dist/_chunks/{dropdown-menu-dyV7gHh_.js → dropdown-menu-DZxwF23X.js} +108 -110
  20. package/dist/_chunks/{freemium-paywall-BTEiVkes.js → freemium-paywall-DXc7XlGE.js} +98 -97
  21. package/dist/_chunks/{leo-sidebar-D3TuyH5_.js → leo-sidebar-DIsiTju3.js} +2 -2
  22. package/dist/_chunks/{list-DcjV0m5B.js → list-BdvDctBz.js} +184 -180
  23. package/dist/_chunks/{message-tray-Fsend-du.js → message-tray-BNAS8al4.js} +111 -111
  24. package/dist/_chunks/{multi-select-DooDzQIp.js → multi-select-CyspR5ZF.js} +157 -154
  25. package/dist/_chunks/{navigation-menu-DdufF-_4.js → navigation-menu-CyS1fBJ7.js} +85 -87
  26. package/dist/_chunks/{notification-tray-C3dYdLAF.js → notification-tray-D_69dXFY.js} +114 -114
  27. package/dist/_chunks/{number-input-DH00o0DN.js → number-input-BZXu6bPY.js} +92 -89
  28. package/dist/_chunks/{otp-input-BBXYvLx5.js → otp-input-BDF_iNpa.js} +92 -93
  29. package/dist/_chunks/{pagination-F1ei4khE.js → pagination-BWaXF7W0.js} +194 -211
  30. package/dist/_chunks/{patient-shell-BE0CdPOJ.js → patient-shell-BOOaWZA9.js} +3 -3
  31. package/dist/_chunks/{payment-form-CI77oIx1.js → payment-form-BjkuQeqR.js} +2 -2
  32. package/dist/_chunks/{pdf-viewer-CnEJvmXC.js → pdf-viewer-BG_nsFT5.js} +2 -2
  33. package/dist/_chunks/{public-header.agent-sDi9N9su.js → public-header.agent-BIBQzkeV.js} +7 -12
  34. package/dist/_chunks/{radio-group-Cz1a4QCA.js → radio-group-BHZOxrIK.js} +4 -4
  35. package/dist/_chunks/{select-Ca6ibiDL.js → select-C92AT_OZ.js} +7 -7
  36. package/dist/_chunks/{sidebar-D8Lq065m.js → sidebar-BqzlRBvC.js} +271 -291
  37. package/dist/_chunks/{slider-CkR6CLun.js → slider-CfEzeseL.js} +4 -4
  38. package/dist/_chunks/{tabs-CRCyPpJo.js → tabs-aEQfQV3x.js} +8 -8
  39. package/dist/_chunks/{theme-toggle-B3meAb3y.js → theme-toggle-BswYl0Yp.js} +2 -2
  40. package/dist/_chunks/use-controllable-state-BiY4xTzM.js +23 -0
  41. package/dist/_chunks/use-copy-to-clipboard-Cyfc_dlv.js +43 -0
  42. package/dist/_chunks/use-persistent-state-i23OWy6G.js +24 -0
  43. package/dist/_chunks/{warning-stack-CeRihME9.js → warning-stack-CDH9TudY.js} +2 -2
  44. package/dist/_chunks/{workflow-map-D3MvrsZV.js → workflow-map-BeKe23uw.js} +3 -3
  45. package/dist/agent-catalog.json +1 -1
  46. package/dist/components/_shared/use-debounced-callback.d.ts +1 -5
  47. package/dist/components/_shared/use-direction.d.ts +1 -18
  48. package/dist/components/_shared/use-focus-trap.d.ts +1 -31
  49. package/dist/components/accordion/index.js +1 -1
  50. package/dist/components/ai-prompt-input/index.js +1 -1
  51. package/dist/components/alert/index.js +1 -1
  52. package/dist/components/audio-recorder/index.js +1 -1
  53. package/dist/components/autocomplete/index.js +1 -1
  54. package/dist/components/carousel/index.js +1 -1
  55. package/dist/components/chat-input/index.js +1 -1
  56. package/dist/components/checkbox/index.js +1 -1
  57. package/dist/components/checkbox-group/index.js +1 -1
  58. package/dist/components/collapsible/index.js +1 -1
  59. package/dist/components/color-picker/index.js +1 -1
  60. package/dist/components/combobox/index.js +1 -1
  61. package/dist/components/command-palette/command-palette.d.ts +1 -1
  62. package/dist/components/copy-field/index.js +1 -1
  63. package/dist/components/data-table/index.js +1 -1
  64. package/dist/components/date-picker/index.js +1 -1
  65. package/dist/components/date-range-picker/index.js +1 -1
  66. package/dist/components/date-time-picker/index.js +1 -1
  67. package/dist/components/dialog/index.js +1 -1
  68. package/dist/components/dropdown-menu/index.js +1 -1
  69. package/dist/components/freemium-paywall/index.js +1 -1
  70. package/dist/components/icon-button-group/icon-button-group.d.ts +14 -14
  71. package/dist/components/list/index.js +1 -1
  72. package/dist/components/message-tray/index.js +1 -1
  73. package/dist/components/multi-select/index.js +1 -1
  74. package/dist/components/navigation-menu/index.js +1 -1
  75. package/dist/components/notification-tray/index.js +1 -1
  76. package/dist/components/number-input/index.js +1 -1
  77. package/dist/components/otp-input/index.js +1 -1
  78. package/dist/components/pagination/index.js +1 -1
  79. package/dist/components/payment-form/index.js +1 -1
  80. package/dist/components/pdf-viewer/index.js +1 -1
  81. package/dist/components/public-header/index.js +1 -1
  82. package/dist/components/public-header/public-header.d.ts +1 -1
  83. package/dist/components/radio-group/index.js +1 -1
  84. package/dist/components/select/index.js +1 -1
  85. package/dist/components/sidebar/index.js +8 -7
  86. package/dist/components/sidebar/sidebar.d.ts +1 -1
  87. package/dist/components/slider/index.js +1 -1
  88. package/dist/components/tabs/index.js +1 -1
  89. package/dist/components/theme-toggle/index.js +1 -1
  90. package/dist/components/warning-stack/index.js +1 -1
  91. package/dist/components/workflow/index.js +1 -1
  92. package/dist/hooks/index.d.ts +8 -0
  93. package/dist/hooks/index.js +98 -15
  94. package/dist/hooks/use-debounced-callback.d.ts +19 -0
  95. package/dist/hooks/use-debounced-value.d.ts +16 -0
  96. package/dist/hooks/use-direction.d.ts +19 -0
  97. package/dist/hooks/use-focus-trap.d.ts +32 -0
  98. package/dist/hooks/use-isomorphic-layout-effect.d.ts +13 -0
  99. package/dist/hooks/use-persistent-state.d.ts +16 -0
  100. package/dist/index.js +493 -492
  101. package/dist/patterns/leo-assistant/index.js +1 -1
  102. package/dist/patterns/patient-shell/index.js +1 -1
  103. package/dist/tokens.css +1 -1
  104. package/package.json +4 -2
  105. package/dist/_chunks/checkbox-group-Qkm3Rg1S.js +0 -208
@@ -1,13 +1,14 @@
1
- import { jsxs as D, jsx as t } from "react/jsx-runtime";
2
- import { forwardRef as i, useState as _, useRef as R, useCallback as V, Children as O, isValidElement as F } from "react";
3
- import { c as L } from "./index-D2ZczOXr.js";
4
- import { useTranslation as W } from "react-i18next";
1
+ import { jsxs as E, jsx as t } from "react/jsx-runtime";
2
+ import { forwardRef as a, useState as R, useRef as V, useCallback as z, Children as B, isValidElement as D } from "react";
3
+ import { c as F } from "./index-D2ZczOXr.js";
4
+ import { useTranslation as L } from "react-i18next";
5
+ import { u as W } from "./use-controllable-state-BiY4xTzM.js";
5
6
  import { X } from "./x-CCcI3eJp.js";
6
7
  import { C as G } from "./circle-x-Du2CmjaU.js";
7
8
  import { T as H } from "./triangle-alert-CBPUIzQo.js";
8
9
  import { C as M } from "./circle-check-9AeSgJD_.js";
9
10
  import { I as P } from "./info-B9XNKn05.js";
10
- const U = L(
11
+ const U = F(
11
12
  [
12
13
  // Default `items-center` keeps the icon + dismiss optically aligned
13
14
  // with a single-line description. The `data-[has-title=true]`
@@ -92,81 +93,85 @@ const U = L(
92
93
  role: "alert",
93
94
  live: "assertive"
94
95
  }
95
- }, c = i(
96
- ({ as: s = "h5", className: r, ...e }, o) => /* @__PURE__ */ t(
97
- s,
96
+ }, c = a(
97
+ ({ as: e = "h5", className: s, ...o }, n) => /* @__PURE__ */ t(
98
+ e,
98
99
  {
99
- ref: o,
100
- className: ["type-title-item", r].filter(Boolean).join(" "),
101
- ...e
100
+ ref: n,
101
+ className: ["type-title-item", s].filter(Boolean).join(" "),
102
+ ...o
102
103
  }
103
104
  )
104
105
  );
105
106
  c.displayName = "Alert.Title";
106
- const w = i(({ className: s, ...r }, e) => /* @__PURE__ */ t(
107
+ const x = a(({ className: e, ...s }, o) => /* @__PURE__ */ t(
107
108
  "p",
108
109
  {
109
- ref: e,
110
+ ref: o,
110
111
  className: [
111
112
  "ds:[[data-has-title=true]_&]:mt-[var(--spacing-xs)] type-body-sm",
112
- s
113
+ e
113
114
  ].filter(Boolean).join(" "),
114
- ...r
115
+ ...s
115
116
  }
116
117
  ));
117
- w.displayName = "Alert.Description";
118
- const A = i(
119
- ({ className: s, ...r }, e) => /* @__PURE__ */ t(
118
+ x.displayName = "Alert.Description";
119
+ const _ = a(
120
+ ({ className: e, ...s }, o) => /* @__PURE__ */ t(
120
121
  "div",
121
122
  {
122
- ref: e,
123
+ ref: o,
123
124
  className: [
124
125
  "ds:mt-[var(--spacing-sm)] ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]",
125
- s
126
+ e
126
127
  ].filter(Boolean).join(" "),
127
- ...r
128
+ ...s
128
129
  }
129
130
  )
130
131
  );
131
- A.displayName = "Alert.Action";
132
- const N = i(
132
+ _.displayName = "Alert.Action";
133
+ const w = a(
133
134
  ({
134
- variant: s = "info",
135
- dismissible: r = !1,
136
- open: e,
137
- onOpenChange: o,
135
+ variant: e = "info",
136
+ dismissible: s = !1,
137
+ open: o,
138
+ onOpenChange: n,
138
139
  icon: m,
139
- live: y,
140
- className: T,
140
+ live: C,
141
+ className: A,
141
142
  children: u,
142
- ...C
143
- }, j) => {
144
- const { t: I } = W(), [k, S] = _(!0), [f, v] = _(!1), n = R(null), g = e !== void 0, E = g ? e : k, z = V(() => {
143
+ ...N
144
+ }, y) => {
145
+ const { t: T } = L(), [j, k] = W({
146
+ value: o,
147
+ defaultValue: !0,
148
+ onChange: n
149
+ }), I = j ?? !0, [f, g] = R(!1), i = V(null), O = z(() => {
145
150
  if (typeof window > "u") return 200;
146
- const a = window.getComputedStyle(document.documentElement).getPropertyValue("--animation-duration");
147
- if (!a) return 200;
148
- const x = a.trim(), l = parseFloat(x);
149
- return Number.isFinite(l) ? x.endsWith("ms") ? l : l * 1e3 : 200;
151
+ const r = window.getComputedStyle(document.documentElement).getPropertyValue("--animation-duration");
152
+ if (!r) return 200;
153
+ const b = r.trim(), l = parseFloat(b);
154
+ return Number.isFinite(l) ? b.endsWith("ms") ? l : l * 1e3 : 200;
150
155
  }, []);
151
- if (!E) return null;
152
- const d = J[s], p = m !== void 0 ? m : d.icon, b = O.toArray(u).some(
153
- (a) => F(a) && a.type === c
154
- ), B = () => {
155
- f || (v(!0), n.current && clearTimeout(n.current), n.current = setTimeout(() => {
156
- v(!1), g || S(!1), o == null || o(!1);
157
- }, z()));
156
+ if (!I) return null;
157
+ const d = J[e], v = m !== void 0 ? m : d.icon, p = B.toArray(u).some(
158
+ (r) => D(r) && r.type === c
159
+ ), S = () => {
160
+ f || (g(!0), i.current && clearTimeout(i.current), i.current = setTimeout(() => {
161
+ g(!1), k(!1);
162
+ }, O()));
158
163
  };
159
- return /* @__PURE__ */ D(
164
+ return /* @__PURE__ */ E(
160
165
  "div",
161
166
  {
162
- ref: j,
167
+ ref: y,
163
168
  role: d.role,
164
- "aria-live": y ?? d.live,
169
+ "aria-live": C ?? d.live,
165
170
  "data-component": "alert",
166
- "data-has-title": b ? "true" : "false",
171
+ "data-has-title": p ? "true" : "false",
167
172
  "data-state": f ? "closing" : "open",
168
173
  className: [
169
- U({ variant: s, className: T }),
174
+ U({ variant: e, className: A }),
170
175
  // Entry: fade + slide-down on mount. Exit: fade + slide-up + slight
171
176
  // scale when dismissed. Driven by `tw-animate-css`. Respects
172
177
  // `prefers-reduced-motion` via `motion-safe:` and zeroes under the
@@ -180,16 +185,16 @@ const N = i(
180
185
  "ds:motion-safe:data-[state=closing]:fill-mode-forwards",
181
186
  "ds:motion-safe:duration-[var(--animation-duration)]"
182
187
  ].join(" "),
183
- ...C,
188
+ ...N,
184
189
  children: [
185
- p ? /* @__PURE__ */ t("span", { className: b ? $ : h, children: p }) : null,
190
+ v ? /* @__PURE__ */ t("span", { className: p ? $ : h, children: v }) : null,
186
191
  /* @__PURE__ */ t("div", { className: "ds:flex-1 ds:min-w-0", children: u }),
187
- r ? /* @__PURE__ */ t(
192
+ s ? /* @__PURE__ */ t(
188
193
  "button",
189
194
  {
190
195
  type: "button",
191
- "aria-label": I("common.close", "Close"),
192
- onClick: B,
196
+ "aria-label": T("common.close", "Close"),
197
+ onClick: S,
193
198
  className: q,
194
199
  children: /* @__PURE__ */ t(X, { "aria-hidden": "true", className: "ds:size-4" })
195
200
  }
@@ -199,13 +204,13 @@ const N = i(
199
204
  );
200
205
  }
201
206
  );
202
- N.displayName = "Alert";
203
- const at = Object.assign(N, {
207
+ w.displayName = "Alert";
208
+ const nt = Object.assign(w, {
204
209
  Title: c,
205
- Description: w,
206
- Action: A
210
+ Description: x,
211
+ Action: _
207
212
  });
208
213
  export {
209
- at as A
214
+ nt as A
210
215
  };
211
- //# sourceMappingURL=alert-pgdXrEO5.js.map
216
+ //# sourceMappingURL=alert-DBnawbmf.js.map
@@ -4,9 +4,9 @@ import { c as ce } from "./index-D2ZczOXr.js";
4
4
  import { useTranslation as oe } from "react-i18next";
5
5
  import { B as G } from "./button-DD_0Xdmr.js";
6
6
  import { I as N } from "./icon-button-C4CGcYuz.js";
7
- import { S as ue } from "./select-Ca6ibiDL.js";
7
+ import { S as ue } from "./select-C92AT_OZ.js";
8
8
  import { A as pe } from "./audio-visualiser-I-T4Z7EU.js";
9
- import { A as F } from "./alert-pgdXrEO5.js";
9
+ import { A as F } from "./alert-DBnawbmf.js";
10
10
  import { u as le } from "./registry-C9nwlNyL.js";
11
11
  import { c as V } from "./createLucideIcon-CrFbzy84.js";
12
12
  import { S as me } from "./square-CZoGU14v.js";
@@ -454,4 +454,4 @@ export {
454
454
  Ne as A,
455
455
  Re as a
456
456
  };
457
- //# sourceMappingURL=audio-recorder-CRh4uyFL.js.map
457
+ //# sourceMappingURL=audio-recorder-DNkQLW1G.js.map