@gyramais/gyra-design 0.2.21 → 0.2.22

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 (308) hide show
  1. package/dist/components/AiParecer/AiParecer.d.ts +75 -0
  2. package/dist/components/AiParecer/index.d.ts +1 -0
  3. package/dist/components/AiParecer/index.js +7 -0
  4. package/dist/components/AiParecer/index.js.map +1 -0
  5. package/dist/components/Email/Email.d.ts +26 -0
  6. package/dist/components/Email/index.d.ts +2 -0
  7. package/dist/components/Email/index.js +2 -0
  8. package/dist/components/Email/index.js.map +1 -0
  9. package/dist/emails/balance-sheet-finalized/components/AiParecer/AiParecer.d.ts +75 -0
  10. package/dist/emails/balance-sheet-finalized/components/AiParecer/index.d.ts +1 -0
  11. package/dist/emails/balance-sheet-finalized/components/Avatar/Avatar.d.ts +10 -0
  12. package/dist/emails/balance-sheet-finalized/components/Avatar/index.d.ts +1 -0
  13. package/dist/emails/balance-sheet-finalized/components/Brasil/Brasil.d.ts +10 -0
  14. package/dist/emails/balance-sheet-finalized/components/Brasil/index.d.ts +1 -0
  15. package/dist/emails/balance-sheet-finalized/components/Button/Button.d.ts +19 -0
  16. package/dist/emails/balance-sheet-finalized/components/Button/index.d.ts +1 -0
  17. package/dist/emails/balance-sheet-finalized/components/Card/Card.d.ts +27 -0
  18. package/dist/emails/balance-sheet-finalized/components/Card/index.d.ts +1 -0
  19. package/dist/emails/balance-sheet-finalized/components/Chart/Chart.d.ts +43 -0
  20. package/dist/emails/balance-sheet-finalized/components/Chart/index.d.ts +1 -0
  21. package/dist/emails/balance-sheet-finalized/components/ChatWidget/ChatMessageBubble.d.ts +7 -0
  22. package/dist/emails/balance-sheet-finalized/components/ChatWidget/ChatWidget.d.ts +30 -0
  23. package/dist/emails/balance-sheet-finalized/components/ChatWidget/index.d.ts +3 -0
  24. package/dist/emails/balance-sheet-finalized/components/ChatWidget/types.d.ts +18 -0
  25. package/dist/emails/balance-sheet-finalized/components/Checkbox/Checkbox.d.ts +12 -0
  26. package/dist/emails/balance-sheet-finalized/components/Checkbox/index.d.ts +1 -0
  27. package/dist/emails/balance-sheet-finalized/components/Col/Col.d.ts +17 -0
  28. package/dist/emails/balance-sheet-finalized/components/Col/index.d.ts +1 -0
  29. package/dist/emails/balance-sheet-finalized/components/Collapse/Collapse.d.ts +10 -0
  30. package/dist/emails/balance-sheet-finalized/components/Collapse/CollapseIcon.d.ts +10 -0
  31. package/dist/emails/balance-sheet-finalized/components/Collapse/index.d.ts +2 -0
  32. package/dist/emails/balance-sheet-finalized/components/ContextMenu/ContextMenu.d.ts +45 -0
  33. package/dist/emails/balance-sheet-finalized/components/ContextMenu/index.d.ts +1 -0
  34. package/dist/emails/balance-sheet-finalized/components/DistributionBar/DistributionBar.d.ts +28 -0
  35. package/dist/emails/balance-sheet-finalized/components/DistributionBar/index.d.ts +1 -0
  36. package/dist/emails/balance-sheet-finalized/components/Divider/Divider.d.ts +10 -0
  37. package/dist/emails/balance-sheet-finalized/components/Divider/index.d.ts +1 -0
  38. package/dist/emails/balance-sheet-finalized/components/Drawer/Drawer.d.ts +16 -0
  39. package/dist/emails/balance-sheet-finalized/components/Drawer/index.d.ts +1 -0
  40. package/dist/emails/balance-sheet-finalized/components/DropdownMenu/DropdownMenu.d.ts +21 -0
  41. package/dist/emails/balance-sheet-finalized/components/DropdownMenu/index.d.ts +1 -0
  42. package/dist/emails/balance-sheet-finalized/components/Email/Email.d.ts +26 -0
  43. package/dist/emails/balance-sheet-finalized/components/Email/index.d.ts +2 -0
  44. package/dist/emails/balance-sheet-finalized/components/Empty/Empty.d.ts +10 -0
  45. package/dist/emails/balance-sheet-finalized/components/Empty/index.d.ts +1 -0
  46. package/dist/emails/balance-sheet-finalized/components/Filter/Filter.d.ts +21 -0
  47. package/dist/emails/balance-sheet-finalized/components/Filter/MultipleFilter.d.ts +27 -0
  48. package/dist/emails/balance-sheet-finalized/components/Filter/UniqueFilter.d.ts +27 -0
  49. package/dist/emails/balance-sheet-finalized/components/Filter/index.d.ts +3 -0
  50. package/dist/emails/balance-sheet-finalized/components/FloatingCard/FloatingCard.d.ts +12 -0
  51. package/dist/emails/balance-sheet-finalized/components/FloatingCard/index.d.ts +1 -0
  52. package/dist/emails/balance-sheet-finalized/components/Form/Form.d.ts +3 -0
  53. package/dist/emails/balance-sheet-finalized/components/Form/Item.d.ts +11 -0
  54. package/dist/emails/balance-sheet-finalized/components/Form/index.d.ts +1 -0
  55. package/dist/emails/balance-sheet-finalized/components/HoverCard/HoverCard.d.ts +14 -0
  56. package/dist/emails/balance-sheet-finalized/components/HoverCard/index.d.ts +1 -0
  57. package/dist/emails/balance-sheet-finalized/components/Icon/Icon.d.ts +11 -0
  58. package/dist/emails/balance-sheet-finalized/components/Icon/index.d.ts +1 -0
  59. package/dist/emails/balance-sheet-finalized/components/IconDisplay/IconDisplay.d.ts +10 -0
  60. package/dist/emails/balance-sheet-finalized/components/IconDisplay/index.d.ts +1 -0
  61. package/dist/emails/balance-sheet-finalized/components/Information/Information.d.ts +10 -0
  62. package/dist/emails/balance-sheet-finalized/components/Information/index.d.ts +1 -0
  63. package/dist/emails/balance-sheet-finalized/components/Input/Input.d.ts +55 -0
  64. package/dist/emails/balance-sheet-finalized/components/Input/Mention.d.ts +5 -0
  65. package/dist/emails/balance-sheet-finalized/components/Input/index.d.ts +1 -0
  66. package/dist/emails/balance-sheet-finalized/components/Label/Label.d.ts +5 -0
  67. package/dist/emails/balance-sheet-finalized/components/Label/index.d.ts +1 -0
  68. package/dist/emails/balance-sheet-finalized/components/Layout/Content.d.ts +9 -0
  69. package/dist/emails/balance-sheet-finalized/components/Layout/Footer.d.ts +9 -0
  70. package/dist/emails/balance-sheet-finalized/components/Layout/Header.d.ts +9 -0
  71. package/dist/emails/balance-sheet-finalized/components/Layout/Layout.d.ts +10 -0
  72. package/dist/emails/balance-sheet-finalized/components/Layout/Sider.d.ts +9 -0
  73. package/dist/emails/balance-sheet-finalized/components/Layout/index.d.ts +5 -0
  74. package/dist/emails/balance-sheet-finalized/components/List/List.d.ts +18 -0
  75. package/dist/emails/balance-sheet-finalized/components/List/index.d.ts +1 -0
  76. package/dist/emails/balance-sheet-finalized/components/Loading/Loading.d.ts +10 -0
  77. package/dist/emails/balance-sheet-finalized/components/Loading/index.d.ts +1 -0
  78. package/dist/emails/balance-sheet-finalized/components/Logo/Logo.d.ts +12 -0
  79. package/dist/emails/balance-sheet-finalized/components/Logo/index.d.ts +1 -0
  80. package/dist/emails/balance-sheet-finalized/components/Menubar/Menubar.d.ts +24 -0
  81. package/dist/emails/balance-sheet-finalized/components/Menubar/index.d.ts +1 -0
  82. package/dist/emails/balance-sheet-finalized/components/Modal/Modal.d.ts +25 -0
  83. package/dist/emails/balance-sheet-finalized/components/Modal/index.d.ts +1 -0
  84. package/dist/emails/balance-sheet-finalized/components/MultiSelectPicker/MultiSelectPicker.d.ts +42 -0
  85. package/dist/emails/balance-sheet-finalized/components/MultiSelectPicker/index.d.ts +1 -0
  86. package/dist/emails/balance-sheet-finalized/components/OperatorPicker/OperatorPicker.d.ts +26 -0
  87. package/dist/emails/balance-sheet-finalized/components/OperatorPicker/index.d.ts +1 -0
  88. package/dist/emails/balance-sheet-finalized/components/PickerPopover/PickerPopover.d.ts +56 -0
  89. package/dist/emails/balance-sheet-finalized/components/PickerPopover/index.d.ts +1 -0
  90. package/dist/emails/balance-sheet-finalized/components/Popover/Popover.d.ts +16 -0
  91. package/dist/emails/balance-sheet-finalized/components/Popover/index.d.ts +1 -0
  92. package/dist/emails/balance-sheet-finalized/components/ProcessingChip/ProcessingChip.d.ts +20 -0
  93. package/dist/emails/balance-sheet-finalized/components/ProcessingChip/index.d.ts +1 -0
  94. package/dist/emails/balance-sheet-finalized/components/Progress/Progress.d.ts +9 -0
  95. package/dist/emails/balance-sheet-finalized/components/Progress/index.d.ts +1 -0
  96. package/dist/emails/balance-sheet-finalized/components/RadioGroup/RadioGroup.d.ts +18 -0
  97. package/dist/emails/balance-sheet-finalized/components/RadioGroup/index.d.ts +1 -0
  98. package/dist/emails/balance-sheet-finalized/components/RichInput/RichInput.d.ts +15 -0
  99. package/dist/emails/balance-sheet-finalized/components/RichInput/images.d.ts +9 -0
  100. package/dist/emails/balance-sheet-finalized/components/RichInput/index.d.ts +1 -0
  101. package/dist/emails/balance-sheet-finalized/components/Row/Row.d.ts +18 -0
  102. package/dist/emails/balance-sheet-finalized/components/Row/index.d.ts +1 -0
  103. package/dist/emails/balance-sheet-finalized/components/RuleSearchPicker/RuleSearchPicker.d.ts +46 -0
  104. package/dist/emails/balance-sheet-finalized/components/RuleSearchPicker/index.d.ts +1 -0
  105. package/dist/emails/balance-sheet-finalized/components/ScoreBar/ScoreBar.d.ts +30 -0
  106. package/dist/emails/balance-sheet-finalized/components/ScoreBar/index.d.ts +1 -0
  107. package/dist/emails/balance-sheet-finalized/components/SegmentedPicker/SegmentedPicker.d.ts +27 -0
  108. package/dist/emails/balance-sheet-finalized/components/SegmentedPicker/index.d.ts +1 -0
  109. package/dist/emails/balance-sheet-finalized/components/SegmentedToggle/SegmentedToggle.d.ts +25 -0
  110. package/dist/emails/balance-sheet-finalized/components/SegmentedToggle/index.d.ts +1 -0
  111. package/dist/emails/balance-sheet-finalized/components/Select/Select.d.ts +27 -0
  112. package/dist/emails/balance-sheet-finalized/components/Select/index.d.ts +1 -0
  113. package/dist/emails/balance-sheet-finalized/components/SelectTree/SelectTree.d.ts +35 -0
  114. package/dist/emails/balance-sheet-finalized/components/SelectTree/index.d.ts +1 -0
  115. package/dist/emails/balance-sheet-finalized/components/Selector/Selector.d.ts +27 -0
  116. package/dist/emails/balance-sheet-finalized/components/Selector/index.d.ts +1 -0
  117. package/dist/emails/balance-sheet-finalized/components/StatusTag/StatusTag.d.ts +16 -0
  118. package/dist/emails/balance-sheet-finalized/components/StatusTag/index.d.ts +1 -0
  119. package/dist/emails/balance-sheet-finalized/components/Stepper/Stepper.d.ts +15 -0
  120. package/dist/emails/balance-sheet-finalized/components/Stepper/index.d.ts +1 -0
  121. package/dist/emails/balance-sheet-finalized/components/Switch/Switch.d.ts +11 -0
  122. package/dist/emails/balance-sheet-finalized/components/Switch/index.d.ts +1 -0
  123. package/dist/emails/balance-sheet-finalized/components/SyncChip/SyncChip.d.ts +17 -0
  124. package/dist/emails/balance-sheet-finalized/components/SyncChip/index.d.ts +1 -0
  125. package/dist/emails/balance-sheet-finalized/components/Table/Table.d.ts +29 -0
  126. package/dist/emails/balance-sheet-finalized/components/Table/index.d.ts +1 -0
  127. package/dist/emails/balance-sheet-finalized/components/Tabs/Tabs.d.ts +20 -0
  128. package/dist/emails/balance-sheet-finalized/components/Tabs/index.d.ts +1 -0
  129. package/dist/emails/balance-sheet-finalized/components/Tag/Tag.d.ts +10 -0
  130. package/dist/emails/balance-sheet-finalized/components/Tag/index.d.ts +1 -0
  131. package/dist/emails/balance-sheet-finalized/components/Toast/Toast.d.ts +4 -0
  132. package/dist/emails/balance-sheet-finalized/components/Toast/index.d.ts +1 -0
  133. package/dist/emails/balance-sheet-finalized/components/Tooltip/Tooltip.d.ts +16 -0
  134. package/dist/emails/balance-sheet-finalized/components/Tooltip/index.d.ts +1 -0
  135. package/dist/emails/balance-sheet-finalized/components/TourGuide/TourGuide.d.ts +39 -0
  136. package/dist/emails/balance-sheet-finalized/components/TourGuide/index.d.ts +1 -0
  137. package/dist/emails/balance-sheet-finalized/components/Waypoint/Waypoint.d.ts +7 -0
  138. package/dist/emails/balance-sheet-finalized/components/Waypoint/index.d.ts +1 -0
  139. package/dist/emails/balance-sheet-finalized/emails/balance-sheet-finalized/index.d.ts +33 -0
  140. package/dist/emails/balance-sheet-finalized/emails/email/index.d.ts +94 -0
  141. package/dist/emails/balance-sheet-finalized/index.d.ts +62 -0
  142. package/dist/emails/balance-sheet-finalized/index.esm.js +2 -0
  143. package/dist/emails/balance-sheet-finalized/index.esm.js.map +1 -0
  144. package/dist/emails/balance-sheet-finalized/index.js +2 -0
  145. package/dist/emails/balance-sheet-finalized/index.js.map +1 -0
  146. package/dist/emails/balance-sheet-finalized/shadcn/checkbox.d.ts +4 -0
  147. package/dist/emails/balance-sheet-finalized/shadcn/form.d.ts +23 -0
  148. package/dist/emails/balance-sheet-finalized/shadcn/hover-card.d.ts +6 -0
  149. package/dist/emails/balance-sheet-finalized/shadcn/label.d.ts +5 -0
  150. package/dist/emails/balance-sheet-finalized/shadcn/lib/utils.d.ts +2 -0
  151. package/dist/emails/balance-sheet-finalized/shadcn/menubar.d.ts +33 -0
  152. package/dist/emails/balance-sheet-finalized/shadcn/popover.d.ts +6 -0
  153. package/dist/emails/balance-sheet-finalized/shadcn/radio-group.d.ts +5 -0
  154. package/dist/emails/balance-sheet-finalized/shadcn/switch.d.ts +4 -0
  155. package/dist/emails/balance-sheet-finalized/shadcn/tabs.d.ts +7 -0
  156. package/dist/emails/balance-sheet-finalized/shadcn/tooltip.d.ts +7 -0
  157. package/dist/emails/balance-sheet-finalized/theme.d.ts +20 -0
  158. package/dist/emails/email/components/AiParecer/AiParecer.d.ts +75 -0
  159. package/dist/emails/email/components/AiParecer/index.d.ts +1 -0
  160. package/dist/emails/email/components/Avatar/Avatar.d.ts +10 -0
  161. package/dist/emails/email/components/Avatar/index.d.ts +1 -0
  162. package/dist/emails/email/components/Brasil/Brasil.d.ts +10 -0
  163. package/dist/emails/email/components/Brasil/index.d.ts +1 -0
  164. package/dist/emails/email/components/Button/Button.d.ts +19 -0
  165. package/dist/emails/email/components/Button/index.d.ts +1 -0
  166. package/dist/emails/email/components/Card/Card.d.ts +27 -0
  167. package/dist/emails/email/components/Card/index.d.ts +1 -0
  168. package/dist/emails/email/components/Chart/Chart.d.ts +43 -0
  169. package/dist/emails/email/components/Chart/index.d.ts +1 -0
  170. package/dist/emails/email/components/ChatWidget/ChatMessageBubble.d.ts +7 -0
  171. package/dist/emails/email/components/ChatWidget/ChatWidget.d.ts +30 -0
  172. package/dist/emails/email/components/ChatWidget/index.d.ts +3 -0
  173. package/dist/emails/email/components/ChatWidget/types.d.ts +18 -0
  174. package/dist/emails/email/components/Checkbox/Checkbox.d.ts +12 -0
  175. package/dist/emails/email/components/Checkbox/index.d.ts +1 -0
  176. package/dist/emails/email/components/Col/Col.d.ts +17 -0
  177. package/dist/emails/email/components/Col/index.d.ts +1 -0
  178. package/dist/emails/email/components/Collapse/Collapse.d.ts +10 -0
  179. package/dist/emails/email/components/Collapse/CollapseIcon.d.ts +10 -0
  180. package/dist/emails/email/components/Collapse/index.d.ts +2 -0
  181. package/dist/emails/email/components/ContextMenu/ContextMenu.d.ts +45 -0
  182. package/dist/emails/email/components/ContextMenu/index.d.ts +1 -0
  183. package/dist/emails/email/components/DistributionBar/DistributionBar.d.ts +28 -0
  184. package/dist/emails/email/components/DistributionBar/index.d.ts +1 -0
  185. package/dist/emails/email/components/Divider/Divider.d.ts +10 -0
  186. package/dist/emails/email/components/Divider/index.d.ts +1 -0
  187. package/dist/emails/email/components/Drawer/Drawer.d.ts +16 -0
  188. package/dist/emails/email/components/Drawer/index.d.ts +1 -0
  189. package/dist/emails/email/components/DropdownMenu/DropdownMenu.d.ts +21 -0
  190. package/dist/emails/email/components/DropdownMenu/index.d.ts +1 -0
  191. package/dist/emails/email/components/Email/Email.d.ts +26 -0
  192. package/dist/emails/email/components/Email/index.d.ts +2 -0
  193. package/dist/emails/email/components/Empty/Empty.d.ts +10 -0
  194. package/dist/emails/email/components/Empty/index.d.ts +1 -0
  195. package/dist/emails/email/components/Filter/Filter.d.ts +21 -0
  196. package/dist/emails/email/components/Filter/MultipleFilter.d.ts +27 -0
  197. package/dist/emails/email/components/Filter/UniqueFilter.d.ts +27 -0
  198. package/dist/emails/email/components/Filter/index.d.ts +3 -0
  199. package/dist/emails/email/components/FloatingCard/FloatingCard.d.ts +12 -0
  200. package/dist/emails/email/components/FloatingCard/index.d.ts +1 -0
  201. package/dist/emails/email/components/Form/Form.d.ts +3 -0
  202. package/dist/emails/email/components/Form/Item.d.ts +11 -0
  203. package/dist/emails/email/components/Form/index.d.ts +1 -0
  204. package/dist/emails/email/components/HoverCard/HoverCard.d.ts +14 -0
  205. package/dist/emails/email/components/HoverCard/index.d.ts +1 -0
  206. package/dist/emails/email/components/Icon/Icon.d.ts +11 -0
  207. package/dist/emails/email/components/Icon/index.d.ts +1 -0
  208. package/dist/emails/email/components/IconDisplay/IconDisplay.d.ts +10 -0
  209. package/dist/emails/email/components/IconDisplay/index.d.ts +1 -0
  210. package/dist/emails/email/components/Information/Information.d.ts +10 -0
  211. package/dist/emails/email/components/Information/index.d.ts +1 -0
  212. package/dist/emails/email/components/Input/Input.d.ts +55 -0
  213. package/dist/emails/email/components/Input/Mention.d.ts +5 -0
  214. package/dist/emails/email/components/Input/index.d.ts +1 -0
  215. package/dist/emails/email/components/Label/Label.d.ts +5 -0
  216. package/dist/emails/email/components/Label/index.d.ts +1 -0
  217. package/dist/emails/email/components/Layout/Content.d.ts +9 -0
  218. package/dist/emails/email/components/Layout/Footer.d.ts +9 -0
  219. package/dist/emails/email/components/Layout/Header.d.ts +9 -0
  220. package/dist/emails/email/components/Layout/Layout.d.ts +10 -0
  221. package/dist/emails/email/components/Layout/Sider.d.ts +9 -0
  222. package/dist/emails/email/components/Layout/index.d.ts +5 -0
  223. package/dist/emails/email/components/List/List.d.ts +18 -0
  224. package/dist/emails/email/components/List/index.d.ts +1 -0
  225. package/dist/emails/email/components/Loading/Loading.d.ts +10 -0
  226. package/dist/emails/email/components/Loading/index.d.ts +1 -0
  227. package/dist/emails/email/components/Logo/Logo.d.ts +12 -0
  228. package/dist/emails/email/components/Logo/index.d.ts +1 -0
  229. package/dist/emails/email/components/Menubar/Menubar.d.ts +24 -0
  230. package/dist/emails/email/components/Menubar/index.d.ts +1 -0
  231. package/dist/emails/email/components/Modal/Modal.d.ts +25 -0
  232. package/dist/emails/email/components/Modal/index.d.ts +1 -0
  233. package/dist/emails/email/components/MultiSelectPicker/MultiSelectPicker.d.ts +42 -0
  234. package/dist/emails/email/components/MultiSelectPicker/index.d.ts +1 -0
  235. package/dist/emails/email/components/OperatorPicker/OperatorPicker.d.ts +26 -0
  236. package/dist/emails/email/components/OperatorPicker/index.d.ts +1 -0
  237. package/dist/emails/email/components/PickerPopover/PickerPopover.d.ts +56 -0
  238. package/dist/emails/email/components/PickerPopover/index.d.ts +1 -0
  239. package/dist/emails/email/components/Popover/Popover.d.ts +16 -0
  240. package/dist/emails/email/components/Popover/index.d.ts +1 -0
  241. package/dist/emails/email/components/ProcessingChip/ProcessingChip.d.ts +20 -0
  242. package/dist/emails/email/components/ProcessingChip/index.d.ts +1 -0
  243. package/dist/emails/email/components/Progress/Progress.d.ts +9 -0
  244. package/dist/emails/email/components/Progress/index.d.ts +1 -0
  245. package/dist/emails/email/components/RadioGroup/RadioGroup.d.ts +18 -0
  246. package/dist/emails/email/components/RadioGroup/index.d.ts +1 -0
  247. package/dist/emails/email/components/RichInput/RichInput.d.ts +15 -0
  248. package/dist/emails/email/components/RichInput/images.d.ts +9 -0
  249. package/dist/emails/email/components/RichInput/index.d.ts +1 -0
  250. package/dist/emails/email/components/Row/Row.d.ts +18 -0
  251. package/dist/emails/email/components/Row/index.d.ts +1 -0
  252. package/dist/emails/email/components/RuleSearchPicker/RuleSearchPicker.d.ts +46 -0
  253. package/dist/emails/email/components/RuleSearchPicker/index.d.ts +1 -0
  254. package/dist/emails/email/components/ScoreBar/ScoreBar.d.ts +30 -0
  255. package/dist/emails/email/components/ScoreBar/index.d.ts +1 -0
  256. package/dist/emails/email/components/SegmentedPicker/SegmentedPicker.d.ts +27 -0
  257. package/dist/emails/email/components/SegmentedPicker/index.d.ts +1 -0
  258. package/dist/emails/email/components/SegmentedToggle/SegmentedToggle.d.ts +25 -0
  259. package/dist/emails/email/components/SegmentedToggle/index.d.ts +1 -0
  260. package/dist/emails/email/components/Select/Select.d.ts +27 -0
  261. package/dist/emails/email/components/Select/index.d.ts +1 -0
  262. package/dist/emails/email/components/SelectTree/SelectTree.d.ts +35 -0
  263. package/dist/emails/email/components/SelectTree/index.d.ts +1 -0
  264. package/dist/emails/email/components/Selector/Selector.d.ts +27 -0
  265. package/dist/emails/email/components/Selector/index.d.ts +1 -0
  266. package/dist/emails/email/components/StatusTag/StatusTag.d.ts +16 -0
  267. package/dist/emails/email/components/StatusTag/index.d.ts +1 -0
  268. package/dist/emails/email/components/Stepper/Stepper.d.ts +15 -0
  269. package/dist/emails/email/components/Stepper/index.d.ts +1 -0
  270. package/dist/emails/email/components/Switch/Switch.d.ts +11 -0
  271. package/dist/emails/email/components/Switch/index.d.ts +1 -0
  272. package/dist/emails/email/components/SyncChip/SyncChip.d.ts +17 -0
  273. package/dist/emails/email/components/SyncChip/index.d.ts +1 -0
  274. package/dist/emails/email/components/Table/Table.d.ts +29 -0
  275. package/dist/emails/email/components/Table/index.d.ts +1 -0
  276. package/dist/emails/email/components/Tabs/Tabs.d.ts +20 -0
  277. package/dist/emails/email/components/Tabs/index.d.ts +1 -0
  278. package/dist/emails/email/components/Tag/Tag.d.ts +10 -0
  279. package/dist/emails/email/components/Tag/index.d.ts +1 -0
  280. package/dist/emails/email/components/Toast/Toast.d.ts +4 -0
  281. package/dist/emails/email/components/Toast/index.d.ts +1 -0
  282. package/dist/emails/email/components/Tooltip/Tooltip.d.ts +16 -0
  283. package/dist/emails/email/components/Tooltip/index.d.ts +1 -0
  284. package/dist/emails/email/components/TourGuide/TourGuide.d.ts +39 -0
  285. package/dist/emails/email/components/TourGuide/index.d.ts +1 -0
  286. package/dist/emails/email/components/Waypoint/Waypoint.d.ts +7 -0
  287. package/dist/emails/email/components/Waypoint/index.d.ts +1 -0
  288. package/dist/emails/email/emails/balance-sheet-finalized/index.d.ts +33 -0
  289. package/dist/emails/email/emails/email/index.d.ts +94 -0
  290. package/dist/emails/email/index.d.ts +62 -0
  291. package/dist/emails/email/index.esm.js +2 -0
  292. package/dist/emails/email/index.esm.js.map +1 -0
  293. package/dist/emails/email/index.js +2 -0
  294. package/dist/emails/email/index.js.map +1 -0
  295. package/dist/emails/email/shadcn/checkbox.d.ts +4 -0
  296. package/dist/emails/email/shadcn/form.d.ts +23 -0
  297. package/dist/emails/email/shadcn/hover-card.d.ts +6 -0
  298. package/dist/emails/email/shadcn/label.d.ts +5 -0
  299. package/dist/emails/email/shadcn/lib/utils.d.ts +2 -0
  300. package/dist/emails/email/shadcn/menubar.d.ts +33 -0
  301. package/dist/emails/email/shadcn/popover.d.ts +6 -0
  302. package/dist/emails/email/shadcn/radio-group.d.ts +5 -0
  303. package/dist/emails/email/shadcn/switch.d.ts +4 -0
  304. package/dist/emails/email/shadcn/tabs.d.ts +7 -0
  305. package/dist/emails/email/shadcn/tooltip.d.ts +7 -0
  306. package/dist/emails/email/theme.d.ts +20 -0
  307. package/dist/index.css +216 -0
  308. package/package.json +1 -1
@@ -0,0 +1,16 @@
1
+ import React from "react";
2
+ import "./index.css";
3
+ type TooltipProps = {
4
+ id?: string;
5
+ className?: string;
6
+ align?: "start" | "center" | "end";
7
+ side?: "top" | "right" | "bottom" | "left";
8
+ sideOffset?: number;
9
+ visible?: boolean;
10
+ content: string | React.ReactNode;
11
+ width?: string | number;
12
+ delayDuration?: number;
13
+ children?: React.ReactNode;
14
+ };
15
+ declare const Tooltip: ({ id, className, align, side, sideOffset, visible, content, width, delayDuration, children, }: TooltipProps) => React.JSX.Element;
16
+ export { Tooltip };
@@ -0,0 +1 @@
1
+ export * from "./Tooltip";
@@ -0,0 +1,39 @@
1
+ import React from 'react';
2
+ import './index.css';
3
+ export type TourStep = {
4
+ title: string;
5
+ body: string;
6
+ targetSelector: string;
7
+ navSection?: string;
8
+ padding?: number;
9
+ /**
10
+ * Como alinhar o alvo ao rolar. 'center' (padrão para alvos pequenos) é
11
+ * imune à altura de toolbars fixas. 'start' é melhor para seções altas.
12
+ * 'nearest' rola o mínimo possível (bom para elementos flutuantes/portais
13
+ * que já estão visíveis, como dropdowns). Se omitido, decidimos pela altura.
14
+ */
15
+ scrollBlock?: 'start' | 'center' | 'nearest';
16
+ /**
17
+ * Efeito colateral ao ENTRAR no passo, disparado depois da navegação e do
18
+ * mount da seção (ex.: abrir um dropdown para destacá-lo). Use junto com
19
+ * targetSelector apontando para o conteúdo revelado.
20
+ */
21
+ onEnter?: () => void;
22
+ /** Limpeza ao SAIR do passo (ex.: fechar o dropdown aberto no onEnter). */
23
+ onLeave?: () => void;
24
+ };
25
+ export type TourGuideProps = {
26
+ steps: TourStep[];
27
+ visible: boolean;
28
+ onClose: () => void;
29
+ onNavigate?: (navSection: string) => void;
30
+ /**
31
+ * Espaço (px) reservado no topo ao rolar alvos altos (block:'start') para que
32
+ * não fiquem atrás de toolbars fixas. Aceita número ou função (recalculada a
33
+ * cada passo) — use a função quando a altura da toolbar varia (wrap/mobile).
34
+ * Alvos pequenos usam block:'center' e ignoram esse valor. Padrão: 0.
35
+ */
36
+ scrollOffsetTop?: number | (() => number);
37
+ className?: string;
38
+ };
39
+ export declare function TourGuide({ steps, visible, onClose, onNavigate, scrollOffsetTop, className, }: TourGuideProps): React.JSX.Element | null;
@@ -0,0 +1 @@
1
+ export * from './TourGuide';
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ type WaypointProps = {
3
+ onEnter?: () => void;
4
+ onLeave?: () => void;
5
+ };
6
+ declare const Waypoint: ({ onEnter, onLeave, }: WaypointProps) => React.JSX.Element;
7
+ export { Waypoint };
@@ -0,0 +1 @@
1
+ export * from "./Waypoint";
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Preset do email "Análise financeira concluída" enviado quando o gyra-ai
3
+ * finaliza a extração de um balanço (feature Finsights — CU-86aherfzc).
4
+ *
5
+ * Esta é uma **camada fina de mapeamento de domínio** sobre o
6
+ * `buildEmail` genérico: recebe os campos crus que o gyra-ai produz
7
+ * (score, risk, recommendation, xlsxUrl, ...) e monta o `EmailLayoutInput`
8
+ * com as decisões visuais (cor do risco, tom do veredito, textos padrão).
9
+ *
10
+ * Pra criar outro preset (ex: `password-reset`, `report-finalized`,
11
+ * `batch-finalized`), criar uma pasta nova em `src/emails/<name>/` que
12
+ * importe `buildEmail` e exporte uma função `<name>Email(payload)` com a
13
+ * mesma assinatura: `{ subject, html }`.
14
+ */
15
+ export type BalanceSheetFinalizedPayload = {
16
+ firstName?: string;
17
+ companyName?: string;
18
+ score?: number | string;
19
+ risk?: string;
20
+ recommendation?: string;
21
+ xlsxUrl?: string;
22
+ reportUrl?: string;
23
+ };
24
+ /**
25
+ * Monta `{ subject, html }` do email "Análise financeira concluída" a
26
+ * partir do payload do gyra-ai (score, risco, recomendação, XLS, etc).
27
+ * Usado pelo gyra-communication (envio via SendGrid) e pelo Storybook
28
+ * (preview).
29
+ */
30
+ export declare function balanceSheetFinalizedEmail(payload: BalanceSheetFinalizedPayload): {
31
+ subject: string;
32
+ html: string;
33
+ };
@@ -0,0 +1,94 @@
1
+ /**
2
+ * Email transacional genérico — Gyra+ design system.
3
+ *
4
+ * **FONTE DA VERDADE** dos layouts de email transacional. Usado por
5
+ * qualquer fluxo que precise mandar email no padrão visual Gyra+:
6
+ * - reset de senha, confirmação de cadastro, alertas internos
7
+ * - finalização de processamento (Finsights, batch-report, etc)
8
+ * - notificações de operação/crédito
9
+ * - convites, mudança de plano, alerts de billing...
10
+ *
11
+ * **TS puro**: sem React, sem DOM, sem browser globals. Apenas funções que
12
+ * retornam string HTML. Funciona igual em qualquer runtime Node (Nest) ou
13
+ * bundle browser (Next).
14
+ *
15
+ * **Email-safe**: tabelas + inline-style (clients ignoram <style> externo,
16
+ * flexbox e Material Symbols). Gradientes têm fallback sólido.
17
+ *
18
+ * Tokens visuais alinhados com gyra-design: azul #1256FF (acao/primary),
19
+ * roxo #7C4EFF (IA/parecer), neutrals Apple-gray, fonte Inter.
20
+ *
21
+ * **Como usar:**
22
+ * ```ts
23
+ * import { buildEmail } from '@gyramais/gyra-design/dist/emails/email';
24
+ *
25
+ * const html = buildEmail({
26
+ * preheader: 'Senha redefinida com sucesso',
27
+ * greeting: 'Olá, Maria',
28
+ * title: 'Sua senha foi redefinida',
29
+ * paragraphs: ['Tudo certo. Você já pode entrar com a nova senha.'],
30
+ * buttons: [{ label: 'Entrar', url: 'https://app.gyramais.com/login' }],
31
+ * footerNote: 'Se não foi você, redefina novamente clicando em "Esqueci minha senha".',
32
+ * });
33
+ * ```
34
+ *
35
+ * Pra emails recorrentes (mesmo conteudo, payload variavel), criar um
36
+ * **preset** em `src/emails/<preset-name>/index.ts` que monta o
37
+ * `EmailLayoutInput` a partir de campos de dominio e delega aqui. Ver
38
+ * `balance-sheet-finalized` como exemplo.
39
+ */
40
+ export type EmailButton = {
41
+ label: string;
42
+ url: string;
43
+ /** primary = botão azul preenchido, secondary = outline. Default primary. */
44
+ variant?: 'primary' | 'secondary';
45
+ };
46
+ export type EmailHighlight = {
47
+ /** label pequeno em cima (ex: "Score", "Nivel de risco"). */
48
+ label: string;
49
+ /** valor grande em baixo (ex: "820", "Baixo"). */
50
+ value: string;
51
+ /** cor do valor (ex: cor do risco). Default: tinta padrao Apple-gray. */
52
+ color?: string;
53
+ };
54
+ /** Tom semantico do chip de veredito do bloco Parecer GYRA+IA. */
55
+ export type AiParecerTone = 'ok' | 'warn' | 'danger' | 'info';
56
+ export type EmailAiParecer = {
57
+ /** chip de veredito (ex: "Médio", "Consistente"). Opcional. */
58
+ verdict?: string;
59
+ verdictTone?: AiParecerTone;
60
+ /** corpo do parecer. */
61
+ text: string;
62
+ /** rodape do bloco (ex: "GYRA+IA · Confiança 96%"). Opcional. */
63
+ footer?: string;
64
+ };
65
+ export type EmailLayoutInput = {
66
+ /** Texto invisivel no preheader (preview no inbox). */
67
+ preheader?: string;
68
+ /** Linha curta acima do titulo (ex: "Olá, Maria"). */
69
+ greeting?: string;
70
+ /** Titulo principal (H1). */
71
+ title: string;
72
+ /** Paragrafos de corpo (sub-frases). */
73
+ paragraphs?: string[];
74
+ /** Cards lado-a-lado (1 a N). Largura dividida igualmente. */
75
+ highlights?: EmailHighlight[];
76
+ /** Bloco "Parecer GYRA+IA" (faixa roxa com chip + texto + rodape). */
77
+ aiParecer?: EmailAiParecer;
78
+ /** Botoes de acao. Multiplos viram lado-a-lado. */
79
+ buttons?: EmailButton[];
80
+ /** Texto pequeno no rodape do card (disclaimer, instrucoes extras). */
81
+ footerNote?: string;
82
+ };
83
+ /**
84
+ * Monta o HTML completo de um email no padrão Gyra+: logo no topo, card
85
+ * principal com greeting + título + parágrafos + highlights (chips lado a
86
+ * lado) + bloco "Parecer GYRA+IA" + botões, e rodapé padrão.
87
+ *
88
+ * Email-safe (tabelas + inline-style, sem flexbox, sem <style>). Funciona
89
+ * em Gmail, Outlook (Windows/Web/Mac), Apple Mail, Thunderbird, mobile.
90
+ *
91
+ * Todas as seções (greeting, paragraphs, highlights, aiParecer, buttons,
92
+ * footerNote) são **opcionais** — só `title` é obrigatório.
93
+ */
94
+ export declare function buildEmail(input: EmailLayoutInput): string;
@@ -0,0 +1,62 @@
1
+ import "./index.css";
2
+ import "react-toastify/dist/ReactToastify.css";
3
+ import "react-modern-drawer/dist/index.css";
4
+ import "react-draft-wysiwyg/dist/react-draft-wysiwyg.css";
5
+ import "react-datepicker/dist/react-datepicker.css";
6
+ import "react-circular-progressbar/dist/styles.css";
7
+ import "./components/AiParecer/index.css";
8
+ import "./components/Avatar/index.css";
9
+ import "./components/Button/index.css";
10
+ import "./components/Card/index.css";
11
+ import "./components/Chart/index.css";
12
+ import "./components/ChatWidget/index.css";
13
+ import "./components/Checkbox/index.css";
14
+ import "./components/Col/index.css";
15
+ import "./components/Collapse/index.css";
16
+ import "./components/Divider/index.css";
17
+ import "./components/DistributionBar/index.css";
18
+ import "./components/Drawer/index.css";
19
+ import "./components/DropdownMenu/index.css";
20
+ import "./components/Empty/index.css";
21
+ import "./components/Filter/index.css";
22
+ import "./components/FloatingCard/index.css";
23
+ import "./components/Form/index.css";
24
+ import "./components/HoverCard/index.css";
25
+ import "./components/Icon/index.css";
26
+ import "./components/IconDisplay/index.css";
27
+ import "./components/Information/index.css";
28
+ import "./components/Input/index.css";
29
+ import "./components/Layout/index.css";
30
+ import "./components/List/index.css";
31
+ import "./components/Loading/index.css";
32
+ import "./components/Logo/index.css";
33
+ import "./components/Menubar/index.css";
34
+ import "./components/Modal/index.css";
35
+ import "./components/Popover/index.css";
36
+ import "./components/ProcessingChip/index.css";
37
+ import "./components/Progress/index.css";
38
+ import "./components/RadioGroup/index.css";
39
+ import "./components/RichInput/index.css";
40
+ import "./components/Row/index.css";
41
+ import "./components/ScoreBar/index.css";
42
+ import "./components/SegmentedPicker/index.css";
43
+ import "./components/SegmentedToggle/index.css";
44
+ import "./components/Select/index.css";
45
+ import "./components/Selector/index.css";
46
+ import "./components/SelectTree/index.css";
47
+ import "./components/PickerPopover/index.css";
48
+ import "./components/MultiSelectPicker/index.css";
49
+ import "./components/RuleSearchPicker/index.css";
50
+ import "./components/OperatorPicker/index.css";
51
+ import "./components/ContextMenu/index.css";
52
+ import "./components/StatusTag/index.css";
53
+ import "./components/Switch/index.css";
54
+ import "./components/SyncChip/index.css";
55
+ import "./components/Table/index.css";
56
+ import "./components/Tabs/index.css";
57
+ import "./components/Tag/index.css";
58
+ import "./components/Tooltip/index.css";
59
+ import "./components/Stepper/index.css";
60
+ import "./components/TourGuide/index.css";
61
+ import theme from "./theme";
62
+ export default theme;
@@ -0,0 +1,2 @@
1
+ const e="#1256FF",t="#7C4EFF",n="#6635E0",a="#F5F5F7",i="#FFFFFF",r="#1D1D1F",o="#636366",l="#8E8E93",d="#D2D2D7",p="#E8E8ED",s="#F6F4FF",c="rgba(124,78,255,0.22)",g={ok:{bg:"#E8F9ED",color:"#1A7D37"},warn:{bg:"#FFF4E0",color:"#946200"},danger:{bg:"#FFEDEC",color:"#C93430"},info:{bg:"#EBF4FF",color:"#0055D4"}},x="'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Arial,sans-serif",h=e=>String(e??"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;"),m=["http:","https:","mailto:","tel:"];function u(t){const n="primary"===(t.variant??"primary"),a=n?"#FFFFFF":e;return`\n <table role="presentation" cellpadding="0" cellspacing="0" style="margin:8px 8px 0 0;display:inline-block;">\n <tr>\n <td style="border-radius:10px;background:${n?e:i};border:1px solid ${n?e:d};">\n <a href="${h(function(e){try{const t=new URL(String(e));return m.includes(t.protocol)?t.href:"#"}catch{return"#"}}(t.url))}" target="_blank"\n style="display:inline-block;padding:12px 22px;font-family:${x};font-size:14px;font-weight:600;color:${a};text-decoration:none;border-radius:10px;">\n ${h(t.label)}\n </a>\n </td>\n </tr>\n </table>`}function f(e){const{preheader:d,greeting:m,title:f,paragraphs:b=[],highlights:$=[],aiParecer:y,buttons:v=[],footerNote:F}=e,w=$.length?Math.floor(100/$.length):100,A=$.length?`<table role="presentation" width="100%" cellpadding="0" cellspacing="0" style="margin:8px 0 4px;"><tr>${$.map(e=>function(e,t){return`\n <td width="${t}%" style="padding:6px;" valign="top">\n <table role="presentation" width="100%" cellpadding="0" cellspacing="0"\n style="background:#FAFAFA;border:1px solid ${p};border-radius:12px;">\n <tr><td style="padding:14px 16px;font-family:${x};">\n <div style="font-size:12px;color:${o};margin-bottom:4px;">${h(e.label)}</div>\n <div style="font-size:22px;font-weight:700;color:${e.color||r};font-family:'Lexend',${x};">${h(e.value)}</div>\n </td></tr>\n </table>\n </td>`}(e,w)).join("")}</tr></table>`:"",k=b.map(e=>`<p style="margin:0 0 14px;font-family:${x};font-size:15px;line-height:1.6;color:${o};">${h(e)}</p>`).join(""),E=v.length?`<div style="margin-top:18px;">${v.map(u).join("")}</div>`:"";return`<!DOCTYPE html>\n<html lang="pt-BR">\n<head>\n <meta charset="utf-8" />\n <meta name="viewport" content="width=device-width,initial-scale=1.0" />\n <meta http-equiv="X-UA-Compatible" content="IE=edge" />\n <title>${h(f)}</title>\n</head>\n<body style="margin:0;padding:0;background:${a};">\n ${d?`<div style="display:none;max-height:0;overflow:hidden;opacity:0;">${h(d)}</div>`:""}\n <table role="presentation" width="100%" cellpadding="0" cellspacing="0" style="background:${a};padding:24px 0;">\n <tr>\n <td align="center">\n <table role="presentation" width="600" cellpadding="0" cellspacing="0" style="width:600px;max-width:92%;">\n <tr>\n <td style="padding:8px 4px 20px;">\n <img src="https://gyra-file-prod.s3.us-west-2.amazonaws.com/assets/gyra-logo-color.png" alt="GYRA+" height="30" style="height:30px;display:block;" />\n </td>\n </tr>\n <tr>\n <td style="background:${i};border:1px solid ${p};border-radius:16px;padding:32px;">\n ${m?`<p style="margin:0 0 6px;font-family:${x};font-size:14px;color:${o};">${h(m)}</p>`:""}\n <h1 style="margin:0 0 18px;font-family:'Lexend',${x};font-size:23px;line-height:1.3;color:${r};">${h(f)}</h1>\n ${k}\n ${A}\n ${y?function(e){const a=e.verdict?(()=>{const t=g[e.verdictTone||"info"];return`<table role="presentation" cellpadding="0" cellspacing="0" style="display:inline-block;"><tr>\n <td style="background:${t.bg};border-radius:999px;padding:4px 10px;font-family:${x};font-size:11px;font-weight:700;letter-spacing:0.04em;text-transform:uppercase;color:${t.color};white-space:nowrap;">${h(e.verdict)}</td></tr></table>`})():"";return`\n <table role="presentation" width="100%" cellpadding="0" cellspacing="0"\n style="margin:18px 0 4px;background:${s};border:1px solid ${c};border-radius:12px;">\n <tr><td style="padding:16px 18px;font-family:${x};">\n <table role="presentation" width="100%" cellpadding="0" cellspacing="0"><tr>\n <td valign="middle" width="28">\n <div style="width:22px;height:22px;border-radius:50%;background:${t};color:#fff;text-align:center;line-height:22px;font-size:13px;">&#10022;</div>\n </td>\n <td valign="middle" style="padding-left:8px;">\n <span style="font-size:11px;font-weight:700;letter-spacing:0.06em;text-transform:uppercase;color:${n};">Parecer GYRA+IA</span>\n </td>\n <td valign="middle" align="right">${a}</td>\n </tr></table>\n <p style="margin:10px 0 0;font-size:14px;line-height:1.55;color:${o};">${h(e.text)}</p>\n ${e.footer?`<div style="margin-top:10px;padding-top:10px;border-top:1px dashed ${c};font-size:11px;color:${l};">${h(e.footer)}</div>`:""}\n </td></tr>\n </table>`}(y):""}\n ${E}\n </td>\n </tr>\n <tr>\n <td style="padding:20px 8px;font-family:${x};font-size:12px;line-height:1.5;color:${l};">\n <p style="margin:0 0 8px;">${h(F)}</p>\n <p style="margin:0;">GYRA+ • Esta é uma mensagem automática, não responda este email.</p>\n </td>\n </tr>\n </table>\n </td>\n </tr>\n </table>\n</body>\n</html>`}function b(e){const t=(e||"").toLowerCase();return t.includes("muito")&&t.includes("alto")?"#C93430":t.includes("alto")||t.includes("medio")||t.includes("médio")?"#946200":t.includes("baixo")?"#1A7D37":"#1D1D1F"}function $(e){const t=(e||"").toLowerCase();return t.includes("alto")?"danger":t.includes("medio")||t.includes("médio")?"warn":t.includes("baixo")?"ok":"info"}function y(e){const{firstName:t,companyName:n,score:a,risk:i,recommendation:r,xlsxUrl:o,reportUrl:l}=e,d=n||"a empresa analisada",p="Análise financeira concluída"+(n?` — ${n}`:""),s=[];null!=a&&""!=`${a}`&&s.push({label:"Score GYRA+IA",value:`${a}`}),i&&s.push({label:"Nível de risco",value:i,color:b(i)});const c=[];o&&c.push({label:"Baixar análise (Excel)",url:o,variant:"primary"}),l&&c.push({label:"Ver relatório",url:l,variant:"secondary"});return{subject:p,html:f({preheader:p,greeting:t?`Olá, ${t}`:void 0,title:"Sua análise financeira está pronta",paragraphs:[`A análise financeira de ${d} foi processada com sucesso pela GYRA+IA.`],highlights:s,aiParecer:r?{verdict:i||void 0,verdictTone:$(i),text:r,footer:"GYRA+IA · gerado a partir do balanço enviado"}:void 0,buttons:c,footerNote:"Os valores e a recomendação são gerados por IA a partir do balanço enviado e devem ser revisados pelo analista."})}}export{y as balanceSheetFinalizedEmail};
2
+ //# sourceMappingURL=index.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.esm.js","sources":["../../../src/emails/email/index.ts","../../../src/emails/balance-sheet-finalized/index.ts"],"sourcesContent":["/**\n * Email transacional genérico — Gyra+ design system.\n *\n * **FONTE DA VERDADE** dos layouts de email transacional. Usado por\n * qualquer fluxo que precise mandar email no padrão visual Gyra+:\n * - reset de senha, confirmação de cadastro, alertas internos\n * - finalização de processamento (Finsights, batch-report, etc)\n * - notificações de operação/crédito\n * - convites, mudança de plano, alerts de billing...\n *\n * **TS puro**: sem React, sem DOM, sem browser globals. Apenas funções que\n * retornam string HTML. Funciona igual em qualquer runtime Node (Nest) ou\n * bundle browser (Next).\n *\n * **Email-safe**: tabelas + inline-style (clients ignoram <style> externo,\n * flexbox e Material Symbols). Gradientes têm fallback sólido.\n *\n * Tokens visuais alinhados com gyra-design: azul #1256FF (acao/primary),\n * roxo #7C4EFF (IA/parecer), neutrals Apple-gray, fonte Inter.\n *\n * **Como usar:**\n * ```ts\n * import { buildEmail } from '@gyramais/gyra-design/dist/emails/email';\n *\n * const html = buildEmail({\n * preheader: 'Senha redefinida com sucesso',\n * greeting: 'Olá, Maria',\n * title: 'Sua senha foi redefinida',\n * paragraphs: ['Tudo certo. Você já pode entrar com a nova senha.'],\n * buttons: [{ label: 'Entrar', url: 'https://app.gyramais.com/login' }],\n * footerNote: 'Se não foi você, redefina novamente clicando em \"Esqueci minha senha\".',\n * });\n * ```\n *\n * Pra emails recorrentes (mesmo conteudo, payload variavel), criar um\n * **preset** em `src/emails/<preset-name>/index.ts` que monta o\n * `EmailLayoutInput` a partir de campos de dominio e delega aqui. Ver\n * `balance-sheet-finalized` como exemplo.\n */\n\n// ── Tipos publicos ─────────────────────────────────────────────────────────\n\nexport type EmailButton = {\n label: string;\n url: string;\n /** primary = botão azul preenchido, secondary = outline. Default primary. */\n variant?: 'primary' | 'secondary';\n};\n\nexport type EmailHighlight = {\n /** label pequeno em cima (ex: \"Score\", \"Nivel de risco\"). */\n label: string;\n /** valor grande em baixo (ex: \"820\", \"Baixo\"). */\n value: string;\n /** cor do valor (ex: cor do risco). Default: tinta padrao Apple-gray. */\n color?: string;\n};\n\n/** Tom semantico do chip de veredito do bloco Parecer GYRA+IA. */\nexport type AiParecerTone = 'ok' | 'warn' | 'danger' | 'info';\n\nexport type EmailAiParecer = {\n /** chip de veredito (ex: \"Médio\", \"Consistente\"). Opcional. */\n verdict?: string;\n verdictTone?: AiParecerTone;\n /** corpo do parecer. */\n text: string;\n /** rodape do bloco (ex: \"GYRA+IA · Confiança 96%\"). Opcional. */\n footer?: string;\n};\n\nexport type EmailLayoutInput = {\n /** Texto invisivel no preheader (preview no inbox). */\n preheader?: string;\n /** Linha curta acima do titulo (ex: \"Olá, Maria\"). */\n greeting?: string;\n /** Titulo principal (H1). */\n title: string;\n /** Paragrafos de corpo (sub-frases). */\n paragraphs?: string[];\n /** Cards lado-a-lado (1 a N). Largura dividida igualmente. */\n highlights?: EmailHighlight[];\n /** Bloco \"Parecer GYRA+IA\" (faixa roxa com chip + texto + rodape). */\n aiParecer?: EmailAiParecer;\n /** Botoes de acao. Multiplos viram lado-a-lado. */\n buttons?: EmailButton[];\n /** Texto pequeno no rodape do card (disclaimer, instrucoes extras). */\n footerNote?: string;\n};\n\n// ── Tokens (espelho de gyra-design CSS variables, hard-coded pra email) ────\n\nconst C = {\n blue: '#1256FF',\n teal: '#1FB58A',\n aiPurple: '#7C4EFF',\n aiPurpleText: '#6635E0',\n bg: '#F5F5F7',\n card: '#FFFFFF',\n fg1: '#1D1D1F',\n fg2: '#636366',\n fg3: '#8E8E93',\n border: '#D2D2D7',\n borderSubtle: '#E8E8ED',\n aiCardBg: '#F6F4FF',\n aiBorder: 'rgba(124,78,255,0.22)',\n};\n\nconst VERDICT: Record<AiParecerTone, { bg: string; color: string }> = {\n ok: { bg: '#E8F9ED', color: '#1A7D37' },\n warn: { bg: '#FFF4E0', color: '#946200' },\n danger: { bg: '#FFEDEC', color: '#C93430' },\n info: { bg: '#EBF4FF', color: '#0055D4' },\n};\n\nconst FONT =\n \"'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Arial,sans-serif\";\n\nconst LOGO_URL =\n 'https://gyra-file-prod.s3.us-west-2.amazonaws.com/assets/gyra-logo-color.png';\n\n// ── Helpers internos ───────────────────────────────────────────────────────\n\nconst esc = (s: string): string =>\n String(s ?? '')\n .replace(/&/g, '&amp;')\n .replace(/</g, '&lt;')\n .replace(/>/g, '&gt;')\n .replace(/\"/g, '&quot;')\n .replace(/'/g, '&#39;');\n\n/**\n * Só permite http(s). Bloqueia schemes perigosos (javascript:, data:)\n * que poderiam virar href executável. URL inválida vira '#'.\n */\nconst SAFE_URL_PROTOCOLS = ['http:', 'https:', 'mailto:', 'tel:'];\n\nfunction safeUrl(url: string): string {\n try {\n const u = new URL(String(url));\n // mailto:/tel: sao comuns e seguros em emails transacionais (contato,\n // suporte, telefone). Demais protocolos (javascript:, data:) viram '#'.\n return SAFE_URL_PROTOCOLS.includes(u.protocol) ? u.href : '#';\n } catch {\n return '#';\n }\n}\n\nfunction renderButton(btn: EmailButton): string {\n const isPrimary = (btn.variant ?? 'primary') === 'primary';\n const bg = isPrimary ? C.blue : C.card;\n const color = isPrimary ? '#FFFFFF' : C.blue;\n const border = isPrimary ? C.blue : C.border;\n return `\n <table role=\"presentation\" cellpadding=\"0\" cellspacing=\"0\" style=\"margin:8px 8px 0 0;display:inline-block;\">\n <tr>\n <td style=\"border-radius:10px;background:${bg};border:1px solid ${border};\">\n <a href=\"${esc(safeUrl(btn.url))}\" target=\"_blank\"\n style=\"display:inline-block;padding:12px 22px;font-family:${FONT};font-size:14px;font-weight:600;color:${color};text-decoration:none;border-radius:10px;\">\n ${esc(btn.label)}\n </a>\n </td>\n </tr>\n </table>`;\n}\n\nfunction renderHighlight(h: EmailHighlight, widthPct: number): string {\n return `\n <td width=\"${widthPct}%\" style=\"padding:6px;\" valign=\"top\">\n <table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\"\n style=\"background:#FAFAFA;border:1px solid ${C.borderSubtle};border-radius:12px;\">\n <tr><td style=\"padding:14px 16px;font-family:${FONT};\">\n <div style=\"font-size:12px;color:${C.fg2};margin-bottom:4px;\">${esc(h.label)}</div>\n <div style=\"font-size:22px;font-weight:700;color:${h.color || C.fg1};font-family:'Lexend',${FONT};\">${esc(h.value)}</div>\n </td></tr>\n </table>\n </td>`;\n}\n\nfunction renderAiParecer(p: EmailAiParecer): string {\n const v = p.verdict\n ? (() => {\n const t = VERDICT[p.verdictTone || 'info'];\n // table/td (Outlook ignora padding/border-radius em <span>).\n return `<table role=\"presentation\" cellpadding=\"0\" cellspacing=\"0\" style=\"display:inline-block;\"><tr>\n <td style=\"background:${t.bg};border-radius:999px;padding:4px 10px;font-family:${FONT};font-size:11px;font-weight:700;letter-spacing:0.04em;text-transform:uppercase;color:${t.color};white-space:nowrap;\">${esc(\n p.verdict,\n )}</td></tr></table>`;\n })()\n : '';\n return `\n <table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\"\n style=\"margin:18px 0 4px;background:${C.aiCardBg};border:1px solid ${C.aiBorder};border-radius:12px;\">\n <tr><td style=\"padding:16px 18px;font-family:${FONT};\">\n <table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\"><tr>\n <td valign=\"middle\" width=\"28\">\n <div style=\"width:22px;height:22px;border-radius:50%;background:${C.aiPurple};color:#fff;text-align:center;line-height:22px;font-size:13px;\">&#10022;</div>\n </td>\n <td valign=\"middle\" style=\"padding-left:8px;\">\n <span style=\"font-size:11px;font-weight:700;letter-spacing:0.06em;text-transform:uppercase;color:${C.aiPurpleText};\">Parecer GYRA+IA</span>\n </td>\n <td valign=\"middle\" align=\"right\">${v}</td>\n </tr></table>\n <p style=\"margin:10px 0 0;font-size:14px;line-height:1.55;color:${C.fg2};\">${esc(p.text)}</p>\n ${\n p.footer\n ? `<div style=\"margin-top:10px;padding-top:10px;border-top:1px dashed ${C.aiBorder};font-size:11px;color:${C.fg3};\">${esc(\n p.footer,\n )}</div>`\n : ''\n }\n </td></tr>\n </table>`;\n}\n\n// ── API publica ────────────────────────────────────────────────────────────\n\n/**\n * Monta o HTML completo de um email no padrão Gyra+: logo no topo, card\n * principal com greeting + título + parágrafos + highlights (chips lado a\n * lado) + bloco \"Parecer GYRA+IA\" + botões, e rodapé padrão.\n *\n * Email-safe (tabelas + inline-style, sem flexbox, sem <style>). Funciona\n * em Gmail, Outlook (Windows/Web/Mac), Apple Mail, Thunderbird, mobile.\n *\n * Todas as seções (greeting, paragraphs, highlights, aiParecer, buttons,\n * footerNote) são **opcionais** — só `title` é obrigatório.\n */\nexport function buildEmail(input: EmailLayoutInput): string {\n const {\n preheader,\n greeting,\n title,\n paragraphs = [],\n highlights = [],\n aiParecer,\n buttons = [],\n footerNote,\n } = input;\n\n const highlightWidth = highlights.length\n ? Math.floor(100 / highlights.length)\n : 100;\n const highlightsRow = highlights.length\n ? `<table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" style=\"margin:8px 0 4px;\"><tr>${highlights\n .map((h) => renderHighlight(h, highlightWidth))\n .join('')}</tr></table>`\n : '';\n\n const paragraphsHtml = paragraphs\n .map(\n (p) =>\n `<p style=\"margin:0 0 14px;font-family:${FONT};font-size:15px;line-height:1.6;color:${C.fg2};\">${esc(\n p,\n )}</p>`,\n )\n .join('');\n\n const buttonsHtml = buttons.length\n ? `<div style=\"margin-top:18px;\">${buttons.map(renderButton).join('')}</div>`\n : '';\n\n return `<!DOCTYPE html>\n<html lang=\"pt-BR\">\n<head>\n <meta charset=\"utf-8\" />\n <meta name=\"viewport\" content=\"width=device-width,initial-scale=1.0\" />\n <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\" />\n <title>${esc(title)}</title>\n</head>\n<body style=\"margin:0;padding:0;background:${C.bg};\">\n ${\n preheader\n ? `<div style=\"display:none;max-height:0;overflow:hidden;opacity:0;\">${esc(preheader)}</div>`\n : ''\n }\n <table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" style=\"background:${C.bg};padding:24px 0;\">\n <tr>\n <td align=\"center\">\n <table role=\"presentation\" width=\"600\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:600px;max-width:92%;\">\n <tr>\n <td style=\"padding:8px 4px 20px;\">\n <img src=\"${LOGO_URL}\" alt=\"GYRA+\" height=\"30\" style=\"height:30px;display:block;\" />\n </td>\n </tr>\n <tr>\n <td style=\"background:${C.card};border:1px solid ${C.borderSubtle};border-radius:16px;padding:32px;\">\n ${\n greeting\n ? `<p style=\"margin:0 0 6px;font-family:${FONT};font-size:14px;color:${C.fg2};\">${esc(\n greeting,\n )}</p>`\n : ''\n }\n <h1 style=\"margin:0 0 18px;font-family:'Lexend',${FONT};font-size:23px;line-height:1.3;color:${C.fg1};\">${esc(\n title,\n )}</h1>\n ${paragraphsHtml}\n ${highlightsRow}\n ${aiParecer ? renderAiParecer(aiParecer) : ''}\n ${buttonsHtml}\n </td>\n </tr>\n <tr>\n <td style=\"padding:20px 8px;font-family:${FONT};font-size:12px;line-height:1.5;color:${C.fg3};\">\n ${\n footerNote\n ? `<p style=\"margin:0 0 8px;\">${esc(footerNote)}</p>`\n : ''\n }\n <p style=\"margin:0;\">GYRA+ • Esta é uma mensagem automática, não responda este email.</p>\n </td>\n </tr>\n </table>\n </td>\n </tr>\n </table>\n</body>\n</html>`;\n}\n","/**\n * Preset do email \"Análise financeira concluída\" enviado quando o gyra-ai\n * finaliza a extração de um balanço (feature Finsights — CU-86aherfzc).\n *\n * Esta é uma **camada fina de mapeamento de domínio** sobre o\n * `buildEmail` genérico: recebe os campos crus que o gyra-ai produz\n * (score, risk, recommendation, xlsxUrl, ...) e monta o `EmailLayoutInput`\n * com as decisões visuais (cor do risco, tom do veredito, textos padrão).\n *\n * Pra criar outro preset (ex: `password-reset`, `report-finalized`,\n * `batch-finalized`), criar uma pasta nova em `src/emails/<name>/` que\n * importe `buildEmail` e exporte uma função `<name>Email(payload)` com a\n * mesma assinatura: `{ subject, html }`.\n */\n\nimport { buildEmail, AiParecerTone, EmailButton, EmailHighlight } from '../email';\n\nexport type BalanceSheetFinalizedPayload = {\n firstName?: string;\n companyName?: string;\n score?: number | string;\n risk?: string;\n recommendation?: string;\n xlsxUrl?: string;\n reportUrl?: string;\n};\n\n/** Mapeia nível de risco textual -> cor do chip de score. */\nfunction riskColor(risk?: string): string {\n const r = (risk || '').toLowerCase();\n if (r.includes('muito') && r.includes('alto')) return '#C93430';\n if (r.includes('alto')) return '#946200';\n if (r.includes('medio') || r.includes('médio')) return '#946200';\n if (r.includes('baixo')) return '#1A7D37';\n return '#1D1D1F';\n}\n\n/** Risco -> tom do veredito do Parecer de IA. */\nfunction riskTone(risk?: string): AiParecerTone {\n const r = (risk || '').toLowerCase();\n if (r.includes('alto')) return 'danger';\n if (r.includes('medio') || r.includes('médio')) return 'warn';\n if (r.includes('baixo')) return 'ok';\n return 'info';\n}\n\n/**\n * Monta `{ subject, html }` do email \"Análise financeira concluída\" a\n * partir do payload do gyra-ai (score, risco, recomendação, XLS, etc).\n * Usado pelo gyra-communication (envio via SendGrid) e pelo Storybook\n * (preview).\n */\nexport function balanceSheetFinalizedEmail(\n payload: BalanceSheetFinalizedPayload,\n): { subject: string; html: string } {\n const {\n firstName,\n companyName,\n score,\n risk,\n recommendation,\n xlsxUrl,\n reportUrl,\n } = payload;\n\n const empresa = companyName || 'a empresa analisada';\n const subject = `Análise financeira concluída${companyName ? ` — ${companyName}` : ''}`;\n\n const highlights: EmailHighlight[] = [];\n if (score !== undefined && score !== null && `${score}` !== '') {\n highlights.push({ label: 'Score GYRA+IA', value: `${score}` });\n }\n if (risk) {\n highlights.push({\n label: 'Nível de risco',\n value: risk,\n color: riskColor(risk),\n });\n }\n\n const buttons: EmailButton[] = [];\n if (xlsxUrl) {\n buttons.push({\n label: 'Baixar análise (Excel)',\n url: xlsxUrl,\n variant: 'primary',\n });\n }\n if (reportUrl) {\n buttons.push({\n label: 'Ver relatório',\n url: reportUrl,\n variant: 'secondary',\n });\n }\n\n const html = buildEmail({\n preheader: subject,\n greeting: firstName ? `Olá, ${firstName}` : undefined,\n title: 'Sua análise financeira está pronta',\n paragraphs: [\n `A análise financeira de ${empresa} foi processada com sucesso pela GYRA+IA.`,\n ],\n highlights,\n aiParecer: recommendation\n ? {\n verdict: risk || undefined,\n verdictTone: riskTone(risk),\n text: recommendation,\n footer: 'GYRA+IA · gerado a partir do balanço enviado',\n }\n : undefined,\n buttons,\n footerNote:\n 'Os valores e a recomendação são gerados por IA a partir do balanço enviado e devem ser revisados pelo analista.',\n });\n\n return { subject, html };\n}\n"],"names":["C","VERDICT","ok","bg","color","warn","danger","info","FONT","esc","s","String","replace","SAFE_URL_PROTOCOLS","renderButton","btn","isPrimary","variant","url","u","URL","includes","protocol","href","safeUrl","label","buildEmail","input","preheader","greeting","title","paragraphs","highlights","aiParecer","buttons","footerNote","highlightWidth","length","Math","floor","highlightsRow","map","h","widthPct","value","renderHighlight","join","paragraphsHtml","p","buttonsHtml","v","verdict","t","verdictTone","text","footer","renderAiParecer","riskColor","risk","r","toLowerCase","riskTone","balanceSheetFinalizedEmail","payload","firstName","companyName","score","recommendation","xlsxUrl","reportUrl","empresa","subject","push","html","undefined"],"mappings":"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"}
@@ -0,0 +1,2 @@
1
+ "use strict";const e="#1256FF",t="#7C4EFF",n="#6635E0",a="#F5F5F7",i="#FFFFFF",l="#1D1D1F",r="#636366",o="#8E8E93",d="#D2D2D7",p="#E8E8ED",s="#F6F4FF",c="rgba(124,78,255,0.22)",g={ok:{bg:"#E8F9ED",color:"#1A7D37"},warn:{bg:"#FFF4E0",color:"#946200"},danger:{bg:"#FFEDEC",color:"#C93430"},info:{bg:"#EBF4FF",color:"#0055D4"}},x="'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Arial,sans-serif",h=e=>String(e??"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;"),m=["http:","https:","mailto:","tel:"];function u(t){const n="primary"===(t.variant??"primary"),a=n?"#FFFFFF":e;return`\n <table role="presentation" cellpadding="0" cellspacing="0" style="margin:8px 8px 0 0;display:inline-block;">\n <tr>\n <td style="border-radius:10px;background:${n?e:i};border:1px solid ${n?e:d};">\n <a href="${h(function(e){try{const t=new URL(String(e));return m.includes(t.protocol)?t.href:"#"}catch{return"#"}}(t.url))}" target="_blank"\n style="display:inline-block;padding:12px 22px;font-family:${x};font-size:14px;font-weight:600;color:${a};text-decoration:none;border-radius:10px;">\n ${h(t.label)}\n </a>\n </td>\n </tr>\n </table>`}function f(e){const{preheader:d,greeting:m,title:f,paragraphs:b=[],highlights:$=[],aiParecer:y,buttons:v=[],footerNote:F}=e,w=$.length?Math.floor(100/$.length):100,A=$.length?`<table role="presentation" width="100%" cellpadding="0" cellspacing="0" style="margin:8px 0 4px;"><tr>${$.map(e=>function(e,t){return`\n <td width="${t}%" style="padding:6px;" valign="top">\n <table role="presentation" width="100%" cellpadding="0" cellspacing="0"\n style="background:#FAFAFA;border:1px solid ${p};border-radius:12px;">\n <tr><td style="padding:14px 16px;font-family:${x};">\n <div style="font-size:12px;color:${r};margin-bottom:4px;">${h(e.label)}</div>\n <div style="font-size:22px;font-weight:700;color:${e.color||l};font-family:'Lexend',${x};">${h(e.value)}</div>\n </td></tr>\n </table>\n </td>`}(e,w)).join("")}</tr></table>`:"",E=b.map(e=>`<p style="margin:0 0 14px;font-family:${x};font-size:15px;line-height:1.6;color:${r};">${h(e)}</p>`).join(""),k=v.length?`<div style="margin-top:18px;">${v.map(u).join("")}</div>`:"";return`<!DOCTYPE html>\n<html lang="pt-BR">\n<head>\n <meta charset="utf-8" />\n <meta name="viewport" content="width=device-width,initial-scale=1.0" />\n <meta http-equiv="X-UA-Compatible" content="IE=edge" />\n <title>${h(f)}</title>\n</head>\n<body style="margin:0;padding:0;background:${a};">\n ${d?`<div style="display:none;max-height:0;overflow:hidden;opacity:0;">${h(d)}</div>`:""}\n <table role="presentation" width="100%" cellpadding="0" cellspacing="0" style="background:${a};padding:24px 0;">\n <tr>\n <td align="center">\n <table role="presentation" width="600" cellpadding="0" cellspacing="0" style="width:600px;max-width:92%;">\n <tr>\n <td style="padding:8px 4px 20px;">\n <img src="https://gyra-file-prod.s3.us-west-2.amazonaws.com/assets/gyra-logo-color.png" alt="GYRA+" height="30" style="height:30px;display:block;" />\n </td>\n </tr>\n <tr>\n <td style="background:${i};border:1px solid ${p};border-radius:16px;padding:32px;">\n ${m?`<p style="margin:0 0 6px;font-family:${x};font-size:14px;color:${r};">${h(m)}</p>`:""}\n <h1 style="margin:0 0 18px;font-family:'Lexend',${x};font-size:23px;line-height:1.3;color:${l};">${h(f)}</h1>\n ${E}\n ${A}\n ${y?function(e){const a=e.verdict?(()=>{const t=g[e.verdictTone||"info"];return`<table role="presentation" cellpadding="0" cellspacing="0" style="display:inline-block;"><tr>\n <td style="background:${t.bg};border-radius:999px;padding:4px 10px;font-family:${x};font-size:11px;font-weight:700;letter-spacing:0.04em;text-transform:uppercase;color:${t.color};white-space:nowrap;">${h(e.verdict)}</td></tr></table>`})():"";return`\n <table role="presentation" width="100%" cellpadding="0" cellspacing="0"\n style="margin:18px 0 4px;background:${s};border:1px solid ${c};border-radius:12px;">\n <tr><td style="padding:16px 18px;font-family:${x};">\n <table role="presentation" width="100%" cellpadding="0" cellspacing="0"><tr>\n <td valign="middle" width="28">\n <div style="width:22px;height:22px;border-radius:50%;background:${t};color:#fff;text-align:center;line-height:22px;font-size:13px;">&#10022;</div>\n </td>\n <td valign="middle" style="padding-left:8px;">\n <span style="font-size:11px;font-weight:700;letter-spacing:0.06em;text-transform:uppercase;color:${n};">Parecer GYRA+IA</span>\n </td>\n <td valign="middle" align="right">${a}</td>\n </tr></table>\n <p style="margin:10px 0 0;font-size:14px;line-height:1.55;color:${r};">${h(e.text)}</p>\n ${e.footer?`<div style="margin-top:10px;padding-top:10px;border-top:1px dashed ${c};font-size:11px;color:${o};">${h(e.footer)}</div>`:""}\n </td></tr>\n </table>`}(y):""}\n ${k}\n </td>\n </tr>\n <tr>\n <td style="padding:20px 8px;font-family:${x};font-size:12px;line-height:1.5;color:${o};">\n <p style="margin:0 0 8px;">${h(F)}</p>\n <p style="margin:0;">GYRA+ • Esta é uma mensagem automática, não responda este email.</p>\n </td>\n </tr>\n </table>\n </td>\n </tr>\n </table>\n</body>\n</html>`}function b(e){const t=(e||"").toLowerCase();return t.includes("muito")&&t.includes("alto")?"#C93430":t.includes("alto")||t.includes("medio")||t.includes("médio")?"#946200":t.includes("baixo")?"#1A7D37":"#1D1D1F"}function $(e){const t=(e||"").toLowerCase();return t.includes("alto")?"danger":t.includes("medio")||t.includes("médio")?"warn":t.includes("baixo")?"ok":"info"}exports.balanceSheetFinalizedEmail=function(e){const{firstName:t,companyName:n,score:a,risk:i,recommendation:l,xlsxUrl:r,reportUrl:o}=e,d=n||"a empresa analisada",p="Análise financeira concluída"+(n?` — ${n}`:""),s=[];null!=a&&""!=`${a}`&&s.push({label:"Score GYRA+IA",value:`${a}`}),i&&s.push({label:"Nível de risco",value:i,color:b(i)});const c=[];return r&&c.push({label:"Baixar análise (Excel)",url:r,variant:"primary"}),o&&c.push({label:"Ver relatório",url:o,variant:"secondary"}),{subject:p,html:f({preheader:p,greeting:t?`Olá, ${t}`:void 0,title:"Sua análise financeira está pronta",paragraphs:[`A análise financeira de ${d} foi processada com sucesso pela GYRA+IA.`],highlights:s,aiParecer:l?{verdict:i||void 0,verdictTone:$(i),text:l,footer:"GYRA+IA · gerado a partir do balanço enviado"}:void 0,buttons:c,footerNote:"Os valores e a recomendação são gerados por IA a partir do balanço enviado e devem ser revisados pelo analista."})}};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/emails/email/index.ts","../../../src/emails/balance-sheet-finalized/index.ts"],"sourcesContent":["/**\n * Email transacional genérico — Gyra+ design system.\n *\n * **FONTE DA VERDADE** dos layouts de email transacional. Usado por\n * qualquer fluxo que precise mandar email no padrão visual Gyra+:\n * - reset de senha, confirmação de cadastro, alertas internos\n * - finalização de processamento (Finsights, batch-report, etc)\n * - notificações de operação/crédito\n * - convites, mudança de plano, alerts de billing...\n *\n * **TS puro**: sem React, sem DOM, sem browser globals. Apenas funções que\n * retornam string HTML. Funciona igual em qualquer runtime Node (Nest) ou\n * bundle browser (Next).\n *\n * **Email-safe**: tabelas + inline-style (clients ignoram <style> externo,\n * flexbox e Material Symbols). Gradientes têm fallback sólido.\n *\n * Tokens visuais alinhados com gyra-design: azul #1256FF (acao/primary),\n * roxo #7C4EFF (IA/parecer), neutrals Apple-gray, fonte Inter.\n *\n * **Como usar:**\n * ```ts\n * import { buildEmail } from '@gyramais/gyra-design/dist/emails/email';\n *\n * const html = buildEmail({\n * preheader: 'Senha redefinida com sucesso',\n * greeting: 'Olá, Maria',\n * title: 'Sua senha foi redefinida',\n * paragraphs: ['Tudo certo. Você já pode entrar com a nova senha.'],\n * buttons: [{ label: 'Entrar', url: 'https://app.gyramais.com/login' }],\n * footerNote: 'Se não foi você, redefina novamente clicando em \"Esqueci minha senha\".',\n * });\n * ```\n *\n * Pra emails recorrentes (mesmo conteudo, payload variavel), criar um\n * **preset** em `src/emails/<preset-name>/index.ts` que monta o\n * `EmailLayoutInput` a partir de campos de dominio e delega aqui. Ver\n * `balance-sheet-finalized` como exemplo.\n */\n\n// ── Tipos publicos ─────────────────────────────────────────────────────────\n\nexport type EmailButton = {\n label: string;\n url: string;\n /** primary = botão azul preenchido, secondary = outline. Default primary. */\n variant?: 'primary' | 'secondary';\n};\n\nexport type EmailHighlight = {\n /** label pequeno em cima (ex: \"Score\", \"Nivel de risco\"). */\n label: string;\n /** valor grande em baixo (ex: \"820\", \"Baixo\"). */\n value: string;\n /** cor do valor (ex: cor do risco). Default: tinta padrao Apple-gray. */\n color?: string;\n};\n\n/** Tom semantico do chip de veredito do bloco Parecer GYRA+IA. */\nexport type AiParecerTone = 'ok' | 'warn' | 'danger' | 'info';\n\nexport type EmailAiParecer = {\n /** chip de veredito (ex: \"Médio\", \"Consistente\"). Opcional. */\n verdict?: string;\n verdictTone?: AiParecerTone;\n /** corpo do parecer. */\n text: string;\n /** rodape do bloco (ex: \"GYRA+IA · Confiança 96%\"). Opcional. */\n footer?: string;\n};\n\nexport type EmailLayoutInput = {\n /** Texto invisivel no preheader (preview no inbox). */\n preheader?: string;\n /** Linha curta acima do titulo (ex: \"Olá, Maria\"). */\n greeting?: string;\n /** Titulo principal (H1). */\n title: string;\n /** Paragrafos de corpo (sub-frases). */\n paragraphs?: string[];\n /** Cards lado-a-lado (1 a N). Largura dividida igualmente. */\n highlights?: EmailHighlight[];\n /** Bloco \"Parecer GYRA+IA\" (faixa roxa com chip + texto + rodape). */\n aiParecer?: EmailAiParecer;\n /** Botoes de acao. Multiplos viram lado-a-lado. */\n buttons?: EmailButton[];\n /** Texto pequeno no rodape do card (disclaimer, instrucoes extras). */\n footerNote?: string;\n};\n\n// ── Tokens (espelho de gyra-design CSS variables, hard-coded pra email) ────\n\nconst C = {\n blue: '#1256FF',\n teal: '#1FB58A',\n aiPurple: '#7C4EFF',\n aiPurpleText: '#6635E0',\n bg: '#F5F5F7',\n card: '#FFFFFF',\n fg1: '#1D1D1F',\n fg2: '#636366',\n fg3: '#8E8E93',\n border: '#D2D2D7',\n borderSubtle: '#E8E8ED',\n aiCardBg: '#F6F4FF',\n aiBorder: 'rgba(124,78,255,0.22)',\n};\n\nconst VERDICT: Record<AiParecerTone, { bg: string; color: string }> = {\n ok: { bg: '#E8F9ED', color: '#1A7D37' },\n warn: { bg: '#FFF4E0', color: '#946200' },\n danger: { bg: '#FFEDEC', color: '#C93430' },\n info: { bg: '#EBF4FF', color: '#0055D4' },\n};\n\nconst FONT =\n \"'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Arial,sans-serif\";\n\nconst LOGO_URL =\n 'https://gyra-file-prod.s3.us-west-2.amazonaws.com/assets/gyra-logo-color.png';\n\n// ── Helpers internos ───────────────────────────────────────────────────────\n\nconst esc = (s: string): string =>\n String(s ?? '')\n .replace(/&/g, '&amp;')\n .replace(/</g, '&lt;')\n .replace(/>/g, '&gt;')\n .replace(/\"/g, '&quot;')\n .replace(/'/g, '&#39;');\n\n/**\n * Só permite http(s). Bloqueia schemes perigosos (javascript:, data:)\n * que poderiam virar href executável. URL inválida vira '#'.\n */\nconst SAFE_URL_PROTOCOLS = ['http:', 'https:', 'mailto:', 'tel:'];\n\nfunction safeUrl(url: string): string {\n try {\n const u = new URL(String(url));\n // mailto:/tel: sao comuns e seguros em emails transacionais (contato,\n // suporte, telefone). Demais protocolos (javascript:, data:) viram '#'.\n return SAFE_URL_PROTOCOLS.includes(u.protocol) ? u.href : '#';\n } catch {\n return '#';\n }\n}\n\nfunction renderButton(btn: EmailButton): string {\n const isPrimary = (btn.variant ?? 'primary') === 'primary';\n const bg = isPrimary ? C.blue : C.card;\n const color = isPrimary ? '#FFFFFF' : C.blue;\n const border = isPrimary ? C.blue : C.border;\n return `\n <table role=\"presentation\" cellpadding=\"0\" cellspacing=\"0\" style=\"margin:8px 8px 0 0;display:inline-block;\">\n <tr>\n <td style=\"border-radius:10px;background:${bg};border:1px solid ${border};\">\n <a href=\"${esc(safeUrl(btn.url))}\" target=\"_blank\"\n style=\"display:inline-block;padding:12px 22px;font-family:${FONT};font-size:14px;font-weight:600;color:${color};text-decoration:none;border-radius:10px;\">\n ${esc(btn.label)}\n </a>\n </td>\n </tr>\n </table>`;\n}\n\nfunction renderHighlight(h: EmailHighlight, widthPct: number): string {\n return `\n <td width=\"${widthPct}%\" style=\"padding:6px;\" valign=\"top\">\n <table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\"\n style=\"background:#FAFAFA;border:1px solid ${C.borderSubtle};border-radius:12px;\">\n <tr><td style=\"padding:14px 16px;font-family:${FONT};\">\n <div style=\"font-size:12px;color:${C.fg2};margin-bottom:4px;\">${esc(h.label)}</div>\n <div style=\"font-size:22px;font-weight:700;color:${h.color || C.fg1};font-family:'Lexend',${FONT};\">${esc(h.value)}</div>\n </td></tr>\n </table>\n </td>`;\n}\n\nfunction renderAiParecer(p: EmailAiParecer): string {\n const v = p.verdict\n ? (() => {\n const t = VERDICT[p.verdictTone || 'info'];\n // table/td (Outlook ignora padding/border-radius em <span>).\n return `<table role=\"presentation\" cellpadding=\"0\" cellspacing=\"0\" style=\"display:inline-block;\"><tr>\n <td style=\"background:${t.bg};border-radius:999px;padding:4px 10px;font-family:${FONT};font-size:11px;font-weight:700;letter-spacing:0.04em;text-transform:uppercase;color:${t.color};white-space:nowrap;\">${esc(\n p.verdict,\n )}</td></tr></table>`;\n })()\n : '';\n return `\n <table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\"\n style=\"margin:18px 0 4px;background:${C.aiCardBg};border:1px solid ${C.aiBorder};border-radius:12px;\">\n <tr><td style=\"padding:16px 18px;font-family:${FONT};\">\n <table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\"><tr>\n <td valign=\"middle\" width=\"28\">\n <div style=\"width:22px;height:22px;border-radius:50%;background:${C.aiPurple};color:#fff;text-align:center;line-height:22px;font-size:13px;\">&#10022;</div>\n </td>\n <td valign=\"middle\" style=\"padding-left:8px;\">\n <span style=\"font-size:11px;font-weight:700;letter-spacing:0.06em;text-transform:uppercase;color:${C.aiPurpleText};\">Parecer GYRA+IA</span>\n </td>\n <td valign=\"middle\" align=\"right\">${v}</td>\n </tr></table>\n <p style=\"margin:10px 0 0;font-size:14px;line-height:1.55;color:${C.fg2};\">${esc(p.text)}</p>\n ${\n p.footer\n ? `<div style=\"margin-top:10px;padding-top:10px;border-top:1px dashed ${C.aiBorder};font-size:11px;color:${C.fg3};\">${esc(\n p.footer,\n )}</div>`\n : ''\n }\n </td></tr>\n </table>`;\n}\n\n// ── API publica ────────────────────────────────────────────────────────────\n\n/**\n * Monta o HTML completo de um email no padrão Gyra+: logo no topo, card\n * principal com greeting + título + parágrafos + highlights (chips lado a\n * lado) + bloco \"Parecer GYRA+IA\" + botões, e rodapé padrão.\n *\n * Email-safe (tabelas + inline-style, sem flexbox, sem <style>). Funciona\n * em Gmail, Outlook (Windows/Web/Mac), Apple Mail, Thunderbird, mobile.\n *\n * Todas as seções (greeting, paragraphs, highlights, aiParecer, buttons,\n * footerNote) são **opcionais** — só `title` é obrigatório.\n */\nexport function buildEmail(input: EmailLayoutInput): string {\n const {\n preheader,\n greeting,\n title,\n paragraphs = [],\n highlights = [],\n aiParecer,\n buttons = [],\n footerNote,\n } = input;\n\n const highlightWidth = highlights.length\n ? Math.floor(100 / highlights.length)\n : 100;\n const highlightsRow = highlights.length\n ? `<table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" style=\"margin:8px 0 4px;\"><tr>${highlights\n .map((h) => renderHighlight(h, highlightWidth))\n .join('')}</tr></table>`\n : '';\n\n const paragraphsHtml = paragraphs\n .map(\n (p) =>\n `<p style=\"margin:0 0 14px;font-family:${FONT};font-size:15px;line-height:1.6;color:${C.fg2};\">${esc(\n p,\n )}</p>`,\n )\n .join('');\n\n const buttonsHtml = buttons.length\n ? `<div style=\"margin-top:18px;\">${buttons.map(renderButton).join('')}</div>`\n : '';\n\n return `<!DOCTYPE html>\n<html lang=\"pt-BR\">\n<head>\n <meta charset=\"utf-8\" />\n <meta name=\"viewport\" content=\"width=device-width,initial-scale=1.0\" />\n <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\" />\n <title>${esc(title)}</title>\n</head>\n<body style=\"margin:0;padding:0;background:${C.bg};\">\n ${\n preheader\n ? `<div style=\"display:none;max-height:0;overflow:hidden;opacity:0;\">${esc(preheader)}</div>`\n : ''\n }\n <table role=\"presentation\" width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" style=\"background:${C.bg};padding:24px 0;\">\n <tr>\n <td align=\"center\">\n <table role=\"presentation\" width=\"600\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:600px;max-width:92%;\">\n <tr>\n <td style=\"padding:8px 4px 20px;\">\n <img src=\"${LOGO_URL}\" alt=\"GYRA+\" height=\"30\" style=\"height:30px;display:block;\" />\n </td>\n </tr>\n <tr>\n <td style=\"background:${C.card};border:1px solid ${C.borderSubtle};border-radius:16px;padding:32px;\">\n ${\n greeting\n ? `<p style=\"margin:0 0 6px;font-family:${FONT};font-size:14px;color:${C.fg2};\">${esc(\n greeting,\n )}</p>`\n : ''\n }\n <h1 style=\"margin:0 0 18px;font-family:'Lexend',${FONT};font-size:23px;line-height:1.3;color:${C.fg1};\">${esc(\n title,\n )}</h1>\n ${paragraphsHtml}\n ${highlightsRow}\n ${aiParecer ? renderAiParecer(aiParecer) : ''}\n ${buttonsHtml}\n </td>\n </tr>\n <tr>\n <td style=\"padding:20px 8px;font-family:${FONT};font-size:12px;line-height:1.5;color:${C.fg3};\">\n ${\n footerNote\n ? `<p style=\"margin:0 0 8px;\">${esc(footerNote)}</p>`\n : ''\n }\n <p style=\"margin:0;\">GYRA+ • Esta é uma mensagem automática, não responda este email.</p>\n </td>\n </tr>\n </table>\n </td>\n </tr>\n </table>\n</body>\n</html>`;\n}\n","/**\n * Preset do email \"Análise financeira concluída\" enviado quando o gyra-ai\n * finaliza a extração de um balanço (feature Finsights — CU-86aherfzc).\n *\n * Esta é uma **camada fina de mapeamento de domínio** sobre o\n * `buildEmail` genérico: recebe os campos crus que o gyra-ai produz\n * (score, risk, recommendation, xlsxUrl, ...) e monta o `EmailLayoutInput`\n * com as decisões visuais (cor do risco, tom do veredito, textos padrão).\n *\n * Pra criar outro preset (ex: `password-reset`, `report-finalized`,\n * `batch-finalized`), criar uma pasta nova em `src/emails/<name>/` que\n * importe `buildEmail` e exporte uma função `<name>Email(payload)` com a\n * mesma assinatura: `{ subject, html }`.\n */\n\nimport { buildEmail, AiParecerTone, EmailButton, EmailHighlight } from '../email';\n\nexport type BalanceSheetFinalizedPayload = {\n firstName?: string;\n companyName?: string;\n score?: number | string;\n risk?: string;\n recommendation?: string;\n xlsxUrl?: string;\n reportUrl?: string;\n};\n\n/** Mapeia nível de risco textual -> cor do chip de score. */\nfunction riskColor(risk?: string): string {\n const r = (risk || '').toLowerCase();\n if (r.includes('muito') && r.includes('alto')) return '#C93430';\n if (r.includes('alto')) return '#946200';\n if (r.includes('medio') || r.includes('médio')) return '#946200';\n if (r.includes('baixo')) return '#1A7D37';\n return '#1D1D1F';\n}\n\n/** Risco -> tom do veredito do Parecer de IA. */\nfunction riskTone(risk?: string): AiParecerTone {\n const r = (risk || '').toLowerCase();\n if (r.includes('alto')) return 'danger';\n if (r.includes('medio') || r.includes('médio')) return 'warn';\n if (r.includes('baixo')) return 'ok';\n return 'info';\n}\n\n/**\n * Monta `{ subject, html }` do email \"Análise financeira concluída\" a\n * partir do payload do gyra-ai (score, risco, recomendação, XLS, etc).\n * Usado pelo gyra-communication (envio via SendGrid) e pelo Storybook\n * (preview).\n */\nexport function balanceSheetFinalizedEmail(\n payload: BalanceSheetFinalizedPayload,\n): { subject: string; html: string } {\n const {\n firstName,\n companyName,\n score,\n risk,\n recommendation,\n xlsxUrl,\n reportUrl,\n } = payload;\n\n const empresa = companyName || 'a empresa analisada';\n const subject = `Análise financeira concluída${companyName ? ` — ${companyName}` : ''}`;\n\n const highlights: EmailHighlight[] = [];\n if (score !== undefined && score !== null && `${score}` !== '') {\n highlights.push({ label: 'Score GYRA+IA', value: `${score}` });\n }\n if (risk) {\n highlights.push({\n label: 'Nível de risco',\n value: risk,\n color: riskColor(risk),\n });\n }\n\n const buttons: EmailButton[] = [];\n if (xlsxUrl) {\n buttons.push({\n label: 'Baixar análise (Excel)',\n url: xlsxUrl,\n variant: 'primary',\n });\n }\n if (reportUrl) {\n buttons.push({\n label: 'Ver relatório',\n url: reportUrl,\n variant: 'secondary',\n });\n }\n\n const html = buildEmail({\n preheader: subject,\n greeting: firstName ? `Olá, ${firstName}` : undefined,\n title: 'Sua análise financeira está pronta',\n paragraphs: [\n `A análise financeira de ${empresa} foi processada com sucesso pela GYRA+IA.`,\n ],\n highlights,\n aiParecer: recommendation\n ? {\n verdict: risk || undefined,\n verdictTone: riskTone(risk),\n text: recommendation,\n footer: 'GYRA+IA · gerado a partir do balanço enviado',\n }\n : undefined,\n buttons,\n footerNote:\n 'Os valores e a recomendação são gerados por IA a partir do balanço enviado e devem ser revisados pelo analista.',\n });\n\n return { subject, html };\n}\n"],"names":["C","VERDICT","ok","bg","color","warn","danger","info","FONT","esc","s","String","replace","SAFE_URL_PROTOCOLS","renderButton","btn","isPrimary","variant","url","u","URL","includes","protocol","href","safeUrl","label","buildEmail","input","preheader","greeting","title","paragraphs","highlights","aiParecer","buttons","footerNote","highlightWidth","length","Math","floor","highlightsRow","map","h","widthPct","value","renderHighlight","join","paragraphsHtml","p","buttonsHtml","v","verdict","t","verdictTone","text","footer","renderAiParecer","riskColor","risk","r","toLowerCase","riskTone","payload","firstName","companyName","score","recommendation","xlsxUrl","reportUrl","empresa","subject","push","html","undefined"],"mappings":"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"}
@@ -0,0 +1,4 @@
1
+ import * as React from "react";
2
+ import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
3
+ declare const Checkbox: React.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
4
+ export { Checkbox };
@@ -0,0 +1,23 @@
1
+ import * as React from 'react';
2
+ import * as LabelPrimitive from '@radix-ui/react-label';
3
+ import { ControllerProps, FieldPath, FieldValues, useForm } from 'react-hook-form';
4
+ declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>(props: import("react-hook-form").FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React.JSX.Element;
5
+ declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ ...props }: ControllerProps<TFieldValues, TName>) => React.JSX.Element;
6
+ declare const useFormField: () => {
7
+ invalid: boolean;
8
+ isDirty: boolean;
9
+ isTouched: boolean;
10
+ isValidating: boolean;
11
+ error?: import("react-hook-form").FieldError;
12
+ id: string;
13
+ name: string;
14
+ formItemId: string;
15
+ formDescriptionId: string;
16
+ formMessageId: string;
17
+ };
18
+ declare const FormItem: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
19
+ declare const FormLabel: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & React.RefAttributes<HTMLLabelElement>>;
20
+ declare const FormControl: React.ForwardRefExoticComponent<Omit<import("@radix-ui/react-slot").SlotProps & React.RefAttributes<HTMLElement>, "ref"> & React.RefAttributes<HTMLElement>>;
21
+ declare const FormDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
22
+ declare const FormMessage: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
23
+ export { useForm, useFormField, Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField, };
@@ -0,0 +1,6 @@
1
+ import * as React from "react";
2
+ import * as HoverCardPrimitive from "@radix-ui/react-hover-card";
3
+ declare const HoverCard: React.FC<HoverCardPrimitive.HoverCardProps>;
4
+ declare const HoverCardTrigger: React.ForwardRefExoticComponent<HoverCardPrimitive.HoverCardTriggerProps & React.RefAttributes<HTMLAnchorElement>>;
5
+ declare const HoverCardContent: React.ForwardRefExoticComponent<Omit<HoverCardPrimitive.HoverCardContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
6
+ export { HoverCard, HoverCardTrigger, HoverCardContent };
@@ -0,0 +1,5 @@
1
+ import * as React from 'react';
2
+ import * as LabelPrimitive from '@radix-ui/react-label';
3
+ import { type VariantProps } from 'class-variance-authority';
4
+ declare const Label: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?: import("class-variance-authority/types").ClassProp | undefined) => string> & React.RefAttributes<HTMLLabelElement>>;
5
+ export { Label };
@@ -0,0 +1,2 @@
1
+ import { type ClassValue } from "clsx";
2
+ export declare function cn(...inputs: ClassValue[]): string;
@@ -0,0 +1,33 @@
1
+ import * as React from "react";
2
+ import * as MenubarPrimitive from "@radix-ui/react-menubar";
3
+ declare const MenubarMenu: {
4
+ (props: MenubarPrimitive.MenubarMenuProps & {
5
+ __scopeMenubar?: import("@radix-ui/react-context").Scope;
6
+ }): import("react/jsx-runtime").JSX.Element;
7
+ displayName: string;
8
+ };
9
+ declare const MenubarGroup: React.ForwardRefExoticComponent<MenubarPrimitive.MenubarGroupProps & React.RefAttributes<HTMLDivElement>>;
10
+ declare const MenubarPortal: React.FC<MenubarPrimitive.MenubarPortalProps>;
11
+ declare const MenubarSub: React.FC<MenubarPrimitive.MenubarSubProps>;
12
+ declare const MenubarRadioGroup: React.ForwardRefExoticComponent<MenubarPrimitive.MenubarRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
13
+ declare const Menubar: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
14
+ declare const MenubarTrigger: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
15
+ declare const MenubarSubTrigger: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarSubTriggerProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
16
+ inset?: boolean;
17
+ } & React.RefAttributes<HTMLDivElement>>;
18
+ declare const MenubarSubContent: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarSubContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
19
+ declare const MenubarContent: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
20
+ declare const MenubarItem: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
21
+ inset?: boolean;
22
+ } & React.RefAttributes<HTMLDivElement>>;
23
+ declare const MenubarCheckboxItem: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarCheckboxItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
24
+ declare const MenubarRadioItem: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarRadioItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
25
+ declare const MenubarLabel: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
26
+ inset?: boolean;
27
+ } & React.RefAttributes<HTMLDivElement>>;
28
+ declare const MenubarSeparator: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
29
+ declare const MenubarShortcut: {
30
+ ({ id, className, ...props }: React.HTMLAttributes<HTMLSpanElement>): React.JSX.Element;
31
+ displayname: string;
32
+ };
33
+ export { Menubar, MenubarMenu, MenubarTrigger, MenubarContent, MenubarItem, MenubarSeparator, MenubarLabel, MenubarCheckboxItem, MenubarRadioGroup, MenubarRadioItem, MenubarPortal, MenubarSubContent, MenubarSubTrigger, MenubarGroup, MenubarSub, MenubarShortcut, };
@@ -0,0 +1,6 @@
1
+ import * as React from "react";
2
+ import * as PopoverPrimitive from "@radix-ui/react-popover";
3
+ declare const Popover: React.FC<PopoverPrimitive.PopoverProps>;
4
+ declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
5
+ declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
6
+ export { Popover, PopoverTrigger, PopoverContent };
@@ -0,0 +1,5 @@
1
+ import * as React from "react";
2
+ import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
3
+ declare const RadioGroup: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
4
+ declare const RadioGroupItem: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupItemProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
5
+ export { RadioGroup, RadioGroupItem };
@@ -0,0 +1,4 @@
1
+ import * as React from "react";
2
+ import * as SwitchPrimitives from "@radix-ui/react-switch";
3
+ declare const Switch: React.ForwardRefExoticComponent<Omit<SwitchPrimitives.SwitchProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
4
+ export { Switch };
@@ -0,0 +1,7 @@
1
+ import * as React from "react";
2
+ import * as TabsPrimitive from "@radix-ui/react-tabs";
3
+ declare const Tabs: React.ForwardRefExoticComponent<TabsPrimitive.TabsProps & React.RefAttributes<HTMLDivElement>>;
4
+ declare const TabsList: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsListProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
5
+ declare const TabsTrigger: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
6
+ declare const TabsContent: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
7
+ export { Tabs, TabsList, TabsTrigger, TabsContent };
@@ -0,0 +1,7 @@
1
+ import * as React from "react";
2
+ import * as TooltipPrimitive from "@radix-ui/react-tooltip";
3
+ declare const TooltipProvider: React.FC<TooltipPrimitive.TooltipProviderProps>;
4
+ declare const Tooltip: React.FC<TooltipPrimitive.TooltipProps>;
5
+ declare const TooltipTrigger: React.ForwardRefExoticComponent<TooltipPrimitive.TooltipTriggerProps & React.RefAttributes<HTMLButtonElement>>;
6
+ declare const TooltipContent: React.ForwardRefExoticComponent<Omit<TooltipPrimitive.TooltipContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
7
+ export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
@@ -0,0 +1,20 @@
1
+ interface Colors {
2
+ backgroundColor: string;
3
+ primaryButton: string;
4
+ secondaryButton: string;
5
+ linkButton: string;
6
+ }
7
+ interface Images {
8
+ whiteLogoUrl: string;
9
+ darkLogoUrl: string;
10
+ iconUrl: string;
11
+ }
12
+ declare const isColorDark: (hexColor: string) => boolean;
13
+ export { isColorDark, };
14
+ declare const _default: {
15
+ setTheme: ({ colors, images }: {
16
+ colors: Colors;
17
+ images: Images;
18
+ }) => void;
19
+ };
20
+ export default _default;