@farm-investimentos/front-mfe-components-vue3 0.0.1

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 (437) hide show
  1. package/README.md +35 -0
  2. package/dist/demo.html +10 -0
  3. package/dist/front-mfe-components.common.js +17771 -0
  4. package/dist/front-mfe-components.common.js.map +1 -0
  5. package/dist/front-mfe-components.css +1 -0
  6. package/dist/front-mfe-components.umd.js +17781 -0
  7. package/dist/front-mfe-components.umd.js.map +1 -0
  8. package/dist/front-mfe-components.umd.min.js +2 -0
  9. package/dist/front-mfe-components.umd.min.js.map +1 -0
  10. package/package.json +91 -0
  11. package/src/components/AlertBox/AlertBox.scss +52 -0
  12. package/src/components/AlertBox/AlertBox.stories.js +79 -0
  13. package/src/components/AlertBox/AlertBox.vue +127 -0
  14. package/src/components/AlertBox/__tests__/AlertBox.spec.js +32 -0
  15. package/src/components/AlertBox/__tests__/valueWatcher.spec.js +15 -0
  16. package/src/components/AlertBox/index.ts +4 -0
  17. package/src/components/AlertBox/valueWatcher.ts +10 -0
  18. package/src/components/AlertReload/AlertReload.scss +33 -0
  19. package/src/components/AlertReload/AlertReload.stories.js +34 -0
  20. package/src/components/AlertReload/AlertReload.vue +46 -0
  21. package/src/components/AlertReload/__tests__/AlertReload.spec.js +18 -0
  22. package/src/components/AlertReload/index.ts +4 -0
  23. package/src/components/ButtonToggle/ButtonToggle.scss +14 -0
  24. package/src/components/ButtonToggle/ButtonToggle.stories.js +50 -0
  25. package/src/components/ButtonToggle/ButtonToggle.vue +53 -0
  26. package/src/components/ButtonToggle/IButtonToggle.ts +5 -0
  27. package/src/components/ButtonToggle/__tests__/ButtonToggle.spec.js +35 -0
  28. package/src/components/ButtonToggle/index.ts +4 -0
  29. package/src/components/Buttons/ConfirmButton/ConfirmButton.stories.js +50 -0
  30. package/src/components/Buttons/ConfirmButton/ConfirmButton.vue +33 -0
  31. package/src/components/Buttons/ConfirmButton/__tests__/ConfirmButton.spec.js +14 -0
  32. package/src/components/Buttons/ConfirmButton/index.ts +4 -0
  33. package/src/components/Buttons/DangerButton/DangerButton.stories.js +49 -0
  34. package/src/components/Buttons/DangerButton/DangerButton.vue +32 -0
  35. package/src/components/Buttons/DangerButton/__tests__/DangerButton.spec.js +14 -0
  36. package/src/components/Buttons/DangerButton/index.ts +4 -0
  37. package/src/components/Buttons/DefaultButton/Buttons.stories.scss +10 -0
  38. package/src/components/Buttons/DefaultButton/DefaultButton.scss +328 -0
  39. package/src/components/Buttons/DefaultButton/DefaultButton.stories.js +317 -0
  40. package/src/components/Buttons/DefaultButton/DefaultButton.vue +128 -0
  41. package/src/components/Buttons/DefaultButton/__tests__/DefaultButton.spec.js +32 -0
  42. package/src/components/Buttons/DefaultButton/index.ts +4 -0
  43. package/src/components/Buttons/ExportButton/ExportButton.stories.js +40 -0
  44. package/src/components/Buttons/ExportButton/ExportButton.vue +82 -0
  45. package/src/components/Buttons/ExportButton/__tests__/ExportButton.spec.js +14 -0
  46. package/src/components/Buttons/ExportButton/index.ts +4 -0
  47. package/src/components/Buttons/ImportButton/ImportButton.scss +8 -0
  48. package/src/components/Buttons/ImportButton/ImportButton.stories.js +23 -0
  49. package/src/components/Buttons/ImportButton/ImportButton.vue +35 -0
  50. package/src/components/Buttons/ImportButton/__tests__/ImportButton.spec.js +23 -0
  51. package/src/components/Buttons/ImportButton/index.ts +4 -0
  52. package/src/components/Buttons/MultiImportButton/MultiImportButton.stories.js +35 -0
  53. package/src/components/Buttons/MultiImportButton/MultiImportButton.vue +54 -0
  54. package/src/components/Buttons/MultiImportButton/__tests__/MultiImportButton.spec.js +14 -0
  55. package/src/components/Buttons/MultiImportButton/index.ts +4 -0
  56. package/src/components/Buttons/RemoveButton/RemoveButton.scss +5 -0
  57. package/src/components/Buttons/RemoveButton/RemoveButton.stories.js +17 -0
  58. package/src/components/Buttons/RemoveButton/RemoveButton.vue +44 -0
  59. package/src/components/Buttons/RemoveButton/__tests__/RemoveButton.spec.js +23 -0
  60. package/src/components/Buttons/RemoveButton/index.ts +4 -0
  61. package/src/components/Buttons/ToggleButton/ToggleButton.stories.js +22 -0
  62. package/src/components/Buttons/ToggleButton/ToggleButton.vue +75 -0
  63. package/src/components/Buttons/ToggleButton/__tests__/ToggleButton.spec.js +21 -0
  64. package/src/components/Buttons/ToggleButton/index.ts +4 -0
  65. package/src/components/Card/Card.scss +18 -0
  66. package/src/components/Card/Card.stories.js +40 -0
  67. package/src/components/Card/Card.vue +24 -0
  68. package/src/components/Card/CardComposition.stories.ts +69 -0
  69. package/src/components/Card/CardContent/CardContent.scss +17 -0
  70. package/src/components/Card/CardContent/CardContent.stories.js +47 -0
  71. package/src/components/Card/CardContent/CardContent.vue +39 -0
  72. package/src/components/Card/CardContent/__tests__/CardContent.spec.js +20 -0
  73. package/src/components/Card/CardContent/index.ts +4 -0
  74. package/src/components/Card/__tests__/Card.spec.js +20 -0
  75. package/src/components/Card/index.ts +5 -0
  76. package/src/components/Checkbox/Checkbox.scss +108 -0
  77. package/src/components/Checkbox/Checkbox.stories.js +194 -0
  78. package/src/components/Checkbox/Checkbox.vue +193 -0
  79. package/src/components/Checkbox/__tests__/Checkbox.spec.js +34 -0
  80. package/src/components/Checkbox/__tests__/modelValueWatcher.spec.js +43 -0
  81. package/src/components/Checkbox/index.ts +4 -0
  82. package/src/components/Checkbox/modelValueWatcher.ts +12 -0
  83. package/src/components/Chip/Chip.scss +109 -0
  84. package/src/components/Chip/Chip.stories.js +96 -0
  85. package/src/components/Chip/Chip.stories.scss +13 -0
  86. package/src/components/Chip/Chip.vue +66 -0
  87. package/src/components/Chip/__tests__/Chip.spec.js +20 -0
  88. package/src/components/Chip/index.ts +4 -0
  89. package/src/components/ChipInviteStatus/ChipInviteStatus.stories.js +30 -0
  90. package/src/components/ChipInviteStatus/ChipInviteStatus.vue +38 -0
  91. package/src/components/ChipInviteStatus/__tests__/ChipInviteStatus.spec.js +22 -0
  92. package/src/components/ChipInviteStatus/index.ts +4 -0
  93. package/src/components/ChipInviteStatus/keys.ts +11 -0
  94. package/src/components/Collapsible/Collapsible.scss +48 -0
  95. package/src/components/Collapsible/Collapsible.stories.js +150 -0
  96. package/src/components/Collapsible/Collapsible.vue +189 -0
  97. package/src/components/Collapsible/__tests__/Collapsible.spec.js +38 -0
  98. package/src/components/Collapsible/index.ts +3 -0
  99. package/src/components/ContextMenu/ContextMenu.scss +33 -0
  100. package/src/components/ContextMenu/ContextMenu.stories.js +248 -0
  101. package/src/components/ContextMenu/ContextMenu.vue +250 -0
  102. package/src/components/ContextMenu/__tests__/ContextMenu.spec.js +29 -0
  103. package/src/components/ContextMenu/index.ts +5 -0
  104. package/src/components/CopyToClipboard/CopyToClipboard.stories.js +83 -0
  105. package/src/components/CopyToClipboard/CopyToClipboard.vue +133 -0
  106. package/src/components/CopyToClipboard/__tests__/CopyToClipboard.spec.js +24 -0
  107. package/src/components/CopyToClipboard/index.ts +4 -0
  108. package/src/components/DataTableEmptyWrapper/DataTableEmptyWrapper.scss +17 -0
  109. package/src/components/DataTableEmptyWrapper/DataTableEmptyWrapper.stories.js +30 -0
  110. package/src/components/DataTableEmptyWrapper/DataTableEmptyWrapper.vue +50 -0
  111. package/src/components/DataTableEmptyWrapper/__tests__/DataTableEmptyWrapper.spec.js +20 -0
  112. package/src/components/DataTableEmptyWrapper/index.ts +4 -0
  113. package/src/components/DataTableHeader/DataTableHeader.scss +65 -0
  114. package/src/components/DataTableHeader/DataTableHeader.stories.js +109 -0
  115. package/src/components/DataTableHeader/DataTableHeader.vue +197 -0
  116. package/src/components/DataTableHeader/__tests__/DataTableHeader.spec.js +95 -0
  117. package/src/components/DataTableHeader/index.ts +3 -0
  118. package/src/components/DataTablePaginator/DataTablePaginator.scss +90 -0
  119. package/src/components/DataTablePaginator/DataTablePaginator.stories.js +49 -0
  120. package/src/components/DataTablePaginator/DataTablePaginator.vue +218 -0
  121. package/src/components/DataTablePaginator/__tests__/DataTablePaginator.spec.js +32 -0
  122. package/src/components/DataTablePaginator/index.ts +3 -0
  123. package/src/components/DatePicker/DatePicker.scss +18 -0
  124. package/src/components/DatePicker/DatePicker.stories.js +134 -0
  125. package/src/components/DatePicker/DatePicker.vue +292 -0
  126. package/src/components/DatePicker/__tests__/DatePicker.spec.js +108 -0
  127. package/src/components/DatePicker/customDatePicker.scss +79 -0
  128. package/src/components/DatePicker/index.ts +3 -0
  129. package/src/components/DatePicker/vDatePicker.scss +214 -0
  130. package/src/components/DialogFooter/DialogFooter.scss +34 -0
  131. package/src/components/DialogFooter/DialogFooter.stories.js +49 -0
  132. package/src/components/DialogFooter/DialogFooter.vue +102 -0
  133. package/src/components/DialogFooter/IExtraButton.ts +9 -0
  134. package/src/components/DialogFooter/__tests__/DialogFooter.spec.js +20 -0
  135. package/src/components/DialogFooter/index.ts +3 -0
  136. package/src/components/DialogHeader/DialogHeader.scss +32 -0
  137. package/src/components/DialogHeader/DialogHeader.stories.js +69 -0
  138. package/src/components/DialogHeader/DialogHeader.vue +61 -0
  139. package/src/components/DialogHeader/__tests__/DialogHeader.spec.js +24 -0
  140. package/src/components/DialogHeader/index.ts +3 -0
  141. package/src/components/Form/Form.stories.js +390 -0
  142. package/src/components/Form/Form.vue +100 -0
  143. package/src/components/Form/__tests__/Form.spec.js +14 -0
  144. package/src/components/Form/index.ts +4 -0
  145. package/src/components/Icon/Icon.scss +61 -0
  146. package/src/components/Icon/Icon.stories.js +156 -0
  147. package/src/components/Icon/Icon.vue +100 -0
  148. package/src/components/Icon/Icons.stories.scss +31 -0
  149. package/src/components/Icon/__tests__/Icon.spec.js +34 -0
  150. package/src/components/Icon/icons_list.ts +2557 -0
  151. package/src/components/Icon/index.ts +4 -0
  152. package/src/components/IconBox/IconBox.scss +42 -0
  153. package/src/components/IconBox/IconBox.stories.js +92 -0
  154. package/src/components/IconBox/IconBox.vue +78 -0
  155. package/src/components/IconBox/__tests__/IconBox.spec.js +37 -0
  156. package/src/components/IconBox/index.ts +3 -0
  157. package/src/components/IdCaption/IdCaption.scss +51 -0
  158. package/src/components/IdCaption/IdCaption.stories.js +224 -0
  159. package/src/components/IdCaption/IdCaption.vue +168 -0
  160. package/src/components/IdCaption/__tests__/IdCaption.spec.js +14 -0
  161. package/src/components/IdCaption/index.ts +3 -0
  162. package/src/components/Label/Label.scss +33 -0
  163. package/src/components/Label/Label.stories.js +60 -0
  164. package/src/components/Label/Label.vue +27 -0
  165. package/src/components/Label/__tests__/Label.spec.js +20 -0
  166. package/src/components/Label/index.ts +4 -0
  167. package/src/components/List/List.scss +0 -0
  168. package/src/components/List/List.stories.js +30 -0
  169. package/src/components/List/List.vue +75 -0
  170. package/src/components/List/__tests__/List.spec.js +33 -0
  171. package/src/components/List/composition/index.ts +3 -0
  172. package/src/components/List/composition/useFocus.ts +49 -0
  173. package/src/components/List/index.ts +4 -0
  174. package/src/components/ListItem/ListItem.scss +37 -0
  175. package/src/components/ListItem/ListItem.stories.js +81 -0
  176. package/src/components/ListItem/ListItem.vue +76 -0
  177. package/src/components/ListItem/ListItem.vue.bkpv2 +84 -0
  178. package/src/components/ListItem/__tests__/ListItem.spec.js +20 -0
  179. package/src/components/ListItem/index.ts +4 -0
  180. package/src/components/Loader/Loader.scss +116 -0
  181. package/src/components/Loader/Loader.stories.ts +48 -0
  182. package/src/components/Loader/Loader.vue +83 -0
  183. package/src/components/Loader/__tests__/Loader.spec.js +35 -0
  184. package/src/components/Loader/index.ts +3 -0
  185. package/src/components/Logger/Logger.scss +56 -0
  186. package/src/components/Logger/Logger.stories.js +228 -0
  187. package/src/components/Logger/Logger.vue +49 -0
  188. package/src/components/Logger/LoggerItem/ILoggerItem.ts +11 -0
  189. package/src/components/Logger/LoggerItem/LoggerItem.scss +99 -0
  190. package/src/components/Logger/LoggerItem/LoggerItem.stories.js +144 -0
  191. package/src/components/Logger/LoggerItem/LoggerItem.vue +98 -0
  192. package/src/components/Logger/LoggerItem/__tests__/LoggerItem.spec.js +93 -0
  193. package/src/components/Logger/LoggerItem/index.ts +4 -0
  194. package/src/components/Logger/LoggerItem/mappingIconKeys.ts +5 -0
  195. package/src/components/Logger/__tests__/Logger.spec.js +75 -0
  196. package/src/components/Logger/index.ts +4 -0
  197. package/src/components/MainFilter/MainFilter.scss +16 -0
  198. package/src/components/MainFilter/MainFilter.stories.js +84 -0
  199. package/src/components/MainFilter/MainFilter.vue +147 -0
  200. package/src/components/MainFilter/__tests__/MainFilter.spec.js +45 -0
  201. package/src/components/MainFilter/index.ts +3 -0
  202. package/src/components/ManagersList/ManagersList.stories.js +10 -0
  203. package/src/components/ManagersList/ManagersList.vue +29 -0
  204. package/src/components/ManagersList/__tests__/ManagersList.spec.js +27 -0
  205. package/src/components/ManagersList/index.ts +3 -0
  206. package/src/components/Modal/Modal.scss +110 -0
  207. package/src/components/Modal/Modal.stories.js +299 -0
  208. package/src/components/Modal/Modal.vue +135 -0
  209. package/src/components/Modal/__tests__/Modal.spec.js +19 -0
  210. package/src/components/Modal/index.ts +4 -0
  211. package/src/components/ModalPromptUser/ModalPromptUser.scss +3 -0
  212. package/src/components/ModalPromptUser/ModalPromptUser.stories.js +121 -0
  213. package/src/components/ModalPromptUser/ModalPromptUser.vue +135 -0
  214. package/src/components/ModalPromptUser/__tests__/ModalPromptUser.spec.js +27 -0
  215. package/src/components/ModalPromptUser/index.ts +3 -0
  216. package/src/components/MultipleFilePicker/MultipleFilePicker.scss +168 -0
  217. package/src/components/MultipleFilePicker/MultipleFilePicker.stories.js +74 -0
  218. package/src/components/MultipleFilePicker/MultipleFilePicker.vue +261 -0
  219. package/src/components/MultipleFilePicker/__tests__/MultipleFilePicker.spec.js +184 -0
  220. package/src/components/MultipleFilePicker/index.ts +3 -0
  221. package/src/components/MultipleSelectShortener/MultipleSelectShortener.stories.js +32 -0
  222. package/src/components/MultipleSelectShortener/MultipleSelectShortener.vue +48 -0
  223. package/src/components/MultipleSelectShortener/__tests__/MultipleSelectShortener.spec.js +21 -0
  224. package/src/components/MultipleSelectShortener/index.ts +4 -0
  225. package/src/components/ProgressBar/ProgressBar.scss +25 -0
  226. package/src/components/ProgressBar/ProgressBar.stories.js +49 -0
  227. package/src/components/ProgressBar/ProgressBar.vue +111 -0
  228. package/src/components/ProgressBar/__tests__/ProgressBar.spec.js +31 -0
  229. package/src/components/ProgressBar/index.ts +4 -0
  230. package/src/components/PromptUserToConfirm/PromptUserToConfirm.stories.js +51 -0
  231. package/src/components/PromptUserToConfirm/PromptUserToConfirm.vue +62 -0
  232. package/src/components/PromptUserToConfirm/__tests__/PromptUserToConfirm.spec.js +24 -0
  233. package/src/components/PromptUserToConfirm/index.ts +3 -0
  234. package/src/components/Radio/Radio.scss +109 -0
  235. package/src/components/Radio/Radio.stories.js +147 -0
  236. package/src/components/Radio/Radio.vue +110 -0
  237. package/src/components/Radio/__tests__/Radio.spec.js +27 -0
  238. package/src/components/Radio/index.ts +4 -0
  239. package/src/components/RadioGroup/RadioGroup.stories.js +85 -0
  240. package/src/components/RadioGroup/RadioGroup.vue +95 -0
  241. package/src/components/RadioGroup/__tests__/RadioGroup.spec.js +24 -0
  242. package/src/components/RadioGroup/index.ts +4 -0
  243. package/src/components/RangeDatePicker/RangeDatePicker.stories.js +76 -0
  244. package/src/components/RangeDatePicker/RangeDatePicker.vue +201 -0
  245. package/src/components/RangeDatePicker/__tests__/RangeDatePicker.spec.js +107 -0
  246. package/src/components/RangeDatePicker/index.ts +3 -0
  247. package/src/components/ResetTableRowSelection/ResetTableRowSelection.stories.js +15 -0
  248. package/src/components/ResetTableRowSelection/ResetTableRowSelection.vue +35 -0
  249. package/src/components/ResetTableRowSelection/__tests__/ResetTableRowSelection.spec.js +33 -0
  250. package/src/components/ResetTableRowSelection/index.ts +4 -0
  251. package/src/components/ResourceMetaInfo/ResourceMetaInfo.scss +14 -0
  252. package/src/components/ResourceMetaInfo/ResourceMetaInfo.stories.js +138 -0
  253. package/src/components/ResourceMetaInfo/ResourceMetaInfo.vue +140 -0
  254. package/src/components/ResourceMetaInfo/__tests__/ResourceMetaInfo.spec.js +182 -0
  255. package/src/components/ResourceMetaInfo/index.ts +4 -0
  256. package/src/components/Select/Select.scss +49 -0
  257. package/src/components/Select/Select.stories.js +346 -0
  258. package/src/components/Select/Select.vue +439 -0
  259. package/src/components/Select/__tests__/Select.spec.js +174 -0
  260. package/src/components/Select/__tests__/composition.spec.js +27 -0
  261. package/src/components/Select/composition/buildData.ts +34 -0
  262. package/src/components/Select/composition/index.ts +3 -0
  263. package/src/components/Select/index.ts +4 -0
  264. package/src/components/SelectAutoComplete/SelectAutoComplete.scss +49 -0
  265. package/src/components/SelectAutoComplete/SelectAutoComplete.stories.js +328 -0
  266. package/src/components/SelectAutoComplete/SelectAutoComplete.vue +535 -0
  267. package/src/components/SelectAutoComplete/__tests__/SelectAutoComplete.spec.js +130 -0
  268. package/src/components/SelectAutoComplete/__tests__/useSelectAutoComplete.spec.js +28 -0
  269. package/src/components/SelectAutoComplete/composables/index.ts +3 -0
  270. package/src/components/SelectAutoComplete/composables/useSelectAutoComplete.ts +37 -0
  271. package/src/components/SelectAutoComplete/index.ts +4 -0
  272. package/src/components/SelectModalOptions/SelectModalOptions.scss +15 -0
  273. package/src/components/SelectModalOptions/SelectModalOptions.stories.js +46 -0
  274. package/src/components/SelectModalOptions/SelectModalOptions.vue +298 -0
  275. package/src/components/SelectModalOptions/__tests__/SelectModalOptions.spec.js +132 -0
  276. package/src/components/SelectModalOptions/index.ts +4 -0
  277. package/src/components/Stepper/StepperHeader/IStep.ts +6 -0
  278. package/src/components/Stepper/StepperHeader/StepperHeader.scss +127 -0
  279. package/src/components/Stepper/StepperHeader/StepperHeader.stories.js +89 -0
  280. package/src/components/Stepper/StepperHeader/StepperHeader.vue +106 -0
  281. package/src/components/Stepper/StepperHeader/__tests__/StepperHeader.spec.js +63 -0
  282. package/src/components/Stepper/StepperHeader/_mixins.scss +46 -0
  283. package/src/components/Stepper/StepperHeader/index.ts +4 -0
  284. package/src/components/Stepper/index.ts +5 -0
  285. package/src/components/Switcher/Switcher.scss +71 -0
  286. package/src/components/Switcher/Switcher.stories.js +112 -0
  287. package/src/components/Switcher/Switcher.vue +94 -0
  288. package/src/components/Switcher/__tests__/Switcher.spec.js +26 -0
  289. package/src/components/Switcher/index.ts +4 -0
  290. package/src/components/TableContextMenu/TableContextMenu.scss +9 -0
  291. package/src/components/TableContextMenu/TableContextMenu.stories.js +92 -0
  292. package/src/components/TableContextMenu/TableContextMenu.vue +89 -0
  293. package/src/components/TableContextMenu/__tests__/TableContextMenu.spec.js +45 -0
  294. package/src/components/TableContextMenu/index.ts +3 -0
  295. package/src/components/Tabs/Tabs.scss +72 -0
  296. package/src/components/Tabs/Tabs.stories.js +68 -0
  297. package/src/components/Tabs/Tabs.vue +130 -0
  298. package/src/components/Tabs/__tests__/Tabs.spec.js +59 -0
  299. package/src/components/Tabs/index.ts +4 -0
  300. package/src/components/TextArea/TextArea.scss +75 -0
  301. package/src/components/TextArea/TextArea.stories.js +147 -0
  302. package/src/components/TextArea/TextArea.vue +224 -0
  303. package/src/components/TextArea/__tests__/TextArea.spec.js +48 -0
  304. package/src/components/TextArea/index.ts +4 -0
  305. package/src/components/TextFieldV2/TextFieldV2.scss +99 -0
  306. package/src/components/TextFieldV2/TextFieldV2.stories.js +260 -0
  307. package/src/components/TextFieldV2/TextFieldV2.vue +276 -0
  308. package/src/components/TextFieldV2/__tests__/TextFieldV2.spec.js +52 -0
  309. package/src/components/TextFieldV2/index.ts +4 -0
  310. package/src/components/Tooltip/Tooltip.scss +38 -0
  311. package/src/components/Tooltip/Tooltip.stories.js +100 -0
  312. package/src/components/Tooltip/Tooltip.vue +125 -0
  313. package/src/components/Tooltip/__tests__/Tooltip.spec.js +20 -0
  314. package/src/components/Tooltip/index.ts +5 -0
  315. package/src/components/Typography/BodyText/BodyText.scss +8 -0
  316. package/src/components/Typography/BodyText/BodyText.stories.js +58 -0
  317. package/src/components/Typography/BodyText/BodyText.vue +51 -0
  318. package/src/components/Typography/BodyText/__tests__/BodyText.spec.js +31 -0
  319. package/src/components/Typography/BodyText/configurations.ts +10 -0
  320. package/src/components/Typography/Caption/Caption.scss +8 -0
  321. package/src/components/Typography/Caption/Caption.stories.js +54 -0
  322. package/src/components/Typography/Caption/Caption.vue +51 -0
  323. package/src/components/Typography/Caption/__tests__/Caption.spec.js +31 -0
  324. package/src/components/Typography/Caption/configurations.ts +7 -0
  325. package/src/components/Typography/Heading/Heading.scss +20 -0
  326. package/src/components/Typography/Heading/Heading.stories.js +32 -0
  327. package/src/components/Typography/Heading/Heading.vue +50 -0
  328. package/src/components/Typography/Heading/__tests__/Heading.spec.js +38 -0
  329. package/src/components/Typography/Heading/configurations.ts +10 -0
  330. package/src/components/Typography/OverlayText/OverlayText.scss +3 -0
  331. package/src/components/Typography/OverlayText/OverlayText.stories.js +25 -0
  332. package/src/components/Typography/OverlayText/OverlayText.vue +22 -0
  333. package/src/components/Typography/OverlayText/__tests__/OverlayText.spec.js +20 -0
  334. package/src/components/Typography/Small/Small.scss +3 -0
  335. package/src/components/Typography/Small/Small.stories.js +34 -0
  336. package/src/components/Typography/Small/Small.vue +47 -0
  337. package/src/components/Typography/Small/__tests__/Small.spec.js +31 -0
  338. package/src/components/Typography/Small/configurations.ts +7 -0
  339. package/src/components/Typography/Subtitle/Subtitle.scss +8 -0
  340. package/src/components/Typography/Subtitle/Subtitle.stories.js +57 -0
  341. package/src/components/Typography/Subtitle/Subtitle.vue +52 -0
  342. package/src/components/Typography/Subtitle/__tests__/Subtitle.spec.js +31 -0
  343. package/src/components/Typography/Subtitle/configurations.ts +8 -0
  344. package/src/components/Typography/Typography.scss +87 -0
  345. package/src/components/Typography/Typography.stories.js +210 -0
  346. package/src/components/Typography/Typography.vue +132 -0
  347. package/src/components/Typography/__tests__/Typography.spec.js +60 -0
  348. package/src/components/Typography/index.ts +11 -0
  349. package/src/components/ValueCaption/ValueCaption.scss +19 -0
  350. package/src/components/ValueCaption/ValueCaption.stories.js +58 -0
  351. package/src/components/ValueCaption/ValueCaption.vue +63 -0
  352. package/src/components/ValueCaption/__tests__/ValueCaption.spec.js +14 -0
  353. package/src/components/ValueCaption/index.ts +4 -0
  354. package/src/components/layout/Basic.stories.js +113 -0
  355. package/src/components/layout/Box/Box.scss +15 -0
  356. package/src/components/layout/Box/Box.stories.js +41 -0
  357. package/src/components/layout/Box/Box.vue +37 -0
  358. package/src/components/layout/Box/__tests__/Box.spec.js +20 -0
  359. package/src/components/layout/Box/index.ts +4 -0
  360. package/src/components/layout/Col/Col.scss +110 -0
  361. package/src/components/layout/Col/Col.stories.js +174 -0
  362. package/src/components/layout/Col/Col.vue +141 -0
  363. package/src/components/layout/Col/__tests__/Col.spec.js +20 -0
  364. package/src/components/layout/Col/index.ts +4 -0
  365. package/src/components/layout/Container/Container.scss +35 -0
  366. package/src/components/layout/Container/Container.stories.js +23 -0
  367. package/src/components/layout/Container/Container.vue +18 -0
  368. package/src/components/layout/Container/index.ts +4 -0
  369. package/src/components/layout/ContainerFooter/Container.stories.js +29 -0
  370. package/src/components/layout/ContainerFooter/ContainerFooter.scss +13 -0
  371. package/src/components/layout/ContainerFooter/ContainerFooter.vue +27 -0
  372. package/src/components/layout/ContainerFooter/index.ts +4 -0
  373. package/src/components/layout/DisplayBreakpoints.stories.mdx +90 -0
  374. package/src/components/layout/GridSystem.stories.js +138 -0
  375. package/src/components/layout/Line/Line.scss +25 -0
  376. package/src/components/layout/Line/Line.stories.js +53 -0
  377. package/src/components/layout/Line/Line.vue +58 -0
  378. package/src/components/layout/Line/__tests__/Line.spec.js +22 -0
  379. package/src/components/layout/Line/index.ts +4 -0
  380. package/src/components/layout/PropsValues.stories.mdx +30 -0
  381. package/src/components/layout/Row/Row.scss +42 -0
  382. package/src/components/layout/Row/Row.stories.js +112 -0
  383. package/src/components/layout/Row/Row.vue +77 -0
  384. package/src/components/layout/Row/__tests__/Row.spec.js +20 -0
  385. package/src/components/layout/Row/index.ts +4 -0
  386. package/src/composition/__tests__/deepEqual.spec.js +13 -0
  387. package/src/composition/__tests__/validateFormFieldBuilder.spec.js +34 -0
  388. package/src/composition/__tests__/validateFormStateBuilder.spec.js +8 -0
  389. package/src/composition/deepEqual.ts +24 -0
  390. package/src/composition/validateFormFieldBuilder.ts +18 -0
  391. package/src/composition/validateFormMethodBuilder.ts +9 -0
  392. package/src/composition/validateFormStateBuilder.ts +13 -0
  393. package/src/configurations/_functions.scss +9 -0
  394. package/src/configurations/_mixins.scss +103 -0
  395. package/src/configurations/_theme-colors-background.scss +10 -0
  396. package/src/configurations/_theme-colors-base.module.scss +8 -0
  397. package/src/configurations/_theme-colors-bw.module.scss +10 -0
  398. package/src/configurations/_theme-colors-stroke.scss +10 -0
  399. package/src/configurations/_theme-colors-text.scss +10 -0
  400. package/src/configurations/_theme-colors-variations.scss +9 -0
  401. package/src/configurations/_theme-colors.scss +122 -0
  402. package/src/configurations/_variables.scss +36 -0
  403. package/src/configurations/colors.ts +12 -0
  404. package/src/configurations/flexVariables.ts +5 -0
  405. package/src/configurations/gutters.ts +1 -0
  406. package/src/configurations/sizes.ts +1 -0
  407. package/src/configurations/typographyHtmlTags.ts +16 -0
  408. package/src/examples/Colors.stories.js +122 -0
  409. package/src/examples/Colors.stories.scss +21 -0
  410. package/src/examples/Table.stories.js +200 -0
  411. package/src/examples/VuetifyDialog.stories.js +129 -0
  412. package/src/helpers/calculateMainZindex.js +12 -0
  413. package/src/helpers/date.ts +94 -0
  414. package/src/helpers/formatDatePickerHeader.ts +19 -0
  415. package/src/helpers/index.ts +4 -0
  416. package/src/helpers/isChildOfFixedElement.js +16 -0
  417. package/src/helpers/randomId.ts +9 -0
  418. package/src/main.ts +92 -0
  419. package/src/scss/Sticky-table.scss +112 -0
  420. package/src/scss/Table.scss +2 -0
  421. package/src/scss/VMenuOverrides.scss +17 -0
  422. package/src/scss/VuejsDialog.scss +93 -0
  423. package/src/scss/cssVariablesGenerator.scss +25 -0
  424. package/src/scss/utils.scss +51 -0
  425. package/src/shims-libs.d.ts +4 -0
  426. package/src/shims-tsx.d.ts +11 -0
  427. package/src/shims-vue.d.ts +4 -0
  428. package/src/stories/Introduction.stories.mdx +118 -0
  429. package/src/stories/assets/code-brackets.svg +1 -0
  430. package/src/stories/assets/colors.svg +1 -0
  431. package/src/stories/assets/comments.svg +1 -0
  432. package/src/stories/assets/direction.svg +1 -0
  433. package/src/stories/assets/flow.svg +1 -0
  434. package/src/stories/assets/logo_farmtech.svg +21 -0
  435. package/src/stories/assets/plugin.svg +1 -0
  436. package/src/stories/assets/repo.svg +1 -0
  437. package/src/vue-file-import.d.ts +4 -0
@@ -0,0 +1,4 @@
1
+ import Icon from './Icon.vue';
2
+
3
+ export { Icon };
4
+ export default Icon;
@@ -0,0 +1,42 @@
1
+ @import '../../configurations/variables';
2
+ @import '../../configurations/theme-colors';
3
+
4
+ .farm-icon-box {
5
+ width: 48px;
6
+ height: 48px;
7
+ border-radius: 8px;
8
+ display: flex;
9
+ justify-content: center;
10
+ align-items: center;
11
+
12
+ @each $color in $theme-colors-list {
13
+ &#{'--' + $color} {
14
+ background: var(--farm-#{$color}-lighten);
15
+ }
16
+ }
17
+
18
+ &--neutral .farm-icon.farm-icon {
19
+ color: var(--farm-neutral-darken);
20
+ }
21
+ &--secondary .farm-icon.farm-icon,
22
+ &--gray .farm-icon.farm-icon {
23
+ color: white;
24
+ }
25
+ }
26
+
27
+ .farm-icon-box--inverted.farm-icon-box {
28
+ @each $color in $theme-colors-list {
29
+ &#{'--' + $color} {
30
+ background: var(--farm-#{$color}-base);
31
+ }
32
+ }
33
+
34
+ .farm-icon.farm-icon--white {
35
+ color: white;
36
+ }
37
+
38
+ &--neutral .farm-icon.farm-icon--white {
39
+ color: var(--farm-neutral-darken);
40
+ }
41
+
42
+ }
@@ -0,0 +1,92 @@
1
+ // import { withDesign } from 'storybook-addon-designs';
2
+ import IconBox from './IconBox';
3
+ import baseThemeColors from '../../configurations/_theme-colors-base.module.scss';
4
+ const colors = Object.keys(baseThemeColors);
5
+ import sizes from '../../configurations/sizes';
6
+ import('../Icon/Icons.stories.scss');
7
+
8
+ export default {
9
+ title: 'Display/IconBox',
10
+ component: IconBox,
11
+ // decorators: [withDesign],
12
+ parameters: {
13
+ viewMode: 'docs',
14
+ docs: {
15
+ description: {
16
+ component: `IconBox<br />
17
+ selector: <em>farm-icon-box</em><br />
18
+ <span style="color: var(--farm-primary-base);">ready for use</span>`,
19
+ },
20
+ },
21
+ },
22
+ };
23
+
24
+ export const Primary = () => ({
25
+ template: `<div class="icons-container">
26
+ <farm-icon-box
27
+ icon="book" />
28
+ </div>`,
29
+ });
30
+
31
+ export const Colors = () => ({
32
+ data() {
33
+ return {
34
+ colors,
35
+ };
36
+ },
37
+ template: `<div class="icons-container">
38
+ <farm-icon-box
39
+ v-for="color of colors"
40
+ :key="color"
41
+ :color="color"
42
+ icon="book" />
43
+ </div>`,
44
+ });
45
+
46
+ export const ColorsDarken = () => ({
47
+ data() {
48
+ return {
49
+ colors,
50
+ };
51
+ },
52
+ template: `<div class="icons-container">
53
+ <farm-icon-box
54
+ v-for="color of colors"
55
+ :key="color"
56
+ :color="color"
57
+ variation="darken"
58
+ icon="book" />
59
+ </div>`,
60
+ });
61
+
62
+ export const Sizes = () => ({
63
+ data() {
64
+ return {
65
+ sizes,
66
+ };
67
+ },
68
+ template: `<div class="icons-container">
69
+ <div v-for="size of sizes" :key="size">
70
+ <farm-icon-box icon="book" :key="size" :size="size" />
71
+ {{ size }}
72
+ </div>
73
+
74
+ </div>`,
75
+ });
76
+
77
+ export const Inverted = () => ({
78
+ data() {
79
+ return {
80
+ colors,
81
+ };
82
+ },
83
+ template: `<div class="icons-container">
84
+ <farm-icon-box
85
+ v-for="color of colors"
86
+ :key="'inverted_' + color"
87
+ :color="color"
88
+ :inverted="true"
89
+ icon="book"
90
+ />
91
+ </div>`,
92
+ });
@@ -0,0 +1,78 @@
1
+ <template>
2
+ <div
3
+ :class="{
4
+ 'farm-icon-box': true,
5
+ [cssColorClass]: true,
6
+ 'farm-icon-box--inverted': inverted,
7
+ }"
8
+ :size="size"
9
+ >
10
+ <farm-icon :color="inverted ? 'white' : color" :variation="variation" :size="size">
11
+ {{ iconParsed }}
12
+ </farm-icon>
13
+ </div>
14
+ </template>
15
+
16
+ <script lang="ts">
17
+ import { PropType } from 'vue';
18
+
19
+ export default {
20
+ name: 'farm-icon-box',
21
+ props: {
22
+ /**
23
+ * Icon
24
+ */
25
+ icon: {
26
+ type: String,
27
+ required: true,
28
+ },
29
+ /**
30
+ * Color
31
+ */
32
+ color: {
33
+ type: String as PropType<
34
+ | 'primary'
35
+ | 'secondary'
36
+ | 'secondary-green'
37
+ | 'secondary-golden'
38
+ | 'neutral'
39
+ | 'info'
40
+ | 'success'
41
+ | 'error'
42
+ | 'warning'
43
+ | 'extra-1'
44
+ | 'extra-2'
45
+ | 'gray'
46
+ >,
47
+ default: 'primary',
48
+ },
49
+ variation: {
50
+ type: String as PropType<'base' | 'darken'>,
51
+ default: 'base',
52
+ },
53
+ size: {
54
+ type: String as PropType<'xs' | 'sm' | 'md' | 'lg' | 'xl'>,
55
+ default: 'md',
56
+ },
57
+ /**
58
+ * Inverted
59
+ */
60
+ inverted: {
61
+ type: Boolean,
62
+ default: false,
63
+ },
64
+ },
65
+ computed: {
66
+ iconParsed() {
67
+ return this.icon.indexOf('mdi-') === 0 ? this.icon.split('mdi-')[1] : this.icon;
68
+ },
69
+ cssColorClass() {
70
+ return `farm-icon-box--${this.color}`;
71
+ },
72
+ },
73
+ };
74
+ </script>
75
+
76
+ <style lang="scss" scoped>
77
+ @import './IconBox.scss';
78
+ </style>
@@ -0,0 +1,37 @@
1
+ import { shallowMount } from '@vue/test-utils';
2
+ import IconBox from '../IconBox';
3
+
4
+ describe('IconBox component', () => {
5
+ let wrapper;
6
+ let component;
7
+
8
+ beforeEach(() => {
9
+ wrapper = shallowMount(IconBox, {
10
+ propsData: {
11
+ icon: 'mdi-book',
12
+ },
13
+ });
14
+ component = wrapper.vm;
15
+ });
16
+
17
+ test('Created hook', () => {
18
+ expect(wrapper).toBeDefined();
19
+ });
20
+
21
+ describe('mount component', () => {
22
+ it('renders correctly', () => {
23
+ expect(wrapper.element).toMatchSnapshot();
24
+ });
25
+ });
26
+
27
+ describe('computed properties', () => {
28
+ it('get iconParsed', () => {
29
+ expect(component.iconParsed).toBeDefined();
30
+ expect(component.iconParsed).toEqual('book');
31
+ });
32
+
33
+ it('get cssColorClass', () => {
34
+ expect(component.cssColorClass).toEqual('farm-icon-box--primary');
35
+ });
36
+ });
37
+ });
@@ -0,0 +1,3 @@
1
+ import IconBox from './IconBox.vue';
2
+
3
+ export default IconBox;
@@ -0,0 +1,51 @@
1
+ @import '../../configurations/mixins';
2
+
3
+ .idcaption {
4
+ display: flex;
5
+ min-height: 48px;
6
+ max-width: 100%;
7
+
8
+ .farm-icon-box {
9
+ margin-right: 8px;
10
+ }
11
+
12
+ &.farm-idcaption--noicon .idcaption__body {
13
+ max-width: 100%;
14
+ }
15
+
16
+ &__body {
17
+
18
+ display: flex;
19
+ flex-direction: column;
20
+ justify-content: space-between;
21
+ align-content: flex-start;
22
+ max-width: calc(100% - 48px);
23
+
24
+ &--single {
25
+ justify-content: center;
26
+ }
27
+
28
+ .farm-typography {
29
+
30
+ margin-bottom: 0;
31
+ display: flex;
32
+ flex: none;
33
+ position: relative;
34
+ align-items: center;
35
+ height: 18px;
36
+
37
+ >span {
38
+ max-width: 100%;
39
+ @include ellipsis;
40
+ }
41
+ }
42
+
43
+ .farm-tooltip {
44
+ padding-right: 1px;
45
+ }
46
+ }
47
+
48
+ &.farm-idcaption--noheight {
49
+ min-height: auto;
50
+ }
51
+ }
@@ -0,0 +1,224 @@
1
+ // import { withDesign } from 'storybook-addon-designs';
2
+ import IdCaption from './';
3
+
4
+ export default {
5
+ title: 'Display/IdCaption',
6
+ component: IdCaption,
7
+ // decorators: [withDesign],
8
+ parameters: {
9
+ docs: {
10
+ description: {
11
+ component: `Id Caption<br />
12
+ selector: <em>farm-idcaption</em><br />
13
+ <span style="color: var(--farm-primary-base);">ready for use</span>
14
+ `,
15
+ },
16
+ },
17
+ design: {
18
+ type: 'figma',
19
+ url: 'https://www.figma.com/file/p62YDSTfWg0Mcnf5APfdvI/%E2%9C%8D-Design-System-%7C-v2?node-id=4087%3A6463',
20
+ },
21
+ viewMode: 'docs',
22
+ },
23
+ };
24
+
25
+ export const Primary = () => ({
26
+ methods: {
27
+ onLinkClick() {
28
+ alert('onLinkClick');
29
+ }
30
+ },
31
+ template: `
32
+ <farm-idcaption
33
+ icon="account-box-outline"
34
+ copyText="texto a copiar"
35
+ :link="true"
36
+ @onLinkClick="onLinkClick"
37
+ >
38
+ <template v-slot:title>
39
+ Upper Line Text
40
+ </template>
41
+ <template v-slot:subtitle>
42
+ Lower: Line Text Line Text Line Text
43
+ </template>
44
+ </farm-idcaption>
45
+ `,
46
+ });
47
+
48
+ export const Linkless = () => ({
49
+ template: `
50
+ <farm-idcaption
51
+ icon="account-box-outline"
52
+ copyText="texto a copiar"
53
+ >
54
+ <template v-slot:title>
55
+ Upper Line Text
56
+ </template>
57
+ <template v-slot:subtitle>
58
+ Lower:Line Text
59
+ </template>
60
+ </farm-idcaption>
61
+
62
+ `,
63
+ });
64
+
65
+ export const Iconless = () => ({
66
+ template: `
67
+ <farm-idcaption
68
+ copyText="texto a copiar"
69
+ :link="true"
70
+ >
71
+ <template v-slot:title>
72
+ Upper Line Text
73
+ </template>
74
+ <template v-slot:subtitle>
75
+ Lower:Line Text
76
+ </template>
77
+ </farm-idcaption>
78
+ `,
79
+ });
80
+
81
+ export const NoUpperText = () => ({
82
+ template: `
83
+ <farm-idcaption
84
+ icon="account-box-outline"
85
+ copyText="texto a copiar"
86
+ >
87
+ <template v-slot:subtitle>
88
+ Lower:Line Text
89
+ </template>
90
+ </farm-idcaption>
91
+ `,
92
+ });
93
+
94
+ export const NoBottomText = () => ({
95
+ template: `
96
+ <farm-idcaption
97
+ icon="account-box-outline"
98
+ :link="true"
99
+ >
100
+ <template v-slot:title>
101
+ Upper Line Text
102
+ </template>
103
+ </farm-idcaption>
104
+ `,
105
+ });
106
+
107
+ export const NoTextToCopy = () => ({
108
+ template: `
109
+ <farm-idcaption
110
+ icon="account-box-outline"
111
+ copyText=""
112
+ :link="true"
113
+ >
114
+ <template v-slot:title>
115
+ Upper Line Text
116
+ </template>
117
+ <template v-slot:subtitle>
118
+ Lower:Line Text
119
+ </template>
120
+ </farm-idcaption>
121
+ `,
122
+ });
123
+
124
+ export const IconBoxCustomColor = () => ({
125
+ template: `
126
+ <farm-idcaption
127
+ icon="account-box-outline"
128
+ copyText="texto a copiar"
129
+ iconBoxColor="error"
130
+ :link="true"
131
+ >
132
+ <template v-slot:title>
133
+ Upper Line Text
134
+ </template>
135
+ <template v-slot:subtitle>
136
+ Lower: Line Text Line Text Line Text
137
+ </template>
138
+ </farm-idcaption>
139
+ `,
140
+ });
141
+
142
+ export const CustomTag = () => ({
143
+ template: `
144
+ <farm-idcaption
145
+ icon="account-box-outline"
146
+ copyText="texto a copiar"
147
+ :link="true"
148
+ >
149
+ <template v-slot:title>
150
+ <b>Upper Line Text</b>
151
+ </template>
152
+ <template v-slot:subtitle>
153
+ <b>Lower:</b> Line Text Line Text Line Text
154
+ </template>
155
+ </farm-idcaption>
156
+ `,
157
+ });
158
+
159
+ export const CustomSuccessMessageAfterCopyToClipboard = () => ({
160
+ template: `
161
+ <farm-idcaption
162
+ icon="account-box-outline"
163
+ copy-text="Custom Success Message to be copied"
164
+ success-message="Custom Success Message"
165
+ >
166
+ <template v-slot:title>
167
+ <b>Upper Line Text</b>
168
+ </template>
169
+ <template v-slot:subtitle>
170
+ <b>Lower:</b> Line Text Line Text Line Text
171
+ </template>
172
+ </farm-idcaption>
173
+ `,
174
+ });
175
+
176
+ export const CustomColors = () => ({
177
+ template: `
178
+ <farm-idcaption
179
+ icon="account-box-outline"
180
+ copy-text="Custom Success Message to be copied"
181
+ buttons-color="extra-1"
182
+ tooltip-color="info"
183
+ >
184
+ <template v-slot:title>
185
+ <b>Upper Line Text</b>
186
+ </template>
187
+ <template v-slot:subtitle>
188
+ <b>Lower:</b> Line Text Line Text Line Text
189
+ </template>
190
+ </farm-idcaption>
191
+ `,
192
+ });
193
+
194
+ export const LongTitles = () => ({
195
+ template: `
196
+ <farm-col sm="3">
197
+ <farm-idcaption
198
+ icon="account-box-outline"
199
+ copyText="texto a copiar"
200
+ :link="true"
201
+ >
202
+ <template v-slot:title>
203
+ Upper Line Text Upper Line Text
204
+ </template>
205
+ <template v-slot:subtitle>
206
+ Lower: Line Text Line Text Line Text Line
207
+ </template>
208
+ </farm-idcaption>
209
+ </farm-col>`,
210
+ });
211
+
212
+ export const NoHeight = () => ({
213
+ template: `
214
+ <farm-col sm="3">
215
+ <farm-idcaption
216
+ copyText=""
217
+ :noHeight="true"
218
+ >
219
+ <template v-slot:subtitle>
220
+ Lower: Line Text Line Text Line Text Line
221
+ </template>
222
+ </farm-idcaption>
223
+ </farm-col>`,
224
+ });
@@ -0,0 +1,168 @@
1
+ <template>
2
+ <div
3
+ :class="{
4
+ idcaption: true,
5
+ 'farm-idcaption': true,
6
+ 'farm-idcaption--noicon': !icon,
7
+ 'farm-idcaption--noheight': noHeight,
8
+ }"
9
+ >
10
+ <farm-icon-box
11
+ v-if="icon"
12
+ :icon="icon"
13
+ :color="iconBoxColor"
14
+ variation="darken"
15
+ size="md"
16
+ />
17
+ <div
18
+ :class="{
19
+ idcaption__body: true,
20
+ 'idcaption__body--single': !hasTitle || !hasSubtitle,
21
+ }"
22
+ >
23
+ <farm-caption variation="semiBold" v-if="hasTitle">
24
+ <span>
25
+ <slot name="title"></slot>
26
+ </span>
27
+ <farm-btn
28
+ v-if="link"
29
+ icon
30
+ class="farm-btn--clickable"
31
+ title="Ver mais"
32
+ :color="buttonsColor"
33
+ @click="$emit('onLinkClick')"
34
+ >
35
+ <farm-icon size="16px">open-in-new</farm-icon>
36
+ </farm-btn>
37
+ </farm-caption>
38
+
39
+ <farm-caption variation="regular" color="black" colorVariation="50" v-if="hasSubtitle">
40
+ <span>
41
+ <slot name="subtitle"></slot>
42
+ </span>
43
+ <farm-copytoclipboard
44
+ v-if="copyText"
45
+ sizeIcon="16px"
46
+ :toCopy="copyText"
47
+ :successMessage="successMessage"
48
+ :buttonColor="buttonsColor"
49
+ :tooltipColor="tooltipColor || buttonsColor"
50
+ />
51
+ </farm-caption>
52
+ </div>
53
+ </div>
54
+ </template>
55
+
56
+ <script lang="ts">
57
+ import { computed, PropType } from 'vue';
58
+ export default {
59
+ name: 'farm-idcaption',
60
+ props: {
61
+ /**
62
+ * Icon (from Material Icons)
63
+ * Example: chart-bar
64
+ */
65
+ icon: {
66
+ type: String,
67
+ },
68
+ /**
69
+ * IconBox Color
70
+ */
71
+ iconBoxColor: {
72
+ type: String as PropType<
73
+ | 'primary'
74
+ | 'secondary-green'
75
+ | 'secondary-golden'
76
+ | 'secondary'
77
+ | 'neutral'
78
+ | 'info'
79
+ | 'success'
80
+ | 'error'
81
+ | 'warning'
82
+ | 'extra-1'
83
+ | 'extra-2'
84
+ | 'gray'
85
+ >,
86
+ default: 'secondary-golden',
87
+ },
88
+ /**
89
+ * Buttons Color (change from link and copy to clipboard)
90
+ */
91
+ buttonsColor: {
92
+ type: String as PropType<
93
+ | 'primary'
94
+ | 'secondary-green'
95
+ | 'secondary-golden'
96
+ | 'secondary'
97
+ | 'neutral'
98
+ | 'info'
99
+ | 'success'
100
+ | 'error'
101
+ | 'warning'
102
+ | 'extra-1'
103
+ | 'extra-2'
104
+ | 'gray'
105
+ >,
106
+ default: 'primary',
107
+ },
108
+ /**
109
+ * Text to be copied to clipboard
110
+ */
111
+ copyText: {
112
+ type: String,
113
+ default: 'Conteúdo copiado para a área de trabalho',
114
+ },
115
+ /**
116
+ * Has link?
117
+ */
118
+ link: {
119
+ type: Boolean,
120
+ default: false,
121
+ },
122
+ /**
123
+ * Success message content after copy
124
+ */
125
+ successMessage: {
126
+ type: String,
127
+ default: 'Conteúdo copiado para a área de trabalho',
128
+ },
129
+ /**
130
+ * Tooltip color
131
+ */
132
+ tooltipColor: {
133
+ type: String as PropType<
134
+ | 'primary'
135
+ | 'secondary'
136
+ | 'secondary-green'
137
+ | 'secondary-golden'
138
+ | 'neutral'
139
+ | 'info'
140
+ | 'success'
141
+ | 'error'
142
+ | 'warning'
143
+ | 'extra-1'
144
+ | 'extra-2'
145
+ >,
146
+ default: 'primary',
147
+ },
148
+ /**
149
+ * noHeight remove min-height of 48px
150
+ */
151
+ noHeight: {
152
+ type: Boolean,
153
+ default: false,
154
+ },
155
+ },
156
+
157
+ setup(_, { slots }) {
158
+ const hasTitle = computed(() => slots.title);
159
+ const hasSubtitle = computed(() => slots.subtitle);
160
+
161
+ return { hasSubtitle, hasTitle };
162
+ },
163
+ };
164
+ </script>
165
+
166
+ <style lang="scss" scoped>
167
+ @import './IdCaption';
168
+ </style>