@weni/unnnic-system 1.16.17 → 1.16.19-develop.0

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 (381) hide show
  1. package/.eslintrc.js +20 -20
  2. package/README.md +2 -2
  3. package/babel.config.js +16 -16
  4. package/dist/scss/colors.scss +121 -121
  5. package/dist/scss/fonts.scss +123 -123
  6. package/dist/scss/grid.scss +51 -51
  7. package/dist/scss/spacing.scss +92 -92
  8. package/dist/scss/unnnic.scss +10 -10
  9. package/dist/unnnic.common.js +13 -13
  10. package/dist/unnnic.common.js.map +1 -1
  11. package/dist/unnnic.umd.js +13 -13
  12. package/dist/unnnic.umd.js.map +1 -1
  13. package/dist/unnnic.umd.min.js.map +1 -1
  14. package/jest.config.js +3 -3
  15. package/package-lock.json +60419 -0
  16. package/package.json +4 -4
  17. package/public/index.html +17 -17
  18. package/src/assets/fonts/fonts/icomoon.svg +163 -163
  19. package/src/assets/fonts/icons.css +582 -582
  20. package/src/assets/icons/Brazil.svg +21 -21
  21. package/src/assets/icons/Spain.svg +498 -498
  22. package/src/assets/icons/USA.svg +28 -28
  23. package/src/assets/icons/add-1.svg +3 -3
  24. package/src/assets/icons/add-circle-1.svg +4 -4
  25. package/src/assets/icons/alarm-bell-ring.svg +8 -8
  26. package/src/assets/icons/alert-circle-1-1.svg +3 -3
  27. package/src/assets/icons/alert-circle-1.svg +5 -5
  28. package/src/assets/icons/american-express.svg +4 -4
  29. package/src/assets/icons/app-window-edit-1.svg +4 -4
  30. package/src/assets/icons/app-window-edit-2.svg +9 -9
  31. package/src/assets/icons/arrow-button-down-1.svg +3 -3
  32. package/src/assets/icons/arrow-button-up-1.svg +3 -3
  33. package/src/assets/icons/arrow-down-1-1.svg +3 -3
  34. package/src/assets/icons/arrow-left-1-1.svg +3 -3
  35. package/src/assets/icons/arrow-redo.svg +3 -3
  36. package/src/assets/icons/arrow-right-1-1.svg +3 -3
  37. package/src/assets/icons/arrow-undo.svg +3 -3
  38. package/src/assets/icons/attachment.svg +3 -3
  39. package/src/assets/icons/bin-1-1.svg +5 -5
  40. package/src/assets/icons/book-address-1-2.svg +4 -4
  41. package/src/assets/icons/book-address-2.svg +3 -3
  42. package/src/assets/icons/book-library-1.svg +9 -9
  43. package/src/assets/icons/book-library-2.svg +3 -3
  44. package/src/assets/icons/bookmark-tag-1.svg +3 -3
  45. package/src/assets/icons/building-2-1.svg +13 -13
  46. package/src/assets/icons/button-play-1.svg +4 -4
  47. package/src/assets/icons/button-refresh-arrow-1.svg +3 -3
  48. package/src/assets/icons/button-refresh-arrows-1.svg +4 -4
  49. package/src/assets/icons/charger-1.svg +4 -4
  50. package/src/assets/icons/chat-translate-1.svg +6 -6
  51. package/src/assets/icons/check-2.svg +3 -3
  52. package/src/assets/icons/check-circle-1-1-1.svg +3 -3
  53. package/src/assets/icons/check-circle-1-1.svg +4 -4
  54. package/src/assets/icons/check-double.svg +3 -3
  55. package/src/assets/icons/check-square-1.svg +4 -4
  56. package/src/assets/icons/check-square-2.svg +4 -4
  57. package/src/assets/icons/checkbox-default.svg +3 -3
  58. package/src/assets/icons/checkbox-disable.svg +3 -3
  59. package/src/assets/icons/checkbox-less.svg +4 -4
  60. package/src/assets/icons/checkbox-select.svg +4 -4
  61. package/src/assets/icons/close-1.svg +3 -3
  62. package/src/assets/icons/cog-1.svg +4 -4
  63. package/src/assets/icons/cog-2.svg +3 -3
  64. package/src/assets/icons/common-file-empty-1.svg +3 -3
  65. package/src/assets/icons/common-file-horizontal-image-1.svg +5 -5
  66. package/src/assets/icons/controls-pause-1.svg +4 -4
  67. package/src/assets/icons/controls-play-1.svg +3 -3
  68. package/src/assets/icons/copy-paste-1.svg +7 -7
  69. package/src/assets/icons/currency-dollar-circle-1.svg +4 -4
  70. package/src/assets/icons/default-avatar.svg +5 -5
  71. package/src/assets/icons/delete-1-1.svg +4 -4
  72. package/src/assets/icons/delete-1.svg +3 -3
  73. package/src/assets/icons/delete-2-1.svg +3 -3
  74. package/src/assets/icons/developer-community-github-1-1.svg +3 -3
  75. package/src/assets/icons/diners-club.svg +6 -6
  76. package/src/assets/icons/discover.svg +11 -11
  77. package/src/assets/icons/download-bottom-1.svg +4 -4
  78. package/src/assets/icons/download-thick-bottom-1.svg +4 -4
  79. package/src/assets/icons/drag-1.svg +10 -10
  80. package/src/assets/icons/email-action-unread-1-1.svg +4 -4
  81. package/src/assets/icons/email-action-unread-1.svg +10 -10
  82. package/src/assets/icons/emoji.svg +6 -6
  83. package/src/assets/icons/expand-8-1.svg +6 -6
  84. package/src/assets/icons/expand-full-1.svg +7 -7
  85. package/src/assets/icons/export-1.svg +5 -5
  86. package/src/assets/icons/filter.svg +3 -3
  87. package/src/assets/icons/fitness-biceps-1.svg +3 -3
  88. package/src/assets/icons/flash-1-3.svg +3 -3
  89. package/src/assets/icons/flash-1-4.svg +3 -3
  90. package/src/assets/icons/floppy-disk-1.svg +6 -6
  91. package/src/assets/icons/folder-1.svg +3 -3
  92. package/src/assets/icons/folder-2.svg +3 -3
  93. package/src/assets/icons/gauge-dashboard-1.svg +4 -4
  94. package/src/assets/icons/gauge-dashboard-2.svg +8 -8
  95. package/src/assets/icons/generic-card.svg +4 -4
  96. package/src/assets/icons/graph-stats-1.svg +3 -3
  97. package/src/assets/icons/graph-stats-ascend-2.svg +3 -3
  98. package/src/assets/icons/graph-stats-circle-1-1.svg +4 -4
  99. package/src/assets/icons/graph-stats-circle-1.svg +4 -4
  100. package/src/assets/icons/graph-stats-descend-2.svg +4 -4
  101. package/src/assets/icons/headphones-customer-support-1.svg +3 -3
  102. package/src/assets/icons/headphones-customer-support-2.svg +3 -3
  103. package/src/assets/icons/headphones-customer-support-human-1-1.svg +4 -4
  104. package/src/assets/icons/hierarchy-3-2.svg +3 -3
  105. package/src/assets/icons/hierarchy-3-3.svg +3 -3
  106. package/src/assets/icons/house-1-1.svg +4 -4
  107. package/src/assets/icons/house-2-2.svg +3 -3
  108. package/src/assets/icons/icon-script.py +27 -27
  109. package/src/assets/icons/indicator.svg +3 -3
  110. package/src/assets/icons/information-circle-4.svg +3 -3
  111. package/src/assets/icons/interaction-time.svg +5 -5
  112. package/src/assets/icons/jcb.svg +21 -21
  113. package/src/assets/icons/keyboard-arrow-down-1.svg +3 -3
  114. package/src/assets/icons/keyboard-arrow-left-1.svg +3 -3
  115. package/src/assets/icons/keyboard-arrow-right-1.svg +3 -3
  116. package/src/assets/icons/keyboard-return-1-1.svg +3 -3
  117. package/src/assets/icons/keyboard-return-1.svg +4 -4
  118. package/src/assets/icons/layout-dashboard-1.svg +6 -6
  119. package/src/assets/icons/layout-dashboard-2.svg +6 -6
  120. package/src/assets/icons/layout-module-1-2.svg +6 -6
  121. package/src/assets/icons/loading-circle-1.svg +19 -19
  122. package/src/assets/icons/lock-2-1.svg +4 -4
  123. package/src/assets/icons/lock-2-2.svg +3 -3
  124. package/src/assets/icons/lock-unlock-1-1.svg +4 -4
  125. package/src/assets/icons/logout-1-1.svg +4 -4
  126. package/src/assets/icons/mastercard.svg +6 -6
  127. package/src/assets/icons/messages-bubble-1.svg +3 -3
  128. package/src/assets/icons/messages-bubble-3.svg +3 -3
  129. package/src/assets/icons/messages-bubble-4.svg +3 -3
  130. package/src/assets/icons/messages.svg +3 -3
  131. package/src/assets/icons/messaging-we-chat-2.svg +4 -4
  132. package/src/assets/icons/messaging-we-chat-3.svg +8 -8
  133. package/src/assets/icons/messaging-whatsapp-1.svg +4 -4
  134. package/src/assets/icons/microphone.svg +4 -4
  135. package/src/assets/icons/move-expand-vertical-1.svg +3 -3
  136. package/src/assets/icons/navigation-menu-vertical-1.svg +5 -5
  137. package/src/assets/icons/notes-1.svg +7 -7
  138. package/src/assets/icons/office-file-pdf-1-1.svg +6 -6
  139. package/src/assets/icons/paginate-filter-text-1.svg +7 -7
  140. package/src/assets/icons/pencil-write-1.svg +4 -4
  141. package/src/assets/icons/phone-3.svg +3 -3
  142. package/src/assets/icons/phone-4.svg +3 -3
  143. package/src/assets/icons/phone-charger-1.svg +3 -3
  144. package/src/assets/icons/photography-equipment-bag-1.svg +5 -5
  145. package/src/assets/icons/pie-line-graph-1.svg +7 -7
  146. package/src/assets/icons/preferences.svg +11 -11
  147. package/src/assets/icons/question-circle-1.svg +5 -5
  148. package/src/assets/icons/question-circle-2.svg +3 -3
  149. package/src/assets/icons/radio-default.svg +3 -3
  150. package/src/assets/icons/radio-disable.svg +3 -3
  151. package/src/assets/icons/radio-selected.svg +4 -4
  152. package/src/assets/icons/rating-star-1-1.svg +3 -3
  153. package/src/assets/icons/rating-star-1.svg +3 -3
  154. package/src/assets/icons/read-email-at-1.svg +10 -10
  155. package/src/assets/icons/response-time.svg +12 -12
  156. package/src/assets/icons/science-fiction-robot-1.svg +8 -8
  157. package/src/assets/icons/science-fiction-robot-2.svg +5 -5
  158. package/src/assets/icons/search-1.svg +3 -3
  159. package/src/assets/icons/send-email-3-1.svg +3 -3
  160. package/src/assets/icons/single-neutral-2.svg +4 -4
  161. package/src/assets/icons/single-neutral-actions-1.svg +4 -4
  162. package/src/assets/icons/social-instagram-1.svg +3 -3
  163. package/src/assets/icons/social-media-facebook-1.svg +3 -3
  164. package/src/assets/icons/social-media-google-1.svg +6 -6
  165. package/src/assets/icons/sort-asc.svg +4 -4
  166. package/src/assets/icons/sort-default.svg +4 -4
  167. package/src/assets/icons/sort-desc.svg +4 -4
  168. package/src/assets/icons/study-light-idea-1.svg +10 -10
  169. package/src/assets/icons/subtract-1.svg +3 -3
  170. package/src/assets/icons/subtract-circle-1.svg +4 -4
  171. package/src/assets/icons/switch-default-disabled.svg +4 -4
  172. package/src/assets/icons/switch-default.svg +11 -11
  173. package/src/assets/icons/switch-selected-disabled.svg +4 -4
  174. package/src/assets/icons/switch-selected.svg +11 -11
  175. package/src/assets/icons/synchronize-arrow-clock-4.svg +4 -4
  176. package/src/assets/icons/synchronize-arrow-clock-5.svg +4 -4
  177. package/src/assets/icons/task-checklist-1.svg +4 -4
  178. package/src/assets/icons/task-list-clock-1.svg +9 -9
  179. package/src/assets/icons/text-bold.svg +3 -3
  180. package/src/assets/icons/text-center.svg +7 -7
  181. package/src/assets/icons/text-italic.svg +3 -3
  182. package/src/assets/icons/text-justified.svg +7 -7
  183. package/src/assets/icons/text-left.svg +7 -7
  184. package/src/assets/icons/text-right.svg +7 -7
  185. package/src/assets/icons/text-underline.svg +4 -4
  186. package/src/assets/icons/ticket-1.svg +9 -9
  187. package/src/assets/icons/ticket-2.svg +4 -4
  188. package/src/assets/icons/time-clock-circle-1.svg +4 -4
  189. package/src/assets/icons/transfer-message.svg +4 -4
  190. package/src/assets/icons/translate-1.svg +8 -8
  191. package/src/assets/icons/translate-2.svg +8 -8
  192. package/src/assets/icons/typing-1.svg +4 -4
  193. package/src/assets/icons/unionpay.svg +7 -7
  194. package/src/assets/icons/unordered-list.svg +8 -8
  195. package/src/assets/icons/upload-bottom-1.svg +4 -4
  196. package/src/assets/icons/video-file-mp4-1.svg +6 -6
  197. package/src/assets/icons/view-1-1.svg +4 -4
  198. package/src/assets/icons/view-off-1.svg +7 -7
  199. package/src/assets/icons/vip-crown-queen-2.svg +4 -4
  200. package/src/assets/icons/visa.svg +8 -8
  201. package/src/assets/img/flag/en.svg +28 -28
  202. package/src/assets/img/flag/pt-br.svg +21 -21
  203. package/src/assets/scss/colors.scss +121 -121
  204. package/src/assets/scss/fonts.scss +123 -123
  205. package/src/assets/scss/grid.scss +51 -51
  206. package/src/assets/scss/spacing.scss +92 -92
  207. package/src/assets/scss/unnnic.scss +10 -10
  208. package/src/components/Accordion/Accordion.vue +142 -142
  209. package/src/components/Alert/Alert.vue +145 -145
  210. package/src/components/Alert/AlertCaller.vue +49 -49
  211. package/src/components/Alert/Version1dot1.vue +146 -146
  212. package/src/components/AudioRecorder/AudioHandler.vue +96 -96
  213. package/src/components/AudioRecorder/AudioPlayer.vue +197 -197
  214. package/src/components/AudioRecorder/AudioRecorder.vue +357 -357
  215. package/src/components/AutocompleteSelect/AutocompleteSelect.vue +318 -318
  216. package/src/components/AvatarIcon/AvatarIcon.vue +90 -90
  217. package/src/components/Banner/Banner.vue +80 -80
  218. package/src/components/Banner/InfoBanner.vue +158 -158
  219. package/src/components/Breadcrumb/Breadcrumb.vue +80 -80
  220. package/src/components/Button/Button.vue +314 -314
  221. package/src/components/Button/ButtonIcon.vue +103 -103
  222. package/src/components/Card/AccountCard.vue +94 -94
  223. package/src/components/Card/BlankCard.vue +83 -83
  224. package/src/components/Card/Card.vue +197 -197
  225. package/src/components/Card/CardCompany.vue +289 -289
  226. package/src/components/Card/CardData.vue +117 -117
  227. package/src/components/Card/CardStatusesContainer.vue +222 -222
  228. package/src/components/Card/ContentCard.vue +135 -135
  229. package/src/components/Card/DashCard.vue +141 -141
  230. package/src/components/Card/DefaultCard.vue +81 -81
  231. package/src/components/Card/MarketplaceCard.vue +173 -173
  232. package/src/components/Card/StatusCard.vue +104 -104
  233. package/src/components/Card/TitleCard.vue +96 -96
  234. package/src/components/CardFlow/CardFlow.vue +175 -175
  235. package/src/components/CardImage/CardImage.vue +150 -150
  236. package/src/components/CardInformation/CardInformation.vue +65 -65
  237. package/src/components/CardNumber/CardNumber.vue +61 -61
  238. package/src/components/CardProject/CardProject.vue +73 -73
  239. package/src/components/Carousel/Carousel.vue +62 -62
  240. package/src/components/Carousel/TagCarousel.vue +190 -190
  241. package/src/components/ChartBar/ChartBar.vue +395 -395
  242. package/src/components/ChartLine/ChartLine.vue +300 -300
  243. package/src/components/ChartRainbow/ChartRainbow.vue +160 -160
  244. package/src/components/ChatText/ChatText.vue +156 -156
  245. package/src/components/Checkbox/Checkbox.vue +139 -139
  246. package/src/components/CircleProgressBar/CircleProgressBar.vue +146 -146
  247. package/src/components/Comment/Comment.vue +99 -99
  248. package/src/components/DataArea/DataArea.vue +96 -96
  249. package/src/components/DateFilter/DateFilter.vue +78 -78
  250. package/src/components/DatePicker/DatePicker.vue +806 -806
  251. package/src/components/Dropdown/Dropdown.vue +109 -109
  252. package/src/components/Dropdown/DropdownItem.vue +31 -31
  253. package/src/components/Dropdown/DropdownSkeleton.vue +164 -164
  254. package/src/components/Dropdown/LanguageSelect.vue +261 -261
  255. package/src/components/Flag.vue +41 -41
  256. package/src/components/FormElement/FormElement.vue +60 -60
  257. package/src/components/Icon.vue +157 -157
  258. package/src/components/ImportCard/ImportCard.vue +199 -199
  259. package/src/components/Indicator/Indicator.vue +108 -108
  260. package/src/components/Input/Autocomplete.vue +325 -325
  261. package/src/components/Input/BaseInput.vue +176 -176
  262. package/src/components/Input/Input.vue +154 -154
  263. package/src/components/Input/TextInput.vue +186 -186
  264. package/src/components/InputDatePicker/InputDatePicker.vue +193 -193
  265. package/src/components/InputNext/InputNext.vue +260 -260
  266. package/src/components/Label/Label.vue +30 -30
  267. package/src/components/Modal/CallModal.vue +23 -23
  268. package/src/components/Modal/Modal.vue +208 -208
  269. package/src/components/ModalNext/ModalNext.vue +396 -396
  270. package/src/components/ModalUpload/ModalUpload.vue +177 -177
  271. package/src/components/MoodRating/MoodRating.vue +115 -115
  272. package/src/components/MultiSelect/MultiSelect.vue +274 -274
  273. package/src/components/Pagination/Pagination.vue +164 -164
  274. package/src/components/ProgressBar/ProgressBar.vue +232 -232
  275. package/src/components/Radio/Radio.vue +133 -133
  276. package/src/components/Select/Select.vue +409 -409
  277. package/src/components/Select/SelectItem.vue +79 -79
  278. package/src/components/SelectListItem/SelectListItem.vue +125 -125
  279. package/src/components/Sidebar/Sidebar.vue +91 -91
  280. package/src/components/Sidebar/SidebarItem.vue +90 -90
  281. package/src/components/Sidebar/SidebarMenu.vue +34 -34
  282. package/src/components/Sidebar/SidebarPrimary.vue +384 -384
  283. package/src/components/SkeletonLoading/SkeletonLoading.vue +115 -115
  284. package/src/components/SkeletonLoading/skeletonTheme.vue +74 -74
  285. package/src/components/Slider/Slider.vue +317 -317
  286. package/src/components/StarRating/StarRating.vue +71 -71
  287. package/src/components/Switch/Switch.vue +170 -170
  288. package/src/components/Tab/Tab.vue +129 -129
  289. package/src/components/Table/Table.vue +115 -115
  290. package/src/components/Table/TableRow.vue +75 -75
  291. package/src/components/TabsExpanded/TabsExpanded.vue +131 -131
  292. package/src/components/Tag/BrandTag.vue +97 -97
  293. package/src/components/Tag/DefaultTag.vue +124 -124
  294. package/src/components/Tag/IndicatorTag.vue +104 -104
  295. package/src/components/Tag/Tag.vue +87 -87
  296. package/src/components/TextArea/TextArea.vue +200 -200
  297. package/src/components/TextEditor/TextEditor.vue +530 -530
  298. package/src/components/ToolTip/ToolTip.vue +192 -192
  299. package/src/components/UploadArea/UploadArea.vue +386 -386
  300. package/src/components/config.js +2 -2
  301. package/src/components/grid/Grid.vue +45 -45
  302. package/src/components/index.js +220 -220
  303. package/src/locales/en.json +15 -15
  304. package/src/locales/es.json +15 -15
  305. package/src/locales/pt_br.json +15 -15
  306. package/src/main.js +13 -13
  307. package/src/stories/Accordion.stories.js +46 -46
  308. package/src/stories/Alert.stories.js +58 -58
  309. package/src/stories/AudioRecorder.stories.js +48 -48
  310. package/src/stories/Autocomplete.stories.js +55 -55
  311. package/src/stories/AutocompleteSelect.stories.js +45 -45
  312. package/src/stories/AvatarIcon.stories.js +24 -24
  313. package/src/stories/Banner.stories.js +46 -46
  314. package/src/stories/Breadcrumb.stories.js +31 -31
  315. package/src/stories/Button.stories.js +49 -49
  316. package/src/stories/ButtonIcon.stories.js +40 -40
  317. package/src/stories/Card.stories.js +118 -118
  318. package/src/stories/CardCompany.stories.js +52 -52
  319. package/src/stories/CardData.stories.js +41 -41
  320. package/src/stories/CardFlow.stories.js +44 -44
  321. package/src/stories/CardImage.stories.js +56 -56
  322. package/src/stories/CardInformation.stories.js +64 -64
  323. package/src/stories/CardNumber.stories.js +35 -35
  324. package/src/stories/CardProject.stories.js +70 -70
  325. package/src/stories/Carousel.stories.js +38 -38
  326. package/src/stories/ChartBar.stories.js +119 -119
  327. package/src/stories/ChartLine.stories.js +55 -55
  328. package/src/stories/ChartRainbow.stories.js +34 -34
  329. package/src/stories/ChatText.stories.js +62 -62
  330. package/src/stories/Checkbox.stories.js +28 -28
  331. package/src/stories/CircleProgressBar.stories.js +36 -36
  332. package/src/stories/Colors.stories.mdx +91 -91
  333. package/src/stories/Comment.stories.js +59 -59
  334. package/src/stories/DataArea.stories.js +75 -75
  335. package/src/stories/DateFilter.stories.js +23 -23
  336. package/src/stories/DatePicker.stories.js +87 -87
  337. package/src/stories/Dropdown.stories.js +19 -19
  338. package/src/stories/DropdownSkeleton.stories.js +15 -15
  339. package/src/stories/Font.stories.mdx +80 -80
  340. package/src/stories/FormElement.stories.js +40 -40
  341. package/src/stories/Grid.stories.js +20 -20
  342. package/src/stories/Icon.stories.js +64 -64
  343. package/src/stories/ImportCard.stories.js +35 -35
  344. package/src/stories/Indicator.stories.js +23 -23
  345. package/src/stories/Input.stories.js +63 -63
  346. package/src/stories/InputDatePicker.stories.js +53 -53
  347. package/src/stories/InputNext.stories.js +109 -109
  348. package/src/stories/Introduction.stories.mdx +207 -207
  349. package/src/stories/Label.stories.js +20 -20
  350. package/src/stories/LanguageSelect.stories.js +28 -28
  351. package/src/stories/Modal.stories.js +58 -58
  352. package/src/stories/ModalNext.stories.js +171 -171
  353. package/src/stories/ModalUpload.stories.js +29 -29
  354. package/src/stories/MoodRating.stories.js +37 -37
  355. package/src/stories/MultiSelect.stories.js +55 -55
  356. package/src/stories/Pagination.stories.js +31 -31
  357. package/src/stories/ProgressBar.stories.js +73 -73
  358. package/src/stories/Radio.stories.js +46 -46
  359. package/src/stories/Select.stories.js +62 -62
  360. package/src/stories/SelectListItem.stories.js +63 -63
  361. package/src/stories/Sidebar.stories.js +37 -37
  362. package/src/stories/SidebarPrimary.stories.js +83 -83
  363. package/src/stories/SkeletonLoading.stories.js +34 -34
  364. package/src/stories/Slider.stories.js +29 -29
  365. package/src/stories/StarRating.stories.js +38 -38
  366. package/src/stories/Switch.stories.js +31 -31
  367. package/src/stories/Tab.stories.js +42 -42
  368. package/src/stories/Table.stories.js +145 -145
  369. package/src/stories/TabsExpanded.stories.js +68 -68
  370. package/src/stories/Tag.stories.js +46 -46
  371. package/src/stories/TextArea.stories.js +43 -43
  372. package/src/stories/TextEditor.stories.js +80 -80
  373. package/src/stories/ToolTip.stories.js +27 -27
  374. package/src/stories/UploadArea.stories.js +51 -51
  375. package/src/utils/call.js +25 -25
  376. package/src/utils/colorsList.js +38 -38
  377. package/src/utils/emojiList.js +47 -47
  378. package/src/utils/iconList.js +108 -108
  379. package/src/utils/icons.js +359 -359
  380. package/src/utils/plugins/i18n.js +26 -26
  381. package/vue.config.js +26 -26
@@ -1,806 +1,806 @@
1
- <template>
2
- <div class="unnnic-date-picker">
3
- <template v-if="type === 'day'">
4
- <template v-for="(openMonth, index) in openMonths">
5
- <div :key="openMonth" class="month-container">
6
- <div :class="['header', `header--${size}`]">
7
- <unnnic-button
8
- size="small"
9
- :icon-center="`arrow-${index === 0 ? 'left' : 'right'}-1-1`"
10
- :type="size === 'large' ? 'secondary' : 'terciary'"
11
- class="button-space"
12
- :style="{ gridArea: `${index === 0 ? 'left' : 'right'}-button` }"
13
- @click="referenceDate = addMonth(referenceDate, index === 0 ? -1 : 1)"
14
- />
15
-
16
- <div :class="['label', `label--${size}`]">
17
- {{ months[getMonth(openMonth)] }}
18
- {{ getFullYear(openMonth) }}
19
- </div>
20
- </div>
21
-
22
- <div :class="['days', `days--${size}`]">
23
- <div v-for="(day, index) in days" :key="index" class="name">{{ day }}</div>
24
- <div
25
- v-for="(date, index) in getDatesOfTheMonth(openMonth)"
26
- :key="`${openMonth}-${index}`"
27
- :class="{
28
- disabled: !date.properties.includes('inside month'),
29
- selectable: date.properties.includes('inside month'),
30
- today: date.properties.includes('today'),
31
- selected: date.properties.includes('selected'),
32
- highlighted: date.properties.includes('highlighted'),
33
- left: date.properties.includes('left-highlighted'),
34
- right: date.properties.includes('right-highlighted'),
35
- }"
36
- @click="date.properties.includes('inside month') && selectDate(date)"
37
- >
38
- {{ getDate(date) }}
39
- </div>
40
- </div>
41
- </div>
42
-
43
- <div :key="`divider-${openMonth}`" class="divider"></div>
44
- </template>
45
- </template>
46
-
47
- <template v-else-if="type === 'month'">
48
- <template v-for="openMonth in [referenceDate]">
49
- <div :key="openMonth" class="month-container">
50
- <div :class="['header', `header--${size}`]">
51
- <unnnic-button
52
- size="small"
53
- icon-center="arrow-left-1-1"
54
- :type="size === 'large' ? 'secondary' : 'terciary'"
55
- class="button-space"
56
- :style="{ gridArea: 'left-button' }"
57
- @click="referenceDate = addMonth(referenceDate, -12)"
58
- />
59
-
60
- <div :class="['label', `label--${size}`]">
61
- {{ getFullYear(openMonth) }}
62
- </div>
63
-
64
- <unnnic-button
65
- size="small"
66
- icon-center="arrow-right-1-1"
67
- :type="size === 'large' ? 'secondary' : 'terciary'"
68
- class="button-space"
69
- :style="{ gridArea: 'right-button' }"
70
- @click="referenceDate = addMonth(referenceDate, 12)"
71
- />
72
- </div>
73
-
74
- <div :class="['days', `months--${size}`]">
75
- <div
76
- v-for="(date, index) in getMonthsOfTheYear(openMonth)"
77
- :key="`${openMonth}-${index}`"
78
- :class="{
79
- disabled: !date.properties.includes('inside month'),
80
- selectable: date.properties.includes('inside month'),
81
- today: date.properties.includes('today'),
82
- selected: date.properties.includes('selected'),
83
- highlighted: date.properties.includes('highlighted'),
84
- left: date.properties.includes('left-highlighted'),
85
- right: date.properties.includes('right-highlighted'),
86
- }"
87
- @click="date.properties.includes('inside month') && selectDate(date)"
88
- >
89
- {{ months[getMonth(date)].substr(0, 3) }}
90
- </div>
91
- </div>
92
- </div>
93
-
94
- <div :key="`divider-${openMonth}`" class="divider"></div>
95
- </template>
96
- </template>
97
-
98
- <template v-else-if="type === 'year'">
99
- <template v-for="openMonth in [referenceDate]">
100
- <div :key="openMonth" class="month-container">
101
- <div :class="['header', `header--${size}`]">
102
- <unnnic-button
103
- size="small"
104
- icon-center="arrow-left-1-1"
105
- :type="size === 'large' ? 'secondary' : 'terciary'"
106
- class="button-space"
107
- :style="{ gridArea: 'left-button' }"
108
- @click="referenceDate = addMonth(referenceDate, -12 * 12)"
109
- />
110
-
111
- <div :class="['label', `label--${size}`]">
112
- {{ getFullYear(openMonth) }}
113
- </div>
114
-
115
- <unnnic-button
116
- size="small"
117
- icon-center="arrow-right-1-1"
118
- :type="size === 'large' ? 'secondary' : 'terciary'"
119
- class="button-space"
120
- :style="{ gridArea: 'right-button' }"
121
- @click="referenceDate = addMonth(referenceDate, 12 * 12)"
122
- />
123
- </div>
124
-
125
- <div :class="['days', `months--${size}`]">
126
- <div
127
- v-for="(date, index) in getYears(openMonth)"
128
- :key="`${openMonth}-${index}`"
129
- :class="{
130
- disabled: !date.properties.includes('inside month'),
131
- selectable: date.properties.includes('inside month'),
132
- today: date.properties.includes('today'),
133
- selected: date.properties.includes('selected'),
134
- highlighted: date.properties.includes('highlighted'),
135
- left: date.properties.includes('left-highlighted'),
136
- right: date.properties.includes('right-highlighted'),
137
- }"
138
- @click="date.properties.includes('inside month') && selectDate(date)"
139
- >
140
- {{ date.date }}
141
- </div>
142
- </div>
143
- </div>
144
-
145
- <div :key="`divider-${openMonth}`" class="divider"></div>
146
- </template>
147
- </template>
148
-
149
- <div v-if="size !== 'small'" class="options-container">
150
- <div class="options">
151
- <div
152
- :class="['option', { selected: optionSelected === option.id }]"
153
- v-for="(option, index) in options"
154
- :key="index"
155
- @click="autoSelect(option.id)"
156
- >
157
- {{ option.name }}
158
- </div>
159
- </div>
160
-
161
- <div class="actions">
162
- <unnnic-button
163
- size="small"
164
- :text="clearLabel"
165
- type="terciary"
166
- @click="clear"
167
- />
168
-
169
- <unnnic-button
170
- size="small"
171
- :text="actionLabel"
172
- type="secondary"
173
- @click="$emit('submit', value)"
174
- />
175
- </div>
176
- </div>
177
- </div>
178
- </template>
179
-
180
- <script>
181
- import unnnicButton from '../Button/Button.vue';
182
-
183
- export default {
184
- components: {
185
- unnnicButton,
186
- },
187
-
188
- props: {
189
- initialStartDate: String,
190
- initialEndDate: String,
191
-
192
- type: {
193
- type: String,
194
- default: 'day',
195
- validator(type) {
196
- return ['day', 'month', 'year'].includes(type);
197
- },
198
- },
199
-
200
- size: {
201
- type: String,
202
- default: 'large',
203
- validator(size) {
204
- return ['small', 'large'].includes(size);
205
- },
206
- },
207
-
208
- clearLabel: {
209
- type: String,
210
- },
211
-
212
- actionLabel: {
213
- type: String,
214
- },
215
-
216
- months: {
217
- type: Array,
218
- default() {
219
- return [
220
- 'Janeiro',
221
- 'Fevereiro',
222
- 'Março',
223
- 'Abril',
224
- 'Maio',
225
- 'Junho',
226
- 'Julho',
227
- 'Agosto',
228
- 'Setembro',
229
- 'Outubro',
230
- 'Novembro',
231
- 'Dezembro',
232
- ];
233
- },
234
- validator(months) {
235
- return months.length === 12;
236
- },
237
- },
238
-
239
- days: {
240
- type: Array,
241
- default() {
242
- return ['D', 'S', 'T', 'Q', 'Q', 'S', 'S'];
243
- },
244
- validator(days) {
245
- return days.length === 7;
246
- },
247
- },
248
-
249
- options: {
250
- type: Array,
251
- default() {
252
- return [{
253
- name: 'Últimos 7 dias',
254
- id: 'last-7-days',
255
- }, {
256
- name: 'Últimos 14 dias',
257
- id: 'last-14-days',
258
- }, {
259
- name: 'Últimos 30 dias',
260
- id: 'last-30-days',
261
- }, {
262
- name: 'Últimos 12 meses',
263
- id: 'last-12-months',
264
- }, {
265
- name: 'Mês Atual',
266
- id: 'current-month',
267
- }, {
268
- name: 'Personalizar',
269
- id: 'custom',
270
- }];
271
- },
272
- },
273
- },
274
-
275
- data() {
276
- const today = new Date();
277
- const referenceDate = `${today.getMonth() + 1} 1 ${today.getFullYear()}`;
278
-
279
- return {
280
- referenceDate,
281
- startDate: (this.initialStartDate || '').replace(/-/g, ' '),
282
- endDate: (this.initialEndDate || '').replace(/-/g, ' '),
283
- optionSelected: '',
284
- };
285
- },
286
-
287
- computed: {
288
- openMonths() {
289
- return [
290
- this.referenceDate,
291
- this.addMonth(this.referenceDate, 1),
292
- ];
293
- },
294
-
295
- value() {
296
- return {
297
- startDate: this.startDate.replaceAll(' ', '-'),
298
- endDate: this.endDate.replaceAll(' ', '-'),
299
- };
300
- },
301
- },
302
-
303
- watch: {
304
- value({ startDate, endDate }) {
305
- this.optionSelected = (startDate || endDate) ? 'custom' : '';
306
-
307
- this.$emit('change', this.value);
308
- },
309
- },
310
-
311
- methods: {
312
- dateToString(date) {
313
- return `${date.getMonth() + 1} ${date.getDate()} ${date.getFullYear()}`;
314
- },
315
-
316
- dateToStringMonth(date) {
317
- return `${date.getMonth() + 1} ${date.getFullYear()}`;
318
- },
319
-
320
- dateToStringYear(date) {
321
- return date.getFullYear();
322
- },
323
-
324
- stringToTime(date) {
325
- return new Date(date).getTime();
326
- },
327
-
328
- getDate(date) {
329
- return new Date(date.toString()).getDate();
330
- },
331
-
332
- getMonth(date) {
333
- return new Date(date).getMonth();
334
- },
335
-
336
- getFullYear(date) {
337
- return new Date(date).getFullYear();
338
- },
339
-
340
- addMonth(referenceDate, quantity) {
341
- const date = new Date(referenceDate);
342
-
343
- date.setMonth(date.getMonth() + quantity);
344
-
345
- return this.dateToString(date);
346
- },
347
-
348
- isDateBetween(internalDate) {
349
- if (this.startDate && this.endDate) {
350
- if (
351
- internalDate >= this.stringToTime(this.startDate)
352
- && internalDate <= this.stringToTime(this.endDate)
353
- ) {
354
- return true;
355
- }
356
- } else if (this.startDate && internalDate >= this.stringToTime(this.startDate)) {
357
- return true;
358
- } else if (this.endDate && internalDate <= this.stringToTime(this.endDate)) {
359
- return true;
360
- }
361
-
362
- return false;
363
- },
364
-
365
- isDateBetweenMonth(internalDate) {
366
- const startDate = new Date(this.startDate);
367
- startDate.setDate(1);
368
- const startDateTime = startDate.getTime();
369
-
370
- if (this.startDate && this.endDate) {
371
- if (
372
- internalDate >= startDateTime
373
- && internalDate <= this.stringToTime(this.endDate)
374
- ) {
375
- return true;
376
- }
377
- } else if (this.startDate && internalDate >= startDateTime) {
378
- return true;
379
- } else if (this.endDate && internalDate <= this.stringToTime(this.endDate)) {
380
- return true;
381
- }
382
-
383
- return false;
384
- },
385
-
386
- isDateBetweenYear(internalDate) {
387
- const startDate = new Date(this.startDate);
388
- startDate.setDate(1);
389
- startDate.setMonth(0);
390
- const startDateTime = startDate.getTime();
391
-
392
- if (this.startDate && this.endDate) {
393
- if (
394
- internalDate >= startDateTime
395
- && internalDate <= this.stringToTime(this.endDate)
396
- ) {
397
- return true;
398
- }
399
- } else if (this.startDate && internalDate >= startDateTime) {
400
- return true;
401
- } else if (this.endDate && internalDate <= this.stringToTime(this.endDate)) {
402
- return true;
403
- }
404
-
405
- return false;
406
- },
407
-
408
- getDatesOfTheMonth(referenceDate) {
409
- const date = new Date(referenceDate);
410
- const currentMonth = date.getMonth();
411
- const oneDayInSeconds = 86400;
412
-
413
- date.setDate(1 - date.getDay());
414
-
415
- const dates = [];
416
-
417
- for (let i = 0; i < 6 * 7; i += 1) {
418
- const dateString = this.dateToString(date);
419
- const properties = [];
420
-
421
- if (currentMonth === date.getMonth()) {
422
- properties.push('inside month');
423
-
424
- const dateInTime = this.stringToTime(this.dateToString(date));
425
- const dayBefore = dateInTime - oneDayInSeconds;
426
- const dayAfter = dateInTime + oneDayInSeconds;
427
-
428
- if (this.isDateBetween(dateInTime)) {
429
- properties.push('selected');
430
-
431
- if (!this.isDateBetween(dayBefore)) {
432
- properties.push('left-highlighted');
433
- }
434
-
435
- if (!this.isDateBetween(dayAfter)) {
436
- properties.push('right-highlighted');
437
- }
438
-
439
- if (properties.includes('left-highlighted') || properties.includes('right-highlighted')) {
440
- properties.push('highlighted');
441
- }
442
- }
443
- }
444
-
445
- if (this.dateToString(date) === this.dateToString(new Date())) {
446
- properties.push('today');
447
- }
448
-
449
- dates.push({
450
- properties,
451
- toString: () => dateString,
452
- });
453
-
454
- date.setDate(date.getDate() + 1);
455
- }
456
-
457
- return dates;
458
- },
459
-
460
- getMonthsOfTheYear(referenceDate) {
461
- const date = new Date(referenceDate);
462
-
463
- date.setMonth(0);
464
-
465
- const dates = [];
466
-
467
- for (let i = 0; i < 3 * 4; i += 1) {
468
- const dateString = this.dateToString(date);
469
- const properties = [];
470
-
471
- properties.push('inside month');
472
-
473
- const dateInTime = this.stringToTime(this.dateToString(date));
474
- let monthBefore = new Date(dateInTime);
475
- let monthAfter = new Date(dateInTime);
476
-
477
- monthBefore.setMonth(monthBefore.getMonth() - 1);
478
- monthAfter.setMonth(monthAfter.getMonth() + 1);
479
-
480
- monthBefore = monthBefore.getTime();
481
- monthAfter = monthAfter.getTime();
482
-
483
- if (this.isDateBetweenMonth(dateInTime)) {
484
- properties.push('selected');
485
-
486
- if (!this.isDateBetweenMonth(monthBefore)) {
487
- properties.push('left-highlighted');
488
- }
489
-
490
- if (!this.isDateBetweenMonth(monthAfter)) {
491
- properties.push('right-highlighted');
492
- }
493
-
494
- if (properties.includes('left-highlighted') || properties.includes('right-highlighted')) {
495
- properties.push('highlighted');
496
- }
497
- }
498
-
499
- if (this.dateToStringMonth(date) === this.dateToStringMonth(new Date())) {
500
- properties.push('today');
501
- }
502
-
503
- dates.push({
504
- properties,
505
- date: dateString,
506
- toString: () => dateString,
507
- });
508
-
509
- date.setMonth(date.getMonth() + 1);
510
- }
511
-
512
- return dates;
513
- },
514
-
515
- getYears(referenceDate) {
516
- const date = new Date(referenceDate);
517
-
518
- date.setMonth(0);
519
-
520
- const dates = [];
521
-
522
- for (let i = 0; i < 3 * 4; i += 1) {
523
- const dateString = this.dateToString(date);
524
- const properties = [];
525
-
526
- properties.push('inside month');
527
-
528
- const dateInTime = this.stringToTime(this.dateToString(date));
529
- let yearBefore = new Date(dateInTime);
530
- let yearAfter = new Date(dateInTime);
531
-
532
- yearBefore.setMonth(yearBefore.getMonth() - 12);
533
- yearAfter.setMonth(yearAfter.getMonth() + 12);
534
-
535
- yearBefore = yearBefore.getTime();
536
- yearAfter = yearAfter.getTime();
537
-
538
- if (this.isDateBetweenYear(dateInTime)) {
539
- properties.push('selected');
540
-
541
- if (!this.isDateBetweenYear(yearBefore)) {
542
- properties.push('left-highlighted');
543
- }
544
-
545
- if (!this.isDateBetweenYear(yearAfter)) {
546
- properties.push('right-highlighted');
547
- }
548
-
549
- if (properties.includes('left-highlighted') || properties.includes('right-highlighted')) {
550
- properties.push('highlighted');
551
- }
552
- }
553
-
554
- if (this.dateToStringYear(date) === this.dateToStringYear(new Date())) {
555
- properties.push('today');
556
- }
557
-
558
- dates.push({
559
- properties,
560
- date: date.getFullYear(),
561
- toString: () => dateString,
562
- });
563
-
564
- date.setFullYear(date.getFullYear() + 1);
565
- }
566
-
567
- return dates;
568
- },
569
-
570
- selectDate(date) {
571
- if (!this.startDate || !this.endDate) {
572
- this.startDate = date.toString();
573
- this.endDate = this.startDate;
574
- } else {
575
- const self = this.stringToTime(date.toString());
576
- const startDate = this.stringToTime(this.startDate);
577
- const endDate = this.stringToTime(this.endDate);
578
-
579
- if (self > endDate) {
580
- this.endDate = date.toString();
581
- } else if (self < startDate) {
582
- this.startDate = date.toString();
583
- } else if (self === startDate || self === endDate) {
584
- this.startDate = date.toString();
585
- this.endDate = this.startDate;
586
- } else if (self - startDate < endDate - self) {
587
- this.startDate = date.toString();
588
- } else {
589
- this.endDate = date.toString();
590
- }
591
- }
592
- },
593
-
594
- clear() {
595
- this.startDate = '';
596
- this.endDate = '';
597
- this.optionSelected = '';
598
- },
599
-
600
- autoSelect(method) {
601
- const today = new Date();
602
-
603
- const days = method.match(/^last-(\d+)-days$/);
604
- const months = method.match(/^last-(\d+)-months$/);
605
-
606
- if (days) {
607
- const howMuch = Number(days[1]);
608
-
609
- this.endDate = this.dateToString(today);
610
- today.setDate(today.getDate() - howMuch + 1);
611
- this.startDate = this.dateToString(today);
612
- } else if (months) {
613
- const howMuch = Number(months[1]);
614
-
615
- this.endDate = this.dateToString(today);
616
- today.setDate(today.getDate() + 1);
617
- today.setMonth(today.getMonth() - howMuch);
618
- this.startDate = this.dateToString(today);
619
- } else if (method === 'current-month') {
620
- today.setDate(1);
621
- this.startDate = this.dateToString(today);
622
- today.setMonth(today.getMonth() + 1);
623
- today.setDate(0);
624
- this.endDate = this.dateToString(today);
625
- }
626
-
627
- if (this.endDate) {
628
- const secondMonth = this.addMonth(this.referenceDate, 1);
629
- const firstDateOfEndDate = `${this.getMonth(this.endDate) + 1} 1 ${this.getFullYear(this.endDate)}`;
630
-
631
- if (![this.referenceDate, secondMonth].includes(firstDateOfEndDate)) {
632
- this.referenceDate = firstDateOfEndDate;
633
- }
634
- }
635
-
636
- this.$nextTick(() => {
637
- this.optionSelected = method;
638
- });
639
- },
640
- },
641
- };
642
- </script>
643
-
644
- <style lang="scss" scoped>
645
- @import "../../assets/scss/unnnic.scss";
646
-
647
- .unnnic-date-picker {
648
- display: inline-flex;
649
- background-color: $unnnic-color-background-snow;
650
- border-radius: $unnnic-border-radius-sm;
651
- box-shadow: $unnnic-shadow-level-separated;
652
- overflow: hidden;
653
-
654
- .month-container {
655
- display: flex;
656
- flex-direction: column;
657
- justify-content: center;
658
-
659
- padding: $unnnic-spacing-inset-sm;
660
-
661
- .header {
662
- display: grid;
663
- align-items: center;
664
- grid-template-areas: "left-button label right-button";
665
-
666
- &--small {
667
- grid-template-columns: 32px auto 32px;
668
- }
669
-
670
- &--large {
671
- grid-template-columns: 36px auto 36px;
672
- margin-bottom: $unnnic-spacing-stack-xs;
673
- }
674
-
675
- .label {
676
- font-family: $unnnic-font-family-secondary;
677
- font-weight: $unnnic-font-weight-black;
678
- color: $unnnic-color-neutral-darkest;
679
- text-align: center;
680
- grid-area: label;
681
-
682
- &--small {
683
- font-size: $unnnic-font-size-body-gt;
684
- }
685
-
686
- &--large {
687
- font-size: $unnnic-font-size-body-gt;
688
- line-height: $unnnic-font-size-body-gt + $unnnic-line-height-md;
689
- }
690
- }
691
- }
692
-
693
- .days {
694
- display: grid;
695
- font-family: $unnnic-font-family-secondary;
696
- font-weight: $unnnic-font-weight-regular;
697
- color: $unnnic-color-neutral-darkest;
698
- text-align: center;
699
-
700
- user-select: none;
701
-
702
- &--small {
703
- grid-template-columns: repeat(7, 28px);
704
- grid-template-rows: repeat(7, 28px);
705
- font-size: $unnnic-font-size-body-md;
706
- line-height: 28px;
707
- }
708
-
709
- &--large {
710
- grid-template-columns: repeat(7, 32px);
711
- grid-template-rows: repeat(7, 32px);
712
- font-size: $unnnic-font-size-body-gt;
713
- line-height: 32px;
714
- }
715
-
716
- &.months--small, &.months--large {
717
- grid-template-columns: repeat(3, 4.75 * $unnnic-font-size);
718
- grid-template-rows: repeat(4, 3.3125 * $unnnic-font-size);
719
- font-size: $unnnic-font-size-body-md;
720
- line-height: 3.3125 * $unnnic-font-size;
721
- }
722
-
723
- .selectable {
724
- cursor: pointer;
725
- }
726
-
727
- .name {
728
- font-weight: $unnnic-font-weight-black;
729
- }
730
-
731
- .today {
732
- font-weight: $unnnic-font-weight-black;
733
- background-color: $unnnic-color-background-sky;
734
- border-radius: $unnnic-border-radius-sm;
735
- }
736
-
737
- .selected {
738
- font-weight: $unnnic-font-weight-black;
739
- background-color: $unnnic-color-background-sky;
740
- color: $unnnic-color-brand-weni-soft;
741
- border-radius: 0;
742
-
743
- &.highlighted {
744
- background-color: $unnnic-color-brand-weni-soft;
745
- color: $unnnic-color-neutral-snow;
746
-
747
- &.left {
748
- border-top-left-radius: $unnnic-border-radius-sm;
749
- border-bottom-left-radius: $unnnic-border-radius-sm;
750
- }
751
-
752
- &.right {
753
- border-top-right-radius: $unnnic-border-radius-sm;
754
- border-bottom-right-radius: $unnnic-border-radius-sm;
755
- }
756
- }
757
- }
758
-
759
- .disabled {
760
- opacity: $unnnic-opacity-level-overlay;
761
- }
762
- }
763
- }
764
-
765
- .divider {
766
- width: 1px;
767
- background-color: $unnnic-color-neutral-soft;
768
- }
769
-
770
- .options-container {
771
- display: flex;
772
- flex-direction: column;
773
- justify-content: space-between;
774
-
775
- .options {
776
- .option {
777
- font-family: $unnnic-font-family-secondary;
778
- font-weight: $unnnic-font-weight-regular;
779
- font-size: $unnnic-font-size-body-gt;
780
- line-height: $unnnic-font-size-body-gt + $unnnic-line-height-md;
781
- color: $unnnic-color-neutral-darkest;
782
-
783
- padding: $unnnic-spacing-stack-xs $unnnic-spacing-inline-sm;
784
- user-select: none;
785
- cursor: pointer;
786
-
787
- &:hover, &.selected {
788
- background-color: $unnnic-color-background-sky;
789
- }
790
-
791
- &.selected {
792
- font-weight: $unnnic-font-weight-bold;
793
- color: $unnnic-color-brand-weni-soft;
794
- }
795
- }
796
- }
797
-
798
- .actions {
799
- display: grid;
800
- grid-template-columns: 1fr 1fr;
801
- gap: $unnnic-spacing-inline-xs;
802
- padding: $unnnic-spacing-stack-xs $unnnic-spacing-inline-sm;
803
- }
804
- }
805
- }
806
- </style>
1
+ <template>
2
+ <div class="unnnic-date-picker">
3
+ <template v-if="type === 'day'">
4
+ <template v-for="(openMonth, index) in openMonths">
5
+ <div :key="openMonth" class="month-container">
6
+ <div :class="['header', `header--${size}`]">
7
+ <unnnic-button
8
+ size="small"
9
+ :icon-center="`arrow-${index === 0 ? 'left' : 'right'}-1-1`"
10
+ :type="size === 'large' ? 'secondary' : 'terciary'"
11
+ class="button-space"
12
+ :style="{ gridArea: `${index === 0 ? 'left' : 'right'}-button` }"
13
+ @click="referenceDate = addMonth(referenceDate, index === 0 ? -1 : 1)"
14
+ />
15
+
16
+ <div :class="['label', `label--${size}`]">
17
+ {{ months[getMonth(openMonth)] }}
18
+ {{ getFullYear(openMonth) }}
19
+ </div>
20
+ </div>
21
+
22
+ <div :class="['days', `days--${size}`]">
23
+ <div v-for="(day, index) in days" :key="index" class="name">{{ day }}</div>
24
+ <div
25
+ v-for="(date, index) in getDatesOfTheMonth(openMonth)"
26
+ :key="`${openMonth}-${index}`"
27
+ :class="{
28
+ disabled: !date.properties.includes('inside month'),
29
+ selectable: date.properties.includes('inside month'),
30
+ today: date.properties.includes('today'),
31
+ selected: date.properties.includes('selected'),
32
+ highlighted: date.properties.includes('highlighted'),
33
+ left: date.properties.includes('left-highlighted'),
34
+ right: date.properties.includes('right-highlighted'),
35
+ }"
36
+ @click="date.properties.includes('inside month') && selectDate(date)"
37
+ >
38
+ {{ getDate(date) }}
39
+ </div>
40
+ </div>
41
+ </div>
42
+
43
+ <div :key="`divider-${openMonth}`" class="divider"></div>
44
+ </template>
45
+ </template>
46
+
47
+ <template v-else-if="type === 'month'">
48
+ <template v-for="openMonth in [referenceDate]">
49
+ <div :key="openMonth" class="month-container">
50
+ <div :class="['header', `header--${size}`]">
51
+ <unnnic-button
52
+ size="small"
53
+ icon-center="arrow-left-1-1"
54
+ :type="size === 'large' ? 'secondary' : 'terciary'"
55
+ class="button-space"
56
+ :style="{ gridArea: 'left-button' }"
57
+ @click="referenceDate = addMonth(referenceDate, -12)"
58
+ />
59
+
60
+ <div :class="['label', `label--${size}`]">
61
+ {{ getFullYear(openMonth) }}
62
+ </div>
63
+
64
+ <unnnic-button
65
+ size="small"
66
+ icon-center="arrow-right-1-1"
67
+ :type="size === 'large' ? 'secondary' : 'terciary'"
68
+ class="button-space"
69
+ :style="{ gridArea: 'right-button' }"
70
+ @click="referenceDate = addMonth(referenceDate, 12)"
71
+ />
72
+ </div>
73
+
74
+ <div :class="['days', `months--${size}`]">
75
+ <div
76
+ v-for="(date, index) in getMonthsOfTheYear(openMonth)"
77
+ :key="`${openMonth}-${index}`"
78
+ :class="{
79
+ disabled: !date.properties.includes('inside month'),
80
+ selectable: date.properties.includes('inside month'),
81
+ today: date.properties.includes('today'),
82
+ selected: date.properties.includes('selected'),
83
+ highlighted: date.properties.includes('highlighted'),
84
+ left: date.properties.includes('left-highlighted'),
85
+ right: date.properties.includes('right-highlighted'),
86
+ }"
87
+ @click="date.properties.includes('inside month') && selectDate(date)"
88
+ >
89
+ {{ months[getMonth(date)].substr(0, 3) }}
90
+ </div>
91
+ </div>
92
+ </div>
93
+
94
+ <div :key="`divider-${openMonth}`" class="divider"></div>
95
+ </template>
96
+ </template>
97
+
98
+ <template v-else-if="type === 'year'">
99
+ <template v-for="openMonth in [referenceDate]">
100
+ <div :key="openMonth" class="month-container">
101
+ <div :class="['header', `header--${size}`]">
102
+ <unnnic-button
103
+ size="small"
104
+ icon-center="arrow-left-1-1"
105
+ :type="size === 'large' ? 'secondary' : 'terciary'"
106
+ class="button-space"
107
+ :style="{ gridArea: 'left-button' }"
108
+ @click="referenceDate = addMonth(referenceDate, -12 * 12)"
109
+ />
110
+
111
+ <div :class="['label', `label--${size}`]">
112
+ {{ getFullYear(openMonth) }}
113
+ </div>
114
+
115
+ <unnnic-button
116
+ size="small"
117
+ icon-center="arrow-right-1-1"
118
+ :type="size === 'large' ? 'secondary' : 'terciary'"
119
+ class="button-space"
120
+ :style="{ gridArea: 'right-button' }"
121
+ @click="referenceDate = addMonth(referenceDate, 12 * 12)"
122
+ />
123
+ </div>
124
+
125
+ <div :class="['days', `months--${size}`]">
126
+ <div
127
+ v-for="(date, index) in getYears(openMonth)"
128
+ :key="`${openMonth}-${index}`"
129
+ :class="{
130
+ disabled: !date.properties.includes('inside month'),
131
+ selectable: date.properties.includes('inside month'),
132
+ today: date.properties.includes('today'),
133
+ selected: date.properties.includes('selected'),
134
+ highlighted: date.properties.includes('highlighted'),
135
+ left: date.properties.includes('left-highlighted'),
136
+ right: date.properties.includes('right-highlighted'),
137
+ }"
138
+ @click="date.properties.includes('inside month') && selectDate(date)"
139
+ >
140
+ {{ date.date }}
141
+ </div>
142
+ </div>
143
+ </div>
144
+
145
+ <div :key="`divider-${openMonth}`" class="divider"></div>
146
+ </template>
147
+ </template>
148
+
149
+ <div v-if="size !== 'small'" class="options-container">
150
+ <div class="options">
151
+ <div
152
+ :class="['option', { selected: optionSelected === option.id }]"
153
+ v-for="(option, index) in options"
154
+ :key="index"
155
+ @click="autoSelect(option.id)"
156
+ >
157
+ {{ option.name }}
158
+ </div>
159
+ </div>
160
+
161
+ <div class="actions">
162
+ <unnnic-button
163
+ size="small"
164
+ :text="clearLabel"
165
+ type="terciary"
166
+ @click="clear"
167
+ />
168
+
169
+ <unnnic-button
170
+ size="small"
171
+ :text="actionLabel"
172
+ type="secondary"
173
+ @click="$emit('submit', value)"
174
+ />
175
+ </div>
176
+ </div>
177
+ </div>
178
+ </template>
179
+
180
+ <script>
181
+ import unnnicButton from '../Button/Button.vue';
182
+
183
+ export default {
184
+ components: {
185
+ unnnicButton,
186
+ },
187
+
188
+ props: {
189
+ initialStartDate: String,
190
+ initialEndDate: String,
191
+
192
+ type: {
193
+ type: String,
194
+ default: 'day',
195
+ validator(type) {
196
+ return ['day', 'month', 'year'].includes(type);
197
+ },
198
+ },
199
+
200
+ size: {
201
+ type: String,
202
+ default: 'large',
203
+ validator(size) {
204
+ return ['small', 'large'].includes(size);
205
+ },
206
+ },
207
+
208
+ clearLabel: {
209
+ type: String,
210
+ },
211
+
212
+ actionLabel: {
213
+ type: String,
214
+ },
215
+
216
+ months: {
217
+ type: Array,
218
+ default() {
219
+ return [
220
+ 'Janeiro',
221
+ 'Fevereiro',
222
+ 'Março',
223
+ 'Abril',
224
+ 'Maio',
225
+ 'Junho',
226
+ 'Julho',
227
+ 'Agosto',
228
+ 'Setembro',
229
+ 'Outubro',
230
+ 'Novembro',
231
+ 'Dezembro',
232
+ ];
233
+ },
234
+ validator(months) {
235
+ return months.length === 12;
236
+ },
237
+ },
238
+
239
+ days: {
240
+ type: Array,
241
+ default() {
242
+ return ['D', 'S', 'T', 'Q', 'Q', 'S', 'S'];
243
+ },
244
+ validator(days) {
245
+ return days.length === 7;
246
+ },
247
+ },
248
+
249
+ options: {
250
+ type: Array,
251
+ default() {
252
+ return [{
253
+ name: 'Últimos 7 dias',
254
+ id: 'last-7-days',
255
+ }, {
256
+ name: 'Últimos 14 dias',
257
+ id: 'last-14-days',
258
+ }, {
259
+ name: 'Últimos 30 dias',
260
+ id: 'last-30-days',
261
+ }, {
262
+ name: 'Últimos 12 meses',
263
+ id: 'last-12-months',
264
+ }, {
265
+ name: 'Mês Atual',
266
+ id: 'current-month',
267
+ }, {
268
+ name: 'Personalizar',
269
+ id: 'custom',
270
+ }];
271
+ },
272
+ },
273
+ },
274
+
275
+ data() {
276
+ const today = new Date();
277
+ const referenceDate = `${today.getMonth() + 1} 1 ${today.getFullYear()}`;
278
+
279
+ return {
280
+ referenceDate,
281
+ startDate: (this.initialStartDate || '').replace(/-/g, ' '),
282
+ endDate: (this.initialEndDate || '').replace(/-/g, ' '),
283
+ optionSelected: '',
284
+ };
285
+ },
286
+
287
+ computed: {
288
+ openMonths() {
289
+ return [
290
+ this.referenceDate,
291
+ this.addMonth(this.referenceDate, 1),
292
+ ];
293
+ },
294
+
295
+ value() {
296
+ return {
297
+ startDate: this.startDate.replaceAll(' ', '-'),
298
+ endDate: this.endDate.replaceAll(' ', '-'),
299
+ };
300
+ },
301
+ },
302
+
303
+ watch: {
304
+ value({ startDate, endDate }) {
305
+ this.optionSelected = (startDate || endDate) ? 'custom' : '';
306
+
307
+ this.$emit('change', this.value);
308
+ },
309
+ },
310
+
311
+ methods: {
312
+ dateToString(date) {
313
+ return `${date.getMonth() + 1} ${date.getDate()} ${date.getFullYear()}`;
314
+ },
315
+
316
+ dateToStringMonth(date) {
317
+ return `${date.getMonth() + 1} ${date.getFullYear()}`;
318
+ },
319
+
320
+ dateToStringYear(date) {
321
+ return date.getFullYear();
322
+ },
323
+
324
+ stringToTime(date) {
325
+ return new Date(date).getTime();
326
+ },
327
+
328
+ getDate(date) {
329
+ return new Date(date.toString()).getDate();
330
+ },
331
+
332
+ getMonth(date) {
333
+ return new Date(date).getMonth();
334
+ },
335
+
336
+ getFullYear(date) {
337
+ return new Date(date).getFullYear();
338
+ },
339
+
340
+ addMonth(referenceDate, quantity) {
341
+ const date = new Date(referenceDate);
342
+
343
+ date.setMonth(date.getMonth() + quantity);
344
+
345
+ return this.dateToString(date);
346
+ },
347
+
348
+ isDateBetween(internalDate) {
349
+ if (this.startDate && this.endDate) {
350
+ if (
351
+ internalDate >= this.stringToTime(this.startDate)
352
+ && internalDate <= this.stringToTime(this.endDate)
353
+ ) {
354
+ return true;
355
+ }
356
+ } else if (this.startDate && internalDate >= this.stringToTime(this.startDate)) {
357
+ return true;
358
+ } else if (this.endDate && internalDate <= this.stringToTime(this.endDate)) {
359
+ return true;
360
+ }
361
+
362
+ return false;
363
+ },
364
+
365
+ isDateBetweenMonth(internalDate) {
366
+ const startDate = new Date(this.startDate);
367
+ startDate.setDate(1);
368
+ const startDateTime = startDate.getTime();
369
+
370
+ if (this.startDate && this.endDate) {
371
+ if (
372
+ internalDate >= startDateTime
373
+ && internalDate <= this.stringToTime(this.endDate)
374
+ ) {
375
+ return true;
376
+ }
377
+ } else if (this.startDate && internalDate >= startDateTime) {
378
+ return true;
379
+ } else if (this.endDate && internalDate <= this.stringToTime(this.endDate)) {
380
+ return true;
381
+ }
382
+
383
+ return false;
384
+ },
385
+
386
+ isDateBetweenYear(internalDate) {
387
+ const startDate = new Date(this.startDate);
388
+ startDate.setDate(1);
389
+ startDate.setMonth(0);
390
+ const startDateTime = startDate.getTime();
391
+
392
+ if (this.startDate && this.endDate) {
393
+ if (
394
+ internalDate >= startDateTime
395
+ && internalDate <= this.stringToTime(this.endDate)
396
+ ) {
397
+ return true;
398
+ }
399
+ } else if (this.startDate && internalDate >= startDateTime) {
400
+ return true;
401
+ } else if (this.endDate && internalDate <= this.stringToTime(this.endDate)) {
402
+ return true;
403
+ }
404
+
405
+ return false;
406
+ },
407
+
408
+ getDatesOfTheMonth(referenceDate) {
409
+ const date = new Date(referenceDate);
410
+ const currentMonth = date.getMonth();
411
+ const oneDayInSeconds = 86400;
412
+
413
+ date.setDate(1 - date.getDay());
414
+
415
+ const dates = [];
416
+
417
+ for (let i = 0; i < 6 * 7; i += 1) {
418
+ const dateString = this.dateToString(date);
419
+ const properties = [];
420
+
421
+ if (currentMonth === date.getMonth()) {
422
+ properties.push('inside month');
423
+
424
+ const dateInTime = this.stringToTime(this.dateToString(date));
425
+ const dayBefore = dateInTime - oneDayInSeconds;
426
+ const dayAfter = dateInTime + oneDayInSeconds;
427
+
428
+ if (this.isDateBetween(dateInTime)) {
429
+ properties.push('selected');
430
+
431
+ if (!this.isDateBetween(dayBefore)) {
432
+ properties.push('left-highlighted');
433
+ }
434
+
435
+ if (!this.isDateBetween(dayAfter)) {
436
+ properties.push('right-highlighted');
437
+ }
438
+
439
+ if (properties.includes('left-highlighted') || properties.includes('right-highlighted')) {
440
+ properties.push('highlighted');
441
+ }
442
+ }
443
+ }
444
+
445
+ if (this.dateToString(date) === this.dateToString(new Date())) {
446
+ properties.push('today');
447
+ }
448
+
449
+ dates.push({
450
+ properties,
451
+ toString: () => dateString,
452
+ });
453
+
454
+ date.setDate(date.getDate() + 1);
455
+ }
456
+
457
+ return dates;
458
+ },
459
+
460
+ getMonthsOfTheYear(referenceDate) {
461
+ const date = new Date(referenceDate);
462
+
463
+ date.setMonth(0);
464
+
465
+ const dates = [];
466
+
467
+ for (let i = 0; i < 3 * 4; i += 1) {
468
+ const dateString = this.dateToString(date);
469
+ const properties = [];
470
+
471
+ properties.push('inside month');
472
+
473
+ const dateInTime = this.stringToTime(this.dateToString(date));
474
+ let monthBefore = new Date(dateInTime);
475
+ let monthAfter = new Date(dateInTime);
476
+
477
+ monthBefore.setMonth(monthBefore.getMonth() - 1);
478
+ monthAfter.setMonth(monthAfter.getMonth() + 1);
479
+
480
+ monthBefore = monthBefore.getTime();
481
+ monthAfter = monthAfter.getTime();
482
+
483
+ if (this.isDateBetweenMonth(dateInTime)) {
484
+ properties.push('selected');
485
+
486
+ if (!this.isDateBetweenMonth(monthBefore)) {
487
+ properties.push('left-highlighted');
488
+ }
489
+
490
+ if (!this.isDateBetweenMonth(monthAfter)) {
491
+ properties.push('right-highlighted');
492
+ }
493
+
494
+ if (properties.includes('left-highlighted') || properties.includes('right-highlighted')) {
495
+ properties.push('highlighted');
496
+ }
497
+ }
498
+
499
+ if (this.dateToStringMonth(date) === this.dateToStringMonth(new Date())) {
500
+ properties.push('today');
501
+ }
502
+
503
+ dates.push({
504
+ properties,
505
+ date: dateString,
506
+ toString: () => dateString,
507
+ });
508
+
509
+ date.setMonth(date.getMonth() + 1);
510
+ }
511
+
512
+ return dates;
513
+ },
514
+
515
+ getYears(referenceDate) {
516
+ const date = new Date(referenceDate);
517
+
518
+ date.setMonth(0);
519
+
520
+ const dates = [];
521
+
522
+ for (let i = 0; i < 3 * 4; i += 1) {
523
+ const dateString = this.dateToString(date);
524
+ const properties = [];
525
+
526
+ properties.push('inside month');
527
+
528
+ const dateInTime = this.stringToTime(this.dateToString(date));
529
+ let yearBefore = new Date(dateInTime);
530
+ let yearAfter = new Date(dateInTime);
531
+
532
+ yearBefore.setMonth(yearBefore.getMonth() - 12);
533
+ yearAfter.setMonth(yearAfter.getMonth() + 12);
534
+
535
+ yearBefore = yearBefore.getTime();
536
+ yearAfter = yearAfter.getTime();
537
+
538
+ if (this.isDateBetweenYear(dateInTime)) {
539
+ properties.push('selected');
540
+
541
+ if (!this.isDateBetweenYear(yearBefore)) {
542
+ properties.push('left-highlighted');
543
+ }
544
+
545
+ if (!this.isDateBetweenYear(yearAfter)) {
546
+ properties.push('right-highlighted');
547
+ }
548
+
549
+ if (properties.includes('left-highlighted') || properties.includes('right-highlighted')) {
550
+ properties.push('highlighted');
551
+ }
552
+ }
553
+
554
+ if (this.dateToStringYear(date) === this.dateToStringYear(new Date())) {
555
+ properties.push('today');
556
+ }
557
+
558
+ dates.push({
559
+ properties,
560
+ date: date.getFullYear(),
561
+ toString: () => dateString,
562
+ });
563
+
564
+ date.setFullYear(date.getFullYear() + 1);
565
+ }
566
+
567
+ return dates;
568
+ },
569
+
570
+ selectDate(date) {
571
+ if (!this.startDate || !this.endDate) {
572
+ this.startDate = date.toString();
573
+ this.endDate = this.startDate;
574
+ } else {
575
+ const self = this.stringToTime(date.toString());
576
+ const startDate = this.stringToTime(this.startDate);
577
+ const endDate = this.stringToTime(this.endDate);
578
+
579
+ if (self > endDate) {
580
+ this.endDate = date.toString();
581
+ } else if (self < startDate) {
582
+ this.startDate = date.toString();
583
+ } else if (self === startDate || self === endDate) {
584
+ this.startDate = date.toString();
585
+ this.endDate = this.startDate;
586
+ } else if (self - startDate < endDate - self) {
587
+ this.startDate = date.toString();
588
+ } else {
589
+ this.endDate = date.toString();
590
+ }
591
+ }
592
+ },
593
+
594
+ clear() {
595
+ this.startDate = '';
596
+ this.endDate = '';
597
+ this.optionSelected = '';
598
+ },
599
+
600
+ autoSelect(method) {
601
+ const today = new Date();
602
+
603
+ const days = method.match(/^last-(\d+)-days$/);
604
+ const months = method.match(/^last-(\d+)-months$/);
605
+
606
+ if (days) {
607
+ const howMuch = Number(days[1]);
608
+
609
+ this.endDate = this.dateToString(today);
610
+ today.setDate(today.getDate() - howMuch + 1);
611
+ this.startDate = this.dateToString(today);
612
+ } else if (months) {
613
+ const howMuch = Number(months[1]);
614
+
615
+ this.endDate = this.dateToString(today);
616
+ today.setDate(today.getDate() + 1);
617
+ today.setMonth(today.getMonth() - howMuch);
618
+ this.startDate = this.dateToString(today);
619
+ } else if (method === 'current-month') {
620
+ today.setDate(1);
621
+ this.startDate = this.dateToString(today);
622
+ today.setMonth(today.getMonth() + 1);
623
+ today.setDate(0);
624
+ this.endDate = this.dateToString(today);
625
+ }
626
+
627
+ if (this.endDate) {
628
+ const secondMonth = this.addMonth(this.referenceDate, 1);
629
+ const firstDateOfEndDate = `${this.getMonth(this.endDate) + 1} 1 ${this.getFullYear(this.endDate)}`;
630
+
631
+ if (![this.referenceDate, secondMonth].includes(firstDateOfEndDate)) {
632
+ this.referenceDate = firstDateOfEndDate;
633
+ }
634
+ }
635
+
636
+ this.$nextTick(() => {
637
+ this.optionSelected = method;
638
+ });
639
+ },
640
+ },
641
+ };
642
+ </script>
643
+
644
+ <style lang="scss" scoped>
645
+ @import "../../assets/scss/unnnic.scss";
646
+
647
+ .unnnic-date-picker {
648
+ display: inline-flex;
649
+ background-color: $unnnic-color-background-snow;
650
+ border-radius: $unnnic-border-radius-sm;
651
+ box-shadow: $unnnic-shadow-level-separated;
652
+ overflow: hidden;
653
+
654
+ .month-container {
655
+ display: flex;
656
+ flex-direction: column;
657
+ justify-content: center;
658
+
659
+ padding: $unnnic-spacing-inset-sm;
660
+
661
+ .header {
662
+ display: grid;
663
+ align-items: center;
664
+ grid-template-areas: "left-button label right-button";
665
+
666
+ &--small {
667
+ grid-template-columns: 32px auto 32px;
668
+ }
669
+
670
+ &--large {
671
+ grid-template-columns: 36px auto 36px;
672
+ margin-bottom: $unnnic-spacing-stack-xs;
673
+ }
674
+
675
+ .label {
676
+ font-family: $unnnic-font-family-secondary;
677
+ font-weight: $unnnic-font-weight-black;
678
+ color: $unnnic-color-neutral-darkest;
679
+ text-align: center;
680
+ grid-area: label;
681
+
682
+ &--small {
683
+ font-size: $unnnic-font-size-body-gt;
684
+ }
685
+
686
+ &--large {
687
+ font-size: $unnnic-font-size-body-gt;
688
+ line-height: $unnnic-font-size-body-gt + $unnnic-line-height-md;
689
+ }
690
+ }
691
+ }
692
+
693
+ .days {
694
+ display: grid;
695
+ font-family: $unnnic-font-family-secondary;
696
+ font-weight: $unnnic-font-weight-regular;
697
+ color: $unnnic-color-neutral-darkest;
698
+ text-align: center;
699
+
700
+ user-select: none;
701
+
702
+ &--small {
703
+ grid-template-columns: repeat(7, 28px);
704
+ grid-template-rows: repeat(7, 28px);
705
+ font-size: $unnnic-font-size-body-md;
706
+ line-height: 28px;
707
+ }
708
+
709
+ &--large {
710
+ grid-template-columns: repeat(7, 32px);
711
+ grid-template-rows: repeat(7, 32px);
712
+ font-size: $unnnic-font-size-body-gt;
713
+ line-height: 32px;
714
+ }
715
+
716
+ &.months--small, &.months--large {
717
+ grid-template-columns: repeat(3, 4.75 * $unnnic-font-size);
718
+ grid-template-rows: repeat(4, 3.3125 * $unnnic-font-size);
719
+ font-size: $unnnic-font-size-body-md;
720
+ line-height: 3.3125 * $unnnic-font-size;
721
+ }
722
+
723
+ .selectable {
724
+ cursor: pointer;
725
+ }
726
+
727
+ .name {
728
+ font-weight: $unnnic-font-weight-black;
729
+ }
730
+
731
+ .today {
732
+ font-weight: $unnnic-font-weight-black;
733
+ background-color: $unnnic-color-background-sky;
734
+ border-radius: $unnnic-border-radius-sm;
735
+ }
736
+
737
+ .selected {
738
+ font-weight: $unnnic-font-weight-black;
739
+ background-color: $unnnic-color-background-sky;
740
+ color: $unnnic-color-brand-weni-soft;
741
+ border-radius: 0;
742
+
743
+ &.highlighted {
744
+ background-color: $unnnic-color-brand-weni-soft;
745
+ color: $unnnic-color-neutral-snow;
746
+
747
+ &.left {
748
+ border-top-left-radius: $unnnic-border-radius-sm;
749
+ border-bottom-left-radius: $unnnic-border-radius-sm;
750
+ }
751
+
752
+ &.right {
753
+ border-top-right-radius: $unnnic-border-radius-sm;
754
+ border-bottom-right-radius: $unnnic-border-radius-sm;
755
+ }
756
+ }
757
+ }
758
+
759
+ .disabled {
760
+ opacity: $unnnic-opacity-level-overlay;
761
+ }
762
+ }
763
+ }
764
+
765
+ .divider {
766
+ width: 1px;
767
+ background-color: $unnnic-color-neutral-soft;
768
+ }
769
+
770
+ .options-container {
771
+ display: flex;
772
+ flex-direction: column;
773
+ justify-content: space-between;
774
+
775
+ .options {
776
+ .option {
777
+ font-family: $unnnic-font-family-secondary;
778
+ font-weight: $unnnic-font-weight-regular;
779
+ font-size: $unnnic-font-size-body-gt;
780
+ line-height: $unnnic-font-size-body-gt + $unnnic-line-height-md;
781
+ color: $unnnic-color-neutral-darkest;
782
+
783
+ padding: $unnnic-spacing-stack-xs $unnnic-spacing-inline-sm;
784
+ user-select: none;
785
+ cursor: pointer;
786
+
787
+ &:hover, &.selected {
788
+ background-color: $unnnic-color-background-sky;
789
+ }
790
+
791
+ &.selected {
792
+ font-weight: $unnnic-font-weight-bold;
793
+ color: $unnnic-color-brand-weni-soft;
794
+ }
795
+ }
796
+ }
797
+
798
+ .actions {
799
+ display: grid;
800
+ grid-template-columns: 1fr 1fr;
801
+ gap: $unnnic-spacing-inline-xs;
802
+ padding: $unnnic-spacing-stack-xs $unnnic-spacing-inline-sm;
803
+ }
804
+ }
805
+ }
806
+ </style>