@tesouro/embedded-components-react 0.7.49 → 0.7.51

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 (188) hide show
  1. package/dist/lib/monite-sdk.d.ts +42 -42
  2. package/dist/lib/monite-sdk.js +18 -18
  3. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/useCounterpartsTable.js +2 -1
  4. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/mocks/counterparts.js +233 -88
  5. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/mocks/labels.js +1 -1
  6. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index.js +19 -19
  7. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index100.js +56 -10
  8. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index101.js +10 -37
  9. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index102.js +39 -1
  10. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index103.js +0 -105
  11. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index104.js +105 -0
  12. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index105.js +1 -56
  13. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index106.js +56 -1
  14. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index107.js +1 -55
  15. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index108.js +55 -1
  16. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index109.js +1 -55
  17. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index110.js +55 -1
  18. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index111.js +1 -153
  19. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index112.js +150 -52
  20. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index113.js +55 -2
  21. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index114.js +0 -1
  22. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index115.js +2 -0
  23. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index116.js +0 -1
  24. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index117.js +2 -10
  25. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index118.js +7 -53
  26. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index119.js +51 -36
  27. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index120.js +38 -71
  28. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index121.js +72 -39
  29. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index122.js +36 -9
  30. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index123.js +7 -6
  31. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index124.js +6 -64
  32. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index125.js +57 -158
  33. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index126.js +172 -7
  34. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index127.js +6 -1
  35. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index128.js +2 -76
  36. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index129.js +76 -1
  37. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index130.js +0 -78
  38. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index131.js +78 -0
  39. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index132.js +1 -35
  40. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index133.js +35 -1
  41. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index134.js +0 -57
  42. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index135.js +56 -42
  43. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index136.js +44 -1
  44. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index137.js +0 -568
  45. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index138.js +568 -0
  46. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index139.js +1 -1
  47. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index140.js +1 -160
  48. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index141.js +159 -0
  49. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index142.js +0 -26
  50. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index143.js +26 -0
  51. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index144.js +1 -12
  52. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index145.js +2 -2
  53. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index146.js +2 -2
  54. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index147.js +10 -16
  55. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index148.js +16 -19
  56. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index149.js +19 -27
  57. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index150.js +29 -1
  58. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index151.js +1 -93
  59. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index154.js +4 -4
  60. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index159.js +1 -1
  61. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index162.js +4 -4
  62. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index164.js +1 -1
  63. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index168.js +1 -1
  64. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index172.js +2 -2
  65. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index173.js +1 -1
  66. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index175.js +12 -11
  67. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index178.js +4 -4
  68. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index179.js +2 -2
  69. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index229.js +1 -1
  70. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index235.js +2 -2
  71. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index249.js +4 -4
  72. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index252.js +1 -1
  73. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index260.js +87 -41
  74. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index261.js +44 -48
  75. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index262.js +48 -82
  76. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index263.js +83 -7
  77. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index264.js +7 -305
  78. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index265.js +307 -1
  79. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index266.js +1 -32
  80. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index267.js +32 -1
  81. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index268.js +1 -29
  82. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index269.js +29 -1
  83. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index270.js +1 -22
  84. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index271.js +22 -1
  85. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index272.js +0 -159
  86. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index273.js +159 -0
  87. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index274.js +1 -37
  88. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index275.js +34 -33
  89. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index276.js +33 -3
  90. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index277.js +3 -102
  91. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index278.js +88 -172
  92. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index279.js +171 -116
  93. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index280.js +114 -191
  94. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index281.js +209 -11
  95. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index282.js +11 -15
  96. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index283.js +14 -28
  97. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index284.js +31 -1
  98. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index285.js +0 -241
  99. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index286.js +241 -0
  100. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index287.js +1 -36
  101. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index288.js +31 -137
  102. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index289.js +142 -1
  103. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index290.js +0 -166
  104. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index291.js +166 -25
  105. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index292.js +26 -19
  106. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index293.js +16 -17
  107. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index294.js +17 -5
  108. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index295.js +4 -14
  109. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index296.js +12 -18
  110. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index297.js +9 -9
  111. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index298.js +21 -5
  112. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index299.js +4 -13
  113. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index300.js +11 -14
  114. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index301.js +20 -9
  115. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index302.js +8 -26
  116. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index303.js +23 -11
  117. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index304.js +12 -8
  118. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index305.js +8 -24
  119. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index306.js +25 -14
  120. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index307.js +14 -81
  121. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index308.js +81 -14
  122. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index309.js +14 -100
  123. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index310.js +98 -42
  124. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index311.js +43 -27
  125. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index312.js +30 -1
  126. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index313.js +0 -105
  127. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index314.js +102 -35
  128. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index315.js +32 -166
  129. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index316.js +171 -12
  130. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index317.js +13 -3
  131. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index318.js +4 -70
  132. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index319.js +62 -19
  133. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index320.js +24 -209
  134. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index321.js +207 -87
  135. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index322.js +90 -17
  136. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index323.js +17 -158
  137. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index324.js +144 -88
  138. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index325.js +100 -42
  139. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index326.js +46 -4
  140. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index327.js +4 -24
  141. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index328.js +20 -73
  142. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index329.js +74 -16
  143. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index330.js +16 -19
  144. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index331.js +19 -5
  145. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index332.js +4 -8
  146. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index333.js +10 -11
  147. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index334.js +11 -131
  148. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index335.js +129 -4
  149. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index336.js +4 -4
  150. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index337.js +8 -5
  151. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index338.js +4 -221
  152. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index339.js +219 -31
  153. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index340.js +31 -11
  154. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index341.js +12 -34
  155. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index342.js +34 -20
  156. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index343.js +18 -72
  157. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index344.js +73 -181
  158. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index345.js +182 -14
  159. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index346.js +14 -204
  160. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index347.js +192 -88
  161. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index348.js +97 -61
  162. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index349.js +63 -54
  163. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index350.js +46 -83
  164. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index351.js +91 -40
  165. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index352.js +39 -75
  166. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index353.js +63 -71
  167. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index354.js +85 -12
  168. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index355.js +12 -24
  169. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index356.js +25 -16
  170. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index357.js +14 -2
  171. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index358.js +4 -23
  172. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index359.js +23 -0
  173. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index360.js +0 -45
  174. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index361.js +46 -32
  175. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index362.js +30 -2
  176. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index363.js +2 -34
  177. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index364.js +33 -15
  178. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index365.js +14 -29
  179. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index366.js +29 -27
  180. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index367.js +31 -2
  181. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index368.js +2 -97
  182. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index369.js +97 -0
  183. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index96.js +2 -17
  184. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index97.js +17 -3
  185. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index98.js +5 -1
  186. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index99.js +1 -57
  187. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  188. package/package.json +1 -1
@@ -1,39 +1,106 @@
1
- import { Button as e } from "./index121.js";
2
- import { Sheet as t, SheetContent as n, SheetDescription as r, SheetFooter as i, SheetHeader as a, SheetTitle as o } from "./index307.js";
3
- import { ManageMeasureUnitsForm as s } from "./index313.js";
4
- import { jsx as c, jsxs as l } from "@emotion/react/jsx-runtime";
5
- import { useLingui as u } from "@lingui/react";
1
+ import { useDebounceCallback as e } from "./index85.js";
2
+ import { InputGroup as t, InputGroupAddon as n, InputGroupInput as r } from "./index125.js";
3
+ import { Table as i, TableBody as a, TableCell as o, TableHead as s, TableHeader as c, TableRow as l } from "./index166.js";
4
+ import { useGetMeasureUnits as u } from "./index295.js";
5
+ import { useDeleteMeasureUnit as d } from "./index296.js";
6
+ import "./index302.js";
7
+ import { MeasureUnitsFormRow as f } from "./index310.js";
8
+ import { ConfirmDeleteMeasureUnitDialog as p } from "./index311.js";
9
+ import { TableActions as m } from "./index312.js";
10
+ import "./index313.js";
11
+ import { useCallback as h, useState as g } from "react";
12
+ import { Loader2 as _, Search as v } from "lucide-react";
13
+ import { Fragment as y, jsx as b, jsxs as x } from "@emotion/react/jsx-runtime";
14
+ import { useLingui as S } from "@lingui/react";
6
15
  //#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index314.js
7
- var d = ({ handleClose: d, open: f }) => {
8
- let { i18n: p } = u();
9
- return /* @__PURE__ */ c(t, {
10
- open: f,
11
- onOpenChange: d,
12
- children: /* @__PURE__ */ l(n, {
13
- side: "right",
14
- className: "ttw:gap-0 ttw:p-0",
15
- children: [
16
- /* @__PURE__ */ l(a, {
17
- className: "ttw:border-b ttw:border-border",
18
- children: [/* @__PURE__ */ c(o, { children: p._("Manage measure units") }), /* @__PURE__ */ c(r, {
19
- hidden: !0,
20
- children: p._("Manage measure units")
21
- })]
22
- }),
23
- /* @__PURE__ */ c("div", {
24
- className: "ttw:flex-1 ttw:overflow-y-auto ttw:px-6 ttw:py-4",
25
- children: /* @__PURE__ */ c(s, {})
26
- }),
27
- /* @__PURE__ */ c(i, {
28
- className: "ttw:border-t ttw:border-border ttw:flex-row ttw:justify-end",
29
- children: /* @__PURE__ */ c(e, {
30
- onClick: d,
31
- children: p._("Done")
32
- })
33
- })
34
- ]
35
- })
16
+ var C = () => {
17
+ let { i18n: C } = S(), [w, T] = g(null), [E, D] = g(null), O = !!E, [k, A] = g(""), { data: j, isLoading: M } = u(), N = d(E?.name), P = e((e) => {
18
+ A(e);
19
+ }, 500), F = j?.data?.filter((e) => e.name.toLowerCase().includes(k.toLowerCase()) || e.description && e.description.toLowerCase().includes(k.toLowerCase())) || [], I = h((e) => {
20
+ D(e);
21
+ }, []), L = h(() => {
22
+ D(null);
23
+ }, []), R = h(() => {
24
+ E && N.mutate({ path: { unit_id: E.id } }, { onSuccess: () => L() });
25
+ }, [
26
+ N,
27
+ E,
28
+ L
29
+ ]), z = N.isPending, B = () => {
30
+ T(null);
31
+ };
32
+ return /* @__PURE__ */ x("div", {
33
+ className: "ttw:flex ttw:flex-col ttw:gap-4 ttw:h-full ttw:relative",
34
+ children: [M ? /* @__PURE__ */ b("div", {
35
+ className: "ttw:flex ttw:justify-center ttw:items-center ttw:h-full",
36
+ children: /* @__PURE__ */ b(_, { className: "ttw:size-10 ttw:animate-spin ttw:text-muted-foreground" })
37
+ }) : /* @__PURE__ */ x(y, { children: [
38
+ z && /* @__PURE__ */ b("div", {
39
+ className: "ttw:absolute ttw:inset-0 ttw:bg-white/70 ttw:flex ttw:justify-center ttw:items-center ttw:z-10",
40
+ children: /* @__PURE__ */ b(_, { className: "ttw:size-10 ttw:animate-spin ttw:text-muted-foreground" })
41
+ }),
42
+ /* @__PURE__ */ x(t, { children: [/* @__PURE__ */ b(n, {
43
+ align: "inline-start",
44
+ children: /* @__PURE__ */ b(v, {})
45
+ }), /* @__PURE__ */ b(r, {
46
+ placeholder: C._("Search"),
47
+ onChange: (e) => P(e.target.value)
48
+ })] }),
49
+ /* @__PURE__ */ x(i, {
50
+ className: "ttw:table-fixed ttw:border ttw:border-border ttw:rounded-md",
51
+ children: [/* @__PURE__ */ b(c, { children: /* @__PURE__ */ x(l, {
52
+ className: "ttw:hover:bg-transparent ttw:border-border",
53
+ children: [
54
+ /* @__PURE__ */ b(s, {
55
+ className: "ttw:w-[35%]",
56
+ children: C._("Unit label")
57
+ }),
58
+ /* @__PURE__ */ b(s, {
59
+ className: "ttw:w-[55%]",
60
+ children: C._("Description (optional)")
61
+ }),
62
+ /* @__PURE__ */ b(s, { className: "ttw:w-[10%]" })
63
+ ]
64
+ }) }), /* @__PURE__ */ x(a, { children: [/* @__PURE__ */ b(f, { isEditMode: !1 }), F.map((e) => w?.id === e.id ? /* @__PURE__ */ b(f, {
65
+ isEditMode: !0,
66
+ initialValues: e,
67
+ onCancel: B,
68
+ onEdit: () => T(null),
69
+ id: e.id
70
+ }, e.id) : /* @__PURE__ */ x(l, {
71
+ className: "ttw:border-border",
72
+ children: [
73
+ /* @__PURE__ */ b(o, {
74
+ className: "ttw:w-[35%] ttw:text-sm ttw:truncate",
75
+ children: e.name
76
+ }),
77
+ /* @__PURE__ */ b(o, {
78
+ className: "ttw:w-[55%] ttw:text-sm ttw:text-muted-foreground ttw:truncate",
79
+ children: e.description || "—"
80
+ }),
81
+ /* @__PURE__ */ b(o, {
82
+ className: "ttw:w-[10%]",
83
+ children: /* @__PURE__ */ b(m, {
84
+ permissions: {
85
+ isUpdateAllowed: !0,
86
+ isDeleteAllowed: !0
87
+ },
88
+ onEdit: () => T(e),
89
+ onDelete: () => I(e)
90
+ })
91
+ })
92
+ ]
93
+ }, e.id))] })]
94
+ })
95
+ ] }), /* @__PURE__ */ b(p, {
96
+ open: O,
97
+ id: E?.id,
98
+ name: E?.name || "",
99
+ isLoading: z,
100
+ onClose: L,
101
+ onDelete: R
102
+ })]
36
103
  });
37
104
  };
38
105
  //#endregion
39
- export { d as ManageMeasureUnits };
106
+ export { C as ManageMeasureUnitsForm };
@@ -1,173 +1,39 @@
1
- import { Scope as e } from "../../shared/data-access/dist/lib/scopes.js";
2
- import "../../shared/data-access/dist/index.js";
3
- import { useMoniteContext as t } from "./index45.js";
4
- import { useCurrencies as n } from "./index76.js";
5
- import "./index89.js";
6
- import { Button as r } from "./index121.js";
7
- import { MoniteScopedProviders as i } from "./index155.js";
8
- import { useUserPermissions as a } from "./index156.js";
9
- import { GetNoRowsOverlay as o } from "./index161.js";
10
- import { AccessRestriction as s } from "./index162.js";
11
- import "./index165.js";
12
- import { DataTable as c } from "./index168.js";
13
- import { hasSelectedText as l } from "./index169.js";
14
- import { useGetProducts as u } from "./index230.js";
15
- import "./index301.js";
16
- import { ProductDeleteModal as d } from "./index302.js";
17
- import { ProductType as f } from "./index303.js";
18
- import { FILTER_TYPE_SEARCH as p } from "./index304.js";
19
- import { Filters as m } from "./index305.js";
20
- import { MeasureUnit as ee } from "./index306.js";
21
- import { ManageMeasureUnits as h } from "./index314.js";
22
- import { useCallback as g, useMemo as _, useState as v } from "react";
23
- import { ArrowDown as y, ArrowUp as b, ArrowUpDown as x, Plus as S } from "lucide-react";
24
- import { Fragment as C, jsx as w, jsxs as T } from "@emotion/react/jsx-runtime";
25
- import { useLingui as E } from "@lingui/react";
1
+ import { Button as e } from "./index122.js";
2
+ import { Sheet as t, SheetContent as n, SheetDescription as r, SheetFooter as i, SheetHeader as a, SheetTitle as o } from "./index308.js";
3
+ import { ManageMeasureUnitsForm as s } from "./index314.js";
4
+ import { jsx as c, jsxs as l } from "@emotion/react/jsx-runtime";
5
+ import { useLingui as u } from "@lingui/react";
26
6
  //#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index315.js
27
- var D = (e) => /* @__PURE__ */ w(i, { children: /* @__PURE__ */ w(O, { ...e }) }), O = ({ onFilterChanged: i, onSortChanged: D, onRowClick: O, onDeleted: k, openCreateModal: A }) => {
28
- let { i18n: j } = E(), { componentSettings: M } = t(), { formatCurrencyToDisplay: N } = n(), [P, F] = v(!1), [I, L] = v(void 0), [R, z] = v(M.products.pageSizeOptions[0]), [B, te] = v({}), [V, H] = v(), [U, W] = v({
29
- open: !1,
30
- id: null
31
- }), G = a(), K = G.has(e.InvoiceWriteOrg), q = G.has(e.InvoiceReadOrg), { data: J, isLoading: Y, isError: X, refetch: Z } = u({
32
- sort: V?.field,
33
- order: V?.sort,
34
- limit: R,
35
- pagination_token: I,
36
- name__icontains: B.search || void 0
37
- }), Q = (e, t) => {
38
- L(void 0), te((n) => ({
39
- ...n,
40
- [e]: t === "all" ? null : t
41
- })), i?.({
42
- field: e,
43
- value: t
44
- });
45
- }, $ = _(() => V ? [{
46
- id: V.field,
47
- desc: V.sort === "desc"
48
- }] : [], [V]), ne = g((e) => {
49
- let t = typeof e == "function" ? e($) : e;
50
- if (t.length > 0) {
51
- let e = {
52
- field: t[0].id,
53
- sort: t[0].desc ? "desc" : "asc"
54
- };
55
- H(e), D?.(e);
56
- } else H(void 0);
57
- L(void 0);
58
- }, [$, D]), re = _(() => [
59
- {
60
- accessorKey: "name",
61
- header: ({ column: e }) => {
62
- let t = e.getIsSorted();
63
- return /* @__PURE__ */ T("div", {
64
- className: "ttw:flex ttw:items-center ttw:gap-2 ttw:text-inherit",
65
- children: [j._("Name"), /* @__PURE__ */ w(r, {
66
- variant: "ghost",
67
- onClick: () => e.toggleSorting(t === "asc"),
68
- children: w(t === "asc" ? b : t === "desc" ? y : x, { className: "ttw:size-4" })
69
- })]
70
- });
71
- },
72
- cell: ({ row: e }) => /* @__PURE__ */ w("span", { children: e.original.name })
73
- },
74
- {
75
- accessorKey: "type",
76
- header: j._("Type"),
77
- cell: ({ row: e }) => e.original.type ? /* @__PURE__ */ w(f, { type: e.original.type }) : null
78
- },
79
- {
80
- accessorKey: "description",
81
- header: j._("Description"),
82
- cell: ({ row: e }) => /* @__PURE__ */ w("div", {
83
- className: "ttw:w-120",
84
- children: /* @__PURE__ */ w("span", {
85
- className: "ttw:w-full ttw:inline-block ttw:truncate",
86
- children: e.original?.description
87
- })
88
- })
89
- },
90
- {
91
- accessorKey: "price",
92
- header: () => /* @__PURE__ */ w("div", {
93
- className: "ttw:text-right",
94
- children: j._("Price per unit")
95
- }),
96
- cell: ({ row: e }) => {
97
- let t = e.original.price;
98
- return /* @__PURE__ */ T("div", {
99
- className: "ttw:justify-end ttw:flex ttw:gap-1 ttw:items-center",
100
- children: [t ? N(t.value, t.currency) : "", /* @__PURE__ */ w(ee, { unitId: e.original.measure_unit_id ?? "" })]
101
- });
102
- }
103
- }
104
- ], [j, N]), ie = Object.keys(B).some((e) => B[e] !== null && B[e] !== void 0), ae = !!B[p];
105
- return q ? /* @__PURE__ */ T(C, { children: [
106
- /* @__PURE__ */ w("div", {
107
- className: "ttw:flex ttw:flex-col ttw:overflow-hidden ttw:min-h-125",
108
- children: /* @__PURE__ */ w(c, {
109
- columns: re,
110
- data: J?.data ?? [],
111
- sorting: $,
112
- onSortingChange: ne,
113
- pageSize: R,
114
- onPageSizeChange: z,
115
- nextPaginationToken: J?.next_pagination_token ?? void 0,
116
- prevPaginationToken: J?.prev_pagination_token ?? void 0,
117
- onPaginationTokenChange: L,
118
- onRowClick: (e) => {
119
- l() || O?.(e.id);
120
- },
121
- filterComponent: /* @__PURE__ */ T("div", {
122
- className: "ttw:flex ttw:items-center ttw:justify-between ttw:px-4",
123
- children: [/* @__PURE__ */ w(m, { onChangeFilter: Q }), /* @__PURE__ */ T("div", {
124
- className: "ttw:flex ttw:gap-2",
125
- children: [/* @__PURE__ */ w(r, {
126
- variant: "ghost",
127
- onClick: () => F(!0),
128
- className: "ttw:py-0 ttw:text-primary ttw:hover:text-primary",
129
- children: j._("Manage units of measure")
130
- }), /* @__PURE__ */ T(r, {
131
- disabled: !K,
132
- onClick: A,
133
- className: "ttw:py-0",
134
- children: [/* @__PURE__ */ w(S, {}), j._("Add product or service")]
135
- })]
7
+ var d = ({ handleClose: d, open: f }) => {
8
+ let { i18n: p } = u();
9
+ return /* @__PURE__ */ c(t, {
10
+ open: f,
11
+ onOpenChange: d,
12
+ children: /* @__PURE__ */ l(n, {
13
+ side: "right",
14
+ className: "ttw:gap-0 ttw:p-0",
15
+ children: [
16
+ /* @__PURE__ */ l(a, {
17
+ className: "ttw:border-b ttw:border-border",
18
+ children: [/* @__PURE__ */ c(o, { children: p._("Manage measure units") }), /* @__PURE__ */ c(r, {
19
+ hidden: !0,
20
+ children: p._("Manage measure units")
136
21
  })]
137
22
  }),
138
- children: /* @__PURE__ */ w(o, {
139
- isLoading: Y,
140
- dataLength: J?.data.length || 0,
141
- isFiltering: ie,
142
- isSearching: ae,
143
- isError: X,
144
- onCreate: A,
145
- refetch: Z,
146
- filterTitle: j._("No product or service found"),
147
- filterDescription1: j._("Try adjusting your search or filter criteria"),
148
- entityName: j._("products or services"),
149
- actionButtonLabel: j._("Add your first product or service"),
150
- actionOptions: [j._("Product")],
151
- noDataTitle: j._("Build your products & services list."),
152
- noDataDescription1: j._("Save the products and services you sell so you can quickly add them as line items on invoices."),
153
- type: "no-data"
23
+ /* @__PURE__ */ c("div", {
24
+ className: "ttw:flex-1 ttw:overflow-y-auto ttw:px-6 ttw:py-4",
25
+ children: /* @__PURE__ */ c(s, {})
26
+ }),
27
+ /* @__PURE__ */ c(i, {
28
+ className: "ttw:border-t ttw:border-border ttw:flex-row ttw:justify-end",
29
+ children: /* @__PURE__ */ c(e, {
30
+ onClick: d,
31
+ children: p._("Done")
32
+ })
154
33
  })
155
- })
156
- }),
157
- U.id && /* @__PURE__ */ w(d, {
158
- id: U.id,
159
- open: U.open,
160
- onDeleted: k,
161
- onClose: () => W((e) => ({
162
- ...e,
163
- open: !1
164
- }))
165
- }),
166
- P && /* @__PURE__ */ w(h, {
167
- open: P,
168
- handleClose: () => F(!1)
34
+ ]
169
35
  })
170
- ] }) : /* @__PURE__ */ w(s, {});
36
+ });
171
37
  };
172
38
  //#endregion
173
- export { D as ProductsTable };
39
+ export { d as ManageMeasureUnits };
@@ -1,14 +1,173 @@
1
- import { cn as e } from "./index64.js";
2
- import "react";
3
- import { jsx as t } from "@emotion/react/jsx-runtime";
4
- import * as n from "@radix-ui/react-label";
1
+ import { Scope as e } from "../../shared/data-access/dist/lib/scopes.js";
2
+ import "../../shared/data-access/dist/index.js";
3
+ import { useMoniteContext as t } from "./index45.js";
4
+ import { useCurrencies as n } from "./index76.js";
5
+ import "./index89.js";
6
+ import { Button as r } from "./index122.js";
7
+ import { MoniteScopedProviders as i } from "./index155.js";
8
+ import { useUserPermissions as a } from "./index156.js";
9
+ import { GetNoRowsOverlay as o } from "./index161.js";
10
+ import { AccessRestriction as s } from "./index162.js";
11
+ import "./index165.js";
12
+ import { DataTable as c } from "./index168.js";
13
+ import { hasSelectedText as l } from "./index169.js";
14
+ import { useGetProducts as u } from "./index230.js";
15
+ import "./index302.js";
16
+ import { ProductDeleteModal as d } from "./index303.js";
17
+ import { ProductType as f } from "./index304.js";
18
+ import { FILTER_TYPE_SEARCH as p } from "./index305.js";
19
+ import { Filters as m } from "./index306.js";
20
+ import { MeasureUnit as ee } from "./index307.js";
21
+ import { ManageMeasureUnits as h } from "./index315.js";
22
+ import { useCallback as g, useMemo as _, useState as v } from "react";
23
+ import { ArrowDown as y, ArrowUp as b, ArrowUpDown as x, Plus as S } from "lucide-react";
24
+ import { Fragment as C, jsx as w, jsxs as T } from "@emotion/react/jsx-runtime";
25
+ import { useLingui as E } from "@lingui/react";
5
26
  //#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index316.js
6
- function r({ className: r, ...i }) {
7
- return /* @__PURE__ */ t(n.Root, {
8
- "data-slot": "label",
9
- className: e("ttw:flex ttw:items-center ttw:gap-2 ttw:text-sm ttw:leading-none ttw:font-medium ttw:select-none ttw:group-data-[disabled=true]:pointer-events-none ttw:group-data-[disabled=true]:opacity-50 ttw:peer-disabled:cursor-not-allowed ttw:peer-disabled:opacity-50", r),
10
- ...i
11
- });
12
- }
27
+ var D = (e) => /* @__PURE__ */ w(i, { children: /* @__PURE__ */ w(O, { ...e }) }), O = ({ onFilterChanged: i, onSortChanged: D, onRowClick: O, onDeleted: k, openCreateModal: A }) => {
28
+ let { i18n: j } = E(), { componentSettings: M } = t(), { formatCurrencyToDisplay: N } = n(), [P, F] = v(!1), [I, L] = v(void 0), [R, z] = v(M.products.pageSizeOptions[0]), [B, te] = v({}), [V, H] = v(), [U, W] = v({
29
+ open: !1,
30
+ id: null
31
+ }), G = a(), K = G.has(e.InvoiceWriteOrg), q = G.has(e.InvoiceReadOrg), { data: J, isLoading: Y, isError: X, refetch: Z } = u({
32
+ sort: V?.field,
33
+ order: V?.sort,
34
+ limit: R,
35
+ pagination_token: I,
36
+ name__icontains: B.search || void 0
37
+ }), Q = (e, t) => {
38
+ L(void 0), te((n) => ({
39
+ ...n,
40
+ [e]: t === "all" ? null : t
41
+ })), i?.({
42
+ field: e,
43
+ value: t
44
+ });
45
+ }, $ = _(() => V ? [{
46
+ id: V.field,
47
+ desc: V.sort === "desc"
48
+ }] : [], [V]), ne = g((e) => {
49
+ let t = typeof e == "function" ? e($) : e;
50
+ if (t.length > 0) {
51
+ let e = {
52
+ field: t[0].id,
53
+ sort: t[0].desc ? "desc" : "asc"
54
+ };
55
+ H(e), D?.(e);
56
+ } else H(void 0);
57
+ L(void 0);
58
+ }, [$, D]), re = _(() => [
59
+ {
60
+ accessorKey: "name",
61
+ header: ({ column: e }) => {
62
+ let t = e.getIsSorted();
63
+ return /* @__PURE__ */ T("div", {
64
+ className: "ttw:flex ttw:items-center ttw:gap-2 ttw:text-inherit",
65
+ children: [j._("Name"), /* @__PURE__ */ w(r, {
66
+ variant: "ghost",
67
+ onClick: () => e.toggleSorting(t === "asc"),
68
+ children: w(t === "asc" ? b : t === "desc" ? y : x, { className: "ttw:size-4" })
69
+ })]
70
+ });
71
+ },
72
+ cell: ({ row: e }) => /* @__PURE__ */ w("span", { children: e.original.name })
73
+ },
74
+ {
75
+ accessorKey: "type",
76
+ header: j._("Type"),
77
+ cell: ({ row: e }) => e.original.type ? /* @__PURE__ */ w(f, { type: e.original.type }) : null
78
+ },
79
+ {
80
+ accessorKey: "description",
81
+ header: j._("Description"),
82
+ cell: ({ row: e }) => /* @__PURE__ */ w("div", {
83
+ className: "ttw:w-120",
84
+ children: /* @__PURE__ */ w("span", {
85
+ className: "ttw:w-full ttw:inline-block ttw:truncate",
86
+ children: e.original?.description
87
+ })
88
+ })
89
+ },
90
+ {
91
+ accessorKey: "price",
92
+ header: () => /* @__PURE__ */ w("div", {
93
+ className: "ttw:text-right",
94
+ children: j._("Price per unit")
95
+ }),
96
+ cell: ({ row: e }) => {
97
+ let t = e.original.price;
98
+ return /* @__PURE__ */ T("div", {
99
+ className: "ttw:justify-end ttw:flex ttw:gap-1 ttw:items-center",
100
+ children: [t ? N(t.value, t.currency) : "", /* @__PURE__ */ w(ee, { unitId: e.original.measure_unit_id ?? "" })]
101
+ });
102
+ }
103
+ }
104
+ ], [j, N]), ie = Object.keys(B).some((e) => B[e] !== null && B[e] !== void 0), ae = !!B[p];
105
+ return q ? /* @__PURE__ */ T(C, { children: [
106
+ /* @__PURE__ */ w("div", {
107
+ className: "ttw:flex ttw:flex-col ttw:overflow-hidden ttw:min-h-125",
108
+ children: /* @__PURE__ */ w(c, {
109
+ columns: re,
110
+ data: J?.data ?? [],
111
+ sorting: $,
112
+ onSortingChange: ne,
113
+ pageSize: R,
114
+ onPageSizeChange: z,
115
+ nextPaginationToken: J?.next_pagination_token ?? void 0,
116
+ prevPaginationToken: J?.prev_pagination_token ?? void 0,
117
+ onPaginationTokenChange: L,
118
+ onRowClick: (e) => {
119
+ l() || O?.(e.id);
120
+ },
121
+ filterComponent: /* @__PURE__ */ T("div", {
122
+ className: "ttw:flex ttw:items-center ttw:justify-between ttw:px-4",
123
+ children: [/* @__PURE__ */ w(m, { onChangeFilter: Q }), /* @__PURE__ */ T("div", {
124
+ className: "ttw:flex ttw:gap-2",
125
+ children: [/* @__PURE__ */ w(r, {
126
+ variant: "ghost",
127
+ onClick: () => F(!0),
128
+ className: "ttw:py-0 ttw:text-primary ttw:hover:text-primary",
129
+ children: j._("Manage units of measure")
130
+ }), /* @__PURE__ */ T(r, {
131
+ disabled: !K,
132
+ onClick: A,
133
+ className: "ttw:py-0",
134
+ children: [/* @__PURE__ */ w(S, {}), j._("Add product or service")]
135
+ })]
136
+ })]
137
+ }),
138
+ children: /* @__PURE__ */ w(o, {
139
+ isLoading: Y,
140
+ dataLength: J?.data.length || 0,
141
+ isFiltering: ie,
142
+ isSearching: ae,
143
+ isError: X,
144
+ onCreate: A,
145
+ refetch: Z,
146
+ filterTitle: j._("No product or service found"),
147
+ filterDescription1: j._("Try adjusting your search or filter criteria"),
148
+ entityName: j._("products or services"),
149
+ actionButtonLabel: j._("Add your first product or service"),
150
+ actionOptions: [j._("Product")],
151
+ noDataTitle: j._("Build your products & services list."),
152
+ noDataDescription1: j._("Save the products and services you sell so you can quickly add them as line items on invoices."),
153
+ type: "no-data"
154
+ })
155
+ })
156
+ }),
157
+ U.id && /* @__PURE__ */ w(d, {
158
+ id: U.id,
159
+ open: U.open,
160
+ onDeleted: k,
161
+ onClose: () => W((e) => ({
162
+ ...e,
163
+ open: !1
164
+ }))
165
+ }),
166
+ P && /* @__PURE__ */ w(h, {
167
+ open: P,
168
+ handleClose: () => F(!1)
169
+ })
170
+ ] }) : /* @__PURE__ */ w(s, {});
171
+ };
13
172
  //#endregion
14
- export { r as Label };
173
+ export { D as ProductsTable };
@@ -1,4 +1,14 @@
1
- import "./index64.js";
1
+ import { cn as e } from "./index64.js";
2
2
  import "react";
3
- import "@emotion/react/jsx-runtime";
4
- import "radix-ui";
3
+ import { jsx as t } from "@emotion/react/jsx-runtime";
4
+ import * as n from "@radix-ui/react-label";
5
+ //#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index317.js
6
+ function r({ className: r, ...i }) {
7
+ return /* @__PURE__ */ t(n.Root, {
8
+ "data-slot": "label",
9
+ className: e("ttw:flex ttw:items-center ttw:gap-2 ttw:text-sm ttw:leading-none ttw:font-medium ttw:select-none ttw:group-data-[disabled=true]:pointer-events-none ttw:group-data-[disabled=true]:opacity-50 ttw:peer-disabled:cursor-not-allowed ttw:peer-disabled:opacity-50", r),
10
+ ...i
11
+ });
12
+ }
13
+ //#endregion
14
+ export { r as Label };
@@ -1,70 +1,4 @@
1
- import { cn as e } from "./index64.js";
2
- import { Label as t } from "./index316.js";
3
- import "./index317.js";
4
- import { useMemo as n } from "react";
5
- import { jsx as r, jsxs as i } from "@emotion/react/jsx-runtime";
6
- import { cva as a } from "class-variance-authority";
7
- //#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index318.js
8
- var o = a("ttw:group/field ttw:flex ttw:w-full ttw:gap-3 ttw:data-[invalid=true]:text-destructive", {
9
- variants: { orientation: {
10
- vertical: ["flex-col [&>*]:w-full [&>.sr-only]:w-auto"],
11
- horizontal: [
12
- "flex-row items-center",
13
- "[&>[data-slot=field-label]]:flex-auto",
14
- "has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"
15
- ],
16
- responsive: [
17
- "flex-col @md/field-group:flex-row @md/field-group:items-center [&>*]:w-full @md/field-group:[&>*]:w-auto [&>.sr-only]:w-auto",
18
- "@md/field-group:[&>[data-slot=field-label]]:flex-auto",
19
- "@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"
20
- ]
21
- } },
22
- defaultVariants: { orientation: "vertical" }
23
- });
24
- function s({ className: t, orientation: n = "vertical", ...i }) {
25
- return /* @__PURE__ */ r("div", {
26
- role: "group",
27
- "data-slot": "field",
28
- "data-orientation": n,
29
- className: e(o({ orientation: n }), t),
30
- ...i
31
- });
32
- }
33
- function c({ className: t, ...n }) {
34
- return /* @__PURE__ */ r("div", {
35
- "data-slot": "field-content",
36
- className: e("ttw:group/field-content ttw:flex ttw:flex-1 ttw:flex-col ttw:gap-1.5 ttw:leading-snug", t),
37
- ...n
38
- });
39
- }
40
- function l({ className: n, required: a, children: o, ...s }) {
41
- return /* @__PURE__ */ i(t, {
42
- "data-slot": "field-label",
43
- className: e("ttw:group/field-label ttw:peer/field-label ttw:flex ttw:w-fit ttw:items-center ttw:gap-2 ttw:leading-snug ttw:group-data-[disabled=true]/field:opacity-50", "ttw:has-[>[data-slot=field]]:w-full ttw:has-[>[data-slot=field]]:flex-col ttw:has-[>[data-slot=field]]:rounded-md ttw:has-[>[data-slot=field]]:border ttw:[&>*]:data-[slot=field]:p-4", "ttw:has-data-[state=checked]:border-primary ttw:has-data-[state=checked]:bg-primary/5 ttw:dark:has-data-[state=checked]:bg-primary/10", n),
44
- ...s,
45
- children: [o, a && /* @__PURE__ */ r("span", {
46
- "aria-hidden": "true",
47
- className: "ttw:size-2 ttw:-ml-1 ttw:block ttw:-mt-1 ttw:rounded-full ttw:bg-destructive ttw:shrink-0"
48
- })]
49
- });
50
- }
51
- function u({ className: t, children: i, errors: a, ...o }) {
52
- let s = n(() => {
53
- if (i) return i;
54
- if (!a?.length) return null;
55
- let e = [...new Map(a.map((e) => [e?.message, e])).values()];
56
- return e?.length == 1 ? e[0]?.message : /* @__PURE__ */ r("ul", {
57
- className: "ttw:ml-4 ttw:flex ttw:list-disc ttw:flex-col ttw:gap-1",
58
- children: e.map((e, t) => e?.message && /* @__PURE__ */ r("li", { children: e.message }, t))
59
- });
60
- }, [i, a]);
61
- return s ? /* @__PURE__ */ r("div", {
62
- role: "alert",
63
- "data-slot": "field-error",
64
- className: e("ttw:text-sm ttw:font-normal ttw:text-destructive", t),
65
- ...o,
66
- children: s
67
- }) : null;
68
- }
69
- //#endregion
70
- export { s as Field, c as FieldContent, u as FieldError, l as FieldLabel };
1
+ import "./index64.js";
2
+ import "react";
3
+ import "@emotion/react/jsx-runtime";
4
+ import "radix-ui";