ivt 0.3.6 → 0.3.7

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 (156) hide show
  1. package/dist/accordion/index.mjs +14 -14
  2. package/dist/alert/index.mjs +2 -2
  3. package/dist/alert-dialog/index.mjs +16 -16
  4. package/dist/avatar/index.mjs +7 -7
  5. package/dist/badge/index.mjs +3 -3
  6. package/dist/base/index.d.ts +21 -10
  7. package/dist/base/index.mjs +150 -55
  8. package/dist/base/index.mjs.map +1 -1
  9. package/dist/button/index.mjs +3 -3
  10. package/dist/calendar/index.mjs +8 -8
  11. package/dist/card/index.mjs +2 -2
  12. package/dist/chart/index.mjs +4 -4
  13. package/dist/checkbox/index.mjs +13 -13
  14. package/dist/chunks/{_commonjsHelpers-DKISyIRi.mjs → _commonjsHelpers-BofMKl1o.mjs} +1 -1
  15. package/dist/chunks/_commonjsHelpers-BofMKl1o.mjs.map +1 -0
  16. package/dist/chunks/{accordion-DISpV98f.mjs → accordion-D4jYKlrs.mjs} +12 -12
  17. package/dist/chunks/{accordion-DISpV98f.mjs.map → accordion-D4jYKlrs.mjs.map} +1 -1
  18. package/dist/chunks/{badge-CT_hmjd2.mjs → badge-CTyBP2up.mjs} +2 -2
  19. package/dist/chunks/{badge-CT_hmjd2.mjs.map → badge-CTyBP2up.mjs.map} +1 -1
  20. package/dist/chunks/{bundle-mjs-CS-QKnOm.mjs → bundle-mjs-CUZdzyWH.mjs} +1 -1
  21. package/dist/chunks/{bundle-mjs-CS-QKnOm.mjs.map → bundle-mjs-CUZdzyWH.mjs.map} +1 -1
  22. package/dist/chunks/{button-BHeYV17S.mjs → button-ITSALNG-.mjs} +2 -2
  23. package/dist/chunks/{button-BHeYV17S.mjs.map → button-ITSALNG-.mjs.map} +1 -1
  24. package/dist/chunks/{calendar-CU6HdJET.mjs → calendar-te6J8SSV.mjs} +6 -6
  25. package/dist/chunks/{calendar-CU6HdJET.mjs.map → calendar-te6J8SSV.mjs.map} +1 -1
  26. package/dist/chunks/{check-B3pXhibW.mjs → check-CdNBvGBU.mjs} +2 -2
  27. package/dist/chunks/{check-B3pXhibW.mjs.map → check-CdNBvGBU.mjs.map} +1 -1
  28. package/dist/chunks/{chevron-down-BV5gvmUW.mjs → chevron-down-BpAcffl9.mjs} +2 -2
  29. package/dist/chunks/{chevron-down-BV5gvmUW.mjs.map → chevron-down-BpAcffl9.mjs.map} +1 -1
  30. package/dist/chunks/{chevron-left-BjGcH2KQ.mjs → chevron-left-0PeYgPel.mjs} +2 -2
  31. package/dist/chunks/{chevron-left-BjGcH2KQ.mjs.map → chevron-left-0PeYgPel.mjs.map} +1 -1
  32. package/dist/chunks/{chevron-right-DmZu0xvo.mjs → chevron-right-D8wrRolZ.mjs} +2 -2
  33. package/dist/chunks/{chevron-right-DmZu0xvo.mjs.map → chevron-right-D8wrRolZ.mjs.map} +1 -1
  34. package/dist/chunks/{chevrons-up-down-COuCmfU7.mjs → chevrons-up-down-DI24o-Kr.mjs} +2 -2
  35. package/dist/chunks/{chevrons-up-down-COuCmfU7.mjs.map → chevrons-up-down-DI24o-Kr.mjs.map} +1 -1
  36. package/dist/chunks/{circle-BKsPjIbw.mjs → circle-CWl_-B5R.mjs} +2 -2
  37. package/dist/chunks/{circle-BKsPjIbw.mjs.map → circle-CWl_-B5R.mjs.map} +1 -1
  38. package/dist/chunks/{command-CUWr3X1X.mjs → command-DBroTbBI.mjs} +8 -8
  39. package/dist/chunks/{command-CUWr3X1X.mjs.map → command-DBroTbBI.mjs.map} +1 -1
  40. package/dist/chunks/{createLucideIcon-BSP_Jxu-.mjs → createLucideIcon-DaWLnx8c.mjs} +1 -1
  41. package/dist/chunks/{createLucideIcon-BSP_Jxu-.mjs.map → createLucideIcon-DaWLnx8c.mjs.map} +1 -1
  42. package/dist/chunks/{dialog-zZCazow7.mjs → dialog-BPTAvhJ7.mjs} +4 -4
  43. package/dist/chunks/{dialog-zZCazow7.mjs.map → dialog-BPTAvhJ7.mjs.map} +1 -1
  44. package/dist/chunks/{hover-card-ssfyy6SY.mjs → hover-card-D2QRCyS5.mjs} +10 -10
  45. package/dist/chunks/{hover-card-ssfyy6SY.mjs.map → hover-card-D2QRCyS5.mjs.map} +1 -1
  46. package/dist/chunks/{index-DrnQ43fz.mjs → index-2QyQcI1p.mjs} +2 -2
  47. package/dist/chunks/{index-DrnQ43fz.mjs.map → index-2QyQcI1p.mjs.map} +1 -1
  48. package/dist/chunks/{index-Bl6nVRXe.mjs → index-BAVBAIxD.mjs} +1 -1
  49. package/dist/chunks/{index-Bl6nVRXe.mjs.map → index-BAVBAIxD.mjs.map} +1 -1
  50. package/dist/chunks/{index-BwQDLVf8.mjs → index-BG6Lp2cj.mjs} +1 -1
  51. package/dist/chunks/{index-BwQDLVf8.mjs.map → index-BG6Lp2cj.mjs.map} +1 -1
  52. package/dist/chunks/{index-DIBl7n6R.mjs → index-BSypXZId.mjs} +3 -3
  53. package/dist/chunks/{index-DIBl7n6R.mjs.map → index-BSypXZId.mjs.map} +1 -1
  54. package/dist/chunks/{index-B1VVz0MP.mjs → index-BVN6aKci.mjs} +6 -6
  55. package/dist/chunks/{index-B1VVz0MP.mjs.map → index-BVN6aKci.mjs.map} +1 -1
  56. package/dist/chunks/{index-Dulm0stf.mjs → index-BYi44B54.mjs} +1 -1
  57. package/dist/chunks/{index-Dulm0stf.mjs.map → index-BYi44B54.mjs.map} +1 -1
  58. package/dist/chunks/{index-CZ7Wntp7.mjs → index-Bf8RwfEV.mjs} +1 -1
  59. package/dist/chunks/{index-CZ7Wntp7.mjs.map → index-Bf8RwfEV.mjs.map} +1 -1
  60. package/dist/chunks/{index-DRk0bB4A.mjs → index-C5AVHM9_.mjs} +9 -9
  61. package/dist/chunks/{index-DRk0bB4A.mjs.map → index-C5AVHM9_.mjs.map} +1 -1
  62. package/dist/chunks/{index-BZyzz9k8.mjs → index-Cm4bfE9_.mjs} +1 -1
  63. package/dist/chunks/{index-BZyzz9k8.mjs.map → index-Cm4bfE9_.mjs.map} +1 -1
  64. package/dist/chunks/{index-fWnSEyU5.mjs → index-Ct-DPULS.mjs} +1 -1
  65. package/dist/chunks/{index-fWnSEyU5.mjs.map → index-Ct-DPULS.mjs.map} +1 -1
  66. package/dist/chunks/{index-tNc5GmLL.mjs → index-CuzH07Qd.mjs} +2 -2
  67. package/dist/chunks/{index-tNc5GmLL.mjs.map → index-CuzH07Qd.mjs.map} +1 -1
  68. package/dist/chunks/{index-BOOPeiVs.mjs → index-D06B5rqh.mjs} +2 -2
  69. package/dist/chunks/{index-BOOPeiVs.mjs.map → index-D06B5rqh.mjs.map} +1 -1
  70. package/dist/chunks/{index-Bgiaprdv.mjs → index-DAFIXHvj.mjs} +1 -1
  71. package/dist/chunks/{index-Bgiaprdv.mjs.map → index-DAFIXHvj.mjs.map} +1 -1
  72. package/dist/chunks/{index-BFDafXar.mjs → index-DIiHm1mS.mjs} +7 -7
  73. package/dist/chunks/{index-BFDafXar.mjs.map → index-DIiHm1mS.mjs.map} +1 -1
  74. package/dist/chunks/{index-3XcV7C7l.mjs → index-DM8LSsqF.mjs} +10 -10
  75. package/dist/chunks/{index-3XcV7C7l.mjs.map → index-DM8LSsqF.mjs.map} +1 -1
  76. package/dist/chunks/{index-DUFr75Kc.mjs → index-DOjBg0lm.mjs} +2 -2
  77. package/dist/chunks/{index-DUFr75Kc.mjs.map → index-DOjBg0lm.mjs.map} +1 -1
  78. package/dist/chunks/{index-D1yPZAOL.mjs → index-DzefHZGo.mjs} +1 -1
  79. package/dist/chunks/{index-D1yPZAOL.mjs.map → index-DzefHZGo.mjs.map} +1 -1
  80. package/dist/chunks/{index-CHyZo-Tj.mjs → index-E3p9x3ha.mjs} +5 -5
  81. package/dist/chunks/{index-CHyZo-Tj.mjs.map → index-E3p9x3ha.mjs.map} +1 -1
  82. package/dist/chunks/{index-BF_TaONY.mjs → index-K8qCMx0M.mjs} +13 -13
  83. package/dist/chunks/{index-BF_TaONY.mjs.map → index-K8qCMx0M.mjs.map} +1 -1
  84. package/dist/chunks/{index-BYijxgZz.mjs → index-gjSvM_n5.mjs} +1 -1
  85. package/dist/chunks/{index-BYijxgZz.mjs.map → index-gjSvM_n5.mjs.map} +1 -1
  86. package/dist/chunks/{input-D9-FhnGc.mjs → input-60H675-j.mjs} +2 -2
  87. package/dist/chunks/{input-D9-FhnGc.mjs.map → input-60H675-j.mjs.map} +1 -1
  88. package/dist/chunks/{label-CiJcd2F9.mjs → label-7JVgKXB9.mjs} +3 -3
  89. package/dist/chunks/{label-CiJcd2F9.mjs.map → label-7JVgKXB9.mjs.map} +1 -1
  90. package/dist/chunks/{pagination-SOhqOW7I.mjs → pagination-BJ-DX4sN.mjs} +6 -6
  91. package/dist/chunks/{pagination-SOhqOW7I.mjs.map → pagination-BJ-DX4sN.mjs.map} +1 -1
  92. package/dist/chunks/{popover-CtxxPI-t.mjs → popover-olTzpq2V.mjs} +12 -12
  93. package/dist/chunks/{popover-CtxxPI-t.mjs.map → popover-olTzpq2V.mjs.map} +1 -1
  94. package/dist/chunks/{progress-WrZK6klx.mjs → progress-BECdNMG6.mjs} +4 -4
  95. package/dist/chunks/{progress-WrZK6klx.mjs.map → progress-BECdNMG6.mjs.map} +1 -1
  96. package/dist/chunks/{scroll-area-BVyyR0Km.mjs → scroll-area-D7Zqmap9.mjs} +10 -10
  97. package/dist/chunks/{scroll-area-BVyyR0Km.mjs.map → scroll-area-D7Zqmap9.mjs.map} +1 -1
  98. package/dist/chunks/{select-COGYOg3A.mjs → select-DfXpJK4z.mjs} +5 -5
  99. package/dist/chunks/{select-COGYOg3A.mjs.map → select-DfXpJK4z.mjs.map} +1 -1
  100. package/dist/chunks/{separator-D6Y96f4g.mjs → separator-CZMiBPx2.mjs} +3 -3
  101. package/dist/chunks/{separator-D6Y96f4g.mjs.map → separator-CZMiBPx2.mjs.map} +1 -1
  102. package/dist/chunks/{skeleton-CRfBAk8U.mjs → skeleton-B0qUp0Fk.mjs} +2 -2
  103. package/dist/chunks/{skeleton-CRfBAk8U.mjs.map → skeleton-B0qUp0Fk.mjs.map} +1 -1
  104. package/dist/chunks/{sortable-tiuZWf3S.mjs → sortable-CoyZorqY.mjs} +3 -3
  105. package/dist/chunks/{sortable-tiuZWf3S.mjs.map → sortable-CoyZorqY.mjs.map} +1 -1
  106. package/dist/chunks/{table-BlTF56Yn.mjs → table-qksvbWHh.mjs} +2 -2
  107. package/dist/chunks/{table-BlTF56Yn.mjs.map → table-qksvbWHh.mjs.map} +1 -1
  108. package/dist/chunks/{toggle-D5tCYA7L.mjs → toggle-CnZtg7xI.mjs} +5 -5
  109. package/dist/chunks/{toggle-D5tCYA7L.mjs.map → toggle-CnZtg7xI.mjs.map} +1 -1
  110. package/dist/chunks/{tooltip-DgNjTTxv.mjs → tooltip-VUTOmzzi.mjs} +12 -12
  111. package/dist/chunks/{tooltip-DgNjTTxv.mjs.map → tooltip-VUTOmzzi.mjs.map} +1 -1
  112. package/dist/chunks/{tslib.es6-O3UsmxNe.mjs → tslib.es6-CkprbAX-.mjs} +1 -1
  113. package/dist/chunks/{tslib.es6-O3UsmxNe.mjs.map → tslib.es6-CkprbAX-.mjs.map} +1 -1
  114. package/dist/chunks/{utils-tbIgc9YG.mjs → utils-DclPBFuL.mjs} +2 -2
  115. package/dist/chunks/{utils-tbIgc9YG.mjs.map → utils-DclPBFuL.mjs.map} +1 -1
  116. package/dist/chunks/{x-5oL4uC6I.mjs → x-B3TwCgfa.mjs} +2 -2
  117. package/dist/chunks/{x-5oL4uC6I.mjs.map → x-B3TwCgfa.mjs.map} +1 -1
  118. package/dist/combobox/index.mjs +25 -25
  119. package/dist/command/index.mjs +19 -19
  120. package/dist/data-table/index.mjs +33 -33
  121. package/dist/dialog/index.mjs +18 -18
  122. package/dist/dropdown-menu/index.mjs +23 -23
  123. package/dist/dropzone/index.mjs +17 -17
  124. package/dist/form/index.mjs +4 -4
  125. package/dist/hover-card/index.mjs +14 -14
  126. package/dist/icon/index.d.ts +1 -0
  127. package/dist/icon/index.mjs +25 -2
  128. package/dist/icon/index.mjs.map +1 -1
  129. package/dist/index.css +1 -1
  130. package/dist/input/index.mjs +3 -3
  131. package/dist/ivt.css +1 -1
  132. package/dist/label/index.mjs +4 -4
  133. package/dist/layout/index.d.ts +36 -0
  134. package/dist/layout/index.mjs +85 -0
  135. package/dist/layout/index.mjs.map +1 -0
  136. package/dist/menubar/index.mjs +23 -23
  137. package/dist/multi-select/index.mjs +29 -29
  138. package/dist/pagination/index.mjs +7 -7
  139. package/dist/popover/index.mjs +17 -17
  140. package/dist/progress/index.mjs +5 -5
  141. package/dist/radio-group/index.mjs +17 -17
  142. package/dist/scroll-area/index.mjs +11 -11
  143. package/dist/select/index.mjs +6 -6
  144. package/dist/separator/index.mjs +4 -4
  145. package/dist/sheet/index.mjs +17 -17
  146. package/dist/skeleton/index.mjs +3 -3
  147. package/dist/sortable/index.mjs +4 -4
  148. package/dist/table/index.mjs +3 -3
  149. package/dist/tabs/index.mjs +13 -13
  150. package/dist/textarea/index.mjs +2 -2
  151. package/dist/toast/index.mjs +14 -14
  152. package/dist/toggle/index.mjs +7 -7
  153. package/dist/toggle-group/index.mjs +13 -13
  154. package/dist/tooltip/index.mjs +16 -16
  155. package/package.json +5 -1
  156. package/dist/chunks/_commonjsHelpers-DKISyIRi.mjs.map +0 -1
@@ -1,20 +1,20 @@
1
- export { A as Accordion, c as AccordionContent, a as AccordionItem, b as AccordionTrigger } from '../chunks/accordion-DISpV98f.mjs';
2
- import '../chunks/utils-tbIgc9YG.mjs';
3
- import '../chunks/bundle-mjs-CS-QKnOm.mjs';
1
+ export { A as Accordion, c as AccordionContent, a as AccordionItem, b as AccordionTrigger } from '../chunks/accordion-D4jYKlrs.mjs';
2
+ import '../chunks/utils-DclPBFuL.mjs';
3
+ import '../chunks/bundle-mjs-CUZdzyWH.mjs';
4
4
  import 'react';
5
- import '../chunks/index-Bl6nVRXe.mjs';
5
+ import '../chunks/index-BAVBAIxD.mjs';
6
6
  import 'react/jsx-runtime';
7
7
  import '@radix-ui/react-collection';
8
- import '../chunks/index-BZyzz9k8.mjs';
9
- import '../chunks/index-BYijxgZz.mjs';
10
- import '../chunks/index-DUFr75Kc.mjs';
11
- import '../chunks/index-Bgiaprdv.mjs';
12
- import '../chunks/index-fWnSEyU5.mjs';
8
+ import '../chunks/index-Cm4bfE9_.mjs';
9
+ import '../chunks/index-gjSvM_n5.mjs';
10
+ import '../chunks/index-DOjBg0lm.mjs';
11
+ import '../chunks/index-DAFIXHvj.mjs';
12
+ import '../chunks/index-Ct-DPULS.mjs';
13
13
  import 'react-dom';
14
14
  import '@radix-ui/react-slot';
15
- import '../chunks/index-DIBl7n6R.mjs';
16
- import '../chunks/index-DrnQ43fz.mjs';
17
- import '../chunks/index-Dulm0stf.mjs';
18
- import '../chunks/chevron-down-BV5gvmUW.mjs';
19
- import '../chunks/createLucideIcon-BSP_Jxu-.mjs';
15
+ import '../chunks/index-BSypXZId.mjs';
16
+ import '../chunks/index-2QyQcI1p.mjs';
17
+ import '../chunks/index-BYi44B54.mjs';
18
+ import '../chunks/chevron-down-BpAcffl9.mjs';
19
+ import '../chunks/createLucideIcon-DaWLnx8c.mjs';
20
20
  //# sourceMappingURL=index.mjs.map
@@ -1,7 +1,7 @@
1
- import { c as cn } from '../chunks/utils-tbIgc9YG.mjs';
1
+ import { c as cn } from '../chunks/utils-DclPBFuL.mjs';
2
2
  import { cva } from 'class-variance-authority';
3
3
  import React__default from 'react';
4
- import '../chunks/bundle-mjs-CS-QKnOm.mjs';
4
+ import '../chunks/bundle-mjs-CUZdzyWH.mjs';
5
5
 
6
6
  const alertVariants = cva("relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current", {
7
7
  variants: {
@@ -1,23 +1,23 @@
1
1
  import * as React from 'react';
2
- import { c as createContextScope } from '../chunks/index-Bl6nVRXe.mjs';
3
- import { u as useComposedRefs } from '../chunks/index-BZyzz9k8.mjs';
4
- import { c as createDialogScope, R as Root, P as Portal, O as Overlay, b as Trigger, W as WarningProvider, a as Content, T as Title, D as Description, C as Close } from '../chunks/index-3XcV7C7l.mjs';
5
- import { c as composeEventHandlers } from '../chunks/index-BYijxgZz.mjs';
2
+ import { c as createContextScope } from '../chunks/index-BAVBAIxD.mjs';
3
+ import { u as useComposedRefs } from '../chunks/index-Cm4bfE9_.mjs';
4
+ import { c as createDialogScope, R as Root, P as Portal, O as Overlay, b as Trigger, W as WarningProvider, a as Content, T as Title, D as Description, C as Close } from '../chunks/index-DM8LSsqF.mjs';
5
+ import { c as composeEventHandlers } from '../chunks/index-gjSvM_n5.mjs';
6
6
  import { createSlottable } from '@radix-ui/react-slot';
7
7
  import { jsx, jsxs } from 'react/jsx-runtime';
8
- import { c as cn } from '../chunks/utils-tbIgc9YG.mjs';
9
- import { b as buttonVariants } from '../chunks/button-BHeYV17S.mjs';
10
- import '../chunks/index-DrnQ43fz.mjs';
11
- import '../chunks/index-Bgiaprdv.mjs';
12
- import '../chunks/index-DUFr75Kc.mjs';
13
- import '../chunks/index-B1VVz0MP.mjs';
14
- import '../chunks/index-fWnSEyU5.mjs';
8
+ import { c as cn } from '../chunks/utils-DclPBFuL.mjs';
9
+ import { b as buttonVariants } from '../chunks/button-ITSALNG-.mjs';
10
+ import '../chunks/index-2QyQcI1p.mjs';
11
+ import '../chunks/index-DAFIXHvj.mjs';
12
+ import '../chunks/index-DOjBg0lm.mjs';
13
+ import '../chunks/index-BVN6aKci.mjs';
14
+ import '../chunks/index-Ct-DPULS.mjs';
15
15
  import 'react-dom';
16
- import '../chunks/index-D1yPZAOL.mjs';
17
- import '../chunks/index-CHyZo-Tj.mjs';
18
- import '../chunks/tslib.es6-O3UsmxNe.mjs';
19
- import '../chunks/index-DIBl7n6R.mjs';
20
- import '../chunks/bundle-mjs-CS-QKnOm.mjs';
16
+ import '../chunks/index-DzefHZGo.mjs';
17
+ import '../chunks/index-E3p9x3ha.mjs';
18
+ import '../chunks/tslib.es6-CkprbAX-.mjs';
19
+ import '../chunks/index-BSypXZId.mjs';
20
+ import '../chunks/bundle-mjs-CUZdzyWH.mjs';
21
21
  import 'class-variance-authority';
22
22
 
23
23
  var ROOT_NAME = "AlertDialog";
@@ -1,14 +1,14 @@
1
1
  import * as React from 'react';
2
- import { c as createContextScope } from '../chunks/index-Bl6nVRXe.mjs';
3
- import { u as useCallbackRef } from '../chunks/index-D1yPZAOL.mjs';
4
- import { u as useLayoutEffect2 } from '../chunks/index-Bgiaprdv.mjs';
5
- import { P as Primitive } from '../chunks/index-fWnSEyU5.mjs';
6
- import { r as requireShim } from '../chunks/index-BwQDLVf8.mjs';
2
+ import { c as createContextScope } from '../chunks/index-BAVBAIxD.mjs';
3
+ import { u as useCallbackRef } from '../chunks/index-DzefHZGo.mjs';
4
+ import { u as useLayoutEffect2 } from '../chunks/index-DAFIXHvj.mjs';
5
+ import { P as Primitive } from '../chunks/index-Ct-DPULS.mjs';
6
+ import { r as requireShim } from '../chunks/index-BG6Lp2cj.mjs';
7
7
  import { jsx } from 'react/jsx-runtime';
8
- import { c as cn } from '../chunks/utils-tbIgc9YG.mjs';
8
+ import { c as cn } from '../chunks/utils-DclPBFuL.mjs';
9
9
  import 'react-dom';
10
10
  import '@radix-ui/react-slot';
11
- import '../chunks/bundle-mjs-CS-QKnOm.mjs';
11
+ import '../chunks/bundle-mjs-CUZdzyWH.mjs';
12
12
 
13
13
  var shimExports = requireShim();
14
14
 
@@ -1,6 +1,6 @@
1
- export { B as Badge, b as badgeVariants } from '../chunks/badge-CT_hmjd2.mjs';
2
- import '../chunks/utils-tbIgc9YG.mjs';
3
- import '../chunks/bundle-mjs-CS-QKnOm.mjs';
1
+ export { B as Badge, b as badgeVariants } from '../chunks/badge-CTyBP2up.mjs';
2
+ import '../chunks/utils-DclPBFuL.mjs';
3
+ import '../chunks/bundle-mjs-CUZdzyWH.mjs';
4
4
  import '@radix-ui/react-slot';
5
5
  import 'class-variance-authority';
6
6
  import 'react';
@@ -67,21 +67,32 @@ type CalendarRangeProps = {
67
67
  };
68
68
  declare function CalendarRange({ value, onChange, placeholder, id, buttonProps, buttonClassName, popoverProps, popoverContentClassName, numberOfMonths, fromYear, toYear, toDate, className, disabled, }: CalendarRangeProps): react_jsx_runtime.JSX.Element;
69
69
 
70
- interface Option {
71
- id: number;
72
- label: string;
73
- }
74
- interface AutoCompleteProps {
75
- value: string;
76
- onChange: (value: string) => void;
70
+ interface AutoCompleteProps<T> {
71
+ value: T | null;
72
+ onChange: (value: T | null) => void;
77
73
  placeholder?: string;
78
74
  searchPlaceholder?: string;
79
75
  open: boolean;
80
76
  onOpenChange: (open: boolean) => void;
81
77
  disabled?: boolean;
82
78
  messageEmpty?: string;
83
- fetchOptions: (term: string) => Promise<Option[]>;
79
+ fetchOptions: (term: string) => Promise<T[]>;
80
+ getOptionLabel: (option: T) => string;
81
+ getOptionKey: (option: T) => string | number;
82
+ onSelect?: (option: T) => void;
83
+ className?: string;
84
+ }
85
+ declare function AutoComplete<T>({ value, onChange, placeholder, searchPlaceholder, open, onOpenChange, disabled, messageEmpty, fetchOptions, getOptionLabel, getOptionKey, onSelect, className, }: AutoCompleteProps<T>): react_jsx_runtime.JSX.Element;
86
+
87
+ interface DeleteConfirmationModalProps {
88
+ onConfirm: () => Promise<void> | void;
89
+ title?: string;
90
+ description?: string;
91
+ confirmText?: string;
92
+ cancelText?: string;
93
+ disabled?: boolean;
94
+ children?: React__default.ReactNode;
84
95
  }
85
- declare function AutoComplete({ value, onChange, placeholder, searchPlaceholder, open, onOpenChange, disabled, messageEmpty, fetchOptions, }: AutoCompleteProps): react_jsx_runtime.JSX.Element;
96
+ declare function DeleteConfirmationModal({ onConfirm, title, description, confirmText, cancelText, disabled, children, }: DeleteConfirmationModalProps): react_jsx_runtime.JSX.Element;
86
97
 
87
- export { AutoComplete, CalendarPopover, CalendarRange, Header, HoverBadge, TextWrap, normalizeDate };
98
+ export { AutoComplete, CalendarPopover, CalendarRange, DeleteConfirmationModal, Header, HoverBadge, TextWrap, normalizeDate };
@@ -1,45 +1,45 @@
1
- import { c as cn } from '../chunks/utils-tbIgc9YG.mjs';
1
+ import { c as cn } from '../chunks/utils-DclPBFuL.mjs';
2
2
  import * as React from 'react';
3
3
  import React__default, { useRef, useEffect, useMemo } from 'react';
4
- import { A as Accordion, a as AccordionItem, b as AccordionTrigger, c as AccordionContent } from '../chunks/accordion-DISpV98f.mjs';
5
- import { P as Popover, a as PopoverTrigger, b as PopoverContent } from '../chunks/popover-CtxxPI-t.mjs';
6
- import { c as createLucideIcon } from '../chunks/createLucideIcon-BSP_Jxu-.mjs';
7
- import { t as toDate, b as buildFormatLongFn, c as buildLocalizeFn, d as buildMatchFn, e as buildMatchPatternFn, f as format, C as Calendar$1 } from '../chunks/calendar-CU6HdJET.mjs';
8
- import { B as Button } from '../chunks/button-BHeYV17S.mjs';
9
- import { t as twMerge } from '../chunks/bundle-mjs-CS-QKnOm.mjs';
10
- import { H as HoverCard, a as HoverCardTrigger, b as HoverCardContent } from '../chunks/hover-card-ssfyy6SY.mjs';
11
- import { B as Badge } from '../chunks/badge-CT_hmjd2.mjs';
12
- import { C as ChevronsUpDown } from '../chunks/chevrons-up-down-COuCmfU7.mjs';
13
- import { C as Command, b as CommandInput, d as CommandEmpty, c as CommandList, e as CommandGroup, f as CommandItem } from '../chunks/command-CUWr3X1X.mjs';
14
- import { C as Check } from '../chunks/check-B3pXhibW.mjs';
15
- import '../chunks/index-Bl6nVRXe.mjs';
4
+ import { A as Accordion, a as AccordionItem, b as AccordionTrigger, c as AccordionContent } from '../chunks/accordion-D4jYKlrs.mjs';
5
+ import { P as Popover, a as PopoverTrigger, b as PopoverContent } from '../chunks/popover-olTzpq2V.mjs';
6
+ import { c as createLucideIcon } from '../chunks/createLucideIcon-DaWLnx8c.mjs';
7
+ import { t as toDate, b as buildFormatLongFn, c as buildLocalizeFn, d as buildMatchFn, e as buildMatchPatternFn, f as format, C as Calendar$1 } from '../chunks/calendar-te6J8SSV.mjs';
8
+ import { B as Button } from '../chunks/button-ITSALNG-.mjs';
9
+ import { t as twMerge } from '../chunks/bundle-mjs-CUZdzyWH.mjs';
10
+ import { H as HoverCard, a as HoverCardTrigger, b as HoverCardContent } from '../chunks/hover-card-D2QRCyS5.mjs';
11
+ import { B as Badge } from '../chunks/badge-CTyBP2up.mjs';
12
+ import { C as ChevronsUpDown } from '../chunks/chevrons-up-down-DI24o-Kr.mjs';
13
+ import { C as Command, b as CommandInput, d as CommandEmpty, c as CommandList, e as CommandGroup, f as CommandItem } from '../chunks/command-DBroTbBI.mjs';
14
+ import { C as Check } from '../chunks/check-CdNBvGBU.mjs';
15
+ import { D as Dialog, i as DialogTrigger, b as DialogContent, e as DialogHeader, h as DialogTitle, c as DialogDescription, d as DialogFooter, a as DialogClose } from '../chunks/dialog-BPTAvhJ7.mjs';
16
+ import '../chunks/index-BAVBAIxD.mjs';
16
17
  import 'react/jsx-runtime';
17
18
  import '@radix-ui/react-collection';
18
- import '../chunks/index-BZyzz9k8.mjs';
19
- import '../chunks/index-BYijxgZz.mjs';
20
- import '../chunks/index-DUFr75Kc.mjs';
21
- import '../chunks/index-Bgiaprdv.mjs';
22
- import '../chunks/index-fWnSEyU5.mjs';
19
+ import '../chunks/index-Cm4bfE9_.mjs';
20
+ import '../chunks/index-gjSvM_n5.mjs';
21
+ import '../chunks/index-DOjBg0lm.mjs';
22
+ import '../chunks/index-DAFIXHvj.mjs';
23
+ import '../chunks/index-Ct-DPULS.mjs';
23
24
  import 'react-dom';
24
25
  import '@radix-ui/react-slot';
25
- import '../chunks/index-DIBl7n6R.mjs';
26
- import '../chunks/index-DrnQ43fz.mjs';
27
- import '../chunks/index-Dulm0stf.mjs';
28
- import '../chunks/chevron-down-BV5gvmUW.mjs';
29
- import '../chunks/index-B1VVz0MP.mjs';
30
- import '../chunks/index-D1yPZAOL.mjs';
31
- import '../chunks/index-CHyZo-Tj.mjs';
32
- import '../chunks/tslib.es6-O3UsmxNe.mjs';
33
- import '../chunks/index-BFDafXar.mjs';
34
- import '../chunks/index-tNc5GmLL.mjs';
35
- import '../chunks/chevron-left-BjGcH2KQ.mjs';
36
- import '../chunks/chevron-right-DmZu0xvo.mjs';
26
+ import '../chunks/index-BSypXZId.mjs';
27
+ import '../chunks/index-2QyQcI1p.mjs';
28
+ import '../chunks/index-BYi44B54.mjs';
29
+ import '../chunks/chevron-down-BpAcffl9.mjs';
30
+ import '../chunks/index-BVN6aKci.mjs';
31
+ import '../chunks/index-DzefHZGo.mjs';
32
+ import '../chunks/index-E3p9x3ha.mjs';
33
+ import '../chunks/tslib.es6-CkprbAX-.mjs';
34
+ import '../chunks/index-DIiHm1mS.mjs';
35
+ import '../chunks/index-CuzH07Qd.mjs';
36
+ import '../chunks/chevron-left-0PeYgPel.mjs';
37
+ import '../chunks/chevron-right-D8wrRolZ.mjs';
37
38
  import 'class-variance-authority';
38
- import '../chunks/index-3XcV7C7l.mjs';
39
- import '../chunks/dialog-zZCazow7.mjs';
40
- import '../chunks/x-5oL4uC6I.mjs';
39
+ import '../chunks/index-DM8LSsqF.mjs';
40
+ import '../chunks/x-B3TwCgfa.mjs';
41
41
 
42
- const __iconNode$1 = [
42
+ const __iconNode$2 = [
43
43
  [
44
44
  "path",
45
45
  {
@@ -73,9 +73,9 @@ const __iconNode$1 = [
73
73
  }
74
74
  ]
75
75
  ];
76
- const Calendar = createLucideIcon("Calendar", __iconNode$1);
76
+ const Calendar = createLucideIcon("Calendar", __iconNode$2);
77
77
 
78
- const __iconNode = [
78
+ const __iconNode$1 = [
79
79
  [
80
80
  "path",
81
81
  {
@@ -84,7 +84,52 @@ const __iconNode = [
84
84
  }
85
85
  ]
86
86
  ];
87
- const LoaderCircle = createLucideIcon("LoaderCircle", __iconNode);
87
+ const LoaderCircle = createLucideIcon("LoaderCircle", __iconNode$1);
88
+
89
+ const __iconNode = [
90
+ [
91
+ "path",
92
+ {
93
+ d: "M3 6h18",
94
+ key: "d0wm0j"
95
+ }
96
+ ],
97
+ [
98
+ "path",
99
+ {
100
+ d: "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",
101
+ key: "4alrt4"
102
+ }
103
+ ],
104
+ [
105
+ "path",
106
+ {
107
+ d: "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",
108
+ key: "v07s0e"
109
+ }
110
+ ],
111
+ [
112
+ "line",
113
+ {
114
+ x1: "10",
115
+ x2: "10",
116
+ y1: "11",
117
+ y2: "17",
118
+ key: "1uufr5"
119
+ }
120
+ ],
121
+ [
122
+ "line",
123
+ {
124
+ x1: "14",
125
+ x2: "14",
126
+ y1: "11",
127
+ y2: "17",
128
+ key: "xtxkd"
129
+ }
130
+ ]
131
+ ];
132
+ const Trash2 = createLucideIcon("Trash2", __iconNode);
88
133
 
89
134
  const TextWrap = ({ children, className, ...props })=>{
90
135
  return /*#__PURE__*/ React__default.createElement("div", {
@@ -827,17 +872,24 @@ function c(e, u, c, i) {
827
872
  return T;
828
873
  }
829
874
 
830
- function AutoComplete({ value, onChange, placeholder, searchPlaceholder, open, onOpenChange, disabled, messageEmpty = "Nenhum item encontrado.", fetchOptions }) {
875
+ function AutoComplete({ value, onChange, placeholder, searchPlaceholder, open, onOpenChange, disabled, messageEmpty = "Nenhum item encontrado.", fetchOptions, getOptionLabel, getOptionKey, onSelect, className }) {
831
876
  const [options, setOptions] = React__default.useState([]);
832
877
  const [loading, setLoading] = React__default.useState(false);
833
878
  const [searchTerm, setSearchTerm] = React__default.useState("");
834
- const sortedOptions = [
835
- ...options
836
- ].sort((a, b)=>{
837
- if (a.label === value) return -1;
838
- if (b.label === value) return 1;
839
- return a.label.localeCompare(b.label);
840
- });
879
+ const sortedOptions = React__default.useMemo(()=>{
880
+ if (!value) return options;
881
+ return [
882
+ ...options
883
+ ].sort((a, b)=>{
884
+ if (getOptionLabel(a) === getOptionLabel(value)) return -1;
885
+ if (getOptionLabel(b) === getOptionLabel(value)) return 1;
886
+ return getOptionLabel(a).localeCompare(getOptionLabel(b));
887
+ });
888
+ }, [
889
+ options,
890
+ value,
891
+ getOptionLabel
892
+ ]);
841
893
  const debouncedFetch = c(async (term)=>{
842
894
  try {
843
895
  const result = await fetchOptions(term);
@@ -860,8 +912,12 @@ function AutoComplete({ value, onChange, placeholder, searchPlaceholder, open, o
860
912
  debouncedFetch(val);
861
913
  };
862
914
  const handleSelect = (option)=>{
863
- onChange(option.label);
864
- onOpenChange(false);
915
+ if (onSelect) {
916
+ onSelect(option);
917
+ } else {
918
+ onChange(option);
919
+ onOpenChange(false);
920
+ }
865
921
  };
866
922
  return /*#__PURE__*/ React__default.createElement(Popover, {
867
923
  open: open,
@@ -870,12 +926,12 @@ function AutoComplete({ value, onChange, placeholder, searchPlaceholder, open, o
870
926
  asChild: true
871
927
  }, /*#__PURE__*/ React__default.createElement(Button, {
872
928
  variant: "outline",
873
- className: "flex h-10 w-full items-center justify-between truncate",
929
+ className: cn("flex h-10 w-full items-center justify-between truncate", className),
874
930
  "aria-expanded": open,
875
931
  disabled: disabled
876
932
  }, /*#__PURE__*/ React__default.createElement("span", {
877
933
  className: cn("text-muted-foreground", value && "text-foreground")
878
- }, value || placeholder), /*#__PURE__*/ React__default.createElement(ChevronsUpDown, {
934
+ }, value ? getOptionLabel(value) : placeholder), /*#__PURE__*/ React__default.createElement(ChevronsUpDown, {
879
935
  className: "ml-2 h-4 w-4 shrink-0 opacity-50"
880
936
  }))), /*#__PURE__*/ React__default.createElement(PopoverContent, {
881
937
  className: "max-h-[300px] w-[--radix-popover-trigger-width] overflow-auto p-0",
@@ -887,14 +943,53 @@ function AutoComplete({ value, onChange, placeholder, searchPlaceholder, open, o
887
943
  onValueChange: handleInputChange
888
944
  }), /*#__PURE__*/ React__default.createElement(CommandEmpty, null, loading ? "Carregando..." : searchTerm.trim() === "" ? "Digite algo para buscar..." : messageEmpty), /*#__PURE__*/ React__default.createElement(CommandList, {
889
945
  className: "max-h-60 overflow-y-auto"
890
- }, /*#__PURE__*/ React__default.createElement(CommandGroup, null, sortedOptions.map((item)=>/*#__PURE__*/ React__default.createElement(CommandItem, {
891
- key: item.id,
892
- value: item.label,
946
+ }, /*#__PURE__*/ React__default.createElement(CommandGroup, null, sortedOptions.map((item)=>{
947
+ const label = getOptionLabel(item);
948
+ const key = getOptionKey(item);
949
+ return /*#__PURE__*/ React__default.createElement(CommandItem, {
950
+ key: key,
951
+ value: label,
893
952
  onSelect: ()=>handleSelect(item)
894
- }, value === item.label && /*#__PURE__*/ React__default.createElement(Check, {
953
+ }, value && getOptionLabel(value) === label && /*#__PURE__*/ React__default.createElement(Check, {
895
954
  className: "h-4 w-4 opacity-100"
896
- }), /*#__PURE__*/ React__default.createElement("span", null, item.label))))))));
955
+ }), /*#__PURE__*/ React__default.createElement("span", null, label));
956
+ }))))));
957
+ }
958
+
959
+ function DeleteConfirmationModal({ onConfirm, title = "Tem certeza que deseja apagar?", description = "Essa ação não pode ser desfeita.", confirmText = "Apagar", cancelText = "Cancelar", disabled = false, children }) {
960
+ const [isPending, startTransition] = React__default.useTransition();
961
+ const handleConfirm = ()=>{
962
+ startTransition(async ()=>{
963
+ await onConfirm();
964
+ });
965
+ };
966
+ return /*#__PURE__*/ React__default.createElement(Dialog, null, /*#__PURE__*/ React__default.createElement(DialogTrigger, {
967
+ asChild: true
968
+ }, children ? children : /*#__PURE__*/ React__default.createElement(Button, {
969
+ variant: "ghost",
970
+ className: "text-destructive hover:text-destructive w-full items-start justify-start px-2",
971
+ disabled: disabled
972
+ }, confirmText)), /*#__PURE__*/ React__default.createElement(DialogContent, {
973
+ className: "max-w-[425px]"
974
+ }, /*#__PURE__*/ React__default.createElement(DialogHeader, {
975
+ className: "text-left"
976
+ }, /*#__PURE__*/ React__default.createElement(DialogTitle, null, title), /*#__PURE__*/ React__default.createElement(DialogDescription, null, description)), /*#__PURE__*/ React__default.createElement(DialogFooter, {
977
+ className: "flex flex-row flex-wrap items-start justify-between sm:justify-between"
978
+ }, /*#__PURE__*/ React__default.createElement(DialogClose, {
979
+ asChild: true
980
+ }, /*#__PURE__*/ React__default.createElement(Button, {
981
+ variant: "outline",
982
+ disabled: isPending
983
+ }, cancelText)), /*#__PURE__*/ React__default.createElement(DialogClose, {
984
+ asChild: true
985
+ }, /*#__PURE__*/ React__default.createElement(Button, {
986
+ variant: "destructive",
987
+ onClick: handleConfirm,
988
+ disabled: disabled || isPending
989
+ }, /*#__PURE__*/ React__default.createElement(Trash2, {
990
+ className: "h-4 w-4"
991
+ }), confirmText)))));
897
992
  }
898
993
 
899
- export { AutoComplete, CalendarPopover, CalendarRange, Header, HoverBadge, TextWrap, normalizeDate };
994
+ export { AutoComplete, CalendarPopover, CalendarRange, DeleteConfirmationModal, Header, HoverBadge, TextWrap, normalizeDate };
900
995
  //# sourceMappingURL=index.mjs.map