@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,27 +1,70 @@
1
1
  import { cn as e } from "./index64.js";
2
- import "react";
3
- import { CircleIcon as t } from "lucide-react";
4
- import { jsx as n } from "@emotion/react/jsx-runtime";
5
- import * as r from "@radix-ui/react-radio-group";
2
+ import { Label as t } from "./index317.js";
3
+ import "./index318.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";
6
7
  //#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index319.js
7
- function i({ className: t, ...i }) {
8
- return /* @__PURE__ */ n(r.Root, {
9
- "data-slot": "radio-group",
10
- className: e("ttw:grid ttw:gap-3", t),
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),
11
30
  ...i
12
31
  });
13
32
  }
14
- function a({ className: i, dotClassName: a, ...o }) {
15
- return /* @__PURE__ */ n(r.Item, {
16
- "data-slot": "radio-group-item",
17
- className: e("ttw:border-input ttw:text-primary ttw:focus-visible:border-ring ttw:focus-visible:ring-ring/50 ttw:aria-invalid:ring-destructive/20 ttw:dark:aria-invalid:ring-destructive/40 ttw:aria-invalid:border-destructive ttw:dark:bg-input/30 ttw:aspect-square ttw:size-4 ttw:shrink-0 ttw:rounded-full ttw:border ttw:shadow-xs ttw:transition-[color,box-shadow] ttw:outline-none ttw:focus-visible:ring-[3px] ttw:disabled:cursor-not-allowed ttw:disabled:opacity-50", i),
18
- ...o,
19
- children: /* @__PURE__ */ n(r.Indicator, {
20
- "data-slot": "radio-group-indicator",
21
- className: "ttw:relative ttw:flex ttw:items-center ttw:justify-center",
22
- children: /* @__PURE__ */ n(t, { className: e("ttw:fill-primary ttw:absolute ttw:top-1/2 ttw:left-1/2 ttw:size-2 ttw:-translate-x-1/2 ttw:-translate-y-1/2", a) })
23
- })
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
+ })]
24
49
  });
25
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
+ }
26
69
  //#endregion
27
- export { i as RadioGroup, a as RadioGroupItem };
70
+ export { s as Field, c as FieldContent, u as FieldError, l as FieldLabel };
@@ -1,212 +1,27 @@
1
- import { useCurrencies as e } from "./index76.js";
2
- import "./index89.js";
3
- import { Input as t } from "./index122.js";
4
- import { InputGroup as n, InputGroupAddon as r, InputGroupInput as i, InputGroupTextarea as a } from "./index124.js";
5
- import { Combobox as o, ComboboxCollection as s, ComboboxContent as c, ComboboxEmpty as l, ComboboxInput as u, ComboboxItem as d, ComboboxList as f } from "./index125.js";
6
- import { Typography as p } from "./index158.js";
7
- import { useGetMeasureUnits as m } from "./index294.js";
8
- import "./index301.js";
9
- import "./index308.js";
10
- import { Label as h } from "./index316.js";
11
- import { Field as g, FieldContent as _, FieldError as v, FieldLabel as y } from "./index318.js";
12
- import { RadioGroup as b, RadioGroupItem as x } from "./index319.js";
13
- import { useCallback as S, useMemo as C, useRef as w } from "react";
14
- import { twMerge as T } from "tailwind-merge";
15
- import { jsx as E, jsxs as D } from "@emotion/react/jsx-runtime";
16
- import { useLingui as O } from "@lingui/react";
17
- import { Controller as k, useFormContext as A } from "react-hook-form";
1
+ import { cn as e } from "./index64.js";
2
+ import "react";
3
+ import { CircleIcon as t } from "lucide-react";
4
+ import { jsx as n } from "@emotion/react/jsx-runtime";
5
+ import * as r from "@radix-ui/react-radio-group";
18
6
  //#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index320.js
19
- var j = ({ isLoading: j, isEditMode: M, isProduct: N }) => {
20
- let { i18n: P } = O(), { getSymbolFromCurrency: F } = e(), I = w(null), { data: L } = m(), R = L?.data ?? [], { control: z, formState: { errors: B } } = A(), V = C(() => R.map((e) => e.id), [R]), H = C(() => new Map(R.map((e) => [e.id, e.name])), [R]), U = S((e) => H.get(e) ?? e, [H]);
21
- return /* @__PURE__ */ D("div", {
22
- className: "ttw:flex ttw:flex-col ttw:gap-4",
23
- children: [
24
- M && /* @__PURE__ */ E("div", {
25
- className: "ttw:flex ttw:items-center ttw:gap-3 ttw:pt-6 ttw:pb-7 ttw:border-b ttw:border-border",
26
- children: /* @__PURE__ */ E(p, {
27
- variant: "body1",
28
- className: "ttw:font-medium",
29
- children: P._("Editing {type} details", { type: N ? "product" : "service" })
30
- })
31
- }),
32
- /* @__PURE__ */ E(k, {
33
- name: "type",
34
- control: z,
35
- render: ({ field: e }) => /* @__PURE__ */ D("div", {
36
- className: "ttw:flex ttw:flex-col ttw:gap-1.5",
37
- children: [/* @__PURE__ */ E(y, { children: P._("Type") }), /* @__PURE__ */ D(b, {
38
- className: "ttw:flex",
39
- value: e.value,
40
- disabled: j,
41
- onValueChange: e.onChange,
42
- children: [/* @__PURE__ */ D("div", {
43
- className: T("ttw:flex ttw:p-4 ttw:flex-1 ttw:gap-2 ttw:border ttw:rounded-xl ttw:border-border ttw:hover:bg-primary/10 ttw:hover:border-primary/30", e.value === "product" && "ttw:bg-primary/10 ttw:border-primary/30"),
44
- children: [/* @__PURE__ */ E(x, {
45
- value: "product",
46
- id: "type-product",
47
- className: T(e.value === "product" ? "ttw:bg-primary" : "ttw:bg-white"),
48
- dotClassName: T(e.value === "product" && "ttw:fill-white"),
49
- disabled: j
50
- }), /* @__PURE__ */ D(h, {
51
- htmlFor: "type-product",
52
- className: "ttw:flex ttw:flex-col ttw:items-start ttw:gap-1.5",
53
- children: [/* @__PURE__ */ E(p, {
54
- variant: "body2",
55
- className: "ttw:leading-3.5",
56
- children: P._("Product")
57
- }), /* @__PURE__ */ E(p, {
58
- variant: "caption",
59
- color: "muted",
60
- children: P._("A physical or digital item")
61
- })]
62
- })]
63
- }), /* @__PURE__ */ D("div", {
64
- className: T("ttw:flex ttw:p-4 ttw:flex-1 ttw:gap-2 ttw:border ttw:rounded-xl ttw:border-border ttw:hover:bg-primary/10 ttw:hover:border-primary/30", e.value === "service" && "ttw:bg-primary/10 ttw:border-primary/30"),
65
- children: [/* @__PURE__ */ E(x, {
66
- value: "service",
67
- id: "type-service",
68
- className: T(e.value === "service" ? "ttw:bg-primary" : "ttw:bg-white"),
69
- dotClassName: T(e.value === "service" && "ttw:fill-white"),
70
- disabled: j
71
- }), /* @__PURE__ */ D(h, {
72
- htmlFor: "type-service",
73
- className: "ttw:flex ttw:flex-col ttw:items-start ttw:gap-1.5",
74
- children: [/* @__PURE__ */ E(p, {
75
- variant: "body2",
76
- className: "ttw:leading-3.5",
77
- children: P._("Service")
78
- }), /* @__PURE__ */ E(p, {
79
- variant: "caption",
80
- color: "muted",
81
- children: P._("Work or labor you provide")
82
- })]
83
- })]
84
- })]
85
- })]
86
- })
87
- }),
88
- /* @__PURE__ */ E(k, {
89
- name: "name",
90
- control: z,
91
- render: ({ field: e, fieldState: { error: n } }) => /* @__PURE__ */ E(g, { children: /* @__PURE__ */ D(_, { children: [
92
- /* @__PURE__ */ E(y, {
93
- htmlFor: e.name,
94
- children: P._("Name")
95
- }),
96
- /* @__PURE__ */ E(t, {
97
- ...e,
98
- id: e.name,
99
- placeholder: P._("e.g. House blend espresso beans"),
100
- className: M ? "ttw:bg-white" : "",
101
- disabled: j,
102
- "aria-invalid": !!n || void 0
103
- }),
104
- /* @__PURE__ */ E(v, { errors: [n] })
105
- ] }) })
106
- }),
107
- /* @__PURE__ */ D("div", {
108
- className: "ttw:w-1/2 ttw:flex ttw:flex-col ttw:gap-1.5",
109
- children: [
110
- /* @__PURE__ */ E(y, { children: P._("Price per unit") }),
111
- /* @__PURE__ */ D("div", {
112
- className: T("ttw:flex ttw:overflow-hidden ttw:rounded-md ttw:border ttw:border-input ttw:shadow-xs ttw:transition-[color,box-shadow]", "ttw:focus-within:border-ring ttw:focus-within:ring-[3px] ttw:focus-within:ring-ring/50", "ttw:has-[[data-slot][aria-invalid=true]]:border-destructive ttw:has-[[data-slot][aria-invalid=true]]:ring-[3px] ttw:has-[[data-slot][aria-invalid=true]]:ring-destructive/20", M && "ttw:bg-white"),
113
- ref: I,
114
- children: [
115
- /* @__PURE__ */ E(k, {
116
- name: "pricePerUnit",
117
- control: z,
118
- render: ({ field: e, fieldState: { error: t } }) => /* @__PURE__ */ D(n, {
119
- className: "ttw:flex-1 ttw:border-0 ttw:shadow-none ttw:rounded-none ttw:has-[[data-slot=input-group-control]:focus-visible]:border-transparent ttw:has-[[data-slot=input-group-control]:focus-visible]:ring-0",
120
- children: [/* @__PURE__ */ E(r, {
121
- align: "inline-start",
122
- children: F("USD")
123
- }), /* @__PURE__ */ E(i, {
124
- type: "number",
125
- name: e.name,
126
- ref: e.ref,
127
- value: e.value ?? "",
128
- onChange: (t) => e.onChange(t.target.value === "" ? void 0 : Number(t.target.value)),
129
- className: "ttw:text-end",
130
- onBlur: e.onBlur,
131
- placeholder: "0.00",
132
- "aria-invalid": !!t || void 0,
133
- disabled: j
134
- })]
135
- })
136
- }),
137
- /* @__PURE__ */ E("div", { className: "ttw:w-px ttw:shrink-0 ttw:bg-border" }),
138
- /* @__PURE__ */ E(k, {
139
- name: "measureUnitId",
140
- control: z,
141
- render: ({ field: e, fieldState: { error: t } }) => /* @__PURE__ */ D(o, {
142
- value: e.value ?? null,
143
- onValueChange: (t) => e.onChange(t ?? void 0),
144
- items: V,
145
- itemToStringLabel: U,
146
- disabled: j,
147
- children: [/* @__PURE__ */ E(u, {
148
- showClear: !!e.value,
149
- placeholder: "-",
150
- disabled: j,
151
- "aria-invalid": !!t || void 0,
152
- className: "ttw:w-28 ttw:border-0 ttw:shadow-none ttw:rounded-none ttw:has-[[data-slot=input-group-control]:focus-visible]:border-transparent ttw:has-[[data-slot=input-group-control]:focus-visible]:ring-0"
153
- }), /* @__PURE__ */ E(c, {
154
- container: I.current,
155
- children: /* @__PURE__ */ D(f, { children: [/* @__PURE__ */ E(l, { children: P._("No units found") }), /* @__PURE__ */ E(s, { children: (e) => /* @__PURE__ */ E(d, {
156
- value: e,
157
- children: U(e)
158
- }, e) })] })
159
- })]
160
- })
161
- })
162
- ]
163
- }),
164
- /* @__PURE__ */ E(v, { errors: [B.pricePerUnit, B.measureUnitId] })
165
- ]
166
- }),
167
- /* @__PURE__ */ E(k, {
168
- name: "description",
169
- control: z,
170
- render: ({ field: e, fieldState: { error: t } }) => /* @__PURE__ */ E(g, {
171
- className: "ttw:block",
172
- children: /* @__PURE__ */ D(_, { children: [
173
- /* @__PURE__ */ D(y, {
174
- htmlFor: e.name,
175
- className: "ttw:gap-1",
176
- children: [P._("Description"), /* @__PURE__ */ E(p, {
177
- variant: "body2",
178
- color: "muted",
179
- className: "ttw:leading-snug",
180
- children: P._("(optional)")
181
- })]
182
- }),
183
- /* @__PURE__ */ D(n, {
184
- className: T(M && "ttw:bg-white"),
185
- children: [/* @__PURE__ */ E(a, {
186
- ...e,
187
- id: e.name,
188
- placeholder: P._("e.g. 16oz whole bean, medium-dark roast, ground to order"),
189
- rows: 4,
190
- maxLength: 255,
191
- disabled: j,
192
- "aria-invalid": !!t || void 0
193
- }), /* @__PURE__ */ E(r, {
194
- align: "block-end",
195
- className: "ttw:cursor-default",
196
- children: /* @__PURE__ */ E(p, {
197
- variant: "caption",
198
- color: "muted",
199
- className: "ttw:leading-none",
200
- children: P._("{count}/255 characters", { count: (e.value ?? "").length })
201
- })
202
- })]
203
- }),
204
- /* @__PURE__ */ E(v, { errors: [t] })
205
- ] })
206
- })
207
- })
208
- ]
7
+ function i({ className: t, ...i }) {
8
+ return /* @__PURE__ */ n(r.Root, {
9
+ "data-slot": "radio-group",
10
+ className: e("ttw:grid ttw:gap-3", t),
11
+ ...i
209
12
  });
210
- };
13
+ }
14
+ function a({ className: i, dotClassName: a, ...o }) {
15
+ return /* @__PURE__ */ n(r.Item, {
16
+ "data-slot": "radio-group-item",
17
+ className: e("ttw:border-input ttw:text-primary ttw:focus-visible:border-ring ttw:focus-visible:ring-ring/50 ttw:aria-invalid:ring-destructive/20 ttw:dark:aria-invalid:ring-destructive/40 ttw:aria-invalid:border-destructive ttw:dark:bg-input/30 ttw:aspect-square ttw:size-4 ttw:shrink-0 ttw:rounded-full ttw:border ttw:shadow-xs ttw:transition-[color,box-shadow] ttw:outline-none ttw:focus-visible:ring-[3px] ttw:disabled:cursor-not-allowed ttw:disabled:opacity-50", i),
18
+ ...o,
19
+ children: /* @__PURE__ */ n(r.Indicator, {
20
+ "data-slot": "radio-group-indicator",
21
+ className: "ttw:relative ttw:flex ttw:items-center ttw:justify-center",
22
+ children: /* @__PURE__ */ n(t, { className: e("ttw:fill-primary ttw:absolute ttw:top-1/2 ttw:left-1/2 ttw:size-2 ttw:-translate-x-1/2 ttw:-translate-y-1/2", a) })
23
+ })
24
+ });
25
+ }
211
26
  //#endregion
212
- export { j as ProductFormContent };
27
+ export { i as RadioGroup, a as RadioGroupItem };
@@ -1,92 +1,212 @@
1
- import { applyAPIValidationErrors as e, parseAPIValidationErrors as t } from "./index25.js";
2
- import { useCurrencies as n } from "./index76.js";
1
+ import { useCurrencies as e } from "./index76.js";
3
2
  import "./index89.js";
4
- import { Button as r } from "./index121.js";
5
- import { LoadingSpinner as i } from "./index67.js";
6
- import "./index251.js";
7
- import { useUpdateProduct as a } from "./index300.js";
8
- import { PRODUCT_API_FIELD_MAP as o } from "./index304.js";
9
- import { getProductValidationSchema as s } from "./index308.js";
10
- import { ProductFormContent as c } from "./index320.js";
11
- import { useCallback as l, useId as u, useMemo as d } from "react";
12
- import { jsx as f, jsxs as p } from "@emotion/react/jsx-runtime";
13
- import { useLingui as m } from "@lingui/react";
14
- import { FormProvider as h, useForm as g } from "react-hook-form";
15
- import { zodResolver as _ } from "@hookform/resolvers/zod";
3
+ import { Input as t } from "./index123.js";
4
+ import { InputGroup as n, InputGroupAddon as r, InputGroupInput as i, InputGroupTextarea as a } from "./index125.js";
5
+ import { Combobox as o, ComboboxCollection as s, ComboboxContent as c, ComboboxEmpty as l, ComboboxInput as u, ComboboxItem as d, ComboboxList as f } from "./index126.js";
6
+ import { Typography as p } from "./index158.js";
7
+ import { useGetMeasureUnits as m } from "./index295.js";
8
+ import "./index302.js";
9
+ import "./index309.js";
10
+ import { Label as h } from "./index317.js";
11
+ import { Field as g, FieldContent as _, FieldError as v, FieldLabel as y } from "./index319.js";
12
+ import { RadioGroup as b, RadioGroupItem as x } from "./index320.js";
13
+ import { useCallback as S, useMemo as C, useRef as w } from "react";
14
+ import { twMerge as T } from "tailwind-merge";
15
+ import { jsx as E, jsxs as D } from "@emotion/react/jsx-runtime";
16
+ import { useLingui as O } from "@lingui/react";
17
+ import { Controller as k, useFormContext as A } from "react-hook-form";
16
18
  //#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index321.js
17
- var v = ({ product: v, handleClose: y, onUpdate: b }) => {
18
- let { i18n: x } = m(), { formatToMinorUnits: S, formatFromMinorUnits: C } = n(), w = `product-edit-form-${u()}`, { mutate: T, isPending: E } = a(v.id), D = d(() => ({
19
- name: v.name,
20
- type: v.type ?? "product",
21
- pricePerUnit: C(v.price?.value, v.price?.currency) ?? void 0,
22
- currency: v.price?.currency ?? "USD",
23
- description: v.description ?? "",
24
- measureUnitId: v.measure_unit_id ?? void 0
25
- }), [
26
- v.name,
27
- v.type,
28
- v.price?.value,
29
- v.price?.currency,
30
- v.description,
31
- v.measure_unit_id,
32
- C
33
- ]), O = g({
34
- resolver: _(s(x)),
35
- defaultValues: D
36
- }), k = l((n) => {
37
- n.preventDefault(), n.stopPropagation(), O.handleSubmit((n) => {
38
- T({
39
- name: n.name,
40
- type: n.type,
41
- price: {
42
- value: S(n.pricePerUnit, n.currency) ?? n.pricePerUnit,
43
- currency: n.currency
44
- },
45
- description: n.description,
46
- ...n.measureUnitId ? { measure_unit_id: n.measureUnitId } : {}
47
- }, {
48
- onSuccess: (e) => {
49
- b?.(e);
50
- },
51
- onError: (n) => {
52
- e(O.setError, t(n), { fieldMap: o });
53
- }
54
- });
55
- })(n);
56
- }, [
57
- T,
58
- S,
59
- b,
60
- O.handleSubmit,
61
- O.setError
62
- ]);
63
- return /* @__PURE__ */ f(h, {
64
- ...O,
65
- children: /* @__PURE__ */ p("form", {
66
- id: w,
67
- onSubmit: k,
68
- className: "ttw:flex ttw:flex-col ttw:gap-4 ttw:p-4 ttw:border ttw:border-primary ttw:rounded-[10px] ttw:bg-zinc-100",
69
- children: [/* @__PURE__ */ f(c, {
70
- isLoading: E,
71
- isProduct: v?.type === "product",
72
- isEditMode: !0
73
- }), /* @__PURE__ */ p("div", {
74
- className: "ttw:flex ttw:gap-4 ttw:pt-6",
75
- children: [/* @__PURE__ */ f(r, {
76
- type: "button",
77
- variant: "outline",
78
- className: "ttw:border-border ttw:flex-1",
79
- onClick: y,
80
- children: x._("Cancel")
81
- }), /* @__PURE__ */ p(r, {
82
- type: "submit",
83
- className: "ttw:flex-1",
84
- disabled: E || !O.formState.isDirty,
85
- children: [E && /* @__PURE__ */ f(i, { className: "ttw:border-white ttw:border-t-transparent ttw:size-4" }), x._("Save")]
86
- })]
87
- })]
88
- })
19
+ var j = ({ isLoading: j, isEditMode: M, isProduct: N }) => {
20
+ let { i18n: P } = O(), { getSymbolFromCurrency: F } = e(), I = w(null), { data: L } = m(), R = L?.data ?? [], { control: z, formState: { errors: B } } = A(), V = C(() => R.map((e) => e.id), [R]), H = C(() => new Map(R.map((e) => [e.id, e.name])), [R]), U = S((e) => H.get(e) ?? e, [H]);
21
+ return /* @__PURE__ */ D("div", {
22
+ className: "ttw:flex ttw:flex-col ttw:gap-4",
23
+ children: [
24
+ M && /* @__PURE__ */ E("div", {
25
+ className: "ttw:flex ttw:items-center ttw:gap-3 ttw:pt-6 ttw:pb-7 ttw:border-b ttw:border-border",
26
+ children: /* @__PURE__ */ E(p, {
27
+ variant: "body1",
28
+ className: "ttw:font-medium",
29
+ children: P._("Editing {type} details", { type: N ? "product" : "service" })
30
+ })
31
+ }),
32
+ /* @__PURE__ */ E(k, {
33
+ name: "type",
34
+ control: z,
35
+ render: ({ field: e }) => /* @__PURE__ */ D("div", {
36
+ className: "ttw:flex ttw:flex-col ttw:gap-1.5",
37
+ children: [/* @__PURE__ */ E(y, { children: P._("Type") }), /* @__PURE__ */ D(b, {
38
+ className: "ttw:flex",
39
+ value: e.value,
40
+ disabled: j,
41
+ onValueChange: e.onChange,
42
+ children: [/* @__PURE__ */ D("div", {
43
+ className: T("ttw:flex ttw:p-4 ttw:flex-1 ttw:gap-2 ttw:border ttw:rounded-xl ttw:border-border ttw:hover:bg-primary/10 ttw:hover:border-primary/30", e.value === "product" && "ttw:bg-primary/10 ttw:border-primary/30"),
44
+ children: [/* @__PURE__ */ E(x, {
45
+ value: "product",
46
+ id: "type-product",
47
+ className: T(e.value === "product" ? "ttw:bg-primary" : "ttw:bg-white"),
48
+ dotClassName: T(e.value === "product" && "ttw:fill-white"),
49
+ disabled: j
50
+ }), /* @__PURE__ */ D(h, {
51
+ htmlFor: "type-product",
52
+ className: "ttw:flex ttw:flex-col ttw:items-start ttw:gap-1.5",
53
+ children: [/* @__PURE__ */ E(p, {
54
+ variant: "body2",
55
+ className: "ttw:leading-3.5",
56
+ children: P._("Product")
57
+ }), /* @__PURE__ */ E(p, {
58
+ variant: "caption",
59
+ color: "muted",
60
+ children: P._("A physical or digital item")
61
+ })]
62
+ })]
63
+ }), /* @__PURE__ */ D("div", {
64
+ className: T("ttw:flex ttw:p-4 ttw:flex-1 ttw:gap-2 ttw:border ttw:rounded-xl ttw:border-border ttw:hover:bg-primary/10 ttw:hover:border-primary/30", e.value === "service" && "ttw:bg-primary/10 ttw:border-primary/30"),
65
+ children: [/* @__PURE__ */ E(x, {
66
+ value: "service",
67
+ id: "type-service",
68
+ className: T(e.value === "service" ? "ttw:bg-primary" : "ttw:bg-white"),
69
+ dotClassName: T(e.value === "service" && "ttw:fill-white"),
70
+ disabled: j
71
+ }), /* @__PURE__ */ D(h, {
72
+ htmlFor: "type-service",
73
+ className: "ttw:flex ttw:flex-col ttw:items-start ttw:gap-1.5",
74
+ children: [/* @__PURE__ */ E(p, {
75
+ variant: "body2",
76
+ className: "ttw:leading-3.5",
77
+ children: P._("Service")
78
+ }), /* @__PURE__ */ E(p, {
79
+ variant: "caption",
80
+ color: "muted",
81
+ children: P._("Work or labor you provide")
82
+ })]
83
+ })]
84
+ })]
85
+ })]
86
+ })
87
+ }),
88
+ /* @__PURE__ */ E(k, {
89
+ name: "name",
90
+ control: z,
91
+ render: ({ field: e, fieldState: { error: n } }) => /* @__PURE__ */ E(g, { children: /* @__PURE__ */ D(_, { children: [
92
+ /* @__PURE__ */ E(y, {
93
+ htmlFor: e.name,
94
+ children: P._("Name")
95
+ }),
96
+ /* @__PURE__ */ E(t, {
97
+ ...e,
98
+ id: e.name,
99
+ placeholder: P._("e.g. House blend espresso beans"),
100
+ className: M ? "ttw:bg-white" : "",
101
+ disabled: j,
102
+ "aria-invalid": !!n || void 0
103
+ }),
104
+ /* @__PURE__ */ E(v, { errors: [n] })
105
+ ] }) })
106
+ }),
107
+ /* @__PURE__ */ D("div", {
108
+ className: "ttw:w-1/2 ttw:flex ttw:flex-col ttw:gap-1.5",
109
+ children: [
110
+ /* @__PURE__ */ E(y, { children: P._("Price per unit") }),
111
+ /* @__PURE__ */ D("div", {
112
+ className: T("ttw:flex ttw:overflow-hidden ttw:rounded-md ttw:border ttw:border-input ttw:shadow-xs ttw:transition-[color,box-shadow]", "ttw:focus-within:border-ring ttw:focus-within:ring-[3px] ttw:focus-within:ring-ring/50", "ttw:has-[[data-slot][aria-invalid=true]]:border-destructive ttw:has-[[data-slot][aria-invalid=true]]:ring-[3px] ttw:has-[[data-slot][aria-invalid=true]]:ring-destructive/20", M && "ttw:bg-white"),
113
+ ref: I,
114
+ children: [
115
+ /* @__PURE__ */ E(k, {
116
+ name: "pricePerUnit",
117
+ control: z,
118
+ render: ({ field: e, fieldState: { error: t } }) => /* @__PURE__ */ D(n, {
119
+ className: "ttw:flex-1 ttw:border-0 ttw:shadow-none ttw:rounded-none ttw:has-[[data-slot=input-group-control]:focus-visible]:border-transparent ttw:has-[[data-slot=input-group-control]:focus-visible]:ring-0",
120
+ children: [/* @__PURE__ */ E(r, {
121
+ align: "inline-start",
122
+ children: F("USD")
123
+ }), /* @__PURE__ */ E(i, {
124
+ type: "number",
125
+ name: e.name,
126
+ ref: e.ref,
127
+ value: e.value ?? "",
128
+ onChange: (t) => e.onChange(t.target.value === "" ? void 0 : Number(t.target.value)),
129
+ className: "ttw:text-end",
130
+ onBlur: e.onBlur,
131
+ placeholder: "0.00",
132
+ "aria-invalid": !!t || void 0,
133
+ disabled: j
134
+ })]
135
+ })
136
+ }),
137
+ /* @__PURE__ */ E("div", { className: "ttw:w-px ttw:shrink-0 ttw:bg-border" }),
138
+ /* @__PURE__ */ E(k, {
139
+ name: "measureUnitId",
140
+ control: z,
141
+ render: ({ field: e, fieldState: { error: t } }) => /* @__PURE__ */ D(o, {
142
+ value: e.value ?? null,
143
+ onValueChange: (t) => e.onChange(t ?? void 0),
144
+ items: V,
145
+ itemToStringLabel: U,
146
+ disabled: j,
147
+ children: [/* @__PURE__ */ E(u, {
148
+ showClear: !!e.value,
149
+ placeholder: "-",
150
+ disabled: j,
151
+ "aria-invalid": !!t || void 0,
152
+ className: "ttw:w-28 ttw:border-0 ttw:shadow-none ttw:rounded-none ttw:has-[[data-slot=input-group-control]:focus-visible]:border-transparent ttw:has-[[data-slot=input-group-control]:focus-visible]:ring-0"
153
+ }), /* @__PURE__ */ E(c, {
154
+ container: I.current,
155
+ children: /* @__PURE__ */ D(f, { children: [/* @__PURE__ */ E(l, { children: P._("No units found") }), /* @__PURE__ */ E(s, { children: (e) => /* @__PURE__ */ E(d, {
156
+ value: e,
157
+ children: U(e)
158
+ }, e) })] })
159
+ })]
160
+ })
161
+ })
162
+ ]
163
+ }),
164
+ /* @__PURE__ */ E(v, { errors: [B.pricePerUnit, B.measureUnitId] })
165
+ ]
166
+ }),
167
+ /* @__PURE__ */ E(k, {
168
+ name: "description",
169
+ control: z,
170
+ render: ({ field: e, fieldState: { error: t } }) => /* @__PURE__ */ E(g, {
171
+ className: "ttw:block",
172
+ children: /* @__PURE__ */ D(_, { children: [
173
+ /* @__PURE__ */ D(y, {
174
+ htmlFor: e.name,
175
+ className: "ttw:gap-1",
176
+ children: [P._("Description"), /* @__PURE__ */ E(p, {
177
+ variant: "body2",
178
+ color: "muted",
179
+ className: "ttw:leading-snug",
180
+ children: P._("(optional)")
181
+ })]
182
+ }),
183
+ /* @__PURE__ */ D(n, {
184
+ className: T(M && "ttw:bg-white"),
185
+ children: [/* @__PURE__ */ E(a, {
186
+ ...e,
187
+ id: e.name,
188
+ placeholder: P._("e.g. 16oz whole bean, medium-dark roast, ground to order"),
189
+ rows: 4,
190
+ maxLength: 255,
191
+ disabled: j,
192
+ "aria-invalid": !!t || void 0
193
+ }), /* @__PURE__ */ E(r, {
194
+ align: "block-end",
195
+ className: "ttw:cursor-default",
196
+ children: /* @__PURE__ */ E(p, {
197
+ variant: "caption",
198
+ color: "muted",
199
+ className: "ttw:leading-none",
200
+ children: P._("{count}/255 characters", { count: (e.value ?? "").length })
201
+ })
202
+ })]
203
+ }),
204
+ /* @__PURE__ */ E(v, { errors: [t] })
205
+ ] })
206
+ })
207
+ })
208
+ ]
89
209
  });
90
210
  };
91
211
  //#endregion
92
- export { v as ProductEditForm };
212
+ export { j as ProductFormContent };