@alfadocs/ui-kit-debug 0.17.1 → 0.17.3

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 (202) hide show
  1. package/dist/_chunks/{accordion-DOmxGEWU.js → accordion-CNcodXuO.js} +6 -6
  2. package/dist/_chunks/{accordion-DOmxGEWU.js.map → accordion-CNcodXuO.js.map} +1 -1
  3. package/dist/_chunks/{ai-prompt-input-DEiQwIMn.js → ai-prompt-input-B-w5Rx3V.js} +184 -181
  4. package/dist/_chunks/ai-prompt-input-B-w5Rx3V.js.map +1 -0
  5. package/dist/_chunks/{alert-pgdXrEO5.js → alert-DBnawbmf.js} +64 -59
  6. package/dist/_chunks/alert-DBnawbmf.js.map +1 -0
  7. package/dist/_chunks/{audio-recorder-CRh4uyFL.js → audio-recorder-DNkQLW1G.js} +3 -3
  8. package/dist/_chunks/{audio-recorder-CRh4uyFL.js.map → audio-recorder-DNkQLW1G.js.map} +1 -1
  9. package/dist/_chunks/{autocomplete-mOg7WLOh.js → autocomplete-BxfabhZ8.js} +167 -164
  10. package/dist/_chunks/autocomplete-BxfabhZ8.js.map +1 -0
  11. package/dist/_chunks/{balance-cell-renderer-DWWtX-VM.js → balance-cell-renderer-DJB6WDPe.js} +2 -2
  12. package/dist/_chunks/{balance-cell-renderer-DWWtX-VM.js.map → balance-cell-renderer-DJB6WDPe.js.map} +1 -1
  13. package/dist/_chunks/{chat-input-UK-bXU7u.js → chat-input-B3XmFGDw.js} +123 -122
  14. package/dist/_chunks/chat-input-B3XmFGDw.js.map +1 -0
  15. package/dist/_chunks/checkbox-group-Bwmt1ovQ.js +213 -0
  16. package/dist/_chunks/checkbox-group-Bwmt1ovQ.js.map +1 -0
  17. package/dist/_chunks/{checkbox-D5EHnB14.js → checkbox-mwbrPZDY.js} +75 -70
  18. package/dist/_chunks/checkbox-mwbrPZDY.js.map +1 -0
  19. package/dist/_chunks/{collapsible-CuxUBoHJ.js → collapsible-hHiyZp0b.js} +61 -63
  20. package/dist/_chunks/collapsible-hHiyZp0b.js.map +1 -0
  21. package/dist/_chunks/{color-picker-BPfcByHH.js → color-picker-Bm-gzpsh.js} +2 -2
  22. package/dist/_chunks/{color-picker-BPfcByHH.js.map → color-picker-Bm-gzpsh.js.map} +1 -1
  23. package/dist/_chunks/{combobox-D5tWe0t_.js → combobox-Da9eq00i.js} +214 -211
  24. package/dist/_chunks/combobox-Da9eq00i.js.map +1 -0
  25. package/dist/_chunks/{copy-field-BCHAZ8QV.js → copy-field-BAF4mt9h.js} +95 -132
  26. package/dist/_chunks/copy-field-BAF4mt9h.js.map +1 -0
  27. package/dist/_chunks/{date-picker-BlhtBhPo.js → date-picker-BIoSLRly.js} +222 -219
  28. package/dist/_chunks/{date-picker-BlhtBhPo.js.map → date-picker-BIoSLRly.js.map} +1 -1
  29. package/dist/_chunks/{date-range-picker-C2hRu_Ke.js → date-range-picker-9gANFNG9.js} +81 -78
  30. package/dist/_chunks/date-range-picker-9gANFNG9.js.map +1 -0
  31. package/dist/_chunks/{date-time-picker-B67mPZmP.js → date-time-picker-DG7BiGdb.js} +98 -95
  32. package/dist/_chunks/date-time-picker-DG7BiGdb.js.map +1 -0
  33. package/dist/_chunks/{dialog-DRp6Dejy.js → dialog-DUomPCRS.js} +69 -71
  34. package/dist/_chunks/dialog-DUomPCRS.js.map +1 -0
  35. package/dist/_chunks/{dropdown-menu-dyV7gHh_.js → dropdown-menu-DZxwF23X.js} +108 -110
  36. package/dist/_chunks/dropdown-menu-DZxwF23X.js.map +1 -0
  37. package/dist/_chunks/{freemium-paywall-BTEiVkes.js → freemium-paywall-DXc7XlGE.js} +98 -97
  38. package/dist/_chunks/freemium-paywall-DXc7XlGE.js.map +1 -0
  39. package/dist/_chunks/{leo-sidebar-D3TuyH5_.js → leo-sidebar-DIsiTju3.js} +2 -2
  40. package/dist/_chunks/{leo-sidebar-D3TuyH5_.js.map → leo-sidebar-DIsiTju3.js.map} +1 -1
  41. package/dist/_chunks/{list-DcjV0m5B.js → list-BdvDctBz.js} +184 -180
  42. package/dist/_chunks/list-BdvDctBz.js.map +1 -0
  43. package/dist/_chunks/{message-tray-Fsend-du.js → message-tray-BNAS8al4.js} +111 -111
  44. package/dist/_chunks/message-tray-BNAS8al4.js.map +1 -0
  45. package/dist/_chunks/{multi-select-DooDzQIp.js → multi-select-CyspR5ZF.js} +157 -154
  46. package/dist/_chunks/multi-select-CyspR5ZF.js.map +1 -0
  47. package/dist/_chunks/{navigation-menu-DdufF-_4.js → navigation-menu-CyS1fBJ7.js} +85 -87
  48. package/dist/_chunks/navigation-menu-CyS1fBJ7.js.map +1 -0
  49. package/dist/_chunks/{notification-tray-C3dYdLAF.js → notification-tray-D_69dXFY.js} +114 -114
  50. package/dist/_chunks/notification-tray-D_69dXFY.js.map +1 -0
  51. package/dist/_chunks/{number-input-DH00o0DN.js → number-input-BZXu6bPY.js} +92 -89
  52. package/dist/_chunks/number-input-BZXu6bPY.js.map +1 -0
  53. package/dist/_chunks/{otp-input-BBXYvLx5.js → otp-input-BDF_iNpa.js} +92 -93
  54. package/dist/_chunks/otp-input-BDF_iNpa.js.map +1 -0
  55. package/dist/_chunks/{pagination-F1ei4khE.js → pagination-BWaXF7W0.js} +194 -211
  56. package/dist/_chunks/pagination-BWaXF7W0.js.map +1 -0
  57. package/dist/_chunks/{patient-shell-BE0CdPOJ.js → patient-shell-BOOaWZA9.js} +3 -3
  58. package/dist/_chunks/{patient-shell-BE0CdPOJ.js.map → patient-shell-BOOaWZA9.js.map} +1 -1
  59. package/dist/_chunks/{payment-form-CI77oIx1.js → payment-form-BjkuQeqR.js} +2 -2
  60. package/dist/_chunks/{payment-form-CI77oIx1.js.map → payment-form-BjkuQeqR.js.map} +1 -1
  61. package/dist/_chunks/{pdf-viewer-CnEJvmXC.js → pdf-viewer-BG_nsFT5.js} +2 -2
  62. package/dist/_chunks/{pdf-viewer-CnEJvmXC.js.map → pdf-viewer-BG_nsFT5.js.map} +1 -1
  63. package/dist/_chunks/{radio-group-Cz1a4QCA.js → radio-group-BHZOxrIK.js} +4 -4
  64. package/dist/_chunks/{radio-group-Cz1a4QCA.js.map → radio-group-BHZOxrIK.js.map} +1 -1
  65. package/dist/_chunks/{select-Ca6ibiDL.js → select-C92AT_OZ.js} +7 -7
  66. package/dist/_chunks/{select-Ca6ibiDL.js.map → select-C92AT_OZ.js.map} +1 -1
  67. package/dist/_chunks/{sidebar-D8Lq065m.js → sidebar-BqzlRBvC.js} +271 -291
  68. package/dist/_chunks/sidebar-BqzlRBvC.js.map +1 -0
  69. package/dist/_chunks/{slider-CkR6CLun.js → slider-CfEzeseL.js} +4 -4
  70. package/dist/_chunks/{slider-CkR6CLun.js.map → slider-CfEzeseL.js.map} +1 -1
  71. package/dist/_chunks/{tabs-CRCyPpJo.js → tabs-aEQfQV3x.js} +8 -8
  72. package/dist/_chunks/{tabs-CRCyPpJo.js.map → tabs-aEQfQV3x.js.map} +1 -1
  73. package/dist/_chunks/{theme-toggle-B3meAb3y.js → theme-toggle-BswYl0Yp.js} +2 -2
  74. package/dist/_chunks/{theme-toggle-B3meAb3y.js.map → theme-toggle-BswYl0Yp.js.map} +1 -1
  75. package/dist/_chunks/use-controllable-state-BiY4xTzM.js +23 -0
  76. package/dist/_chunks/use-controllable-state-BiY4xTzM.js.map +1 -0
  77. package/dist/_chunks/use-copy-to-clipboard-Cyfc_dlv.js +43 -0
  78. package/dist/_chunks/use-copy-to-clipboard-Cyfc_dlv.js.map +1 -0
  79. package/dist/_chunks/use-debounced-callback-BisrB-Fq.js.map +1 -1
  80. package/dist/_chunks/use-direction-D6rvvG9G.js.map +1 -1
  81. package/dist/_chunks/use-persistent-state-i23OWy6G.js +24 -0
  82. package/dist/_chunks/use-persistent-state-i23OWy6G.js.map +1 -0
  83. package/dist/_chunks/{warning-stack-CeRihME9.js → warning-stack-CDH9TudY.js} +2 -2
  84. package/dist/_chunks/{warning-stack-CeRihME9.js.map → warning-stack-CDH9TudY.js.map} +1 -1
  85. package/dist/_chunks/{workflow-map-D3MvrsZV.js → workflow-map-BeKe23uw.js} +3 -3
  86. package/dist/_chunks/{workflow-map-D3MvrsZV.js.map → workflow-map-BeKe23uw.js.map} +1 -1
  87. package/dist/agent-catalog.json +1 -1
  88. package/dist/components/_shared/use-debounced-callback.d.ts +1 -5
  89. package/dist/components/_shared/use-debounced-callback.d.ts.map +1 -1
  90. package/dist/components/_shared/use-direction.d.ts +1 -18
  91. package/dist/components/_shared/use-direction.d.ts.map +1 -1
  92. package/dist/components/_shared/use-focus-trap.d.ts +1 -31
  93. package/dist/components/_shared/use-focus-trap.d.ts.map +1 -1
  94. package/dist/components/accordion/index.js +1 -1
  95. package/dist/components/ai-prompt-input/ai-prompt-input.d.ts.map +1 -1
  96. package/dist/components/ai-prompt-input/index.js +1 -1
  97. package/dist/components/alert/alert.d.ts.map +1 -1
  98. package/dist/components/alert/index.js +1 -1
  99. package/dist/components/audio-recorder/index.js +1 -1
  100. package/dist/components/autocomplete/autocomplete.d.ts.map +1 -1
  101. package/dist/components/autocomplete/index.js +1 -1
  102. package/dist/components/chat-input/chat-input.d.ts.map +1 -1
  103. package/dist/components/chat-input/index.js +1 -1
  104. package/dist/components/checkbox/checkbox.d.ts.map +1 -1
  105. package/dist/components/checkbox/index.js +1 -1
  106. package/dist/components/checkbox-group/checkbox-group.d.ts.map +1 -1
  107. package/dist/components/checkbox-group/index.js +1 -1
  108. package/dist/components/collapsible/collapsible.d.ts.map +1 -1
  109. package/dist/components/collapsible/index.js +1 -1
  110. package/dist/components/color-picker/index.js +1 -1
  111. package/dist/components/combobox/combobox.d.ts.map +1 -1
  112. package/dist/components/combobox/index.js +1 -1
  113. package/dist/components/command-palette/command-palette.d.ts +1 -1
  114. package/dist/components/copy-field/index.js +1 -1
  115. package/dist/components/data-table/index.js +1 -1
  116. package/dist/components/date-picker/date-picker.d.ts.map +1 -1
  117. package/dist/components/date-picker/index.js +1 -1
  118. package/dist/components/date-range-picker/date-range-picker.d.ts.map +1 -1
  119. package/dist/components/date-range-picker/index.js +1 -1
  120. package/dist/components/date-time-picker/date-time-picker.d.ts.map +1 -1
  121. package/dist/components/date-time-picker/index.js +1 -1
  122. package/dist/components/dialog/dialog.d.ts.map +1 -1
  123. package/dist/components/dialog/index.js +1 -1
  124. package/dist/components/dropdown-menu/dropdown-menu.d.ts.map +1 -1
  125. package/dist/components/dropdown-menu/index.js +1 -1
  126. package/dist/components/freemium-paywall/freemium-paywall.d.ts.map +1 -1
  127. package/dist/components/freemium-paywall/index.js +1 -1
  128. package/dist/components/icon-button-group/icon-button-group.d.ts +14 -14
  129. package/dist/components/list/index.js +1 -1
  130. package/dist/components/list/list.d.ts.map +1 -1
  131. package/dist/components/message-tray/index.js +1 -1
  132. package/dist/components/message-tray/message-tray.d.ts.map +1 -1
  133. package/dist/components/multi-select/index.js +1 -1
  134. package/dist/components/multi-select/multi-select.d.ts.map +1 -1
  135. package/dist/components/navigation-menu/index.js +1 -1
  136. package/dist/components/navigation-menu/navigation-menu.d.ts.map +1 -1
  137. package/dist/components/notification-tray/index.js +1 -1
  138. package/dist/components/notification-tray/notification-tray.d.ts.map +1 -1
  139. package/dist/components/number-input/index.js +1 -1
  140. package/dist/components/number-input/number-input.d.ts.map +1 -1
  141. package/dist/components/otp-input/index.js +1 -1
  142. package/dist/components/otp-input/otp-input.d.ts.map +1 -1
  143. package/dist/components/pagination/index.js +1 -1
  144. package/dist/components/payment-form/index.js +1 -1
  145. package/dist/components/pdf-viewer/index.js +1 -1
  146. package/dist/components/radio-group/index.js +1 -1
  147. package/dist/components/select/index.js +1 -1
  148. package/dist/components/sidebar/index.js +8 -7
  149. package/dist/components/sidebar/index.js.map +1 -1
  150. package/dist/components/sidebar/sidebar.d.ts +1 -1
  151. package/dist/components/sidebar/sidebar.d.ts.map +1 -1
  152. package/dist/components/slider/index.js +1 -1
  153. package/dist/components/tabs/index.js +1 -1
  154. package/dist/components/theme-toggle/index.js +1 -1
  155. package/dist/components/warning-stack/index.js +1 -1
  156. package/dist/components/workflow/index.js +1 -1
  157. package/dist/hooks/index.d.ts +8 -0
  158. package/dist/hooks/index.d.ts.map +1 -1
  159. package/dist/hooks/index.js +98 -15
  160. package/dist/hooks/index.js.map +1 -1
  161. package/dist/hooks/use-debounced-callback.d.ts +19 -0
  162. package/dist/hooks/use-debounced-callback.d.ts.map +1 -0
  163. package/dist/hooks/use-debounced-value.d.ts +16 -0
  164. package/dist/hooks/use-debounced-value.d.ts.map +1 -0
  165. package/dist/hooks/use-direction.d.ts +19 -0
  166. package/dist/hooks/use-direction.d.ts.map +1 -0
  167. package/dist/hooks/use-focus-trap.d.ts +32 -0
  168. package/dist/hooks/use-focus-trap.d.ts.map +1 -0
  169. package/dist/hooks/use-isomorphic-layout-effect.d.ts +13 -0
  170. package/dist/hooks/use-isomorphic-layout-effect.d.ts.map +1 -0
  171. package/dist/hooks/use-persistent-state.d.ts +16 -0
  172. package/dist/hooks/use-persistent-state.d.ts.map +1 -0
  173. package/dist/index.js +493 -492
  174. package/dist/index.js.map +1 -1
  175. package/dist/patterns/leo-assistant/index.js +1 -1
  176. package/dist/patterns/patient-shell/index.js +1 -1
  177. package/dist/tokens.css +1 -1
  178. package/package.json +4 -2
  179. package/dist/_chunks/ai-prompt-input-DEiQwIMn.js.map +0 -1
  180. package/dist/_chunks/alert-pgdXrEO5.js.map +0 -1
  181. package/dist/_chunks/autocomplete-mOg7WLOh.js.map +0 -1
  182. package/dist/_chunks/chat-input-UK-bXU7u.js.map +0 -1
  183. package/dist/_chunks/checkbox-D5EHnB14.js.map +0 -1
  184. package/dist/_chunks/checkbox-group-Qkm3Rg1S.js +0 -208
  185. package/dist/_chunks/checkbox-group-Qkm3Rg1S.js.map +0 -1
  186. package/dist/_chunks/collapsible-CuxUBoHJ.js.map +0 -1
  187. package/dist/_chunks/combobox-D5tWe0t_.js.map +0 -1
  188. package/dist/_chunks/copy-field-BCHAZ8QV.js.map +0 -1
  189. package/dist/_chunks/date-range-picker-C2hRu_Ke.js.map +0 -1
  190. package/dist/_chunks/date-time-picker-B67mPZmP.js.map +0 -1
  191. package/dist/_chunks/dialog-DRp6Dejy.js.map +0 -1
  192. package/dist/_chunks/dropdown-menu-dyV7gHh_.js.map +0 -1
  193. package/dist/_chunks/freemium-paywall-BTEiVkes.js.map +0 -1
  194. package/dist/_chunks/list-DcjV0m5B.js.map +0 -1
  195. package/dist/_chunks/message-tray-Fsend-du.js.map +0 -1
  196. package/dist/_chunks/multi-select-DooDzQIp.js.map +0 -1
  197. package/dist/_chunks/navigation-menu-DdufF-_4.js.map +0 -1
  198. package/dist/_chunks/notification-tray-C3dYdLAF.js.map +0 -1
  199. package/dist/_chunks/number-input-DH00o0DN.js.map +0 -1
  200. package/dist/_chunks/otp-input-BBXYvLx5.js.map +0 -1
  201. package/dist/_chunks/pagination-F1ei4khE.js.map +0 -1
  202. package/dist/_chunks/sidebar-D8Lq065m.js.map +0 -1
@@ -1,33 +1,16 @@
1
- import { jsxs as h, jsx as t } from "react/jsx-runtime";
2
- import { useState as Z, useRef as z, useEffect as y, useCallback as k, forwardRef as u, useMemo as _, useId as D } from "react";
1
+ import { jsxs as f, jsx as i } from "react/jsx-runtime";
2
+ import { forwardRef as g, useEffect as j, useCallback as V, useMemo as A, useRef as _, useId as Z } from "react";
3
+ import { u as D } from "./use-controllable-state-BiY4xTzM.js";
3
4
  import * as m from "@radix-ui/react-select";
4
5
  import { c as ee } from "./index-D2ZczOXr.js";
5
- import { useTranslation as x } from "react-i18next";
6
+ import { useTranslation as b } from "react-i18next";
6
7
  import { u as se } from "./registry-C9nwlNyL.js";
7
8
  import { E as ae } from "./ellipsis-rgGdiK_9.js";
8
9
  import { C as F } from "./chevron-right-BrpYejk0.js";
9
10
  import { C as ie } from "./chevron-left-CX1jqD2M.js";
10
- import { C as te, a as ne } from "./chevrons-right-d9MwesPG.js";
11
+ import { C as ne, a as te } from "./chevrons-right-d9MwesPG.js";
11
12
  import { C as re } from "./check-DPdL_Sm7.js";
12
- function de({
13
- value: e,
14
- defaultValue: a,
15
- onChange: i
16
- }) {
17
- const s = e !== void 0, [d, r] = Z(a), n = z(i);
18
- y(() => {
19
- n.current = i;
20
- }, [i]);
21
- const p = s ? e : d, v = k(
22
- (o) => {
23
- var b;
24
- s || r(o), (b = n.current) == null || b.call(n, o);
25
- },
26
- [s]
27
- );
28
- return [p, v];
29
- }
30
- const oe = {
13
+ const de = {
31
14
  id: "pagination",
32
15
  capabilities: ["paginate", "range_navigate"],
33
16
  state: {
@@ -47,8 +30,8 @@ const oe = {
47
30
  safety: "read",
48
31
  argsType: "{ page: number }",
49
32
  description: "Navigate to a specific 1-indexed page.",
50
- invoke: (e, a) => {
51
- e.goToPage(a.page);
33
+ invoke: (e, s) => {
34
+ e.goToPage(s.page);
52
35
  }
53
36
  },
54
37
  next: {
@@ -74,7 +57,7 @@ const oe = {
74
57
  description: "Sourced from the id prop."
75
58
  }
76
59
  }
77
- }, le = [
60
+ }, oe = [
78
61
  "ds:inline-flex ds:items-center ds:justify-center",
79
62
  "ds:rounded-[var(--radius-sm)]",
80
63
  "ds:border ds:border-transparent",
@@ -87,7 +70,7 @@ const oe = {
87
70
  "ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
88
71
  "ds:disabled:cursor-not-allowed ds:disabled:opacity-50",
89
72
  "ds:aria-disabled:cursor-not-allowed ds:aria-disabled:opacity-50"
90
- ].join(" "), P = ee(le, {
73
+ ].join(" "), w = ee(oe, {
91
74
  variants: {
92
75
  size: {
93
76
  sm: "ds:min-w-[var(--min-target-size)] ds:min-h-[var(--min-target-size)] ds:text-[length:var(--font-size-sm)] ds:ps-[var(--spacing-xs)] ds:pe-[var(--spacing-xs)]",
@@ -101,101 +84,101 @@ const oe = {
101
84
  },
102
85
  defaultVariants: { size: "md", active: !1 }
103
86
  });
104
- function w(e, a) {
105
- const i = [];
106
- for (let s = e; s <= a; s++) i.push(s);
107
- return i;
87
+ function N(e, s) {
88
+ const n = [];
89
+ for (let a = e; a <= s; a++) n.push(a);
90
+ return n;
108
91
  }
109
- function ce(e, a, i = 1, s = 1) {
110
- if (a <= 0) return [];
111
- if (i = Math.max(0, i), s = Math.max(1, s), s * 2 + i * 2 + 3 >= a) return w(1, a);
112
- const r = w(1, s), n = w(a - s + 1, a), p = Math.max(
92
+ function le(e, s, n = 1, a = 1) {
93
+ if (s <= 0) return [];
94
+ if (n = Math.max(0, n), a = Math.max(1, a), a * 2 + n * 2 + 3 >= s) return N(1, s);
95
+ const r = N(1, a), t = N(s - a + 1, s), u = Math.max(
113
96
  Math.min(
114
- e - i,
115
- a - s - i * 2 - 1
97
+ e - n,
98
+ s - a - n * 2 - 1
116
99
  ),
117
- s + 2
118
- ), v = Math.min(
119
- Math.max(e + i, s + i * 2 + 2),
120
- n[0] - 2
121
- ), o = [...r];
122
- return p > s + 2 ? o.push("ellipsis-start") : s + 1 < a - s && o.push(s + 1), o.push(...w(p, v)), v < a - s - 1 ? o.push("ellipsis-end") : a - s > s && o.push(a - s), o.push(...n), o;
100
+ a + 2
101
+ ), h = Math.min(
102
+ Math.max(e + n, a + n * 2 + 2),
103
+ t[0] - 2
104
+ ), l = [...r];
105
+ return u > a + 2 ? l.push("ellipsis-start") : a + 1 < s - a && l.push(a + 1), l.push(...N(u, h)), h < s - a - 1 ? l.push("ellipsis-end") : s - a > a && l.push(s - a), l.push(...t), l;
123
106
  }
124
- const me = u(
107
+ const ce = g(
125
108
  ({
126
109
  totalPages: e,
127
- page: a,
128
- defaultPage: i = 1,
129
- onPageChange: s,
130
- siblingCount: d = 1,
110
+ page: s,
111
+ defaultPage: n = 1,
112
+ onPageChange: a,
113
+ siblingCount: o = 1,
131
114
  boundaryCount: r = 1,
132
- size: n = "md",
133
- showEndpoints: p = !1,
134
- align: v = "center",
135
- pageSize: o,
136
- useLocaleDigits: b = !1,
115
+ size: t = "md",
116
+ showEndpoints: u = !1,
117
+ align: h = "center",
118
+ pageSize: l,
119
+ useLocaleDigits: k = !1,
137
120
  locale: R,
138
121
  className: K,
139
- id: j,
122
+ id: y,
140
123
  ...O
141
124
  }, Q) => {
142
- const { t: S, i18n: C } = x(), [U, E] = de({
143
- value: a,
144
- defaultValue: i,
145
- onChange: s
146
- }), c = U ?? i;
147
- y(() => {
148
- a !== void 0 && i !== 1 && console.warn(
125
+ const { t: T, i18n: C } = b(), [U, M] = D({
126
+ value: s,
127
+ defaultValue: n,
128
+ onChange: a
129
+ }), c = U ?? n;
130
+ j(() => {
131
+ s !== void 0 && n !== 1 && console.warn(
149
132
  "[Pagination] Both `page` and `defaultPage` were supplied. The `page` prop wins; remove `defaultPage` for controlled usage."
150
133
  );
151
- }, [a, i]);
152
- const g = k(
153
- (l) => {
154
- const I = Math.min(Math.max(l, 1), Math.max(1, e));
155
- E(I);
134
+ }, [s, n]);
135
+ const p = V(
136
+ (d) => {
137
+ const P = Math.min(Math.max(d, 1), Math.max(1, e));
138
+ M(P);
156
139
  },
157
- [E, e]
158
- ), V = k(
159
- (l) => {
160
- if (!b) return String(l);
140
+ [M, e]
141
+ ), S = V(
142
+ (d) => {
143
+ if (!k) return String(d);
161
144
  try {
162
- return new Intl.NumberFormat(R ?? C.language).format(l);
145
+ return new Intl.NumberFormat(R ?? C.language).format(d);
163
146
  } catch {
164
- return String(l);
147
+ return String(d);
165
148
  }
166
149
  },
167
- [C.language, R, b]
168
- ), W = _(
169
- () => ce(c, e, d, r),
170
- [c, e, d, r]
171
- ), B = c <= 1, L = c >= e, N = z(c);
172
- y(() => {
173
- N.current = c;
150
+ [C.language, R, k]
151
+ ), W = A(
152
+ () => le(c, e, o, r),
153
+ [c, e, o, r]
154
+ ), E = c <= 1, B = c >= e, x = _(c);
155
+ j(() => {
156
+ x.current = c;
174
157
  }, [c]);
175
- const A = z(e);
176
- y(() => {
177
- A.current = e;
158
+ const L = _(e);
159
+ j(() => {
160
+ L.current = e;
178
161
  }, [e]);
179
- const X = _(
162
+ const X = A(
180
163
  () => ({
181
- getCurrentPage: () => N.current,
182
- getTotalPages: () => A.current,
183
- goToPage: (l) => g(l),
184
- next: () => g(N.current + 1),
185
- previous: () => g(N.current - 1)
164
+ getCurrentPage: () => x.current,
165
+ getTotalPages: () => L.current,
166
+ goToPage: (d) => p(d),
167
+ next: () => p(x.current + 1),
168
+ previous: () => p(x.current - 1)
186
169
  }),
187
- [g]
170
+ [p]
188
171
  );
189
- se(oe, X, j);
190
- const Y = v === "start" ? "ds:justify-start" : v === "end" ? "ds:justify-end" : "ds:justify-center";
191
- return /* @__PURE__ */ h(
172
+ se(de, X, y);
173
+ const Y = h === "start" ? "ds:justify-start" : h === "end" ? "ds:justify-end" : "ds:justify-center";
174
+ return /* @__PURE__ */ f(
192
175
  "nav",
193
176
  {
194
177
  ref: Q,
195
- "aria-label": S("navigation.pagination.label"),
196
- id: j,
178
+ "aria-label": T("navigation.pagination.label"),
179
+ id: y,
197
180
  "data-component": "pagination",
198
- "data-component-id": j,
181
+ "data-component-id": y,
199
182
  className: [
200
183
  "ds:flex ds:items-center",
201
184
  Y,
@@ -205,60 +188,60 @@ const me = u(
205
188
  ].filter(Boolean).join(" "),
206
189
  ...O,
207
190
  children: [
208
- /* @__PURE__ */ h(H, { size: n, children: [
209
- p ? /* @__PURE__ */ t(f, { children: /* @__PURE__ */ t(
210
- T,
191
+ /* @__PURE__ */ f(H, { size: t, children: [
192
+ u ? /* @__PURE__ */ i(v, { children: /* @__PURE__ */ i(
193
+ z,
211
194
  {
212
195
  type: "first",
213
- size: n,
214
- disabled: B,
215
- onClick: () => g(1)
196
+ size: t,
197
+ disabled: E,
198
+ onClick: () => p(1)
216
199
  }
217
200
  ) }) : null,
218
- /* @__PURE__ */ t(f, { children: /* @__PURE__ */ t(
201
+ /* @__PURE__ */ i(v, { children: /* @__PURE__ */ i(
219
202
  q,
220
203
  {
221
- size: n,
222
- disabled: B,
223
- onClick: () => g(c - 1)
204
+ size: t,
205
+ disabled: E,
206
+ onClick: () => p(c - 1)
224
207
  }
225
208
  ) }),
226
- W.map((l, I) => l === "ellipsis-start" || l === "ellipsis-end" ? /* @__PURE__ */ t(f, { children: /* @__PURE__ */ t(J, {}) }, `e-${I}`) : /* @__PURE__ */ t(f, { children: /* @__PURE__ */ t(
209
+ W.map((d, P) => d === "ellipsis-start" || d === "ellipsis-end" ? /* @__PURE__ */ i(v, { children: /* @__PURE__ */ i(J, {}) }, `e-${P}`) : /* @__PURE__ */ i(v, { children: /* @__PURE__ */ i(
227
210
  $,
228
211
  {
229
- size: n,
230
- isActive: l === c,
231
- "aria-label": S("navigation.pagination.pageN", { n: l }),
232
- onClick: () => g(l),
233
- children: V(l)
212
+ size: t,
213
+ isActive: d === c,
214
+ "aria-label": T("navigation.pagination.pageN", { n: d }),
215
+ onClick: () => p(d),
216
+ children: S(d)
234
217
  }
235
- ) }, `p-${l}`)),
236
- /* @__PURE__ */ t(f, { children: /* @__PURE__ */ t(
218
+ ) }, `p-${d}`)),
219
+ /* @__PURE__ */ i(v, { children: /* @__PURE__ */ i(
237
220
  G,
238
221
  {
239
- size: n,
240
- disabled: L,
241
- onClick: () => g(c + 1)
222
+ size: t,
223
+ disabled: B,
224
+ onClick: () => p(c + 1)
242
225
  }
243
226
  ) }),
244
- p ? /* @__PURE__ */ t(f, { children: /* @__PURE__ */ t(
245
- T,
227
+ u ? /* @__PURE__ */ i(v, { children: /* @__PURE__ */ i(
228
+ z,
246
229
  {
247
230
  type: "last",
248
- size: n,
249
- disabled: L,
250
- onClick: () => g(e)
231
+ size: t,
232
+ disabled: B,
233
+ onClick: () => p(e)
251
234
  }
252
235
  ) }) : null
253
236
  ] }),
254
- o ? /* @__PURE__ */ t(
255
- ve,
237
+ l ? /* @__PURE__ */ i(
238
+ ue,
256
239
  {
257
- size: n,
258
- value: o.value,
259
- options: o.options ?? [10, 25, 50, 100],
260
- onChange: o.onChange,
261
- formatNumber: V
240
+ size: t,
241
+ value: l.value,
242
+ options: l.options ?? [10, 25, 50, 100],
243
+ onChange: l.onChange,
244
+ formatNumber: S
262
245
  }
263
246
  ) : null
264
247
  ]
@@ -266,109 +249,109 @@ const me = u(
266
249
  );
267
250
  }
268
251
  );
269
- me.displayName = "Pagination";
270
- const H = u(
271
- ({ children: e, className: a, ...i }, s) => /* @__PURE__ */ t(
252
+ ce.displayName = "Pagination";
253
+ const H = g(
254
+ ({ children: e, className: s, ...n }, a) => /* @__PURE__ */ i(
272
255
  "ul",
273
256
  {
274
- ref: s,
257
+ ref: a,
275
258
  className: [
276
259
  "ds:flex ds:items-center",
277
260
  "ds:gap-[var(--spacing-xs)]",
278
261
  "ds:m-0 ds:ps-0",
279
262
  "ds:list-none",
280
- a ?? ""
263
+ s ?? ""
281
264
  ].filter(Boolean).join(" "),
282
- ...i,
265
+ ...n,
283
266
  children: e
284
267
  }
285
268
  )
286
269
  );
287
270
  H.displayName = "PaginationList";
288
- const f = u(
289
- ({ children: e, className: a, ...i }, s) => /* @__PURE__ */ t("li", { ref: s, className: a, ...i, children: e })
271
+ const v = g(
272
+ ({ children: e, className: s, ...n }, a) => /* @__PURE__ */ i("li", { ref: a, className: s, ...n, children: e })
290
273
  );
291
- f.displayName = "PaginationItem";
292
- const $ = u(
293
- ({ isActive: e = !1, size: a = "md", className: i, children: s, ...d }, r) => /* @__PURE__ */ t(
274
+ v.displayName = "PaginationItem";
275
+ const $ = g(
276
+ ({ isActive: e = !1, size: s = "md", className: n, children: a, ...o }, r) => /* @__PURE__ */ i(
294
277
  "button",
295
278
  {
296
279
  ref: r,
297
280
  type: "button",
298
281
  "aria-current": e ? "page" : void 0,
299
- className: P({
300
- size: a,
282
+ className: w({
283
+ size: s,
301
284
  active: e,
302
- className: i
285
+ className: n
303
286
  }),
304
- ...d,
305
- children: s
287
+ ...o,
288
+ children: a
306
289
  }
307
290
  )
308
291
  );
309
292
  $.displayName = "PaginationLink";
310
- const M = "ds:size-4 ds:rtl:-scale-x-100", q = u(
311
- ({ size: e = "md", disabled: a, onClick: i }, s) => {
312
- const { t: d } = x(), r = d("navigation.pagination.previous");
313
- return /* @__PURE__ */ t(
293
+ const I = "ds:size-4 ds:rtl:-scale-x-100", q = g(
294
+ ({ size: e = "md", disabled: s, onClick: n }, a) => {
295
+ const { t: o } = b(), r = o("navigation.pagination.previous");
296
+ return /* @__PURE__ */ i(
314
297
  "button",
315
298
  {
316
- ref: s,
299
+ ref: a,
317
300
  type: "button",
318
301
  "aria-label": r,
319
- "aria-disabled": a || void 0,
320
- disabled: a,
321
- onClick: i,
322
- className: P({ size: e }),
323
- children: /* @__PURE__ */ t(ie, { "aria-hidden": "true", className: M })
302
+ "aria-disabled": s || void 0,
303
+ disabled: s,
304
+ onClick: n,
305
+ className: w({ size: e }),
306
+ children: /* @__PURE__ */ i(ie, { "aria-hidden": "true", className: I })
324
307
  }
325
308
  );
326
309
  }
327
310
  );
328
311
  q.displayName = "PaginationPrevious";
329
- const G = u(
330
- ({ size: e = "md", disabled: a, onClick: i }, s) => {
331
- const { t: d } = x(), r = d("navigation.pagination.next");
332
- return /* @__PURE__ */ t(
312
+ const G = g(
313
+ ({ size: e = "md", disabled: s, onClick: n }, a) => {
314
+ const { t: o } = b(), r = o("navigation.pagination.next");
315
+ return /* @__PURE__ */ i(
333
316
  "button",
334
317
  {
335
- ref: s,
318
+ ref: a,
336
319
  type: "button",
337
320
  "aria-label": r,
338
- "aria-disabled": a || void 0,
339
- disabled: a,
340
- onClick: i,
341
- className: P({ size: e }),
342
- children: /* @__PURE__ */ t(F, { "aria-hidden": "true", className: M })
321
+ "aria-disabled": s || void 0,
322
+ disabled: s,
323
+ onClick: n,
324
+ className: w({ size: e }),
325
+ children: /* @__PURE__ */ i(F, { "aria-hidden": "true", className: I })
343
326
  }
344
327
  );
345
328
  }
346
329
  );
347
330
  G.displayName = "PaginationNext";
348
- const T = u(
349
- ({ type: e, size: a = "md", disabled: i, onClick: s }, d) => {
350
- const { t: r } = x(), n = r(e === "first" ? "navigation.pagination.first" : "navigation.pagination.last"), p = e === "first" ? te : ne;
351
- return /* @__PURE__ */ t(
331
+ const z = g(
332
+ ({ type: e, size: s = "md", disabled: n, onClick: a }, o) => {
333
+ const { t: r } = b(), t = r(e === "first" ? "navigation.pagination.first" : "navigation.pagination.last"), u = e === "first" ? ne : te;
334
+ return /* @__PURE__ */ i(
352
335
  "button",
353
336
  {
354
- ref: d,
337
+ ref: o,
355
338
  type: "button",
356
- "aria-label": n,
357
- "aria-disabled": i || void 0,
358
- disabled: i,
359
- onClick: s,
360
- className: P({ size: a }),
361
- children: /* @__PURE__ */ t(p, { "aria-hidden": "true", className: M })
339
+ "aria-label": t,
340
+ "aria-disabled": n || void 0,
341
+ disabled: n,
342
+ onClick: a,
343
+ className: w({ size: s }),
344
+ children: /* @__PURE__ */ i(u, { "aria-hidden": "true", className: I })
362
345
  }
363
346
  );
364
347
  }
365
348
  );
366
- T.displayName = "PaginationEndpoint";
367
- const J = u(
368
- ({ className: e, ...a }, i) => /* @__PURE__ */ t(
349
+ z.displayName = "PaginationEndpoint";
350
+ const J = g(
351
+ ({ className: e, ...s }, n) => /* @__PURE__ */ i(
369
352
  "span",
370
353
  {
371
- ref: i,
354
+ ref: n,
372
355
  "aria-hidden": "true",
373
356
  role: "presentation",
374
357
  className: [
@@ -377,13 +360,13 @@ const J = u(
377
360
  "ds:text-[var(--muted-foreground)]",
378
361
  e ?? ""
379
362
  ].filter(Boolean).join(" "),
380
- ...a,
381
- children: /* @__PURE__ */ t(ae, { "aria-hidden": "true", className: "ds:size-4" })
363
+ ...s,
364
+ children: /* @__PURE__ */ i(ae, { "aria-hidden": "true", className: "ds:size-4" })
382
365
  }
383
366
  )
384
367
  );
385
368
  J.displayName = "PaginationEllipsis";
386
- const pe = [
369
+ const me = [
387
370
  "ds:inline-flex ds:items-center ds:justify-between ds:gap-[var(--spacing-xs)]",
388
371
  "ds:rounded-[var(--radius-sm)] ds:border ds:border-[var(--border)] ds:bg-[var(--background)]",
389
372
  "ds:text-[var(--foreground)]",
@@ -392,13 +375,13 @@ const pe = [
392
375
  "ds:text-[var(--font-size-sm)]",
393
376
  "ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
394
377
  "ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]"
395
- ].join(" "), ge = [
378
+ ].join(" "), pe = [
396
379
  "ds:z-[var(--z-dropdown)] ds:overflow-hidden",
397
380
  "ds:rounded-[var(--radius-md)] ds:border ds:border-[var(--border)]",
398
381
  "ds:bg-[var(--background)] ds:text-[var(--foreground)]",
399
382
  "ds:shadow-[var(--shadow-lg)]",
400
383
  "ds:animate-in ds:fade-in ds:zoom-in-95 ds:motion-reduce:animate-none"
401
- ].join(" "), ue = [
384
+ ].join(" "), ge = [
402
385
  "ds:relative ds:flex ds:cursor-pointer ds:items-center",
403
386
  "ds:min-h-[var(--min-target-size)]",
404
387
  "ds:ps-[var(--spacing-xl)] ds:pe-[var(--spacing-sm)]",
@@ -407,36 +390,36 @@ const pe = [
407
390
  "ds:data-[highlighted]:bg-[var(--muted)]/20",
408
391
  "ds:data-[disabled]:pointer-events-none ds:data-[disabled]:opacity-50"
409
392
  ].join(" ");
410
- function ve({
393
+ function ue({
411
394
  value: e,
412
- options: a,
413
- onChange: i,
414
- formatNumber: s
395
+ options: s,
396
+ onChange: n,
397
+ formatNumber: a
415
398
  }) {
416
- const { t: d } = x(), r = D();
417
- return /* @__PURE__ */ h("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
418
- /* @__PURE__ */ t(
399
+ const { t: o } = b(), r = Z();
400
+ return /* @__PURE__ */ f("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
401
+ /* @__PURE__ */ i(
419
402
  "span",
420
403
  {
421
404
  id: r,
422
405
  className: "type-label ds:text-[var(--muted-foreground)]",
423
- children: d("navigation.pagination.rowsPerPage")
406
+ children: o("navigation.pagination.rowsPerPage")
424
407
  }
425
408
  ),
426
- /* @__PURE__ */ h(
409
+ /* @__PURE__ */ f(
427
410
  m.Root,
428
411
  {
429
412
  value: String(e),
430
- onValueChange: (n) => i(Number(n)),
413
+ onValueChange: (t) => n(Number(t)),
431
414
  children: [
432
- /* @__PURE__ */ h(
415
+ /* @__PURE__ */ f(
433
416
  m.Trigger,
434
417
  {
435
418
  "aria-labelledby": r,
436
- className: pe,
419
+ className: me,
437
420
  children: [
438
- /* @__PURE__ */ t(m.Value, {}),
439
- /* @__PURE__ */ t(m.Icon, { asChild: !0, children: /* @__PURE__ */ t(
421
+ /* @__PURE__ */ i(m.Value, {}),
422
+ /* @__PURE__ */ i(m.Icon, { asChild: !0, children: /* @__PURE__ */ i(
440
423
  F,
441
424
  {
442
425
  "aria-hidden": "true",
@@ -446,22 +429,22 @@ function ve({
446
429
  ]
447
430
  }
448
431
  ),
449
- /* @__PURE__ */ t(m.Portal, { children: /* @__PURE__ */ t(
432
+ /* @__PURE__ */ i(m.Portal, { children: /* @__PURE__ */ i(
450
433
  m.Content,
451
434
  {
452
- className: ge,
435
+ className: pe,
453
436
  position: "popper",
454
- children: /* @__PURE__ */ t(m.Viewport, { className: "ds:p-[var(--spacing-xs)]", children: a.map((n) => /* @__PURE__ */ h(
437
+ children: /* @__PURE__ */ i(m.Viewport, { className: "ds:p-[var(--spacing-xs)]", children: s.map((t) => /* @__PURE__ */ f(
455
438
  m.Item,
456
439
  {
457
- value: String(n),
458
- className: ue,
440
+ value: String(t),
441
+ className: ge,
459
442
  children: [
460
- /* @__PURE__ */ t(m.ItemIndicator, { className: "ds:absolute ds:inline-flex ds:items-center ds:justify-center ds:start-[var(--spacing-sm)]", children: /* @__PURE__ */ t(re, { "aria-hidden": "true", className: "ds:size-3.5" }) }),
461
- /* @__PURE__ */ t(m.ItemText, { children: s(n) })
443
+ /* @__PURE__ */ i(m.ItemIndicator, { className: "ds:absolute ds:inline-flex ds:items-center ds:justify-center ds:start-[var(--spacing-sm)]", children: /* @__PURE__ */ i(re, { "aria-hidden": "true", className: "ds:size-3.5" }) }),
444
+ /* @__PURE__ */ i(m.ItemText, { children: a(t) })
462
445
  ]
463
446
  },
464
- n
447
+ t
465
448
  )) })
466
449
  }
467
450
  ) })
@@ -471,14 +454,14 @@ function ve({
471
454
  ] });
472
455
  }
473
456
  export {
474
- me as P,
457
+ ce as P,
475
458
  J as a,
476
- f as b,
459
+ v as b,
477
460
  $ as c,
478
461
  H as d,
479
462
  G as e,
480
463
  q as f,
481
- ce as g,
482
- oe as p
464
+ le as g,
465
+ de as p
483
466
  };
484
- //# sourceMappingURL=pagination-F1ei4khE.js.map
467
+ //# sourceMappingURL=pagination-BWaXF7W0.js.map